From c57a814a81fb6a0244f543e1bbfa2331895d5182 Mon Sep 17 00:00:00 2001 From: Jason Kummerl Date: Sun, 27 Oct 2024 11:30:56 -0400 Subject: [PATCH] Update for svelte5 --- .eslintrc.cjs | 53 +- .github/workflows/coverage.yml | 40 +- .github/workflows/publish.yml | 50 +- .npmrc | 1 + .prettierrc | 20 +- README.md | 38 +- docs/package-lock.json | 2433 ++++++--- docs/package.json | 4 +- docs/src/app.html | 2 +- docs/src/app.postcss | 1 - docs/src/lib/styles/kit-docs.css | 8 +- docs/src/routes/+page.md | 1 + .../docs/[...2]api/[...13]body-cell/+page.md | 1 - .../[...4]create-view-model/+page.md | 2 +- .../[...3]plugins/[...2]add-sort-by/+page.md | 2 +- docs/tailwind.config.cjs | 10 +- package-lock.json | 4401 +++++++---------- package.json | 194 +- src/app.d.ts | 8 +- src/app.html | 22 +- src/lib/bodyCells.DataBodyCell.render.test.ts | 110 +- .../bodyCells.DisplayBodyCell.render.test.ts | 92 +- src/lib/bodyCells.HeaderCell.render.test.ts | 92 +- src/lib/bodyCells.ts | 273 +- src/lib/bodyRows.getBodyRows.test.ts | 650 +-- src/lib/bodyRows.getColumnedBodyRows.test.ts | 124 +- src/lib/bodyRows.getSubRows.test.ts | 302 +- src/lib/bodyRows.ts | 531 +- src/lib/columns.getDataColumns.test.ts | 126 +- src/lib/columns.newDataColumn.test.ts | 56 +- src/lib/columns.ts | 335 +- src/lib/constants.ts | 2 +- src/lib/createTable.createColumns.test.ts | 140 +- src/lib/createTable.ts | 121 +- src/lib/createViewModel.ts | 563 +-- src/lib/headerCells.ts | 434 +- src/lib/headerRows.getHeaderRows.test.ts | 864 ++-- src/lib/headerRows.getMergedRow.test.ts | 464 +- .../headerRows.getOrderedColumnMatrix.test.ts | 486 +- src/lib/headerRows.ts | 393 +- src/lib/index.ts | 29 +- src/lib/plugins/addColumnFilters.ts | 301 +- src/lib/plugins/addColumnOrder.ts | 66 +- src/lib/plugins/addDataExport.ts | 175 +- src/lib/plugins/addExpandedRows.ts | 132 +- src/lib/plugins/addFlatten.test.ts | 222 +- src/lib/plugins/addFlatten.ts | 100 +- src/lib/plugins/addGridLayout.ts | 161 +- src/lib/plugins/addGroupBy.test.ts | 226 +- src/lib/plugins/addGroupBy.ts | 470 +- src/lib/plugins/addHiddenColumns.ts | 47 +- src/lib/plugins/addPagination.ts | 238 +- src/lib/plugins/addResizedColumns.ts | 562 +-- src/lib/plugins/addSelectedRows.test.ts | 816 ++- src/lib/plugins/addSelectedRows.ts | 478 +- src/lib/plugins/addSortBy.test.ts | 114 +- src/lib/plugins/addSortBy.ts | 418 +- src/lib/plugins/addSubRows.ts | 79 +- src/lib/plugins/addTableFilter.ts | 259 +- src/lib/plugins/index.ts | 30 +- src/lib/plugins/package.json | 6 +- src/lib/tableComponent.applyHook.test.ts | 178 +- src/lib/tableComponent.ts | 88 +- src/lib/types/Action.ts | 8 +- src/lib/types/Entries.ts | 8 +- src/lib/types/KeyPath.ts | 26 +- src/lib/types/Label.ts | 24 +- src/lib/types/Matrix.ts | 2 +- src/lib/types/TablePlugin.ts | 217 +- src/lib/utils/array.ts | 14 +- .../attributes.finalizeAttributes.test.ts | 56 +- .../utils/attributes.mergeAttributes.test.ts | 96 +- src/lib/utils/attributes.ts | 54 +- src/lib/utils/clone.ts | 18 +- src/lib/utils/compare.ts | 26 +- src/lib/utils/counter.ts | 12 +- src/lib/utils/css.ts | 8 +- src/lib/utils/event.ts | 6 +- src/lib/utils/filter.ts | 8 +- src/lib/utils/math.ts | 4 +- src/lib/utils/matrix.ts | 44 +- src/lib/utils/store.arraySetStore.test.ts | 178 +- src/lib/utils/store.recordSetStore.test.ts | 268 +- src/lib/utils/store.ts | 281 +- src/routes/+page.svelte | 815 ++- src/routes/_ExpandIndicator.svelte | 38 +- src/routes/_Italic.svelte | 16 +- src/routes/_NumberRangeFilter.svelte | 36 +- src/routes/_Profile.svelte | 12 +- src/routes/_SelectFilter.svelte | 18 +- src/routes/_SelectIndicator.svelte | 6 +- src/routes/_TextFilter.svelte | 13 +- src/routes/_createSamples.d.ts | 16 +- src/routes/_createSamples.ts | 58 +- src/routes/_getShuffled.ts | 16 +- svelte.config.js | 26 +- tsconfig.json | 28 +- vite.config.ts | 24 +- 98 files changed, 10339 insertions(+), 10785 deletions(-) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 0b75758..6b6685b 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -1,31 +1,26 @@ /** @type { import("eslint").Linter.Config } */ module.exports = { - root: true, - extends: [ - 'eslint:recommended', - 'plugin:@typescript-eslint/recommended', - 'plugin:svelte/recommended', - 'prettier' - ], - parser: '@typescript-eslint/parser', - plugins: ['@typescript-eslint'], - parserOptions: { - sourceType: 'module', - ecmaVersion: 2020, - extraFileExtensions: ['.svelte'] - }, - env: { - browser: true, - es2017: true, - node: true - }, - overrides: [ - { - files: ['*.svelte'], - parser: 'svelte-eslint-parser', - parserOptions: { - parser: '@typescript-eslint/parser' - } - } - ] -}; + root: true, + extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:svelte/recommended', 'prettier'], + parser: '@typescript-eslint/parser', + plugins: ['@typescript-eslint'], + parserOptions: { + sourceType: 'module', + ecmaVersion: 2020, + extraFileExtensions: ['.svelte'] + }, + env: { + browser: true, + es2017: true, + node: true + }, + overrides: [ + { + files: ['*.svelte'], + parser: 'svelte-eslint-parser', + parserOptions: { + parser: '@typescript-eslint/parser' + } + } + ] +} diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index ab10b96..94784df 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -1,25 +1,25 @@ name: coveralls test coverage on: - push: - branches: - - main - pull_request: - release: - types: - - created + push: + branches: + - main + pull_request: + release: + types: + - created jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - uses: actions/setup-node@v1 - with: - node-version: 18 - - run: npm i svelte - - run: npm ci - - run: npm test - - uses: coverallsapp/github-action@master - with: - github-token: ${{ secrets.GITHUB_TOKEN }} + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-node@v1 + with: + node-version: 18 + - run: npm i svelte + - run: npm ci + - run: npm test + - uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index ffe8c0c..4f93e97 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -4,31 +4,31 @@ name: publish on: - release: - types: [published] + release: + types: [published] jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 - with: - node-version: 18 - - run: npm ci - - run: npm test + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: 18 + - run: npm ci + - run: npm test - publish-npm: - needs: build - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 - with: - node-version: 18 - registry-url: https://registry.npmjs.org/ - - run: npm ci - - run: npm run package - - run: npm publish . - env: - NODE_AUTH_TOKEN: ${{secrets.npm_token}} + publish-npm: + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: 18 + registry-url: https://registry.npmjs.org/ + - run: npm ci + - run: npm run package + - run: npm publish . + env: + NODE_AUTH_TOKEN: ${{secrets.npm_token}} diff --git a/.npmrc b/.npmrc index b6f27f1..3422fec 100644 --- a/.npmrc +++ b/.npmrc @@ -1 +1,2 @@ engine-strict=true +@humanspeak:registry=https://npm.pkg.github.com diff --git a/.prettierrc b/.prettierrc index d51e0ec..de52a48 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,7 +1,17 @@ { - "useTabs": true, - "singleQuote": true, - "printWidth": 100, - "plugins": ["prettier-plugin-svelte"], - "overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }] + "useTabs": false, + "trailingComma": "none", + "printWidth": 200, + "tabWidth": 4, + "semi": false, + "singleQuote": true, + "plugins": ["prettier-plugin-svelte"], + "overrides": [ + { + "files": "*.svelte", + "options": { + "parser": "svelte" + } + } + ] } diff --git a/README.md b/README.md index ac29cad..9538883 100644 --- a/README.md +++ b/README.md @@ -24,13 +24,13 @@ Visit the [documentation](https://svelte-headless-table.bryanmylee.com/) for cod Svelte Headless Table is designed to work **seamlessly** with Svelte. If you love Svelte, you will love Svelte Headless Table. -- **Full TypeScript support** -- Compatible with **SvelteKit** and SSR -- Manage state with Svelte stores -- Headless and fully customizable -- Intuitive column-first declarative model -- Highly performant -- Feature-rich +- **Full TypeScript support** +- Compatible with **SvelteKit** and SSR +- Manage state with Svelte stores +- Headless and fully customizable +- Intuitive column-first declarative model +- Highly performant +- Feature-rich ## All the features you could ever need! @@ -40,18 +40,18 @@ Easily extend Svelte Headless Table with complex **sorting**, **filtering**, **g ### Plugin roadmap -- [x] [addSortBy](https://svelte-headless-table.bryanmylee.com/docs/plugins/add-sort-by) -- [x] [addColumnFilters](https://svelte-headless-table.bryanmylee.com/docs/plugins/add-column-filters) -- [x] [addTableFilter](https://svelte-headless-table.bryanmylee.com/docs/plugins/add-table-filter) -- [x] [addColumnOrder](https://svelte-headless-table.bryanmylee.com/docs/plugins/add-column-order) -- [x] [addHiddenColumns](https://svelte-headless-table.bryanmylee.com/docs/plugins/add-hidden-columns) -- [x] [addPagination](https://svelte-headless-table.bryanmylee.com/docs/plugins/add-pagination) -- [x] [addSubRows](https://svelte-headless-table.bryanmylee.com/docs/plugins/add-sub-rows) -- [x] [addGroupBy](https://svelte-headless-table.bryanmylee.com/docs/plugins/add-group-by) -- [x] [addExpandedRows](https://svelte-headless-table.bryanmylee.com/docs/plugins/add-expanded-rows) -- [x] [addSelectedRows](https://svelte-headless-table.bryanmylee.com/docs/plugins/add-selected-rows) -- [x] [addResizedColumns](https://svelte-headless-table.bryanmylee.com/docs/plugins/add-resized-columns) -- [x] [addGridLayout](https://svelte-headless-table.bryanmylee.com/docs/plugins/add-grid-layout) +- [x] [addSortBy](https://svelte-headless-table.bryanmylee.com/docs/plugins/add-sort-by) +- [x] [addColumnFilters](https://svelte-headless-table.bryanmylee.com/docs/plugins/add-column-filters) +- [x] [addTableFilter](https://svelte-headless-table.bryanmylee.com/docs/plugins/add-table-filter) +- [x] [addColumnOrder](https://svelte-headless-table.bryanmylee.com/docs/plugins/add-column-order) +- [x] [addHiddenColumns](https://svelte-headless-table.bryanmylee.com/docs/plugins/add-hidden-columns) +- [x] [addPagination](https://svelte-headless-table.bryanmylee.com/docs/plugins/add-pagination) +- [x] [addSubRows](https://svelte-headless-table.bryanmylee.com/docs/plugins/add-sub-rows) +- [x] [addGroupBy](https://svelte-headless-table.bryanmylee.com/docs/plugins/add-group-by) +- [x] [addExpandedRows](https://svelte-headless-table.bryanmylee.com/docs/plugins/add-expanded-rows) +- [x] [addSelectedRows](https://svelte-headless-table.bryanmylee.com/docs/plugins/add-selected-rows) +- [x] [addResizedColumns](https://svelte-headless-table.bryanmylee.com/docs/plugins/add-resized-columns) +- [x] [addGridLayout](https://svelte-headless-table.bryanmylee.com/docs/plugins/add-grid-layout) ## Examples diff --git a/docs/package-lock.json b/docs/package-lock.json index 5b7a875..e967e6b 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -28,7 +28,7 @@ "prettier-plugin-svelte": "^2.10.1", "shiki": "^0.10.1", "svelte": "^3.54.0", - "svelte-check": "^2.2.6", + "svelte-check": "^4.0.5", "svelte-headless-table": "^0.17.3", "svelte-preprocess": "^4.10.1", "tailwindcss": "^3.3.2", @@ -38,20 +38,12 @@ "vite": "^4.0.0" } }, - "node_modules/@aashutoshrathi/word-wrap": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", - "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/@alloc/quick-lru": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/@alloc/quick-lru/-/quick-lru-5.2.0.tgz", "integrity": "sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -64,6 +56,7 @@ "resolved": "https://registry.npmjs.org/@antfu/install-pkg/-/install-pkg-0.1.1.tgz", "integrity": "sha512-LyB/8+bSfa0DFGC06zpCEfs89/XoWZwws5ygEa5D+Xsm3OfI+aXQ86VgVG7Acyef+rSZ5HE7J8rrxzrQeM3PjQ==", "dev": true, + "license": "MIT", "dependencies": { "execa": "^5.1.1", "find-up": "^5.0.0" @@ -73,22 +66,24 @@ } }, "node_modules/@antfu/utils": { - "version": "0.7.5", - "resolved": "https://registry.npmjs.org/@antfu/utils/-/utils-0.7.5.tgz", - "integrity": "sha512-dlR6LdS+0SzOAPx/TPRhnoi7hE251OVeT2Snw0RguNbBSbjUHdWr0l3vcUUDg26rEysT89kCbtw1lVorBXLLCg==", + "version": "0.7.10", + "resolved": "https://registry.npmjs.org/@antfu/utils/-/utils-0.7.10.tgz", + "integrity": "sha512-+562v9k4aI80m1+VuMHehNJWLOFjBnXn3tdOitzD0il5b7smkSBal4+a3oKiQTbrwMmN/TBUMDvbdoWDehgOww==", "dev": true, + "license": "MIT", "funding": { "url": "https://github.com/sponsors/antfu" } }, "node_modules/@esbuild/android-arm": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.19.tgz", - "integrity": "sha512-rIKddzqhmav7MSmoFCmDIb6e2W57geRsM94gV2l38fzhXMwq7hZoClug9USI2pFRGL06f4IOPHHpFNOkWieR8A==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.20.tgz", + "integrity": "sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==", "cpu": [ "arm" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "android" @@ -98,13 +93,14 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.17.19.tgz", - "integrity": "sha512-KBMWvEZooR7+kzY0BtbTQn0OAYY7CsiydT63pVEaPtVYF0hXbUaOyZog37DKxK7NF3XacBJOpYT4adIJh+avxA==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz", + "integrity": "sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "android" @@ -114,13 +110,14 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.17.19.tgz", - "integrity": "sha512-uUTTc4xGNDT7YSArp/zbtmbhO0uEEK9/ETW29Wk1thYUJBz3IVnvgEiEwEa9IeLyvnpKrWK64Utw2bgUmDveww==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.18.20.tgz", + "integrity": "sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "android" @@ -130,13 +127,14 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.19.tgz", - "integrity": "sha512-80wEoCfF/hFKM6WE1FyBHc9SfUblloAWx6FJkFWTWiCoht9Mc0ARGEM47e67W9rI09YoUxJL68WHfDRYEAvOhg==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz", + "integrity": "sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "darwin" @@ -146,13 +144,14 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.17.19.tgz", - "integrity": "sha512-IJM4JJsLhRYr9xdtLytPLSH9k/oxR3boaUIYiHkAawtwNOXKE8KoU8tMvryogdcT8AU+Bflmh81Xn6Q0vTZbQw==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.18.20.tgz", + "integrity": "sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "darwin" @@ -162,13 +161,14 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.19.tgz", - "integrity": "sha512-pBwbc7DufluUeGdjSU5Si+P3SoMF5DQ/F/UmTSb8HXO80ZEAJmrykPyzo1IfNbAoaqw48YRpv8shwd1NoI0jcQ==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.20.tgz", + "integrity": "sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "freebsd" @@ -178,13 +178,14 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.17.19.tgz", - "integrity": "sha512-4lu+n8Wk0XlajEhbEffdy2xy53dpR06SlzvhGByyg36qJw6Kpfk7cp45DR/62aPH9mtJRmIyrXAS5UWBrJT6TQ==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.18.20.tgz", + "integrity": "sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "freebsd" @@ -194,13 +195,14 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.17.19.tgz", - "integrity": "sha512-cdmT3KxjlOQ/gZ2cjfrQOtmhG4HJs6hhvm3mWSRDPtZ/lP5oe8FWceS10JaSJC13GBd4eH/haHnqf7hhGNLerA==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.18.20.tgz", + "integrity": "sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==", "cpu": [ "arm" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -210,13 +212,14 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.17.19.tgz", - "integrity": "sha512-ct1Tg3WGwd3P+oZYqic+YZF4snNl2bsnMKRkb3ozHmnM0dGWuxcPTTntAF6bOP0Sp4x0PjSF+4uHQ1xvxfRKqg==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.18.20.tgz", + "integrity": "sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -226,13 +229,14 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.17.19.tgz", - "integrity": "sha512-w4IRhSy1VbsNxHRQpeGCHEmibqdTUx61Vc38APcsRbuVgK0OPEnQ0YD39Brymn96mOx48Y2laBQGqgZ0j9w6SQ==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.18.20.tgz", + "integrity": "sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==", "cpu": [ "ia32" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -242,13 +246,14 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.17.19.tgz", - "integrity": "sha512-2iAngUbBPMq439a+z//gE+9WBldoMp1s5GWsUSgqHLzLJ9WoZLZhpwWuym0u0u/4XmZ3gpHmzV84PonE+9IIdQ==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.18.20.tgz", + "integrity": "sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==", "cpu": [ "loong64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -258,13 +263,14 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.17.19.tgz", - "integrity": "sha512-LKJltc4LVdMKHsrFe4MGNPp0hqDFA1Wpt3jE1gEyM3nKUvOiO//9PheZZHfYRfYl6AwdTH4aTcXSqBerX0ml4A==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.18.20.tgz", + "integrity": "sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==", "cpu": [ "mips64el" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -274,13 +280,14 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.17.19.tgz", - "integrity": "sha512-/c/DGybs95WXNS8y3Ti/ytqETiW7EU44MEKuCAcpPto3YjQbyK3IQVKfF6nbghD7EcLUGl0NbiL5Rt5DMhn5tg==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.18.20.tgz", + "integrity": "sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==", "cpu": [ "ppc64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -290,13 +297,14 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.17.19.tgz", - "integrity": "sha512-FC3nUAWhvFoutlhAkgHf8f5HwFWUL6bYdvLc/TTuxKlvLi3+pPzdZiFKSWz/PF30TB1K19SuCxDTI5KcqASJqA==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.18.20.tgz", + "integrity": "sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==", "cpu": [ "riscv64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -306,13 +314,14 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.17.19.tgz", - "integrity": "sha512-IbFsFbxMWLuKEbH+7sTkKzL6NJmG2vRyy6K7JJo55w+8xDk7RElYn6xvXtDW8HCfoKBFK69f3pgBJSUSQPr+4Q==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.18.20.tgz", + "integrity": "sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==", "cpu": [ "s390x" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -322,13 +331,14 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.19.tgz", - "integrity": "sha512-68ngA9lg2H6zkZcyp22tsVt38mlhWde8l3eJLWkyLrp4HwMUr3c1s/M2t7+kHIhvMjglIBrFpncX1SzMckomGw==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz", + "integrity": "sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -338,13 +348,14 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.17.19.tgz", - "integrity": "sha512-CwFq42rXCR8TYIjIfpXCbRX0rp1jo6cPIUPSaWwzbVI4aOfX96OXY8M6KNmtPcg7QjYeDmN+DD0Wp3LaBOLf4Q==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.18.20.tgz", + "integrity": "sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "netbsd" @@ -354,13 +365,14 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.17.19.tgz", - "integrity": "sha512-cnq5brJYrSZ2CF6c35eCmviIN3k3RczmHz8eYaVlNasVqsNY+JKohZU5MKmaOI+KkllCdzOKKdPs762VCPC20g==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.18.20.tgz", + "integrity": "sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "openbsd" @@ -370,13 +382,14 @@ } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.17.19.tgz", - "integrity": "sha512-vCRT7yP3zX+bKWFeP/zdS6SqdWB8OIpaRq/mbXQxTGHnIxspRtigpkUcDMlSCOejlHowLqII7K2JKevwyRP2rg==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.18.20.tgz", + "integrity": "sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "sunos" @@ -386,13 +399,14 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.17.19.tgz", - "integrity": "sha512-yYx+8jwowUstVdorcMdNlzklLYhPxjniHWFKgRqH7IFlUEa0Umu3KuYplf1HUZZ422e3NU9F4LGb+4O0Kdcaag==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.18.20.tgz", + "integrity": "sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" @@ -402,13 +416,14 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.17.19.tgz", - "integrity": "sha512-eggDKanJszUtCdlVs0RB+h35wNlb5v4TWEkq4vZcmVt5u/HiDZrTXe2bWFQUez3RgNHwx/x4sk5++4NSSicKkw==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.18.20.tgz", + "integrity": "sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==", "cpu": [ "ia32" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" @@ -418,13 +433,14 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.19.tgz", - "integrity": "sha512-lAhycmKnVOuRYNtRtatQR1LPQf2oYCkRGkSFnseDAKPl8lu5SOsK/e1sXe5a0Pc5kHIHe6P2I/ilntNv2xf3cA==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz", + "integrity": "sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" @@ -434,34 +450,40 @@ } }, "node_modules/@eslint-community/eslint-utils": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", - "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.1.tgz", + "integrity": "sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==", "dev": true, + "license": "MIT", "dependencies": { - "eslint-visitor-keys": "^3.3.0" + "eslint-visitor-keys": "^3.4.3" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, + "funding": { + "url": "https://opencollective.com/eslint" + }, "peerDependencies": { "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" } }, "node_modules/@eslint-community/regexpp": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.5.1.tgz", - "integrity": "sha512-Z5ba73P98O1KUYCCJTUeVpja9RcGoMdncZ6T49FCUl2lN38JtCJ+3WgIDBv0AuY4WChU5PmtJmOCTlN6FZTFKQ==", + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.0.tgz", + "integrity": "sha512-gh7PdNombP8ftL8TinYC8Xd7WEypB8EKV4PI2h0eMzndKjPCXuo2zUiZtD2Hu+MSPt02Ty2MdS788ADl9ai1rA==", "dev": true, + "license": "MIT", "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, "node_modules/@eslint/eslintrc": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.0.tgz", - "integrity": "sha512-Lj7DECXqIVCqnqjjHMPna4vn6GJcMgul/wuS0je9OZ9gsL0zzDpKPVtcG1HaDVc+9y+qgXneTeUMbCqXJNpH1A==", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", "dev": true, + "license": "MIT", "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", @@ -481,22 +503,35 @@ } }, "node_modules/@eslint/js": { - "version": "8.44.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.44.0.tgz", - "integrity": "sha512-Ag+9YM4ocKQx9AarydN0KY2j0ErMHNIocPDrVo8zAE44xLTjEtz81OdR68/cydGtk6m6jDb5Za3r2useMzYmSw==", + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz", + "integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==", "dev": true, + "license": "MIT", "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, + "node_modules/@fastify/busboy": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.1.tgz", + "integrity": "sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14" + } + }, "node_modules/@humanwhocodes/config-array": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.10.tgz", - "integrity": "sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==", + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", + "integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==", + "deprecated": "Use @eslint/config-array instead", "dev": true, + "license": "Apache-2.0", "dependencies": { - "@humanwhocodes/object-schema": "^1.2.1", - "debug": "^4.1.1", + "@humanwhocodes/object-schema": "^2.0.3", + "debug": "^4.3.1", "minimatch": "^3.0.5" }, "engines": { @@ -508,6 +543,7 @@ "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", "dev": true, + "license": "Apache-2.0", "engines": { "node": ">=12.22" }, @@ -517,25 +553,29 @@ } }, "node_modules/@humanwhocodes/object-schema": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", - "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", - "dev": true + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", + "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", + "deprecated": "Use @eslint/object-schema instead", + "dev": true, + "license": "BSD-3-Clause" }, "node_modules/@iconify-json/ic": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/@iconify-json/ic/-/ic-1.1.13.tgz", - "integrity": "sha512-5i5zal/VRwTrs99iMTnG1Zu97bgX9Mkiu9TzR1U1rHBylUnBW+HkOweoQVEPgQITGG024/lNbZxU+3Aa2xuDww==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@iconify-json/ic/-/ic-1.2.1.tgz", + "integrity": "sha512-UjL/bjJP/T5EV881+hTzcfTKVo0KEUjhnMiJcLtPzNgPtU2KZZmRx8BSKKR61H4CN/5FTEbyawGyG0aEt3SwGQ==", "dev": true, + "license": "Apache-2.0", "dependencies": { "@iconify/types": "*" } }, "node_modules/@iconify-json/ri": { - "version": "1.1.10", - "resolved": "https://registry.npmjs.org/@iconify-json/ri/-/ri-1.1.10.tgz", - "integrity": "sha512-fsJuXLfpdxb9pfn8LFcfM6LS82j358HaI29Y1qcH1UDnt/V439rTivV6v/YSLkd4z/dZIbh5iOR8+Cg4qtu5Rw==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@iconify-json/ri/-/ri-1.2.2.tgz", + "integrity": "sha512-7i6uxb8guYyyWtcf23QgKXlipvwaqBSnm3tGgo0eBlc1C8C1rHVEJXManwB7PrxWXLAecBL/Sb+0zaLfSYeQzg==", "dev": true, + "license": "Apache-2.0", "dependencies": { "@iconify/types": "*" } @@ -544,81 +584,162 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/@iconify/types/-/types-2.0.0.tgz", "integrity": "sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@iconify/utils": { - "version": "2.1.7", - "resolved": "https://registry.npmjs.org/@iconify/utils/-/utils-2.1.7.tgz", - "integrity": "sha512-P8S3z/L1LcV4Qem9AoCfVAaTFGySEMzFEY4CHZLkfRj0Fv9LiR+AwjDgrDrzyI93U2L2mg9JHsbTJ52mF8suNw==", + "version": "2.1.33", + "resolved": "https://registry.npmjs.org/@iconify/utils/-/utils-2.1.33.tgz", + "integrity": "sha512-jP9h6v/g0BIZx0p7XGJJVtkVnydtbgTgt9mVNcGDYwaa7UhdHdI9dvoq+gKj9sijMSJKxUPEG2JyjsgXjxL7Kw==", "dev": true, + "license": "MIT", "dependencies": { - "@antfu/install-pkg": "^0.1.1", - "@antfu/utils": "^0.7.4", + "@antfu/install-pkg": "^0.4.0", + "@antfu/utils": "^0.7.10", "@iconify/types": "^2.0.0", - "debug": "^4.3.4", + "debug": "^4.3.6", "kolorist": "^1.8.0", - "local-pkg": "^0.4.3" + "local-pkg": "^0.5.0", + "mlly": "^1.7.1" + } + }, + "node_modules/@iconify/utils/node_modules/@antfu/install-pkg": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@antfu/install-pkg/-/install-pkg-0.4.1.tgz", + "integrity": "sha512-T7yB5QNG29afhWVkVq7XeIMBa5U/vs9mX69YqayXypPRmYzUmzwnYltplHmPtZ4HPCn+sQKeXW8I47wCbuBOjw==", + "dev": true, + "license": "MIT", + "dependencies": { + "package-manager-detector": "^0.2.0", + "tinyexec": "^0.3.0" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/@iconify/utils/node_modules/local-pkg": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-0.5.0.tgz", + "integrity": "sha512-ok6z3qlYyCDS4ZEU27HaU6x/xZa9Whf8jD4ptH5UZTQYZVYeb9bnZ3ojVhiJNLiXK1Hfc0GNbLXcmZ5plLDDBg==", + "dev": true, + "license": "MIT", + "dependencies": { + "mlly": "^1.4.2", + "pkg-types": "^1.0.3" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", - "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", "dev": true, + "license": "MIT", "dependencies": { - "@jridgewell/set-array": "^1.0.1", + "@jridgewell/set-array": "^1.2.1", "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/trace-mapping": "^0.3.24" }, "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", - "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", "dev": true, + "license": "MIT", "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/set-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", "dev": true, + "license": "MIT", "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", - "dev": true + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "dev": true, + "license": "MIT" }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.18", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz", - "integrity": "sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==", + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", "dev": true, + "license": "MIT", "dependencies": { - "@jridgewell/resolve-uri": "3.1.0", - "@jridgewell/sourcemap-codec": "1.4.14" + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" } }, - "node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", - "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", - "dev": true - }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", "dev": true, + "license": "MIT", "dependencies": { "@nodelib/fs.stat": "2.0.5", "run-parallel": "^1.1.9" @@ -632,6 +753,7 @@ "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", "dev": true, + "license": "MIT", "engines": { "node": ">= 8" } @@ -641,6 +763,7 @@ "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", "dev": true, + "license": "MIT", "dependencies": { "@nodelib/fs.scandir": "2.1.5", "fastq": "^1.6.0" @@ -649,52 +772,68 @@ "node": ">= 8" } }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=14" + } + }, "node_modules/@polka/url": { - "version": "1.0.0-next.21", - "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.21.tgz", - "integrity": "sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g==", - "dev": true + "version": "1.0.0-next.28", + "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.28.tgz", + "integrity": "sha512-8LduaNlMZGwdZ6qWrKlfa+2M4gahzFkprZiAt2TF8uS0qQgBizKXpXURqvTJ4WtmupWxaLqjRb2UCTe72mu+Aw==", + "dev": true, + "license": "MIT" }, "node_modules/@rgossiaux/svelte-headlessui": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@rgossiaux/svelte-headlessui/-/svelte-headlessui-2.0.0.tgz", "integrity": "sha512-ksh245HqMM8yqkzd/OyAK2FCHZYOSA3ldLIHab7C9S60FmifqT24JFVgi8tZpsDEMk3plbfQvfah93n5IEi8sg==", "dev": true, + "license": "MIT", "peerDependencies": { "svelte": "^3.47.0" } }, "node_modules/@sveltejs/adapter-auto": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@sveltejs/adapter-auto/-/adapter-auto-2.1.0.tgz", - "integrity": "sha512-o2pZCfATFtA/Gw/BB0Xm7k4EYaekXxaPGER3xGSY3FvzFJGTlJlZjBseaXwYSM94lZ0HniOjTokN3cWaLX6fow==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@sveltejs/adapter-auto/-/adapter-auto-2.1.1.tgz", + "integrity": "sha512-nzi6x/7/3Axh5VKQ8Eed3pYxastxoa06Y/bFhWb7h3Nu+nGRVxKAy3+hBJgmPCwWScy8n0TsstZjSVKfyrIHkg==", "dev": true, + "license": "MIT", "dependencies": { - "import-meta-resolve": "^3.0.0" + "import-meta-resolve": "^4.0.0" }, "peerDependencies": { "@sveltejs/kit": "^1.0.0" } }, "node_modules/@sveltejs/kit": { - "version": "1.21.0", - "resolved": "https://registry.npmjs.org/@sveltejs/kit/-/kit-1.21.0.tgz", - "integrity": "sha512-CBsYoI34SjtOQp0eG85dmVnvTR3Pjs8VgAQhO0CgQja9BIorKl808F1X8EunPhCcyek5r5lKQE1Mmbi0RuzHqA==", + "version": "1.30.4", + "resolved": "https://registry.npmjs.org/@sveltejs/kit/-/kit-1.30.4.tgz", + "integrity": "sha512-JSQIQT6XvdchCRQEm7BABxPC56WP5RYVONAi+09S8tmzeP43fBsRlr95bFmsTQM2RHBldfgQk+jgdnsKI75daA==", "dev": true, "hasInstallScript": true, + "license": "MIT", "dependencies": { - "@sveltejs/vite-plugin-svelte": "^2.4.1", + "@sveltejs/vite-plugin-svelte": "^2.5.0", "@types/cookie": "^0.5.1", "cookie": "^0.5.0", "devalue": "^4.3.1", "esm-env": "^1.0.0", "kleur": "^4.1.5", "magic-string": "^0.30.0", - "mime": "^3.0.0", + "mrmime": "^1.0.1", "sade": "^1.8.1", "set-cookie-parser": "^2.6.0", "sirv": "^2.0.2", - "undici": "~5.22.0" + "tiny-glob": "^0.2.9", + "undici": "^5.28.3" }, "bin": { "svelte-kit": "svelte-kit.js" @@ -703,37 +842,39 @@ "node": "^16.14 || >=18" }, "peerDependencies": { - "svelte": "^3.54.0 || ^4.0.0-next.0", + "svelte": "^3.54.0 || ^4.0.0-next.0 || ^5.0.0-next.0", "vite": "^4.0.0" } }, "node_modules/@sveltejs/vite-plugin-svelte": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte/-/vite-plugin-svelte-2.4.2.tgz", - "integrity": "sha512-ePfcC48ftMKhkT0OFGdOyycYKnnkT6i/buzey+vHRTR/JpQvuPzzhf1PtKqCDQfJRgoPSN2vscXs6gLigx/zGw==", + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte/-/vite-plugin-svelte-2.5.3.tgz", + "integrity": "sha512-erhNtXxE5/6xGZz/M9eXsmI7Pxa6MS7jyTy06zN3Ck++ldrppOnOlJwHHTsMC7DHDQdgUp4NAc4cDNQ9eGdB/w==", "dev": true, + "license": "MIT", "dependencies": { - "@sveltejs/vite-plugin-svelte-inspector": "^1.0.3", + "@sveltejs/vite-plugin-svelte-inspector": "^1.0.4", "debug": "^4.3.4", "deepmerge": "^4.3.1", "kleur": "^4.1.5", - "magic-string": "^0.30.0", - "svelte-hmr": "^0.15.2", + "magic-string": "^0.30.3", + "svelte-hmr": "^0.15.3", "vitefu": "^0.2.4" }, "engines": { "node": "^14.18.0 || >= 16" }, "peerDependencies": { - "svelte": "^3.54.0 || ^4.0.0", + "svelte": "^3.54.0 || ^4.0.0 || ^5.0.0-next.0", "vite": "^4.0.0" } }, "node_modules/@sveltejs/vite-plugin-svelte-inspector": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte-inspector/-/vite-plugin-svelte-inspector-1.0.3.tgz", - "integrity": "sha512-Khdl5jmmPN6SUsVuqSXatKpQTMIifoQPDanaxC84m9JxIibWvSABJyHpyys0Z+1yYrxY5TTEQm+6elh0XCMaOA==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte-inspector/-/vite-plugin-svelte-inspector-1.0.4.tgz", + "integrity": "sha512-zjiuZ3yydBtwpF3bj0kQNV0YXe+iKE545QGZVTaylW3eAzFr+pJ/cwK8lZEaRp4JtaJXhD5DyWAV4AxLh6DgaQ==", "dev": true, + "license": "MIT", "dependencies": { "debug": "^4.3.4" }, @@ -747,44 +888,58 @@ } }, "node_modules/@svelteness/kit-docs": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@svelteness/kit-docs/-/kit-docs-1.1.3.tgz", - "integrity": "sha512-kUs0K2AR0Djn2Vv3WrenU0KBurhIGkxiMqwQBp2ud62MXtM8w/+WDWDTGCur+zG1pR07orcPbWTWYyrRejLINQ==", + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@svelteness/kit-docs/-/kit-docs-1.1.5.tgz", + "integrity": "sha512-KGAUDJP09BSFC5gifwO5cgzrZjMdXfsguQHHuQFuU+WB9TSR8UAEB8XqOVOPIdk1vf/9ToePe4kyuowboUOA1g==", "dev": true, + "license": "MIT", "dependencies": { - "@types/lru-cache": "^7.10.10", - "@types/markdown-it": "^12.2.3", - "clsx": "^1.2.1", + "@types/markdown-it": "^13.0.1", + "clsx": "^2.0.0", "kleur": "^4.1.5", - "shiki": "^0.11.1", + "shiki": "^0.14.4", "svelte-class-transition": "^1.0.4" }, "engines": { "node": ">=14.19.0" } }, + "node_modules/@svelteness/kit-docs/node_modules/clsx": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz", + "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/@svelteness/kit-docs/node_modules/shiki": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.11.1.tgz", - "integrity": "sha512-EugY9VASFuDqOexOgXR18ZV+TbFrQHeCpEYaXamO+SZlsnT/2LxuLBX25GGtIrwaEVFXUAbUQ601SWE2rMwWHA==", + "version": "0.14.7", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.14.7.tgz", + "integrity": "sha512-dNPAPrxSc87ua2sKJ3H5dQ/6ZaY8RNnaAqK+t0eG7p0Soi2ydiqbGOTaZCqaYvA/uZYfS1LJnemt3Q+mSfcPCg==", "dev": true, + "license": "MIT", "dependencies": { - "jsonc-parser": "^3.0.0", - "vscode-oniguruma": "^1.6.1", - "vscode-textmate": "^6.0.0" + "ansi-sequence-parser": "^1.1.0", + "jsonc-parser": "^3.2.0", + "vscode-oniguruma": "^1.7.0", + "vscode-textmate": "^8.0.0" } }, "node_modules/@svelteness/kit-docs/node_modules/vscode-textmate": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-6.0.0.tgz", - "integrity": "sha512-gu73tuZfJgu+mvCSy4UZwd2JXykjK9zAZsfmDeut5dx/1a7FeTk0XwJsSuqQn+cuMCGVbIBfl+s53X4T19DnzQ==", - "dev": true + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-8.0.0.tgz", + "integrity": "sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg==", + "dev": true, + "license": "MIT" }, "node_modules/@tailwindcss/typography": { - "version": "0.5.9", - "resolved": "https://registry.npmjs.org/@tailwindcss/typography/-/typography-0.5.9.tgz", - "integrity": "sha512-t8Sg3DyynFysV9f4JDOVISGsjazNb48AeIYQwcL+Bsq5uf4RYL75C1giZ43KISjeDGBaTN3Kxh7Xj/vRSMJUUg==", + "version": "0.5.15", + "resolved": "https://registry.npmjs.org/@tailwindcss/typography/-/typography-0.5.15.tgz", + "integrity": "sha512-AqhlCXl+8grUz8uqExv5OTtgpjuVIwFTSXTrh8y9/pw6q2ek7fJ+Y8ZEVw7EB2DCcuCOtEjf9w3+J3rzts01uA==", "dev": true, + "license": "MIT", "dependencies": { "lodash.castarray": "^4.4.0", "lodash.isplainobject": "^4.0.6", @@ -792,91 +947,100 @@ "postcss-selector-parser": "6.0.10" }, "peerDependencies": { - "tailwindcss": ">=3.0.0 || insiders" + "tailwindcss": ">=3.0.0 || insiders || >=4.0.0-alpha.20" } }, "node_modules/@types/cookie": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.5.1.tgz", - "integrity": "sha512-COUnqfB2+ckwXXSFInsFdOAWQzCCx+a5hq2ruyj+Vjund94RJQd4LG2u9hnvJrTgunKAaax7ancBYlDrNYxA0g==", - "dev": true + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.5.4.tgz", + "integrity": "sha512-7z/eR6O859gyWIAjuvBWFzNURmf2oPBmJlfVWkwehU5nzIyjwBsTh7WMmEEV4JFnHuQ3ex4oyTvfKzcyJVDBNA==", + "dev": true, + "license": "MIT" }, "node_modules/@types/faker": { "version": "5.5.9", "resolved": "https://registry.npmjs.org/@types/faker/-/faker-5.5.9.tgz", "integrity": "sha512-uCx6mP3UY5SIO14XlspxsGjgaemrxpssJI0Ol+GfhxtcKpv9pgRZYsS4eeKeHVLje6Qtc8lGszuBI461+gVZBA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@types/json-schema": { - "version": "7.0.12", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.12.tgz", - "integrity": "sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA==", - "dev": true + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true, + "license": "MIT" }, "node_modules/@types/linkify-it": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@types/linkify-it/-/linkify-it-3.0.2.tgz", - "integrity": "sha512-HZQYqbiFVWufzCwexrvh694SOim8z2d+xJl5UNamcvQFejLY/2YUtzXHYi3cHdI7PMlS8ejH2slRAOJQ32aNbA==", - "dev": true - }, - "node_modules/@types/lru-cache": { - "version": "7.10.10", - "resolved": "https://registry.npmjs.org/@types/lru-cache/-/lru-cache-7.10.10.tgz", - "integrity": "sha512-nEpVRPWW9EBmx2SCfNn3ClYxPL7IktPX12HhIoSc/H5mMjdeW3+YsXIpseLQ2xF35+OcpwKQbEUw5VtqE4PDNA==", - "deprecated": "This is a stub types definition. lru-cache provides its own type definitions, so you do not need this installed.", + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@types/linkify-it/-/linkify-it-3.0.5.tgz", + "integrity": "sha512-yg6E+u0/+Zjva+buc3EIb+29XEg4wltq7cSmd4Uc2EE/1nUVmxyzpX6gUXD0V8jIrG0r7YeOGVIbYRkxeooCtw==", "dev": true, - "dependencies": { - "lru-cache": "*" - } + "license": "MIT" }, "node_modules/@types/markdown-it": { - "version": "12.2.3", - "resolved": "https://registry.npmjs.org/@types/markdown-it/-/markdown-it-12.2.3.tgz", - "integrity": "sha512-GKMHFfv3458yYy+v/N8gjufHO6MSZKCOXpZc5GXIWWy8uldwfmPn98vp81gZ5f9SVw8YYBctgfJ22a2d7AOMeQ==", + "version": "13.0.9", + "resolved": "https://registry.npmjs.org/@types/markdown-it/-/markdown-it-13.0.9.tgz", + "integrity": "sha512-1XPwR0+MgXLWfTn9gCsZ55AHOKW1WN+P9vr0PaQh5aerR9LLQXUbjfEAFhjmEmyoYFWAyuN2Mqkn40MZ4ukjBw==", "dev": true, + "license": "MIT", "dependencies": { - "@types/linkify-it": "*", - "@types/mdurl": "*" + "@types/linkify-it": "^3", + "@types/mdurl": "^1" } }, "node_modules/@types/mdurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@types/mdurl/-/mdurl-1.0.2.tgz", - "integrity": "sha512-eC4U9MlIcu2q0KQmXszyn5Akca/0jrQmwDRgpAMJai7qBWq4amIQhZyNau4VYGtCeALvW1/NtjzJJ567aZxfKA==", - "dev": true + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/mdurl/-/mdurl-1.0.5.tgz", + "integrity": "sha512-6L6VymKTzYSrEf4Nev4Xa1LCHKrlTlYCBMTlQKFuddo1CvQcE52I0mwfOJayueUC7MJuXOeHTcIU683lzd0cUA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "22.8.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.8.1.tgz", + "integrity": "sha512-k6Gi8Yyo8EtrNtkHXutUu2corfDf9su95VYVP10aGYMMROM6SAItZi0w1XszA6RtWTHSVp5OeFof37w0IEqCQg==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~6.19.8" + } }, "node_modules/@types/pug": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/@types/pug/-/pug-2.0.6.tgz", - "integrity": "sha512-SnHmG9wN1UVmagJOnyo/qkk0Z7gejYxOYYmaAwr5u2yFYfsupN3sg10kyzN8Hep/2zbHxCnsumxOoRIRMBwKCg==", - "dev": true + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/pug/-/pug-2.0.10.tgz", + "integrity": "sha512-Sk/uYFOBAB7mb74XcpizmH0KOR2Pv3D2Hmrh1Dmy5BmK3MpdSa5kqZcg6EKBdklU0bFXX9gCfzvpnyUehrPIuA==", + "dev": true, + "license": "MIT" }, "node_modules/@types/sass": { - "version": "1.45.0", - "resolved": "https://registry.npmjs.org/@types/sass/-/sass-1.45.0.tgz", - "integrity": "sha512-jn7qwGFmJHwUSphV8zZneO3GmtlgLsmhs/LQyVvQbIIa+fzGMUiHI4HXJZL3FT8MJmgXWbLGiVVY7ElvHq6vDA==", - "deprecated": "This is a stub types definition. sass provides its own type definitions, so you do not need this installed.", + "version": "1.43.1", + "resolved": "https://registry.npmjs.org/@types/sass/-/sass-1.43.1.tgz", + "integrity": "sha512-BPdoIt1lfJ6B7rw35ncdwBZrAssjcwzI5LByIrYs+tpXlj/CAkuVdRsgZDdP4lq5EjyWzwxZCqAoFyHKFwp32g==", "dev": true, + "license": "MIT", "dependencies": { - "sass": "*" + "@types/node": "*" } }, "node_modules/@types/semver": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.0.tgz", - "integrity": "sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==", - "dev": true + "version": "7.5.8", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", + "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==", + "dev": true, + "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.61.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.61.0.tgz", - "integrity": "sha512-A5l/eUAug103qtkwccSCxn8ZRwT+7RXWkFECdA4Cvl1dOlDUgTpAOfSEElZn2uSUxhdDpnCdetrf0jvU4qrL+g==", + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz", + "integrity": "sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag==", "dev": true, + "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.4.0", - "@typescript-eslint/scope-manager": "5.61.0", - "@typescript-eslint/type-utils": "5.61.0", - "@typescript-eslint/utils": "5.61.0", + "@typescript-eslint/scope-manager": "5.62.0", + "@typescript-eslint/type-utils": "5.62.0", + "@typescript-eslint/utils": "5.62.0", "debug": "^4.3.4", "graphemer": "^1.4.0", "ignore": "^5.2.0", @@ -902,14 +1066,15 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "5.61.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.61.0.tgz", - "integrity": "sha512-yGr4Sgyh8uO6fSi9hw3jAFXNBHbCtKKFMdX2IkT3ZqpKmtAq3lHS4ixB/COFuAIJpwl9/AqF7j72ZDWYKmIfvg==", + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.62.0.tgz", + "integrity": "sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/scope-manager": "5.61.0", - "@typescript-eslint/types": "5.61.0", - "@typescript-eslint/typescript-estree": "5.61.0", + "@typescript-eslint/scope-manager": "5.62.0", + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/typescript-estree": "5.62.0", "debug": "^4.3.4" }, "engines": { @@ -929,13 +1094,14 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "5.61.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.61.0.tgz", - "integrity": "sha512-W8VoMjoSg7f7nqAROEmTt6LoBpn81AegP7uKhhW5KzYlehs8VV0ZW0fIDVbcZRcaP3aPSW+JZFua+ysQN+m/Nw==", + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz", + "integrity": "sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==", "dev": true, + "license": "MIT", "dependencies": { - "@typescript-eslint/types": "5.61.0", - "@typescript-eslint/visitor-keys": "5.61.0" + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/visitor-keys": "5.62.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -946,13 +1112,14 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "5.61.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.61.0.tgz", - "integrity": "sha512-kk8u//r+oVK2Aj3ph/26XdH0pbAkC2RiSjUYhKD+PExemG4XSjpGFeyZ/QM8lBOa7O8aGOU+/yEbMJgQv/DnCg==", + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.62.0.tgz", + "integrity": "sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew==", "dev": true, + "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "5.61.0", - "@typescript-eslint/utils": "5.61.0", + "@typescript-eslint/typescript-estree": "5.62.0", + "@typescript-eslint/utils": "5.62.0", "debug": "^4.3.4", "tsutils": "^3.21.0" }, @@ -973,10 +1140,11 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "5.61.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.61.0.tgz", - "integrity": "sha512-ldyueo58KjngXpzloHUog/h9REmHl59G1b3a5Sng1GfBo14BkS3ZbMEb3693gnP1k//97lh7bKsp6/V/0v1veQ==", + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.62.0.tgz", + "integrity": "sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==", "dev": true, + "license": "MIT", "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, @@ -986,13 +1154,14 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.61.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.61.0.tgz", - "integrity": "sha512-Fud90PxONnnLZ36oR5ClJBLTLfU4pIWBmnvGwTbEa2cXIqj70AEDEmOmpkFComjBZ/037ueKrOdHuYmSFVD7Rw==", + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz", + "integrity": "sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/types": "5.61.0", - "@typescript-eslint/visitor-keys": "5.61.0", + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/visitor-keys": "5.62.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -1013,17 +1182,18 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "5.61.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.61.0.tgz", - "integrity": "sha512-mV6O+6VgQmVE6+xzlA91xifndPW9ElFW8vbSF0xCT/czPXVhwDewKila1jOyRwa9AE19zKnrr7Cg5S3pJVrTWQ==", + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.62.0.tgz", + "integrity": "sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==", "dev": true, + "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@types/json-schema": "^7.0.9", "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.61.0", - "@typescript-eslint/types": "5.61.0", - "@typescript-eslint/typescript-estree": "5.61.0", + "@typescript-eslint/scope-manager": "5.62.0", + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/typescript-estree": "5.62.0", "eslint-scope": "^5.1.1", "semver": "^7.3.7" }, @@ -1038,35 +1208,14 @@ "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, - "node_modules/@typescript-eslint/utils/node_modules/eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@typescript-eslint/utils/node_modules/estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.61.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.61.0.tgz", - "integrity": "sha512-50XQ5VdbWrX06mQXhy93WywSFZZGsv3EOjq+lqp6WC2t+j3mb6A9xYVdrRxafvK88vg9k9u+CT4l6D8PEatjKg==", + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz", + "integrity": "sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==", "dev": true, + "license": "MIT", "dependencies": { - "@typescript-eslint/types": "5.61.0", + "@typescript-eslint/types": "5.62.0", "eslint-visitor-keys": "^3.3.0" }, "engines": { @@ -1077,11 +1226,19 @@ "url": "https://opencollective.com/typescript-eslint" } }, + "node_modules/@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", + "dev": true, + "license": "ISC" + }, "node_modules/acorn": { - "version": "8.9.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.9.0.tgz", - "integrity": "sha512-jaVNAFBHNLXspO543WnNNPZFRtavh3skAkITqD0/2aeMkKZTN+254PyhwxFYrk3vQ1xfY+2wbesJMs/JC8/PwQ==", + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", + "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", "dev": true, + "license": "MIT", "bin": { "acorn": "bin/acorn" }, @@ -1094,6 +1251,7 @@ "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", "dev": true, + "license": "MIT", "peerDependencies": { "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } @@ -1103,6 +1261,7 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, + "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -1119,15 +1278,24 @@ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, + "node_modules/ansi-sequence-parser": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ansi-sequence-parser/-/ansi-sequence-parser-1.1.1.tgz", + "integrity": "sha512-vJXt3yiaUL4UU546s3rPXlsry/RnM730G1+HkpKE012AN0sx1eOrxSu95oKDIonskeLTijMgqWZ3uDEe3NFvyg==", + "dev": true, + "license": "MIT" + }, "node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, + "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -1142,13 +1310,15 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/anymatch": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", "dev": true, + "license": "ISC", "dependencies": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" @@ -1161,27 +1331,30 @@ "version": "5.0.2", "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz", "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true + "dev": true, + "license": "Python-2.0" }, "node_modules/array-union": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/autoprefixer": { - "version": "10.4.14", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.14.tgz", - "integrity": "sha512-FQzyfOsTlwVzjHxKEqRIAdJx9niO6VCBCoEwax/VLSoQF29ggECcPuBqUMZ+u8jCZOPSy8b8/8KnuFbp0SaFZQ==", + "version": "10.4.20", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.20.tgz", + "integrity": "sha512-XY25y5xSv/wEoqzDyXXME4AFfkZI0P23z6Fs3YgymDnKJkCGOnkL0iTxCa85UTqaSgfcqyf3UA6+c7wUvx/16g==", "dev": true, "funding": [ { @@ -1191,14 +1364,19 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/autoprefixer" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ], + "license": "MIT", "dependencies": { - "browserslist": "^4.21.5", - "caniuse-lite": "^1.0.30001464", - "fraction.js": "^4.2.0", + "browserslist": "^4.23.3", + "caniuse-lite": "^1.0.30001646", + "fraction.js": "^4.3.7", "normalize-range": "^0.1.2", - "picocolors": "^1.0.0", + "picocolors": "^1.0.1", "postcss-value-parser": "^4.2.0" }, "bin": { @@ -1215,15 +1393,20 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/brace-expansion": { @@ -1231,27 +1414,29 @@ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, + "license": "MIT", "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" } }, "node_modules/browserslist": { - "version": "4.21.9", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.9.tgz", - "integrity": "sha512-M0MFoZzbUrRU4KNfCrDLnvyE7gub+peetoTid3TBIqtunaDJyXlwhakT+/VkvSXcfIzFfK/nkCs4nmyTmxdNSg==", + "version": "4.24.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.2.tgz", + "integrity": "sha512-ZIc+Q62revdMcqC6aChtW4jz3My3klmCO1fEmINZY/8J3EpBg5/A/D0AKmBveUh6pgoeycoMkVMko84tuYS+Gg==", "dev": true, "funding": [ { @@ -1267,11 +1452,12 @@ "url": "https://github.com/sponsors/ai" } ], + "license": "MIT", "dependencies": { - "caniuse-lite": "^1.0.30001503", - "electron-to-chromium": "^1.4.431", - "node-releases": "^2.0.12", - "update-browserslist-db": "^1.0.11" + "caniuse-lite": "^1.0.30001669", + "electron-to-chromium": "^1.5.41", + "node-releases": "^2.0.18", + "update-browserslist-db": "^1.1.1" }, "bin": { "browserslist": "cli.js" @@ -1285,27 +1471,17 @@ "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", "dev": true, + "license": "MIT", "engines": { "node": "*" } }, - "node_modules/busboy": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz", - "integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==", - "dev": true, - "dependencies": { - "streamsearch": "^1.1.0" - }, - "engines": { - "node": ">=10.16.0" - } - }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -1315,14 +1491,15 @@ "resolved": "https://registry.npmjs.org/camelcase-css/-/camelcase-css-2.0.1.tgz", "integrity": "sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==", "dev": true, + "license": "MIT", "engines": { "node": ">= 6" } }, "node_modules/caniuse-lite": { - "version": "1.0.30001512", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001512.tgz", - "integrity": "sha512-2S9nK0G/mE+jasCUsMPlARhRCts1ebcp2Ji8Y8PWi4NDE1iRdLCnEPHkEfeBrGC45L4isBx5ur3IQ6yTE2mRZw==", + "version": "1.0.30001672", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001672.tgz", + "integrity": "sha512-XhW1vRo1ob6aeK2w3rTohwTPBLse/rvjq+s3RTSBwnlZqoFFjx9cHsShJjAIbLsLjyoacaTxpLZy9v3gg6zypw==", "dev": true, "funding": [ { @@ -1337,13 +1514,15 @@ "type": "github", "url": "https://github.com/sponsors/ai" } - ] + ], + "license": "CC-BY-4.0" }, "node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -1356,16 +1535,11 @@ } }, "node_modules/chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], + "license": "MIT", "dependencies": { "anymatch": "~3.1.2", "braces": "~3.0.2", @@ -1378,15 +1552,32 @@ "engines": { "node": ">= 8.10.0" }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, "optionalDependencies": { "fsevents": "~2.3.2" } }, + "node_modules/chokidar/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/clsx": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/clsx/-/clsx-1.2.1.tgz", "integrity": "sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -1396,6 +1587,7 @@ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, + "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -1407,13 +1599,15 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/commander": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", "dev": true, + "license": "MIT", "engines": { "node": ">= 6" } @@ -1422,13 +1616,22 @@ "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true + "dev": true, + "license": "MIT" + }, + "node_modules/confbox": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/confbox/-/confbox-0.1.8.tgz", + "integrity": "sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==", + "dev": true, + "license": "MIT" }, "node_modules/cookie": { "version": "0.5.0", "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -1438,6 +1641,7 @@ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, + "license": "MIT", "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -1452,6 +1656,7 @@ "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", "dev": true, + "license": "MIT", "bin": { "cssesc": "bin/cssesc" }, @@ -1460,12 +1665,13 @@ } }, "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", "dev": true, + "license": "MIT", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -1480,13 +1686,15 @@ "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/deepmerge": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -1496,27 +1704,31 @@ "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-6.1.0.tgz", "integrity": "sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/devalue": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/devalue/-/devalue-4.3.2.tgz", - "integrity": "sha512-KqFl6pOgOW+Y6wJgu80rHpo2/3H07vr8ntR9rkkFIRETewbf5GaYYcakYfiKz89K+sLsuPkQIZaXDMjUObZwWg==", - "dev": true + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/devalue/-/devalue-4.3.3.tgz", + "integrity": "sha512-UH8EL6H2ifcY8TbD2QsxwCC/pr5xSwPvv85LrLXVihmHVC3T3YqTCIwnR5ak0yO1KYqlxrPVOA/JVZJYPy2ATg==", + "dev": true, + "license": "MIT" }, "node_modules/didyoumean": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz", "integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==", - "dev": true + "dev": true, + "license": "Apache-2.0" }, "node_modules/dir-glob": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", "dev": true, + "license": "MIT", "dependencies": { "path-type": "^4.0.0" }, @@ -1528,13 +1740,15 @@ "version": "1.1.3", "resolved": "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz", "integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/doctrine": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", "dev": true, + "license": "Apache-2.0", "dependencies": { "esutils": "^2.0.2" }, @@ -1542,24 +1756,41 @@ "node": ">=6.0.0" } }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true, + "license": "MIT" + }, "node_modules/electron-to-chromium": { - "version": "1.4.449", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.449.tgz", - "integrity": "sha512-TxLRpRUj/107ATefeP8VIUWNOv90xJxZZbCW/eIbSZQiuiFANCx2b7u+GbVc9X4gU+xnbvypNMYVM/WArE1DNQ==", - "dev": true + "version": "1.5.47", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.47.tgz", + "integrity": "sha512-zS5Yer0MOYw4rtK2iq43cJagHZ8sXN0jDHDKzB+86gSBSAI4v07S97mcq+Gs2vclAxSh1j7vOAHxSVgduiiuVQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true, + "license": "MIT" }, "node_modules/es6-promise": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.3.1.tgz", "integrity": "sha512-SOp9Phqvqn7jtEUxPWdWfWoLmyt2VaJ6MpvP9Comy1MceMXqE6bxvaTu4iaxpYYPzhny28Lc+M87/c2cPK6lDg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/esbuild": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.17.19.tgz", - "integrity": "sha512-XQ0jAPFkK/u3LcVRcvVHQcTIqD6E2H1fvZMA5dQPSOWb3suUbWbfbRf94pjc0bNzRYLfIrDRQXr7X+LHIm5oHw==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.20.tgz", + "integrity": "sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==", "dev": true, "hasInstallScript": true, + "license": "MIT", "bin": { "esbuild": "bin/esbuild" }, @@ -1567,35 +1798,36 @@ "node": ">=12" }, "optionalDependencies": { - "@esbuild/android-arm": "0.17.19", - "@esbuild/android-arm64": "0.17.19", - "@esbuild/android-x64": "0.17.19", - "@esbuild/darwin-arm64": "0.17.19", - "@esbuild/darwin-x64": "0.17.19", - "@esbuild/freebsd-arm64": "0.17.19", - "@esbuild/freebsd-x64": "0.17.19", - "@esbuild/linux-arm": "0.17.19", - "@esbuild/linux-arm64": "0.17.19", - "@esbuild/linux-ia32": "0.17.19", - "@esbuild/linux-loong64": "0.17.19", - "@esbuild/linux-mips64el": "0.17.19", - "@esbuild/linux-ppc64": "0.17.19", - "@esbuild/linux-riscv64": "0.17.19", - "@esbuild/linux-s390x": "0.17.19", - "@esbuild/linux-x64": "0.17.19", - "@esbuild/netbsd-x64": "0.17.19", - "@esbuild/openbsd-x64": "0.17.19", - "@esbuild/sunos-x64": "0.17.19", - "@esbuild/win32-arm64": "0.17.19", - "@esbuild/win32-ia32": "0.17.19", - "@esbuild/win32-x64": "0.17.19" + "@esbuild/android-arm": "0.18.20", + "@esbuild/android-arm64": "0.18.20", + "@esbuild/android-x64": "0.18.20", + "@esbuild/darwin-arm64": "0.18.20", + "@esbuild/darwin-x64": "0.18.20", + "@esbuild/freebsd-arm64": "0.18.20", + "@esbuild/freebsd-x64": "0.18.20", + "@esbuild/linux-arm": "0.18.20", + "@esbuild/linux-arm64": "0.18.20", + "@esbuild/linux-ia32": "0.18.20", + "@esbuild/linux-loong64": "0.18.20", + "@esbuild/linux-mips64el": "0.18.20", + "@esbuild/linux-ppc64": "0.18.20", + "@esbuild/linux-riscv64": "0.18.20", + "@esbuild/linux-s390x": "0.18.20", + "@esbuild/linux-x64": "0.18.20", + "@esbuild/netbsd-x64": "0.18.20", + "@esbuild/openbsd-x64": "0.18.20", + "@esbuild/sunos-x64": "0.18.20", + "@esbuild/win32-arm64": "0.18.20", + "@esbuild/win32-ia32": "0.18.20", + "@esbuild/win32-x64": "0.18.20" } }, "node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -1605,6 +1837,7 @@ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -1613,27 +1846,30 @@ } }, "node_modules/eslint": { - "version": "8.44.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.44.0.tgz", - "integrity": "sha512-0wpHoUbDUHgNCyvFB5aXLiQVfK9B0at6gUvzy83k4kAsQ/u769TQDX6iKC+aO4upIHO9WSaA3QoXYQDHbNwf1A==", + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz", + "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==", + "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", "dev": true, + "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.4.0", - "@eslint/eslintrc": "^2.1.0", - "@eslint/js": "8.44.0", - "@humanwhocodes/config-array": "^0.11.10", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.57.1", + "@humanwhocodes/config-array": "^0.13.0", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", - "ajv": "^6.10.0", + "@ungap/structured-clone": "^1.2.0", + "ajv": "^6.12.4", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", "debug": "^4.3.2", "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.0", - "eslint-visitor-keys": "^3.4.1", - "espree": "^9.6.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", "esquery": "^1.4.2", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -1643,7 +1879,6 @@ "globals": "^13.19.0", "graphemer": "^1.4.0", "ignore": "^5.2.0", - "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", "is-path-inside": "^3.0.3", @@ -1655,7 +1890,6 @@ "natural-compare": "^1.4.0", "optionator": "^0.9.3", "strip-ansi": "^6.0.1", - "strip-json-comments": "^3.1.0", "text-table": "^0.2.0" }, "bin": { @@ -1669,10 +1903,11 @@ } }, "node_modules/eslint-config-prettier": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.8.0.tgz", - "integrity": "sha512-wLbQiFre3tdGgpDv67NQKnJuTlcUVYHas3k+DZCc2U2BadthoEY4B7hLPvAxaqdyOGCzuLfii2fqGph10va7oA==", + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.10.0.tgz", + "integrity": "sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg==", "dev": true, + "license": "MIT", "bin": { "eslint-config-prettier": "bin/cli.js" }, @@ -1685,20 +1920,32 @@ "resolved": "https://registry.npmjs.org/eslint-plugin-svelte3/-/eslint-plugin-svelte3-4.0.0.tgz", "integrity": "sha512-OIx9lgaNzD02+MDFNLw0GEUbuovNcglg+wnd/UY0fbZmlQSz7GlQiQ1f+yX0XvC07XPcDOnFcichqI3xCwp71g==", "dev": true, + "license": "MIT", "peerDependencies": { "eslint": ">=8.0.0", "svelte": "^3.2.0" } }, "node_modules/eslint-scope": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.0.tgz", - "integrity": "sha512-DYj5deGlHBfMt15J7rdtyKNq/Nqlv5KfU4iodrQ019XESsRnwXH9KAE0y3cwtUHDo2ob7CypAnCqefh6vioWRw==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" + "estraverse": "^4.1.1" }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "license": "Apache-2.0", "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, @@ -1706,11 +1953,16 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint-visitor-keys": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz", - "integrity": "sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==", + "node_modules/eslint/node_modules/eslint-scope": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, @@ -1718,29 +1970,29 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint/node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "node_modules/eslint/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, - "dependencies": { - "is-glob": "^4.0.3" - }, + "license": "BSD-2-Clause", "engines": { - "node": ">=10.13.0" + "node": ">=4.0" } }, "node_modules/esm-env": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/esm-env/-/esm-env-1.0.0.tgz", "integrity": "sha512-Cf6VksWPsTuW01vU9Mk/3vRue91Zevka5SjyNf3nEpokFRuqt/KjUQoGAwq9qMmhpLTHmXzSIrFRw8zxWzmFBA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/espree": { - "version": "9.6.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.0.tgz", - "integrity": "sha512-1FH/IiruXZ84tpUlm0aCUEwMl2Ho5ilqVh0VvQXw+byAz/4SAciyHLlfmL5WYqsvD38oymdUwBss0LtK8m4s/A==", + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "acorn": "^8.9.0", "acorn-jsx": "^5.3.2", @@ -1754,10 +2006,11 @@ } }, "node_modules/esquery": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", - "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", + "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "estraverse": "^5.1.0" }, @@ -1765,11 +2018,22 @@ "node": ">=0.10" } }, + "node_modules/esquery/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, "node_modules/esrecurse": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "estraverse": "^5.2.0" }, @@ -1777,11 +2041,22 @@ "node": ">=4.0" } }, - "node_modules/estraverse": { + "node_modules/esrecurse/node_modules/estraverse": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true, + "license": "BSD-2-Clause", "engines": { "node": ">=4.0" } @@ -1791,6 +2066,7 @@ "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true, + "license": "BSD-2-Clause", "engines": { "node": ">=0.10.0" } @@ -1800,6 +2076,7 @@ "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", "dev": true, + "license": "MIT", "dependencies": { "cross-spawn": "^7.0.3", "get-stream": "^6.0.0", @@ -1822,19 +2099,22 @@ "version": "5.5.3", "resolved": "https://registry.npmjs.org/faker/-/faker-5.5.3.tgz", "integrity": "sha512-wLTv2a28wjUyWkbnX7u/ABZBkUkIF2fCd73V6P2oFqEGEktDfzWx4UxrSqtPRw0xPRAcjeAOIiJWqZm3pP4u3g==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/fast-glob": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.0.tgz", - "integrity": "sha512-ChDuvbOypPuNjO8yIDf36x7BlZX1smcUMTTcyoIjycexOxd6DFsKsg21qVBzEmr3G7fUKIRy2/psii+CIUt7FA==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", "dev": true, + "license": "MIT", "dependencies": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", @@ -1846,23 +2126,39 @@ "node": ">=8.6.0" } }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/fast-levenshtein": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/fastq": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", - "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", "dev": true, + "license": "ISC", "dependencies": { "reusify": "^1.0.4" } @@ -1872,6 +2168,7 @@ "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", "dev": true, + "license": "MIT", "dependencies": { "flat-cache": "^3.0.4" }, @@ -1880,10 +2177,11 @@ } }, "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, + "license": "MIT", "dependencies": { "to-regex-range": "^5.0.1" }, @@ -1896,6 +2194,7 @@ "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, + "license": "MIT", "dependencies": { "locate-path": "^6.0.0", "path-exists": "^4.0.0" @@ -1908,64 +2207,85 @@ } }, "node_modules/flat-cache": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", - "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", + "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", "dev": true, + "license": "MIT", "dependencies": { - "flatted": "^3.1.0", + "flatted": "^3.2.9", + "keyv": "^4.5.3", "rimraf": "^3.0.2" }, "engines": { "node": "^10.12.0 || >=12.0.0" } }, - "node_modules/flat-cache/node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "node_modules/flatted": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", + "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", "dev": true, + "license": "ISC" + }, + "node_modules/foreground-child": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.0.tgz", + "integrity": "sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==", + "dev": true, + "license": "ISC", "dependencies": { - "glob": "^7.1.3" + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" }, - "bin": { - "rimraf": "bin.js" + "engines": { + "node": ">=14" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/flatted": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", - "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", - "dev": true + "node_modules/foreground-child/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } }, "node_modules/fraction.js": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.2.0.tgz", - "integrity": "sha512-MhLuK+2gUcnZe8ZHlaaINnQLl0xRIGRfcGk2yl8xoQAfHrSsL3rYu6FCmBdkdbhc9EPlwyGHewaRsvwRMJtAlA==", + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.7.tgz", + "integrity": "sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==", "dev": true, + "license": "MIT", "engines": { "node": "*" }, "funding": { "type": "patreon", - "url": "https://www.patreon.com/infusion" + "url": "https://github.com/sponsors/rawify" } }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "dev": true, "hasInstallScript": true, + "license": "MIT", "optional": true, "os": [ "darwin" @@ -1975,16 +2295,21 @@ } }, "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/get-stream": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -1996,7 +2321,9 @@ "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", "dev": true, + "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -2013,22 +2340,24 @@ } }, "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, + "license": "ISC", "dependencies": { - "is-glob": "^4.0.1" + "is-glob": "^4.0.3" }, "engines": { - "node": ">= 6" + "node": ">=10.13.0" } }, "node_modules/globals": { - "version": "13.20.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", - "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", "dev": true, + "license": "MIT", "dependencies": { "type-fest": "^0.20.2" }, @@ -2039,11 +2368,19 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/globalyzer": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/globalyzer/-/globalyzer-0.1.0.tgz", + "integrity": "sha512-40oNTM9UfG6aBmuKxk/giHn5nQ8RVz/SS4Ir6zgzOv9/qC3kKZ9v4etGTcJbEl/NyVQH7FGU7d+X1egr57Md2Q==", + "dev": true, + "license": "MIT" + }, "node_modules/globby": { "version": "11.1.0", "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", "dev": true, + "license": "MIT", "dependencies": { "array-union": "^2.1.0", "dir-glob": "^3.0.1", @@ -2059,44 +2396,56 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/globrex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/globrex/-/globrex-0.1.2.tgz", + "integrity": "sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==", + "dev": true, + "license": "MIT" + }, "node_modules/graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/graphemer": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", - "dev": true - }, - "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", "dev": true, - "dependencies": { - "function-bind": "^1.1.1" - }, - "engines": { - "node": ">= 0.4.0" - } + "license": "MIT" }, "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/highlight.js": { - "version": "11.8.0", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.8.0.tgz", - "integrity": "sha512-MedQhoqVdr0U6SSnWPzfiadUcDHfN/Wzq25AkXiQv9oiOO/sG0S7XkvpFIqWBl9Yq1UYyYOOVORs5UW2XlPyzg==", + "version": "11.10.0", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.10.0.tgz", + "integrity": "sha512-SYVnVFswQER+zu1laSya563s+F8VDGt7o35d4utbamowvUNLLMovFqwCLSocpZTz3MgaSRA1IbqRWZv97dtErQ==", "dev": true, + "license": "BSD-3-Clause", "engines": { "node": ">=12.0.0" } @@ -2106,30 +2455,27 @@ "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", "dev": true, + "license": "Apache-2.0", "engines": { "node": ">=10.17.0" } }, "node_modules/ignore": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", - "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", "dev": true, + "license": "MIT", "engines": { "node": ">= 4" } }, - "node_modules/immutable": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.0.tgz", - "integrity": "sha512-0AOCmOip+xgJwEVTQj1EfiDDOkPmuyllDuTuEX+DDXUgapLAsBIfkg3sxCYyCEA8mQqZrrxPUGjcOQ2JS3WLkg==", - "dev": true - }, "node_modules/import-fresh": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", "dev": true, + "license": "MIT", "dependencies": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" @@ -2142,10 +2488,11 @@ } }, "node_modules/import-meta-resolve": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/import-meta-resolve/-/import-meta-resolve-3.0.0.tgz", - "integrity": "sha512-4IwhLhNNA8yy445rPjD/lWh++7hMDOml2eHtd58eG7h+qK3EryMuuRbsHGPikCoAgIkkDnckKfWSk2iDla/ejg==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/import-meta-resolve/-/import-meta-resolve-4.1.0.tgz", + "integrity": "sha512-I6fiaX09Xivtk+THaMfAwnA3MVA5Big1WHF1Dfx9hFuvNIWpXnorlkzhcQf6ehrqQiiZECRt1poOAkPmer3ruw==", "dev": true, + "license": "MIT", "funding": { "type": "github", "url": "https://github.com/sponsors/wooorm" @@ -2156,6 +2503,7 @@ "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.8.19" } @@ -2164,7 +2512,9 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", "dev": true, + "license": "ISC", "dependencies": { "once": "^1.3.0", "wrappy": "1" @@ -2174,13 +2524,15 @@ "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", "dev": true, + "license": "MIT", "dependencies": { "binary-extensions": "^2.0.0" }, @@ -2189,12 +2541,16 @@ } }, "node_modules/is-core-module": { - "version": "2.12.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.1.tgz", - "integrity": "sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==", + "version": "2.15.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz", + "integrity": "sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==", "dev": true, + "license": "MIT", "dependencies": { - "has": "^1.0.3" + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -2205,15 +2561,27 @@ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, + "license": "MIT", "dependencies": { "is-extglob": "^2.1.1" }, @@ -2226,6 +2594,7 @@ "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.12.0" } @@ -2235,6 +2604,7 @@ "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -2244,6 +2614,7 @@ "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" }, @@ -2255,13 +2626,31 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true + "dev": true, + "license": "ISC" + }, + "node_modules/jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } }, "node_modules/jiti": { - "version": "1.19.1", - "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.19.1.tgz", - "integrity": "sha512-oVhqoRDaBXf7sjkll95LHVS6Myyyb1zaunVwk4Z0+WPSW4gjS0pl01zYKHScTuyEhQsFxV5L4DR5r+YqSyqyyg==", + "version": "1.21.6", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.6.tgz", + "integrity": "sha512-2yTgeWTWzMWkHu6Jp9NKgePDaYHbntiwvYuuJLbbN9vl7DC9DvXKOB2BC3ZZ92D3cvV/aflH0osDfwpHepQ53w==", "dev": true, + "license": "MIT", "bin": { "jiti": "bin/jiti.js" } @@ -2271,6 +2660,7 @@ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, + "license": "MIT", "dependencies": { "argparse": "^2.0.1" }, @@ -2278,29 +2668,50 @@ "js-yaml": "bin/js-yaml.js" } }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true, + "license": "MIT" + }, "node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/jsonc-parser": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz", - "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==", - "dev": true + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.3.1.tgz", + "integrity": "sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "json-buffer": "3.0.1" + } }, "node_modules/kleur": { "version": "4.1.5", "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -2309,13 +2720,15 @@ "version": "1.8.0", "resolved": "https://registry.npmjs.org/kolorist/-/kolorist-1.8.0.tgz", "integrity": "sha512-Y+60/zizpJ3HRH8DCss+q95yr6145JXZo46OTpFvDZWLfRCE4qChOyk1b26nMaNpfHHgxagk9dXT5OP0Tfe+dQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/levn": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", "dev": true, + "license": "MIT", "dependencies": { "prelude-ls": "^1.2.1", "type-check": "~0.4.0" @@ -2325,25 +2738,31 @@ } }, "node_modules/lilconfig": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.1.0.tgz", - "integrity": "sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.2.tgz", + "integrity": "sha512-eop+wDAvpItUys0FWkHIKeC9ybYrTGbU41U5K7+bttZZeohvnY7M9dZ5kB21GNWiFT2q1OoPTvncPCgSOVO5ow==", "dev": true, + "license": "MIT", "engines": { - "node": ">=10" + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antonk52" } }, "node_modules/lines-and-columns": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/local-pkg": { "version": "0.4.3", "resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-0.4.3.tgz", "integrity": "sha512-SFppqq5p42fe2qcZQqqEOiVRXl+WCP1MdT6k7BDEW1j++sp5fIY+/fdRQitvKgB5BrBcmrs5m/L0v2FrU5MY1g==", "dev": true, + "license": "MIT", "engines": { "node": ">=14" }, @@ -2356,6 +2775,7 @@ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, + "license": "MIT", "dependencies": { "p-locate": "^5.0.0" }, @@ -2370,86 +2790,77 @@ "version": "4.4.0", "resolved": "https://registry.npmjs.org/lodash.castarray/-/lodash.castarray-4.4.0.tgz", "integrity": "sha512-aVx8ztPv7/2ULbArGJ2Y42bG1mEQ5mGjpdvrbJcJFU3TbYybe+QlLS4pst9zV52ymy2in1KpFPiZnAOATxD4+Q==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/lodash.isplainobject": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/lru-cache": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.0.0.tgz", - "integrity": "sha512-svTf/fzsKHffP42sujkO/Rjs37BCIsQVRCeNYIm9WN8rgT7ffoUnRtZCqU+6BqcSBdv8gwJeTz8knJpgACeQMw==", + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", "dev": true, - "engines": { - "node": "14 || >=16.14" - } + "license": "ISC" }, "node_modules/magic-string": { - "version": "0.30.1", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.1.tgz", - "integrity": "sha512-mbVKXPmS0z0G4XqFDCTllmDQ6coZzn94aMlb0o/A4HEHJCKcanlDZwYJgwnkmgD3jyWhUgj9VsPrfd972yPffA==", + "version": "0.30.12", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.12.tgz", + "integrity": "sha512-Ea8I3sQMVXr8JhN4z+H/d8zwo+tYDgHE9+5G4Wnrwhs0gaK9fXTKx0Tw5Xwsd/bCPTTZNRAdpyzvoeORe9LYpw==", "dev": true, + "license": "MIT", "dependencies": { - "@jridgewell/sourcemap-codec": "^1.4.15" - }, - "engines": { - "node": ">=12" + "@jridgewell/sourcemap-codec": "^1.5.0" } }, "node_modules/merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", "dev": true, + "license": "MIT", "engines": { "node": ">= 8" } }, "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "dev": true, + "license": "MIT", "dependencies": { - "braces": "^3.0.2", + "braces": "^3.0.3", "picomatch": "^2.3.1" }, "engines": { "node": ">=8.6" } }, - "node_modules/mime": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-3.0.0.tgz", - "integrity": "sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==", - "dev": true, - "bin": { - "mime": "cli.js" - }, - "engines": { - "node": ">=10.0.0" - } - }, "node_modules/mimic-fn": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -2459,6 +2870,7 @@ "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } @@ -2468,6 +2880,7 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -2480,15 +2893,27 @@ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", "dev": true, + "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, "node_modules/mkdirp": { "version": "0.5.6", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", "dev": true, + "license": "MIT", "dependencies": { "minimist": "^1.2.6" }, @@ -2496,11 +2921,25 @@ "mkdirp": "bin/cmd.js" } }, + "node_modules/mlly": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.7.2.tgz", + "integrity": "sha512-tN3dvVHYVz4DhSXinXIk7u9syPYaJvio118uomkovAtWBT+RdbP6Lfh/5Lvo519YMmwBafwlh20IPTXIStscpA==", + "dev": true, + "license": "MIT", + "dependencies": { + "acorn": "^8.12.1", + "pathe": "^1.1.2", + "pkg-types": "^1.2.0", + "ufo": "^1.5.4" + } + }, "node_modules/mri": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz", "integrity": "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } @@ -2510,21 +2949,24 @@ "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-1.0.1.tgz", "integrity": "sha512-hzzEagAgDyoU1Q6yg5uI+AorQgdvMCur3FcKf7NhMKWsaYg+RnbTyHRa/9IlLF9rf455MOCtcqqrQQ83pPP7Uw==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" } }, "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" }, "node_modules/mz": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", "dev": true, + "license": "MIT", "dependencies": { "any-promise": "^1.0.0", "object-assign": "^4.0.1", @@ -2532,9 +2974,9 @@ } }, "node_modules/nanoid": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", - "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==", + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", "dev": true, "funding": [ { @@ -2542,6 +2984,7 @@ "url": "https://github.com/sponsors/ai" } ], + "license": "MIT", "bin": { "nanoid": "bin/nanoid.cjs" }, @@ -2553,25 +2996,29 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/natural-compare-lite": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz", "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/node-releases": { - "version": "2.0.12", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.12.tgz", - "integrity": "sha512-QzsYKWhXTWx8h1kIvqfnC++o0pEmpRQA/aenALsL2F4pqNVr7YzcdMlDij5WBnwftRbJCNJL/O7zdKaxKPHqgQ==", - "dev": true + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz", + "integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==", + "dev": true, + "license": "MIT" }, "node_modules/normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -2581,6 +3028,7 @@ "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", "integrity": "sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -2590,6 +3038,7 @@ "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", "dev": true, + "license": "MIT", "dependencies": { "path-key": "^3.0.0" }, @@ -2602,6 +3051,7 @@ "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -2611,6 +3061,7 @@ "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz", "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==", "dev": true, + "license": "MIT", "engines": { "node": ">= 6" } @@ -2620,6 +3071,7 @@ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "dev": true, + "license": "ISC", "dependencies": { "wrappy": "1" } @@ -2629,6 +3081,7 @@ "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", "dev": true, + "license": "MIT", "dependencies": { "mimic-fn": "^2.1.0" }, @@ -2640,17 +3093,18 @@ } }, "node_modules/optionator": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", - "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", "dev": true, + "license": "MIT", "dependencies": { - "@aashutoshrathi/word-wrap": "^1.2.3", "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", "levn": "^0.4.1", "prelude-ls": "^1.2.1", - "type-check": "^0.4.0" + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" }, "engines": { "node": ">= 0.8.0" @@ -2661,6 +3115,7 @@ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, + "license": "MIT", "dependencies": { "yocto-queue": "^0.1.0" }, @@ -2676,6 +3131,7 @@ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, + "license": "MIT", "dependencies": { "p-limit": "^3.0.2" }, @@ -2686,11 +3142,26 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/package-json-from-dist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", + "dev": true, + "license": "BlueOak-1.0.0" + }, + "node_modules/package-manager-detector": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/package-manager-detector/-/package-manager-detector-0.2.2.tgz", + "integrity": "sha512-VgXbyrSNsml4eHWIvxxG/nTL4wgybMTXCV2Un/+yEc3aDKKU6nQBZjbeP3Pl3qm9Qg92X/1ng4ffvCeD/zwHgg==", + "dev": true, + "license": "MIT" + }, "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", "dev": true, + "license": "MIT", "dependencies": { "callsites": "^3.0.0" }, @@ -2703,6 +3174,7 @@ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -2712,6 +3184,7 @@ "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -2721,6 +3194,7 @@ "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -2729,28 +3203,56 @@ "version": "1.0.7", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true + "dev": true, + "license": "MIT" + }, + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } }, "node_modules/path-type": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, + "node_modules/pathe": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.2.tgz", + "integrity": "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==", + "dev": true, + "license": "MIT" + }, "node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "dev": true + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" }, "node_modules/picomatch": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true, + "license": "MIT", "engines": { "node": ">=8.6" }, @@ -2763,6 +3265,7 @@ "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -2772,14 +3275,27 @@ "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", "dev": true, + "license": "MIT", "engines": { "node": ">= 6" } }, + "node_modules/pkg-types": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.2.1.tgz", + "integrity": "sha512-sQoqa8alT3nHjGuTjuKgOnvjo4cljkufdtLMnO2LBP/wRwuDlo1tkaEdMxCRhyGRPacv/ztlZgDPm2b7FAmEvw==", + "dev": true, + "license": "MIT", + "dependencies": { + "confbox": "^0.1.8", + "mlly": "^1.7.2", + "pathe": "^1.1.2" + } + }, "node_modules/postcss": { - "version": "8.4.24", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.24.tgz", - "integrity": "sha512-M0RzbcI0sO/XJNucsGjvWU9ERWxb/ytp1w6dKtxTKgixdtQDq4rmx/g8W1hnaheq9jgwL/oyEdH5Bc4WwJKMqg==", + "version": "8.4.47", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.47.tgz", + "integrity": "sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==", "dev": true, "funding": [ { @@ -2795,10 +3311,11 @@ "url": "https://github.com/sponsors/ai" } ], + "license": "MIT", "dependencies": { - "nanoid": "^3.3.6", - "picocolors": "^1.0.0", - "source-map-js": "^1.0.2" + "nanoid": "^3.3.7", + "picocolors": "^1.1.0", + "source-map-js": "^1.2.1" }, "engines": { "node": "^10 || ^12 || >=14" @@ -2809,6 +3326,7 @@ "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-15.1.0.tgz", "integrity": "sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==", "dev": true, + "license": "MIT", "dependencies": { "postcss-value-parser": "^4.0.0", "read-cache": "^1.0.0", @@ -2826,6 +3344,7 @@ "resolved": "https://registry.npmjs.org/postcss-js/-/postcss-js-4.0.1.tgz", "integrity": "sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw==", "dev": true, + "license": "MIT", "dependencies": { "camelcase-css": "^2.0.1" }, @@ -2841,21 +3360,28 @@ } }, "node_modules/postcss-load-config": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-4.0.1.tgz", - "integrity": "sha512-vEJIc8RdiBRu3oRAI0ymerOn+7rPuMvRXslTvZUKZonDHFIczxztIyJ1urxM1x9JXEikvpWWTUUqal5j/8QgvA==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-4.0.2.tgz", + "integrity": "sha512-bSVhyJGL00wMVoPUzAVAnbEoWyqRxkjv64tUl427SKnPrENtq6hJwUojroMz2VB+Q1edmi4IfrAPpami5VVgMQ==", "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", "dependencies": { - "lilconfig": "^2.0.5", - "yaml": "^2.1.1" + "lilconfig": "^3.0.0", + "yaml": "^2.3.4" }, "engines": { "node": ">= 14" }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, "peerDependencies": { "postcss": ">=8.0.9", "ts-node": ">=9.0.0" @@ -2870,29 +3396,37 @@ } }, "node_modules/postcss-nested": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-6.0.1.tgz", - "integrity": "sha512-mEp4xPMi5bSWiMbsgoPfcP74lsWLHkQbZc3sY+jWYd65CUwXrUaTp0fmNpa01ZcETKlIgUdFN/MpS2xZtqL9dQ==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-6.2.0.tgz", + "integrity": "sha512-HQbt28KulC5AJzG+cZtj9kvKB93CFCdLvog1WFLf1D+xmMvPGlBstkpTEZfK5+AN9hfJocyBFCNiqyS48bpgzQ==", "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", "dependencies": { - "postcss-selector-parser": "^6.0.11" + "postcss-selector-parser": "^6.1.1" }, "engines": { "node": ">=12.0" }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, "peerDependencies": { "postcss": "^8.2.14" } }, "node_modules/postcss-nested/node_modules/postcss-selector-parser": { - "version": "6.0.13", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.13.tgz", - "integrity": "sha512-EaV1Gl4mUEV4ddhDnv/xtj7sxwrwxdetHdWUGnT4VJQf+4d05v6lHYZr8N573k5Z0BViss7BDhfWtKS3+sfAqQ==", + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.2.tgz", + "integrity": "sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==", "dev": true, + "license": "MIT", "dependencies": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" @@ -2906,6 +3440,7 @@ "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.10.tgz", "integrity": "sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w==", "dev": true, + "license": "MIT", "dependencies": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" @@ -2918,13 +3453,15 @@ "version": "4.2.0", "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.8.0" } @@ -2934,6 +3471,7 @@ "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", "dev": true, + "license": "MIT", "peer": true, "bin": { "prettier": "bin-prettier.js" @@ -2950,16 +3488,18 @@ "resolved": "https://registry.npmjs.org/prettier-plugin-svelte/-/prettier-plugin-svelte-2.10.1.tgz", "integrity": "sha512-Wlq7Z5v2ueCubWo0TZzKc9XHcm7TDxqcuzRuGd0gcENfzfT4JZ9yDlCbEgxWgiPmLHkBjfOtpAWkcT28MCDpUQ==", "dev": true, + "license": "MIT", "peerDependencies": { "prettier": "^1.16.4 || ^2.0.0", "svelte": "^3.2.0 || ^4.0.0-next.0" } }, "node_modules/punycode": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", - "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -2982,13 +3522,15 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "license": "MIT" }, "node_modules/read-cache": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", "integrity": "sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==", "dev": true, + "license": "MIT", "dependencies": { "pify": "^2.3.0" } @@ -2998,6 +3540,7 @@ "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "dev": true, + "license": "MIT", "dependencies": { "picomatch": "^2.2.1" }, @@ -3006,12 +3549,13 @@ } }, "node_modules/resolve": { - "version": "1.22.2", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz", - "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==", + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", "dev": true, + "license": "MIT", "dependencies": { - "is-core-module": "^2.11.0", + "is-core-module": "^2.13.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, @@ -3027,6 +3571,7 @@ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } @@ -3036,28 +3581,35 @@ "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", "dev": true, + "license": "MIT", "engines": { "iojs": ">=1.0.0", "node": ">=0.10.0" } }, "node_modules/rimraf": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", "dev": true, + "license": "ISC", "dependencies": { "glob": "^7.1.3" }, "bin": { "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/rollup": { - "version": "3.26.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.26.0.tgz", - "integrity": "sha512-YzJH0eunH2hr3knvF3i6IkLO/jTjAEwU4HoMUbQl4//Tnl3ou0e7P5SjxdDr8HQJdeUJShlbEHXrrnEHy1l7Yg==", + "version": "3.29.5", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.29.5.tgz", + "integrity": "sha512-GVsDdsbJzzy4S/v3dqWPJ7EfvZJfCHiDqe80IyrF59LYuP+e6U1LJoUqeuqRbwAWoMNoXivMNeNAOf5E22VA1w==", "dev": true, + "license": "MIT", "bin": { "rollup": "dist/bin/rollup" }, @@ -3088,6 +3640,7 @@ "url": "https://feross.org/support" } ], + "license": "MIT", "dependencies": { "queue-microtask": "^1.2.2" } @@ -3097,6 +3650,7 @@ "resolved": "https://registry.npmjs.org/sade/-/sade-1.8.1.tgz", "integrity": "sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==", "dev": true, + "license": "MIT", "dependencies": { "mri": "^1.1.0" }, @@ -3109,6 +3663,7 @@ "resolved": "https://registry.npmjs.org/sander/-/sander-0.5.1.tgz", "integrity": "sha512-3lVqBir7WuKDHGrKRDn/1Ye3kwpXaDOMsiRP1wd6wpZW56gJhsbp5RqQpA6JG/P+pkXizygnr1dKR8vzWaVsfA==", "dev": true, + "license": "MIT", "dependencies": { "es6-promise": "^3.1.2", "graceful-fs": "^4.1.3", @@ -3116,31 +3671,26 @@ "rimraf": "^2.5.2" } }, - "node_modules/sass": { - "version": "1.63.6", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.63.6.tgz", - "integrity": "sha512-MJuxGMHzaOW7ipp+1KdELtqKbfAWbH7OLIdoSMnVe3EXPMTmxTmlaZDCTsgIpPCs3w99lLo9/zDKkOrJuT5byw==", + "node_modules/sander/node_modules/rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", "dev": true, + "license": "ISC", "dependencies": { - "chokidar": ">=3.0.0 <4.0.0", - "immutable": "^4.0.0", - "source-map-js": ">=0.6.2 <2.0.0" + "glob": "^7.1.3" }, "bin": { - "sass": "sass.js" - }, - "engines": { - "node": ">=14.0.0" + "rimraf": "bin.js" } }, "node_modules/semver": { - "version": "7.5.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz", - "integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==", + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, + "license": "ISC", "bin": { "semver": "bin/semver.js" }, @@ -3148,29 +3698,19 @@ "node": ">=10" } }, - "node_modules/semver/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/set-cookie-parser": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.6.0.tgz", - "integrity": "sha512-RVnVQxTXuerk653XfuliOxBP81Sf0+qfQE73LIYKcyMYHG94AuH0kgrQpRDuTZnSmjpysHmzxJXKNfa6PjFhyQ==", - "dev": true + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.7.1.tgz", + "integrity": "sha512-IOc8uWeOZgnb3ptbCURJWNjWUPcO3ZnTTdzsurqERrP6nPyv+paC55vJM0LpOlT2ne+Ix+9+CRG1MNLlyZ4GjQ==", + "dev": true, + "license": "MIT" }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, + "license": "MIT", "dependencies": { "shebang-regex": "^3.0.0" }, @@ -3183,6 +3723,7 @@ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -3192,6 +3733,7 @@ "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.10.1.tgz", "integrity": "sha512-VsY7QJVzU51j5o1+DguUd+6vmCmZ5v/6gYu4vyYAhzjuNQU6P/vmSy4uQaOhvje031qQMiW0d2BwgMH52vqMng==", "dev": true, + "license": "MIT", "dependencies": { "jsonc-parser": "^3.0.0", "vscode-oniguruma": "^1.6.1", @@ -3202,27 +3744,40 @@ "version": "3.0.7", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/sirv": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/sirv/-/sirv-2.0.3.tgz", - "integrity": "sha512-O9jm9BsID1P+0HOi81VpXPoDxYP374pkOLzACAoyUQ/3OUVndNpsz6wMnY2z+yOxzbllCKZrM+9QrWsv4THnyA==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/sirv/-/sirv-2.0.4.tgz", + "integrity": "sha512-94Bdh3cC2PKrbgSOUqTiGPWVZeSiXfKOVZNJniWoqrWrRkB1CJzBU3NEbiTsPcYy1lDsANA/THzS+9WBiy5nfQ==", "dev": true, + "license": "MIT", "dependencies": { - "@polka/url": "^1.0.0-next.20", - "mrmime": "^1.0.0", + "@polka/url": "^1.0.0-next.24", + "mrmime": "^2.0.0", "totalist": "^3.0.0" }, "engines": { "node": ">= 10" } }, + "node_modules/sirv/node_modules/mrmime": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-2.0.0.tgz", + "integrity": "sha512-eu38+hdgojoyq63s+yTpN4XMBdt5l8HhMhc4VKLO9KM5caLIBvUm4thi7fFaxyTmCKeNnXZ5pAlBwCUnhA09uw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, "node_modules/slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -3232,6 +3787,7 @@ "resolved": "https://registry.npmjs.org/sorcery/-/sorcery-0.10.0.tgz", "integrity": "sha512-R5ocFmKZQFfSTstfOtHjJuAwbpGyf9qjQa1egyhvXSbM7emjrtLXtGdZsDJDABC85YBfVvrOiGWKSYXPKdvP1g==", "dev": true, + "license": "MIT", "dependencies": { "buffer-crc32": "^0.2.5", "minimist": "^1.2.0", @@ -3243,10 +3799,11 @@ } }, "node_modules/source-map-js": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", - "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", "dev": true, + "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" } @@ -3256,15 +3813,77 @@ "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", "deprecated": "Please use @jridgewell/sourcemap-codec instead", - "dev": true + "dev": true, + "license": "MIT" + }, + "node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/string-width/node_modules/ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } }, - "node_modules/streamsearch": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz", - "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==", + "node_modules/string-width/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, "engines": { - "node": ">=10.0.0" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, "node_modules/strip-ansi": { @@ -3272,6 +3891,21 @@ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", "dependencies": { "ansi-regex": "^5.0.1" }, @@ -3284,6 +3918,7 @@ "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -3293,6 +3928,7 @@ "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", "dev": true, + "license": "MIT", "dependencies": { "min-indent": "^1.0.0" }, @@ -3305,6 +3941,7 @@ "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" }, @@ -3313,14 +3950,15 @@ } }, "node_modules/sucrase": { - "version": "3.32.0", - "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.32.0.tgz", - "integrity": "sha512-ydQOU34rpSyj2TGyz4D2p8rbktIOZ8QY9s+DGLvFU1i5pWJE8vkpruCjGCMHsdXwnD7JDcS+noSwM/a7zyNFDQ==", + "version": "3.35.0", + "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.35.0.tgz", + "integrity": "sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA==", "dev": true, + "license": "MIT", "dependencies": { "@jridgewell/gen-mapping": "^0.3.2", "commander": "^4.0.0", - "glob": "7.1.6", + "glob": "^10.3.10", "lines-and-columns": "^1.1.6", "mz": "^2.7.0", "pirates": "^4.0.1", @@ -3331,24 +3969,51 @@ "sucrase-node": "bin/sucrase-node" }, "engines": { - "node": ">=8" + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/sucrase/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" } }, "node_modules/sucrase/node_modules/glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", "dev": true, + "license": "ISC", "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/sucrase/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" }, "engines": { - "node": "*" + "node": ">=16 || 14 >=14.17" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -3359,6 +4024,7 @@ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -3371,6 +4037,7 @@ "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -3383,6 +4050,7 @@ "resolved": "https://registry.npmjs.org/svelte/-/svelte-3.59.2.tgz", "integrity": "sha512-vzSyuGr3eEoAtT/A6bmajosJZIUWySzY2CzB3w2pgPvnkUjGqlDnsNnA0PMO+mMAhuyMul6C2uuZzY6ELSkzyA==", "dev": true, + "license": "MIT", "engines": { "node": ">= 8" } @@ -3392,6 +4060,7 @@ "resolved": "https://registry.npmjs.org/svelte-check/-/svelte-check-2.10.3.tgz", "integrity": "sha512-Nt1aWHTOKFReBpmJ1vPug0aGysqPwJh2seM1OvICfM2oeyaA62mOiy5EvkXhltGfhCcIQcq2LoE0l1CwcWPjlw==", "dev": true, + "license": "MIT", "dependencies": { "@jridgewell/trace-mapping": "^0.3.9", "chokidar": "^3.4.1", @@ -3414,40 +4083,47 @@ "resolved": "https://registry.npmjs.org/svelte-class-transition/-/svelte-class-transition-1.0.4.tgz", "integrity": "sha512-00Rs6Ft5V9v4aqHIZKZHY2/OUQjFSNBXtG53ped3SEyl0kYiOyXu/16Ro3xsKMyaU4/xppoL8ef5uPoSP+BNPw==", "dev": true, + "license": "MIT", "peerDependencies": { "svelte": "^3.21.0" } }, "node_modules/svelte-headless-table": { - "version": "0.17.3", - "resolved": "https://registry.npmjs.org/svelte-headless-table/-/svelte-headless-table-0.17.3.tgz", - "integrity": "sha512-r5IRiE0RA8SPOQK7YxK6XMKAbDX00QG4AbD3sgVTH7magESKpRqe6zLyY5NEZorHsHLWzP8d+YilY/NmfneflQ==", + "version": "0.17.7", + "resolved": "https://registry.npmjs.org/svelte-headless-table/-/svelte-headless-table-0.17.7.tgz", + "integrity": "sha512-GRQEM0c4pXfFs6W+LGbsvrBbDqBaMxxibsWq8Q8o4ve4dTHIC9WsbuKMP3jRHl+iC9jd4K/TXJfLJHtLzuKSQA==", "dev": true, + "license": "MIT", "dependencies": { - "svelte-keyed": "^1.1.5", - "svelte-render": "^1.6.0", - "svelte-subscribe": "^1.0.4" + "svelte-keyed": "^1.1.6", + "svelte-render": "^1.6.1", + "svelte-subscribe": "^1.0.5" + }, + "peerDependencies": { + "svelte": "^3 || ^4" } }, "node_modules/svelte-hmr": { - "version": "0.15.2", - "resolved": "https://registry.npmjs.org/svelte-hmr/-/svelte-hmr-0.15.2.tgz", - "integrity": "sha512-q/bAruCvFLwvNbeE1x3n37TYFb3mTBJ6TrCq6p2CoFbSTNhDE9oAtEfpy+wmc9So8AG0Tja+X0/mJzX9tSfvIg==", + "version": "0.15.3", + "resolved": "https://registry.npmjs.org/svelte-hmr/-/svelte-hmr-0.15.3.tgz", + "integrity": "sha512-41snaPswvSf8TJUhlkoJBekRrABDXDMdpNpT2tfHIv4JuhgvHqLMhEPGtaQn0BmbNSTkuz2Ed20DF2eHw0SmBQ==", "dev": true, + "license": "ISC", "engines": { "node": "^12.20 || ^14.13.1 || >= 16" }, "peerDependencies": { - "svelte": "^3.19.0 || ^4.0.0-next.0" + "svelte": "^3.19.0 || ^4.0.0" } }, "node_modules/svelte-keyed": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/svelte-keyed/-/svelte-keyed-1.1.6.tgz", - "integrity": "sha512-sd/7j3waSpOkeiQqATstlvNySbEpSs49aoaZ/nc09x/iEndnXQ/9Zy5PTD06+C7hlZk8KjZ4bhrktAQ791jWMQ==", + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/svelte-keyed/-/svelte-keyed-1.1.7.tgz", + "integrity": "sha512-d3VIwBza12PIQ0mXf8js+r4xoSFiQikDobbi6hx03oQzZx0BImXCBcdsZeYEN7VrNswXcjIrhc9qqjlxcro49w==", "dev": true, + "license": "MIT", "peerDependencies": { - "svelte": "^3.49.0" + "svelte": "^3.49.0 || ^4" } }, "node_modules/svelte-preprocess": { @@ -3456,6 +4132,7 @@ "integrity": "sha512-sNPBnqYD6FnmdBrUmBCaqS00RyCsCpj2BG58A1JBswNF7b0OKviwxqVrOL/CKyJrLSClrSeqQv5BXNg2RUbPOw==", "dev": true, "hasInstallScript": true, + "license": "MIT", "dependencies": { "@types/pug": "^2.0.4", "@types/sass": "^1.16.0", @@ -3521,40 +4198,50 @@ "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.9.tgz", "integrity": "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==", "dev": true, + "license": "MIT", "dependencies": { "sourcemap-codec": "^1.4.8" } }, "node_modules/svelte-render": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/svelte-render/-/svelte-render-1.6.0.tgz", - "integrity": "sha512-Y6Ea6U768MuhH0xR72pAPnXdSnJ+4yi24YyD/b9Q46yGalQFVxUyan496EELWtQEvgQE9Z2PsFAG8JjvrWcDAg==", + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/svelte-render/-/svelte-render-1.6.1.tgz", + "integrity": "sha512-pn580Z6DtxIDrXqQaGR/7z8tdHasgURn1AG5tt4ym1PfE6qFjT27NpN6vIg5kvDl1ewK9pYeTfIWPw4pPXqyuw==", "dev": true, + "license": "MIT", "dependencies": { "svelte-subscribe": "^1.0.5" + }, + "peerDependencies": { + "svelte": "^3 || ^4" } }, "node_modules/svelte-subscribe": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/svelte-subscribe/-/svelte-subscribe-1.0.5.tgz", - "integrity": "sha512-p+vRSBVzR9BQC72mjd2eqCv8zx5euLZQJF7QqAw5d41aKzQVOq90y71/NXch+nDNMjWbRo0CX+brcWYgPryJlw==", - "dev": true + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/svelte-subscribe/-/svelte-subscribe-1.0.6.tgz", + "integrity": "sha512-legaLPjOGAN3G6xUa8+1ms3qo3lE4nfypZe1CedyOEoUUwWPfmzJHuBXtwdro4xUf4kezUbzjtyK1UOeZDksog==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "svelte": "^3 || ^4" + } }, "node_modules/tailwindcss": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.3.2.tgz", - "integrity": "sha512-9jPkMiIBXvPc2KywkraqsUfbfj+dHDb+JPWtSJa9MLFdrPyazI7q6WX2sUrm7R9eVR7qqv3Pas7EvQFzxKnI6w==", + "version": "3.4.14", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.14.tgz", + "integrity": "sha512-IcSvOcTRcUtQQ7ILQL5quRDg7Xs93PdJEk1ZLbhhvJc7uj/OAhYOnruEiwnGgBvUtaUAJ8/mhSw1o8L2jCiENA==", "dev": true, + "license": "MIT", "dependencies": { "@alloc/quick-lru": "^5.2.0", "arg": "^5.0.2", "chokidar": "^3.5.3", "didyoumean": "^1.2.2", "dlv": "^1.1.3", - "fast-glob": "^3.2.12", + "fast-glob": "^3.3.0", "glob-parent": "^6.0.2", "is-glob": "^4.0.3", - "jiti": "^1.18.2", + "jiti": "^1.21.0", "lilconfig": "^2.1.0", "micromatch": "^4.0.5", "normalize-path": "^3.0.0", @@ -3566,7 +4253,6 @@ "postcss-load-config": "^4.0.1", "postcss-nested": "^6.0.1", "postcss-selector-parser": "^6.0.11", - "postcss-value-parser": "^4.2.0", "resolve": "^1.22.2", "sucrase": "^3.32.0" }, @@ -3578,23 +4264,22 @@ "node": ">=14.0.0" } }, - "node_modules/tailwindcss/node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "node_modules/tailwindcss/node_modules/lilconfig": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.1.0.tgz", + "integrity": "sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==", "dev": true, - "dependencies": { - "is-glob": "^4.0.3" - }, + "license": "MIT", "engines": { - "node": ">=10.13.0" + "node": ">=10" } }, "node_modules/tailwindcss/node_modules/postcss-selector-parser": { - "version": "6.0.13", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.13.tgz", - "integrity": "sha512-EaV1Gl4mUEV4ddhDnv/xtj7sxwrwxdetHdWUGnT4VJQf+4d05v6lHYZr8N573k5Z0BViss7BDhfWtKS3+sfAqQ==", + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.2.tgz", + "integrity": "sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==", "dev": true, + "license": "MIT", "dependencies": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" @@ -3607,13 +4292,15 @@ "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/thenify": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", "dev": true, + "license": "MIT", "dependencies": { "any-promise": "^1.0.0" } @@ -3623,6 +4310,7 @@ "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", "dev": true, + "license": "MIT", "dependencies": { "thenify": ">= 3.1.0 < 4" }, @@ -3630,11 +4318,30 @@ "node": ">=0.8" } }, + "node_modules/tiny-glob": { + "version": "0.2.9", + "resolved": "https://registry.npmjs.org/tiny-glob/-/tiny-glob-0.2.9.tgz", + "integrity": "sha512-g/55ssRPUjShh+xkfx9UPDXqhckHEsHr4Vd9zX55oSdGZc/MD0m3sferOkwWtp98bv+kcVfEHtRJgBVJzelrzg==", + "dev": true, + "license": "MIT", + "dependencies": { + "globalyzer": "0.1.0", + "globrex": "^0.1.2" + } + }, + "node_modules/tinyexec": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.1.tgz", + "integrity": "sha512-WiCJLEECkO18gwqIp6+hJg0//p23HXp4S+gGtAKu3mI2F2/sXC4FvHvXvB0zJVVaTPhx1/tOwdbRsa1sOBIKqQ==", + "dev": true, + "license": "MIT" + }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, + "license": "MIT", "dependencies": { "is-number": "^7.0.0" }, @@ -3647,6 +4354,7 @@ "resolved": "https://registry.npmjs.org/totalist/-/totalist-3.0.1.tgz", "integrity": "sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -3655,19 +4363,22 @@ "version": "0.1.13", "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==", - "dev": true + "dev": true, + "license": "Apache-2.0" }, "node_modules/tslib": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.0.tgz", - "integrity": "sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA==", - "dev": true + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.0.tgz", + "integrity": "sha512-jWVzBLplnCmoaTr13V9dYbiQ99wvZRd0vNWaDRg+aVYRcjDF3nDksxFDE/+fkXnKhpnUUkmx5pK/v8mCtLVqZA==", + "dev": true, + "license": "0BSD" }, "node_modules/tsutils": { "version": "3.21.0", "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", "dev": true, + "license": "MIT", "dependencies": { "tslib": "^1.8.1" }, @@ -3682,13 +4393,15 @@ "version": "1.14.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true + "dev": true, + "license": "0BSD" }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", "dev": true, + "license": "MIT", "dependencies": { "prelude-ls": "^1.2.1" }, @@ -3701,6 +4414,7 @@ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true, + "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=10" }, @@ -3713,6 +4427,7 @@ "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.4.tgz", "integrity": "sha512-9ia/jWHIEbo49HfjrLGfKbZSuWo9iTMwXO+Ca3pRsSpbsMbc7/IU8NKdCZVRRBafVPGnoJeFL76ZOAA84I9fEg==", "dev": true, + "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -3721,28 +4436,53 @@ "node": ">=4.2.0" } }, + "node_modules/ufo": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.5.4.tgz", + "integrity": "sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ==", + "dev": true, + "license": "MIT" + }, "node_modules/undici": { - "version": "5.22.1", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.22.1.tgz", - "integrity": "sha512-Ji2IJhFXZY0x/0tVBXeQwgPlLWw13GVzpsWPQ3rV50IFMMof2I55PZZxtm4P6iNq+L5znYN9nSTAq0ZyE6lSJw==", + "version": "5.28.4", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.4.tgz", + "integrity": "sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g==", "dev": true, + "license": "MIT", "dependencies": { - "busboy": "^1.6.0" + "@fastify/busboy": "^2.0.0" }, "engines": { "node": ">=14.0" } }, + "node_modules/undici-types": { + "version": "6.19.8", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", + "dev": true, + "license": "MIT" + }, "node_modules/unplugin": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/unplugin/-/unplugin-1.3.2.tgz", - "integrity": "sha512-Lh7/2SryjXe/IyWqx9K7IKwuKhuOFZEhotiBquOODsv2IVyDkI9lv/XhgfjdXf/xdbv32txmnBNnC/JVTDJlsA==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/unplugin/-/unplugin-1.14.1.tgz", + "integrity": "sha512-lBlHbfSFPToDYp9pjXlUEFVxYLaue9f9T1HC+4OHlmj+HnMDdz9oZY+erXfoCe/5V/7gKUSY2jpXPb9S7f0f/w==", "dev": true, + "license": "MIT", "dependencies": { - "acorn": "^8.9.0", - "chokidar": "^3.5.3", - "webpack-sources": "^3.2.3", - "webpack-virtual-modules": "^0.5.0" + "acorn": "^8.12.1", + "webpack-virtual-modules": "^0.6.2" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "webpack-sources": "^3" + }, + "peerDependenciesMeta": { + "webpack-sources": { + "optional": true + } } }, "node_modules/unplugin-icons": { @@ -3750,6 +4490,7 @@ "resolved": "https://registry.npmjs.org/unplugin-icons/-/unplugin-icons-0.14.15.tgz", "integrity": "sha512-J6YBA+fUzVM2IZPXCK3Pnk36jYVwQ6lkjRgOnZaXNIxpMDsmwDqrE1AGJ0zUbfuEoOa90OBGc0OPfN1r+qlSIQ==", "dev": true, + "license": "MIT", "dependencies": { "@antfu/install-pkg": "^0.1.1", "@antfu/utils": "^0.7.2", @@ -3784,9 +4525,9 @@ } }, "node_modules/update-browserslist-db": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz", - "integrity": "sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz", + "integrity": "sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==", "dev": true, "funding": [ { @@ -3802,9 +4543,10 @@ "url": "https://github.com/sponsors/ai" } ], + "license": "MIT", "dependencies": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" + "escalade": "^3.2.0", + "picocolors": "^1.1.0" }, "bin": { "update-browserslist-db": "cli.js" @@ -3818,6 +4560,7 @@ "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "punycode": "^2.1.0" } @@ -3826,17 +4569,19 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/vite": { - "version": "4.3.9", - "resolved": "https://registry.npmjs.org/vite/-/vite-4.3.9.tgz", - "integrity": "sha512-qsTNZjO9NoJNW7KnOrgYwczm0WctJ8m/yqYAMAK9Lxt4SoySUfS5S8ia9K7JHpa3KEeMfyF8LoJ3c5NeBJy6pg==", + "version": "4.5.5", + "resolved": "https://registry.npmjs.org/vite/-/vite-4.5.5.tgz", + "integrity": "sha512-ifW3Lb2sMdX+WU91s3R0FyQlAyLxOzCSCP37ujw0+r5POeHPwe6udWVIElKQq8gk3t7b8rkmvqC6IHBpCff4GQ==", "dev": true, + "license": "MIT", "dependencies": { - "esbuild": "^0.17.5", - "postcss": "^8.4.23", - "rollup": "^3.21.0" + "esbuild": "^0.18.10", + "postcss": "^8.4.27", + "rollup": "^3.27.1" }, "bin": { "vite": "bin/vite.js" @@ -3844,12 +4589,16 @@ "engines": { "node": "^14.18.0 || >=16.0.0" }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, "optionalDependencies": { "fsevents": "~2.3.2" }, "peerDependencies": { "@types/node": ">= 14", "less": "*", + "lightningcss": "^1.21.0", "sass": "*", "stylus": "*", "sugarss": "*", @@ -3862,6 +4611,9 @@ "less": { "optional": true }, + "lightningcss": { + "optional": true + }, "sass": { "optional": true }, @@ -3877,12 +4629,13 @@ } }, "node_modules/vitefu": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/vitefu/-/vitefu-0.2.4.tgz", - "integrity": "sha512-fanAXjSaf9xXtOOeno8wZXIhgia+CZury481LsDaV++lSvcU2R9Ch2bPh3PYFyoHW+w9LqAeYRISVQjUIew14g==", + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/vitefu/-/vitefu-0.2.5.tgz", + "integrity": "sha512-SgHtMLoqaeeGnd2evZ849ZbACbnwQCIwRH57t18FxcXoZop0uQu0uzlIhJBlF/eWVzuce0sHeqPcDo+evVcg8Q==", "dev": true, + "license": "MIT", "peerDependencies": { - "vite": "^3.0.0 || ^4.0.0" + "vite": "^3.0.0 || ^4.0.0 || ^5.0.0" }, "peerDependenciesMeta": { "vite": { @@ -3894,34 +4647,29 @@ "version": "1.7.0", "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz", "integrity": "sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/vscode-textmate": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-5.2.0.tgz", "integrity": "sha512-Uw5ooOQxRASHgu6C7GVvUxisKXfSgW4oFlO+aa+PAkgmH89O3CXxEEzNRNtHSqtXFTl0nAC1uYj0GMSH27uwtQ==", - "dev": true - }, - "node_modules/webpack-sources": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", - "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", "dev": true, - "engines": { - "node": ">=10.13.0" - } + "license": "MIT" }, "node_modules/webpack-virtual-modules": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/webpack-virtual-modules/-/webpack-virtual-modules-0.5.0.tgz", - "integrity": "sha512-kyDivFZ7ZM0BVOUteVbDFhlRt7Ah/CSPwJdi8hBpkK7QLumUqdLtVfm/PX/hkcnrvr0i77fO5+TjZ94Pe+C9iw==", - "dev": true + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/webpack-virtual-modules/-/webpack-virtual-modules-0.6.2.tgz", + "integrity": "sha512-66/V2i5hQanC51vBQKPH4aI8NMAcBW59FVBs+rC7eGHupMyfn34q7rZIE+ETlJ+XTevqfUhVVBgSUNSW2flEUQ==", + "dev": true, + "license": "MIT" }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, + "license": "ISC", "dependencies": { "isexe": "^2.0.0" }, @@ -3932,23 +4680,133 @@ "node": ">= 8" } }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/wrap-ansi-cjs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true - }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/yaml": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.1.tgz", - "integrity": "sha512-2eHWfjaoXgTBC2jNM1LRef62VQa0umtvRiDSk6HSzW7RvS5YtkabJrwYLLEKWBc8a5U2PTSCs+dJjUTJdlHsWQ==", + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.6.0.tgz", + "integrity": "sha512-a6ae//JvKDEra2kdi1qzCyrJW/WZCgFi8ydDV+eXExl95t+5R+ijnqHJbz9tmMh8FUjx3iv2fCQ4dclAQlO2UQ==", "dev": true, + "license": "ISC", + "bin": { + "yaml": "bin.mjs" + }, "engines": { "node": ">= 14" } @@ -3958,6 +4816,7 @@ "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -3966,4 +4825,4 @@ } } } -} +} \ No newline at end of file diff --git a/docs/package.json b/docs/package.json index 0a144dd..b520bb6 100644 --- a/docs/package.json +++ b/docs/package.json @@ -35,13 +35,13 @@ "prettier-plugin-svelte": "^2.10.1", "shiki": "^0.10.1", "svelte": "^3.54.0", - "svelte-check": "^2.2.6", + "svelte-check": "^4.0.5", "svelte-headless-table": "^0.17.3", "svelte-preprocess": "^4.10.1", "tailwindcss": "^3.3.2", "tslib": "^2.3.1", "typescript": "~4.6.2", "unplugin-icons": "^0.14.7", - "vite": "^4.0.0" + "vite": "^5.4.10" } } diff --git a/docs/src/app.html b/docs/src/app.html index 91162ca..baf61f8 100644 --- a/docs/src/app.html +++ b/docs/src/app.html @@ -1,4 +1,4 @@ - + diff --git a/docs/src/app.postcss b/docs/src/app.postcss index 28d33f2..3171d9a 100644 --- a/docs/src/app.postcss +++ b/docs/src/app.postcss @@ -24,4 +24,3 @@ @apply italic; } } - diff --git a/docs/src/lib/styles/kit-docs.css b/docs/src/lib/styles/kit-docs.css index 9385ba0..32ff48f 100644 --- a/docs/src/lib/styles/kit-docs.css +++ b/docs/src/lib/styles/kit-docs.css @@ -14,9 +14,9 @@ font-size: 16px; scroll-padding-top: 6rem; - --kd-font-family-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, - 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', - 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'; + --kd-font-family-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', + Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', + 'Segoe UI Symbol', 'Noto Color Emoji'; --kd-font-family-mono: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation, Mono, Fira Code VF, monospace; @@ -82,4 +82,4 @@ --kd-terminal-line-pointer: rgb(var(--kd-color-brand)); --kd-code-highlight-border: rgb(var(--kd-color-brand)); --kd-code-highlight-color: rgb(var(--kd-color-brand) / 0.08); -} \ No newline at end of file +} diff --git a/docs/src/routes/+page.md b/docs/src/routes/+page.md index ae3e2fa..8ce097d 100644 --- a/docs/src/routes/+page.md +++ b/docs/src/routes/+page.md @@ -1,4 +1,5 @@ + Svelte Headless Table | Bryan Lee diff --git a/docs/src/routes/docs/[...2]api/[...13]body-cell/+page.md b/docs/src/routes/docs/[...2]api/[...13]body-cell/+page.md index 06fffcd..6a7d114 100644 --- a/docs/src/routes/docs/[...2]api/[...13]body-cell/+page.md +++ b/docs/src/routes/docs/[...2]api/[...13]body-cell/+page.md @@ -71,7 +71,6 @@ Returns `true` if the body cell is an instance of [`DataBodyCell`](#databodycell Returns `true` if the body cell is an instance of [`DisplayBodyCell`](#displaybodycell). -
# Variants diff --git a/docs/src/routes/docs/[...2]api/[...4]create-view-model/+page.md b/docs/src/routes/docs/[...2]api/[...4]create-view-model/+page.md index 3955f74..798b73a 100644 --- a/docs/src/routes/docs/[...2]api/[...4]create-view-model/+page.md +++ b/docs/src/routes/docs/[...2]api/[...4]create-view-model/+page.md @@ -43,4 +43,4 @@ Defines a custom [`dataId`](../body-row.md#dataid-string) for each row. In the context of sub-rows, the `index` of the first sub-row is `0`. ::: -_Defaults to the item index_. \ No newline at end of file +_Defaults to the item index_. diff --git a/docs/src/routes/docs/[...3]plugins/[...2]add-sort-by/+page.md b/docs/src/routes/docs/[...3]plugins/[...2]add-sort-by/+page.md index 7541c95..fb28da9 100644 --- a/docs/src/routes/docs/[...3]plugins/[...2]add-sort-by/+page.md +++ b/docs/src/routes/docs/[...3]plugins/[...2]add-sort-by/+page.md @@ -89,7 +89,7 @@ If `leftValue` should come before `rightValue`, return a negative number. If `rightValue` should come before `leftValue`, return a positive number. -Otherwise if both values are equal in sorting priority, return 0. +Otherwise if both values are equal in sorting priority, return 0. ### `getSortValue?: (value) => string | number | (string | number)[]` diff --git a/docs/tailwind.config.cjs b/docs/tailwind.config.cjs index 5295dd1..8d6f341 100644 --- a/docs/tailwind.config.cjs +++ b/docs/tailwind.config.cjs @@ -2,7 +2,7 @@ module.exports = { content: [ './src/**/*.{html,js,svelte,ts,md}', - './node_modules/@svelteness/kit-docs/client/**/*.svelte' + './node_modules/@svelteness/kit-docs/client/**/*.svelte', ], darkMode: 'class', corePlugins: { @@ -44,11 +44,7 @@ module.exports = { typography: kitDocsTypography, }, }, - plugins: [ - require('@tailwindcss/typography'), - kitDocsVariants, - require('./tailwindcss/size.cjs') - ], + plugins: [require('@tailwindcss/typography'), kitDocsVariants, require('./tailwindcss/size.cjs')], }; function kitDocsVariants({ addVariant }) { @@ -233,4 +229,4 @@ function kitDocsTypography(theme) { }, }, }; -} \ No newline at end of file +} diff --git a/package-lock.json b/package-lock.json index 646ba28..28b24c9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,267 +1,112 @@ { - "name": "svelte-headless-table", - "version": "0.18.2", + "name": "@humanspeak/svelte-headless-table", + "version": "1.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "svelte-headless-table", - "version": "0.18.2", + "name": "@humanspeak/svelte-headless-table", + "version": "1.0.0", "license": "MIT", "dependencies": { - "svelte-keyed": "^2.0.0", - "svelte-render": "^2.0.1", - "svelte-subscribe": "^2.0.1" + "@humanspeak/svelte-keyed": "^3.0.0", + "@humanspeak/svelte-render": "^3.0.0", + "@humanspeak/svelte-subscribe": "^3.0.0" }, "devDependencies": { - "@sveltejs/adapter-auto": "^3.0.0", - "@sveltejs/kit": "^2.0.0", - "@sveltejs/package": "^2.0.0", - "@sveltejs/vite-plugin-svelte": "^3.0.0", - "@testing-library/jest-dom": "^6.1.6", - "@testing-library/svelte": "^4.0.5", - "@types/eslint": "8.56.0", - "@types/faker": "^5.5.9", - "@typescript-eslint/eslint-plugin": "^6.0.0", - "@typescript-eslint/parser": "^6.0.0", - "@vitest/coverage-v8": "^1.1.1", - "eslint": "^8.56.0", + "@sveltejs/adapter-auto": "^3.3.1", + "@sveltejs/kit": "^2.7.3", + "@sveltejs/package": "^2.3.7", + "@sveltejs/vite-plugin-svelte": "^4.0.0", + "@testing-library/jest-dom": "^6.6.2", + "@testing-library/svelte": "^5.2.4", + "@types/eslint": "9.6.1", + "@types/faker": "^6.6.11", + "@typescript-eslint/eslint-plugin": "^8.11.0", + "@typescript-eslint/parser": "^8.11.0", + "@vitest/coverage-v8": "^2.1.3", + "eslint": "^9.13.0", "eslint-config-prettier": "^9.1.0", - "eslint-plugin-svelte": "^2.35.1", - "faker": "^5.5.3", - "prettier": "^3.1.1", - "prettier-plugin-svelte": "^3.1.2", - "publint": "^0.1.9", - "svelte": "^4.2.7", - "svelte-check": "^3.6.0", - "tslib": "^2.4.1", - "typescript": "^5.0.0", - "vite": "^5.0.3", - "vitest": "^1.0.0" + "eslint-plugin-svelte": "^2.46.0", + "faker": "^6.6.6", + "prettier": "^3.3.3", + "prettier-plugin-svelte": "^3.2.7", + "publint": "^0.2.12", + "svelte": "^5.1.3", + "svelte-check": "^4.0.5", + "tslib": "^2.8.0", + "typescript": "^5.6.3", + "vite": "^5.4.10", + "vitest": "^2.1.3" }, "peerDependencies": { - "svelte": "^4.0.0" - } - }, - "node_modules/@aashutoshrathi/word-wrap": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", - "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", - "dev": true, - "engines": { - "node": ">=0.10.0" + "svelte": "^5" } }, "node_modules/@adobe/css-tools": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.3.2.tgz", - "integrity": "sha512-DA5a1C0gD/pLOvhv33YMrbf2FK3oUzwNl9oOJqE4XVjuEtt6XIakRcsd7eLiOSPkp1kTRQGICTA8cKra/vFbjw==", - "dev": true + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.4.0.tgz", + "integrity": "sha512-Ff9+ksdQQB3rMncgqDK78uLznstjyfIf2Arnh22pW8kBpLs6rpKDwgnZT46hin5Hl1WzazzK64DOrhSwYpS7bQ==", + "dev": true, + "license": "MIT" }, "node_modules/@ampproject/remapping": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", - "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", + "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", + "license": "Apache-2.0", "dependencies": { - "@jridgewell/gen-mapping": "^0.3.0", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" }, "engines": { "node": ">=6.0.0" } }, "node_modules/@babel/code-frame": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz", - "integrity": "sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.0.tgz", + "integrity": "sha512-INCKxTtbXtcNbUZ3YXutwMpEleqttcswhAdee7dhuoVrD2cnuc3PqtERBtxkX5nziX9vnBL8WXmSGwv8CuPV6g==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/highlight": "^7.23.4", - "chalk": "^2.4.2" + "@babel/helper-validator-identifier": "^7.25.9", + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/code-frame/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/code-frame/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/code-frame/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/@babel/code-frame/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "node_modules/@babel/code-frame/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/@babel/code-frame/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/code-frame/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/@babel/helper-string-parser": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz", - "integrity": "sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz", + "integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==", "dev": true, + "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", - "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/highlight": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.23.4.tgz", - "integrity": "sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", + "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", "dev": true, - "dependencies": { - "@babel/helper-validator-identifier": "^7.22.20", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0" - }, + "license": "MIT", "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/highlight/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/@babel/highlight/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "node_modules/@babel/highlight/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/@babel/highlight/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "node_modules/@babel/parser": { + "version": "7.26.1", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.1.tgz", + "integrity": "sha512-reoQYNiAJreZNsJzyrDNzFQ+IQ5JFiIzAHJg9bn94S3l+4++J7RsIhNMoB+lgP/9tpmiAQqspv+xfdxTSzREOw==", "dev": true, + "license": "MIT", "dependencies": { - "has-flag": "^3.0.0" + "@babel/types": "^7.26.0" }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/parser": { - "version": "7.23.6", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.6.tgz", - "integrity": "sha512-Z2uID7YJ7oNvAI20O9X0bblw7Qqs8Q2hFy0R9tAfnfLkp5MW0UH9eUvnDSnFwKZ0AvgS1ucqR4KzvVHgnke1VQ==", - "dev": true, "bin": { "parser": "bin/babel-parser.js" }, @@ -270,10 +115,11 @@ } }, "node_modules/@babel/runtime": { - "version": "7.23.7", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.7.tgz", - "integrity": "sha512-w06OXVOFso7LcbzMiDGt+3X7Rh7Ho8MmgPoWU3rarH+8upf+wSU/grlGbWzQyr3DkdN6ZeuMFjpdwW0Q+HxobA==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.26.0.tgz", + "integrity": "sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw==", "dev": true, + "license": "MIT", "dependencies": { "regenerator-runtime": "^0.14.0" }, @@ -282,14 +128,14 @@ } }, "node_modules/@babel/types": { - "version": "7.23.6", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.6.tgz", - "integrity": "sha512-+uarb83brBzPKN38NX1MkB6vb6+mwvR6amUulqAE7ccQw1pEl+bCia9TbdG1lsnFP7lZySvUn37CHyXQdfTwzg==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.0.tgz", + "integrity": "sha512-Z/yiTPj+lDVnF7lWeKCIJzaIkI0vYO87dMpZ4bg4TDrFe4XXLFWL1TbXU27gBP3QccxV9mZICCrnjnYlJjXHOA==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-string-parser": "^7.23.4", - "@babel/helper-validator-identifier": "^7.22.20", - "to-fast-properties": "^2.0.0" + "@babel/helper-string-parser": "^7.25.9", + "@babel/helper-validator-identifier": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -299,16 +145,18 @@ "version": "0.2.3", "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@esbuild/aix-ppc64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.19.11.tgz", - "integrity": "sha512-FnzU0LyE3ySQk7UntJO4+qIiQgI7KoODnZg5xzXIrFJlKd2P2gwHsHY4927xj9y5PJmJSzULiUCWmv7iWnNa7g==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", + "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==", "cpu": [ "ppc64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "aix" @@ -318,13 +166,14 @@ } }, "node_modules/@esbuild/android-arm": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.11.tgz", - "integrity": "sha512-5OVapq0ClabvKvQ58Bws8+wkLCV+Rxg7tUVbo9xu034Nm536QTII4YzhaFriQ7rMrorfnFKUsArD2lqKbFY4vw==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz", + "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==", "cpu": [ "arm" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "android" @@ -334,13 +183,14 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.11.tgz", - "integrity": "sha512-aiu7K/5JnLj//KOnOfEZ0D90obUkRzDMyqd/wNAUQ34m4YUPVhRZpnqKV9uqDGxT7cToSDnIHsGooyIczu9T+Q==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz", + "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "android" @@ -350,13 +200,14 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.11.tgz", - "integrity": "sha512-eccxjlfGw43WYoY9QgB82SgGgDbibcqyDTlk3l3C0jOVHKxrjdc9CTwDUQd0vkvYg5um0OH+GpxYvp39r+IPOg==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz", + "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "android" @@ -366,13 +217,14 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.11.tgz", - "integrity": "sha512-ETp87DRWuSt9KdDVkqSoKoLFHYTrkyz2+65fj9nfXsaV3bMhTCjtQfw3y+um88vGRKRiF7erPrh/ZuIdLUIVxQ==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz", + "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "darwin" @@ -382,13 +234,14 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.11.tgz", - "integrity": "sha512-fkFUiS6IUK9WYUO/+22omwetaSNl5/A8giXvQlcinLIjVkxwTLSktbF5f/kJMftM2MJp9+fXqZ5ezS7+SALp4g==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz", + "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "darwin" @@ -398,13 +251,14 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.11.tgz", - "integrity": "sha512-lhoSp5K6bxKRNdXUtHoNc5HhbXVCS8V0iZmDvyWvYq9S5WSfTIHU2UGjcGt7UeS6iEYp9eeymIl5mJBn0yiuxA==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz", + "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "freebsd" @@ -414,13 +268,14 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.11.tgz", - "integrity": "sha512-JkUqn44AffGXitVI6/AbQdoYAq0TEullFdqcMY/PCUZ36xJ9ZJRtQabzMA+Vi7r78+25ZIBosLTOKnUXBSi1Kw==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz", + "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "freebsd" @@ -430,13 +285,14 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.11.tgz", - "integrity": "sha512-3CRkr9+vCV2XJbjwgzjPtO8T0SZUmRZla+UL1jw+XqHZPkPgZiyWvbDvl9rqAN8Zl7qJF0O/9ycMtjU67HN9/Q==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz", + "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==", "cpu": [ "arm" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -446,13 +302,14 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.11.tgz", - "integrity": "sha512-LneLg3ypEeveBSMuoa0kwMpCGmpu8XQUh+mL8XXwoYZ6Be2qBnVtcDI5azSvh7vioMDhoJFZzp9GWp9IWpYoUg==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz", + "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -462,13 +319,14 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.11.tgz", - "integrity": "sha512-caHy++CsD8Bgq2V5CodbJjFPEiDPq8JJmBdeyZ8GWVQMjRD0sU548nNdwPNvKjVpamYYVL40AORekgfIubwHoA==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz", + "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==", "cpu": [ "ia32" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -478,13 +336,14 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.11.tgz", - "integrity": "sha512-ppZSSLVpPrwHccvC6nQVZaSHlFsvCQyjnvirnVjbKSHuE5N24Yl8F3UwYUUR1UEPaFObGD2tSvVKbvR+uT1Nrg==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz", + "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==", "cpu": [ "loong64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -494,13 +353,14 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.11.tgz", - "integrity": "sha512-B5x9j0OgjG+v1dF2DkH34lr+7Gmv0kzX6/V0afF41FkPMMqaQ77pH7CrhWeR22aEeHKaeZVtZ6yFwlxOKPVFyg==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz", + "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==", "cpu": [ "mips64el" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -510,13 +370,14 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.11.tgz", - "integrity": "sha512-MHrZYLeCG8vXblMetWyttkdVRjQlQUb/oMgBNurVEnhj4YWOr4G5lmBfZjHYQHHN0g6yDmCAQRR8MUHldvvRDA==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz", + "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==", "cpu": [ "ppc64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -526,13 +387,14 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.11.tgz", - "integrity": "sha512-f3DY++t94uVg141dozDu4CCUkYW+09rWtaWfnb3bqe4w5NqmZd6nPVBm+qbz7WaHZCoqXqHz5p6CM6qv3qnSSQ==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz", + "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==", "cpu": [ "riscv64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -542,13 +404,14 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.11.tgz", - "integrity": "sha512-A5xdUoyWJHMMlcSMcPGVLzYzpcY8QP1RtYzX5/bS4dvjBGVxdhuiYyFwp7z74ocV7WDc0n1harxmpq2ePOjI0Q==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz", + "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==", "cpu": [ "s390x" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -558,13 +421,14 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.11.tgz", - "integrity": "sha512-grbyMlVCvJSfxFQUndw5mCtWs5LO1gUlwP4CDi4iJBbVpZcqLVT29FxgGuBJGSzyOxotFG4LoO5X+M1350zmPA==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz", + "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -574,13 +438,14 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.11.tgz", - "integrity": "sha512-13jvrQZJc3P230OhU8xgwUnDeuC/9egsjTkXN49b3GcS5BKvJqZn86aGM8W9pd14Kd+u7HuFBMVtrNGhh6fHEQ==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz", + "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "netbsd" @@ -590,13 +455,14 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.11.tgz", - "integrity": "sha512-ysyOGZuTp6SNKPE11INDUeFVVQFrhcNDVUgSQVDzqsqX38DjhPEPATpid04LCoUr2WXhQTEZ8ct/EgJCUDpyNw==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz", + "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "openbsd" @@ -606,13 +472,14 @@ } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.11.tgz", - "integrity": "sha512-Hf+Sad9nVwvtxy4DXCZQqLpgmRTQqyFyhT3bZ4F2XlJCjxGmRFF0Shwn9rzhOYRB61w9VMXUkxlBy56dk9JJiQ==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz", + "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "sunos" @@ -622,13 +489,14 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.11.tgz", - "integrity": "sha512-0P58Sbi0LctOMOQbpEOvOL44Ne0sqbS0XWHMvvrg6NE5jQ1xguCSSw9jQeUk2lfrXYsKDdOe6K+oZiwKPilYPQ==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz", + "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" @@ -638,13 +506,14 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.11.tgz", - "integrity": "sha512-6YOrWS+sDJDmshdBIQU+Uoyh7pQKrdykdefC1avn76ss5c+RN6gut3LZA4E2cH5xUEp5/cA0+YxRaVtRAb0xBg==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz", + "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==", "cpu": [ "ia32" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" @@ -654,13 +523,14 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.11.tgz", - "integrity": "sha512-vfkhltrjCAb603XaFhqhAF4LGDi2M4OrCRrFusyQ+iTLQ/o60QQXxc9cZC/FFpihBI9N1Grn6SMKVJ4KP7Fuiw==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz", + "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" @@ -670,39 +540,94 @@ } }, "node_modules/@eslint-community/eslint-utils": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", - "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.1.tgz", + "integrity": "sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==", "dev": true, + "license": "MIT", "dependencies": { - "eslint-visitor-keys": "^3.3.0" + "eslint-visitor-keys": "^3.4.3" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, + "funding": { + "url": "https://opencollective.com/eslint" + }, "peerDependencies": { "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" } }, "node_modules/@eslint-community/regexpp": { - "version": "4.10.0", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz", - "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==", + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.0.tgz", + "integrity": "sha512-gh7PdNombP8ftL8TinYC8Xd7WEypB8EKV4PI2h0eMzndKjPCXuo2zUiZtD2Hu+MSPt02Ty2MdS788ADl9ai1rA==", "dev": true, + "license": "MIT", "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, + "node_modules/@eslint/config-array": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.18.0.tgz", + "integrity": "sha512-fTxvnS1sRMu3+JjXwJG0j/i4RT9u4qJ+lqS/yCGap4lH4zZGzQ7tu+xZqQmcMZq5OBZDL4QRxQzRjkWcGt8IVw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/object-schema": "^2.1.4", + "debug": "^4.3.1", + "minimatch": "^3.1.2" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/config-array/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@eslint/config-array/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@eslint/core": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.7.0.tgz", + "integrity": "sha512-xp5Jirz5DyPYlPiKat8jaq0EmYvDXKKpzTbxXMpT9eqlRJkRKIz9AGMdlvYjih+im+QlhWrpvVjl8IPC/lHlUw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, "node_modules/@eslint/eslintrc": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", - "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.1.0.tgz", + "integrity": "sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==", "dev": true, + "license": "MIT", "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", + "espree": "^10.0.1", + "globals": "^14.0.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", @@ -710,7 +635,7 @@ "strip-json-comments": "^3.1.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -721,6 +646,7 @@ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -731,6 +657,7 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -739,48 +666,90 @@ } }, "node_modules/@eslint/js": { - "version": "8.56.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.56.0.tgz", - "integrity": "sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==", + "version": "9.13.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.13.0.tgz", + "integrity": "sha512-IFLyoY4d72Z5y/6o/BazFBezupzI/taV8sGumxTAVw3lXG9A6md1Dc34T9s1FoD/an9pJH8RHbAxsaEbBed9lA==", "dev": true, + "license": "MIT", "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/object-schema": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.4.tgz", + "integrity": "sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, - "node_modules/@humanwhocodes/config-array": { - "version": "0.11.13", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.13.tgz", - "integrity": "sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==", + "node_modules/@eslint/plugin-kit": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.1.tgz", + "integrity": "sha512-HFZ4Mp26nbWk9d/BpvP0YNL6W4UoZF0VFcTw/aPPA8RpOxeFQgK+ClABGgAUXs9Y/RGX/l1vOmrqz1MQt9MNuw==", "dev": true, + "license": "Apache-2.0", "dependencies": { - "@humanwhocodes/object-schema": "^2.0.1", - "debug": "^4.1.1", - "minimatch": "^3.0.5" + "levn": "^0.4.1" }, "engines": { - "node": ">=10.10.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, - "node_modules/@humanwhocodes/config-array/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "node_modules/@humanfs/core": { + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.0.tgz", + "integrity": "sha512-2cbWIHbZVEweE853g8jymffCA+NCMiuqeECeBBLm8dg2oFdjuGJhgN4UAbI+6v0CKbbhvtXA4qV8YR5Ji86nmw==", "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "license": "Apache-2.0", + "engines": { + "node": ">=18.18.0" } }, - "node_modules/@humanwhocodes/config-array/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "node_modules/@humanfs/node": { + "version": "0.16.5", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.5.tgz", + "integrity": "sha512-KSPA4umqSG4LHYRodq31VDwKAvaTF4xmVlzM8Aeh4PlU1JQ3IG0wiA8C25d3RQ9nJyM3mBHyI53K06VVL/oFFg==", "dev": true, + "license": "Apache-2.0", "dependencies": { - "brace-expansion": "^1.1.7" + "@humanfs/core": "^0.19.0", + "@humanwhocodes/retry": "^0.3.0" }, "engines": { - "node": "*" + "node": ">=18.18.0" + } + }, + "node_modules/@humanspeak/svelte-keyed": { + "version": "3.0.0", + "resolved": "https://npm.pkg.github.com/download/@humanspeak/svelte-keyed/3.0.0/bfc83f497323703233fd0117b038aef7b9502adb", + "integrity": "sha512-0NAGGtPtvtmvfSvj3/GWYQsPg8dcVxRYF8dfa9SPLFyBBpC8eg/snuZXfBjZI9dykxZNumFQSKhLKJE2vzn8AQ==", + "license": "MIT", + "peerDependencies": { + "svelte": "^5.1.3" + } + }, + "node_modules/@humanspeak/svelte-render": { + "version": "3.0.0", + "resolved": "https://npm.pkg.github.com/download/@humanspeak/svelte-render/3.0.0/9f62d5ddb89dbbadcd98df1c3427a461df3a64d3", + "integrity": "sha512-LK622YawThsDnI+ehXzGstEYgYv/1bl94DKw3ihHbaxUR2A32vIW17fPa70uyv8+L+NyHNhG6CB+c1Apgr2Q2g==", + "license": "MIT", + "dependencies": { + "@humanspeak/svelte-subscribe": "^3.0.0" + }, + "peerDependencies": { + "svelte": "^5.0.0" + } + }, + "node_modules/@humanspeak/svelte-subscribe": { + "version": "3.0.0", + "resolved": "https://npm.pkg.github.com/download/@humanspeak/svelte-subscribe/3.0.0/d14aacddbab778157e33dda49954e6dd33b0c40e", + "integrity": "sha512-JfUIO6QDv5YiOikWheH5ZUVq86UdySc1i/IMVzsLe5lXRKbVkxh4O27PVVwxZ9rW5+bdf+AbWPwJGrHLwJvfAw==", + "license": "MIT", + "peerDependencies": { + "svelte": "^5.0.0" } }, "node_modules/@humanwhocodes/module-importer": { @@ -788,6 +757,7 @@ "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", "dev": true, + "license": "Apache-2.0", "engines": { "node": ">=12.22" }, @@ -796,71 +766,91 @@ "url": "https://github.com/sponsors/nzakas" } }, - "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz", - "integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==", - "dev": true - }, - "node_modules/@istanbuljs/schema": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", - "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "node_modules/@humanwhocodes/retry": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz", + "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==", "dev": true, + "license": "Apache-2.0", "engines": { - "node": ">=8" + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" } }, - "node_modules/@jest/schemas": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", - "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", "dev": true, + "license": "ISC", "dependencies": { - "@sinclair/typebox": "^0.27.8" + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=12" + } + }, + "node_modules/@istanbuljs/schema": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" } }, "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", - "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", + "license": "MIT", "dependencies": { - "@jridgewell/set-array": "^1.0.1", + "@jridgewell/set-array": "^1.2.1", "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/trace-mapping": "^0.3.24" }, "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", - "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "license": "MIT", "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/set-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", + "license": "MIT", "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "license": "MIT" }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.20", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz", - "integrity": "sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==", + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "license": "MIT", "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" @@ -871,6 +861,7 @@ "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", "dev": true, + "license": "MIT", "dependencies": { "@nodelib/fs.stat": "2.0.5", "run-parallel": "^1.1.9" @@ -884,6 +875,7 @@ "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", "dev": true, + "license": "MIT", "engines": { "node": ">= 8" } @@ -893,6 +885,7 @@ "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", "dev": true, + "license": "MIT", "dependencies": { "@nodelib/fs.scandir": "2.1.5", "fastq": "^1.6.0" @@ -901,216 +894,294 @@ "node": ">= 8" } }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=14" + } + }, "node_modules/@polka/url": { - "version": "1.0.0-next.24", - "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.24.tgz", - "integrity": "sha512-2LuNTFBIO0m7kKIQvvPHN6UE63VjpmL9rnEEaOOaiSPbZK+zUOYIzBAWcED+3XYzhYsd/0mD57VdxAEqqV52CQ==", - "dev": true + "version": "1.0.0-next.28", + "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.28.tgz", + "integrity": "sha512-8LduaNlMZGwdZ6qWrKlfa+2M4gahzFkprZiAt2TF8uS0qQgBizKXpXURqvTJ4WtmupWxaLqjRb2UCTe72mu+Aw==", + "dev": true, + "license": "MIT" }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.9.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.9.2.tgz", - "integrity": "sha512-RKzxFxBHq9ysZ83fn8Iduv3A283K7zPPYuhL/z9CQuyFrjwpErJx0h4aeb/bnJ+q29GRLgJpY66ceQ/Wcsn3wA==", + "version": "4.24.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.24.1.tgz", + "integrity": "sha512-j2llrtCTwNu68yp1wybgkTUW8CrR8AZvGZzIO/qwNAetVP3FHidylyz1s0dU2zXG9uqqpoUIhWKmMypGMcdM2Q==", "cpu": [ "arm" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "android" ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.9.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.9.2.tgz", - "integrity": "sha512-yZ+MUbnwf3SHNWQKJyWh88ii2HbuHCFQnAYTeeO1Nb8SyEiWASEi5dQUygt3ClHWtA9My9RQAYkjvrsZ0WK8Xg==", + "version": "4.24.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.24.1.tgz", + "integrity": "sha512-y65R3hM9sJVAXV3qh/dJ5o2OCVzwy6d994qmi+rGw1i1onYY5AoV9dREDYoizaZvc9esEqOs07CyFgPzz4DBqg==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "android" ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.9.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.9.2.tgz", - "integrity": "sha512-vqJ/pAUh95FLc/G/3+xPqlSBgilPnauVf2EXOQCZzhZJCXDXt/5A8mH/OzU6iWhb3CNk5hPJrh8pqJUPldN5zw==", + "version": "4.24.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.24.1.tgz", + "integrity": "sha512-K9iOc75U9HpDffjop9qVPwNoBEPXS0Q6RrVSvh13gs38ynurJ2+HuS7NJbsx+fwiDA+eJYfBi7sablI8G2/3oA==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "darwin" ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.9.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.9.2.tgz", - "integrity": "sha512-otPHsN5LlvedOprd3SdfrRNhOahhVBwJpepVKUN58L0RnC29vOAej1vMEaVU6DadnpjivVsNTM5eNt0CcwTahw==", + "version": "4.24.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.24.1.tgz", + "integrity": "sha512-Ufz0fX79W9937euBI4qEdh2xLb0Lzo4GiZ7xxDpueEZxWdPbow6gnTRokSzSgtqRFs1vFgcgm7Ci/KnOo15MIg==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "darwin" ] }, - "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.9.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.9.2.tgz", - "integrity": "sha512-ewG5yJSp+zYKBYQLbd1CUA7b1lSfIdo9zJShNTyc2ZP1rcPrqyZcNlsHgs7v1zhgfdS+kW0p5frc0aVqhZCiYQ==", + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.24.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.24.1.tgz", + "integrity": "sha512-IfG1khuwe10V2EBfFIrcd7P6X0stdhHQM71NyaG5TPgy6dXr2nzAa5TMNFA35tr41gihUPqp/w8StayYG7jXYw==", "cpu": [ - "arm" + "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ - "linux" + "freebsd" ] }, - "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.9.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.9.2.tgz", - "integrity": "sha512-pL6QtV26W52aCWTG1IuFV3FMPL1m4wbsRG+qijIvgFO/VBsiXJjDPE/uiMdHBAO6YcpV4KvpKtd0v3WFbaxBtg==", + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.24.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.24.1.tgz", + "integrity": "sha512-W+drJRBL1+N1/zaq+8y/CtQ3VP5wxMXwCy7obFl9r5jJ5EFNEYAqchuPfYTleYOoA46bwXAprCL+OVK3BTrWWw==", "cpu": [ - "arm64" + "arm" ], "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.24.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.24.1.tgz", + "integrity": "sha512-mKngr0zxo4FMSDqiq4F4G/1IPqjpNO7MyjAM6+YxDIADO4ZSI4m05bZYD4po12Jid6+n9YJRWdIcvi4JztMVcw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.24.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.24.1.tgz", + "integrity": "sha512-Rh12WITgvLydYFR9XAjmCRArU71nMfi5lDVLhpRV8dR2sCGtZESVkfD66mi3owp4q1scwysT35nNMPleRTQOow==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.9.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.9.2.tgz", - "integrity": "sha512-On+cc5EpOaTwPSNetHXBuqylDW+765G/oqB9xGmWU3npEhCh8xu0xqHGUA+4xwZLqBbIZNcBlKSIYfkBm6ko7g==", + "version": "4.24.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.24.1.tgz", + "integrity": "sha512-zOLu7V1iBpJMIrrmZjpmAZ9txFlnGgqQMnjNmRrqmV1vQaou9SIT3qI3JE1kt+DQE8zCdB3n2/mAjIU90AfjEg==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { + "version": "4.24.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.24.1.tgz", + "integrity": "sha512-h9ipTGhMzTBAJL/bg1HsElhGPWLGeCKE8JkxgvrJ5O/S1MXH9RxMUTl++tzlpzxdOBCAGqygZIMBj3wIDf/kJw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.9.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.9.2.tgz", - "integrity": "sha512-Wnx/IVMSZ31D/cO9HSsU46FjrPWHqtdF8+0eyZ1zIB5a6hXaZXghUKpRrC4D5DcRTZOjml2oBhXoqfGYyXKipw==", + "version": "4.24.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.24.1.tgz", + "integrity": "sha512-PNKCMA1xRBARR7/j6KXMSB1z0/eGenC/t2wdQl5et3jnrHA+igIaLVNUEPfnVjmZIZJign7u/dobvV2VkPxMiw==", "cpu": [ "riscv64" ], "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.24.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.24.1.tgz", + "integrity": "sha512-mkl3uWq/ix18gAfzBUIecSwioPyJkbR6QXVaNuOGM7Qbs7f1EfDLP4XtLSJx4GL6mO8GrKhB3cmhUc3zjUrQSg==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.9.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.9.2.tgz", - "integrity": "sha512-ym5x1cj4mUAMBummxxRkI4pG5Vht1QMsJexwGP8547TZ0sox9fCLDHw9KCH9c1FO5d9GopvkaJsBIOkTKxksdw==", + "version": "4.24.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.24.1.tgz", + "integrity": "sha512-j0RPQWteEXAAxRQI+IcX3i7WQb7hFe7CW94H3l0edBVyJMIPOlr/hqc5CGG1FBDW9gNr0ZC2IzwSta1iSNJIoA==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.9.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.9.2.tgz", - "integrity": "sha512-m0hYELHGXdYx64D6IDDg/1vOJEaiV8f1G/iO+tejvRCJNSwK4jJ15e38JQy5Q6dGkn1M/9KcyEOwqmlZ2kqaZg==", + "version": "4.24.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.24.1.tgz", + "integrity": "sha512-UrwXowd3gyT+/ijoeSzMyHHGUaV3WhiJL77eTZE8/Pq+9K6auacIJ264biAUhHJ3FjAHsXNhzEmxGnj4tpDz2g==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.9.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.9.2.tgz", - "integrity": "sha512-x1CWburlbN5JjG+juenuNa4KdedBdXLjZMp56nHFSHTOsb/MI2DYiGzLtRGHNMyydPGffGId+VgjOMrcltOksA==", + "version": "4.24.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.24.1.tgz", + "integrity": "sha512-wexHPBkBa2/tPhbGcxLqOM2AFZ7BQsZ0pk3dVxRL5Ec0SsXnkpcMucZ4j4woyoD5DbRdFP6Roptd9TRsGVTvUA==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.9.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.9.2.tgz", - "integrity": "sha512-VVzCB5yXR1QlfsH1Xw1zdzQ4Pxuzv+CPr5qpElpKhVxlxD3CRdfubAG9mJROl6/dmj5gVYDDWk8sC+j9BI9/kQ==", + "version": "4.24.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.24.1.tgz", + "integrity": "sha512-IW2axCCdiC+kgj5/50Mt5v8qG0LYaDichBGKXM4Oo2NaWStAs0oQp1dqVzCV1XOXNvNNDRFw0EaT+JMs6BX+WQ==", "cpu": [ "ia32" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.9.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.9.2.tgz", - "integrity": "sha512-SYRedJi+mweatroB+6TTnJYLts0L0bosg531xnQWtklOI6dezEagx4Q0qDyvRdK+qgdA3YZpjjGuPFtxBmddBA==", + "version": "4.24.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.24.1.tgz", + "integrity": "sha512-b9IK2buRXwm7owl4Hd8fselCQ7/gr2WaErv0e/IPgRQuJfFS+O0cFJA4t13+FKAZeQh97iEyBG06g613IJLirQ==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" ] }, - "node_modules/@sinclair/typebox": { - "version": "0.27.8", - "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", - "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", - "dev": true - }, "node_modules/@sveltejs/adapter-auto": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@sveltejs/adapter-auto/-/adapter-auto-3.0.1.tgz", - "integrity": "sha512-OpilmvRN136lUgOa9F0zpSI6g+PouOmk+YvJQrB+/hAtllLghjjYuoyfUsrF7U6oJ52cxCtAJTPXgZdyyCffrQ==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/@sveltejs/adapter-auto/-/adapter-auto-3.3.1.tgz", + "integrity": "sha512-5Sc7WAxYdL6q9j/+D0jJKjGREGlfIevDyHSQ2eNETHcB1TKlQWHcAo8AS8H1QdjNvSXpvOwNjykDUHPEAyGgdQ==", "dev": true, + "license": "MIT", "dependencies": { - "import-meta-resolve": "^4.0.0" + "import-meta-resolve": "^4.1.0" }, "peerDependencies": { "@sveltejs/kit": "^2.0.0" } }, "node_modules/@sveltejs/kit": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/@sveltejs/kit/-/kit-2.0.6.tgz", - "integrity": "sha512-dnHtyjBLGXx+hrZQ9GuqLlSfTBixewJaByUVWai7LmB4dgV3FwkK155OltEgONDQW6KW64hLNS/uojdx3uC2/g==", + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/@sveltejs/kit/-/kit-2.7.3.tgz", + "integrity": "sha512-Vx7nq5MJ86I8qXYsVidC5PX6xm+uxt8DydvOdmJoyOK7LvGP18OFEG359yY+aa51t6pENvqZAMqAREQQx1OI2Q==", "dev": true, "hasInstallScript": true, + "license": "MIT", "dependencies": { "@types/cookie": "^0.6.0", "cookie": "^0.6.0", - "devalue": "^4.3.2", + "devalue": "^5.1.0", "esm-env": "^1.0.0", + "import-meta-resolve": "^4.1.0", "kleur": "^4.1.5", "magic-string": "^0.30.5", "mrmime": "^2.0.0", "sade": "^1.8.1", "set-cookie-parser": "^2.6.0", - "sirv": "^2.0.4", + "sirv": "^3.0.0", "tiny-glob": "^0.2.9" }, "bin": { @@ -1120,22 +1191,23 @@ "node": ">=18.13" }, "peerDependencies": { - "@sveltejs/vite-plugin-svelte": "^3.0.0", + "@sveltejs/vite-plugin-svelte": "^3.0.0 || ^4.0.0-next.1", "svelte": "^4.0.0 || ^5.0.0-next.0", "vite": "^5.0.3" } }, "node_modules/@sveltejs/package": { - "version": "2.2.5", - "resolved": "https://registry.npmjs.org/@sveltejs/package/-/package-2.2.5.tgz", - "integrity": "sha512-H0dFDrp7b/tr4zrUzOfqPKHG8y6ceNlGKPfSpp4ym1kTPWP79Mea5rvDlcmsbOS26FmHN/vttubalBdOCGA6qA==", + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/@sveltejs/package/-/package-2.3.7.tgz", + "integrity": "sha512-LYgUkde5GUYqOpXbcoCGUpEH4Ctl3Wj4u4CVZBl56dEeLW5fGHE037ZL1qlK0Ky+QD5uUfwONSeGwIOIighFMQ==", "dev": true, + "license": "MIT", "dependencies": { - "chokidar": "^3.5.3", + "chokidar": "^4.0.0", "kleur": "^4.1.5", "sade": "^1.8.1", "semver": "^7.5.4", - "svelte2tsx": "~0.6.27" + "svelte2tsx": "~0.7.16" }, "bin": { "svelte-package": "svelte-package.js" @@ -1144,262 +1216,226 @@ "node": "^16.14 || >=18" }, "peerDependencies": { - "svelte": "^3.44.0 || ^4.0.0" + "svelte": "^3.44.0 || ^4.0.0 || ^5.0.0-next.1" } }, "node_modules/@sveltejs/vite-plugin-svelte": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte/-/vite-plugin-svelte-3.0.1.tgz", - "integrity": "sha512-CGURX6Ps+TkOovK6xV+Y2rn8JKa8ZPUHPZ/NKgCxAmgBrXReavzFl8aOSCj3kQ1xqT7yGJj53hjcV/gqwDAaWA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte/-/vite-plugin-svelte-4.0.0.tgz", + "integrity": "sha512-kpVJwF+gNiMEsoHaw+FJL76IYiwBikkxYU83+BpqQLdVMff19KeRKLd2wisS8niNBMJ2omv5gG+iGDDwd8jzag==", "dev": true, + "license": "MIT", "dependencies": { - "@sveltejs/vite-plugin-svelte-inspector": "^2.0.0-next.0 || ^2.0.0", - "debug": "^4.3.4", + "@sveltejs/vite-plugin-svelte-inspector": "^3.0.0-next.0||^3.0.0", + "debug": "^4.3.7", "deepmerge": "^4.3.1", "kleur": "^4.1.5", - "magic-string": "^0.30.5", - "svelte-hmr": "^0.15.3", - "vitefu": "^0.2.5" + "magic-string": "^0.30.12", + "vitefu": "^1.0.3" }, "engines": { - "node": "^18.0.0 || >=20" + "node": "^18.0.0 || ^20.0.0 || >=22" }, "peerDependencies": { - "svelte": "^4.0.0 || ^5.0.0-next.0", + "svelte": "^5.0.0-next.96 || ^5.0.0", "vite": "^5.0.0" } }, "node_modules/@sveltejs/vite-plugin-svelte-inspector": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte-inspector/-/vite-plugin-svelte-inspector-2.0.0.tgz", - "integrity": "sha512-gjr9ZFg1BSlIpfZ4PRewigrvYmHWbDrq2uvvPB1AmTWKuM+dI1JXQSUu2pIrYLb/QncyiIGkFDFKTwJ0XqQZZg==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte-inspector/-/vite-plugin-svelte-inspector-3.0.1.tgz", + "integrity": "sha512-2CKypmj1sM4GE7HjllT7UKmo4Q6L5xFRd7VMGEWhYnZ+wc6AUVU01IBd7yUi6WnFndEwWoMNOd6e8UjoN0nbvQ==", "dev": true, + "license": "MIT", "dependencies": { - "debug": "^4.3.4" + "debug": "^4.3.7" }, "engines": { - "node": "^18.0.0 || >=20" + "node": "^18.0.0 || ^20.0.0 || >=22" }, "peerDependencies": { - "@sveltejs/vite-plugin-svelte": "^3.0.0", - "svelte": "^4.0.0 || ^5.0.0-next.0", + "@sveltejs/vite-plugin-svelte": "^4.0.0-next.0||^4.0.0", + "svelte": "^5.0.0-next.96 || ^5.0.0", "vite": "^5.0.0" } }, "node_modules/@testing-library/dom": { - "version": "9.3.3", - "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-9.3.3.tgz", - "integrity": "sha512-fB0R+fa3AUqbLHWyxXa2kGVtf1Fe1ZZFr0Zp6AIbIAzXb2mKbEXl+PCQNUOaq5lbTab5tfctfXRNsWXxa2f7Aw==", + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-10.4.0.tgz", + "integrity": "sha512-pemlzrSESWbdAloYml3bAJMEfNh1Z7EduzqPKprCH5S341frlpYnUEW0H72dLxa6IsYr+mPno20GiSm+h9dEdQ==", "dev": true, + "license": "MIT", "dependencies": { "@babel/code-frame": "^7.10.4", "@babel/runtime": "^7.12.5", "@types/aria-query": "^5.0.1", - "aria-query": "5.1.3", + "aria-query": "5.3.0", "chalk": "^4.1.0", "dom-accessibility-api": "^0.5.9", "lz-string": "^1.5.0", "pretty-format": "^27.0.2" }, "engines": { - "node": ">=14" - } - }, - "node_modules/@testing-library/dom/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "node": ">=18" } }, "node_modules/@testing-library/dom/node_modules/aria-query": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.1.3.tgz", - "integrity": "sha512-R5iJ5lkuHybztUfuOAznmboyjWq8O6sqNqtK7CLOqdydi54VNbORp49mb14KbWgG1QD3JFO9hJdZ+y4KutfdOQ==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.0.tgz", + "integrity": "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==", "dev": true, + "license": "Apache-2.0", "dependencies": { - "deep-equal": "^2.0.5" + "dequal": "^2.0.3" } }, - "node_modules/@testing-library/dom/node_modules/pretty-format": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz", - "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==", + "node_modules/@testing-library/dom/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, + "license": "MIT", "dependencies": { - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^17.0.1" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/@testing-library/dom/node_modules/react-is": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", - "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", - "dev": true + "node_modules/@testing-library/dom/node_modules/dom-accessibility-api": { + "version": "0.5.16", + "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.5.16.tgz", + "integrity": "sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg==", + "dev": true, + "license": "MIT" }, "node_modules/@testing-library/jest-dom": { - "version": "6.1.6", - "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-6.1.6.tgz", - "integrity": "sha512-YwuiOdYEcxhfC2u5iNKlvg2Q5MgbutovP6drq7J1HrCbvR+G58BbtoCoq+L/kNlrNFsu2Kt3jaFAviLVxYHJZg==", + "version": "6.6.2", + "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-6.6.2.tgz", + "integrity": "sha512-P6GJD4yqc9jZLbe98j/EkyQDTPgqftohZF5FBkHY5BUERZmcf4HeO2k0XaefEg329ux2p21i1A1DmyQ1kKw2Jw==", "dev": true, + "license": "MIT", "dependencies": { - "@adobe/css-tools": "^4.3.2", - "@babel/runtime": "^7.9.2", + "@adobe/css-tools": "^4.4.0", "aria-query": "^5.0.0", "chalk": "^3.0.0", "css.escape": "^1.5.1", - "dom-accessibility-api": "^0.5.6", - "lodash": "^4.17.15", + "dom-accessibility-api": "^0.6.3", + "lodash": "^4.17.21", "redent": "^3.0.0" }, "engines": { "node": ">=14", "npm": ">=6", "yarn": ">=1" - }, - "peerDependencies": { - "@jest/globals": ">= 28", - "@types/jest": ">= 28", - "jest": ">= 28", - "vitest": ">= 0.32" - }, - "peerDependenciesMeta": { - "@jest/globals": { - "optional": true - }, - "@types/jest": { - "optional": true - }, - "jest": { - "optional": true - }, - "vitest": { - "optional": true - } - } - }, - "node_modules/@testing-library/jest-dom/node_modules/chalk": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", - "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=8" } }, "node_modules/@testing-library/svelte": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/@testing-library/svelte/-/svelte-4.0.5.tgz", - "integrity": "sha512-P7X3mpYv/My4hBZfxVxTFV5KcA+EoWfRCguWP7WQdYj6HMdg/L+LiwG4ocvLe+hupedrC7dwcy85JlxKplJp2g==", + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/@testing-library/svelte/-/svelte-5.2.4.tgz", + "integrity": "sha512-EFdy73+lULQgMJ1WolAymrxWWrPv9DWyDuDFKKlUip2PA/EXuHptzfYOKWljccFWDKhhGOu3dqNmoc2f/h/Ecg==", "dev": true, + "license": "MIT", "dependencies": { - "@testing-library/dom": "^9.3.1" + "@testing-library/dom": "^10.0.0" }, "engines": { "node": ">= 10" }, "peerDependencies": { - "svelte": "^3 || ^4" + "svelte": "^3 || ^4 || ^5 || ^5.0.0-next.0", + "vite": "*", + "vitest": "*" + }, + "peerDependenciesMeta": { + "vite": { + "optional": true + }, + "vitest": { + "optional": true + } } }, "node_modules/@types/aria-query": { "version": "5.0.4", "resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-5.0.4.tgz", "integrity": "sha512-rfT93uj5s0PRL7EzccGMs3brplhcrghnDoV26NqKhCAS1hVo+WdNsPvE/yb6ilfr5hi2MEk6d5EWJTKdxg8jVw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@types/cookie": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.6.0.tgz", "integrity": "sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@types/eslint": { - "version": "8.56.0", - "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.56.0.tgz", - "integrity": "sha512-FlsN0p4FhuYRjIxpbdXovvHQhtlG05O1GG/RNWvdAxTboR438IOTwmrY/vLA+Xfgg06BTkP045M3vpFwTMv1dg==", + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-9.6.1.tgz", + "integrity": "sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==", "dev": true, + "license": "MIT", "dependencies": { "@types/estree": "*", "@types/json-schema": "*" } }, "node_modules/@types/estree": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", - "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==" + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", + "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", + "license": "MIT" }, "node_modules/@types/faker": { - "version": "5.5.9", - "resolved": "https://registry.npmjs.org/@types/faker/-/faker-5.5.9.tgz", - "integrity": "sha512-uCx6mP3UY5SIO14XlspxsGjgaemrxpssJI0Ol+GfhxtcKpv9pgRZYsS4eeKeHVLje6Qtc8lGszuBI461+gVZBA==", - "dev": true - }, - "node_modules/@types/istanbul-lib-coverage": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", - "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", - "dev": true + "version": "6.6.11", + "resolved": "https://registry.npmjs.org/@types/faker/-/faker-6.6.11.tgz", + "integrity": "sha512-/m/YZdfPXeM3dnSBz4JDbbYXelBm+onjsX2+LZV1XPJjIOpdhoc8ngws67iyXdLJwLiigOcejBufaDdjuVWy3Q==", + "deprecated": "This is a stub types definition. faker provides its own type definitions, so you do not need this installed.", + "dev": true, + "license": "MIT", + "dependencies": { + "faker": "*" + } }, "node_modules/@types/json-schema": { "version": "7.0.15", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", - "dev": true - }, - "node_modules/@types/pug": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/@types/pug/-/pug-2.0.10.tgz", - "integrity": "sha512-Sk/uYFOBAB7mb74XcpizmH0KOR2Pv3D2Hmrh1Dmy5BmK3MpdSa5kqZcg6EKBdklU0bFXX9gCfzvpnyUehrPIuA==", - "dev": true - }, - "node_modules/@types/semver": { - "version": "7.5.6", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.6.tgz", - "integrity": "sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "6.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.17.0.tgz", - "integrity": "sha512-Vih/4xLXmY7V490dGwBQJTpIZxH4ZFH6eCVmQ4RFkB+wmaCTDAx4dtgoWwMNGKLkqRY1L6rPqzEbjorRnDo4rQ==", + "version": "8.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.11.0.tgz", + "integrity": "sha512-KhGn2LjW1PJT2A/GfDpiyOfS4a8xHQv2myUagTM5+zsormOmBlYsnQ6pobJ8XxJmh6hnHwa2Mbe3fPrDJoDhbA==", "dev": true, + "license": "MIT", "dependencies": { - "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "6.17.0", - "@typescript-eslint/type-utils": "6.17.0", - "@typescript-eslint/utils": "6.17.0", - "@typescript-eslint/visitor-keys": "6.17.0", - "debug": "^4.3.4", + "@eslint-community/regexpp": "^4.10.0", + "@typescript-eslint/scope-manager": "8.11.0", + "@typescript-eslint/type-utils": "8.11.0", + "@typescript-eslint/utils": "8.11.0", + "@typescript-eslint/visitor-keys": "8.11.0", "graphemer": "^1.4.0", - "ignore": "^5.2.4", + "ignore": "^5.3.1", "natural-compare": "^1.4.0", - "semver": "^7.5.4", - "ts-api-utils": "^1.0.1" + "ts-api-utils": "^1.3.0" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha", - "eslint": "^7.0.0 || ^8.0.0" + "@typescript-eslint/parser": "^8.0.0 || ^8.0.0-alpha.0", + "eslint": "^8.57.0 || ^9.0.0" }, "peerDependenciesMeta": { "typescript": { @@ -1408,26 +1444,27 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "6.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.17.0.tgz", - "integrity": "sha512-C4bBaX2orvhK+LlwrY8oWGmSl4WolCfYm513gEccdWZj0CwGadbIADb0FtVEcI+WzUyjyoBj2JRP8g25E6IB8A==", + "version": "8.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.11.0.tgz", + "integrity": "sha512-lmt73NeHdy1Q/2ul295Qy3uninSqi6wQI18XwSpm8w0ZbQXUpjCAWP1Vlv/obudoBiIjJVjlztjQ+d/Md98Yxg==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/scope-manager": "6.17.0", - "@typescript-eslint/types": "6.17.0", - "@typescript-eslint/typescript-estree": "6.17.0", - "@typescript-eslint/visitor-keys": "6.17.0", + "@typescript-eslint/scope-manager": "8.11.0", + "@typescript-eslint/types": "8.11.0", + "@typescript-eslint/typescript-estree": "8.11.0", + "@typescript-eslint/visitor-keys": "8.11.0", "debug": "^4.3.4" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" + "eslint": "^8.57.0 || ^9.0.0" }, "peerDependenciesMeta": { "typescript": { @@ -1436,16 +1473,17 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "6.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.17.0.tgz", - "integrity": "sha512-RX7a8lwgOi7am0k17NUO0+ZmMOX4PpjLtLRgLmT1d3lBYdWH4ssBUbwdmc5pdRX8rXon8v9x8vaoOSpkHfcXGA==", + "version": "8.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.11.0.tgz", + "integrity": "sha512-Uholz7tWhXmA4r6epo+vaeV7yjdKy5QFCERMjs1kMVsLRKIrSdM6o21W2He9ftp5PP6aWOVpD5zvrvuHZC0bMQ==", "dev": true, + "license": "MIT", "dependencies": { - "@typescript-eslint/types": "6.17.0", - "@typescript-eslint/visitor-keys": "6.17.0" + "@typescript-eslint/types": "8.11.0", + "@typescript-eslint/visitor-keys": "8.11.0" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", @@ -1453,26 +1491,24 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "6.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.17.0.tgz", - "integrity": "sha512-hDXcWmnbtn4P2B37ka3nil3yi3VCQO2QEB9gBiHJmQp5wmyQWqnjA85+ZcE8c4FqnaB6lBwMrPkgd4aBYz3iNg==", + "version": "8.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.11.0.tgz", + "integrity": "sha512-ItiMfJS6pQU0NIKAaybBKkuVzo6IdnAhPFZA/2Mba/uBjuPQPet/8+zh5GtLHwmuFRShZx+8lhIs7/QeDHflOg==", "dev": true, + "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "6.17.0", - "@typescript-eslint/utils": "6.17.0", + "@typescript-eslint/typescript-estree": "8.11.0", + "@typescript-eslint/utils": "8.11.0", "debug": "^4.3.4", - "ts-api-utils": "^1.0.1" + "ts-api-utils": "^1.3.0" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, - "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" - }, "peerDependenciesMeta": { "typescript": { "optional": true @@ -1480,12 +1516,13 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "6.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.17.0.tgz", - "integrity": "sha512-qRKs9tvc3a4RBcL/9PXtKSehI/q8wuU9xYJxe97WFxnzH8NWWtcW3ffNS+EWg8uPvIerhjsEZ+rHtDqOCiH57A==", + "version": "8.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.11.0.tgz", + "integrity": "sha512-tn6sNMHf6EBAYMvmPUaKaVeYvhUsrE6x+bXQTxjQRp360h1giATU0WvgeEys1spbvb5R+VpNOZ+XJmjD8wOUHw==", "dev": true, + "license": "MIT", "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", @@ -1493,22 +1530,23 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "6.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.17.0.tgz", - "integrity": "sha512-gVQe+SLdNPfjlJn5VNGhlOhrXz4cajwFd5kAgWtZ9dCZf4XJf8xmgCTLIqec7aha3JwgLI2CK6GY1043FRxZwg==", + "version": "8.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.11.0.tgz", + "integrity": "sha512-yHC3s1z1RCHoCz5t06gf7jH24rr3vns08XXhfEqzYpd6Hll3z/3g23JRi0jM8A47UFKNc3u/y5KIMx8Ynbjohg==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/types": "6.17.0", - "@typescript-eslint/visitor-keys": "6.17.0", + "@typescript-eslint/types": "8.11.0", + "@typescript-eslint/visitor-keys": "8.11.0", "debug": "^4.3.4", - "globby": "^11.1.0", + "fast-glob": "^3.3.2", "is-glob": "^4.0.3", - "minimatch": "9.0.3", - "semver": "^7.5.4", - "ts-api-utils": "^1.0.1" + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^1.3.0" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", @@ -1521,179 +1559,198 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "6.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.17.0.tgz", - "integrity": "sha512-LofsSPjN/ITNkzV47hxas2JCsNCEnGhVvocfyOcLzT9c/tSZE7SfhS/iWtzP1lKNOEfLhRTZz6xqI8N2RzweSQ==", + "version": "8.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.11.0.tgz", + "integrity": "sha512-CYiX6WZcbXNJV7UNB4PLDIBtSdRmRI/nb0FMyqHPTQD1rMjA0foPLaPUV39C/MxkTd/QKSeX+Gb34PPsDVC35g==", "dev": true, + "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@types/json-schema": "^7.0.12", - "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "6.17.0", - "@typescript-eslint/types": "6.17.0", - "@typescript-eslint/typescript-estree": "6.17.0", - "semver": "^7.5.4" + "@typescript-eslint/scope-manager": "8.11.0", + "@typescript-eslint/types": "8.11.0", + "@typescript-eslint/typescript-estree": "8.11.0" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" + "eslint": "^8.57.0 || ^9.0.0" } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "6.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.17.0.tgz", - "integrity": "sha512-H6VwB/k3IuIeQOyYczyyKN8wH6ed8EwliaYHLxOIhyF0dYEIsN8+Bk3GE19qafeMKyZJJHP8+O1HiFhFLUNKSg==", + "version": "8.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.11.0.tgz", + "integrity": "sha512-EaewX6lxSjRJnc+99+dqzTeoDZUfyrA52d2/HRrkI830kgovWsmIiTfmr0NZorzqic7ga+1bS60lRBUgR3n/Bw==", "dev": true, + "license": "MIT", "dependencies": { - "@typescript-eslint/types": "6.17.0", - "eslint-visitor-keys": "^3.4.1" + "@typescript-eslint/types": "8.11.0", + "eslint-visitor-keys": "^3.4.3" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@ungap/structured-clone": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", - "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", - "dev": true - }, "node_modules/@vitest/coverage-v8": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-1.1.1.tgz", - "integrity": "sha512-TCXSh6sA92t7D5p7HJ64sPCi+szP8E3NiKTsR3YR8vVEVZB9yclQu2btktCthxahKBl7PwheP5OuejYg13xccg==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-2.1.3.tgz", + "integrity": "sha512-2OJ3c7UPoFSmBZwqD2VEkUw6A/tzPF0LmW0ZZhhB8PFxuc+9IBG/FaSM+RLEenc7ljzFvGN+G0nGQoZnh7sy2A==", "dev": true, + "license": "MIT", "dependencies": { - "@ampproject/remapping": "^2.2.1", + "@ampproject/remapping": "^2.3.0", "@bcoe/v8-coverage": "^0.2.3", - "debug": "^4.3.4", + "debug": "^4.3.6", "istanbul-lib-coverage": "^3.2.2", "istanbul-lib-report": "^3.0.1", - "istanbul-lib-source-maps": "^4.0.1", - "istanbul-reports": "^3.1.6", - "magic-string": "^0.30.5", - "magicast": "^0.3.2", - "picocolors": "^1.0.0", - "std-env": "^3.5.0", - "test-exclude": "^6.0.0", - "v8-to-istanbul": "^9.2.0" + "istanbul-lib-source-maps": "^5.0.6", + "istanbul-reports": "^3.1.7", + "magic-string": "^0.30.11", + "magicast": "^0.3.4", + "std-env": "^3.7.0", + "test-exclude": "^7.0.1", + "tinyrainbow": "^1.2.0" }, "funding": { "url": "https://opencollective.com/vitest" }, "peerDependencies": { - "vitest": "^1.0.0" + "@vitest/browser": "2.1.3", + "vitest": "2.1.3" + }, + "peerDependenciesMeta": { + "@vitest/browser": { + "optional": true + } } }, "node_modules/@vitest/expect": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-1.1.1.tgz", - "integrity": "sha512-Qpw01C2Hyb3085jBkOJLQ7HRX0Ncnh2qV4p+xWmmhcIUlMykUF69zsnZ1vPmAjZpomw9+5tWEGOQ0GTfR8U+kA==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-2.1.3.tgz", + "integrity": "sha512-SNBoPubeCJhZ48agjXruCI57DvxcsivVDdWz+SSsmjTT4QN/DfHk3zB/xKsJqMs26bLZ/pNRLnCf0j679i0uWQ==", "dev": true, + "license": "MIT", "dependencies": { - "@vitest/spy": "1.1.1", - "@vitest/utils": "1.1.1", - "chai": "^4.3.10" + "@vitest/spy": "2.1.3", + "@vitest/utils": "2.1.3", + "chai": "^5.1.1", + "tinyrainbow": "^1.2.0" }, "funding": { "url": "https://opencollective.com/vitest" } }, - "node_modules/@vitest/runner": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-1.1.1.tgz", - "integrity": "sha512-8HokyJo1SnSi3uPFKfWm/Oq1qDwLC4QDcVsqpXIXwsRPAg3gIDh8EbZ1ri8cmQkBxdOu62aOF9B4xcqJhvt4xQ==", + "node_modules/@vitest/mocker": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-2.1.3.tgz", + "integrity": "sha512-eSpdY/eJDuOvuTA3ASzCjdithHa+GIF1L4PqtEELl6Qa3XafdMLBpBlZCIUCX2J+Q6sNmjmxtosAG62fK4BlqQ==", "dev": true, + "license": "MIT", "dependencies": { - "@vitest/utils": "1.1.1", - "p-limit": "^5.0.0", - "pathe": "^1.1.1" + "@vitest/spy": "2.1.3", + "estree-walker": "^3.0.3", + "magic-string": "^0.30.11" }, "funding": { "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "@vitest/spy": "2.1.3", + "msw": "^2.3.5", + "vite": "^5.0.0" + }, + "peerDependenciesMeta": { + "msw": { + "optional": true + }, + "vite": { + "optional": true + } } }, - "node_modules/@vitest/runner/node_modules/p-limit": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-5.0.0.tgz", - "integrity": "sha512-/Eaoq+QyLSiXQ4lyYV23f14mZRQcXnxfHrN0vCai+ak9G0pp9iEQukIIZq5NccEvwRB8PUnZT0KsOoDCINS1qQ==", + "node_modules/@vitest/pretty-format": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-2.1.3.tgz", + "integrity": "sha512-XH1XdtoLZCpqV59KRbPrIhFCOO0hErxrQCMcvnQete3Vibb9UeIOX02uFPfVn3Z9ZXsq78etlfyhnkmIZSzIwQ==", "dev": true, + "license": "MIT", "dependencies": { - "yocto-queue": "^1.0.0" - }, - "engines": { - "node": ">=18" + "tinyrainbow": "^1.2.0" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://opencollective.com/vitest" } }, - "node_modules/@vitest/runner/node_modules/yocto-queue": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.0.0.tgz", - "integrity": "sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==", + "node_modules/@vitest/runner": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-2.1.3.tgz", + "integrity": "sha512-JGzpWqmFJ4fq5ZKHtVO3Xuy1iF2rHGV4d/pdzgkYHm1+gOzNZtqjvyiaDGJytRyMU54qkxpNzCx+PErzJ1/JqQ==", "dev": true, - "engines": { - "node": ">=12.20" + "license": "MIT", + "dependencies": { + "@vitest/utils": "2.1.3", + "pathe": "^1.1.2" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://opencollective.com/vitest" } }, "node_modules/@vitest/snapshot": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-1.1.1.tgz", - "integrity": "sha512-WnMHjv4VdHLbFGgCdVVvyRkRPnOKN75JJg+LLTdr6ah7YnL75W+7CTIMdzPEPzaDxA8r5yvSVlc1d8lH3yE28w==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-2.1.3.tgz", + "integrity": "sha512-qWC2mWc7VAXmjAkEKxrScWHWFyCQx/cmiZtuGqMi+WwqQJ2iURsVY4ZfAK6dVo6K2smKRU6l3BPwqEBvhnpQGg==", "dev": true, + "license": "MIT", "dependencies": { - "magic-string": "^0.30.5", - "pathe": "^1.1.1", - "pretty-format": "^29.7.0" + "@vitest/pretty-format": "2.1.3", + "magic-string": "^0.30.11", + "pathe": "^1.1.2" }, "funding": { "url": "https://opencollective.com/vitest" } }, "node_modules/@vitest/spy": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-1.1.1.tgz", - "integrity": "sha512-hDU2KkOTfFp4WFFPWwHFauddwcKuGQ7gF6Un/ZZkCogoAiTMN7/7YKvUDbywPZZ754iCQGjdUmXN3t4k0jm1IQ==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-2.1.3.tgz", + "integrity": "sha512-Nb2UzbcUswzeSP7JksMDaqsI43Sj5+Kry6ry6jQJT4b5gAK+NS9NED6mDb8FlMRCX8m5guaHCDZmqYMMWRy5nQ==", "dev": true, + "license": "MIT", "dependencies": { - "tinyspy": "^2.2.0" + "tinyspy": "^3.0.0" }, "funding": { "url": "https://opencollective.com/vitest" } }, "node_modules/@vitest/utils": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-1.1.1.tgz", - "integrity": "sha512-E9LedH093vST/JuBSyHLFMpxJKW3dLhe/flUSPFedoyj4wKiFX7Jm8gYLtOIiin59dgrssfmFv0BJ1u8P/LC/A==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-2.1.3.tgz", + "integrity": "sha512-xpiVfDSg1RrYT0tX6czgerkpcKFmFOF/gCr30+Mve5V2kewCy4Prn1/NDMSRwaSmT7PRaOF83wu+bEtsY1wrvA==", "dev": true, + "license": "MIT", "dependencies": { - "diff-sequences": "^29.6.3", - "loupe": "^2.3.7", - "pretty-format": "^29.7.0" + "@vitest/pretty-format": "2.1.3", + "loupe": "^3.1.1", + "tinyrainbow": "^1.2.0" }, "funding": { "url": "https://opencollective.com/vitest" } }, "node_modules/acorn": { - "version": "8.11.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", - "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", + "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", + "license": "MIT", "bin": { "acorn": "bin/acorn" }, @@ -1706,17 +1763,18 @@ "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", "dev": true, + "license": "MIT", "peerDependencies": { "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, - "node_modules/acorn-walk": { - "version": "8.3.1", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.1.tgz", - "integrity": "sha512-TgUZgYvqZprrl7YldZNoa9OciCAyZR+Ejm9eXzKCmjsF5IKp/wgQ7Z/ZpjpGTIUPwrHQIcYeI8qDh4PsEwxMbw==", - "dev": true, - "engines": { - "node": ">=0.4.0" + "node_modules/acorn-typescript": { + "version": "1.4.13", + "resolved": "https://registry.npmjs.org/acorn-typescript/-/acorn-typescript-1.4.13.tgz", + "integrity": "sha512-xsc9Xv0xlVfwp2o7sQ+GCQ1PgbkdcpWdTzrwXxO3xDMTAywVS3oXVOcOHuRjAPkS4P9b+yc/qNF15460v+jp4Q==", + "license": "MIT", + "peerDependencies": { + "acorn": ">=8.9.0" } }, "node_modules/ajv": { @@ -1724,6 +1782,7 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, + "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -1740,6 +1799,7 @@ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -1749,6 +1809,7 @@ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, + "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -1759,244 +1820,146 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "dev": true, - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true + "dev": true, + "license": "Python-2.0" }, "node_modules/aria-query": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.0.tgz", - "integrity": "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==", - "dependencies": { - "dequal": "^2.0.3" + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.2.tgz", + "integrity": "sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw==", + "license": "Apache-2.0", + "engines": { + "node": ">= 0.4" } }, - "node_modules/array-buffer-byte-length": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", - "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "is-array-buffer": "^3.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/assertion-error": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", - "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "node_modules/assertion-error": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz", + "integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==", "dev": true, + "license": "MIT", "engines": { - "node": "*" + "node": ">=12" } }, - "node_modules/available-typed-arrays": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", - "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", - "dev": true, + "node_modules/axobject-query": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-4.1.0.tgz", + "integrity": "sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ==", + "license": "Apache-2.0", "engines": { "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/axobject-query": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-3.2.1.tgz", - "integrity": "sha512-jsyHu61e6N4Vbz/v18DHwWYKK0bSWLqn47eeDSKPB7m8tqMHF9YJ+mhIk2lVteyZrY8tnSj/jHOv4YiTCuCJgg==", - "dependencies": { - "dequal": "^2.0.3" } }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "node_modules/binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", "dev": true, - "engines": { - "node": ">=8" - } + "license": "MIT" }, "node_modules/brace-expansion": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" } }, "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, + "license": "MIT", "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" } }, - "node_modules/buffer-crc32": { - "version": "0.2.13", - "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", - "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", - "dev": true, - "engines": { - "node": "*" - } - }, "node_modules/cac": { "version": "6.7.14", "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, - "node_modules/call-bind": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.5.tgz", - "integrity": "sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.1", - "set-function-length": "^1.1.1" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/chai": { - "version": "4.3.10", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.10.tgz", - "integrity": "sha512-0UXG04VuVbruMUYbJ6JctvH0YnC/4q3/AkT18q4NaITo91CUm0liMS9VqzT9vZhVQ/1eqPanMWjBM+Juhfb/9g==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/chai/-/chai-5.1.2.tgz", + "integrity": "sha512-aGtmf24DW6MLHHG5gCx4zaI3uBq3KRtxeVs0DjFH6Z0rDNbsvTxFASFvdj79pxjxZ8/5u3PIiN3IwEIQkiiuPw==", "dev": true, + "license": "MIT", "dependencies": { - "assertion-error": "^1.1.0", - "check-error": "^1.0.3", - "deep-eql": "^4.1.3", - "get-func-name": "^2.0.2", - "loupe": "^2.3.6", - "pathval": "^1.1.1", - "type-detect": "^4.0.8" + "assertion-error": "^2.0.1", + "check-error": "^2.1.1", + "deep-eql": "^5.0.1", + "loupe": "^3.1.0", + "pathval": "^2.0.0" }, "engines": { - "node": ">=4" + "node": ">=12" } }, "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" + "node": ">=8" } }, "node_modules/check-error": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz", - "integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-2.1.1.tgz", + "integrity": "sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==", "dev": true, - "dependencies": { - "get-func-name": "^2.0.2" - }, + "license": "MIT", "engines": { - "node": "*" + "node": ">= 16" } }, "node_modules/chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.1.tgz", + "integrity": "sha512-n8enUVCED/KVRQlab1hr3MVpcVMvxtZjmEa956u+4YijlmQED223XMSYj2tLuKvr4jcCTzNNMpQDUer72MMmzA==", "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], + "license": "MIT", "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" + "readdirp": "^4.0.1" }, "engines": { - "node": ">= 8.10.0" + "node": ">= 14.16.0" }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "node_modules/code-red": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/code-red/-/code-red-1.0.4.tgz", - "integrity": "sha512-7qJWqItLA8/VPVlKJlFXU+NBlo/qyfs39aJcuMT/2ere32ZqvF5OSxgdM5xOfJJ7O429gg2HM47y8v9P+9wrNw==", - "dependencies": { - "@jridgewell/sourcemap-codec": "^1.4.15", - "@types/estree": "^1.0.1", - "acorn": "^8.10.0", - "estree-walker": "^3.0.3", - "periscopic": "^3.1.0" + "funding": { + "url": "https://paulmillr.com/funding/" } }, "node_modules/color-convert": { @@ -2004,6 +1967,7 @@ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, + "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -2015,25 +1979,22 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true - }, - "node_modules/convert-source-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/cookie": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -2043,6 +2004,7 @@ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, + "license": "MIT", "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -2052,29 +2014,19 @@ "node": ">= 8" } }, - "node_modules/css-tree": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.3.1.tgz", - "integrity": "sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==", - "dependencies": { - "mdn-data": "2.0.30", - "source-map-js": "^1.0.1" - }, - "engines": { - "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0" - } - }, "node_modules/css.escape": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/css.escape/-/css.escape-1.5.1.tgz", "integrity": "sha512-YUifsXXuknHlUsmlgyY0PKzgPOr7/FjCePfHNt0jxm83wHZi44VDMQ7/fGNkjY3/jV1MC+1CmZbaHzugyeRtpg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/cssesc": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", "dev": true, + "license": "MIT", "bin": { "cssesc": "bin/cssesc" }, @@ -2083,12 +2035,13 @@ } }, "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", "dev": true, + "license": "MIT", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -2103,192 +2056,81 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/dedent-js/-/dedent-js-1.0.1.tgz", "integrity": "sha512-OUepMozQULMLUmhxS95Vudo0jb0UchLimi3+pQ2plj61Fcy8axbP9hbiD4Sz6DPqn6XG3kfmziVfQ1rSys5AJQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/deep-eql": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz", - "integrity": "sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==", + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-5.0.2.tgz", + "integrity": "sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==", "dev": true, - "dependencies": { - "type-detect": "^4.0.0" - }, + "license": "MIT", "engines": { "node": ">=6" } }, - "node_modules/deep-equal": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-2.2.3.tgz", - "integrity": "sha512-ZIwpnevOurS8bpT4192sqAowWM76JDKSHYzMLty3BZGSswgq6pBaH3DhCSW5xVAZICZyKdOBPjwww5wfgT/6PA==", - "dev": true, - "dependencies": { - "array-buffer-byte-length": "^1.0.0", - "call-bind": "^1.0.5", - "es-get-iterator": "^1.1.3", - "get-intrinsic": "^1.2.2", - "is-arguments": "^1.1.1", - "is-array-buffer": "^3.0.2", - "is-date-object": "^1.0.5", - "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.2", - "isarray": "^2.0.5", - "object-is": "^1.1.5", - "object-keys": "^1.1.1", - "object.assign": "^4.1.4", - "regexp.prototype.flags": "^1.5.1", - "side-channel": "^1.0.4", - "which-boxed-primitive": "^1.0.2", - "which-collection": "^1.0.1", - "which-typed-array": "^1.1.13" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/deep-is": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/deepmerge": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } }, - "node_modules/define-data-property": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.1.tgz", - "integrity": "sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==", - "dev": true, - "dependencies": { - "get-intrinsic": "^1.2.1", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/define-properties": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", - "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", - "dev": true, - "dependencies": { - "define-data-property": "^1.0.1", - "has-property-descriptors": "^1.0.0", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/dequal": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", - "engines": { - "node": ">=6" - } - }, - "node_modules/detect-indent": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-6.1.0.tgz", - "integrity": "sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==", "dev": true, + "license": "MIT", "engines": { - "node": ">=8" + "node": ">=6" } }, "node_modules/devalue": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/devalue/-/devalue-4.3.2.tgz", - "integrity": "sha512-KqFl6pOgOW+Y6wJgu80rHpo2/3H07vr8ntR9rkkFIRETewbf5GaYYcakYfiKz89K+sLsuPkQIZaXDMjUObZwWg==", - "dev": true - }, - "node_modules/diff-sequences": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", - "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/devalue/-/devalue-5.1.1.tgz", + "integrity": "sha512-maua5KUiapvEwiEAe+XnlZ3Rh0GD+qI1J/nb9vrJc3muPXvcF/8gXYTWF76+5DAqHyDUtOIImEuo0YKE9mshVw==", "dev": true, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } + "license": "MIT" }, - "node_modules/dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "node_modules/dom-accessibility-api": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.6.3.tgz", + "integrity": "sha512-7ZgogeTnjuHbo+ct10G9Ffp0mif17idi0IyWNVA/wcwcm7NPOD/WEHVP3n7n3MhXqxoIYm8d6MuZohYWIZ4T3w==", "dev": true, - "dependencies": { - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=8" - } + "license": "MIT" }, - "node_modules/doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", "dev": true, - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } + "license": "MIT" }, - "node_modules/dom-accessibility-api": { - "version": "0.5.16", - "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.5.16.tgz", - "integrity": "sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg==", - "dev": true - }, - "node_modules/es-get-iterator": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.3.tgz", - "integrity": "sha512-sPZmqHBe6JIiTfN5q2pEi//TwxmAFHwj/XEuYjTuse78i8KxaqMTTzxPoFKuzRpDpTJ+0NAbpfenkmH2rePtuw==", + "node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.3", - "has-symbols": "^1.0.3", - "is-arguments": "^1.1.1", - "is-map": "^2.0.2", - "is-set": "^2.0.2", - "is-string": "^1.0.7", - "isarray": "^2.0.5", - "stop-iteration-iterator": "^1.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/es6-promise": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.3.1.tgz", - "integrity": "sha512-SOp9Phqvqn7jtEUxPWdWfWoLmyt2VaJ6MpvP9Comy1MceMXqE6bxvaTu4iaxpYYPzhny28Lc+M87/c2cPK6lDg==", - "dev": true + "license": "MIT" }, "node_modules/esbuild": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.11.tgz", - "integrity": "sha512-HJ96Hev2hX/6i5cDVwcqiJBBtuo9+FeIJOtZ9W1kA5M6AMJRHUZlpYZ1/SbEwtO0ioNAW8rUooVpC/WehY2SfA==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz", + "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==", "dev": true, "hasInstallScript": true, + "license": "MIT", "bin": { "esbuild": "bin/esbuild" }, @@ -2296,29 +2138,29 @@ "node": ">=12" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.19.11", - "@esbuild/android-arm": "0.19.11", - "@esbuild/android-arm64": "0.19.11", - "@esbuild/android-x64": "0.19.11", - "@esbuild/darwin-arm64": "0.19.11", - "@esbuild/darwin-x64": "0.19.11", - "@esbuild/freebsd-arm64": "0.19.11", - "@esbuild/freebsd-x64": "0.19.11", - "@esbuild/linux-arm": "0.19.11", - "@esbuild/linux-arm64": "0.19.11", - "@esbuild/linux-ia32": "0.19.11", - "@esbuild/linux-loong64": "0.19.11", - "@esbuild/linux-mips64el": "0.19.11", - "@esbuild/linux-ppc64": "0.19.11", - "@esbuild/linux-riscv64": "0.19.11", - "@esbuild/linux-s390x": "0.19.11", - "@esbuild/linux-x64": "0.19.11", - "@esbuild/netbsd-x64": "0.19.11", - "@esbuild/openbsd-x64": "0.19.11", - "@esbuild/sunos-x64": "0.19.11", - "@esbuild/win32-arm64": "0.19.11", - "@esbuild/win32-ia32": "0.19.11", - "@esbuild/win32-x64": "0.19.11" + "@esbuild/aix-ppc64": "0.21.5", + "@esbuild/android-arm": "0.21.5", + "@esbuild/android-arm64": "0.21.5", + "@esbuild/android-x64": "0.21.5", + "@esbuild/darwin-arm64": "0.21.5", + "@esbuild/darwin-x64": "0.21.5", + "@esbuild/freebsd-arm64": "0.21.5", + "@esbuild/freebsd-x64": "0.21.5", + "@esbuild/linux-arm": "0.21.5", + "@esbuild/linux-arm64": "0.21.5", + "@esbuild/linux-ia32": "0.21.5", + "@esbuild/linux-loong64": "0.21.5", + "@esbuild/linux-mips64el": "0.21.5", + "@esbuild/linux-ppc64": "0.21.5", + "@esbuild/linux-riscv64": "0.21.5", + "@esbuild/linux-s390x": "0.21.5", + "@esbuild/linux-x64": "0.21.5", + "@esbuild/netbsd-x64": "0.21.5", + "@esbuild/openbsd-x64": "0.21.5", + "@esbuild/sunos-x64": "0.21.5", + "@esbuild/win32-arm64": "0.21.5", + "@esbuild/win32-ia32": "0.21.5", + "@esbuild/win32-x64": "0.21.5" } }, "node_modules/escape-string-regexp": { @@ -2326,6 +2168,7 @@ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -2334,65 +2177,75 @@ } }, "node_modules/eslint": { - "version": "8.56.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.56.0.tgz", - "integrity": "sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==", + "version": "9.13.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.13.0.tgz", + "integrity": "sha512-EYZK6SX6zjFHST/HRytOdA/zE72Cq/bfw45LSyuwrdvcclb/gqV8RRQxywOBEWO2+WDpva6UZa4CcDeJKzUCFA==", "dev": true, + "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.56.0", - "@humanwhocodes/config-array": "^0.11.13", + "@eslint-community/regexpp": "^4.11.0", + "@eslint/config-array": "^0.18.0", + "@eslint/core": "^0.7.0", + "@eslint/eslintrc": "^3.1.0", + "@eslint/js": "9.13.0", + "@eslint/plugin-kit": "^0.2.0", + "@humanfs/node": "^0.16.5", "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "@ungap/structured-clone": "^1.2.0", + "@humanwhocodes/retry": "^0.3.1", + "@types/estree": "^1.0.6", + "@types/json-schema": "^7.0.15", "ajv": "^6.12.4", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", "debug": "^4.3.2", - "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", + "eslint-scope": "^8.1.0", + "eslint-visitor-keys": "^4.1.0", + "espree": "^10.2.0", + "esquery": "^1.5.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", + "file-entry-cache": "^8.0.0", "find-up": "^5.0.0", "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", "ignore": "^5.2.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", "lodash.merge": "^4.6.2", "minimatch": "^3.1.2", "natural-compare": "^1.4.0", "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", "text-table": "^0.2.0" }, "bin": { "eslint": "bin/eslint.js" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { - "url": "https://opencollective.com/eslint" + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "jiti": "*" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + } } }, "node_modules/eslint-compat-utils": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/eslint-compat-utils/-/eslint-compat-utils-0.1.2.tgz", - "integrity": "sha512-Jia4JDldWnFNIru1Ehx1H5s9/yxiRHY/TimCuUc0jNexew3cF1gI6CYZil1ociakfWO3rRqFjl1mskBblB3RYg==", + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/eslint-compat-utils/-/eslint-compat-utils-0.5.1.tgz", + "integrity": "sha512-3z3vFexKIEnjHE3zCMRo6fn/e44U7T1khUjg+Hp0ZQMCigh28rALD0nPFBcGZuiLC5rLZa2ubQHDRln09JfU2Q==", "dev": true, + "license": "MIT", + "dependencies": { + "semver": "^7.5.4" + }, "engines": { "node": ">=12" }, @@ -2405,6 +2258,7 @@ "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz", "integrity": "sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==", "dev": true, + "license": "MIT", "bin": { "eslint-config-prettier": "bin/cli.js" }, @@ -2413,23 +2267,23 @@ } }, "node_modules/eslint-plugin-svelte": { - "version": "2.35.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-svelte/-/eslint-plugin-svelte-2.35.1.tgz", - "integrity": "sha512-IF8TpLnROSGy98Z3NrsKXWDSCbNY2ReHDcrYTuXZMbfX7VmESISR78TWgO9zdg4Dht1X8coub5jKwHzP0ExRug==", + "version": "2.46.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-svelte/-/eslint-plugin-svelte-2.46.0.tgz", + "integrity": "sha512-1A7iEMkzmCZ9/Iz+EAfOGYL8IoIG6zeKEq1SmpxGeM5SXmoQq+ZNnCpXFVJpsxPWYx8jIVGMerQMzX20cqUl0g==", "dev": true, + "license": "MIT", "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@jridgewell/sourcemap-codec": "^1.4.14", - "debug": "^4.3.1", - "eslint-compat-utils": "^0.1.2", + "@eslint-community/eslint-utils": "^4.4.0", + "@jridgewell/sourcemap-codec": "^1.4.15", + "eslint-compat-utils": "^0.5.1", "esutils": "^2.0.3", - "known-css-properties": "^0.29.0", - "postcss": "^8.4.5", + "known-css-properties": "^0.35.0", + "postcss": "^8.4.38", "postcss-load-config": "^3.1.4", "postcss-safe-parser": "^6.0.0", - "postcss-selector-parser": "^6.0.11", - "semver": "^7.5.3", - "svelte-eslint-parser": ">=0.33.0 <1.0.0" + "postcss-selector-parser": "^6.1.0", + "semver": "^7.6.2", + "svelte-eslint-parser": "^0.43.0" }, "engines": { "node": "^14.17.0 || >=16.0.0" @@ -2438,8 +2292,8 @@ "url": "https://github.com/sponsors/ota-meshi" }, "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0-0", - "svelte": "^3.37.0 || ^4.0.0" + "eslint": "^7.0.0 || ^8.0.0-0 || ^9.0.0-0", + "svelte": "^3.37.0 || ^4.0.0 || ^5.0.0" }, "peerDependenciesMeta": { "svelte": { @@ -2448,16 +2302,17 @@ } }, "node_modules/eslint-scope": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", - "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.1.0.tgz", + "integrity": "sha512-14dSvlhaVhKKsa9Fx1l8A17s7ah7Ef7wCakJ10LYk6+GYmP9yDti2oq2SEwcyndt6knfcZyhyxwY3i9yL78EQw==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^5.2.0" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -2468,6 +2323,7 @@ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", "dev": true, + "license": "Apache-2.0", "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, @@ -2480,21 +2336,40 @@ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, - "node_modules/eslint/node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "node_modules/eslint/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, + "license": "MIT", "dependencies": { - "is-glob": "^4.0.3" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" }, "engines": { - "node": ">=10.13.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/eslint/node_modules/eslint-visitor-keys": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.1.0.tgz", + "integrity": "sha512-Q7lok0mqMUSf5a/AdAZkA5a/gHcO6snwQClVNNvFKCAVlxXucdU8pKydU5ZVZjBx5xr37vGbFFWtLQYreLzrZg==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, "node_modules/eslint/node_modules/minimatch": { @@ -2502,6 +2377,7 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -2513,30 +2389,45 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/esm-env/-/esm-env-1.0.0.tgz", "integrity": "sha512-Cf6VksWPsTuW01vU9Mk/3vRue91Zevka5SjyNf3nEpokFRuqt/KjUQoGAwq9qMmhpLTHmXzSIrFRw8zxWzmFBA==", - "dev": true + "license": "MIT" }, "node_modules/espree": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", - "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.2.0.tgz", + "integrity": "sha512-upbkBJbckcCNBDBDXEbuhjbP68n+scUd3k/U2EkyM9nw+I/jPiL4cLF/Al06CF96wRltFda16sxDFrxsI1v0/g==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { - "acorn": "^8.9.0", + "acorn": "^8.12.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" + "eslint-visitor-keys": "^4.1.0" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espree/node_modules/eslint-visitor-keys": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.1.0.tgz", + "integrity": "sha512-Q7lok0mqMUSf5a/AdAZkA5a/gHcO6snwQClVNNvFKCAVlxXucdU8pKydU5ZVZjBx5xr37vGbFFWtLQYreLzrZg==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" } }, "node_modules/esquery": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", - "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", + "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "estraverse": "^5.1.0" }, @@ -2544,11 +2435,22 @@ "node": ">=0.10" } }, + "node_modules/esrap": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/esrap/-/esrap-1.2.2.tgz", + "integrity": "sha512-F2pSJklxx1BlQIQgooczXCPHmcWpn6EsP5oo73LQfonG9fIlIENQ8vMmfGXeojP9MrkzUNAfyU5vdFlR9shHAw==", + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.4.15", + "@types/estree": "^1.0.1" + } + }, "node_modules/esrecurse": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "estraverse": "^5.2.0" }, @@ -2561,6 +2463,7 @@ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, + "license": "BSD-2-Clause", "engines": { "node": ">=4.0" } @@ -2569,6 +2472,8 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", + "dev": true, + "license": "MIT", "dependencies": { "@types/estree": "^1.0.0" } @@ -2578,50 +2483,31 @@ "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true, + "license": "BSD-2-Clause", "engines": { "node": ">=0.10.0" } }, - "node_modules/execa": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz", - "integrity": "sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==", - "dev": true, - "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.1.0", - "onetime": "^6.0.0", - "signal-exit": "^4.1.0", - "strip-final-newline": "^3.0.0" - }, - "engines": { - "node": ">=16.17" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" - } - }, "node_modules/faker": { - "version": "5.5.3", - "resolved": "https://registry.npmjs.org/faker/-/faker-5.5.3.tgz", - "integrity": "sha512-wLTv2a28wjUyWkbnX7u/ABZBkUkIF2fCd73V6P2oFqEGEktDfzWx4UxrSqtPRw0xPRAcjeAOIiJWqZm3pP4u3g==", - "dev": true + "version": "6.6.6", + "resolved": "https://registry.npmjs.org/faker/-/faker-6.6.6.tgz", + "integrity": "sha512-9tCqYEDHI5RYFQigXFwF1hnCwcWCOJl/hmll0lr5D2Ljjb0o4wphb69wikeJDz5qCEzXCoPvG6ss5SDP6IfOdg==", + "dev": true, + "license": "MIT" }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/fast-glob": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", "dev": true, + "license": "MIT", "dependencies": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", @@ -2633,44 +2519,62 @@ "node": ">=8.6.0" } }, - "node_modules/fast-json-stable-stringify": { + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/fast-levenshtein": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/fastq": { - "version": "1.16.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.16.0.tgz", - "integrity": "sha512-ifCoaXsDrsdkWTtiNJX5uzHDsrck5TzfKKDcuFFTIrrc/BS076qgEIfoIy1VeZqViznfKiysPYTh/QeHtnIsYA==", + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", "dev": true, + "license": "ISC", "dependencies": { "reusify": "^1.0.4" } }, "node_modules/file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", "dev": true, + "license": "MIT", "dependencies": { - "flat-cache": "^3.0.4" + "flat-cache": "^4.0.0" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": ">=16.0.0" } }, "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, + "license": "MIT", "dependencies": { "to-regex-range": "^5.0.1" }, @@ -2683,6 +2587,7 @@ "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, + "license": "MIT", "dependencies": { "locate-path": "^6.0.0", "path-exists": "^4.0.0" @@ -2695,39 +2600,49 @@ } }, "node_modules/flat-cache": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", - "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", "dev": true, + "license": "MIT", "dependencies": { "flatted": "^3.2.9", - "keyv": "^4.5.3", - "rimraf": "^3.0.2" + "keyv": "^4.5.4" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": ">=16" } }, "node_modules/flatted": { - "version": "3.2.9", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.9.tgz", - "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==", - "dev": true + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", + "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", + "dev": true, + "license": "ISC" }, - "node_modules/for-each": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", - "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "node_modules/foreground-child": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.0.tgz", + "integrity": "sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==", "dev": true, + "license": "ISC", "dependencies": { - "is-callable": "^1.1.3" + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/fsevents": { "version": "2.3.3", @@ -2735,6 +2650,7 @@ "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "dev": true, "hasInstallScript": true, + "license": "MIT", "optional": true, "os": [ "darwin" @@ -2743,65 +2659,13 @@ "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, - "node_modules/function-bind": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", - "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/functions-have-names": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", - "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-func-name": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", - "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/get-intrinsic": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.2.tgz", - "integrity": "sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.2", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "hasown": "^2.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-stream": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", - "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==", - "dev": true, - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/glob": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "deprecated": "Glob versions prior to v9 are no longer supported", "dev": true, + "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -2817,15 +2681,16 @@ } }, "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, + "license": "ISC", "dependencies": { - "is-glob": "^4.0.1" + "is-glob": "^4.0.3" }, "engines": { - "node": ">= 6" + "node": ">=10.13.0" } }, "node_modules/glob/node_modules/minimatch": { @@ -2833,6 +2698,7 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -2841,15 +2707,13 @@ } }, "node_modules/globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", "dev": true, - "dependencies": { - "type-fest": "^0.20.2" - }, + "license": "MIT", "engines": { - "node": ">=8" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -2859,159 +2723,46 @@ "version": "0.1.0", "resolved": "https://registry.npmjs.org/globalyzer/-/globalyzer-0.1.0.tgz", "integrity": "sha512-40oNTM9UfG6aBmuKxk/giHn5nQ8RVz/SS4Ir6zgzOv9/qC3kKZ9v4etGTcJbEl/NyVQH7FGU7d+X1egr57Md2Q==", - "dev": true - }, - "node_modules/globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", "dev": true, - "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } + "license": "MIT" }, "node_modules/globrex": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/globrex/-/globrex-0.1.2.tgz", "integrity": "sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==", - "dev": true - }, - "node_modules/gopd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", - "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", "dev": true, - "dependencies": { - "get-intrinsic": "^1.1.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true + "license": "MIT" }, "node_modules/graphemer": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", - "dev": true - }, - "node_modules/has-bigints": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", - "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } + "license": "MIT" }, "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, - "node_modules/has-property-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz", - "integrity": "sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==", - "dev": true, - "dependencies": { - "get-intrinsic": "^1.2.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", - "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-tostringtag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", - "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", - "dev": true, - "dependencies": { - "has-symbols": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/hasown": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", - "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/html-escaper": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", - "dev": true - }, - "node_modules/human-signals": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz", - "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==", "dev": true, - "engines": { - "node": ">=16.17.0" - } + "license": "MIT" }, "node_modules/ignore": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.0.tgz", - "integrity": "sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", "dev": true, + "license": "MIT", "engines": { "node": ">= 4" } @@ -3021,6 +2772,7 @@ "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-5.0.1.tgz", "integrity": "sha512-yemi4pMf51WKT7khInJqAvsIGzoqYXblnsz0ql8tM+yi1EKYTY1evX4NAbJrLL/Aanr2HyZeluqU+Oi7MGHokw==", "dev": true, + "license": "ISC", "dependencies": { "minimatch": "^5.0.1" }, @@ -3033,6 +2785,7 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -3045,6 +2798,7 @@ "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", "dev": true, + "license": "MIT", "dependencies": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" @@ -3057,10 +2811,11 @@ } }, "node_modules/import-meta-resolve": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/import-meta-resolve/-/import-meta-resolve-4.0.0.tgz", - "integrity": "sha512-okYUR7ZQPH+efeuMJGlq4f8ubUgO50kByRPyt/Cy1Io4PSRsPjxME+YlVaCOx+NIToW7hCsZNFJyTPFFKepRSA==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/import-meta-resolve/-/import-meta-resolve-4.1.0.tgz", + "integrity": "sha512-I6fiaX09Xivtk+THaMfAwnA3MVA5Big1WHF1Dfx9hFuvNIWpXnorlkzhcQf6ehrqQiiZECRt1poOAkPmer3ruw==", "dev": true, + "license": "MIT", "funding": { "type": "github", "url": "https://github.com/sponsors/wooorm" @@ -3071,6 +2826,7 @@ "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.8.19" } @@ -3080,6 +2836,7 @@ "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -3088,333 +2845,86 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", "dev": true, + "license": "ISC", "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, - "node_modules/internal-slot": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.6.tgz", - "integrity": "sha512-Xj6dv+PsbtwyPpEflsejS+oIZxmMlV44zAhG479uYu89MsjcYOhCFnNyKrkJrihbsiasQyY0afoCl/9BLR65bg==", - "dev": true, - "dependencies": { - "get-intrinsic": "^1.2.2", - "hasown": "^2.0.0", - "side-channel": "^1.0.4" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/is-arguments": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", - "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-array-buffer": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", - "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.0", - "is-typed-array": "^1.1.10" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-bigint": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", - "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", - "dev": true, - "dependencies": { - "has-bigints": "^1.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-boolean-object": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", - "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-callable": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", - "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-date-object": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", - "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", - "dev": true, - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-map": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.2.tgz", - "integrity": "sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/is-number-object": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", - "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", - "dev": true, - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-reference": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-3.0.2.tgz", - "integrity": "sha512-v3rht/LgVcsdZa3O2Nqs+NMowLOxeOm7Ay9+/ARQ2F+qEoANRcqrjAZKGN0v8ymUetZGgkp26LTnGT7H0Qo9Pg==", - "dependencies": { - "@types/estree": "*" - } - }, - "node_modules/is-regex": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", - "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-set": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.2.tgz", - "integrity": "sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-shared-array-buffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", - "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "once": "^1.3.0", + "wrappy": "1" } }, - "node_modules/is-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", - "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } + "license": "ISC" }, - "node_modules/is-string": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", - "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "dev": true, - "dependencies": { - "has-tostringtag": "^1.0.0" - }, + "license": "MIT", "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=0.10.0" } }, - "node_modules/is-symbol": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", - "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, - "dependencies": { - "has-symbols": "^1.0.2" - }, + "license": "MIT", "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=8" } }, - "node_modules/is-typed-array": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.12.tgz", - "integrity": "sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==", + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, + "license": "MIT", "dependencies": { - "which-typed-array": "^1.1.11" + "is-extglob": "^2.1.1" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=0.10.0" } }, - "node_modules/is-weakmap": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.1.tgz", - "integrity": "sha512-NSBR4kH5oVj1Uwvv970ruUkCV7O1mzgVFO4/rev2cLRda9Tm9HrL70ZPut4rOHgY0FNrUu9BCbXA2sdQ+x0chA==", + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "license": "MIT", + "engines": { + "node": ">=0.12.0" } }, - "node_modules/is-weakset": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.2.tgz", - "integrity": "sha512-t2yVvttHkQktwnNNmBQ98AhENLdPUTDTE21uPqAQ0ARwQfGeQKRVS0NNurH7bTf7RrvcVn1OOge45CnBeHCSmg==", - "dev": true, + "node_modules/is-reference": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-3.0.2.tgz", + "integrity": "sha512-v3rht/LgVcsdZa3O2Nqs+NMowLOxeOm7Ay9+/ARQ2F+qEoANRcqrjAZKGN0v8ymUetZGgkp26LTnGT7H0Qo9Pg==", + "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.1" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "@types/estree": "*" } }, - "node_modules/isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", - "dev": true - }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/istanbul-lib-coverage": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", "dev": true, + "license": "BSD-3-Clause", "engines": { "node": ">=8" } @@ -3424,6 +2934,7 @@ "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "istanbul-lib-coverage": "^3.0.0", "make-dir": "^4.0.0", @@ -3434,24 +2945,26 @@ } }, "node_modules/istanbul-lib-source-maps": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", - "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-5.0.6.tgz", + "integrity": "sha512-yg2d+Em4KizZC5niWhQaIomgf5WlL4vOOjZ5xGCmF8SnPE/mDWWXgvRExdcpCgh9lLRRa1/fSYp2ymmbJ1pI+A==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { + "@jridgewell/trace-mapping": "^0.3.23", "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0", - "source-map": "^0.6.1" + "istanbul-lib-coverage": "^3.0.0" }, "engines": { "node": ">=10" } }, "node_modules/istanbul-reports": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.6.tgz", - "integrity": "sha512-TLgnMkKg3iTDsQ9PbPTdpfAK2DzjF9mqUG7RMgcQl8oFjad8ob4laGxv5XV5U9MAfx8D6tSJiUyuAwzLicaxlg==", + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", + "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "html-escaper": "^2.0.0", "istanbul-lib-report": "^3.0.0" @@ -3460,17 +2973,35 @@ "node": ">=8" } }, + "node_modules/jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, + "license": "MIT", "dependencies": { "argparse": "^2.0.1" }, @@ -3482,31 +3013,29 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true - }, - "node_modules/jsonc-parser": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz", - "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/keyv": { "version": "4.5.4", "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", "dev": true, + "license": "MIT", "dependencies": { "json-buffer": "3.0.1" } @@ -3516,21 +3045,24 @@ "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/known-css-properties": { - "version": "0.29.0", - "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.29.0.tgz", - "integrity": "sha512-Ne7wqW7/9Cz54PDt4I3tcV+hAyat8ypyOGzYRJQfdxnnjeWsTxt1cy8pjvvKeI5kfXuyvULyeeAvwvvtAX3ayQ==", - "dev": true + "version": "0.35.0", + "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.35.0.tgz", + "integrity": "sha512-a/RAk2BfKk+WFGhhOCAYqSiFLc34k8Mt/6NWRI4joER0EYUzXIcFivjjnoD3+XU1DggLn/tZc3DOAgke7l8a4A==", + "dev": true, + "license": "MIT" }, "node_modules/levn": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", "dev": true, + "license": "MIT", "dependencies": { "prelude-ls": "^1.2.1", "type-check": "~0.4.0" @@ -3544,36 +3076,23 @@ "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.1.0.tgz", "integrity": "sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" } }, - "node_modules/local-pkg": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-0.5.0.tgz", - "integrity": "sha512-ok6z3qlYyCDS4ZEU27HaU6x/xZa9Whf8jD4ptH5UZTQYZVYeb9bnZ3ojVhiJNLiXK1Hfc0GNbLXcmZ5plLDDBg==", - "dev": true, - "dependencies": { - "mlly": "^1.4.2", - "pkg-types": "^1.0.3" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/antfu" - } - }, "node_modules/locate-character": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/locate-character/-/locate-character-3.0.0.tgz", - "integrity": "sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA==" + "integrity": "sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA==", + "license": "MIT" }, "node_modules/locate-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, + "license": "MIT", "dependencies": { "p-locate": "^5.0.0" }, @@ -3588,73 +3107,69 @@ "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/loupe": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz", - "integrity": "sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.1.2.tgz", + "integrity": "sha512-23I4pFZHmAemUnz8WZXbYRSKYj801VDaNv9ETuMh7IrMc7VuVVSo+Z9iLE3ni30+U48iDWfi30d3twAXBYmnCg==", "dev": true, - "dependencies": { - "get-func-name": "^2.0.1" - } + "license": "MIT" }, "node_modules/lower-case": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz", "integrity": "sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==", "dev": true, + "license": "MIT", "dependencies": { "tslib": "^2.0.3" } }, "node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } + "license": "ISC" }, "node_modules/lz-string": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.5.0.tgz", "integrity": "sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==", "dev": true, + "license": "MIT", "bin": { "lz-string": "bin/bin.js" } }, "node_modules/magic-string": { - "version": "0.30.5", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.5.tgz", - "integrity": "sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA==", + "version": "0.30.12", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.12.tgz", + "integrity": "sha512-Ea8I3sQMVXr8JhN4z+H/d8zwo+tYDgHE9+5G4Wnrwhs0gaK9fXTKx0Tw5Xwsd/bCPTTZNRAdpyzvoeORe9LYpw==", + "license": "MIT", "dependencies": { - "@jridgewell/sourcemap-codec": "^1.4.15" - }, - "engines": { - "node": ">=12" + "@jridgewell/sourcemap-codec": "^1.5.0" } }, "node_modules/magicast": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/magicast/-/magicast-0.3.2.tgz", - "integrity": "sha512-Fjwkl6a0syt9TFN0JSYpOybxiMCkYNEeOTnOTNRbjphirLakznZXAqrXgj/7GG3D1dvETONNwrBfinvAbpunDg==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/magicast/-/magicast-0.3.5.tgz", + "integrity": "sha512-L0WhttDl+2BOsybvEOLK7fW3UA0OQ0IQ2d6Zl2x/a6vVRs3bAY0ECOSHHeL5jD+SbOpOCUEi0y1DgHEn9Qn1AQ==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/parser": "^7.23.3", - "@babel/types": "^7.23.3", - "source-map-js": "^1.0.2" + "@babel/parser": "^7.25.4", + "@babel/types": "^7.25.4", + "source-map-js": "^1.2.0" } }, "node_modules/make-dir": { @@ -3662,6 +3177,7 @@ "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", "dev": true, + "license": "MIT", "dependencies": { "semver": "^7.5.3" }, @@ -3672,65 +3188,46 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/mdn-data": { - "version": "2.0.30", - "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.30.tgz", - "integrity": "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==" - }, - "node_modules/merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true - }, "node_modules/merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", "dev": true, + "license": "MIT", "engines": { "node": ">= 8" } }, "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "dev": true, + "license": "MIT", "dependencies": { - "braces": "^3.0.2", + "braces": "^3.0.3", "picomatch": "^2.3.1" }, "engines": { "node": ">=8.6" } }, - "node_modules/mimic-fn": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", - "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/min-indent": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/minimatch": { - "version": "9.0.3", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", - "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -3741,37 +3238,14 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/minimist": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/mkdirp": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", - "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", - "dev": true, - "dependencies": { - "minimist": "^1.2.6" - }, - "bin": { - "mkdirp": "bin/cmd.js" - } - }, - "node_modules/mlly": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.4.2.tgz", - "integrity": "sha512-i/Ykufi2t1EZ6NaPLdfnZk2AX8cs0d+mTzVKuPfqPKPatxLApaBoxJQ9x1/uckXtrS/U5oisPMDkNs0yQTaBRg==", + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", "dev": true, - "dependencies": { - "acorn": "^8.10.0", - "pathe": "^1.1.1", - "pkg-types": "^1.0.3", - "ufo": "^1.3.0" + "license": "ISC", + "engines": { + "node": ">=16 || 14 >=14.17" } }, "node_modules/mri": { @@ -3779,6 +3253,7 @@ "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz", "integrity": "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } @@ -3788,15 +3263,17 @@ "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-2.0.0.tgz", "integrity": "sha512-eu38+hdgojoyq63s+yTpN4XMBdt5l8HhMhc4VKLO9KM5caLIBvUm4thi7fFaxyTmCKeNnXZ5pAlBwCUnhA09uw==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" } }, "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" }, "node_modules/nanoid": { "version": "3.3.7", @@ -3809,6 +3286,7 @@ "url": "https://github.com/sponsors/ai" } ], + "license": "MIT", "bin": { "nanoid": "bin/nanoid.cjs" }, @@ -3820,32 +3298,26 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/no-case": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz", "integrity": "sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==", "dev": true, + "license": "MIT", "dependencies": { "lower-case": "^2.0.2", "tslib": "^2.0.3" } }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/npm-bundled": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-2.0.1.tgz", "integrity": "sha512-gZLxXdjEzE/+mOstGDqR6b0EkhJ+kM6fxM6vUuckuctuVPh80Q6pw/rSZj9s4Gex9GxWtIicO1pc8DB9KZWudw==", "dev": true, + "license": "ISC", "dependencies": { "npm-normalize-package-bin": "^2.0.0" }, @@ -3858,6 +3330,7 @@ "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-2.0.0.tgz", "integrity": "sha512-awzfKUO7v0FscrSpRoogyNm0sajikhBWpU0QMrW09AMi9n1PoKU6WaIqUzuJSQnpciZZmJ/jMZ2Egfmb/9LiWQ==", "dev": true, + "license": "ISC", "engines": { "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } @@ -3867,6 +3340,7 @@ "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-5.1.3.tgz", "integrity": "sha512-263/0NGrn32YFYi4J533qzrQ/krmmrWwhKkzwTuM4f/07ug51odoaNjUexxO4vxlzURHcmYMH1QjvHjsNDKLVg==", "dev": true, + "license": "ISC", "dependencies": { "glob": "^8.0.1", "ignore-walk": "^5.0.1", @@ -3880,121 +3354,29 @@ "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, - "node_modules/npm-run-path": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.2.0.tgz", - "integrity": "sha512-W4/tgAXFqFA0iL7fk0+uQ3g7wkL8xJmx3XdK0VGb4cHW//eZTtKGvFBBoRKVTpY7n6ze4NL9ly7rgXcHufqXKg==", - "dev": true, - "dependencies": { - "path-key": "^4.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/npm-run-path/node_modules/path-key": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", - "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/object-inspect": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", - "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object-is": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz", - "integrity": "sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/object.assign": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", - "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.5", - "define-properties": "^1.2.1", - "has-symbols": "^1.0.3", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "dev": true, + "license": "ISC", "dependencies": { "wrappy": "1" } }, - "node_modules/onetime": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", - "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", - "dev": true, - "dependencies": { - "mimic-fn": "^4.0.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/optionator": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", - "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", "dev": true, + "license": "MIT", "dependencies": { - "@aashutoshrathi/word-wrap": "^1.2.3", "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", "levn": "^0.4.1", "prelude-ls": "^1.2.1", - "type-check": "^0.4.0" + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" }, "engines": { "node": ">= 0.8.0" @@ -4005,6 +3387,7 @@ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, + "license": "MIT", "dependencies": { "yocto-queue": "^0.1.0" }, @@ -4020,6 +3403,7 @@ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, + "license": "MIT", "dependencies": { "p-limit": "^3.0.2" }, @@ -4030,11 +3414,19 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/package-json-from-dist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", + "dev": true, + "license": "BlueOak-1.0.0" + }, "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", "dev": true, + "license": "MIT", "dependencies": { "callsites": "^3.0.0" }, @@ -4047,6 +3439,7 @@ "resolved": "https://registry.npmjs.org/pascal-case/-/pascal-case-3.1.2.tgz", "integrity": "sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==", "dev": true, + "license": "MIT", "dependencies": { "no-case": "^3.0.4", "tslib": "^2.0.3" @@ -4057,73 +3450,68 @@ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, - "node_modules/path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, "engines": { - "node": ">=8" + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/pathe": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.1.tgz", - "integrity": "sha512-d+RQGp0MAYTIaDBIMmOfMwz3E+LOZnxx1HZd5R18mmCZY0QBlK0LDZfPc8FW8Ed2DlvsuE6PRjroDY+wg4+j/Q==", - "dev": true + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.2.tgz", + "integrity": "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==", + "dev": true, + "license": "MIT" }, "node_modules/pathval": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", - "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-2.0.0.tgz", + "integrity": "sha512-vE7JKRyES09KiunauX7nd2Q9/L7lhok4smP9RZTDeD4MVs72Dp2qNFVz39Nz5a0FVEW0BJR6C0DYrq6unoziZA==", "dev": true, + "license": "MIT", "engines": { - "node": "*" - } - }, - "node_modules/periscopic": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/periscopic/-/periscopic-3.1.0.tgz", - "integrity": "sha512-vKiQ8RRtkl9P+r/+oefh25C3fhybptkHKCZSPlcXiJux2tJF55GnEj3BVn4A5gKfq9NWWXXrxkHBwVPUfH0opw==", - "dependencies": { - "@types/estree": "^1.0.0", - "estree-walker": "^3.0.0", - "is-reference": "^3.0.0" + "node": ">= 14.16" } }, "node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "dev": true + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" }, "node_modules/picomatch": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true, + "license": "MIT", "engines": { "node": ">=8.6" }, @@ -4131,21 +3519,10 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/pkg-types": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.0.3.tgz", - "integrity": "sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A==", - "dev": true, - "dependencies": { - "jsonc-parser": "^3.2.0", - "mlly": "^1.2.0", - "pathe": "^1.1.0" - } - }, "node_modules/postcss": { - "version": "8.4.32", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.32.tgz", - "integrity": "sha512-D/kj5JNu6oo2EIy+XL/26JEDTlIbB8hw85G8StOE6L74RQAVVP5rej6wxCNqyMbR4RkPfqvezVbPw81Ngd6Kcw==", + "version": "8.4.47", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.47.tgz", + "integrity": "sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==", "dev": true, "funding": [ { @@ -4161,10 +3538,11 @@ "url": "https://github.com/sponsors/ai" } ], + "license": "MIT", "dependencies": { "nanoid": "^3.3.7", - "picocolors": "^1.0.0", - "source-map-js": "^1.0.2" + "picocolors": "^1.1.0", + "source-map-js": "^1.2.1" }, "engines": { "node": "^10 || ^12 || >=14" @@ -4175,6 +3553,7 @@ "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-3.1.4.tgz", "integrity": "sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg==", "dev": true, + "license": "MIT", "dependencies": { "lilconfig": "^2.0.5", "yaml": "^1.10.2" @@ -4204,6 +3583,7 @@ "resolved": "https://registry.npmjs.org/postcss-safe-parser/-/postcss-safe-parser-6.0.0.tgz", "integrity": "sha512-FARHN8pwH+WiS2OPCxJI8FuRJpTVnn6ZNFiqAM2aeW2LwTHWWmWgIyKC6cUo0L8aeKiF/14MNvnpls6R2PBeMQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=12.0" }, @@ -4234,6 +3614,7 @@ "url": "https://github.com/sponsors/ai" } ], + "license": "MIT", "engines": { "node": ">=12.0" }, @@ -4242,10 +3623,11 @@ } }, "node_modules/postcss-selector-parser": { - "version": "6.0.15", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.15.tgz", - "integrity": "sha512-rEYkQOMUCEMhsKbK66tbEU9QVIxbhN18YiniAwA7XQYTVBqrBy+P2p5JcdqsHgKM2zWylp8d7J6eszocfds5Sw==", + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.2.tgz", + "integrity": "sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==", "dev": true, + "license": "MIT", "dependencies": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" @@ -4259,15 +3641,17 @@ "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.8.0" } }, "node_modules/prettier": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.1.1.tgz", - "integrity": "sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz", + "integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==", "dev": true, + "license": "MIT", "bin": { "prettier": "bin/prettier.cjs" }, @@ -4279,27 +3663,29 @@ } }, "node_modules/prettier-plugin-svelte": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/prettier-plugin-svelte/-/prettier-plugin-svelte-3.1.2.tgz", - "integrity": "sha512-7xfMZtwgAWHMT0iZc8jN4o65zgbAQ3+O32V6W7pXrqNvKnHnkoyQCGCbKeUyXKZLbYE0YhFRnamfxfkEGxm8qA==", + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/prettier-plugin-svelte/-/prettier-plugin-svelte-3.2.7.tgz", + "integrity": "sha512-/Dswx/ea0lV34If1eDcG3nulQ63YNr5KPDfMsjbdtpSWOxKKJ7nAc2qlVuYwEvCr4raIuredNoR7K4JCkmTGaQ==", "dev": true, + "license": "MIT", "peerDependencies": { "prettier": "^3.0.0", "svelte": "^3.2.0 || ^4.0.0-next.0 || ^5.0.0-next.0" } }, "node_modules/pretty-format": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", - "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz", + "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==", "dev": true, + "license": "MIT", "dependencies": { - "@jest/schemas": "^29.6.3", + "ansi-regex": "^5.0.1", "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" + "react-is": "^17.0.1" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, "node_modules/pretty-format/node_modules/ansi-styles": { @@ -4307,6 +3693,7 @@ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -4315,13 +3702,14 @@ } }, "node_modules/publint": { - "version": "0.1.16", - "resolved": "https://registry.npmjs.org/publint/-/publint-0.1.16.tgz", - "integrity": "sha512-wJgk7HnXDT5Ap0DjFYbGz78kPkN44iQvDiaq8P63IEEyNU9mYXvaMd2cAyIM6OgqXM/IA3CK6XWIsRq+wjNpgw==", + "version": "0.2.12", + "resolved": "https://registry.npmjs.org/publint/-/publint-0.2.12.tgz", + "integrity": "sha512-YNeUtCVeM4j9nDiTT2OPczmlyzOkIXNtdDZnSuajAxS/nZ6j3t7Vs9SUB4euQNddiltIwu7Tdd3s+hr08fAsMw==", "dev": true, + "license": "MIT", "dependencies": { "npm-packlist": "^5.1.3", - "picocolors": "^1.0.0", + "picocolors": "^1.1.1", "sade": "^1.8.1" }, "bin": { @@ -4339,6 +3727,7 @@ "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -4361,24 +3750,28 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "license": "MIT" }, "node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", - "dev": true + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", + "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", + "dev": true, + "license": "MIT" }, "node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.0.2.tgz", + "integrity": "sha512-yDMz9g+VaZkqBYS/ozoBJwaBhTbZo3UNYQHNRw1D3UFQB8oHB4uS/tAODO+ZLjGWmUbKnIlOWO+aaIiAxrUWHA==", "dev": true, - "dependencies": { - "picomatch": "^2.2.1" - }, + "license": "MIT", "engines": { - "node": ">=8.10.0" + "node": ">= 14.16.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" } }, "node_modules/redent": { @@ -4386,6 +3779,7 @@ "resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz", "integrity": "sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==", "dev": true, + "license": "MIT", "dependencies": { "indent-string": "^4.0.0", "strip-indent": "^3.0.0" @@ -4398,30 +3792,15 @@ "version": "0.14.1", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", - "dev": true - }, - "node_modules/regexp.prototype.flags": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz", - "integrity": "sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==", "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "set-function-name": "^2.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } + "license": "MIT" }, "node_modules/resolve-from": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } @@ -4431,73 +3810,21 @@ "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", "dev": true, + "license": "MIT", "engines": { "iojs": ">=1.0.0", "node": ">=0.10.0" } }, - "node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/rimraf/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/rimraf/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/rimraf/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "node_modules/rollup": { + "version": "4.24.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.24.1.tgz", + "integrity": "sha512-2lhtdsnyxlfBAZVh9tfriEc1nV9HxjQGnqEpd7z7cWXuLbI4jHWDhAvw6JGs0AVcnYqv0gL7Mjuj/utxW2wPBw==", "dev": true, + "license": "MIT", "dependencies": { - "brace-expansion": "^1.1.7" + "@types/estree": "1.0.6" }, - "engines": { - "node": "*" - } - }, - "node_modules/rollup": { - "version": "4.9.2", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.9.2.tgz", - "integrity": "sha512-66RB8OtFKUTozmVEh3qyNfH+b+z2RXBVloqO2KCC/pjFaGaHtxP9fVfOQKPSGXg2mElmjmxjW/fZ7iKrEpMH5Q==", - "dev": true, "bin": { "rollup": "dist/bin/rollup" }, @@ -4506,19 +3833,24 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.9.2", - "@rollup/rollup-android-arm64": "4.9.2", - "@rollup/rollup-darwin-arm64": "4.9.2", - "@rollup/rollup-darwin-x64": "4.9.2", - "@rollup/rollup-linux-arm-gnueabihf": "4.9.2", - "@rollup/rollup-linux-arm64-gnu": "4.9.2", - "@rollup/rollup-linux-arm64-musl": "4.9.2", - "@rollup/rollup-linux-riscv64-gnu": "4.9.2", - "@rollup/rollup-linux-x64-gnu": "4.9.2", - "@rollup/rollup-linux-x64-musl": "4.9.2", - "@rollup/rollup-win32-arm64-msvc": "4.9.2", - "@rollup/rollup-win32-ia32-msvc": "4.9.2", - "@rollup/rollup-win32-x64-msvc": "4.9.2", + "@rollup/rollup-android-arm-eabi": "4.24.1", + "@rollup/rollup-android-arm64": "4.24.1", + "@rollup/rollup-darwin-arm64": "4.24.1", + "@rollup/rollup-darwin-x64": "4.24.1", + "@rollup/rollup-freebsd-arm64": "4.24.1", + "@rollup/rollup-freebsd-x64": "4.24.1", + "@rollup/rollup-linux-arm-gnueabihf": "4.24.1", + "@rollup/rollup-linux-arm-musleabihf": "4.24.1", + "@rollup/rollup-linux-arm64-gnu": "4.24.1", + "@rollup/rollup-linux-arm64-musl": "4.24.1", + "@rollup/rollup-linux-powerpc64le-gnu": "4.24.1", + "@rollup/rollup-linux-riscv64-gnu": "4.24.1", + "@rollup/rollup-linux-s390x-gnu": "4.24.1", + "@rollup/rollup-linux-x64-gnu": "4.24.1", + "@rollup/rollup-linux-x64-musl": "4.24.1", + "@rollup/rollup-win32-arm64-msvc": "4.24.1", + "@rollup/rollup-win32-ia32-msvc": "4.24.1", + "@rollup/rollup-win32-x64-msvc": "4.24.1", "fsevents": "~2.3.2" } }, @@ -4541,6 +3873,7 @@ "url": "https://feross.org/support" } ], + "license": "MIT", "dependencies": { "queue-microtask": "^1.2.2" } @@ -4550,6 +3883,7 @@ "resolved": "https://registry.npmjs.org/sade/-/sade-1.8.1.tgz", "integrity": "sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==", "dev": true, + "license": "MIT", "dependencies": { "mri": "^1.1.0" }, @@ -4557,80 +3891,12 @@ "node": ">=6" } }, - "node_modules/sander": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/sander/-/sander-0.5.1.tgz", - "integrity": "sha512-3lVqBir7WuKDHGrKRDn/1Ye3kwpXaDOMsiRP1wd6wpZW56gJhsbp5RqQpA6JG/P+pkXizygnr1dKR8vzWaVsfA==", - "dev": true, - "dependencies": { - "es6-promise": "^3.1.2", - "graceful-fs": "^4.1.3", - "mkdirp": "^0.5.1", - "rimraf": "^2.5.2" - } - }, - "node_modules/sander/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/sander/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/sander/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/sander/node_modules/rimraf": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", - "dev": true, - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - } - }, "node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, + "license": "ISC", "bin": { "semver": "bin/semver.js" }, @@ -4639,45 +3905,18 @@ } }, "node_modules/set-cookie-parser": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.6.0.tgz", - "integrity": "sha512-RVnVQxTXuerk653XfuliOxBP81Sf0+qfQE73LIYKcyMYHG94AuH0kgrQpRDuTZnSmjpysHmzxJXKNfa6PjFhyQ==", - "dev": true - }, - "node_modules/set-function-length": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.1.1.tgz", - "integrity": "sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==", - "dev": true, - "dependencies": { - "define-data-property": "^1.1.1", - "get-intrinsic": "^1.2.1", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/set-function-name": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.1.tgz", - "integrity": "sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==", + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.7.1.tgz", + "integrity": "sha512-IOc8uWeOZgnb3ptbCURJWNjWUPcO3ZnTTdzsurqERrP6nPyv+paC55vJM0LpOlT2ne+Ix+9+CRG1MNLlyZ4GjQ==", "dev": true, - "dependencies": { - "define-data-property": "^1.0.1", - "functions-have-names": "^1.2.3", - "has-property-descriptors": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - } + "license": "MIT" }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, + "license": "MIT", "dependencies": { "shebang-regex": "^3.0.0" }, @@ -4690,35 +3929,24 @@ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, - "node_modules/side-channel": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/siginfo": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/signal-exit": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", "dev": true, + "license": "ISC", "engines": { "node": ">=14" }, @@ -4727,56 +3955,26 @@ } }, "node_modules/sirv": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/sirv/-/sirv-2.0.4.tgz", - "integrity": "sha512-94Bdh3cC2PKrbgSOUqTiGPWVZeSiXfKOVZNJniWoqrWrRkB1CJzBU3NEbiTsPcYy1lDsANA/THzS+9WBiy5nfQ==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/sirv/-/sirv-3.0.0.tgz", + "integrity": "sha512-BPwJGUeDaDCHihkORDchNyyTvWFhcusy1XMmhEVTQTwGeybFbp8YEmB+njbPnth1FibULBSBVwCQni25XlCUDg==", "dev": true, + "license": "MIT", "dependencies": { "@polka/url": "^1.0.0-next.24", "mrmime": "^2.0.0", "totalist": "^3.0.0" }, "engines": { - "node": ">= 10" - } - }, - "node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/sorcery": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/sorcery/-/sorcery-0.11.0.tgz", - "integrity": "sha512-J69LQ22xrQB1cIFJhPfgtLuI6BpWRiWu1Y3vSsIwK/eAScqJxd/+CJlUuHQRdX2C9NGFamq+KqNywGgaThwfHw==", - "dev": true, - "dependencies": { - "@jridgewell/sourcemap-codec": "^1.4.14", - "buffer-crc32": "^0.2.5", - "minimist": "^1.2.0", - "sander": "^0.5.0" - }, - "bin": { - "sorcery": "bin/sorcery" - } - }, - "node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "engines": { - "node": ">=0.10.0" + "node": ">=18" } }, "node_modules/source-map-js": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", - "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "dev": true, + "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" } @@ -4785,31 +3983,93 @@ "version": "0.0.2", "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/std-env": { "version": "3.7.0", "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.7.0.tgz", "integrity": "sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg==", - "dev": true + "dev": true, + "license": "MIT" }, - "node_modules/stop-iteration-iterator": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.0.0.tgz", - "integrity": "sha512-iCGQj+0l0HOdZ2AEeBADlsRC+vsnDsZsbdSiH1yNSjcfKM7fdpCMfqAL/dwF5BLiw/XhRft/Wax6zQbhq2BcjQ==", + "node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", "dev": true, + "license": "MIT", "dependencies": { - "internal-slot": "^1.0.4" + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" }, "engines": { - "node": ">= 0.4" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/string-width-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" } }, "node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, + "license": "MIT", "dependencies": { "ansi-regex": "^5.0.1" }, @@ -4817,16 +4077,17 @@ "node": ">=8" } }, - "node_modules/strip-final-newline": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", - "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", + "node_modules/strip-ansi/node_modules/ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", "dev": true, + "license": "MIT", "engines": { "node": ">=12" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/chalk/ansi-regex?sponsor=1" } }, "node_modules/strip-indent": { @@ -4834,6 +4095,7 @@ "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", "dev": true, + "license": "MIT", "dependencies": { "min-indent": "^1.0.0" }, @@ -4846,6 +4108,7 @@ "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" }, @@ -4853,23 +4116,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/strip-literal": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-1.3.0.tgz", - "integrity": "sha512-PugKzOsyXpArk0yWmUwqOZecSO0GH0bPoctLcqNDH9J04pVW3lflYE0ujElBGTloevcxF5MofAOZ7C5l2b+wLg==", - "dev": true, - "dependencies": { - "acorn": "^8.10.0" - }, - "funding": { - "url": "https://github.com/sponsors/antfu" - } - }, "node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -4878,184 +4130,152 @@ } }, "node_modules/svelte": { - "version": "4.2.8", - "resolved": "https://registry.npmjs.org/svelte/-/svelte-4.2.8.tgz", - "integrity": "sha512-hU6dh1MPl8gh6klQZwK/n73GiAHiR95IkFsesLPbMeEZi36ydaXL/ZAb4g9sayT0MXzpxyZjR28yderJHxcmYA==", + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/svelte/-/svelte-5.1.3.tgz", + "integrity": "sha512-Sl8UFHlBvF54aK8MElFvyvaUfPE2REOz6LnhR2pBClCL11MU4qpn4V+KgAggaXxDyrP2iQixvHbtpHqL/zXlSQ==", + "license": "MIT", "dependencies": { - "@ampproject/remapping": "^2.2.1", - "@jridgewell/sourcemap-codec": "^1.4.15", - "@jridgewell/trace-mapping": "^0.3.18", - "acorn": "^8.9.0", - "aria-query": "^5.3.0", - "axobject-query": "^3.2.1", - "code-red": "^1.0.3", - "css-tree": "^2.3.1", - "estree-walker": "^3.0.3", - "is-reference": "^3.0.1", + "@ampproject/remapping": "^2.3.0", + "@jridgewell/sourcemap-codec": "^1.5.0", + "@types/estree": "^1.0.5", + "acorn": "^8.12.1", + "acorn-typescript": "^1.4.13", + "aria-query": "^5.3.1", + "axobject-query": "^4.1.0", + "esm-env": "^1.0.0", + "esrap": "^1.2.2", + "is-reference": "^3.0.2", "locate-character": "^3.0.0", - "magic-string": "^0.30.4", - "periscopic": "^3.1.0" + "magic-string": "^0.30.11", + "zimmerframe": "^1.1.2" }, "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/svelte-check": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/svelte-check/-/svelte-check-3.6.2.tgz", - "integrity": "sha512-E6iFh4aUCGJLRz6QZXH3gcN/VFfkzwtruWSRmlKrLWQTiO6VzLsivR6q02WYLGNAGecV3EocqZuCDrC2uttZ0g==", + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/svelte-check/-/svelte-check-4.0.5.tgz", + "integrity": "sha512-icBTBZ3ibBaywbXUat3cK6hB5Du+Kq9Z8CRuyLmm64XIe2/r+lQcbuBx/IQgsbrC+kT2jQ0weVpZSSRIPwB6jQ==", "dev": true, + "license": "MIT", "dependencies": { - "@jridgewell/trace-mapping": "^0.3.17", - "chokidar": "^3.4.1", - "fast-glob": "^3.2.7", - "import-fresh": "^3.2.1", + "@jridgewell/trace-mapping": "^0.3.25", + "chokidar": "^4.0.1", + "fdir": "^6.2.0", "picocolors": "^1.0.0", - "sade": "^1.7.4", - "svelte-preprocess": "^5.1.0", - "typescript": "^5.0.3" + "sade": "^1.7.4" }, "bin": { "svelte-check": "bin/svelte-check" }, + "engines": { + "node": ">= 18.0.0" + }, "peerDependencies": { - "svelte": "^3.55.0 || ^4.0.0-next.0 || ^4.0.0 || ^5.0.0-next.0" + "svelte": "^4.0.0 || ^5.0.0-next.0", + "typescript": ">=5.0.0" } }, - "node_modules/svelte-eslint-parser": { - "version": "0.33.1", - "resolved": "https://registry.npmjs.org/svelte-eslint-parser/-/svelte-eslint-parser-0.33.1.tgz", - "integrity": "sha512-vo7xPGTlKBGdLH8T5L64FipvTrqv3OQRx9d2z5X05KKZDlF4rQk8KViZO4flKERY+5BiVdOh7zZ7JGJWo5P0uA==", + "node_modules/svelte-check/node_modules/fdir": { + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.2.tgz", + "integrity": "sha512-KnhMXsKSPZlAhp7+IjUkRZKPb4fUyccpDrdFXbi4QL1qkmFh9kVY09Yox+n4MaOb3lHZ1Tv829C3oaaXoMYPDQ==", "dev": true, - "dependencies": { - "eslint-scope": "^7.0.0", - "eslint-visitor-keys": "^3.0.0", - "espree": "^9.0.0", - "postcss": "^8.4.29", - "postcss-scss": "^4.0.8" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ota-meshi" - }, + "license": "MIT", "peerDependencies": { - "svelte": "^3.37.0 || ^4.0.0" + "picomatch": "^3 || ^4" }, "peerDependenciesMeta": { - "svelte": { + "picomatch": { "optional": true } } }, - "node_modules/svelte-hmr": { - "version": "0.15.3", - "resolved": "https://registry.npmjs.org/svelte-hmr/-/svelte-hmr-0.15.3.tgz", - "integrity": "sha512-41snaPswvSf8TJUhlkoJBekRrABDXDMdpNpT2tfHIv4JuhgvHqLMhEPGtaQn0BmbNSTkuz2Ed20DF2eHw0SmBQ==", + "node_modules/svelte-check/node_modules/picomatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", + "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", "dev": true, + "license": "MIT", + "optional": true, + "peer": true, "engines": { - "node": "^12.20 || ^14.13.1 || >= 16" + "node": ">=12" }, - "peerDependencies": { - "svelte": "^3.19.0 || ^4.0.0" - } - }, - "node_modules/svelte-keyed": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/svelte-keyed/-/svelte-keyed-2.0.0.tgz", - "integrity": "sha512-7TeEn+QbJC2OJrHiuM0T8vMBkms3DNpTE+Ir+NtnVBnBMA78aL4f1ft9t0Hn/pBbD/TnIXi4YfjFRAgtN+DZ5g==", - "peerDependencies": { - "svelte": "^4.0.0" + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/svelte-preprocess": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/svelte-preprocess/-/svelte-preprocess-5.1.3.tgz", - "integrity": "sha512-xxAkmxGHT+J/GourS5mVJeOXZzne1FR5ljeOUAMXUkfEhkLEllRreXpbl3dIYJlcJRfL1LO1uIAPpBpBfiqGPw==", + "node_modules/svelte-eslint-parser": { + "version": "0.43.0", + "resolved": "https://registry.npmjs.org/svelte-eslint-parser/-/svelte-eslint-parser-0.43.0.tgz", + "integrity": "sha512-GpU52uPKKcVnh8tKN5P4UZpJ/fUDndmq7wfsvoVXsyP+aY0anol7Yqo01fyrlaWGMFfm4av5DyrjlaXdLRJvGA==", "dev": true, - "hasInstallScript": true, + "license": "MIT", "dependencies": { - "@types/pug": "^2.0.6", - "detect-indent": "^6.1.0", - "magic-string": "^0.30.5", - "sorcery": "^0.11.0", - "strip-indent": "^3.0.0" + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "postcss": "^8.4.39", + "postcss-scss": "^4.0.9" }, "engines": { - "node": ">= 16.0.0", - "pnpm": "^8.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ota-meshi" }, "peerDependencies": { - "@babel/core": "^7.10.2", - "coffeescript": "^2.5.1", - "less": "^3.11.3 || ^4.0.0", - "postcss": "^7 || ^8", - "postcss-load-config": "^2.1.0 || ^3.0.0 || ^4.0.0 || ^5.0.0", - "pug": "^3.0.0", - "sass": "^1.26.8", - "stylus": "^0.55.0", - "sugarss": "^2.0.0 || ^3.0.0 || ^4.0.0", - "svelte": "^3.23.0 || ^4.0.0-next.0 || ^4.0.0 || ^5.0.0-next.0", - "typescript": ">=3.9.5 || ^4.0.0 || ^5.0.0" + "svelte": "^3.37.0 || ^4.0.0 || ^5.0.0" }, "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "coffeescript": { - "optional": true - }, - "less": { - "optional": true - }, - "postcss": { - "optional": true - }, - "postcss-load-config": { - "optional": true - }, - "pug": { - "optional": true - }, - "sass": { - "optional": true - }, - "stylus": { - "optional": true - }, - "sugarss": { - "optional": true - }, - "typescript": { + "svelte": { "optional": true } } }, - "node_modules/svelte-render": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/svelte-render/-/svelte-render-2.0.1.tgz", - "integrity": "sha512-RpB0SurwXm4xhjvHHtjeqMmvd645FURb79GFOotScOSqnKK5vpqBgoBPGC0pp+E/eZgDSQ9rRAdn/+N4ys1mXQ==", + "node_modules/svelte-eslint-parser/node_modules/eslint-scope": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "dev": true, + "license": "BSD-2-Clause", "dependencies": { - "svelte-subscribe": "^2.0.0" + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" }, - "peerDependencies": { - "svelte": "^4.0.0" + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/svelte-subscribe": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/svelte-subscribe/-/svelte-subscribe-2.0.1.tgz", - "integrity": "sha512-eKXIjLxB4C7eQWPqKEdxcGfNXm2g/qJ67zmEZK/GigCZMfrTR3m7DPY93R6MX+5uoqM1FRYxl8LZ1oy4URWi2A==", - "peerDependencies": { - "svelte": "^4.0.0" + "node_modules/svelte-eslint-parser/node_modules/espree": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, "node_modules/svelte2tsx": { - "version": "0.6.27", - "resolved": "https://registry.npmjs.org/svelte2tsx/-/svelte2tsx-0.6.27.tgz", - "integrity": "sha512-E1uPW1o6VsbRz+nUk3fznZ2lSmCITAJoNu8AYefWSvIwE2pSB01i5sId4RMbWNzfcwCQl1DcgGShCPcldl4rvg==", + "version": "0.7.22", + "resolved": "https://registry.npmjs.org/svelte2tsx/-/svelte2tsx-0.7.22.tgz", + "integrity": "sha512-hf55ujq17ufVpDQlJzaQfRr9EjlLIwGmFlpKq4uYrQAQFw/99q1OcVYyBT6568iJySgBUY9PdccURrORmfetmQ==", "dev": true, + "license": "MIT", "dependencies": { "dedent-js": "^1.0.1", "pascal-case": "^3.1.1" @@ -5066,108 +4286,101 @@ } }, "node_modules/test-exclude": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", - "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-7.0.1.tgz", + "integrity": "sha512-pFYqmTw68LXVjeWJMST4+borgQP2AyMNbg1BpZh9LbyhUeNkeaPF9gzfPGUAnSMV3qPYdWUwDIjjCLiSDOl7vg==", "dev": true, + "license": "ISC", "dependencies": { "@istanbuljs/schema": "^0.1.2", - "glob": "^7.1.4", - "minimatch": "^3.0.4" + "glob": "^10.4.1", + "minimatch": "^9.0.4" }, "engines": { - "node": ">=8" - } - }, - "node_modules/test-exclude/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "node": ">=18" } }, "node_modules/test-exclude/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", "dev": true, + "license": "ISC", "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" }, - "engines": { - "node": "*" + "bin": { + "glob": "dist/esm/bin.mjs" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/test-exclude/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, "node_modules/text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/tiny-glob": { "version": "0.2.9", "resolved": "https://registry.npmjs.org/tiny-glob/-/tiny-glob-0.2.9.tgz", "integrity": "sha512-g/55ssRPUjShh+xkfx9UPDXqhckHEsHr4Vd9zX55oSdGZc/MD0m3sferOkwWtp98bv+kcVfEHtRJgBVJzelrzg==", "dev": true, + "license": "MIT", "dependencies": { "globalyzer": "0.1.0", "globrex": "^0.1.2" } }, "node_modules/tinybench": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.5.1.tgz", - "integrity": "sha512-65NKvSuAVDP/n4CqH+a9w2kTlLReS9vhsAP06MWx+/89nMinJyB2icyl58RIcqCmIggpojIGeuJGhjU1aGMBSg==", - "dev": true + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz", + "integrity": "sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==", + "dev": true, + "license": "MIT" + }, + "node_modules/tinyexec": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.1.tgz", + "integrity": "sha512-WiCJLEECkO18gwqIp6+hJg0//p23HXp4S+gGtAKu3mI2F2/sXC4FvHvXvB0zJVVaTPhx1/tOwdbRsa1sOBIKqQ==", + "dev": true, + "license": "MIT" }, "node_modules/tinypool": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-0.8.1.tgz", - "integrity": "sha512-zBTCK0cCgRROxvs9c0CGK838sPkeokNGdQVUUwHAbynHFlmyJYj825f/oRs528HaIJ97lo0pLIlDUzwN+IorWg==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-1.0.1.tgz", + "integrity": "sha512-URZYihUbRPcGv95En+sz6MfghfIc2OJ1sv/RmhWZLouPY0/8Vo80viwPvg3dlaS9fuq7fQMEfgRRK7BBZThBEA==", "dev": true, + "license": "MIT", "engines": { - "node": ">=14.0.0" + "node": "^18.0.0 || >=20.0.0" } }, - "node_modules/tinyspy": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-2.2.0.tgz", - "integrity": "sha512-d2eda04AN/cPOR89F7Xv5bK/jrQEhmcLFe6HFldoeO9AJtps+fqEnh486vnT/8y4bw38pSyxDcTCAq+Ks2aJTg==", + "node_modules/tinyrainbow": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-1.2.0.tgz", + "integrity": "sha512-weEDEq7Z5eTHPDh4xjX789+fHfF+P8boiFB+0vbWzpbnbsEr/GRaohi/uMKxg8RZMXnl1ItAi/IUHWMsjDV7kQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=14.0.0" } }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", + "node_modules/tinyspy": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-3.0.2.tgz", + "integrity": "sha512-n1cw8k1k0x4pgA2+9XrOkFydTerNcJ1zWCO5Nn9scWHTD+5tp8dghT2x1uduQePZTZgd3Tupf+x9BxJjeJi77Q==", "dev": true, + "license": "MIT", "engines": { - "node": ">=4" + "node": ">=14.0.0" } }, "node_modules/to-regex-range": { @@ -5175,6 +4388,7 @@ "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, + "license": "MIT", "dependencies": { "is-number": "^7.0.0" }, @@ -5187,33 +4401,37 @@ "resolved": "https://registry.npmjs.org/totalist/-/totalist-3.0.1.tgz", "integrity": "sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/ts-api-utils": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.0.3.tgz", - "integrity": "sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz", + "integrity": "sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==", "dev": true, + "license": "MIT", "engines": { - "node": ">=16.13.0" + "node": ">=16" }, "peerDependencies": { "typescript": ">=4.2.0" } }, "node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", - "dev": true + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.0.tgz", + "integrity": "sha512-jWVzBLplnCmoaTr13V9dYbiQ99wvZRd0vNWaDRg+aVYRcjDF3nDksxFDE/+fkXnKhpnUUkmx5pK/v8mCtLVqZA==", + "dev": true, + "license": "0BSD" }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", "dev": true, + "license": "MIT", "dependencies": { "prelude-ls": "^1.2.1" }, @@ -5221,32 +4439,12 @@ "node": ">= 0.8.0" } }, - "node_modules/type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/typescript": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", - "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", + "version": "5.6.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz", + "integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==", "dev": true, + "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -5255,17 +4453,12 @@ "node": ">=14.17" } }, - "node_modules/ufo": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.3.2.tgz", - "integrity": "sha512-o+ORpgGwaYQXgqGDwd+hkS4PuZ3QnmqMMxRuajK/a38L6fTpcE5GPIfrf+L/KemFzfUpeUQc1rRS1iDBozvnFA==", - "dev": true - }, "node_modules/uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "punycode": "^2.1.0" } @@ -5274,31 +4467,19 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true - }, - "node_modules/v8-to-istanbul": { - "version": "9.2.0", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz", - "integrity": "sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA==", "dev": true, - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.12", - "@types/istanbul-lib-coverage": "^2.0.1", - "convert-source-map": "^2.0.0" - }, - "engines": { - "node": ">=10.12.0" - } + "license": "MIT" }, "node_modules/vite": { - "version": "5.0.10", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.0.10.tgz", - "integrity": "sha512-2P8J7WWgmc355HUMlFrwofacvr98DAjoE52BfdbwQtyLH06XKwaL/FMnmKM2crF0iX4MpmMKoDlNCB1ok7zHCw==", + "version": "5.4.10", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.10.tgz", + "integrity": "sha512-1hvaPshuPUtxeQ0hsVH3Mud0ZanOLwVTneA1EgbAM5LhaZEqyPWGRQ7BtaMvUrTDeEaC8pxtj6a6jku3x4z6SQ==", "dev": true, + "license": "MIT", "dependencies": { - "esbuild": "^0.19.3", - "postcss": "^8.4.32", - "rollup": "^4.2.0" + "esbuild": "^0.21.3", + "postcss": "^8.4.43", + "rollup": "^4.20.0" }, "bin": { "vite": "bin/vite.js" @@ -5317,6 +4498,7 @@ "less": "*", "lightningcss": "^1.21.0", "sass": "*", + "sass-embedded": "*", "stylus": "*", "sugarss": "*", "terser": "^5.4.0" @@ -5334,6 +4516,9 @@ "sass": { "optional": true }, + "sass-embedded": { + "optional": true + }, "stylus": { "optional": true }, @@ -5346,15 +4531,15 @@ } }, "node_modules/vite-node": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-1.1.1.tgz", - "integrity": "sha512-2bGE5w4jvym5v8llF6Gu1oBrmImoNSs4WmRVcavnG2me6+8UQntTqLiAMFyiAobp+ZXhj5ZFhI7SmLiFr/jrow==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-2.1.3.tgz", + "integrity": "sha512-I1JadzO+xYX887S39Do+paRePCKoiDrWRRjp9kkG5he0t7RXNvPAJPCQSJqbGN4uCrFFeS3Kj3sLqY8NMYBEdA==", "dev": true, + "license": "MIT", "dependencies": { "cac": "^6.7.14", - "debug": "^4.3.4", - "pathe": "^1.1.1", - "picocolors": "^1.0.0", + "debug": "^4.3.6", + "pathe": "^1.1.2", "vite": "^5.0.0" }, "bin": { @@ -5368,12 +4553,17 @@ } }, "node_modules/vitefu": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/vitefu/-/vitefu-0.2.5.tgz", - "integrity": "sha512-SgHtMLoqaeeGnd2evZ849ZbACbnwQCIwRH57t18FxcXoZop0uQu0uzlIhJBlF/eWVzuce0sHeqPcDo+evVcg8Q==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/vitefu/-/vitefu-1.0.3.tgz", + "integrity": "sha512-iKKfOMBHob2WxEJbqbJjHAkmYgvFDPhuqrO82om83S8RLk+17FtyMBfcyeH8GqD0ihShtkMW/zzJgiA51hCNCQ==", "dev": true, + "license": "MIT", + "workspaces": [ + "tests/deps/*", + "tests/projects/*" + ], "peerDependencies": { - "vite": "^3.0.0 || ^4.0.0 || ^5.0.0" + "vite": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0-beta.0" }, "peerDependenciesMeta": { "vite": { @@ -5382,32 +4572,31 @@ } }, "node_modules/vitest": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-1.1.1.tgz", - "integrity": "sha512-Ry2qs4UOu/KjpXVfOCfQkTnwSXYGrqTbBZxw6reIYEFjSy1QUARRg5pxiI5BEXy+kBVntxUYNMlq4Co+2vD3fQ==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-2.1.3.tgz", + "integrity": "sha512-Zrxbg/WiIvUP2uEzelDNTXmEMJXuzJ1kCpbDvaKByFA9MNeO95V+7r/3ti0qzJzrxdyuUw5VduN7k+D3VmVOSA==", "dev": true, + "license": "MIT", "dependencies": { - "@vitest/expect": "1.1.1", - "@vitest/runner": "1.1.1", - "@vitest/snapshot": "1.1.1", - "@vitest/spy": "1.1.1", - "@vitest/utils": "1.1.1", - "acorn-walk": "^8.3.0", - "cac": "^6.7.14", - "chai": "^4.3.10", - "debug": "^4.3.4", - "execa": "^8.0.1", - "local-pkg": "^0.5.0", - "magic-string": "^0.30.5", - "pathe": "^1.1.1", - "picocolors": "^1.0.0", - "std-env": "^3.5.0", - "strip-literal": "^1.3.0", - "tinybench": "^2.5.1", - "tinypool": "^0.8.1", + "@vitest/expect": "2.1.3", + "@vitest/mocker": "2.1.3", + "@vitest/pretty-format": "^2.1.3", + "@vitest/runner": "2.1.3", + "@vitest/snapshot": "2.1.3", + "@vitest/spy": "2.1.3", + "@vitest/utils": "2.1.3", + "chai": "^5.1.1", + "debug": "^4.3.6", + "magic-string": "^0.30.11", + "pathe": "^1.1.2", + "std-env": "^3.7.0", + "tinybench": "^2.9.0", + "tinyexec": "^0.3.0", + "tinypool": "^1.0.0", + "tinyrainbow": "^1.2.0", "vite": "^5.0.0", - "vite-node": "1.1.1", - "why-is-node-running": "^2.2.2" + "vite-node": "2.1.3", + "why-is-node-running": "^2.3.0" }, "bin": { "vitest": "vitest.mjs" @@ -5421,8 +4610,8 @@ "peerDependencies": { "@edge-runtime/vm": "*", "@types/node": "^18.0.0 || >=20.0.0", - "@vitest/browser": "^1.0.0", - "@vitest/ui": "^1.0.0", + "@vitest/browser": "2.1.3", + "@vitest/ui": "2.1.3", "happy-dom": "*", "jsdom": "*" }, @@ -5452,6 +4641,7 @@ "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, + "license": "ISC", "dependencies": { "isexe": "^2.0.0" }, @@ -5462,89 +4652,131 @@ "node": ">= 8" } }, - "node_modules/which-boxed-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", - "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "node_modules/why-is-node-running": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz", + "integrity": "sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==", "dev": true, + "license": "MIT", "dependencies": { - "is-bigint": "^1.0.1", - "is-boolean-object": "^1.1.0", - "is-number-object": "^1.0.4", - "is-string": "^1.0.5", - "is-symbol": "^1.0.3" + "siginfo": "^2.0.0", + "stackback": "0.0.2" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "bin": { + "why-is-node-running": "cli.js" + }, + "engines": { + "node": ">=8" } }, - "node_modules/which-collection": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.1.tgz", - "integrity": "sha512-W8xeTUwaln8i3K/cY1nGXzdnVZlidBcagyNFtBdD5kxnb4TvGKR7FfSIS3mYpwWS1QUCutfKz8IY8RjftB0+1A==", + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", "dev": true, + "license": "MIT", "dependencies": { - "is-map": "^2.0.1", - "is-set": "^2.0.1", - "is-weakmap": "^2.0.1", - "is-weakset": "^2.0.1" + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/which-typed-array": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.13.tgz", - "integrity": "sha512-P5Nra0qjSncduVPEAr7xhoF5guty49ArDTwzJ/yNuPIbZppyRxFQsRCWrocxIY+CnMVG+qfbU2FmDKyvSGClow==", + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, + "license": "MIT", "dependencies": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.4", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-tostringtag": "^1.0.0" + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" }, "engines": { - "node": ">= 0.4" + "node": ">=10" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/why-is-node-running": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.2.2.tgz", - "integrity": "sha512-6tSwToZxTOcotxHeA+qGCq1mVzKR3CwcJGmVcY+QE8SHy6TnpFnh8PAvPNHYr7EcuVeG0QSMxtYCuO1ta/G/oA==", + "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/wrap-ansi-cjs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, + "license": "MIT", "dependencies": { - "siginfo": "^2.0.0", - "stackback": "0.0.2" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" }, - "bin": { - "why-is-node-running": "cli.js" + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" }, "engines": { "node": ">=8" } }, + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true - }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/yaml": { "version": "1.10.2", "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", "dev": true, + "license": "ISC", "engines": { "node": ">= 6" } @@ -5554,12 +4786,19 @@ "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } + }, + "node_modules/zimmerframe": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/zimmerframe/-/zimmerframe-1.1.2.tgz", + "integrity": "sha512-rAbqEGa8ovJy4pyBxZM70hg4pE6gDgaQ0Sl9M3enG3I0d6H4XSAM3GeNGLKnsBpuijUow064sf7ww1nutC5/3w==", + "license": "MIT" } } } diff --git a/package.json b/package.json index 617fef1..9ec3101 100644 --- a/package.json +++ b/package.json @@ -1,99 +1,99 @@ { - "name": "svelte-headless-table", - "description": "Unopinionated and extensible data tables for Svelte", - "version": "0.18.2", - "scripts": { - "dev": "vite dev", - "build": "vite build && npm run package", - "preview": "vite preview", - "package": "svelte-kit sync && svelte-package && publint", - "prepublishOnly": "npm run package", - "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", - "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", - "test": "vitest run --coverage", - "test:only": "vitest run", - "test:watch": "vitest", - "lint": "prettier --check . && eslint .", - "format": "prettier --write ." - }, - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/humanspeak/svelte-headless-table.git" - }, - "keywords": [ - "svelte", - "table", - "datagrid", - "datatable", - "headless", - "plugin", - "sorting", - "filtering", - "ordering", - "hiding", - "grouping", - "selecting", - "expanding", - "resizing" - ], - "author": "Bryan Lee", - "license": "MIT", - "bugs": { - "url": "https://github.com/bryanmylee/svelte-headless-table/issues" - }, - "homepage": "https://svelte-headless-table.bryanmylee.com", - "exports": { - ".": { - "types": "./dist/index.d.ts", - "svelte": "./dist/index.js", - "default": "./dist/index.js" - }, - "./plugins": { - "types": "./dist/plugins/index.d.ts", - "svelte": "./dist/plugins/index.js", - "default": "./dist/plugins/index.js" - } - }, - "files": [ - "dist", - "!dist/**/*.test.*", - "!dist/**/*.spec.*" - ], - "peerDependencies": { - "svelte": "^4.0.0" - }, - "devDependencies": { - "@sveltejs/adapter-auto": "^3.0.0", - "@sveltejs/kit": "^2.0.0", - "@sveltejs/package": "^2.0.0", - "@sveltejs/vite-plugin-svelte": "^3.0.0", - "@testing-library/jest-dom": "^6.1.6", - "@testing-library/svelte": "^4.0.5", - "@types/eslint": "8.56.0", - "@types/faker": "^5.5.9", - "@typescript-eslint/eslint-plugin": "^6.0.0", - "@typescript-eslint/parser": "^6.0.0", - "@vitest/coverage-v8": "^1.1.1", - "eslint": "^8.56.0", - "eslint-config-prettier": "^9.1.0", - "eslint-plugin-svelte": "^2.35.1", - "faker": "^5.5.3", - "prettier": "^3.1.1", - "prettier-plugin-svelte": "^3.1.2", - "publint": "^0.1.9", - "svelte": "^4.2.7", - "svelte-check": "^3.6.0", - "tslib": "^2.4.1", - "typescript": "^5.0.0", - "vite": "^5.0.3", - "vitest": "^1.0.0" - }, - "dependencies": { - "svelte-keyed": "^2.0.0", - "svelte-render": "^2.0.1", - "svelte-subscribe": "^2.0.1" - }, - "svelte": "./dist/index.js", - "types": "./dist/index.d.ts", - "type": "module" + "name": "@humanspeak/svelte-headless-table", + "description": "Unopinionated and extensible data tables for Svelte", + "version": "1.0.0", + "scripts": { + "dev": "vite dev", + "build": "vite build && npm run package", + "preview": "vite preview", + "package": "svelte-kit sync && svelte-package && publint", + "prepublishOnly": "npm run package", + "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", + "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", + "test": "vitest run --coverage", + "test:only": "vitest run", + "test:watch": "vitest", + "lint": "prettier --check . && eslint .", + "format": "prettier --write ." + }, + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/humanspeak/svelte-headless-table.git" + }, + "keywords": [ + "svelte", + "table", + "datagrid", + "datatable", + "headless", + "plugin", + "sorting", + "filtering", + "ordering", + "hiding", + "grouping", + "selecting", + "expanding", + "resizing" + ], + "author": "Humanspeak, Inc.", + "license": "MIT", + "bugs": { + "url": "https://github.com/humanspeak/svelte-headless-table/issues" + }, + "homepage": "https://svelte-headless-table.bryanmylee.com", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "svelte": "./dist/index.js", + "default": "./dist/index.js" + }, + "./plugins": { + "types": "./dist/plugins/index.d.ts", + "svelte": "./dist/plugins/index.js", + "default": "./dist/plugins/index.js" + } + }, + "files": [ + "dist", + "!dist/**/*.test.*", + "!dist/**/*.spec.*" + ], + "peerDependencies": { + "svelte": "^5" + }, + "devDependencies": { + "@sveltejs/adapter-auto": "^3.3.1", + "@sveltejs/kit": "^2.7.3", + "@sveltejs/package": "^2.3.7", + "@sveltejs/vite-plugin-svelte": "^4.0.0", + "@testing-library/jest-dom": "^6.6.2", + "@testing-library/svelte": "^5.2.4", + "@types/eslint": "9.6.1", + "@types/faker": "^6.6.11", + "@typescript-eslint/eslint-plugin": "^8.11.0", + "@typescript-eslint/parser": "^8.11.0", + "@vitest/coverage-v8": "^2.1.3", + "eslint": "^9.13.0", + "eslint-config-prettier": "^9.1.0", + "eslint-plugin-svelte": "^2.46.0", + "faker": "^6.6.6", + "prettier": "^3.3.3", + "prettier-plugin-svelte": "^3.2.7", + "publint": "^0.2.12", + "svelte": "^5.1.3", + "svelte-check": "^4.0.5", + "tslib": "^2.8.0", + "typescript": "^5.6.3", + "vite": "^5.4.10", + "vitest": "^2.1.3" + }, + "svelte": "./dist/index.js", + "types": "./dist/index.d.ts", + "type": "module", + "dependencies": { + "@humanspeak/svelte-keyed": "^3.0.0", + "@humanspeak/svelte-render": "^3.0.0", + "@humanspeak/svelte-subscribe": "^3.0.0" + } } diff --git a/src/app.d.ts b/src/app.d.ts index 9cbf1c5..cfb7aa3 100644 --- a/src/app.d.ts +++ b/src/app.d.ts @@ -3,8 +3,8 @@ // See https://kit.svelte.dev/docs/types#the-app-namespace // for information about these interfaces declare namespace App { - // interface Locals {} - // interface Platform {} - // interface Session {} - // interface Stuff {} + // interface Locals {} + // interface Platform {} + // interface Session {} + // interface Stuff {} } diff --git a/src/app.html b/src/app.html index 9cf958a..2215c1e 100644 --- a/src/app.html +++ b/src/app.html @@ -1,13 +1,13 @@ - + - - - - - - %sveltekit.head% - - -
%sveltekit.body%
- + + + + + + %sveltekit.head% + + +
%sveltekit.body%
+ diff --git a/src/lib/bodyCells.DataBodyCell.render.test.ts b/src/lib/bodyCells.DataBodyCell.render.test.ts index 07c1f02..643df3c 100644 --- a/src/lib/bodyCells.DataBodyCell.render.test.ts +++ b/src/lib/bodyCells.DataBodyCell.render.test.ts @@ -1,77 +1,75 @@ -import { DataBodyCell } from './bodyCells.js'; -import { DataBodyRow } from './bodyRows.js'; -import { DataColumn } from './columns.js'; -import type { TableState } from './createViewModel.js'; +import { DataBodyCell } from './bodyCells.js' +import { DataBodyRow } from './bodyRows.js' +import { DataColumn } from './columns.js' +import type { TableState } from './createViewModel.js' interface User { - firstName: string; - lastName: string; - age: number; - visits: number; - progress: number; - status: string; + firstName: string + lastName: string + age: number + visits: number + progress: number + status: string } const user: User = { - firstName: 'Adam', - lastName: 'Smith', - age: 43, - visits: 2, - progress: 50, - status: 'complicated', -}; + firstName: 'Adam', + lastName: 'Smith', + age: 43, + visits: 2, + progress: 50, + status: 'complicated' +} const row = new DataBodyRow({ - id: '0', - dataId: '0', - original: user, - cells: [], - cellForId: {}, -}); + id: '0', + dataId: '0', + original: user, + cells: [], + cellForId: {} +}) const column = new DataColumn({ - header: '', - accessor: 'firstName', -}); + header: '', + accessor: 'firstName' +}) it('renders static label', () => { - const actual = new DataBodyCell({ - column, - row, - value: 'Adam', - }); + const actual = new DataBodyCell({ + column, + row, + value: 'Adam' + }) - expect(actual.render()).toBe('Adam'); -}); + expect(actual.render()).toBe('Adam') +}) const state = { - columns: [], -} as unknown as TableState; + columns: [] +} as unknown as TableState it('renders dynamic label with state', () => { - const actual = new DataBodyCell({ - column, - row, - value: 'Adam', - label: ({ value }, { columns }) => - `${String(value).toLowerCase()} with ${columns.length} columns`, - }); + const actual = new DataBodyCell({ + column, + row, + value: 'Adam', + label: ({ value }, { columns }) => `${String(value).toLowerCase()} with ${columns.length} columns` + }) - actual.injectState(state); + actual.injectState(state) - expect(actual.render()).toBe('adam with 0 columns'); -}); + expect(actual.render()).toBe('adam with 0 columns') +}) it('throws if rendering dynamically without state', () => { - const actual = new DataBodyCell({ - column, - row, - value: 'Adam', - label: ({ value }, { columns }) => - `${String(value).toLowerCase()} with ${columns.length} columns`, - }); + const actual = new DataBodyCell({ + column, + row, + value: 'Adam', + label: ({ value }, { columns }) => `${String(value).toLowerCase()} with ${columns.length} columns` + }) - expect(() => { - actual.render(); - }).toThrowError('Missing `state` reference'); -}); + expect(() => { + actual.render() + }).toThrowError('Missing `state` reference') +}) diff --git a/src/lib/bodyCells.DisplayBodyCell.render.test.ts b/src/lib/bodyCells.DisplayBodyCell.render.test.ts index b68cf97..43ae6db 100644 --- a/src/lib/bodyCells.DisplayBodyCell.render.test.ts +++ b/src/lib/bodyCells.DisplayBodyCell.render.test.ts @@ -1,62 +1,62 @@ -import { DisplayBodyCell } from './bodyCells.js'; -import { DataBodyRow } from './bodyRows.js'; -import { DisplayColumn } from './columns.js'; -import type { TableState } from './createViewModel.js'; +import { DisplayBodyCell } from './bodyCells.js' +import { DataBodyRow } from './bodyRows.js' +import { DisplayColumn } from './columns.js' +import type { TableState } from './createViewModel.js' interface User { - firstName: string; - lastName: string; - age: number; - visits: number; - progress: number; - status: string; + firstName: string + lastName: string + age: number + visits: number + progress: number + status: string } const user: User = { - firstName: 'Adam', - lastName: 'Smith', - age: 43, - visits: 2, - progress: 50, - status: 'complicated', -}; + firstName: 'Adam', + lastName: 'Smith', + age: 43, + visits: 2, + progress: 50, + status: 'complicated' +} const row = new DataBodyRow({ - id: '0', - dataId: '0', - original: user, - cells: [], - cellForId: {}, -}); + id: '0', + dataId: '0', + original: user, + cells: [], + cellForId: {} +}) const column = new DisplayColumn({ - header: '', - cell: () => '', - id: 'checked', -}); + header: '', + cell: () => '', + id: 'checked' +}) -const state = {} as TableState; +const state = {} as TableState it('renders dynamic label with state', () => { - const actual = new DisplayBodyCell({ - column, - row, - label: ({ row }) => `row ${row.id} checked`, - }); + const actual = new DisplayBodyCell({ + column, + row, + label: ({ row }) => `row ${row.id} checked` + }) - actual.injectState(state); + actual.injectState(state) - expect(actual.render()).toBe('row 0 checked'); -}); + expect(actual.render()).toBe('row 0 checked') +}) it('throws if rendering dynamically without state', () => { - const actual = new DisplayBodyCell({ - column, - row, - label: ({ row }) => `row ${row.id} checked`, - }); - - expect(() => { - actual.render(); - }).toThrowError('Missing `state` reference'); -}); + const actual = new DisplayBodyCell({ + column, + row, + label: ({ row }) => `row ${row.id} checked` + }) + + expect(() => { + actual.render() + }).toThrowError('Missing `state` reference') +}) diff --git a/src/lib/bodyCells.HeaderCell.render.test.ts b/src/lib/bodyCells.HeaderCell.render.test.ts index 5044f9f..bfa6c73 100644 --- a/src/lib/bodyCells.HeaderCell.render.test.ts +++ b/src/lib/bodyCells.HeaderCell.render.test.ts @@ -1,64 +1,64 @@ -import type { TableState } from './createViewModel.js'; -import { HeaderCell } from './headerCells.js'; +import type { TableState } from './createViewModel.js' +import { HeaderCell } from './headerCells.js' interface User { - firstName: string; - lastName: string; - age: number; - visits: number; - progress: number; - status: string; + firstName: string + lastName: string + age: number + visits: number + progress: number + status: string } class TestHeaderCell extends HeaderCell { - clone(): TestHeaderCell { - return new TestHeaderCell({ - id: this.id, - colspan: this.colspan, - label: this.label, - colstart: 1, - }); - } + clone(): TestHeaderCell { + return new TestHeaderCell({ + id: this.id, + colspan: this.colspan, + label: this.label, + colstart: 1 + }) + } } it('renders string label', () => { - const actual = new TestHeaderCell({ - id: '0', - label: 'Name', - colspan: 1, - colstart: 1, - }); + const actual = new TestHeaderCell({ + id: '0', + label: 'Name', + colspan: 1, + colstart: 1 + }) - expect(actual.render()).toBe('Name'); -}); + expect(actual.render()).toBe('Name') +}) const state = { - columns: [], -} as unknown as TableState; + columns: [] +} as unknown as TableState it('renders dynamic label with state', () => { - const actual = new TestHeaderCell({ - id: '0', - label: (_, { columns }) => `${columns.length} columns`, - colspan: 1, - colstart: 1, - }); + const actual = new TestHeaderCell({ + id: '0', + label: (_, { columns }) => `${columns.length} columns`, + colspan: 1, + colstart: 1 + }) - // eslint-disable-next-line @typescript-eslint/no-explicit-any - actual.injectState(state as any); + // eslint-disable-next-line @typescript-eslint/no-explicit-any + actual.injectState(state as any) - expect(actual.render()).toBe('0 columns'); -}); + expect(actual.render()).toBe('0 columns') +}) it('throws if rendering dynamically without state', () => { - const actual = new TestHeaderCell({ - id: '0', - label: (_, { columns }) => `${columns.length} columns`, - colspan: 1, - colstart: 1, - }); + const actual = new TestHeaderCell({ + id: '0', + label: (_, { columns }) => `${columns.length} columns`, + colspan: 1, + colstart: 1 + }) - expect(() => { - actual.render(); - }).toThrowError('Missing `state` reference'); -}); + expect(() => { + actual.render() + }).toThrowError('Missing `state` reference') +}) diff --git a/src/lib/bodyCells.ts b/src/lib/bodyCells.ts index 8b92593..462e534 100644 --- a/src/lib/bodyCells.ts +++ b/src/lib/bodyCells.ts @@ -1,156 +1,137 @@ -import { derived, type Readable } from 'svelte/store'; -import type { BodyRow } from './bodyRows.js'; -import type { DataColumn, DisplayColumn, FlatColumn } from './columns.js'; -import { TableComponent } from './tableComponent.js'; -import type { DataLabel, DisplayLabel } from './types/Label.js'; -import type { AnyPlugins } from './types/TablePlugin.js'; -import type { RenderConfig } from 'svelte-render'; +import { derived, type Readable } from 'svelte/store' +import type { BodyRow } from './bodyRows.js' +import type { DataColumn, DisplayColumn, FlatColumn } from './columns.js' +import { TableComponent } from './tableComponent.js' +import type { DataLabel, DisplayLabel } from './types/Label.js' +import type { AnyPlugins } from './types/TablePlugin.js' +import type { RenderConfig } from 'svelte-render' export type BodyCellInit = { - id: string; - row: BodyRow; -}; + id: string + row: BodyRow +} // eslint-disable-next-line @typescript-eslint/no-unused-vars export type BodyCellAttributes = { - role: 'cell'; -}; - -export abstract class BodyCell< - Item, - Plugins extends AnyPlugins = AnyPlugins -> extends TableComponent { - abstract column: FlatColumn; - row: BodyRow; - constructor({ id, row }: BodyCellInit) { - super({ id }); - this.row = row; - } - - abstract render(): RenderConfig; - - attrs(): Readable> { - return derived(super.attrs(), ($baseAttrs) => { - return { - ...$baseAttrs, - role: 'cell' as const - }; - }); - } - - abstract clone(): BodyCell; - - rowColId(): string { - return `${this.row.id}:${this.column.id}`; - } - - dataRowColId(): string | undefined { - if (!this.row.isData()) { - return undefined; - } - return `${this.row.dataId}:${this.column.id}`; - } - - // TODO Workaround for https://github.com/vitejs/vite/issues/9528 - isData(): this is DataBodyCell { - return '__data' in this; - } - - // TODO Workaround for https://github.com/vitejs/vite/issues/9528 - isDisplay(): this is DisplayBodyCell { - return '__display' in this; - } + role: 'cell' +} + +export abstract class BodyCell extends TableComponent { + abstract column: FlatColumn + row: BodyRow + constructor({ id, row }: BodyCellInit) { + super({ id }) + this.row = row + } + + abstract render(): RenderConfig + + attrs(): Readable> { + return derived(super.attrs(), ($baseAttrs) => { + return { + ...$baseAttrs, + role: 'cell' as const + } + }) + } + + abstract clone(): BodyCell + + rowColId(): string { + return `${this.row.id}:${this.column.id}` + } + + dataRowColId(): string | undefined { + if (!this.row.isData()) { + return undefined + } + return `${this.row.dataId}:${this.column.id}` + } + + // TODO Workaround for https://github.com/vitejs/vite/issues/9528 + isData(): this is DataBodyCell { + return '__data' in this + } + + // TODO Workaround for https://github.com/vitejs/vite/issues/9528 + isDisplay(): this is DisplayBodyCell { + return '__display' in this + } +} + +export type DataBodyCellInit = Omit, 'id'> & { + column: DataColumn + label?: DataLabel + value: Value +} + +export type DataBodyCellAttributes = BodyCellAttributes + +export class DataBodyCell extends BodyCell { + // TODO Workaround for https://github.com/vitejs/vite/issues/9528 + __data = true + + column: DataColumn + label?: DataLabel + value: Value + constructor({ row, column, label, value }: DataBodyCellInit) { + super({ id: column.id, row }) + this.column = column + this.label = label + this.value = value + } + + render(): RenderConfig { + if (this.label === undefined) { + return `${this.value}` + } + if (this.state === undefined) { + throw new Error('Missing `state` reference') + } + return this.label(this as DataBodyCell, this.state) + } + + clone(): DataBodyCell { + const clonedCell = new DataBodyCell({ + row: this.row, + column: this.column, + label: this.label, + value: this.value + }) + return clonedCell + } } -export type DataBodyCellInit = Omit< - BodyCellInit, - 'id' -> & { - column: DataColumn; - label?: DataLabel; - value: Value; -}; - -export type DataBodyCellAttributes< - Item, - Plugins extends AnyPlugins = AnyPlugins -> = BodyCellAttributes; - -export class DataBodyCell< - Item, - Plugins extends AnyPlugins = AnyPlugins, - Value = unknown -> extends BodyCell { - // TODO Workaround for https://github.com/vitejs/vite/issues/9528 - __data = true; - - column: DataColumn; - label?: DataLabel; - value: Value; - constructor({ row, column, label, value }: DataBodyCellInit) { - super({ id: column.id, row }); - this.column = column; - this.label = label; - this.value = value; - } - - render(): RenderConfig { - if (this.label === undefined) { - return `${this.value}`; - } - if (this.state === undefined) { - throw new Error('Missing `state` reference'); - } - return this.label(this as DataBodyCell, this.state); - } - - clone(): DataBodyCell { - const clonedCell = new DataBodyCell({ - row: this.row, - column: this.column, - label: this.label, - value: this.value - }); - return clonedCell; - } +export type DisplayBodyCellInit = Omit, 'id'> & { + column: DisplayColumn + label: DisplayLabel } -export type DisplayBodyCellInit = Omit< - BodyCellInit, - 'id' -> & { - column: DisplayColumn; - label: DisplayLabel; -}; - -export class DisplayBodyCell extends BodyCell< - Item, - Plugins -> { - // TODO Workaround for https://github.com/vitejs/vite/issues/9528 - __display = true; - - column: DisplayColumn; - label: DisplayLabel; - constructor({ row, column, label }: DisplayBodyCellInit) { - super({ id: column.id, row }); - this.column = column; - this.label = label; - } - - render(): RenderConfig { - if (this.state === undefined) { - throw new Error('Missing `state` reference'); - } - return this.label(this, this.state); - } - - clone(): DisplayBodyCell { - const clonedCell = new DisplayBodyCell({ - row: this.row, - column: this.column, - label: this.label - }); - return clonedCell; - } +export class DisplayBodyCell extends BodyCell { + // TODO Workaround for https://github.com/vitejs/vite/issues/9528 + __display = true + + column: DisplayColumn + label: DisplayLabel + constructor({ row, column, label }: DisplayBodyCellInit) { + super({ id: column.id, row }) + this.column = column + this.label = label + } + + render(): RenderConfig { + if (this.state === undefined) { + throw new Error('Missing `state` reference') + } + return this.label(this, this.state) + } + + clone(): DisplayBodyCell { + const clonedCell = new DisplayBodyCell({ + row: this.row, + column: this.column, + label: this.label + }) + return clonedCell + } } diff --git a/src/lib/bodyRows.getBodyRows.test.ts b/src/lib/bodyRows.getBodyRows.test.ts index d79d4cc..b491fdd 100644 --- a/src/lib/bodyRows.getBodyRows.test.ts +++ b/src/lib/bodyRows.getBodyRows.test.ts @@ -1,357 +1,357 @@ -import { writable } from 'svelte/store'; -import { DataBodyCell, DisplayBodyCell } from './bodyCells.js'; -import { BodyRow, DataBodyRow, getBodyRows } from './bodyRows.js'; -import { createTable } from './createTable.js'; +import { writable } from 'svelte/store' +import { DataBodyCell, DisplayBodyCell } from './bodyCells.js' +import { BodyRow, DataBodyRow, getBodyRows } from './bodyRows.js' +import { createTable } from './createTable.js' interface User { - firstName: string; - lastName: string; - age: number; - visits: number; - progress: number; - status: string; + firstName: string + lastName: string + age: number + visits: number + progress: number + status: string } const data: User[] = [ - { - firstName: 'Adam', - lastName: 'West', - age: 50, - progress: 75, - status: 'completed', - visits: 32, - }, - { - firstName: 'Becky', - lastName: 'White', - age: 93, - progress: 43, - status: 'completed', - visits: 10, - }, -]; + { + firstName: 'Adam', + lastName: 'West', + age: 50, + progress: 75, + status: 'completed', + visits: 32 + }, + { + firstName: 'Becky', + lastName: 'White', + age: 93, + progress: 43, + status: 'completed', + visits: 10 + } +] -const table = createTable(writable(data)); +const table = createTable(writable(data)) const dataColumns = [ - table.column({ - accessor: 'firstName', - header: 'First Name', - }), - table.column({ - accessor: 'lastName', - header: 'Last Name', - }), - table.column({ - accessor: 'progress', - header: 'Profile Progress', - }), -]; + table.column({ + accessor: 'firstName', + header: 'First Name' + }), + table.column({ + accessor: 'lastName', + header: 'Last Name' + }), + table.column({ + accessor: 'progress', + header: 'Profile Progress' + }) +] it('transforms empty data', () => { - const actual = getBodyRows([], dataColumns); + const actual = getBodyRows([], dataColumns) - const expected: BodyRow[] = []; + const expected: BodyRow[] = [] - expect(actual).toStrictEqual(expected); -}); + expect(actual).toStrictEqual(expected) +}) it('transforms data for data columns', () => { - const actual = getBodyRows(data, dataColumns); + const actual = getBodyRows(data, dataColumns) - const row0 = new DataBodyRow({ - id: '0', - dataId: '0', - original: data[0], - cells: [], - cellForId: {}, - }); - const cells0 = [ - new DataBodyCell({ - row: row0, - column: dataColumns[0], - value: 'Adam', - }), - new DataBodyCell({ - row: row0, - column: dataColumns[1], - value: 'West', - }), - new DataBodyCell({ - row: row0, - column: dataColumns[2], - value: 75, - }), - ]; - row0.cells = cells0; - const cellForId0 = { - firstName: cells0[0], - lastName: cells0[1], - progress: cells0[2], - }; - row0.cellForId = cellForId0; + const row0 = new DataBodyRow({ + id: '0', + dataId: '0', + original: data[0], + cells: [], + cellForId: {} + }) + const cells0 = [ + new DataBodyCell({ + row: row0, + column: dataColumns[0], + value: 'Adam' + }), + new DataBodyCell({ + row: row0, + column: dataColumns[1], + value: 'West' + }), + new DataBodyCell({ + row: row0, + column: dataColumns[2], + value: 75 + }) + ] + row0.cells = cells0 + const cellForId0 = { + firstName: cells0[0], + lastName: cells0[1], + progress: cells0[2] + } + row0.cellForId = cellForId0 - const row1 = new DataBodyRow({ - id: '1', - dataId: '1', - original: data[1], - cells: [], - cellForId: {}, - }); - const cells1 = [ - new DataBodyCell({ - row: row1, - column: dataColumns[0], - value: 'Becky', - }), - new DataBodyCell({ - row: row1, - column: dataColumns[1], - value: 'White', - }), - new DataBodyCell({ - row: row1, - column: dataColumns[2], - value: 43, - }), - ]; - row1.cells = cells1; - const cellForId1 = { - firstName: cells1[0], - lastName: cells1[1], - progress: cells1[2], - }; - row1.cellForId = cellForId1; + const row1 = new DataBodyRow({ + id: '1', + dataId: '1', + original: data[1], + cells: [], + cellForId: {} + }) + const cells1 = [ + new DataBodyCell({ + row: row1, + column: dataColumns[0], + value: 'Becky' + }), + new DataBodyCell({ + row: row1, + column: dataColumns[1], + value: 'White' + }), + new DataBodyCell({ + row: row1, + column: dataColumns[2], + value: 43 + }) + ] + row1.cells = cells1 + const cellForId1 = { + firstName: cells1[0], + lastName: cells1[1], + progress: cells1[2] + } + row1.cellForId = cellForId1 - const expected: DataBodyRow[] = [row0, row1]; + const expected: DataBodyRow[] = [row0, row1] - [0, 1].forEach((rowIdx) => { - const row = actual[rowIdx]; - expect(row).toBeInstanceOf(DataBodyRow); - if (!row.isData()) { - throw new Error('Incorrect BodyRow subtype'); - } - expect(row.original).toStrictEqual(expected[rowIdx].original); - expect(row.cells.length).toStrictEqual(expected[rowIdx].cells.length); - actual[rowIdx].cells.forEach((_, colIdx) => { - const cell = actual[rowIdx].cells[colIdx]; - expect(cell).toBeInstanceOf(DataBodyCell); - const expectedCell = expected[rowIdx].cells[colIdx]; - if (!(cell.isData() && expectedCell.isData())) { - throw new Error('Incorrect instance type'); - } - expect(cell.value).toStrictEqual(expectedCell.value); - }); - ['firstName', 'lastName', 'progress'].forEach((id) => { - const cell = actual[rowIdx].cellForId[id]; - expect(cell).toBeInstanceOf(DataBodyCell); - const expectedCell = expected[rowIdx].cellForId[id]; - if (!(cell.isData() && expectedCell.isData())) { - throw new Error('Incorrect instance type'); - } - expect(cell.value).toStrictEqual(expectedCell.value); - }); - }); -}); + ;[0, 1].forEach((rowIdx) => { + const row = actual[rowIdx] + expect(row).toBeInstanceOf(DataBodyRow) + if (!row.isData()) { + throw new Error('Incorrect BodyRow subtype') + } + expect(row.original).toStrictEqual(expected[rowIdx].original) + expect(row.cells.length).toStrictEqual(expected[rowIdx].cells.length) + actual[rowIdx].cells.forEach((_, colIdx) => { + const cell = actual[rowIdx].cells[colIdx] + expect(cell).toBeInstanceOf(DataBodyCell) + const expectedCell = expected[rowIdx].cells[colIdx] + if (!(cell.isData() && expectedCell.isData())) { + throw new Error('Incorrect instance type') + } + expect(cell.value).toStrictEqual(expectedCell.value) + }) + ;['firstName', 'lastName', 'progress'].forEach((id) => { + const cell = actual[rowIdx].cellForId[id] + expect(cell).toBeInstanceOf(DataBodyCell) + const expectedCell = expected[rowIdx].cellForId[id] + if (!(cell.isData() && expectedCell.isData())) { + throw new Error('Incorrect instance type') + } + expect(cell.value).toStrictEqual(expectedCell.value) + }) + }) +}) it('transforms data for data columns with custom rowDataId', () => { - const actual = getBodyRows(data, dataColumns, { - rowDataId: ({ firstName, lastName }) => `${firstName}-${lastName}`, - }); + const actual = getBodyRows(data, dataColumns, { + rowDataId: ({ firstName, lastName }) => `${firstName}-${lastName}` + }) - const row0 = new DataBodyRow({ - id: '0', - dataId: 'Adam-West', - original: data[0], - cells: [], - cellForId: {}, - }); - const cells0 = [ - new DataBodyCell({ - row: row0, - column: dataColumns[0], - value: 'Adam', - }), - new DataBodyCell({ - row: row0, - column: dataColumns[1], - value: 'West', - }), - new DataBodyCell({ - row: row0, - column: dataColumns[2], - value: 75, - }), - ]; - row0.cells = cells0; - const cellForId0 = { - firstName: cells0[0], - lastName: cells0[1], - progress: cells0[2], - }; - row0.cellForId = cellForId0; + const row0 = new DataBodyRow({ + id: '0', + dataId: 'Adam-West', + original: data[0], + cells: [], + cellForId: {} + }) + const cells0 = [ + new DataBodyCell({ + row: row0, + column: dataColumns[0], + value: 'Adam' + }), + new DataBodyCell({ + row: row0, + column: dataColumns[1], + value: 'West' + }), + new DataBodyCell({ + row: row0, + column: dataColumns[2], + value: 75 + }) + ] + row0.cells = cells0 + const cellForId0 = { + firstName: cells0[0], + lastName: cells0[1], + progress: cells0[2] + } + row0.cellForId = cellForId0 - const row1 = new DataBodyRow({ - id: '1', - dataId: 'Becky-White', - original: data[1], - cells: [], - cellForId: {}, - }); - const cells1 = [ - new DataBodyCell({ - row: row1, - column: dataColumns[0], - value: 'Becky', - }), - new DataBodyCell({ - row: row1, - column: dataColumns[1], - value: 'White', - }), - new DataBodyCell({ - row: row1, - column: dataColumns[2], - value: 43, - }), - ]; - row1.cells = cells1; - const cellForId1 = { - firstName: cells1[0], - lastName: cells1[1], - progress: cells1[2], - }; - row1.cellForId = cellForId1; + const row1 = new DataBodyRow({ + id: '1', + dataId: 'Becky-White', + original: data[1], + cells: [], + cellForId: {} + }) + const cells1 = [ + new DataBodyCell({ + row: row1, + column: dataColumns[0], + value: 'Becky' + }), + new DataBodyCell({ + row: row1, + column: dataColumns[1], + value: 'White' + }), + new DataBodyCell({ + row: row1, + column: dataColumns[2], + value: 43 + }) + ] + row1.cells = cells1 + const cellForId1 = { + firstName: cells1[0], + lastName: cells1[1], + progress: cells1[2] + } + row1.cellForId = cellForId1 - const expected: DataBodyRow[] = [row0, row1]; + const expected: DataBodyRow[] = [row0, row1] - [0, 1].forEach((rowIdx) => { - const row = actual[rowIdx]; - expect(row).toBeInstanceOf(DataBodyRow); - if (!row.isData()) { - throw new Error('Incorrect BodyRow subtype'); - } - expect(row.original).toStrictEqual(expected[rowIdx].original); - expect(row.cells.length).toStrictEqual(expected[rowIdx].cells.length); - actual[rowIdx].cells.forEach((_, colIdx) => { - const cell = actual[rowIdx].cells[colIdx]; - expect(cell).toBeInstanceOf(DataBodyCell); - const expectedCell = expected[rowIdx].cells[colIdx]; - if (!(cell.isData() && expectedCell.isData())) { - throw new Error('Incorrect instance type'); - } - expect(cell.value).toStrictEqual(expectedCell.value); - }); - ['firstName', 'lastName', 'progress'].forEach((id) => { - const cell = actual[rowIdx].cellForId[id]; - expect(cell).toBeInstanceOf(DataBodyCell); - const expectedCell = expected[rowIdx].cellForId[id]; - if (!(cell.isData() && expectedCell.isData())) { - throw new Error('Incorrect instance type'); - } - expect(cell.value).toStrictEqual(expectedCell.value); - }); - }); -}); + ;[0, 1].forEach((rowIdx) => { + const row = actual[rowIdx] + expect(row).toBeInstanceOf(DataBodyRow) + if (!row.isData()) { + throw new Error('Incorrect BodyRow subtype') + } + expect(row.original).toStrictEqual(expected[rowIdx].original) + expect(row.cells.length).toStrictEqual(expected[rowIdx].cells.length) + actual[rowIdx].cells.forEach((_, colIdx) => { + const cell = actual[rowIdx].cells[colIdx] + expect(cell).toBeInstanceOf(DataBodyCell) + const expectedCell = expected[rowIdx].cells[colIdx] + if (!(cell.isData() && expectedCell.isData())) { + throw new Error('Incorrect instance type') + } + expect(cell.value).toStrictEqual(expectedCell.value) + }) + ;['firstName', 'lastName', 'progress'].forEach((id) => { + const cell = actual[rowIdx].cellForId[id] + expect(cell).toBeInstanceOf(DataBodyCell) + const expectedCell = expected[rowIdx].cellForId[id] + if (!(cell.isData() && expectedCell.isData())) { + throw new Error('Incorrect instance type') + } + expect(cell.value).toStrictEqual(expectedCell.value) + }) + }) +}) -const checkedLabel = () => 'check'; -const expandedLabel = () => 'expanded'; +const checkedLabel = () => 'check' +const expandedLabel = () => 'expanded' const displayColumns = [ - table.display({ - id: 'checked', - header: 'Checked', - cell: checkedLabel, - }), - table.display({ - id: 'expanded', - header: 'Expanded', - cell: expandedLabel, - }), -]; + table.display({ + id: 'checked', + header: 'Checked', + cell: checkedLabel + }), + table.display({ + id: 'expanded', + header: 'Expanded', + cell: expandedLabel + }) +] it('transforms data with display columns', () => { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - const actual = getBodyRows(data, displayColumns as any); + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const actual = getBodyRows(data, displayColumns as any) - const row0 = new DataBodyRow({ - id: '0', - dataId: '0', - original: data[0], - cells: [], - cellForId: {}, - }); - const cells0 = [ - new DisplayBodyCell({ - row: row0, - column: displayColumns[0], - label: checkedLabel, - }), - new DisplayBodyCell({ - row: row0, - column: displayColumns[1], - label: expandedLabel, - }), - ]; - row0.cells = cells0; - const cellForId0 = { - checked: cells0[0], - expanded: cells0[1], - }; - row0.cellForId = cellForId0; + const row0 = new DataBodyRow({ + id: '0', + dataId: '0', + original: data[0], + cells: [], + cellForId: {} + }) + const cells0 = [ + new DisplayBodyCell({ + row: row0, + column: displayColumns[0], + label: checkedLabel + }), + new DisplayBodyCell({ + row: row0, + column: displayColumns[1], + label: expandedLabel + }) + ] + row0.cells = cells0 + const cellForId0 = { + checked: cells0[0], + expanded: cells0[1] + } + row0.cellForId = cellForId0 - const row1 = new DataBodyRow({ - id: '1', - dataId: '1', - original: data[1], - cells: [], - cellForId: {}, - }); - const cells1 = [ - new DisplayBodyCell({ - row: row1, - column: displayColumns[0], - label: checkedLabel, - }), - new DisplayBodyCell({ - row: row1, - column: displayColumns[1], - label: expandedLabel, - }), - ]; - row1.cells = cells1; - const cellForId1 = { - checked: cells1[0], - expanded: cells1[1], - }; - row1.cellForId = cellForId1; + const row1 = new DataBodyRow({ + id: '1', + dataId: '1', + original: data[1], + cells: [], + cellForId: {} + }) + const cells1 = [ + new DisplayBodyCell({ + row: row1, + column: displayColumns[0], + label: checkedLabel + }), + new DisplayBodyCell({ + row: row1, + column: displayColumns[1], + label: expandedLabel + }) + ] + row1.cells = cells1 + const cellForId1 = { + checked: cells1[0], + expanded: cells1[1] + } + row1.cellForId = cellForId1 - const expected: DataBodyRow[] = [row0, row1]; + const expected: DataBodyRow[] = [row0, row1] - [0, 1].forEach((rowIdx) => { - const row = actual[rowIdx]; - expect(actual[rowIdx]).toBeInstanceOf(DataBodyRow); - if (!row.isData()) { - throw new Error('Incorrect BodyRow subtype'); - } - expect(row.original).toStrictEqual(expected[rowIdx].original); - expect(row.cells.length).toStrictEqual(expected[rowIdx].cells.length); - row.cells.forEach((_, colIdx) => { - const cell = row.cells[colIdx]; - expect(cell).toBeInstanceOf(DisplayBodyCell); - const expectedCell = expected[rowIdx].cells[colIdx]; - if (!(cell.isDisplay() && expectedCell.isDisplay())) { - throw new Error('Incorrect instance type'); - } - expect(cell.label).toEqual(expectedCell.label); - }); - ['checked', 'expanded'].forEach((id) => { - const cell = row.cellForId[id]; - expect(cell).toBeInstanceOf(DisplayBodyCell); - const expectedCell = expected[rowIdx].cellForId[id]; - if (!(cell.isDisplay() && expectedCell.isDisplay())) { - throw new Error('Incorrect instance type'); - } - expect(cell.label).toEqual(expectedCell.label); - }); - }); -}); + ;[0, 1].forEach((rowIdx) => { + const row = actual[rowIdx] + expect(actual[rowIdx]).toBeInstanceOf(DataBodyRow) + if (!row.isData()) { + throw new Error('Incorrect BodyRow subtype') + } + expect(row.original).toStrictEqual(expected[rowIdx].original) + expect(row.cells.length).toStrictEqual(expected[rowIdx].cells.length) + row.cells.forEach((_, colIdx) => { + const cell = row.cells[colIdx] + expect(cell).toBeInstanceOf(DisplayBodyCell) + const expectedCell = expected[rowIdx].cells[colIdx] + if (!(cell.isDisplay() && expectedCell.isDisplay())) { + throw new Error('Incorrect instance type') + } + expect(cell.label).toEqual(expectedCell.label) + }) + ;['checked', 'expanded'].forEach((id) => { + const cell = row.cellForId[id] + expect(cell).toBeInstanceOf(DisplayBodyCell) + const expectedCell = expected[rowIdx].cellForId[id] + if (!(cell.isDisplay() && expectedCell.isDisplay())) { + throw new Error('Incorrect instance type') + } + expect(cell.label).toEqual(expectedCell.label) + }) + }) +}) diff --git a/src/lib/bodyRows.getColumnedBodyRows.test.ts b/src/lib/bodyRows.getColumnedBodyRows.test.ts index f07bc16..6362801 100644 --- a/src/lib/bodyRows.getColumnedBodyRows.test.ts +++ b/src/lib/bodyRows.getColumnedBodyRows.test.ts @@ -1,81 +1,81 @@ -import { writable } from 'svelte/store'; -import { BodyRow, getBodyRows, getColumnedBodyRows } from './bodyRows.js'; -import { createTable } from './createTable.js'; +import { writable } from 'svelte/store' +import { BodyRow, getBodyRows, getColumnedBodyRows } from './bodyRows.js' +import { createTable } from './createTable.js' interface User { - firstName: string; - lastName: string; - age: number; - visits: number; - progress: number; - status: string; + firstName: string + lastName: string + age: number + visits: number + progress: number + status: string } const data: User[] = [ - { - firstName: 'Adam', - lastName: 'West', - age: 50, - progress: 75, - status: 'completed', - visits: 32, - }, - { - firstName: 'Becky', - lastName: 'White', - age: 93, - progress: 43, - status: 'completed', - visits: 10, - }, -]; + { + firstName: 'Adam', + lastName: 'West', + age: 50, + progress: 75, + status: 'completed', + visits: 32 + }, + { + firstName: 'Becky', + lastName: 'White', + age: 93, + progress: 43, + status: 'completed', + visits: 10 + } +] -const table = createTable(writable(data)); +const table = createTable(writable(data)) const columns = [ - table.column({ - accessor: 'firstName', - header: 'First Name', - }), - table.column({ - accessor: 'lastName', - header: 'Last Name', - }), - table.column({ - accessor: 'progress', - header: 'Profile Progress', - }), -]; + table.column({ + accessor: 'firstName', + header: 'First Name' + }), + table.column({ + accessor: 'lastName', + header: 'Last Name' + }), + table.column({ + accessor: 'progress', + header: 'Profile Progress' + }) +] -const bodyRows = getBodyRows(data, columns); +const bodyRows = getBodyRows(data, columns) it('does not affect empty rows', () => { - const actual = getColumnedBodyRows([], ['firstName', 'visits']); + const actual = getColumnedBodyRows([], ['firstName', 'visits']) - const expected: BodyRow[] = []; + const expected: BodyRow[] = [] - expect(actual).toStrictEqual(expected); -}); + expect(actual).toStrictEqual(expected) +}) it('re-orders columns', () => { - const actual = getColumnedBodyRows(bodyRows, ['firstName', 'progress', 'lastName']); + const actual = getColumnedBodyRows(bodyRows, ['firstName', 'progress', 'lastName']) - [0, 1].forEach((rowIdx) => { - expect(actual[rowIdx].cells[0].column.id).toBe('firstName'); - expect(actual[rowIdx].cells[1].column.id).toBe('progress'); - expect(actual[rowIdx].cells[2].column.id).toBe('lastName'); - }); -}); + ;[0, 1].forEach((rowIdx) => { + expect(actual[rowIdx].cells[0].column.id).toBe('firstName') + expect(actual[rowIdx].cells[1].column.id).toBe('progress') + expect(actual[rowIdx].cells[2].column.id).toBe('lastName') + }) +}) it('hides columns', () => { - const actual = getColumnedBodyRows(bodyRows, ['firstName', 'progress']); + const actual = getColumnedBodyRows(bodyRows, ['firstName', 'progress']) - [0, 1].forEach((rowIdx) => { - expect(actual[rowIdx].cells.length).toBe(2); - expect(actual[rowIdx].cells[0].column.id).toBe('firstName'); - expect(actual[rowIdx].cells[1].column.id).toBe('progress'); - expect(actual[rowIdx].cellForId['firstName']).not.toBeUndefined(); - expect(actual[rowIdx].cellForId['lastName']).not.toBeUndefined(); - expect(actual[rowIdx].cellForId['progress']).not.toBeUndefined(); - }); -}); + ;[0, 1].forEach((rowIdx) => { + expect(actual[rowIdx].cells.length).toBe(2) + expect(actual[rowIdx].cells[0].column.id).toBe('firstName') + expect(actual[rowIdx].cells[1].column.id).toBe('progress') + expect(actual[rowIdx].cellForId['firstName']).not.toBeUndefined() + expect(actual[rowIdx].cellForId['lastName']).not.toBeUndefined() + expect(actual[rowIdx].cellForId['progress']).not.toBeUndefined() + }) +}) diff --git a/src/lib/bodyRows.getSubRows.test.ts b/src/lib/bodyRows.getSubRows.test.ts index 2018b92..0fa7196 100644 --- a/src/lib/bodyRows.getSubRows.test.ts +++ b/src/lib/bodyRows.getSubRows.test.ts @@ -1,172 +1,170 @@ -import { writable } from 'svelte/store'; -import { DataBodyCell, DisplayBodyCell } from './bodyCells.js'; -import { BodyRow, DataBodyRow, getBodyRows, getColumnedBodyRows, getSubRows } from './bodyRows.js'; -import { createTable } from './createTable.js'; +import { writable } from 'svelte/store' +import { DataBodyCell, DisplayBodyCell } from './bodyCells.js' +import { BodyRow, DataBodyRow, getBodyRows, getColumnedBodyRows, getSubRows } from './bodyRows.js' +import { createTable } from './createTable.js' interface User { - firstName: string; - lastName: string; - age: number; - visits: number; - progress: number; - status: string; + firstName: string + lastName: string + age: number + visits: number + progress: number + status: string } const parentData: User = { - firstName: 'Charlie', - lastName: 'Brown', - age: 30, - progress: 75, - status: 'completed', - visits: 32, -}; + firstName: 'Charlie', + lastName: 'Brown', + age: 30, + progress: 75, + status: 'completed', + visits: 32 +} const data: User[] = [ - { - firstName: 'Adam', - lastName: 'West', - age: 50, - progress: 75, - status: 'completed', - visits: 32, - }, - { - firstName: 'Becky', - lastName: 'White', - age: 93, - progress: 43, - status: 'completed', - visits: 10, - }, -]; - -const table = createTable(writable(data)); + { + firstName: 'Adam', + lastName: 'West', + age: 50, + progress: 75, + status: 'completed', + visits: 32 + }, + { + firstName: 'Becky', + lastName: 'White', + age: 93, + progress: 43, + status: 'completed', + visits: 10 + } +] + +const table = createTable(writable(data)) const dataColumns = [ - table.column({ - accessor: 'firstName', - header: 'First Name', - }), - table.column({ - accessor: 'lastName', - header: 'Last Name', - }), - table.column({ - accessor: 'progress', - header: 'Profile Progress', - }), -]; - -const parentRow = getBodyRows([parentData], dataColumns)[0]; + table.column({ + accessor: 'firstName', + header: 'First Name' + }), + table.column({ + accessor: 'lastName', + header: 'Last Name' + }), + table.column({ + accessor: 'progress', + header: 'Profile Progress' + }) +] + +const parentRow = getBodyRows([parentData], dataColumns)[0] it('transforms empty data', () => { - const actual = getSubRows([], parentRow); + const actual = getSubRows([], parentRow) - const expected: BodyRow[] = []; + const expected: BodyRow[] = [] - expect(actual).toStrictEqual(expected); -}); + expect(actual).toStrictEqual(expected) +}) it('derives the correct cells for parent with data columns', () => { - const actual = getSubRows(data, parentRow); - - const expected = getBodyRows(data, dataColumns) as DataBodyRow[]; - - [0, 1].forEach((rowIdx) => { - const row = actual[rowIdx]; - expect(row).toBeInstanceOf(DataBodyRow); - if (!row.isData()) { - throw new Error('Incorrect instance type'); - } - expect(row.original).toStrictEqual(expected[rowIdx].original); - expect(actual[rowIdx].cells.length).toStrictEqual(expected[rowIdx].cells.length); - actual[rowIdx].cells.forEach((_, colIdx) => { - const cell = actual[rowIdx].cells[colIdx]; - expect(cell).toBeInstanceOf(DataBodyCell); - const expectedCell = expected[rowIdx].cells[colIdx]; - if (!(cell.isData() && expectedCell.isData())) { - throw new Error('Incorrect instance type'); - } - expect(cell.value).toStrictEqual(expectedCell.value); - }); - }); -}); + const actual = getSubRows(data, parentRow) + + const expected = getBodyRows(data, dataColumns) as DataBodyRow[] + + ;[0, 1].forEach((rowIdx) => { + const row = actual[rowIdx] + expect(row).toBeInstanceOf(DataBodyRow) + if (!row.isData()) { + throw new Error('Incorrect instance type') + } + expect(row.original).toStrictEqual(expected[rowIdx].original) + expect(actual[rowIdx].cells.length).toStrictEqual(expected[rowIdx].cells.length) + actual[rowIdx].cells.forEach((_, colIdx) => { + const cell = actual[rowIdx].cells[colIdx] + expect(cell).toBeInstanceOf(DataBodyCell) + const expectedCell = expected[rowIdx].cells[colIdx] + if (!(cell.isData() && expectedCell.isData())) { + throw new Error('Incorrect instance type') + } + expect(cell.value).toStrictEqual(expectedCell.value) + }) + }) +}) it('derives the correct cellForId when parent has hidden cells', () => { - const columnedParentRow = getColumnedBodyRows([parentRow], ['firstName'])[0]; - const actual = getSubRows(data, columnedParentRow); - - const expected = getColumnedBodyRows(getBodyRows(data, dataColumns), [ - 'firstName', - ]) as DataBodyRow[]; - - [0, 1].forEach((rowIdx) => { - const row = actual[rowIdx]; - expect(row).toBeInstanceOf(DataBodyRow); - if (!row.isData()) { - throw new Error('Incorrect instance type'); - } - expect(row.original).toStrictEqual(expected[rowIdx].original); - expect(actual[rowIdx].cells.length).toStrictEqual(expected[rowIdx].cells.length); - actual[rowIdx].cells.forEach((_, colIdx) => { - const cell = actual[rowIdx].cells[colIdx]; - expect(cell).toBeInstanceOf(DataBodyCell); - const expectedCell = expected[rowIdx].cells[colIdx]; - if (!(cell.isData() && expectedCell.isData())) { - throw new Error('Incorrect instance type'); - } - expect(cell.value).toStrictEqual(expectedCell.value); - }); - ['firstName', 'lastName', 'progress'].forEach((id) => { - const cell = actual[rowIdx].cellForId[id]; - expect(cell).toBeInstanceOf(DataBodyCell); - const expectedCell = expected[rowIdx].cellForId[id]; - if (!(cell.isData() && expectedCell.isData())) { - throw new Error('Incorrect instance type'); - } - expect(cell.value).toStrictEqual(expectedCell.value); - }); - }); -}); - -const checkedLabel = () => 'check'; -const expandedLabel = () => 'expanded'; + const columnedParentRow = getColumnedBodyRows([parentRow], ['firstName'])[0] + const actual = getSubRows(data, columnedParentRow) + + const expected = getColumnedBodyRows(getBodyRows(data, dataColumns), ['firstName']) as DataBodyRow[] + + ;[0, 1].forEach((rowIdx) => { + const row = actual[rowIdx] + expect(row).toBeInstanceOf(DataBodyRow) + if (!row.isData()) { + throw new Error('Incorrect instance type') + } + expect(row.original).toStrictEqual(expected[rowIdx].original) + expect(actual[rowIdx].cells.length).toStrictEqual(expected[rowIdx].cells.length) + actual[rowIdx].cells.forEach((_, colIdx) => { + const cell = actual[rowIdx].cells[colIdx] + expect(cell).toBeInstanceOf(DataBodyCell) + const expectedCell = expected[rowIdx].cells[colIdx] + if (!(cell.isData() && expectedCell.isData())) { + throw new Error('Incorrect instance type') + } + expect(cell.value).toStrictEqual(expectedCell.value) + }) + ;['firstName', 'lastName', 'progress'].forEach((id) => { + const cell = actual[rowIdx].cellForId[id] + expect(cell).toBeInstanceOf(DataBodyCell) + const expectedCell = expected[rowIdx].cellForId[id] + if (!(cell.isData() && expectedCell.isData())) { + throw new Error('Incorrect instance type') + } + expect(cell.value).toStrictEqual(expectedCell.value) + }) + }) +}) + +const checkedLabel = () => 'check' +const expandedLabel = () => 'expanded' const displayColumns = [ - table.display({ - id: 'checked', - header: 'Checked', - cell: checkedLabel, - }), - table.display({ - id: 'expanded', - header: 'Expanded', - cell: expandedLabel, - }), -]; - -const displayParentRow = getBodyRows([parentData], displayColumns)[0]; + table.display({ + id: 'checked', + header: 'Checked', + cell: checkedLabel + }), + table.display({ + id: 'expanded', + header: 'Expanded', + cell: expandedLabel + }) +] + +const displayParentRow = getBodyRows([parentData], displayColumns)[0] it('derives the correct cells for parent with columns', () => { - const actual = getSubRows(data, displayParentRow); - - const expected = getBodyRows(data, displayColumns) as DataBodyRow[]; - - [0, 1].forEach((rowIdx) => { - const row = actual[rowIdx]; - expect(row).toBeInstanceOf(DataBodyRow); - if (!row.isData()) { - throw new Error('Incorrect instance type'); - } - expect(row.original).toStrictEqual(expected[rowIdx].original); - expect(actual[rowIdx].cells.length).toStrictEqual(expected[rowIdx].cells.length); - actual[rowIdx].cells.forEach((_, colIdx) => { - const cell = actual[rowIdx].cells[colIdx]; - expect(cell).toBeInstanceOf(DisplayBodyCell); - const expectedCell = expected[rowIdx].cells[colIdx]; - if (!(cell.isDisplay() && expectedCell.isDisplay())) { - throw new Error('Incorrect instance type'); - } - expect(cell.label).toEqual(expectedCell.label); - }); - }); -}); + const actual = getSubRows(data, displayParentRow) + + const expected = getBodyRows(data, displayColumns) as DataBodyRow[] + + ;[0, 1].forEach((rowIdx) => { + const row = actual[rowIdx] + expect(row).toBeInstanceOf(DataBodyRow) + if (!row.isData()) { + throw new Error('Incorrect instance type') + } + expect(row.original).toStrictEqual(expected[rowIdx].original) + expect(actual[rowIdx].cells.length).toStrictEqual(expected[rowIdx].cells.length) + actual[rowIdx].cells.forEach((_, colIdx) => { + const cell = actual[rowIdx].cells[colIdx] + expect(cell).toBeInstanceOf(DisplayBodyCell) + const expectedCell = expected[rowIdx].cells[colIdx] + if (!(cell.isDisplay() && expectedCell.isDisplay())) { + throw new Error('Incorrect instance type') + } + expect(cell.label).toEqual(expectedCell.label) + }) + }) +}) diff --git a/src/lib/bodyRows.ts b/src/lib/bodyRows.ts index 9c7f820..6ac100f 100644 --- a/src/lib/bodyRows.ts +++ b/src/lib/bodyRows.ts @@ -1,189 +1,159 @@ -import { derived, type Readable } from 'svelte/store'; -import { BodyCell, DataBodyCell, DisplayBodyCell } from './bodyCells.js'; -import type { DataColumn, DisplayColumn, FlatColumn } from './columns.js'; -import { TableComponent } from './tableComponent.js'; -import type { AnyPlugins } from './types/TablePlugin.js'; -import { nonUndefined } from './utils/filter.js'; +import { derived, type Readable } from 'svelte/store' +import { BodyCell, DataBodyCell, DisplayBodyCell } from './bodyCells.js' +import type { DataColumn, DisplayColumn, FlatColumn } from './columns.js' +import { TableComponent } from './tableComponent.js' +import type { AnyPlugins } from './types/TablePlugin.js' +import { nonUndefined } from './utils/filter.js' export type BodyRowInit = { - id: string; - cells: BodyCell[]; - cellForId: Record>; - depth?: number; - parentRow?: BodyRow; -}; + id: string + cells: BodyCell[] + cellForId: Record> + depth?: number + parentRow?: BodyRow +} // eslint-disable-next-line @typescript-eslint/no-unused-vars export type BodyRowAttributes = { - role: 'row'; -}; + role: 'row' +} -export abstract class BodyRow extends TableComponent< - Item, - Plugins, - 'tbody.tr' -> { - cells: BodyCell[]; - /** - * Get the cell with a given column id. - * - * **This includes hidden cells.** - */ - cellForId: Record>; - depth: number; - parentRow?: BodyRow; - subRows?: BodyRow[]; - constructor({ id, cells, cellForId, depth = 0, parentRow }: BodyRowInit) { - super({ id }); - this.cells = cells; - this.cellForId = cellForId; - this.depth = depth; - this.parentRow = parentRow; - } +export abstract class BodyRow extends TableComponent { + cells: BodyCell[] + /** + * Get the cell with a given column id. + * + * **This includes hidden cells.** + */ + cellForId: Record> + depth: number + parentRow?: BodyRow + subRows?: BodyRow[] + constructor({ id, cells, cellForId, depth = 0, parentRow }: BodyRowInit) { + super({ id }) + this.cells = cells + this.cellForId = cellForId + this.depth = depth + this.parentRow = parentRow + } - attrs(): Readable> { - return derived(super.attrs(), ($baseAttrs) => { - return { - ...$baseAttrs, - role: 'row' as const, - }; - }); - } + attrs(): Readable> { + return derived(super.attrs(), ($baseAttrs) => { + return { + ...$baseAttrs, + role: 'row' as const + } + }) + } - abstract clone(props?: BodyRowCloneProps): BodyRow; + abstract clone(props?: BodyRowCloneProps): BodyRow - // TODO Workaround for https://github.com/vitejs/vite/issues/9528 - isData(): this is DataBodyRow { - return '__data' in this; - } + // TODO Workaround for https://github.com/vitejs/vite/issues/9528 + isData(): this is DataBodyRow { + return '__data' in this + } - // TODO Workaround for https://github.com/vitejs/vite/issues/9528 - isDisplay(): this is DisplayBodyRow { - return '__display' in this; - } + // TODO Workaround for https://github.com/vitejs/vite/issues/9528 + isDisplay(): this is DisplayBodyRow { + return '__display' in this + } } type BodyRowCloneProps = { - includeCells?: boolean; - includeSubRows?: boolean; -}; + includeCells?: boolean + includeSubRows?: boolean +} -export type DataBodyRowInit = BodyRowInit< - Item, - Plugins -> & { - dataId: string; - original: Item; -}; +export type DataBodyRowInit = BodyRowInit & { + dataId: string + original: Item +} -export class DataBodyRow extends BodyRow< - Item, - Plugins -> { - // TODO Workaround for https://github.com/vitejs/vite/issues/9528 - __data = true; +export class DataBodyRow extends BodyRow { + // TODO Workaround for https://github.com/vitejs/vite/issues/9528 + __data = true - dataId: string; - original: Item; - constructor({ - id, - dataId, - original, - cells, - cellForId, - depth = 0, - parentRow, - }: DataBodyRowInit) { - super({ id, cells, cellForId, depth, parentRow }); - this.dataId = dataId; - this.original = original; - } + dataId: string + original: Item + constructor({ id, dataId, original, cells, cellForId, depth = 0, parentRow }: DataBodyRowInit) { + super({ id, cells, cellForId, depth, parentRow }) + this.dataId = dataId + this.original = original + } - clone({ includeCells = false, includeSubRows = false }: BodyRowCloneProps = {}): DataBodyRow< - Item, - Plugins - > { - const clonedRow = new DataBodyRow({ - id: this.id, - dataId: this.dataId, - cellForId: this.cellForId, - cells: this.cells, - original: this.original, - depth: this.depth, - }); - if (includeCells) { - const clonedCellsForId = Object.fromEntries( - Object.entries(clonedRow.cellForId).map(([id, cell]) => { - const clonedCell = cell.clone(); - clonedCell.row = clonedRow; - return [id, clonedCell]; - }) - ); - const clonedCells = clonedRow.cells.map(({ id }) => clonedCellsForId[id]); - clonedRow.cellForId = clonedCellsForId; - clonedRow.cells = clonedCells; - } - if (includeSubRows) { - const clonedSubRows = this.subRows?.map((row) => row.clone({ includeCells, includeSubRows })); - clonedRow.subRows = clonedSubRows; - } else { - clonedRow.subRows = this.subRows; - } - return clonedRow; - } + clone({ includeCells = false, includeSubRows = false }: BodyRowCloneProps = {}): DataBodyRow { + const clonedRow = new DataBodyRow({ + id: this.id, + dataId: this.dataId, + cellForId: this.cellForId, + cells: this.cells, + original: this.original, + depth: this.depth + }) + if (includeCells) { + const clonedCellsForId = Object.fromEntries( + Object.entries(clonedRow.cellForId).map(([id, cell]) => { + const clonedCell = cell.clone() + clonedCell.row = clonedRow + return [id, clonedCell] + }) + ) + const clonedCells = clonedRow.cells.map(({ id }) => clonedCellsForId[id]) + clonedRow.cellForId = clonedCellsForId + clonedRow.cells = clonedCells + } + if (includeSubRows) { + const clonedSubRows = this.subRows?.map((row) => row.clone({ includeCells, includeSubRows })) + clonedRow.subRows = clonedSubRows + } else { + clonedRow.subRows = this.subRows + } + return clonedRow + } } -export type DisplayBodyRowInit = BodyRowInit< - Item, - Plugins ->; +export type DisplayBodyRowInit = BodyRowInit -export class DisplayBodyRow extends BodyRow< - Item, - Plugins -> { - // TODO Workaround for https://github.com/vitejs/vite/issues/9528 - __display = true; +export class DisplayBodyRow extends BodyRow { + // TODO Workaround for https://github.com/vitejs/vite/issues/9528 + __display = true - constructor({ id, cells, cellForId, depth = 0, parentRow }: DisplayBodyRowInit) { - super({ id, cells, cellForId, depth, parentRow }); - } + constructor({ id, cells, cellForId, depth = 0, parentRow }: DisplayBodyRowInit) { + super({ id, cells, cellForId, depth, parentRow }) + } - clone({ includeCells = false, includeSubRows = false }: BodyRowCloneProps = {}): DisplayBodyRow< - Item, - Plugins - > { - const clonedRow = new DisplayBodyRow({ - id: this.id, - cellForId: this.cellForId, - cells: this.cells, - depth: this.depth, - }); - clonedRow.subRows = this.subRows; - if (includeCells) { - const clonedCellsForId = Object.fromEntries( - Object.entries(clonedRow.cellForId).map(([id, cell]) => { - const clonedCell = cell.clone(); - clonedCell.row = clonedRow; - return [id, clonedCell]; - }) - ); - const clonedCells = clonedRow.cells.map(({ id }) => clonedCellsForId[id]); - clonedRow.cellForId = clonedCellsForId; - clonedRow.cells = clonedCells; - } - if (includeSubRows) { - const clonedSubRows = this.subRows?.map((row) => row.clone({ includeCells, includeSubRows })); - clonedRow.subRows = clonedSubRows; - } else { - clonedRow.subRows = this.subRows; - } - return clonedRow; - } + clone({ includeCells = false, includeSubRows = false }: BodyRowCloneProps = {}): DisplayBodyRow { + const clonedRow = new DisplayBodyRow({ + id: this.id, + cellForId: this.cellForId, + cells: this.cells, + depth: this.depth + }) + clonedRow.subRows = this.subRows + if (includeCells) { + const clonedCellsForId = Object.fromEntries( + Object.entries(clonedRow.cellForId).map(([id, cell]) => { + const clonedCell = cell.clone() + clonedCell.row = clonedRow + return [id, clonedCell] + }) + ) + const clonedCells = clonedRow.cells.map(({ id }) => clonedCellsForId[id]) + clonedRow.cellForId = clonedCellsForId + clonedRow.cells = clonedCells + } + if (includeSubRows) { + const clonedSubRows = this.subRows?.map((row) => row.clone({ includeCells, includeSubRows })) + clonedRow.subRows = clonedSubRows + } else { + clonedRow.subRows = this.subRows + } + return clonedRow + } } export interface BodyRowsOptions { - rowDataId?: (item: Item, index: number) => string; + rowDataId?: (item: Item, index: number) => string } /** @@ -193,52 +163,52 @@ export interface BodyRowsOptions { * @returns An array of `BodyRow`s representing the table structure. */ export const getBodyRows = ( - data: Item[], - /** - * Flat columns before column transformations. - */ - flatColumns: FlatColumn[], - { rowDataId }: BodyRowsOptions = {} + data: Item[], + /** + * Flat columns before column transformations. + */ + flatColumns: FlatColumn[], + { rowDataId }: BodyRowsOptions = {} ): BodyRow[] => { - const rows: BodyRow[] = data.map((item, idx) => { - const id = idx.toString(); - return new DataBodyRow({ - id, - dataId: rowDataId !== undefined ? rowDataId(item, idx) : id, - original: item, - cells: [], - cellForId: {}, - }); - }); - data.forEach((item, rowIdx) => { - const cells = flatColumns.map((col) => { - if (col.isData()) { - const dataCol = col as DataColumn; - const value = dataCol.getValue(item); - return new DataBodyCell({ - row: rows[rowIdx], - column: dataCol, - label: col.cell, - value, - }); - } - if (col.isDisplay()) { - const displayCol = col as DisplayColumn; - return new DisplayBodyCell({ - row: rows[rowIdx], - column: displayCol, - label: col.cell, - }); - } - throw new Error('Unrecognized `FlatColumn` implementation'); - }); - rows[rowIdx].cells = cells; - flatColumns.forEach((c, colIdx) => { - rows[rowIdx].cellForId[c.id] = cells[colIdx]; - }); - }); - return rows; -}; + const rows: BodyRow[] = data.map((item, idx) => { + const id = idx.toString() + return new DataBodyRow({ + id, + dataId: rowDataId !== undefined ? rowDataId(item, idx) : id, + original: item, + cells: [], + cellForId: {} + }) + }) + data.forEach((item, rowIdx) => { + const cells = flatColumns.map((col) => { + if (col.isData()) { + const dataCol = col as DataColumn + const value = dataCol.getValue(item) + return new DataBodyCell({ + row: rows[rowIdx], + column: dataCol, + label: col.cell, + value + }) + } + if (col.isDisplay()) { + const displayCol = col as DisplayColumn + return new DisplayBodyCell({ + row: rows[rowIdx], + column: displayCol, + label: col.cell + }) + } + throw new Error('Unrecognized `FlatColumn` implementation') + }) + rows[rowIdx].cells = cells + flatColumns.forEach((c, colIdx) => { + rows[rowIdx].cellForId[c.id] = cells[colIdx] + }) + }) + return rows +} /** * Arranges and hides columns in an array of `BodyRow`s based on @@ -250,39 +220,36 @@ export const getBodyRows = ( * @param columnIdOrder The column order to transform to. * @returns A new array of `BodyRow`s with corrected row references. */ -export const getColumnedBodyRows = ( - rows: BodyRow[], - columnIdOrder: string[] -): BodyRow[] => { - const columnedRows: BodyRow[] = rows.map((row) => { - const clonedRow = row.clone(); - clonedRow.cells = []; - clonedRow.cellForId = {}; - return clonedRow; - }); - if (rows.length === 0 || columnIdOrder.length === 0) return rows; - rows.forEach((row, rowIdx) => { - // Create a shallow copy of `row.cells` to reassign each `cell`'s `row` - // reference. - const cells = row.cells.map((cell) => { - const clonedCell = cell.clone(); - clonedCell.row = columnedRows[rowIdx]; - return clonedCell; - }); - const visibleCells = columnIdOrder - .map((cid) => { - return cells.find((c) => c.id === cid); - }) - .filter(nonUndefined); - columnedRows[rowIdx].cells = visibleCells; - // Include hidden cells in `cellForId` to allow row transformations on - // hidden cells. - cells.forEach((cell) => { - columnedRows[rowIdx].cellForId[cell.id] = cell; - }); - }); - return columnedRows; -}; +export const getColumnedBodyRows = (rows: BodyRow[], columnIdOrder: string[]): BodyRow[] => { + const columnedRows: BodyRow[] = rows.map((row) => { + const clonedRow = row.clone() + clonedRow.cells = [] + clonedRow.cellForId = {} + return clonedRow + }) + if (rows.length === 0 || columnIdOrder.length === 0) return rows + rows.forEach((row, rowIdx) => { + // Create a shallow copy of `row.cells` to reassign each `cell`'s `row` + // reference. + const cells = row.cells.map((cell) => { + const clonedCell = cell.clone() + clonedCell.row = columnedRows[rowIdx] + return clonedCell + }) + const visibleCells = columnIdOrder + .map((cid) => { + return cells.find((c) => c.id === cid) + }) + .filter(nonUndefined) + columnedRows[rowIdx].cells = visibleCells + // Include hidden cells in `cellForId` to allow row transformations on + // hidden cells. + cells.forEach((cell) => { + columnedRows[rowIdx].cellForId[cell.id] = cell + }) + }) + return columnedRows +} /** * Converts an array of items into an array of table `BodyRow`s based on a parent row. @@ -290,51 +257,41 @@ export const getColumnedBodyRows = ( - subItems: Item[], - parentRow: BodyRow, - { rowDataId }: BodyRowsOptions = {} -): BodyRow[] => { - const subRows = subItems.map((item, idx) => { - const id = `${parentRow.id}>${idx}`; - return new DataBodyRow({ - id, - dataId: rowDataId !== undefined ? rowDataId(item, idx) : id, - original: item, - cells: [], - cellForId: {}, - depth: parentRow.depth + 1, - parentRow, - }); - }); - subItems.forEach((item, rowIdx) => { - // parentRow.cells only include visible cells. - // We have to derive all cells from parentRow.cellForId - const cellForId = Object.fromEntries( - Object.values(parentRow.cellForId).map((cell) => { - const { column } = cell; - if (column.isData()) { - const dataCol = column as DataColumn; - const value = dataCol.getValue(item); - return [ - column.id, - new DataBodyCell({ row: subRows[rowIdx], column, label: column.cell, value }), - ]; - } - if (column.isDisplay()) { - return [ - column.id, - new DisplayBodyCell({ row: subRows[rowIdx], column, label: column.cell }), - ]; - } - throw new Error('Unrecognized `FlatColumn` implementation'); - }) - ); - subRows[rowIdx].cellForId = cellForId; - const cells = parentRow.cells.map((cell) => { - return cellForId[cell.id]; - }); - subRows[rowIdx].cells = cells; - }); - return subRows; -}; +export const getSubRows = (subItems: Item[], parentRow: BodyRow, { rowDataId }: BodyRowsOptions = {}): BodyRow[] => { + const subRows = subItems.map((item, idx) => { + const id = `${parentRow.id}>${idx}` + return new DataBodyRow({ + id, + dataId: rowDataId !== undefined ? rowDataId(item, idx) : id, + original: item, + cells: [], + cellForId: {}, + depth: parentRow.depth + 1, + parentRow + }) + }) + subItems.forEach((item, rowIdx) => { + // parentRow.cells only include visible cells. + // We have to derive all cells from parentRow.cellForId + const cellForId = Object.fromEntries( + Object.values(parentRow.cellForId).map((cell) => { + const { column } = cell + if (column.isData()) { + const dataCol = column as DataColumn + const value = dataCol.getValue(item) + return [column.id, new DataBodyCell({ row: subRows[rowIdx], column, label: column.cell, value })] + } + if (column.isDisplay()) { + return [column.id, new DisplayBodyCell({ row: subRows[rowIdx], column, label: column.cell })] + } + throw new Error('Unrecognized `FlatColumn` implementation') + }) + ) + subRows[rowIdx].cellForId = cellForId + const cells = parentRow.cells.map((cell) => { + return cellForId[cell.id] + }) + subRows[rowIdx].cells = cells + }) + return subRows +} diff --git a/src/lib/columns.getDataColumns.test.ts b/src/lib/columns.getDataColumns.test.ts index 5fecac4..7f48d07 100644 --- a/src/lib/columns.getDataColumns.test.ts +++ b/src/lib/columns.getDataColumns.test.ts @@ -1,73 +1,73 @@ -import { writable } from 'svelte/store'; -import { DataColumn, getFlatColumns } from './columns.js'; -import { createTable } from './createTable.js'; +import { writable } from 'svelte/store' +import { DataColumn, getFlatColumns } from './columns.js' +import { createTable } from './createTable.js' interface User { - firstName: string; - lastName: string; - age: number; - visits: number; - progress: number; - status: string; + firstName: string + lastName: string + age: number + visits: number + progress: number + status: string } -const data = writable([]); +const data = writable([]) -const table = createTable(data); +const table = createTable(data) it('flattens data columns', () => { - const columns = table.createColumns([ - table.group({ - header: 'ID', - columns: [ - table.group({ - header: 'Name', - columns: [ - table.column({ - header: 'First Name', - accessor: 'firstName', - }), - ], - }), - table.column({ - header: 'Last Name', - accessor: 'lastName', - }), - ], - }), - table.group({ - header: 'Info', - columns: [ - table.column({ - header: 'Age', - accessor: 'age', - }), - table.column({ - header: 'Status', - accessor: 'status', - }), - table.column({ - header: 'Visits', - accessor: 'visits', - }), - table.column({ - header: 'Profile Progress', - accessor: 'progress', - }), - ], - }), - ]); + const columns = table.createColumns([ + table.group({ + header: 'ID', + columns: [ + table.group({ + header: 'Name', + columns: [ + table.column({ + header: 'First Name', + accessor: 'firstName' + }) + ] + }), + table.column({ + header: 'Last Name', + accessor: 'lastName' + }) + ] + }), + table.group({ + header: 'Info', + columns: [ + table.column({ + header: 'Age', + accessor: 'age' + }), + table.column({ + header: 'Status', + accessor: 'status' + }), + table.column({ + header: 'Visits', + accessor: 'visits' + }), + table.column({ + header: 'Profile Progress', + accessor: 'progress' + }) + ] + }) + ]) - const actual = getFlatColumns(columns); + const actual = getFlatColumns(columns) - const expected: DataColumn[] = [ - table.column({ header: 'First Name', accessor: 'firstName' }), - table.column({ header: 'Last Name', accessor: 'lastName' }), - table.column({ header: 'Age', accessor: 'age' }), - table.column({ header: 'Status', accessor: 'status' }), - table.column({ header: 'Visits', accessor: 'visits' }), - table.column({ header: 'Profile Progress', accessor: 'progress' }), - ]; + const expected: DataColumn[] = [ + table.column({ header: 'First Name', accessor: 'firstName' }), + table.column({ header: 'Last Name', accessor: 'lastName' }), + table.column({ header: 'Age', accessor: 'age' }), + table.column({ header: 'Status', accessor: 'status' }), + table.column({ header: 'Visits', accessor: 'visits' }), + table.column({ header: 'Profile Progress', accessor: 'progress' }) + ] - expect(actual).toStrictEqual(expected); -}); + expect(actual).toStrictEqual(expected) +}) diff --git a/src/lib/columns.newDataColumn.test.ts b/src/lib/columns.newDataColumn.test.ts index 5c72c77..136da96 100644 --- a/src/lib/columns.newDataColumn.test.ts +++ b/src/lib/columns.newDataColumn.test.ts @@ -1,39 +1,39 @@ -import { DataColumn } from './columns.js'; +import { DataColumn } from './columns.js' interface User { - firstName: string; - lastName: string; - age: number; - visits: number; - progress: number; - status: string; + firstName: string + lastName: string + age: number + visits: number + progress: number + status: string } it('prioritizes a provided id', () => { - const actual = new DataColumn({ - header: 'First Name', - accessor: 'firstName', - id: 'name', - }); + const actual = new DataColumn({ + header: 'First Name', + accessor: 'firstName', + id: 'name' + }) - expect(actual.id).toBe('name'); -}); + expect(actual.id).toBe('name') +}) it('falls back on the string accessor as id', () => { - const actual = new DataColumn({ - header: 'First Name', - accessor: 'firstName', - }); + const actual = new DataColumn({ + header: 'First Name', + accessor: 'firstName' + }) - expect(actual.id).toBe('firstName'); -}); + expect(actual.id).toBe('firstName') +}) it('throws if id is undefined without string accessor or header', () => { - expect(() => { - new DataColumn({ - // eslint-disable-next-line @typescript-eslint/no-explicit-any - accessor: (u: any) => u.firstName, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - } as any); - }).toThrowError('A column id, string accessor, or header is required'); -}); + expect(() => { + new DataColumn({ + // eslint-disable-next-line @typescript-eslint/no-explicit-any + accessor: (u: any) => u.firstName + // eslint-disable-next-line @typescript-eslint/no-explicit-any + } as any) + }).toThrowError('A column id, string accessor, or header is required') +}) diff --git a/src/lib/columns.ts b/src/lib/columns.ts index 85aa2ad..4314c22 100644 --- a/src/lib/columns.ts +++ b/src/lib/columns.ts @@ -1,220 +1,187 @@ -import type { DisplayBodyCell } from './bodyCells.js'; -import type { TableState } from './createViewModel.js'; -import type { DisplayLabel, HeaderLabel } from './types/Label.js'; -import type { DataLabel } from './types/Label.js'; -import type { AnyPlugins, PluginColumnConfigs } from './types/TablePlugin.js'; +import type { DisplayBodyCell } from './bodyCells.js' +import type { TableState } from './createViewModel.js' +import type { DisplayLabel, HeaderLabel } from './types/Label.js' +import type { DataLabel } from './types/Label.js' +import type { AnyPlugins, PluginColumnConfigs } from './types/TablePlugin.js' export interface ColumnInit { - header: HeaderLabel; - footer?: HeaderLabel; - height: number; - plugins?: PluginColumnConfigs; + header: HeaderLabel + footer?: HeaderLabel + height: number + plugins?: PluginColumnConfigs } export class Column { - header: HeaderLabel; - footer?: HeaderLabel; - height: number; - plugins?: PluginColumnConfigs; - constructor({ header, footer, height, plugins }: ColumnInit) { - this.header = header; - this.footer = footer; - this.height = height; - this.plugins = plugins; - } - - // TODO Workaround for https://github.com/vitejs/vite/issues/9528 - isFlat(): this is FlatColumn { - return '__flat' in this; - } - - // TODO Workaround for https://github.com/vitejs/vite/issues/9528 - isData(): this is DataColumn { - return '__data' in this; - } - - // TODO Workaround for https://github.com/vitejs/vite/issues/9528 - isDisplay(): this is DisplayColumn { - return '__display' in this; - } - - // TODO Workaround for https://github.com/vitejs/vite/issues/9528 - isGroup(): this is GroupColumn { - return '__group' in this; - } + header: HeaderLabel + footer?: HeaderLabel + height: number + plugins?: PluginColumnConfigs + constructor({ header, footer, height, plugins }: ColumnInit) { + this.header = header + this.footer = footer + this.height = height + this.plugins = plugins + } + + // TODO Workaround for https://github.com/vitejs/vite/issues/9528 + isFlat(): this is FlatColumn { + return '__flat' in this + } + + // TODO Workaround for https://github.com/vitejs/vite/issues/9528 + isData(): this is DataColumn { + return '__data' in this + } + + // TODO Workaround for https://github.com/vitejs/vite/issues/9528 + isDisplay(): this is DisplayColumn { + return '__display' in this + } + + // TODO Workaround for https://github.com/vitejs/vite/issues/9528 + isGroup(): this is GroupColumn { + return '__group' in this + } } export type FlatColumnInit< - Item, - Plugins extends AnyPlugins = AnyPlugins, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - Id extends string = any + Item, + Plugins extends AnyPlugins = AnyPlugins, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + Id extends string = any > = Omit, 'height'> & { - id?: Id; -}; + id?: Id +} export class FlatColumn< - Item, - Plugins extends AnyPlugins = AnyPlugins, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - Id extends string = any + Item, + Plugins extends AnyPlugins = AnyPlugins, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + Id extends string = any > extends Column { - // TODO Workaround for https://github.com/vitejs/vite/issues/9528 - __flat = true; - - id: Id; - constructor({ header, footer, plugins, id }: FlatColumnInit) { - super({ header, footer, plugins, height: 1 }); - this.id = id ?? String(header); - } + // TODO Workaround for https://github.com/vitejs/vite/issues/9528 + __flat = true + + id: Id + constructor({ header, footer, plugins, id }: FlatColumnInit) { + super({ header, footer, plugins, height: 1 }) + this.id = id ?? String(header) + } } -export type DataColumnInit< - Item, - Plugins extends AnyPlugins = AnyPlugins, - Id extends string = string, - Value = unknown -> = DataColumnInitBase & - ( - | (Id extends keyof Item ? DataColumnInitKey : never) - | DataColumnInitIdAndKey - | DataColumnInitFnAndId - ); - -export type DataColumnInitBase< - Item, - Plugins extends AnyPlugins = AnyPlugins, - Value = unknown -> = Omit, 'height'> & { - cell?: DataLabel; -}; +export type DataColumnInit = DataColumnInitBase & + ((Id extends keyof Item ? DataColumnInitKey : never) | DataColumnInitIdAndKey | DataColumnInitFnAndId) + +export type DataColumnInitBase = Omit, 'height'> & { + cell?: DataLabel +} export type DataColumnInitKey = { - accessor: Id; - id?: Id; -}; + accessor: Id + id?: Id +} export type DataColumnInitIdAndKey = { - accessor: Key; - id?: Id; -}; + accessor: Key + id?: Id +} export type DataColumnInitFnAndId = { - accessor: keyof Item | ((item: Item) => Value); - id?: Id; -}; + accessor: keyof Item | ((item: Item) => Value) + id?: Id +} export class DataColumn< - Item, - Plugins extends AnyPlugins = AnyPlugins, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - Id extends string = any, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - Value = any + Item, + Plugins extends AnyPlugins = AnyPlugins, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + Id extends string = any, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + Value = any > extends FlatColumn { - // TODO Workaround for https://github.com/vitejs/vite/issues/9528 - __data = true; - - cell?: DataLabel; - accessorKey?: keyof Item; - accessorFn?: (item: Item) => Value; - constructor({ - header, - footer, - plugins, - cell, - accessor, - id, - }: DataColumnInit) { - super({ header, footer, plugins, id: 'Initialization not complete' }); - this.cell = cell; - if (accessor instanceof Function) { - this.accessorFn = accessor; - } else { - this.accessorKey = accessor; - } - if (id === undefined && this.accessorKey === undefined && header === undefined) { - throw new Error('A column id, string accessor, or header is required'); - } - const accessorKeyId = typeof this.accessorKey === 'string' ? this.accessorKey : null; - this.id = (id ?? accessorKeyId ?? String(header)) as Id; - } - - // eslint-disable-next-line @typescript-eslint/no-explicit-any - getValue(item: Item): any { - if (this.accessorFn !== undefined) { - return this.accessorFn(item); - } - if (this.accessorKey !== undefined) { - return item[this.accessorKey]; - } - return undefined; - } + // TODO Workaround for https://github.com/vitejs/vite/issues/9528 + __data = true + + cell?: DataLabel + accessorKey?: keyof Item + accessorFn?: (item: Item) => Value + constructor({ header, footer, plugins, cell, accessor, id }: DataColumnInit) { + super({ header, footer, plugins, id: 'Initialization not complete' }) + this.cell = cell + if (accessor instanceof Function) { + this.accessorFn = accessor + } else { + this.accessorKey = accessor + } + if (id === undefined && this.accessorKey === undefined && header === undefined) { + throw new Error('A column id, string accessor, or header is required') + } + const accessorKeyId = typeof this.accessorKey === 'string' ? this.accessorKey : null + this.id = (id ?? accessorKeyId ?? String(header)) as Id + } + + // eslint-disable-next-line @typescript-eslint/no-explicit-any + getValue(item: Item): any { + if (this.accessorFn !== undefined) { + return this.accessorFn(item) + } + if (this.accessorKey !== undefined) { + return item[this.accessorKey] + } + return undefined + } } -export type DisplayColumnDataGetter = ( - cell: DisplayBodyCell, - state?: TableState -) => unknown; +export type DisplayColumnDataGetter = (cell: DisplayBodyCell, state?: TableState) => unknown export type DisplayColumnInit< - Item, - Plugins extends AnyPlugins = AnyPlugins, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - Id extends string = any + Item, + Plugins extends AnyPlugins = AnyPlugins, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + Id extends string = any > = FlatColumnInit & { - cell: DisplayLabel; - data?: DisplayColumnDataGetter; -}; + cell: DisplayLabel + data?: DisplayColumnDataGetter +} export class DisplayColumn< - Item, - Plugins extends AnyPlugins = AnyPlugins, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - Id extends string = any + Item, + Plugins extends AnyPlugins = AnyPlugins, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + Id extends string = any > extends FlatColumn { - // TODO Workaround for https://github.com/vitejs/vite/issues/9528 - __display = true; - - cell: DisplayLabel; - data?: DisplayColumnDataGetter; - constructor({ header, footer, plugins, id, cell, data }: DisplayColumnInit) { - super({ header, footer, plugins, id }); - this.cell = cell; - this.data = data; - } + // TODO Workaround for https://github.com/vitejs/vite/issues/9528 + __display = true + + cell: DisplayLabel + data?: DisplayColumnDataGetter + constructor({ header, footer, plugins, id, cell, data }: DisplayColumnInit) { + super({ header, footer, plugins, id }) + this.cell = cell + this.data = data + } } -export type GroupColumnInit = Omit< - ColumnInit, - 'height' -> & { - columns: Column[]; -}; - -export class GroupColumn extends Column< - Item, - Plugins -> { - // TODO Workaround for https://github.com/vitejs/vite/issues/9528 - __group = true; - - columns: Column[]; - ids: string[]; - constructor({ header, footer, columns, plugins }: GroupColumnInit) { - const height = Math.max(...columns.map((c) => c.height)) + 1; - super({ header, footer, height, plugins }); - this.columns = columns; - this.ids = getFlatColumnIds(columns); - } +export type GroupColumnInit = Omit, 'height'> & { + columns: Column[] } -export const getFlatColumnIds = ( - columns: Column[] -): string[] => columns.flatMap((c) => (c.isFlat() ? [c.id] : c.isGroup() ? c.ids : [])); +export class GroupColumn extends Column { + // TODO Workaround for https://github.com/vitejs/vite/issues/9528 + __group = true + + columns: Column[] + ids: string[] + constructor({ header, footer, columns, plugins }: GroupColumnInit) { + const height = Math.max(...columns.map((c) => c.height)) + 1 + super({ header, footer, height, plugins }) + this.columns = columns + this.ids = getFlatColumnIds(columns) + } +} -export const getFlatColumns = ( - columns: Column[] -): FlatColumn[] => { - return columns.flatMap((c) => (c.isFlat() ? [c] : c.isGroup() ? getFlatColumns(c.columns) : [])); -}; +export const getFlatColumnIds = (columns: Column[]): string[] => columns.flatMap((c) => (c.isFlat() ? [c.id] : c.isGroup() ? c.ids : [])) + +export const getFlatColumns = (columns: Column[]): FlatColumn[] => { + return columns.flatMap((c) => (c.isFlat() ? [c] : c.isGroup() ? getFlatColumns(c.columns) : [])) +} diff --git a/src/lib/constants.ts b/src/lib/constants.ts index ed8acbb..7f8957d 100644 --- a/src/lib/constants.ts +++ b/src/lib/constants.ts @@ -1 +1 @@ -export const NBSP = ' '; +export const NBSP = ' ' diff --git a/src/lib/createTable.createColumns.test.ts b/src/lib/createTable.createColumns.test.ts index 959b79b..fea2868 100644 --- a/src/lib/createTable.createColumns.test.ts +++ b/src/lib/createTable.createColumns.test.ts @@ -1,83 +1,83 @@ -import { writable } from 'svelte/store'; -import { createTable } from './createTable.js'; +import { writable } from 'svelte/store' +import { createTable } from './createTable.js' interface User { - firstName: string; - lastName: string; - age: number; - visits: number; - progress: number; - status: string; + firstName: string + lastName: string + age: number + visits: number + progress: number + status: string } -const data = writable([]); +const data = writable([]) -const table = createTable(data); +const table = createTable(data) it('passes if no duplicate columns', () => { - expect(() => { - table.createColumns([ - table.column({ - header: 'First Name', - accessor: 'firstName', - }), - table.column({ - header: 'Age', - accessor: 'age', - }), - ]); - }).not.toThrow(); -}); + expect(() => { + table.createColumns([ + table.column({ + header: 'First Name', + accessor: 'firstName' + }), + table.column({ + header: 'Age', + accessor: 'age' + }) + ]) + }).not.toThrow() +}) it('throws if two columns have the same id', () => { - expect(() => { - table.createColumns([ - table.column({ - header: 'First Name', - accessor: 'firstName', - }), - table.column({ - header: 'Age', - accessor: 'firstName', - }), - ]); - }).toThrowError('Duplicate column ids not allowed: "firstName"'); -}); + expect(() => { + table.createColumns([ + table.column({ + header: 'First Name', + accessor: 'firstName' + }), + table.column({ + header: 'Age', + accessor: 'firstName' + }) + ]) + }).toThrowError('Duplicate column ids not allowed: "firstName"') +}) it('using headers as id, passes if no duplicate headers', () => { - expect(() => { - table.createColumns([ - table.column({ - header: 'First Name', - accessor: (item) => item.firstName, - }), - table.column({ - header: 'Last Name', - accessor: (item) => item.lastName, - }), - table.display({ - header: 'Actions', - cell: () => '', - }), - ]); - }).not.toThrow(); -}); + expect(() => { + table.createColumns([ + table.column({ + header: 'First Name', + accessor: (item) => item.firstName + }), + table.column({ + header: 'Last Name', + accessor: (item) => item.lastName + }), + table.display({ + header: 'Actions', + cell: () => '' + }) + ]) + }).not.toThrow() +}) it('using headers as id, throws if two columns have the same headers', () => { - expect(() => { - table.createColumns([ - table.column({ - header: 'First Name', - accessor: (item) => item.firstName, - }), - table.column({ - header: 'Last Name', - accessor: (item) => item.lastName, - }), - table.display({ - header: 'First Name', - cell: () => '', - }), - ]); - }).toThrowError('Duplicate column ids not allowed: "First Name"'); -}); + expect(() => { + table.createColumns([ + table.column({ + header: 'First Name', + accessor: (item) => item.firstName + }), + table.column({ + header: 'Last Name', + accessor: (item) => item.lastName + }), + table.display({ + header: 'First Name', + cell: () => '' + }) + ]) + }).toThrowError('Duplicate column ids not allowed: "First Name"') +}) diff --git a/src/lib/createTable.ts b/src/lib/createTable.ts index 898e387..9ebbe37 100644 --- a/src/lib/createTable.ts +++ b/src/lib/createTable.ts @@ -1,79 +1,66 @@ import { - DataColumn, - DisplayColumn, - getFlatColumnIds, - GroupColumn, - type Column, - type DataColumnInit, - type DataColumnInitBase, - type DataColumnInitFnAndId, - type DataColumnInitIdAndKey, - type DataColumnInitKey, - type DisplayColumnInit, - type GroupColumnInit, -} from './columns.js'; -import type { AnyPlugins } from './types/TablePlugin.js'; -import type { ReadOrWritable } from './utils/store.js'; -import { getDuplicates } from './utils/array.js'; -import { - createViewModel, - type CreateViewModelOptions, - type TableViewModel, -} from './createViewModel.js'; + DataColumn, + DisplayColumn, + getFlatColumnIds, + GroupColumn, + type Column, + type DataColumnInit, + type DataColumnInitBase, + type DataColumnInitFnAndId, + type DataColumnInitIdAndKey, + type DataColumnInitKey, + type DisplayColumnInit, + type GroupColumnInit +} from './columns.js' +import type { AnyPlugins } from './types/TablePlugin.js' +import type { ReadOrWritable } from './utils/store.js' +import { getDuplicates } from './utils/array.js' +import { createViewModel, type CreateViewModelOptions, type TableViewModel } from './createViewModel.js' export class Table { - data: ReadOrWritable; - plugins: Plugins; - constructor(data: ReadOrWritable, plugins: Plugins) { - this.data = data; - this.plugins = plugins; - } + data: ReadOrWritable + plugins: Plugins + constructor(data: ReadOrWritable, plugins: Plugins) { + this.data = data + this.plugins = plugins + } - createColumns(columns: Column[]): Column[] { - const ids = getFlatColumnIds(columns); - const duplicateIds = getDuplicates(ids); - if (duplicateIds.length !== 0) { - throw new Error(`Duplicate column ids not allowed: "${duplicateIds.join('", "')}"`); - } - return columns; - } + createColumns(columns: Column[]): Column[] { + const ids = getFlatColumnIds(columns) + const duplicateIds = getDuplicates(ids) + if (duplicateIds.length !== 0) { + throw new Error(`Duplicate column ids not allowed: "${duplicateIds.join('", "')}"`) + } + return columns + } - // `accessorKey` only - column>( - def: DataColumnInitBase & DataColumnInitKey - ): DataColumn; - // `accessorKey` and `id` - column( - def: DataColumnInitBase & DataColumnInitIdAndKey - ): DataColumn; - // `accessorFn` and `id` - column( - def: DataColumnInitBase & DataColumnInitFnAndId - ): DataColumn; - column(def: DataColumnInit) { - return new DataColumn(def); - } + // `accessorKey` only + column>(def: DataColumnInitBase & DataColumnInitKey): DataColumn + // `accessorKey` and `id` + column(def: DataColumnInitBase & DataColumnInitIdAndKey): DataColumn + // `accessorFn` and `id` + column(def: DataColumnInitBase & DataColumnInitFnAndId): DataColumn + column(def: DataColumnInit) { + return new DataColumn(def) + } - group(def: GroupColumnInit): GroupColumn { - return new GroupColumn(def); - } + group(def: GroupColumnInit): GroupColumn { + return new GroupColumn(def) + } - display(def: DisplayColumnInit): DisplayColumn { - return new DisplayColumn(def); - } + display(def: DisplayColumnInit): DisplayColumn { + return new DisplayColumn(def) + } - createViewModel( - columns: Column[], - options?: CreateViewModelOptions - ): TableViewModel { - return createViewModel(this, columns, options); - } + createViewModel(columns: Column[], options?: CreateViewModelOptions): TableViewModel { + return createViewModel(this, columns, options) + } } export const createTable = ( - data: ReadOrWritable, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - plugins: Plugins = {} as any + data: ReadOrWritable, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + plugins: Plugins = {} as any ): Table => { - return new Table(data, plugins); -}; + return new Table(data, plugins) +} diff --git a/src/lib/createViewModel.ts b/src/lib/createViewModel.ts index db9ca16..5a01955 100644 --- a/src/lib/createViewModel.ts +++ b/src/lib/createViewModel.ts @@ -1,336 +1,307 @@ -import { derived, readable, writable, type Readable, type Writable } from 'svelte/store'; -import { BodyRow, getBodyRows, getColumnedBodyRows } from './bodyRows.js'; -import { FlatColumn, getFlatColumns, type Column } from './columns.js'; -import type { Table } from './createTable.js'; -import { getHeaderRows, HeaderRow } from './headerRows.js'; -import type { - AnyPlugins, - DeriveFlatColumnsFn, - DeriveRowsFn, - DeriveFn, - PluginStates, -} from './types/TablePlugin.js'; -import { finalizeAttributes } from './utils/attributes.js'; -import { nonUndefined } from './utils/filter.js'; +import { derived, readable, writable, type Readable, type Writable } from 'svelte/store' +import { BodyRow, getBodyRows, getColumnedBodyRows } from './bodyRows.js' +import { FlatColumn, getFlatColumns, type Column } from './columns.js' +import type { Table } from './createTable.js' +import { getHeaderRows, HeaderRow } from './headerRows.js' +import type { AnyPlugins, DeriveFlatColumnsFn, DeriveRowsFn, DeriveFn, PluginStates } from './types/TablePlugin.js' +import { finalizeAttributes } from './utils/attributes.js' +import { nonUndefined } from './utils/filter.js' // eslint-disable-next-line @typescript-eslint/no-unused-vars -export type TableAttributes = Record< - string, - unknown -> & { - role: 'table'; -}; +export type TableAttributes = Record & { + role: 'table' +} // eslint-disable-next-line @typescript-eslint/no-unused-vars -export type TableHeadAttributes = Record< - string, - unknown ->; +export type TableHeadAttributes = Record // eslint-disable-next-line @typescript-eslint/no-unused-vars -export type TableBodyAttributes = Record< - string, - unknown -> & { - role: 'rowgroup'; -}; +export type TableBodyAttributes = Record & { + role: 'rowgroup' +} export interface TableViewModel { - flatColumns: FlatColumn[]; - tableAttrs: Readable>; - tableHeadAttrs: Readable>; - tableBodyAttrs: Readable>; - visibleColumns: Readable[]>; - headerRows: Readable[]>; - originalRows: Readable[]>; - rows: Readable[]>; - pageRows: Readable[]>; - pluginStates: PluginStates; + flatColumns: FlatColumn[] + tableAttrs: Readable> + tableHeadAttrs: Readable> + tableBodyAttrs: Readable> + visibleColumns: Readable[]> + headerRows: Readable[]> + originalRows: Readable[]> + rows: Readable[]> + pageRows: Readable[]> + pluginStates: PluginStates } -export type ReadOrWritable = Readable | Writable; -export interface PluginInitTableState - extends Omit, 'pluginStates'> { - data: ReadOrWritable; - columns: Column[]; +export type ReadOrWritable = Readable | Writable +export interface PluginInitTableState extends Omit, 'pluginStates'> { + data: ReadOrWritable + columns: Column[] } -export interface TableState - extends TableViewModel { - data: ReadOrWritable; - columns: Column[]; +export interface TableState extends TableViewModel { + data: ReadOrWritable + columns: Column[] } export interface CreateViewModelOptions { - rowDataId?: (item: Item, index: number) => string; + rowDataId?: (item: Item, index: number) => string } export const createViewModel = ( - table: Table, - columns: Column[], - { rowDataId }: CreateViewModelOptions = {}, + table: Table, + columns: Column[], + { rowDataId }: CreateViewModelOptions = {} ): TableViewModel => { - const { data, plugins } = table; + const { data, plugins } = table - const $flatColumns = getFlatColumns(columns); - const flatColumns = readable($flatColumns); + const $flatColumns = getFlatColumns(columns) + const flatColumns = readable($flatColumns) - const originalRows = derived([data, flatColumns], ([$data, $flatColumns]) => { - return getBodyRows($data, $flatColumns, { rowDataId }); - }); + const originalRows = derived([data, flatColumns], ([$data, $flatColumns]) => { + return getBodyRows($data, $flatColumns, { rowDataId }) + }) - // _stores need to be defined first to pass into plugins for initialization. - const _visibleColumns = writable[]>([]); - const _headerRows = writable[]>(); - const _rows = writable[]>([]); - const _pageRows = writable[]>([]); - const _tableAttrs = writable>({ - role: 'table' as const, - }); - const _tableHeadAttrs = writable>({}); - const _tableBodyAttrs = writable>({ - role: 'rowgroup' as const, - }); - const pluginInitTableState: PluginInitTableState = { - data, - columns, - flatColumns: $flatColumns, - tableAttrs: _tableAttrs, - tableHeadAttrs: _tableHeadAttrs, - tableBodyAttrs: _tableBodyAttrs, - visibleColumns: _visibleColumns, - headerRows: _headerRows, - originalRows, - rows: _rows, - pageRows: _pageRows, - }; + // _stores need to be defined first to pass into plugins for initialization. + const _visibleColumns = writable[]>([]) + const _headerRows = writable[]>() + const _rows = writable[]>([]) + const _pageRows = writable[]>([]) + const _tableAttrs = writable>({ + role: 'table' as const + }) + const _tableHeadAttrs = writable>({}) + const _tableBodyAttrs = writable>({ + role: 'rowgroup' as const + }) + const pluginInitTableState: PluginInitTableState = { + data, + columns, + flatColumns: $flatColumns, + tableAttrs: _tableAttrs, + tableHeadAttrs: _tableHeadAttrs, + tableBodyAttrs: _tableBodyAttrs, + visibleColumns: _visibleColumns, + headerRows: _headerRows, + originalRows, + rows: _rows, + pageRows: _pageRows + } - const pluginInstances = Object.fromEntries( - Object.entries(plugins).map(([pluginName, plugin]) => { - const columnOptions = Object.fromEntries( - $flatColumns - .map((c) => { - const option = c.plugins?.[pluginName]; - if (option === undefined) return undefined; - return [c.id, option] as const; - }) - .filter(nonUndefined), - ); - return [ - pluginName, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - plugin({ pluginName, tableState: pluginInitTableState as any, columnOptions }), - ]; - }), - ) as { - [K in keyof Plugins]: ReturnType; - }; + const pluginInstances = Object.fromEntries( + Object.entries(plugins).map(([pluginName, plugin]) => { + const columnOptions = Object.fromEntries( + $flatColumns + .map((c) => { + const option = c.plugins?.[pluginName] + if (option === undefined) return undefined + return [c.id, option] as const + }) + .filter(nonUndefined) + ) + return [ + pluginName, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + plugin({ pluginName, tableState: pluginInitTableState as any, columnOptions }) + ] + }) + ) as { + [K in keyof Plugins]: ReturnType + } - const pluginStates = Object.fromEntries( - Object.entries(pluginInstances).map(([key, pluginInstance]) => [ - key, - pluginInstance.pluginState, - ]), - ) as PluginStates; + const pluginStates = Object.fromEntries(Object.entries(pluginInstances).map(([key, pluginInstance]) => [key, pluginInstance.pluginState])) as PluginStates - const tableState: TableState = { - data, - columns, - flatColumns: $flatColumns, - tableAttrs: _tableAttrs, - tableHeadAttrs: _tableHeadAttrs, - tableBodyAttrs: _tableBodyAttrs, - visibleColumns: _visibleColumns, - headerRows: _headerRows, - originalRows, - rows: _rows, - pageRows: _pageRows, - pluginStates, - }; + const tableState: TableState = { + data, + columns, + flatColumns: $flatColumns, + tableAttrs: _tableAttrs, + tableHeadAttrs: _tableHeadAttrs, + tableBodyAttrs: _tableBodyAttrs, + visibleColumns: _visibleColumns, + headerRows: _headerRows, + originalRows, + rows: _rows, + pageRows: _pageRows, + pluginStates + } - const deriveTableAttrsFns: DeriveFn>[] = Object.values(pluginInstances) - .map((pluginInstance) => pluginInstance.deriveTableAttrs) - .filter(nonUndefined); - let tableAttrs = readable>({ - role: 'table', - }); - deriveTableAttrsFns.forEach((fn) => { - tableAttrs = fn(tableAttrs); - }); - const finalizedTableAttrs = derived(tableAttrs, ($tableAttrs) => { - const $finalizedAttrs = finalizeAttributes($tableAttrs) as TableAttributes; - _tableAttrs.set($finalizedAttrs); - return $finalizedAttrs; - }); + const deriveTableAttrsFns: DeriveFn>[] = Object.values(pluginInstances) + .map((pluginInstance) => pluginInstance.deriveTableAttrs) + .filter(nonUndefined) + let tableAttrs = readable>({ + role: 'table' + }) + deriveTableAttrsFns.forEach((fn) => { + tableAttrs = fn(tableAttrs) + }) + const finalizedTableAttrs = derived(tableAttrs, ($tableAttrs) => { + const $finalizedAttrs = finalizeAttributes($tableAttrs) as TableAttributes + _tableAttrs.set($finalizedAttrs) + return $finalizedAttrs + }) - const deriveTableHeadAttrsFns: DeriveFn>[] = Object.values( - pluginInstances, - ) - .map((pluginInstance) => pluginInstance.deriveTableBodyAttrs) - .filter(nonUndefined); - let tableHeadAttrs = readable>({}); - deriveTableHeadAttrsFns.forEach((fn) => { - tableHeadAttrs = fn(tableHeadAttrs); - }); - const finalizedTableHeadAttrs = derived(tableHeadAttrs, ($tableHeadAttrs) => { - const $finalizedAttrs = finalizeAttributes($tableHeadAttrs) as TableHeadAttributes; - _tableHeadAttrs.set($finalizedAttrs); - return $finalizedAttrs; - }); + const deriveTableHeadAttrsFns: DeriveFn>[] = Object.values(pluginInstances) + .map((pluginInstance) => pluginInstance.deriveTableBodyAttrs) + .filter(nonUndefined) + let tableHeadAttrs = readable>({}) + deriveTableHeadAttrsFns.forEach((fn) => { + tableHeadAttrs = fn(tableHeadAttrs) + }) + const finalizedTableHeadAttrs = derived(tableHeadAttrs, ($tableHeadAttrs) => { + const $finalizedAttrs = finalizeAttributes($tableHeadAttrs) as TableHeadAttributes + _tableHeadAttrs.set($finalizedAttrs) + return $finalizedAttrs + }) - const deriveTableBodyAttrsFns: DeriveFn>[] = Object.values( - pluginInstances, - ) - .map((pluginInstance) => pluginInstance.deriveTableBodyAttrs) - .filter(nonUndefined); - let tableBodyAttrs = readable>({ - role: 'rowgroup', - }); - deriveTableBodyAttrsFns.forEach((fn) => { - tableBodyAttrs = fn(tableBodyAttrs); - }); - const finalizedTableBodyAttrs = derived(tableBodyAttrs, ($tableBodyAttrs) => { - const $finalizedAttrs = finalizeAttributes($tableBodyAttrs) as TableBodyAttributes; - _tableBodyAttrs.set($finalizedAttrs); - return $finalizedAttrs; - }); + const deriveTableBodyAttrsFns: DeriveFn>[] = Object.values(pluginInstances) + .map((pluginInstance) => pluginInstance.deriveTableBodyAttrs) + .filter(nonUndefined) + let tableBodyAttrs = readable>({ + role: 'rowgroup' + }) + deriveTableBodyAttrsFns.forEach((fn) => { + tableBodyAttrs = fn(tableBodyAttrs) + }) + const finalizedTableBodyAttrs = derived(tableBodyAttrs, ($tableBodyAttrs) => { + const $finalizedAttrs = finalizeAttributes($tableBodyAttrs) as TableBodyAttributes + _tableBodyAttrs.set($finalizedAttrs) + return $finalizedAttrs + }) - const deriveFlatColumnsFns: DeriveFlatColumnsFn[] = Object.values(pluginInstances) - .map((pluginInstance) => pluginInstance.deriveFlatColumns) - .filter(nonUndefined); + const deriveFlatColumnsFns: DeriveFlatColumnsFn[] = Object.values(pluginInstances) + .map((pluginInstance) => pluginInstance.deriveFlatColumns) + .filter(nonUndefined) - let visibleColumns = flatColumns; - deriveFlatColumnsFns.forEach((fn) => { - // Variance of generic type here is unstable. Not sure how to fix. - // eslint-disable-next-line @typescript-eslint/no-explicit-any - visibleColumns = fn(visibleColumns as any) as any; - }); + let visibleColumns = flatColumns + deriveFlatColumnsFns.forEach((fn) => { + // Variance of generic type here is unstable. Not sure how to fix. + // eslint-disable-next-line @typescript-eslint/no-explicit-any + visibleColumns = fn(visibleColumns as any) as any + }) - const injectedColumns = derived(visibleColumns, ($visibleColumns) => { - _visibleColumns.set($visibleColumns); - return $visibleColumns; - }); + const injectedColumns = derived(visibleColumns, ($visibleColumns) => { + _visibleColumns.set($visibleColumns) + return $visibleColumns + }) - const columnedRows = derived( - [originalRows, injectedColumns], - ([$originalRows, $injectedColumns]) => { - return getColumnedBodyRows( - $originalRows, - $injectedColumns.map((c) => c.id), - ); - }, - ); + const columnedRows = derived([originalRows, injectedColumns], ([$originalRows, $injectedColumns]) => { + return getColumnedBodyRows( + $originalRows, + $injectedColumns.map((c) => c.id) + ) + }) - const deriveRowsFns: DeriveRowsFn[] = Object.values(pluginInstances) - .map((pluginInstance) => pluginInstance.deriveRows) - .filter(nonUndefined); + const deriveRowsFns: DeriveRowsFn[] = Object.values(pluginInstances) + .map((pluginInstance) => pluginInstance.deriveRows) + .filter(nonUndefined) - let rows = columnedRows; - deriveRowsFns.forEach((fn) => { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - rows = fn(rows as any) as any; - }); + let rows = columnedRows + deriveRowsFns.forEach((fn) => { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + rows = fn(rows as any) as any + }) - const injectedRows = derived(rows, ($rows) => { - // Inject state. - $rows.forEach((row) => { - row.injectState(tableState); - row.cells.forEach((cell) => { - cell.injectState(tableState); - }); - }); - // Apply plugin component hooks. - Object.entries(pluginInstances).forEach(([pluginName, pluginInstance]) => { - $rows.forEach((row) => { - if (pluginInstance.hooks?.['tbody.tr'] !== undefined) { - row.applyHook(pluginName, pluginInstance.hooks['tbody.tr'](row)); - } - row.cells.forEach((cell) => { - if (pluginInstance.hooks?.['tbody.tr.td'] !== undefined) { - cell.applyHook(pluginName, pluginInstance.hooks['tbody.tr.td'](cell)); - } - }); - }); - }); - _rows.set($rows); - return $rows; - }); + const injectedRows = derived(rows, ($rows) => { + // Inject state. + $rows.forEach((row) => { + row.injectState(tableState) + row.cells.forEach((cell) => { + cell.injectState(tableState) + }) + }) + // Apply plugin component hooks. + Object.entries(pluginInstances).forEach(([pluginName, pluginInstance]) => { + $rows.forEach((row) => { + if (pluginInstance.hooks?.['tbody.tr'] !== undefined) { + row.applyHook(pluginName, pluginInstance.hooks['tbody.tr'](row)) + } + row.cells.forEach((cell) => { + if (pluginInstance.hooks?.['tbody.tr.td'] !== undefined) { + cell.applyHook(pluginName, pluginInstance.hooks['tbody.tr.td'](cell)) + } + }) + }) + }) + _rows.set($rows) + return $rows + }) - const derivePageRowsFns: DeriveRowsFn[] = Object.values(pluginInstances) - .map((pluginInstance) => pluginInstance.derivePageRows) - .filter(nonUndefined); + const derivePageRowsFns: DeriveRowsFn[] = Object.values(pluginInstances) + .map((pluginInstance) => pluginInstance.derivePageRows) + .filter(nonUndefined) - // Must derive from `injectedRows` instead of `rows` to ensure that `_rows` is set. - let pageRows = injectedRows; - derivePageRowsFns.forEach((fn) => { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - pageRows = fn(pageRows as any) as any; - }); + // Must derive from `injectedRows` instead of `rows` to ensure that `_rows` is set. + let pageRows = injectedRows + derivePageRowsFns.forEach((fn) => { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + pageRows = fn(pageRows as any) as any + }) - const injectedPageRows = derived(pageRows, ($pageRows) => { - // Inject state. - $pageRows.forEach((row) => { - row.injectState(tableState); - row.cells.forEach((cell) => { - cell.injectState(tableState); - }); - }); - // Apply plugin component hooks. - Object.entries(pluginInstances).forEach(([pluginName, pluginInstance]) => { - $pageRows.forEach((row) => { - if (pluginInstance.hooks?.['tbody.tr'] !== undefined) { - row.applyHook(pluginName, pluginInstance.hooks['tbody.tr'](row)); - } - row.cells.forEach((cell) => { - if (pluginInstance.hooks?.['tbody.tr.td'] !== undefined) { - cell.applyHook(pluginName, pluginInstance.hooks['tbody.tr.td'](cell)); - } - }); - }); - }); - _pageRows.set($pageRows); - return $pageRows; - }); + const injectedPageRows = derived(pageRows, ($pageRows) => { + // Inject state. + $pageRows.forEach((row) => { + row.injectState(tableState) + row.cells.forEach((cell) => { + cell.injectState(tableState) + }) + }) + // Apply plugin component hooks. + Object.entries(pluginInstances).forEach(([pluginName, pluginInstance]) => { + $pageRows.forEach((row) => { + if (pluginInstance.hooks?.['tbody.tr'] !== undefined) { + row.applyHook(pluginName, pluginInstance.hooks['tbody.tr'](row)) + } + row.cells.forEach((cell) => { + if (pluginInstance.hooks?.['tbody.tr.td'] !== undefined) { + cell.applyHook(pluginName, pluginInstance.hooks['tbody.tr.td'](cell)) + } + }) + }) + }) + _pageRows.set($pageRows) + return $pageRows + }) - const headerRows = derived(injectedColumns, ($injectedColumns) => { - const $headerRows = getHeaderRows( - columns, - $injectedColumns.map((c) => c.id), - ); - // Inject state. - $headerRows.forEach((row) => { - row.injectState(tableState); - row.cells.forEach((cell) => { - cell.injectState(tableState); - }); - }); - // Apply plugin component hooks. - Object.entries(pluginInstances).forEach(([pluginName, pluginInstance]) => { - $headerRows.forEach((row) => { - if (pluginInstance.hooks?.['thead.tr'] !== undefined) { - row.applyHook(pluginName, pluginInstance.hooks['thead.tr'](row)); - } - row.cells.forEach((cell) => { - if (pluginInstance.hooks?.['thead.tr.th'] !== undefined) { - cell.applyHook(pluginName, pluginInstance.hooks['thead.tr.th'](cell)); - } - }); - }); - }); - _headerRows.set($headerRows); - return $headerRows; - }); + const headerRows = derived(injectedColumns, ($injectedColumns) => { + const $headerRows = getHeaderRows( + columns, + $injectedColumns.map((c) => c.id) + ) + // Inject state. + $headerRows.forEach((row) => { + row.injectState(tableState) + row.cells.forEach((cell) => { + cell.injectState(tableState) + }) + }) + // Apply plugin component hooks. + Object.entries(pluginInstances).forEach(([pluginName, pluginInstance]) => { + $headerRows.forEach((row) => { + if (pluginInstance.hooks?.['thead.tr'] !== undefined) { + row.applyHook(pluginName, pluginInstance.hooks['thead.tr'](row)) + } + row.cells.forEach((cell) => { + if (pluginInstance.hooks?.['thead.tr.th'] !== undefined) { + cell.applyHook(pluginName, pluginInstance.hooks['thead.tr.th'](cell)) + } + }) + }) + }) + _headerRows.set($headerRows) + return $headerRows + }) - return { - tableAttrs: finalizedTableAttrs, - tableHeadAttrs: finalizedTableHeadAttrs, - tableBodyAttrs: finalizedTableBodyAttrs, - visibleColumns: injectedColumns, - flatColumns: $flatColumns, - headerRows, - originalRows, - rows: injectedRows, - pageRows: injectedPageRows, - pluginStates, - }; -}; + return { + tableAttrs: finalizedTableAttrs, + tableHeadAttrs: finalizedTableHeadAttrs, + tableBodyAttrs: finalizedTableBodyAttrs, + visibleColumns: injectedColumns, + flatColumns: $flatColumns, + headerRows, + originalRows, + rows: injectedRows, + pageRows: injectedPageRows, + pluginStates + } +} diff --git a/src/lib/headerCells.ts b/src/lib/headerCells.ts index 5a49a87..4af8941 100644 --- a/src/lib/headerCells.ts +++ b/src/lib/headerCells.ts @@ -1,257 +1,215 @@ -import { derived } from 'svelte/store'; -import { NBSP } from './constants.js'; -import { TableComponent } from './tableComponent.js'; -import type { HeaderLabel } from './types/Label.js'; -import type { AnyPlugins } from './types/TablePlugin.js'; -import type { RenderConfig } from 'svelte-render'; +import { derived } from 'svelte/store' +import { NBSP } from './constants.js' +import { TableComponent } from './tableComponent.js' +import type { HeaderLabel } from './types/Label.js' +import type { AnyPlugins } from './types/TablePlugin.js' +import type { RenderConfig } from 'svelte-render' export type HeaderCellInit = { - id: string; - label: HeaderLabel; - colspan: number; - colstart: number; -}; + id: string + label: HeaderLabel + colspan: number + colstart: number +} // eslint-disable-next-line @typescript-eslint/no-unused-vars export type HeaderCellAttributes = { - role: 'columnheader'; - colspan: number; -}; - -export abstract class HeaderCell< - Item, - Plugins extends AnyPlugins = AnyPlugins -> extends TableComponent { - label: HeaderLabel; - colspan: number; - colstart: number; - constructor({ id, label, colspan, colstart }: HeaderCellInit) { - super({ id }); - this.label = label; - this.colspan = colspan; - this.colstart = colstart; - } - - render(): RenderConfig { - if (this.label instanceof Function) { - if (this.state === undefined) { - throw new Error('Missing `state` reference'); - } - // eslint-disable-next-line @typescript-eslint/no-explicit-any - return this.label(this as HeaderCell, this.state as any); - } - return this.label; - } - - attrs() { - return derived(super.attrs(), ($baseAttrs) => { - return { - ...$baseAttrs, - role: 'columnheader' as const, - colspan: this.colspan - }; - }); - } - - abstract clone(): HeaderCell; - - // TODO Workaround for https://github.com/vitejs/vite/issues/9528 - isFlat(): this is FlatHeaderCell { - return '__flat' in this; - } - - // TODO Workaround for https://github.com/vitejs/vite/issues/9528 - isData(): this is DataHeaderCell { - return '__data' in this; - } - - // TODO Workaround for https://github.com/vitejs/vite/issues/9528 - isFlatDisplay(): this is FlatDisplayHeaderCell { - return '__flat' in this && '__display' in this; - } - - // TODO Workaround for https://github.com/vitejs/vite/issues/9528 - isGroup(): this is GroupHeaderCell { - return '__group' in this; - } - - // TODO Workaround for https://github.com/vitejs/vite/issues/9528 - isGroupDisplay(): this is GroupDisplayHeaderCell { - return '__group' in this && '__display' in this; - } + role: 'columnheader' + colspan: number +} + +export abstract class HeaderCell extends TableComponent { + label: HeaderLabel + colspan: number + colstart: number + constructor({ id, label, colspan, colstart }: HeaderCellInit) { + super({ id }) + this.label = label + this.colspan = colspan + this.colstart = colstart + } + + render(): RenderConfig { + if (this.label instanceof Function) { + if (this.state === undefined) { + throw new Error('Missing `state` reference') + } + // eslint-disable-next-line @typescript-eslint/no-explicit-any + return this.label(this as HeaderCell, this.state as any) + } + return this.label + } + + attrs() { + return derived(super.attrs(), ($baseAttrs) => { + return { + ...$baseAttrs, + role: 'columnheader' as const, + colspan: this.colspan + } + }) + } + + abstract clone(): HeaderCell + + // TODO Workaround for https://github.com/vitejs/vite/issues/9528 + isFlat(): this is FlatHeaderCell { + return '__flat' in this + } + + // TODO Workaround for https://github.com/vitejs/vite/issues/9528 + isData(): this is DataHeaderCell { + return '__data' in this + } + + // TODO Workaround for https://github.com/vitejs/vite/issues/9528 + isFlatDisplay(): this is FlatDisplayHeaderCell { + return '__flat' in this && '__display' in this + } + + // TODO Workaround for https://github.com/vitejs/vite/issues/9528 + isGroup(): this is GroupHeaderCell { + return '__group' in this + } + + // TODO Workaround for https://github.com/vitejs/vite/issues/9528 + isGroupDisplay(): this is GroupDisplayHeaderCell { + return '__group' in this && '__display' in this + } } // eslint-disable-next-line @typescript-eslint/no-unused-vars -export type FlatHeaderCellInit = Omit< - HeaderCellInit, - 'colspan' ->; +export type FlatHeaderCellInit = Omit, 'colspan'> // eslint-disable-next-line @typescript-eslint/no-unused-vars -export type FlatHeaderCellAttributes< - Item, - Plugins extends AnyPlugins = AnyPlugins -> = HeaderCellAttributes; - -export class FlatHeaderCell extends HeaderCell< - Item, - Plugins -> { - // TODO Workaround for https://github.com/vitejs/vite/issues/9528 - __flat = true; - - constructor({ id, label, colstart }: FlatHeaderCellInit) { - super({ id, label, colspan: 1, colstart }); - } - - clone(): FlatHeaderCell { - return new FlatHeaderCell({ - id: this.id, - label: this.label, - colstart: this.colstart - }); - } +export type FlatHeaderCellAttributes = HeaderCellAttributes + +export class FlatHeaderCell extends HeaderCell { + // TODO Workaround for https://github.com/vitejs/vite/issues/9528 + __flat = true + + constructor({ id, label, colstart }: FlatHeaderCellInit) { + super({ id, label, colspan: 1, colstart }) + } + + clone(): FlatHeaderCell { + return new FlatHeaderCell({ + id: this.id, + label: this.label, + colstart: this.colstart + }) + } +} + +export type DataHeaderCellInit = FlatHeaderCellInit & { + accessorKey?: keyof Item + accessorFn?: (item: Item) => unknown +} + +export class DataHeaderCell extends FlatHeaderCell { + // TODO Workaround for https://github.com/vitejs/vite/issues/9528 + __data = true + + accessorKey?: keyof Item + accessorFn?: (item: Item) => unknown + constructor({ id, label, accessorKey, accessorFn, colstart }: DataHeaderCellInit) { + super({ id, label, colstart }) + this.accessorKey = accessorKey + this.accessorFn = accessorFn + } + + clone(): DataHeaderCell { + return new DataHeaderCell({ + id: this.id, + label: this.label, + accessorFn: this.accessorFn, + accessorKey: this.accessorKey, + colstart: this.colstart + }) + } +} + +export type FlatDisplayHeaderCellInit = Omit, 'label'> & { + label?: HeaderLabel +} + +export class FlatDisplayHeaderCell extends FlatHeaderCell { + // TODO Workaround for https://github.com/vitejs/vite/issues/9528 + __display = true + + constructor({ id, label = NBSP, colstart }: FlatDisplayHeaderCellInit) { + super({ id, label, colstart }) + } + + clone(): FlatDisplayHeaderCell { + return new FlatDisplayHeaderCell({ + id: this.id, + label: this.label, + colstart: this.colstart + }) + } } -export type DataHeaderCellInit = FlatHeaderCellInit< - Item, - Plugins -> & { - accessorKey?: keyof Item; - accessorFn?: (item: Item) => unknown; -}; - -export class DataHeaderCell extends FlatHeaderCell< - Item, - Plugins -> { - // TODO Workaround for https://github.com/vitejs/vite/issues/9528 - __data = true; - - accessorKey?: keyof Item; - accessorFn?: (item: Item) => unknown; - constructor({ id, label, accessorKey, accessorFn, colstart }: DataHeaderCellInit) { - super({ id, label, colstart }); - this.accessorKey = accessorKey; - this.accessorFn = accessorFn; - } - - clone(): DataHeaderCell { - return new DataHeaderCell({ - id: this.id, - label: this.label, - accessorFn: this.accessorFn, - accessorKey: this.accessorKey, - colstart: this.colstart - }); - } +export type GroupHeaderCellInit = Omit, 'id'> & { + ids: string[] + allIds: string[] } -export type FlatDisplayHeaderCellInit = Omit< - FlatHeaderCellInit, - 'label' -> & { - label?: HeaderLabel; -}; - -export class FlatDisplayHeaderCell< - Item, - Plugins extends AnyPlugins = AnyPlugins -> extends FlatHeaderCell { - // TODO Workaround for https://github.com/vitejs/vite/issues/9528 - __display = true; - - constructor({ id, label = NBSP, colstart }: FlatDisplayHeaderCellInit) { - super({ id, label, colstart }); - } - - clone(): FlatDisplayHeaderCell { - return new FlatDisplayHeaderCell({ - id: this.id, - label: this.label, - colstart: this.colstart - }); - } +export class GroupHeaderCell extends HeaderCell { + // TODO Workaround for https://github.com/vitejs/vite/issues/9528 + __group = true + + ids: string[] + allId: string + allIds: string[] + constructor({ label, ids, allIds, colspan, colstart }: GroupHeaderCellInit) { + super({ id: `[${ids.join(',')}]`, label, colspan, colstart }) + this.ids = ids + this.allId = `[${allIds.join(',')}]` + this.allIds = allIds + } + + setIds(ids: string[]) { + this.ids = ids + this.id = `[${this.ids.join(',')}]` + } + + pushId(id: string) { + this.ids = [...this.ids, id] + this.id = `[${this.ids.join(',')}]` + } + + clone(): GroupHeaderCell { + return new GroupHeaderCell({ + label: this.label, + ids: this.ids, + allIds: this.allIds, + colspan: this.colspan, + colstart: this.colstart + }) + } } -export type GroupHeaderCellInit = Omit< - HeaderCellInit, - 'id' -> & { - ids: string[]; - allIds: string[]; -}; - -export class GroupHeaderCell extends HeaderCell< - Item, - Plugins -> { - // TODO Workaround for https://github.com/vitejs/vite/issues/9528 - __group = true; - - ids: string[]; - allId: string; - allIds: string[]; - constructor({ label, ids, allIds, colspan, colstart }: GroupHeaderCellInit) { - super({ id: `[${ids.join(',')}]`, label, colspan, colstart }); - this.ids = ids; - this.allId = `[${allIds.join(',')}]`; - this.allIds = allIds; - } - - setIds(ids: string[]) { - this.ids = ids; - this.id = `[${this.ids.join(',')}]`; - } - - pushId(id: string) { - this.ids = [...this.ids, id]; - this.id = `[${this.ids.join(',')}]`; - } - - clone(): GroupHeaderCell { - return new GroupHeaderCell({ - label: this.label, - ids: this.ids, - allIds: this.allIds, - colspan: this.colspan, - colstart: this.colstart - }); - } +export type GroupDisplayHeaderCellInit = Omit, 'label' | 'colspan'> & { + label?: HeaderLabel + colspan?: number } -export type GroupDisplayHeaderCellInit = Omit< - GroupHeaderCellInit, - 'label' | 'colspan' -> & { - label?: HeaderLabel; - colspan?: number; -}; - -export class GroupDisplayHeaderCell< - Item, - Plugins extends AnyPlugins = AnyPlugins -> extends GroupHeaderCell { - // TODO Workaround for https://github.com/vitejs/vite/issues/9528 - __display = true; - - constructor({ - label = NBSP, - ids, - allIds, - colspan = 1, - colstart - }: GroupDisplayHeaderCellInit) { - super({ label, ids, allIds, colspan, colstart }); - } - - clone(): GroupDisplayHeaderCell { - return new GroupDisplayHeaderCell({ - label: this.label, - ids: this.ids, - allIds: this.allIds, - colspan: this.colspan, - colstart: this.colstart - }); - } +export class GroupDisplayHeaderCell extends GroupHeaderCell { + // TODO Workaround for https://github.com/vitejs/vite/issues/9528 + __display = true + + constructor({ label = NBSP, ids, allIds, colspan = 1, colstart }: GroupDisplayHeaderCellInit) { + super({ label, ids, allIds, colspan, colstart }) + } + + clone(): GroupDisplayHeaderCell { + return new GroupDisplayHeaderCell({ + label: this.label, + ids: this.ids, + allIds: this.allIds, + colspan: this.colspan, + colstart: this.colstart + }) + } } diff --git a/src/lib/headerRows.getHeaderRows.test.ts b/src/lib/headerRows.getHeaderRows.test.ts index b4f02ca..2eb978e 100644 --- a/src/lib/headerRows.getHeaderRows.test.ts +++ b/src/lib/headerRows.getHeaderRows.test.ts @@ -1,467 +1,467 @@ -import { writable } from 'svelte/store'; -import { createTable } from './createTable.js'; -import { DataHeaderCell, GroupDisplayHeaderCell, GroupHeaderCell } from './headerCells.js'; -import { getHeaderRows, HeaderRow } from './headerRows.js'; +import { writable } from 'svelte/store' +import { createTable } from './createTable.js' +import { DataHeaderCell, GroupDisplayHeaderCell, GroupHeaderCell } from './headerCells.js' +import { getHeaderRows, HeaderRow } from './headerRows.js' interface User { - firstName: string; - lastName: string; - age: number; - visits: number; - progress: number; - status: string; + firstName: string + lastName: string + age: number + visits: number + progress: number + status: string } -const data = writable([]); +const data = writable([]) -const table = createTable(data); +const table = createTable(data) it('arranges flat columns\n[][][]', () => { - const columns = table.createColumns([ - table.column({ - header: 'First Name', - accessor: 'firstName', - }), - table.column({ - header: 'Last Name', - accessor: 'lastName', - }), - table.column({ - header: 'Age', - accessor: 'age', - }), - ]); + const columns = table.createColumns([ + table.column({ + header: 'First Name', + accessor: 'firstName' + }), + table.column({ + header: 'Last Name', + accessor: 'lastName' + }), + table.column({ + header: 'Age', + accessor: 'age' + }) + ]) - const actual = getHeaderRows(columns); + const actual = getHeaderRows(columns) - const expected: HeaderRow[] = [ - new HeaderRow({ - id: '0', - cells: [ - new DataHeaderCell({ - label: 'First Name', - accessorKey: 'firstName', - id: 'firstName', - colstart: 0, - }), - new DataHeaderCell({ - label: 'Last Name', - accessorKey: 'lastName', - id: 'lastName', - colstart: 1, - }), - new DataHeaderCell({ - label: 'Age', - accessorKey: 'age', - id: 'age', - colstart: 2, - }), - ], - }), - ]; + const expected: HeaderRow[] = [ + new HeaderRow({ + id: '0', + cells: [ + new DataHeaderCell({ + label: 'First Name', + accessorKey: 'firstName', + id: 'firstName', + colstart: 0 + }), + new DataHeaderCell({ + label: 'Last Name', + accessorKey: 'lastName', + id: 'lastName', + colstart: 1 + }), + new DataHeaderCell({ + label: 'Age', + accessorKey: 'age', + id: 'age', + colstart: 2 + }) + ] + }) + ] - expect(actual).toStrictEqual(expected); -}); + expect(actual).toStrictEqual(expected) +}) it('creates a group over flat columns\n[ ]\n[][][]', () => { - const columns = table.createColumns([ - table.group({ - header: 'Info', - columns: [ - table.column({ - header: 'First Name', - accessor: 'firstName', - }), - table.column({ - header: 'Last Name', - accessor: 'lastName', - }), - table.column({ - header: 'Age', - accessor: 'age', - }), - ], - }), - ]); + const columns = table.createColumns([ + table.group({ + header: 'Info', + columns: [ + table.column({ + header: 'First Name', + accessor: 'firstName' + }), + table.column({ + header: 'Last Name', + accessor: 'lastName' + }), + table.column({ + header: 'Age', + accessor: 'age' + }) + ] + }) + ]) - const actual = getHeaderRows(columns); + const actual = getHeaderRows(columns) - const expected: HeaderRow[] = [ - new HeaderRow({ - id: '0', - cells: [ - new GroupHeaderCell({ - colspan: 3, - colstart: 0, - label: 'Info', - allIds: ['firstName', 'lastName', 'age'], - ids: ['firstName', 'lastName', 'age'], - }), - ], - }), - new HeaderRow({ - id: '1', - cells: [ - new DataHeaderCell({ - colstart: 0, - label: 'First Name', - accessorKey: 'firstName', - id: 'firstName', - }), - new DataHeaderCell({ - colstart: 1, - label: 'Last Name', - accessorKey: 'lastName', - id: 'lastName', - }), - new DataHeaderCell({ - colstart: 2, - label: 'Age', - accessorKey: 'age', - id: 'age', - }), - ], - }), - ]; + const expected: HeaderRow[] = [ + new HeaderRow({ + id: '0', + cells: [ + new GroupHeaderCell({ + colspan: 3, + colstart: 0, + label: 'Info', + allIds: ['firstName', 'lastName', 'age'], + ids: ['firstName', 'lastName', 'age'] + }) + ] + }), + new HeaderRow({ + id: '1', + cells: [ + new DataHeaderCell({ + colstart: 0, + label: 'First Name', + accessorKey: 'firstName', + id: 'firstName' + }), + new DataHeaderCell({ + colstart: 1, + label: 'Last Name', + accessorKey: 'lastName', + id: 'lastName' + }), + new DataHeaderCell({ + colstart: 2, + label: 'Age', + accessorKey: 'age', + id: 'age' + }) + ] + }) + ] - expect(actual).toStrictEqual(expected); -}); + expect(actual).toStrictEqual(expected) +}) it('creates two groups over different columns\n[ ][ ]\n[][][][][]', () => { - const columns = table.createColumns([ - table.group({ - header: 'Name', - columns: [ - table.column({ - header: 'First Name', - accessor: 'firstName', - }), - table.column({ - header: 'Last Name', - accessor: 'lastName', - }), - ], - }), - table.group({ - header: 'Info', - columns: [ - table.column({ - header: 'Age', - accessor: 'age', - }), - table.column({ - header: 'Status', - accessor: 'status', - }), - table.column({ - header: 'Profile Progress', - accessor: 'progress', - }), - ], - }), - ]); + const columns = table.createColumns([ + table.group({ + header: 'Name', + columns: [ + table.column({ + header: 'First Name', + accessor: 'firstName' + }), + table.column({ + header: 'Last Name', + accessor: 'lastName' + }) + ] + }), + table.group({ + header: 'Info', + columns: [ + table.column({ + header: 'Age', + accessor: 'age' + }), + table.column({ + header: 'Status', + accessor: 'status' + }), + table.column({ + header: 'Profile Progress', + accessor: 'progress' + }) + ] + }) + ]) - const actual = getHeaderRows(columns); + const actual = getHeaderRows(columns) - const expected: HeaderRow[] = [ - new HeaderRow({ - id: '0', - cells: [ - new GroupHeaderCell({ - colspan: 2, - colstart: 0, - label: 'Name', - allIds: ['firstName', 'lastName'], - ids: ['firstName', 'lastName'], - }), - new GroupHeaderCell({ - colspan: 3, - colstart: 2, - label: 'Info', - allIds: ['age', 'status', 'progress'], - ids: ['age', 'status', 'progress'], - }), - ], - }), - new HeaderRow({ - id: '1', - cells: [ - new DataHeaderCell({ - colstart: 0, - label: 'First Name', - accessorKey: 'firstName', - id: 'firstName', - }), - new DataHeaderCell({ - colstart: 1, - label: 'Last Name', - accessorKey: 'lastName', - id: 'lastName', - }), - new DataHeaderCell({ - colstart: 2, - label: 'Age', - accessorKey: 'age', - id: 'age', - }), - new DataHeaderCell({ - colstart: 3, - label: 'Status', - accessorKey: 'status', - id: 'status', - }), - new DataHeaderCell({ - colstart: 4, - label: 'Profile Progress', - accessorKey: 'progress', - id: 'progress', - }), - ], - }), - ]; + const expected: HeaderRow[] = [ + new HeaderRow({ + id: '0', + cells: [ + new GroupHeaderCell({ + colspan: 2, + colstart: 0, + label: 'Name', + allIds: ['firstName', 'lastName'], + ids: ['firstName', 'lastName'] + }), + new GroupHeaderCell({ + colspan: 3, + colstart: 2, + label: 'Info', + allIds: ['age', 'status', 'progress'], + ids: ['age', 'status', 'progress'] + }) + ] + }), + new HeaderRow({ + id: '1', + cells: [ + new DataHeaderCell({ + colstart: 0, + label: 'First Name', + accessorKey: 'firstName', + id: 'firstName' + }), + new DataHeaderCell({ + colstart: 1, + label: 'Last Name', + accessorKey: 'lastName', + id: 'lastName' + }), + new DataHeaderCell({ + colstart: 2, + label: 'Age', + accessorKey: 'age', + id: 'age' + }), + new DataHeaderCell({ + colstart: 3, + label: 'Status', + accessorKey: 'status', + id: 'status' + }), + new DataHeaderCell({ + colstart: 4, + label: 'Profile Progress', + accessorKey: 'progress', + id: 'progress' + }) + ] + }) + ] - expect(actual).toStrictEqual(expected); -}); + expect(actual).toStrictEqual(expected) +}) it('groups a subset of columns and ungrouped columns have flat header cells on the last row\n[ ] \n[][][][][]', () => { - const columns = table.createColumns([ - table.group({ - header: 'Name', - columns: [ - table.column({ - header: 'First Name', - accessor: 'firstName', - }), - table.column({ - header: 'Last Name', - accessor: 'lastName', - }), - ], - }), - table.column({ - header: 'Age', - accessor: 'age', - }), - table.column({ - header: 'Status', - accessor: 'status', - }), - table.column({ - header: 'Profile Progress', - accessor: 'progress', - }), - ]); + const columns = table.createColumns([ + table.group({ + header: 'Name', + columns: [ + table.column({ + header: 'First Name', + accessor: 'firstName' + }), + table.column({ + header: 'Last Name', + accessor: 'lastName' + }) + ] + }), + table.column({ + header: 'Age', + accessor: 'age' + }), + table.column({ + header: 'Status', + accessor: 'status' + }), + table.column({ + header: 'Profile Progress', + accessor: 'progress' + }) + ]) - const actual = getHeaderRows(columns); + const actual = getHeaderRows(columns) - const expected: HeaderRow[] = [ - new HeaderRow({ - id: '0', - cells: [ - new GroupHeaderCell({ - colspan: 2, - colstart: 0, - label: 'Name', - allIds: ['firstName', 'lastName'], - ids: ['firstName', 'lastName'], - }), - new GroupDisplayHeaderCell({ colstart: 2, allIds: ['age'], ids: ['age'] }), - new GroupDisplayHeaderCell({ colstart: 3, allIds: ['status'], ids: ['status'] }), - new GroupDisplayHeaderCell({ colstart: 4, allIds: ['progress'], ids: ['progress'] }), - ], - }), - new HeaderRow({ - id: '1', - cells: [ - new DataHeaderCell({ - colstart: 0, - label: 'First Name', - accessorKey: 'firstName', - id: 'firstName', - }), - new DataHeaderCell({ - colstart: 1, - label: 'Last Name', - accessorKey: 'lastName', - id: 'lastName', - }), - new DataHeaderCell({ - colstart: 2, - label: 'Age', - accessorKey: 'age', - id: 'age', - }), - new DataHeaderCell({ - colstart: 3, - label: 'Status', - accessorKey: 'status', - id: 'status', - }), - new DataHeaderCell({ - colstart: 4, - label: 'Profile Progress', - accessorKey: 'progress', - id: 'progress', - }), - ], - }), - ]; + const expected: HeaderRow[] = [ + new HeaderRow({ + id: '0', + cells: [ + new GroupHeaderCell({ + colspan: 2, + colstart: 0, + label: 'Name', + allIds: ['firstName', 'lastName'], + ids: ['firstName', 'lastName'] + }), + new GroupDisplayHeaderCell({ colstart: 2, allIds: ['age'], ids: ['age'] }), + new GroupDisplayHeaderCell({ colstart: 3, allIds: ['status'], ids: ['status'] }), + new GroupDisplayHeaderCell({ colstart: 4, allIds: ['progress'], ids: ['progress'] }) + ] + }), + new HeaderRow({ + id: '1', + cells: [ + new DataHeaderCell({ + colstart: 0, + label: 'First Name', + accessorKey: 'firstName', + id: 'firstName' + }), + new DataHeaderCell({ + colstart: 1, + label: 'Last Name', + accessorKey: 'lastName', + id: 'lastName' + }), + new DataHeaderCell({ + colstart: 2, + label: 'Age', + accessorKey: 'age', + id: 'age' + }), + new DataHeaderCell({ + colstart: 3, + label: 'Status', + accessorKey: 'status', + id: 'status' + }), + new DataHeaderCell({ + colstart: 4, + label: 'Profile Progress', + accessorKey: 'progress', + id: 'progress' + }) + ] + }) + ] - expect(actual).toStrictEqual(expected); -}); + expect(actual).toStrictEqual(expected) +}) it('puts flat header cells on the last row if there is a gap between the group and flat header cell\n[ ]\n[] \n[][]', () => { - const columns = table.createColumns([ - table.group({ - header: 'ID', - columns: [ - table.group({ - header: 'Name', - columns: [ - table.column({ - header: 'First Name', - accessor: 'firstName', - }), - ], - }), - table.column({ - header: 'Profile Progress', - accessor: 'progress', - }), - ], - }), - ]); + const columns = table.createColumns([ + table.group({ + header: 'ID', + columns: [ + table.group({ + header: 'Name', + columns: [ + table.column({ + header: 'First Name', + accessor: 'firstName' + }) + ] + }), + table.column({ + header: 'Profile Progress', + accessor: 'progress' + }) + ] + }) + ]) - const actual = getHeaderRows(columns); + const actual = getHeaderRows(columns) - const expected: HeaderRow[] = [ - new HeaderRow({ - id: '0', - cells: [ - new GroupHeaderCell({ - colspan: 2, - colstart: 0, - label: 'ID', - allIds: ['firstName', 'progress'], - ids: ['firstName', 'progress'], - }), - ], - }), - new HeaderRow({ - id: '1', - cells: [ - new GroupHeaderCell({ - colspan: 1, - colstart: 0, - label: 'Name', - allIds: ['firstName'], - ids: ['firstName'], - }), - new GroupDisplayHeaderCell({ colstart: 1, ids: ['progress'], allIds: ['progress'] }), - ], - }), - new HeaderRow({ - id: '2', - cells: [ - new DataHeaderCell({ - colstart: 0, - label: 'First Name', - accessorKey: 'firstName', - id: 'firstName', - }), - new DataHeaderCell({ - colstart: 1, - label: 'Profile Progress', - accessorKey: 'progress', - id: 'progress', - }), - ], - }), - ]; + const expected: HeaderRow[] = [ + new HeaderRow({ + id: '0', + cells: [ + new GroupHeaderCell({ + colspan: 2, + colstart: 0, + label: 'ID', + allIds: ['firstName', 'progress'], + ids: ['firstName', 'progress'] + }) + ] + }), + new HeaderRow({ + id: '1', + cells: [ + new GroupHeaderCell({ + colspan: 1, + colstart: 0, + label: 'Name', + allIds: ['firstName'], + ids: ['firstName'] + }), + new GroupDisplayHeaderCell({ colstart: 1, ids: ['progress'], allIds: ['progress'] }) + ] + }), + new HeaderRow({ + id: '2', + cells: [ + new DataHeaderCell({ + colstart: 0, + label: 'First Name', + accessorKey: 'firstName', + id: 'firstName' + }), + new DataHeaderCell({ + colstart: 1, + label: 'Profile Progress', + accessorKey: 'progress', + id: 'progress' + }) + ] + }) + ] - expect(actual).toStrictEqual(expected); -}); + expect(actual).toStrictEqual(expected) +}) it('puts group cells on the lowest row possible\n[]\n[][]\n[][]', () => { - const columns = table.createColumns([ - table.group({ - header: 'ID', - columns: [ - table.group({ - header: 'Name', - columns: [ - table.column({ - header: 'First Name', - accessor: 'firstName', - }), - ], - }), - ], - }), - table.group({ - header: 'Info', - columns: [ - table.column({ - header: 'Profile Progress', - accessor: 'progress', - }), - ], - }), - ]); + const columns = table.createColumns([ + table.group({ + header: 'ID', + columns: [ + table.group({ + header: 'Name', + columns: [ + table.column({ + header: 'First Name', + accessor: 'firstName' + }) + ] + }) + ] + }), + table.group({ + header: 'Info', + columns: [ + table.column({ + header: 'Profile Progress', + accessor: 'progress' + }) + ] + }) + ]) - const actual = getHeaderRows(columns); + const actual = getHeaderRows(columns) - const expected: HeaderRow[] = [ - new HeaderRow({ - id: '0', - cells: [ - new GroupHeaderCell({ - colspan: 1, - colstart: 0, - label: 'ID', - allIds: ['firstName'], - ids: ['firstName'], - }), - new GroupDisplayHeaderCell({ colstart: 1, allIds: ['progress'], ids: ['progress'] }), - ], - }), - new HeaderRow({ - id: '1', - cells: [ - new GroupHeaderCell({ - colspan: 1, - colstart: 0, - label: 'Name', - allIds: ['firstName'], - ids: ['firstName'], - }), - new GroupHeaderCell({ - colspan: 1, - colstart: 1, - label: 'Info', - allIds: ['progress'], - ids: ['progress'], - }), - ], - }), - new HeaderRow({ - id: '2', - cells: [ - new DataHeaderCell({ - colstart: 0, - label: 'First Name', - accessorKey: 'firstName', - id: 'firstName', - }), - new DataHeaderCell({ - colstart: 1, - label: 'Profile Progress', - accessorKey: 'progress', - id: 'progress', - }), - ], - }), - ]; + const expected: HeaderRow[] = [ + new HeaderRow({ + id: '0', + cells: [ + new GroupHeaderCell({ + colspan: 1, + colstart: 0, + label: 'ID', + allIds: ['firstName'], + ids: ['firstName'] + }), + new GroupDisplayHeaderCell({ colstart: 1, allIds: ['progress'], ids: ['progress'] }) + ] + }), + new HeaderRow({ + id: '1', + cells: [ + new GroupHeaderCell({ + colspan: 1, + colstart: 0, + label: 'Name', + allIds: ['firstName'], + ids: ['firstName'] + }), + new GroupHeaderCell({ + colspan: 1, + colstart: 1, + label: 'Info', + allIds: ['progress'], + ids: ['progress'] + }) + ] + }), + new HeaderRow({ + id: '2', + cells: [ + new DataHeaderCell({ + colstart: 0, + label: 'First Name', + accessorKey: 'firstName', + id: 'firstName' + }), + new DataHeaderCell({ + colstart: 1, + label: 'Profile Progress', + accessorKey: 'progress', + id: 'progress' + }) + ] + }) + ] - expect(actual).toStrictEqual(expected); -}); + expect(actual).toStrictEqual(expected) +}) diff --git a/src/lib/headerRows.getMergedRow.test.ts b/src/lib/headerRows.getMergedRow.test.ts index 77e224a..40c0bb1 100644 --- a/src/lib/headerRows.getMergedRow.test.ts +++ b/src/lib/headerRows.getMergedRow.test.ts @@ -1,243 +1,243 @@ -import { DataHeaderCell, GroupHeaderCell } from './headerCells.js'; -import { getMergedRow } from './headerRows.js'; +import { DataHeaderCell, GroupHeaderCell } from './headerCells.js' +import { getMergedRow } from './headerRows.js' interface User { - firstName: string; - lastName: string; - age: number; - visits: number; - progress: number; - status: string; + firstName: string + lastName: string + age: number + visits: number + progress: number + status: string } it('merges two sets of group cells', () => { - const cells = [ - new GroupHeaderCell({ - label: 'Name', - colspan: 1, - colstart: 0, - allIds: ['firstName', 'lastName'], - ids: ['firstName'], - }), - new GroupHeaderCell({ - label: 'Name', - colspan: 1, - colstart: 1, - allIds: ['firstName', 'lastName'], - ids: ['lastName'], - }), - new GroupHeaderCell({ - label: 'Info', - colspan: 1, - colstart: 2, - allIds: ['age', 'status'], - ids: ['age'], - }), - new GroupHeaderCell({ - label: 'Info', - colspan: 1, - colstart: 3, - allIds: ['age', 'status'], - ids: ['status'], - }), - ]; - - const actual = getMergedRow(cells); - - const expected = [ - new GroupHeaderCell({ - label: 'Name', - colspan: 2, - colstart: 0, - allIds: ['firstName', 'lastName'], - ids: ['firstName', 'lastName'], - }), - new GroupHeaderCell({ - label: 'Info', - colspan: 2, - colstart: 2, - allIds: ['age', 'status'], - ids: ['age', 'status'], - }), - ]; - - expect(actual).toStrictEqual(expected); -}); + const cells = [ + new GroupHeaderCell({ + label: 'Name', + colspan: 1, + colstart: 0, + allIds: ['firstName', 'lastName'], + ids: ['firstName'] + }), + new GroupHeaderCell({ + label: 'Name', + colspan: 1, + colstart: 1, + allIds: ['firstName', 'lastName'], + ids: ['lastName'] + }), + new GroupHeaderCell({ + label: 'Info', + colspan: 1, + colstart: 2, + allIds: ['age', 'status'], + ids: ['age'] + }), + new GroupHeaderCell({ + label: 'Info', + colspan: 1, + colstart: 3, + allIds: ['age', 'status'], + ids: ['status'] + }) + ] + + const actual = getMergedRow(cells) + + const expected = [ + new GroupHeaderCell({ + label: 'Name', + colspan: 2, + colstart: 0, + allIds: ['firstName', 'lastName'], + ids: ['firstName', 'lastName'] + }), + new GroupHeaderCell({ + label: 'Info', + colspan: 2, + colstart: 2, + allIds: ['age', 'status'], + ids: ['age', 'status'] + }) + ] + + expect(actual).toStrictEqual(expected) +}) it('merges adjacent group cells in front', () => { - const cells = [ - new GroupHeaderCell({ - label: 'Info', - colspan: 1, - colstart: 0, - allIds: ['age', 'status'], - ids: ['age'], - }), - new GroupHeaderCell({ - label: 'Info', - colspan: 1, - colstart: 1, - allIds: ['age', 'status'], - ids: ['status'], - }), - new DataHeaderCell({ - colstart: 2, - label: 'First Name', - accessorKey: 'firstName', - id: 'firstName', - }), - new DataHeaderCell({ - colstart: 3, - label: 'Last Name', - accessorKey: 'lastName', - id: 'lastName', - }), - ]; - - const actual = getMergedRow(cells); - - const expected = [ - new GroupHeaderCell({ - label: 'Info', - colspan: 2, - colstart: 0, - allIds: ['age', 'status'], - ids: ['age', 'status'], - }), - new DataHeaderCell({ - colstart: 2, - label: 'First Name', - accessorKey: 'firstName', - id: 'firstName', - }), - new DataHeaderCell({ - colstart: 3, - label: 'Last Name', - accessorKey: 'lastName', - id: 'lastName', - }), - ]; - - expect(actual).toStrictEqual(expected); -}); + const cells = [ + new GroupHeaderCell({ + label: 'Info', + colspan: 1, + colstart: 0, + allIds: ['age', 'status'], + ids: ['age'] + }), + new GroupHeaderCell({ + label: 'Info', + colspan: 1, + colstart: 1, + allIds: ['age', 'status'], + ids: ['status'] + }), + new DataHeaderCell({ + colstart: 2, + label: 'First Name', + accessorKey: 'firstName', + id: 'firstName' + }), + new DataHeaderCell({ + colstart: 3, + label: 'Last Name', + accessorKey: 'lastName', + id: 'lastName' + }) + ] + + const actual = getMergedRow(cells) + + const expected = [ + new GroupHeaderCell({ + label: 'Info', + colspan: 2, + colstart: 0, + allIds: ['age', 'status'], + ids: ['age', 'status'] + }), + new DataHeaderCell({ + colstart: 2, + label: 'First Name', + accessorKey: 'firstName', + id: 'firstName' + }), + new DataHeaderCell({ + colstart: 3, + label: 'Last Name', + accessorKey: 'lastName', + id: 'lastName' + }) + ] + + expect(actual).toStrictEqual(expected) +}) it('merges adjacent group cells behind', () => { - const cells = [ - new DataHeaderCell({ - colstart: 0, - label: 'First Name', - accessorKey: 'firstName', - id: 'firstName', - }), - new DataHeaderCell({ - colstart: 1, - label: 'Last Name', - accessorKey: 'lastName', - id: 'lastName', - }), - new GroupHeaderCell({ - label: 'Info', - colspan: 1, - colstart: 2, - allIds: ['age', 'status'], - ids: ['age'], - }), - new GroupHeaderCell({ - label: 'Info', - colspan: 1, - colstart: 3, - allIds: ['age', 'status'], - ids: ['status'], - }), - ]; - - const actual = getMergedRow(cells); - - const expected = [ - new DataHeaderCell({ - colstart: 0, - label: 'First Name', - accessorKey: 'firstName', - id: 'firstName', - }), - new DataHeaderCell({ - colstart: 1, - label: 'Last Name', - accessorKey: 'lastName', - id: 'lastName', - }), - new GroupHeaderCell({ - label: 'Info', - colspan: 2, - colstart: 2, - allIds: ['age', 'status'], - ids: ['age', 'status'], - }), - ]; - - expect(actual).toStrictEqual(expected); -}); + const cells = [ + new DataHeaderCell({ + colstart: 0, + label: 'First Name', + accessorKey: 'firstName', + id: 'firstName' + }), + new DataHeaderCell({ + colstart: 1, + label: 'Last Name', + accessorKey: 'lastName', + id: 'lastName' + }), + new GroupHeaderCell({ + label: 'Info', + colspan: 1, + colstart: 2, + allIds: ['age', 'status'], + ids: ['age'] + }), + new GroupHeaderCell({ + label: 'Info', + colspan: 1, + colstart: 3, + allIds: ['age', 'status'], + ids: ['status'] + }) + ] + + const actual = getMergedRow(cells) + + const expected = [ + new DataHeaderCell({ + colstart: 0, + label: 'First Name', + accessorKey: 'firstName', + id: 'firstName' + }), + new DataHeaderCell({ + colstart: 1, + label: 'Last Name', + accessorKey: 'lastName', + id: 'lastName' + }), + new GroupHeaderCell({ + label: 'Info', + colspan: 2, + colstart: 2, + allIds: ['age', 'status'], + ids: ['age', 'status'] + }) + ] + + expect(actual).toStrictEqual(expected) +}) it('does not merge disjoint group cells', () => { - const cells = [ - new GroupHeaderCell({ - label: 'Info', - colspan: 1, - colstart: 0, - allIds: ['age', 'status'], - ids: ['age'], - }), - new DataHeaderCell({ - colstart: 1, - label: 'First Name', - accessorKey: 'firstName', - id: 'firstName', - }), - new DataHeaderCell({ - colstart: 2, - label: 'Last Name', - accessorKey: 'lastName', - id: 'lastName', - }), - new GroupHeaderCell({ - colstart: 3, - label: 'Info', - colspan: 1, - allIds: ['age', 'status'], - ids: ['status'], - }), - ]; - - const actual = getMergedRow(cells); - - const expected = [ - new GroupHeaderCell({ - label: 'Info', - colspan: 1, - colstart: 0, - allIds: ['age', 'status'], - ids: ['age'], - }), - new DataHeaderCell({ - colstart: 1, - label: 'First Name', - accessorKey: 'firstName', - id: 'firstName', - }), - new DataHeaderCell({ - colstart: 2, - label: 'Last Name', - accessorKey: 'lastName', - id: 'lastName', - }), - new GroupHeaderCell({ - label: 'Info', - colspan: 1, - colstart: 3, - allIds: ['age', 'status'], - ids: ['status'], - }), - ]; - - expect(actual).toStrictEqual(expected); -}); + const cells = [ + new GroupHeaderCell({ + label: 'Info', + colspan: 1, + colstart: 0, + allIds: ['age', 'status'], + ids: ['age'] + }), + new DataHeaderCell({ + colstart: 1, + label: 'First Name', + accessorKey: 'firstName', + id: 'firstName' + }), + new DataHeaderCell({ + colstart: 2, + label: 'Last Name', + accessorKey: 'lastName', + id: 'lastName' + }), + new GroupHeaderCell({ + colstart: 3, + label: 'Info', + colspan: 1, + allIds: ['age', 'status'], + ids: ['status'] + }) + ] + + const actual = getMergedRow(cells) + + const expected = [ + new GroupHeaderCell({ + label: 'Info', + colspan: 1, + colstart: 0, + allIds: ['age', 'status'], + ids: ['age'] + }), + new DataHeaderCell({ + colstart: 1, + label: 'First Name', + accessorKey: 'firstName', + id: 'firstName' + }), + new DataHeaderCell({ + colstart: 2, + label: 'Last Name', + accessorKey: 'lastName', + id: 'lastName' + }), + new GroupHeaderCell({ + label: 'Info', + colspan: 1, + colstart: 3, + allIds: ['age', 'status'], + ids: ['status'] + }) + ] + + expect(actual).toStrictEqual(expected) +}) diff --git a/src/lib/headerRows.getOrderedColumnMatrix.test.ts b/src/lib/headerRows.getOrderedColumnMatrix.test.ts index 5b86a41..0654626 100644 --- a/src/lib/headerRows.getOrderedColumnMatrix.test.ts +++ b/src/lib/headerRows.getOrderedColumnMatrix.test.ts @@ -1,256 +1,256 @@ -import { HeaderCell, DataHeaderCell, GroupHeaderCell } from './headerCells.js'; -import { getOrderedColumnMatrix } from './headerRows.js'; -import type { Matrix } from './types/Matrix.js'; +import { HeaderCell, DataHeaderCell, GroupHeaderCell } from './headerCells.js' +import { getOrderedColumnMatrix } from './headerRows.js' +import type { Matrix } from './types/Matrix.js' interface User { - firstName: string; - lastName: string; - age: number; - visits: number; - progress: number; - status: string; + firstName: string + lastName: string + age: number + visits: number + progress: number + status: string } it('orders the matrix columns', () => { - const columnMatrix: Matrix> = [ - [ - new GroupHeaderCell({ - label: 'Name', - colspan: 1, - colstart: 0, - allIds: ['firstName', 'lastName'], - ids: [], - }), - new DataHeaderCell({ - label: 'First Name', - colstart: 0, - accessorKey: 'firstName', - id: 'firstName', - }), - ], - [ - new GroupHeaderCell({ - label: 'Name', - colspan: 1, - colstart: 1, - allIds: ['firstName', 'lastName'], - ids: [], - }), - new DataHeaderCell({ - label: 'Last Name', - colstart: 1, - accessorKey: 'lastName', - id: 'lastName', - }), - ], - [ - new GroupHeaderCell({ - label: 'Info', - colspan: 1, - colstart: 2, - allIds: ['age', 'progress'], - ids: [], - }), - new DataHeaderCell({ label: 'Age', colstart: 2, accessorKey: 'age', id: 'age' }), - ], - [ - new GroupHeaderCell({ - label: 'Info', - colspan: 1, - colstart: 3, - allIds: ['age', 'progress'], - ids: [], - }), - new DataHeaderCell({ - label: 'Progress', - colstart: 3, - accessorKey: 'progress', - id: 'progress', - }), - ], - ]; + const columnMatrix: Matrix> = [ + [ + new GroupHeaderCell({ + label: 'Name', + colspan: 1, + colstart: 0, + allIds: ['firstName', 'lastName'], + ids: [] + }), + new DataHeaderCell({ + label: 'First Name', + colstart: 0, + accessorKey: 'firstName', + id: 'firstName' + }) + ], + [ + new GroupHeaderCell({ + label: 'Name', + colspan: 1, + colstart: 1, + allIds: ['firstName', 'lastName'], + ids: [] + }), + new DataHeaderCell({ + label: 'Last Name', + colstart: 1, + accessorKey: 'lastName', + id: 'lastName' + }) + ], + [ + new GroupHeaderCell({ + label: 'Info', + colspan: 1, + colstart: 2, + allIds: ['age', 'progress'], + ids: [] + }), + new DataHeaderCell({ label: 'Age', colstart: 2, accessorKey: 'age', id: 'age' }) + ], + [ + new GroupHeaderCell({ + label: 'Info', + colspan: 1, + colstart: 3, + allIds: ['age', 'progress'], + ids: [] + }), + new DataHeaderCell({ + label: 'Progress', + colstart: 3, + accessorKey: 'progress', + id: 'progress' + }) + ] + ] - const actual = getOrderedColumnMatrix(columnMatrix, ['firstName', 'age', 'lastName', 'progress']); + const actual = getOrderedColumnMatrix(columnMatrix, ['firstName', 'age', 'lastName', 'progress']) - const expected: Matrix> = [ - [ - new GroupHeaderCell({ - label: 'Name', - colspan: 1, - colstart: 0, - allIds: ['firstName', 'lastName'], - ids: [], - }), - new DataHeaderCell({ - label: 'First Name', - colstart: 0, - accessorKey: 'firstName', - id: 'firstName', - }), - ], - [ - new GroupHeaderCell({ - label: 'Info', - colspan: 1, - colstart: 1, - allIds: ['age', 'progress'], - ids: [], - }), - new DataHeaderCell({ label: 'Age', colstart: 1, accessorKey: 'age', id: 'age' }), - ], - [ - new GroupHeaderCell({ - label: 'Name', - colspan: 1, - colstart: 2, - allIds: ['firstName', 'lastName'], - ids: [], - }), - new DataHeaderCell({ - label: 'Last Name', - colstart: 2, - accessorKey: 'lastName', - id: 'lastName', - }), - ], - [ - new GroupHeaderCell({ - label: 'Info', - colspan: 1, - colstart: 3, - allIds: ['age', 'progress'], - ids: [], - }), - new DataHeaderCell({ - label: 'Progress', - colstart: 3, - accessorKey: 'progress', - id: 'progress', - }), - ], - ]; + const expected: Matrix> = [ + [ + new GroupHeaderCell({ + label: 'Name', + colspan: 1, + colstart: 0, + allIds: ['firstName', 'lastName'], + ids: [] + }), + new DataHeaderCell({ + label: 'First Name', + colstart: 0, + accessorKey: 'firstName', + id: 'firstName' + }) + ], + [ + new GroupHeaderCell({ + label: 'Info', + colspan: 1, + colstart: 1, + allIds: ['age', 'progress'], + ids: [] + }), + new DataHeaderCell({ label: 'Age', colstart: 1, accessorKey: 'age', id: 'age' }) + ], + [ + new GroupHeaderCell({ + label: 'Name', + colspan: 1, + colstart: 2, + allIds: ['firstName', 'lastName'], + ids: [] + }), + new DataHeaderCell({ + label: 'Last Name', + colstart: 2, + accessorKey: 'lastName', + id: 'lastName' + }) + ], + [ + new GroupHeaderCell({ + label: 'Info', + colspan: 1, + colstart: 3, + allIds: ['age', 'progress'], + ids: [] + }), + new DataHeaderCell({ + label: 'Progress', + colstart: 3, + accessorKey: 'progress', + id: 'progress' + }) + ] + ] - expect(actual).toStrictEqual(expected); -}); + expect(actual).toStrictEqual(expected) +}) it('ignores empty ordering', () => { - const columnMatrix: Matrix> = [ - [ - new GroupHeaderCell({ - label: 'Name', - colspan: 1, - colstart: 0, - allIds: ['firstName', 'lastName'], - ids: [], - }), - new DataHeaderCell({ - label: 'First Name', - colstart: 0, - accessorKey: 'firstName', - id: 'firstName', - }), - ], - [ - new GroupHeaderCell({ - label: 'Name', - colspan: 1, - colstart: 1, - allIds: ['firstName', 'lastName'], - ids: [], - }), - new DataHeaderCell({ - label: 'Last Name', - colstart: 1, - accessorKey: 'lastName', - id: 'lastName', - }), - ], - [ - new GroupHeaderCell({ - label: 'Info', - colspan: 1, - colstart: 2, - allIds: ['age', 'progress'], - ids: [], - }), - new DataHeaderCell({ label: 'Age', colstart: 2, accessorKey: 'age', id: 'age' }), - ], - [ - new GroupHeaderCell({ - label: 'Info', - colspan: 1, - colstart: 3, - allIds: ['age', 'progress'], - ids: [], - }), - new DataHeaderCell({ - label: 'Progress', - colstart: 3, - accessorKey: 'progress', - id: 'progress', - }), - ], - ]; + const columnMatrix: Matrix> = [ + [ + new GroupHeaderCell({ + label: 'Name', + colspan: 1, + colstart: 0, + allIds: ['firstName', 'lastName'], + ids: [] + }), + new DataHeaderCell({ + label: 'First Name', + colstart: 0, + accessorKey: 'firstName', + id: 'firstName' + }) + ], + [ + new GroupHeaderCell({ + label: 'Name', + colspan: 1, + colstart: 1, + allIds: ['firstName', 'lastName'], + ids: [] + }), + new DataHeaderCell({ + label: 'Last Name', + colstart: 1, + accessorKey: 'lastName', + id: 'lastName' + }) + ], + [ + new GroupHeaderCell({ + label: 'Info', + colspan: 1, + colstart: 2, + allIds: ['age', 'progress'], + ids: [] + }), + new DataHeaderCell({ label: 'Age', colstart: 2, accessorKey: 'age', id: 'age' }) + ], + [ + new GroupHeaderCell({ + label: 'Info', + colspan: 1, + colstart: 3, + allIds: ['age', 'progress'], + ids: [] + }), + new DataHeaderCell({ + label: 'Progress', + colstart: 3, + accessorKey: 'progress', + id: 'progress' + }) + ] + ] - const actual = getOrderedColumnMatrix(columnMatrix, []); + const actual = getOrderedColumnMatrix(columnMatrix, []) - const expected: Matrix> = [ - [ - new GroupHeaderCell({ - label: 'Name', - colspan: 1, - colstart: 0, - allIds: ['firstName', 'lastName'], - ids: [], - }), - new DataHeaderCell({ - label: 'First Name', - colstart: 0, - accessorKey: 'firstName', - id: 'firstName', - }), - ], - [ - new GroupHeaderCell({ - label: 'Name', - colspan: 1, - colstart: 1, - allIds: ['firstName', 'lastName'], - ids: [], - }), - new DataHeaderCell({ - label: 'Last Name', - colstart: 1, - accessorKey: 'lastName', - id: 'lastName', - }), - ], - [ - new GroupHeaderCell({ - label: 'Info', - colspan: 1, - colstart: 2, - allIds: ['age', 'progress'], - ids: [], - }), - new DataHeaderCell({ label: 'Age', colstart: 2, accessorKey: 'age', id: 'age' }), - ], - [ - new GroupHeaderCell({ - label: 'Info', - colspan: 1, - colstart: 3, - allIds: ['age', 'progress'], - ids: [], - }), - new DataHeaderCell({ - label: 'Progress', - colstart: 3, - accessorKey: 'progress', - id: 'progress', - }), - ], - ]; + const expected: Matrix> = [ + [ + new GroupHeaderCell({ + label: 'Name', + colspan: 1, + colstart: 0, + allIds: ['firstName', 'lastName'], + ids: [] + }), + new DataHeaderCell({ + label: 'First Name', + colstart: 0, + accessorKey: 'firstName', + id: 'firstName' + }) + ], + [ + new GroupHeaderCell({ + label: 'Name', + colspan: 1, + colstart: 1, + allIds: ['firstName', 'lastName'], + ids: [] + }), + new DataHeaderCell({ + label: 'Last Name', + colstart: 1, + accessorKey: 'lastName', + id: 'lastName' + }) + ], + [ + new GroupHeaderCell({ + label: 'Info', + colspan: 1, + colstart: 2, + allIds: ['age', 'progress'], + ids: [] + }), + new DataHeaderCell({ label: 'Age', colstart: 2, accessorKey: 'age', id: 'age' }) + ], + [ + new GroupHeaderCell({ + label: 'Info', + colspan: 1, + colstart: 3, + allIds: ['age', 'progress'], + ids: [] + }), + new DataHeaderCell({ + label: 'Progress', + colstart: 3, + accessorKey: 'progress', + id: 'progress' + }) + ] + ] - expect(actual).toStrictEqual(expected); -}); + expect(actual).toStrictEqual(expected) +}) diff --git a/src/lib/headerRows.ts b/src/lib/headerRows.ts index 6ab6786..3c9dadb 100644 --- a/src/lib/headerRows.ts +++ b/src/lib/headerRows.ts @@ -1,194 +1,173 @@ -import { derived } from 'svelte/store'; -import type { Column } from './columns.js'; -import { - DataHeaderCell, - FlatDisplayHeaderCell, - GroupDisplayHeaderCell, - GroupHeaderCell, - type HeaderCell, -} from './headerCells.js'; -import { TableComponent } from './tableComponent.js'; -import type { Matrix } from './types/Matrix.js'; -import type { AnyPlugins } from './types/TablePlugin.js'; -import { sum } from './utils/math.js'; -import { getNullMatrix, getTransposed } from './utils/matrix.js'; +import { derived } from 'svelte/store' +import type { Column } from './columns.js' +import { DataHeaderCell, FlatDisplayHeaderCell, GroupDisplayHeaderCell, GroupHeaderCell, type HeaderCell } from './headerCells.js' +import { TableComponent } from './tableComponent.js' +import type { Matrix } from './types/Matrix.js' +import type { AnyPlugins } from './types/TablePlugin.js' +import { sum } from './utils/math.js' +import { getNullMatrix, getTransposed } from './utils/matrix.js' // eslint-disable-next-line @typescript-eslint/no-unused-vars export type HeaderRowAttributes = { - role: 'row'; -}; + role: 'row' +} export interface HeaderRowInit { - id: string; - cells: HeaderCell[]; + id: string + cells: HeaderCell[] } -export class HeaderRow extends TableComponent< - Item, - Plugins, - 'thead.tr' -> { - cells: HeaderCell[]; - constructor({ id, cells }: HeaderRowInit) { - super({ id }); - this.cells = cells; - } +export class HeaderRow extends TableComponent { + cells: HeaderCell[] + constructor({ id, cells }: HeaderRowInit) { + super({ id }) + this.cells = cells + } - attrs() { - return derived(super.attrs(), ($baseAttrs) => { - return { - ...$baseAttrs, - role: 'row' as const, - }; - }); - } + attrs() { + return derived(super.attrs(), ($baseAttrs) => { + return { + ...$baseAttrs, + role: 'row' as const + } + }) + } - clone(): HeaderRow { - return new HeaderRow({ - id: this.id, - cells: this.cells, - }); - } + clone(): HeaderRow { + return new HeaderRow({ + id: this.id, + cells: this.cells + }) + } } -export const getHeaderRows = ( - columns: Column[], - flatColumnIds: string[] = [] -): HeaderRow[] => { - const rowMatrix = getHeaderRowMatrix(columns); - // Perform all column operations on the transposed columnMatrix. This helps - // to reduce the number of expensive transpose operations required. - let columnMatrix = getTransposed(rowMatrix); - columnMatrix = getOrderedColumnMatrix(columnMatrix, flatColumnIds); - // eslint-disable-next-line @typescript-eslint/no-explicit-any - populateGroupHeaderCellIds(columnMatrix as any); - return headerRowsForRowMatrix(getTransposed(columnMatrix)); -}; +export const getHeaderRows = (columns: Column[], flatColumnIds: string[] = []): HeaderRow[] => { + const rowMatrix = getHeaderRowMatrix(columns) + // Perform all column operations on the transposed columnMatrix. This helps + // to reduce the number of expensive transpose operations required. + let columnMatrix = getTransposed(rowMatrix) + columnMatrix = getOrderedColumnMatrix(columnMatrix, flatColumnIds) + // eslint-disable-next-line @typescript-eslint/no-explicit-any + populateGroupHeaderCellIds(columnMatrix as any) + return headerRowsForRowMatrix(getTransposed(columnMatrix)) +} -export const getHeaderRowMatrix = ( - columns: Column[] -): Matrix> => { - const maxColspan = sum(columns.map((c) => (c.isGroup() ? c.ids.length : 1))); - const maxHeight = Math.max(...columns.map((c) => c.height)); - const rowMatrix: Matrix | null> = getNullMatrix(maxColspan, maxHeight); - let cellOffset = 0; - columns.forEach((c) => { - const heightOffset = maxHeight - c.height; - loadHeaderRowMatrix(rowMatrix, c, heightOffset, cellOffset); - cellOffset += c.isGroup() ? c.ids.length : 1; - }); - // Replace null cells with blank display cells. - return rowMatrix.map((cells, rowIdx) => - cells.map((cell, columnIdx) => { - if (cell !== null) return cell; - if (rowIdx === maxHeight - 1) - return new FlatDisplayHeaderCell({ id: columnIdx.toString(), colstart: columnIdx }); - const flatId = rowMatrix[maxHeight - 1][columnIdx]?.id ?? columnIdx.toString(); - return new GroupDisplayHeaderCell({ ids: [], allIds: [flatId], colstart: columnIdx }); - }) - ); -}; +export const getHeaderRowMatrix = (columns: Column[]): Matrix> => { + const maxColspan = sum(columns.map((c) => (c.isGroup() ? c.ids.length : 1))) + const maxHeight = Math.max(...columns.map((c) => c.height)) + const rowMatrix: Matrix | null> = getNullMatrix(maxColspan, maxHeight) + let cellOffset = 0 + columns.forEach((c) => { + const heightOffset = maxHeight - c.height + loadHeaderRowMatrix(rowMatrix, c, heightOffset, cellOffset) + cellOffset += c.isGroup() ? c.ids.length : 1 + }) + // Replace null cells with blank display cells. + return rowMatrix.map((cells, rowIdx) => + cells.map((cell, columnIdx) => { + if (cell !== null) return cell + if (rowIdx === maxHeight - 1) return new FlatDisplayHeaderCell({ id: columnIdx.toString(), colstart: columnIdx }) + const flatId = rowMatrix[maxHeight - 1][columnIdx]?.id ?? columnIdx.toString() + return new GroupDisplayHeaderCell({ ids: [], allIds: [flatId], colstart: columnIdx }) + }) + ) +} const loadHeaderRowMatrix = ( - rowMatrix: Matrix | undefined | null>, - column: Column, - rowOffset: number, - cellOffset: number + rowMatrix: Matrix | undefined | null>, + column: Column, + rowOffset: number, + cellOffset: number ) => { - if (column.isData()) { - // `DataHeaderCell` should always be in the last row. - rowMatrix[rowMatrix.length - 1][cellOffset] = new DataHeaderCell({ - // eslint-disable-next-line @typescript-eslint/no-explicit-any - label: column.header as any, - accessorFn: column.accessorFn, - accessorKey: column.accessorKey as keyof Item, - id: column.id, - colstart: cellOffset, - }); - return; - } - if (column.isDisplay()) { - rowMatrix[rowMatrix.length - 1][cellOffset] = new FlatDisplayHeaderCell({ - id: column.id, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - label: column.header as any, - colstart: cellOffset, - }); - return; - } - if (column.isGroup()) { - // Fill multi-colspan cells. - for (let i = 0; i < column.ids.length; i++) { - rowMatrix[rowOffset][cellOffset + i] = new GroupHeaderCell({ - // eslint-disable-next-line @typescript-eslint/no-explicit-any - label: column.header as any, - colspan: 1, - allIds: column.ids, - ids: [], - colstart: cellOffset, - }); - } - let childCellOffset = 0; - column.columns.forEach((c) => { - loadHeaderRowMatrix(rowMatrix, c, rowOffset + 1, cellOffset + childCellOffset); - childCellOffset += c.isGroup() ? c.ids.length : 1; - }); - return; - } -}; + if (column.isData()) { + // `DataHeaderCell` should always be in the last row. + rowMatrix[rowMatrix.length - 1][cellOffset] = new DataHeaderCell({ + // eslint-disable-next-line @typescript-eslint/no-explicit-any + label: column.header as any, + accessorFn: column.accessorFn, + accessorKey: column.accessorKey as keyof Item, + id: column.id, + colstart: cellOffset + }) + return + } + if (column.isDisplay()) { + rowMatrix[rowMatrix.length - 1][cellOffset] = new FlatDisplayHeaderCell({ + id: column.id, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + label: column.header as any, + colstart: cellOffset + }) + return + } + if (column.isGroup()) { + // Fill multi-colspan cells. + for (let i = 0; i < column.ids.length; i++) { + rowMatrix[rowOffset][cellOffset + i] = new GroupHeaderCell({ + // eslint-disable-next-line @typescript-eslint/no-explicit-any + label: column.header as any, + colspan: 1, + allIds: column.ids, + ids: [], + colstart: cellOffset + }) + } + let childCellOffset = 0 + column.columns.forEach((c) => { + loadHeaderRowMatrix(rowMatrix, c, rowOffset + 1, cellOffset + childCellOffset) + childCellOffset += c.isGroup() ? c.ids.length : 1 + }) + return + } +} -export const getOrderedColumnMatrix = ( - columnMatrix: Matrix>, - flatColumnIds: string[] -): Matrix> => { - if (flatColumnIds.length === 0) { - return columnMatrix; - } - const orderedColumnMatrix: Matrix> = []; - // Each row of the transposed matrix represents a column. - // The `FlatHeaderCell` should be the last cell of each column. - flatColumnIds.forEach((key, columnIdx) => { - const nextColumn = columnMatrix.find((columnCells) => { - const flatCell = columnCells[columnCells.length - 1]; - if (!flatCell.isFlat()) { - throw new Error('The last element of each column must be a `FlatHeaderCell`'); - } - return flatCell.id === key; - }); - if (nextColumn !== undefined) { - orderedColumnMatrix.push( - nextColumn.map((column) => { - const clonedColumn = column.clone(); - clonedColumn.colstart = columnIdx; - return clonedColumn; - }) - ); - } - }); - return orderedColumnMatrix; -}; +export const getOrderedColumnMatrix = (columnMatrix: Matrix>, flatColumnIds: string[]): Matrix> => { + if (flatColumnIds.length === 0) { + return columnMatrix + } + const orderedColumnMatrix: Matrix> = [] + // Each row of the transposed matrix represents a column. + // The `FlatHeaderCell` should be the last cell of each column. + flatColumnIds.forEach((key, columnIdx) => { + const nextColumn = columnMatrix.find((columnCells) => { + const flatCell = columnCells[columnCells.length - 1] + if (!flatCell.isFlat()) { + throw new Error('The last element of each column must be a `FlatHeaderCell`') + } + return flatCell.id === key + }) + if (nextColumn !== undefined) { + orderedColumnMatrix.push( + nextColumn.map((column) => { + const clonedColumn = column.clone() + clonedColumn.colstart = columnIdx + return clonedColumn + }) + ) + } + }) + return orderedColumnMatrix +} const populateGroupHeaderCellIds = (columnMatrix: Matrix>) => { - columnMatrix.forEach((columnCells) => { - const lastCell = columnCells[columnCells.length - 1]; - if (!lastCell.isFlat()) { - throw new Error('The last element of each column must be a `FlatHeaderCell`'); - } - columnCells.forEach((c) => { - if (c.isGroup()) { - c.pushId(lastCell.id); - } - }); - }); -}; + columnMatrix.forEach((columnCells) => { + const lastCell = columnCells[columnCells.length - 1] + if (!lastCell.isFlat()) { + throw new Error('The last element of each column must be a `FlatHeaderCell`') + } + columnCells.forEach((c) => { + if (c.isGroup()) { + c.pushId(lastCell.id) + } + }) + }) +} -export const headerRowsForRowMatrix = ( - rowMatrix: Matrix> -): HeaderRow[] => { - return rowMatrix.map((rowCells, rowIdx) => { - return new HeaderRow({ id: rowIdx.toString(), cells: getMergedRow(rowCells) }); - }); -}; +export const headerRowsForRowMatrix = (rowMatrix: Matrix>): HeaderRow[] => { + return rowMatrix.map((rowCells, rowIdx) => { + return new HeaderRow({ id: rowIdx.toString(), cells: getMergedRow(rowCells) }) + }) +} /** * Multi-colspan cells will appear as multiple adjacent cells on the same row. @@ -200,39 +179,37 @@ export const headerRowsForRowMatrix = ( - cells: HeaderCell[] -): HeaderCell[] => { - if (cells.length === 0) { - return cells; - } - const mergedCells: HeaderCell[] = []; - let startIdx = 0; - let endIdx = 1; - while (startIdx < cells.length) { - const cell = cells[startIdx].clone(); - if (!cell.isGroup()) { - mergedCells.push(cell); - startIdx++; - continue; - } - endIdx = startIdx + 1; - const ids: string[] = [...cell.ids]; - while (endIdx < cells.length) { - const nextCell = cells[endIdx]; - if (!nextCell.isGroup()) { - break; - } - if (cell.allId !== nextCell.allId) { - break; - } - ids.push(...nextCell.ids); - endIdx++; - } - cell.setIds(ids); - cell.colspan = endIdx - startIdx; - mergedCells.push(cell); - startIdx = endIdx; - } - return mergedCells; -}; +export const getMergedRow = (cells: HeaderCell[]): HeaderCell[] => { + if (cells.length === 0) { + return cells + } + const mergedCells: HeaderCell[] = [] + let startIdx = 0 + let endIdx = 1 + while (startIdx < cells.length) { + const cell = cells[startIdx].clone() + if (!cell.isGroup()) { + mergedCells.push(cell) + startIdx++ + continue + } + endIdx = startIdx + 1 + const ids: string[] = [...cell.ids] + while (endIdx < cells.length) { + const nextCell = cells[endIdx] + if (!nextCell.isGroup()) { + break + } + if (cell.allId !== nextCell.allId) { + break + } + ids.push(...nextCell.ids) + endIdx++ + } + cell.setIds(ids) + cell.colspan = endIdx - startIdx + mergedCells.push(cell) + startIdx = endIdx + } + return mergedCells +} diff --git a/src/lib/index.ts b/src/lib/index.ts index 42f55a6..36570f2 100644 --- a/src/lib/index.ts +++ b/src/lib/index.ts @@ -1,21 +1,14 @@ // components -export * from 'svelte-render'; -export { Subscribe } from 'svelte-subscribe'; +export * from 'svelte-render' +export { Subscribe } from '@humanspeak/svelte-subscribe' // table core -export { createTable } from './createTable.js'; +export { createTable } from './createTable.js' // models -export { Table } from './createTable.js'; -export { HeaderRow } from './headerRows.js'; -export { - HeaderCell, - FlatHeaderCell, - DataHeaderCell, - FlatDisplayHeaderCell, - GroupHeaderCell, - GroupDisplayHeaderCell, -} from './headerCells.js'; -export * from './bodyRows.js'; -export * from './bodyCells.js'; -export * from './columns.js'; -export type * from './createViewModel.js'; -export type * from './types/Label.js'; +export { Table } from './createTable.js' +export { HeaderRow } from './headerRows.js' +export { HeaderCell, FlatHeaderCell, DataHeaderCell, FlatDisplayHeaderCell, GroupHeaderCell, GroupDisplayHeaderCell } from './headerCells.js' +export * from './bodyRows.js' +export * from './bodyCells.js' +export * from './columns.js' +export type * from './createViewModel.js' +export type * from './types/Label.js' diff --git a/src/lib/plugins/addColumnFilters.ts b/src/lib/plugins/addColumnFilters.ts index f0fe039..baacc16 100644 --- a/src/lib/plugins/addColumnFilters.ts +++ b/src/lib/plugins/addColumnFilters.ts @@ -1,189 +1,174 @@ -import { keyed } from 'svelte-keyed'; -import type { RenderConfig } from 'svelte-render'; -import type { BodyRow } from '../bodyRows.js'; -import type { TablePlugin, NewTablePropSet, DeriveRowsFn } from '../types/TablePlugin.js'; -import { derived, writable, type Readable, type Writable } from 'svelte/store'; -import type { PluginInitTableState } from '../createViewModel.js'; -import type { DataBodyCell } from '../bodyCells.js'; +import { keyed } from 'svelte-keyed' +import type { RenderConfig } from 'svelte-render' +import type { BodyRow } from '../bodyRows.js' +import type { TablePlugin, NewTablePropSet, DeriveRowsFn } from '../types/TablePlugin.js' +import { derived, writable, type Readable, type Writable } from 'svelte/store' +import type { PluginInitTableState } from '../createViewModel.js' +import type { DataBodyCell } from '../bodyCells.js' export interface ColumnFiltersConfig { - serverSide?: boolean; + serverSide?: boolean } export interface ColumnFiltersState { - filterValues: Writable>; - preFilteredRows: Readable[]>; + filterValues: Writable> + preFilteredRows: Readable[]> } // eslint-disable-next-line @typescript-eslint/no-explicit-any export interface ColumnFiltersColumnOptions { - fn: ColumnFilterFn; - initialFilterValue?: FilterValue; - render?: (props: ColumnRenderConfigPropArgs) => RenderConfig; + fn: ColumnFilterFn + initialFilterValue?: FilterValue + render?: (props: ColumnRenderConfigPropArgs) => RenderConfig } // eslint-disable-next-line @typescript-eslint/no-explicit-any -interface ColumnRenderConfigPropArgs - extends PluginInitTableState { - id: string; - filterValue: Writable; - values: Readable; - preFilteredRows: Readable[]>; - preFilteredValues: Readable; +interface ColumnRenderConfigPropArgs extends PluginInitTableState { + id: string + filterValue: Writable + values: Readable + preFilteredRows: Readable[]> + preFilteredValues: Readable } // eslint-disable-next-line @typescript-eslint/no-explicit-any -export type ColumnFilterFn = ( - props: ColumnFilterFnProps -) => boolean; +export type ColumnFilterFn = (props: ColumnFilterFnProps) => boolean // eslint-disable-next-line @typescript-eslint/no-explicit-any export type ColumnFilterFnProps = { - filterValue: FilterValue; - value: Value; -}; + filterValue: FilterValue + value: Value +} export type ColumnFiltersPropSet = NewTablePropSet<{ - 'thead.tr.th': - | { - render?: RenderConfig; - } - | undefined; -}>; + 'thead.tr.th': + | { + render?: RenderConfig + } + | undefined +}> -const getFilteredRows = >( - rows: Row[], - filterValues: Record, - columnOptions: Record> -): Row[] => { - const $filteredRows = rows - // Filter `subRows` - .map((row) => { - const { subRows } = row; - if (subRows === undefined) { - return row; - } - const filteredSubRows = getFilteredRows(subRows, filterValues, columnOptions); - const clonedRow = row.clone() as Row; - clonedRow.subRows = filteredSubRows; - return clonedRow; - }) - .filter((row) => { - if ((row.subRows?.length ?? 0) !== 0) { - return true; - } - for (const [columnId, columnOption] of Object.entries(columnOptions)) { - const bodyCell = row.cellForId[columnId]; - if (!bodyCell.isData()) { - continue; - } - const { value } = bodyCell; - const filterValue = filterValues[columnId]; - if (filterValue === undefined) { - continue; - } - const isMatch = columnOption.fn({ value, filterValue }); - if (!isMatch) { - return false; - } - } - return true; - }); - return $filteredRows; -}; +const getFilteredRows = >(rows: Row[], filterValues: Record, columnOptions: Record>): Row[] => { + const $filteredRows = rows + // Filter `subRows` + .map((row) => { + const { subRows } = row + if (subRows === undefined) { + return row + } + const filteredSubRows = getFilteredRows(subRows, filterValues, columnOptions) + const clonedRow = row.clone() as Row + clonedRow.subRows = filteredSubRows + return clonedRow + }) + .filter((row) => { + if ((row.subRows?.length ?? 0) !== 0) { + return true + } + for (const [columnId, columnOption] of Object.entries(columnOptions)) { + const bodyCell = row.cellForId[columnId] + if (!bodyCell.isData()) { + continue + } + const { value } = bodyCell + const filterValue = filterValues[columnId] + if (filterValue === undefined) { + continue + } + const isMatch = columnOption.fn({ value, filterValue }) + if (!isMatch) { + return false + } + } + return true + }) + return $filteredRows +} export const addColumnFilters = - ({ serverSide = false }: ColumnFiltersConfig = {}): TablePlugin< - Item, - ColumnFiltersState, - ColumnFiltersColumnOptions, - ColumnFiltersPropSet - > => - ({ columnOptions, tableState }) => { - const filterValues = writable>({}); - const preFilteredRows = writable[]>([]); - const filteredRows = writable[]>([]); + ({ serverSide = false }: ColumnFiltersConfig = {}): TablePlugin, ColumnFiltersColumnOptions, ColumnFiltersPropSet> => + ({ columnOptions, tableState }) => { + const filterValues = writable>({}) + const preFilteredRows = writable[]>([]) + const filteredRows = writable[]>([]) - const pluginState: ColumnFiltersState = { filterValues, preFilteredRows }; + const pluginState: ColumnFiltersState = { filterValues, preFilteredRows } - const deriveRows: DeriveRowsFn = (rows) => { - return derived([rows, filterValues], ([$rows, $filterValues]) => { - preFilteredRows.set($rows); - if (serverSide) { - filteredRows.set($rows); - return $rows; - } - const _filteredRows = getFilteredRows($rows, $filterValues, columnOptions); - filteredRows.set(_filteredRows); - return _filteredRows; - }); - }; + const deriveRows: DeriveRowsFn = (rows) => { + return derived([rows, filterValues], ([$rows, $filterValues]) => { + preFilteredRows.set($rows) + if (serverSide) { + filteredRows.set($rows) + return $rows + } + const _filteredRows = getFilteredRows($rows, $filterValues, columnOptions) + filteredRows.set(_filteredRows) + return _filteredRows + }) + } - return { - pluginState, - deriveRows, - hooks: { - 'thead.tr.th': (headerCell) => { - const filterValue = keyed(filterValues, headerCell.id); - const props = derived([], () => { - const columnOption = columnOptions[headerCell.id]; - if (columnOption === undefined) { - return undefined; - } - filterValue.set(columnOption.initialFilterValue); - const preFilteredValues = derived(preFilteredRows, ($rows) => { - if (headerCell.isData()) { - return $rows.map((row) => { - // TODO check and handle different BodyCell types - const cell = row.cellForId[headerCell.id] as DataBodyCell; - return cell?.value; - }); - } - return []; - }); - const values = derived(filteredRows, ($rows) => { - if (headerCell.isData()) { - return $rows.map((row) => { - // TODO check and handle different BodyCell types - const cell = row.cellForId[headerCell.id] as DataBodyCell; - return cell?.value; - }); - } - return []; - }); - const render = columnOption.render?.({ - id: headerCell.id, - filterValue, - ...tableState, - values, - preFilteredRows, - preFilteredValues - }); - return { render }; - }); - return { props }; - } - } - }; - }; + return { + pluginState, + deriveRows, + hooks: { + 'thead.tr.th': (headerCell) => { + const filterValue = keyed(filterValues, headerCell.id) + const props = derived([], () => { + const columnOption = columnOptions[headerCell.id] + if (columnOption === undefined) { + return undefined + } + filterValue.set(columnOption.initialFilterValue) + const preFilteredValues = derived(preFilteredRows, ($rows) => { + if (headerCell.isData()) { + return $rows.map((row) => { + // TODO check and handle different BodyCell types + const cell = row.cellForId[headerCell.id] as DataBodyCell + return cell?.value + }) + } + return [] + }) + const values = derived(filteredRows, ($rows) => { + if (headerCell.isData()) { + return $rows.map((row) => { + // TODO check and handle different BodyCell types + const cell = row.cellForId[headerCell.id] as DataBodyCell + return cell?.value + }) + } + return [] + }) + const render = columnOption.render?.({ + id: headerCell.id, + filterValue, + ...tableState, + values, + preFilteredRows, + preFilteredValues + }) + return { render } + }) + return { props } + } + } + } + } export const matchFilter: ColumnFilterFn = ({ filterValue, value }) => { - if (filterValue === undefined) { - return true; - } - return filterValue === value; -}; + if (filterValue === undefined) { + return true + } + return filterValue === value +} export const textPrefixFilter: ColumnFilterFn = ({ filterValue, value }) => { - if (filterValue === '') { - return true; - } - return String(value).toLowerCase().startsWith(String(filterValue).toLowerCase()); -}; + if (filterValue === '') { + return true + } + return String(value).toLowerCase().startsWith(String(filterValue).toLowerCase()) +} -export const numberRangeFilter: ColumnFilterFn<[number | null, number | null], number> = ({ - filterValue: [min, max], - value -}) => { - return (min ?? -Infinity) <= value && value <= (max ?? Infinity); -}; +export const numberRangeFilter: ColumnFilterFn<[number | null, number | null], number> = ({ filterValue: [min, max], value }) => { + return (min ?? -Infinity) <= value && value <= (max ?? Infinity) +} diff --git a/src/lib/plugins/addColumnOrder.ts b/src/lib/plugins/addColumnOrder.ts index 224e817..eda95ed 100644 --- a/src/lib/plugins/addColumnOrder.ts +++ b/src/lib/plugins/addColumnOrder.ts @@ -1,48 +1,40 @@ -import type { DeriveFlatColumnsFn, NewTablePropSet, TablePlugin } from '../types/TablePlugin.js'; -import { derived, writable, type Writable } from 'svelte/store'; +import type { DeriveFlatColumnsFn, NewTablePropSet, TablePlugin } from '../types/TablePlugin.js' +import { derived, writable, type Writable } from 'svelte/store' export interface ColumnOrderConfig { - initialColumnIdOrder?: string[]; - hideUnspecifiedColumns?: boolean; + initialColumnIdOrder?: string[] + hideUnspecifiedColumns?: boolean } export interface ColumnOrderState { - columnIdOrder: Writable; + columnIdOrder: Writable } export const addColumnOrder = - ({ - initialColumnIdOrder = [], - hideUnspecifiedColumns = false, - }: ColumnOrderConfig = {}): TablePlugin< - Item, - ColumnOrderState, - Record, - NewTablePropSet - > => - () => { - const columnIdOrder = writable(initialColumnIdOrder); + ({ initialColumnIdOrder = [], hideUnspecifiedColumns = false }: ColumnOrderConfig = {}): TablePlugin, NewTablePropSet> => + () => { + const columnIdOrder = writable(initialColumnIdOrder) - const pluginState: ColumnOrderState = { columnIdOrder }; + const pluginState: ColumnOrderState = { columnIdOrder } - const deriveFlatColumns: DeriveFlatColumnsFn = (flatColumns) => { - return derived([flatColumns, columnIdOrder], ([$flatColumns, $columnIdOrder]) => { - const _flatColumns = [...$flatColumns]; - const orderedFlatColumns: typeof $flatColumns = []; - $columnIdOrder.forEach((id) => { - const colIdx = _flatColumns.findIndex((c) => c.id === id); - orderedFlatColumns.push(..._flatColumns.splice(colIdx, 1)); - }); - if (!hideUnspecifiedColumns) { - // Push the remaining unspecified columns. - orderedFlatColumns.push(..._flatColumns); - } - return orderedFlatColumns; - }); - }; + const deriveFlatColumns: DeriveFlatColumnsFn = (flatColumns) => { + return derived([flatColumns, columnIdOrder], ([$flatColumns, $columnIdOrder]) => { + const _flatColumns = [...$flatColumns] + const orderedFlatColumns: typeof $flatColumns = [] + $columnIdOrder.forEach((id) => { + const colIdx = _flatColumns.findIndex((c) => c.id === id) + orderedFlatColumns.push(..._flatColumns.splice(colIdx, 1)) + }) + if (!hideUnspecifiedColumns) { + // Push the remaining unspecified columns. + orderedFlatColumns.push(..._flatColumns) + } + return orderedFlatColumns + }) + } - return { - pluginState, - deriveFlatColumns, - }; - }; + return { + pluginState, + deriveFlatColumns + } + } diff --git a/src/lib/plugins/addDataExport.ts b/src/lib/plugins/addDataExport.ts index 6b2ac8f..e300550 100644 --- a/src/lib/plugins/addDataExport.ts +++ b/src/lib/plugins/addDataExport.ts @@ -1,114 +1,103 @@ -import type { BodyRow } from '../bodyRows.js'; -import type { TablePlugin } from '../types/TablePlugin.js'; -import { isReadable } from '../utils/store.js'; -import { derived, get, type Readable } from 'svelte/store'; +import type { BodyRow } from '../bodyRows.js' +import type { TablePlugin } from '../types/TablePlugin.js' +import { isReadable } from '../utils/store.js' +import { derived, get, type Readable } from 'svelte/store' -export type DataExportFormat = 'object' | 'json' | 'csv'; +export type DataExportFormat = 'object' | 'json' | 'csv' type ExportForFormat = { - object: Record[]; - json: string; - csv: string; -}; -export type DataExport = ExportForFormat[F]; + object: Record[] + json: string + csv: string +} +export type DataExport = ExportForFormat[F] export interface DataExportConfig { - childrenKey?: string; - format?: F; + childrenKey?: string + format?: F } export interface DataExportState { - exportedData: Readable>; + exportedData: Readable> } export interface DataExportColumnOptions { - exclude?: boolean; + exclude?: boolean } -const getObjectsFromRows = ( - rows: BodyRow[], - ids: string[], - childrenKey: string -): Record[] => { - return rows.map((row) => { - const dataObject = Object.fromEntries( - ids.map((id) => { - const cell = row.cellForId[id]; - if (cell.isData()) { - return [id, cell.value]; - } - if (cell.isDisplay() && cell.column.data !== undefined) { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - let data = cell.column.data(cell, row.state); - if (isReadable(data)) { - data = get(data); - } - return [id, data]; - } - return [id, null]; - }) - ); - if (row.subRows !== undefined) { - dataObject[childrenKey] = getObjectsFromRows(row.subRows, ids, childrenKey); - } - return dataObject; - }); -}; +const getObjectsFromRows = (rows: BodyRow[], ids: string[], childrenKey: string): Record[] => { + return rows.map((row) => { + const dataObject = Object.fromEntries( + ids.map((id) => { + const cell = row.cellForId[id] + if (cell.isData()) { + return [id, cell.value] + } + if (cell.isDisplay() && cell.column.data !== undefined) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + let data = cell.column.data(cell, row.state) + if (isReadable(data)) { + data = get(data) + } + return [id, data] + } + return [id, null] + }) + ) + if (row.subRows !== undefined) { + dataObject[childrenKey] = getObjectsFromRows(row.subRows, ids, childrenKey) + } + return dataObject + }) +} const getCsvFromRows = (rows: BodyRow[], ids: string[]): string => { - const dataLines = rows.map((row) => { - const line = ids.map((id) => { - const cell = row.cellForId[id]; - if (cell.isData()) { - return cell.value; - } - if (cell.isDisplay() && cell.column.data !== undefined) { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - let data = cell.column.data(cell, row.state); - if (isReadable(data)) { - data = get(data); - } - return data; - } - return null; - }); - return line.join(','); - }); - const headerLine = ids.join(','); - return headerLine + '\n' + dataLines.join('\n'); -}; + const dataLines = rows.map((row) => { + const line = ids.map((id) => { + const cell = row.cellForId[id] + if (cell.isData()) { + return cell.value + } + if (cell.isDisplay() && cell.column.data !== undefined) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + let data = cell.column.data(cell, row.state) + if (isReadable(data)) { + data = get(data) + } + return data + } + return null + }) + return line.join(',') + }) + const headerLine = ids.join(',') + return headerLine + '\n' + dataLines.join('\n') +} export const addDataExport = - ({ - format = 'object' as F, - childrenKey = 'children', - }: DataExportConfig = {}): TablePlugin, DataExportColumnOptions> => - ({ tableState, columnOptions }) => { - const excludedIds = Object.entries(columnOptions) - .filter(([, option]) => option.exclude === true) - .map(([columnId]) => columnId); + ({ format = 'object' as F, childrenKey = 'children' }: DataExportConfig = {}): TablePlugin, DataExportColumnOptions> => + ({ tableState, columnOptions }) => { + const excludedIds = Object.entries(columnOptions) + .filter(([, option]) => option.exclude === true) + .map(([columnId]) => columnId) - const { visibleColumns, rows } = tableState; + const { visibleColumns, rows } = tableState - const exportedIds = derived(visibleColumns, ($visibleColumns) => - $visibleColumns.map((c) => c.id).filter((id) => !excludedIds.includes(id)) - ); + const exportedIds = derived(visibleColumns, ($visibleColumns) => $visibleColumns.map((c) => c.id).filter((id) => !excludedIds.includes(id))) - const exportedData = derived([rows, exportedIds], ([$rows, $exportedIds]) => { - switch (format) { - case 'json': - return JSON.stringify( - getObjectsFromRows($rows, $exportedIds, childrenKey) - ) as DataExport; - case 'csv': - return getCsvFromRows($rows, $exportedIds) as DataExport; - default: - return getObjectsFromRows($rows, $exportedIds, childrenKey) as DataExport; - } - }); + const exportedData = derived([rows, exportedIds], ([$rows, $exportedIds]) => { + switch (format) { + case 'json': + return JSON.stringify(getObjectsFromRows($rows, $exportedIds, childrenKey)) as DataExport + case 'csv': + return getCsvFromRows($rows, $exportedIds) as DataExport + default: + return getObjectsFromRows($rows, $exportedIds, childrenKey) as DataExport + } + }) - const pluginState: DataExportState = { exportedData }; + const pluginState: DataExportState = { exportedData } - return { - pluginState, - }; - }; + return { + pluginState + } + } diff --git a/src/lib/plugins/addExpandedRows.ts b/src/lib/plugins/addExpandedRows.ts index 6357b91..e6730e4 100644 --- a/src/lib/plugins/addExpandedRows.ts +++ b/src/lib/plugins/addExpandedRows.ts @@ -1,87 +1,75 @@ -import type { BodyRow } from '../bodyRows.js'; -import type { DeriveRowsFn, NewTablePropSet, TablePlugin } from '../types/TablePlugin.js'; -import { recordSetStore, type RecordSetStore } from '../utils/store.js'; -import { keyed } from 'svelte-keyed'; -import { derived, readable, type Readable, type Writable } from 'svelte/store'; +import type { BodyRow } from '../bodyRows.js' +import type { DeriveRowsFn, NewTablePropSet, TablePlugin } from '../types/TablePlugin.js' +import { recordSetStore, type RecordSetStore } from '../utils/store.js' +import { keyed } from 'svelte-keyed' +import { derived, readable, type Readable, type Writable } from 'svelte/store' // eslint-disable-next-line @typescript-eslint/no-unused-vars export interface ExpandedRowsConfig { - initialExpandedIds?: Record; + initialExpandedIds?: Record } export interface ExpandedRowsState { - expandedIds: RecordSetStore; - getRowState: (row: BodyRow) => ExpandedRowsRowState; + expandedIds: RecordSetStore + getRowState: (row: BodyRow) => ExpandedRowsRowState } export interface ExpandedRowsRowState { - isExpanded: Writable; - canExpand: Readable; - isAllSubRowsExpanded: Readable; + isExpanded: Writable + canExpand: Readable + isAllSubRowsExpanded: Readable } -const withExpandedRows = >( - row: Row, - expandedIds: Record -): Row[] => { - if (row.subRows === undefined) { - return [row]; - } - if (expandedIds[row.id] !== true) { - return [row]; - } - const expandedSubRows = row.subRows.flatMap((subRow) => - withExpandedRows(subRow as Row, expandedIds) - ); - return [row, ...expandedSubRows]; -}; +const withExpandedRows = >(row: Row, expandedIds: Record): Row[] => { + if (row.subRows === undefined) { + return [row] + } + if (expandedIds[row.id] !== true) { + return [row] + } + const expandedSubRows = row.subRows.flatMap((subRow) => withExpandedRows(subRow as Row, expandedIds)) + return [row, ...expandedSubRows] +} export const addExpandedRows = - ({ initialExpandedIds = {} }: ExpandedRowsConfig = {}): TablePlugin< - Item, - ExpandedRowsState, - Record, - NewTablePropSet - > => - () => { - const expandedIds = recordSetStore(initialExpandedIds); - const getRowState = (row: BodyRow): ExpandedRowsRowState => { - const isExpanded = keyed(expandedIds, row.id) as Writable; - const canExpand = readable((row.subRows?.length ?? 0) > 0); - const subRowExpandedIds = derived(expandedIds, ($expandedIds) => { - // Check prefix with '>' to match child ids while ignoring this row's id. - return Object.entries($expandedIds).filter( - ([id, expanded]) => id.startsWith(`${row.id}>`) && expanded - ); - }); - // If the number of expanded subRows is equal to the number of subRows - // that can expand, then all subRows are expanded. - const isAllSubRowsExpanded = derived(subRowExpandedIds, ($subRowExpandedIds) => { - if (row.subRows === undefined) { - return true; - } - // canExpand is derived from the presence of the `subRows` property. - const expandableSubRows = row.subRows.filter((subRow) => subRow.subRows !== undefined); - return $subRowExpandedIds.length === expandableSubRows.length; - }); - return { - isExpanded, - canExpand, - isAllSubRowsExpanded, - }; - }; - const pluginState = { expandedIds, getRowState }; + ({ initialExpandedIds = {} }: ExpandedRowsConfig = {}): TablePlugin, Record, NewTablePropSet> => + () => { + const expandedIds = recordSetStore(initialExpandedIds) + const getRowState = (row: BodyRow): ExpandedRowsRowState => { + const isExpanded = keyed(expandedIds, row.id) as Writable + const canExpand = readable((row.subRows?.length ?? 0) > 0) + const subRowExpandedIds = derived(expandedIds, ($expandedIds) => { + // Check prefix with '>' to match child ids while ignoring this row's id. + return Object.entries($expandedIds).filter(([id, expanded]) => id.startsWith(`${row.id}>`) && expanded) + }) + // If the number of expanded subRows is equal to the number of subRows + // that can expand, then all subRows are expanded. + const isAllSubRowsExpanded = derived(subRowExpandedIds, ($subRowExpandedIds) => { + if (row.subRows === undefined) { + return true + } + // canExpand is derived from the presence of the `subRows` property. + const expandableSubRows = row.subRows.filter((subRow) => subRow.subRows !== undefined) + return $subRowExpandedIds.length === expandableSubRows.length + }) + return { + isExpanded, + canExpand, + isAllSubRowsExpanded + } + } + const pluginState = { expandedIds, getRowState } - const deriveRows: DeriveRowsFn = (rows) => { - return derived([rows, expandedIds], ([$rows, $expandedIds]) => { - return $rows.flatMap((row) => { - return withExpandedRows(row, $expandedIds); - }); - }); - }; + const deriveRows: DeriveRowsFn = (rows) => { + return derived([rows, expandedIds], ([$rows, $expandedIds]) => { + return $rows.flatMap((row) => { + return withExpandedRows(row, $expandedIds) + }) + }) + } - return { - pluginState, - deriveRows, - }; - }; + return { + pluginState, + deriveRows + } + } diff --git a/src/lib/plugins/addFlatten.test.ts b/src/lib/plugins/addFlatten.test.ts index 1ce1b35..5e849c0 100644 --- a/src/lib/plugins/addFlatten.test.ts +++ b/src/lib/plugins/addFlatten.test.ts @@ -1,117 +1,117 @@ -import { createTable } from '../createTable.js'; -import type { Sample } from '../../routes/_createSamples.js'; -import { get, readable } from 'svelte/store'; -import { addFlatten } from './addFlatten.js'; -import { addSubRows } from './addSubRows.js'; +import { createTable } from '../createTable.js' +import type { Sample } from '../../routes/_createSamples.js' +import { get, readable } from 'svelte/store' +import { addFlatten } from './addFlatten.js' +import { addSubRows } from './addSubRows.js' const data = readable([ - { - firstName: 'Adam', - lastName: 'Lee', - age: 30, - progress: 30, - status: 'single', - visits: 5, - children: [ - { - firstName: 'Allie', - lastName: 'Lee', - age: 30, - progress: 30, - status: 'single', - visits: 5, - children: [ - { - firstName: 'Aria', - lastName: 'Lee', - age: 30, - progress: 30, - status: 'single', - visits: 5, - }, - ], - }, - { firstName: 'Amy', lastName: 'Lee', age: 30, progress: 30, status: 'single', visits: 5 }, - ], - }, - { - firstName: 'Bryan', - lastName: 'Lee', - age: 30, - progress: 30, - status: 'single', - visits: 5, - children: [ - { firstName: 'Ben', lastName: 'Lee', age: 30, progress: 30, status: 'single', visits: 5 }, - { firstName: 'Beth', lastName: 'Lee', age: 30, progress: 30, status: 'single', visits: 5 }, - ], - }, - { - firstName: 'Charlie', - lastName: 'Puth', - age: 30, - progress: 30, - status: 'single', - visits: 5, - children: [ - { firstName: 'Cory', lastName: 'Puth', age: 30, progress: 30, status: 'single', visits: 5 }, - { - firstName: 'Carmen', - lastName: 'Puth', - age: 30, - progress: 30, - status: 'single', - visits: 5, - }, - ], - }, - { firstName: 'Danny', lastName: 'Lee', age: 40, progress: 40, status: 'single', visits: 5 }, - { firstName: 'Elliot', lastName: 'Page', age: 40, progress: 40, status: 'single', visits: 5 }, -]); + { + firstName: 'Adam', + lastName: 'Lee', + age: 30, + progress: 30, + status: 'single', + visits: 5, + children: [ + { + firstName: 'Allie', + lastName: 'Lee', + age: 30, + progress: 30, + status: 'single', + visits: 5, + children: [ + { + firstName: 'Aria', + lastName: 'Lee', + age: 30, + progress: 30, + status: 'single', + visits: 5 + } + ] + }, + { firstName: 'Amy', lastName: 'Lee', age: 30, progress: 30, status: 'single', visits: 5 } + ] + }, + { + firstName: 'Bryan', + lastName: 'Lee', + age: 30, + progress: 30, + status: 'single', + visits: 5, + children: [ + { firstName: 'Ben', lastName: 'Lee', age: 30, progress: 30, status: 'single', visits: 5 }, + { firstName: 'Beth', lastName: 'Lee', age: 30, progress: 30, status: 'single', visits: 5 } + ] + }, + { + firstName: 'Charlie', + lastName: 'Puth', + age: 30, + progress: 30, + status: 'single', + visits: 5, + children: [ + { firstName: 'Cory', lastName: 'Puth', age: 30, progress: 30, status: 'single', visits: 5 }, + { + firstName: 'Carmen', + lastName: 'Puth', + age: 30, + progress: 30, + status: 'single', + visits: 5 + } + ] + }, + { firstName: 'Danny', lastName: 'Lee', age: 40, progress: 40, status: 'single', visits: 5 }, + { firstName: 'Elliot', lastName: 'Page', age: 40, progress: 40, status: 'single', visits: 5 } +]) test('basic row flattening', () => { - const table = createTable(data, { - sub: addSubRows({ children: 'children' }), - flatten: addFlatten({ initialDepth: 1 }), - }); - const columns = table.createColumns([ - table.column({ - accessor: 'firstName', - header: 'First Name', - }), - table.column({ - accessor: 'lastName', - header: 'Last Name', - }), - ]); - const vm = table.createViewModel(columns); - const rows = get(vm.rows); - expect(rows).toHaveLength(6); - const row0 = rows[0].isData() ? rows[0] : undefined; - expect(row0).not.toBeUndefined(); - expect(row0?.original.firstName).toBe('Allie'); - expect(row0?.subRows).toHaveLength(1); -}); + const table = createTable(data, { + sub: addSubRows({ children: 'children' }), + flatten: addFlatten({ initialDepth: 1 }) + }) + const columns = table.createColumns([ + table.column({ + accessor: 'firstName', + header: 'First Name' + }), + table.column({ + accessor: 'lastName', + header: 'Last Name' + }) + ]) + const vm = table.createViewModel(columns) + const rows = get(vm.rows) + expect(rows).toHaveLength(6) + const row0 = rows[0].isData() ? rows[0] : undefined + expect(row0).not.toBeUndefined() + expect(row0?.original.firstName).toBe('Allie') + expect(row0?.subRows).toHaveLength(1) +}) test('multi-level row flattening', () => { - const table = createTable(data, { - sub: addSubRows({ children: 'children' }), - flatten: addFlatten({ initialDepth: 2 }), - }); - const columns = table.createColumns([ - table.column({ - accessor: 'firstName', - header: 'First Name', - }), - table.column({ - accessor: 'lastName', - header: 'Last Name', - }), - ]); - const vm = table.createViewModel(columns); - const rows = get(vm.rows); - expect(rows).toHaveLength(1); - const row0 = rows[0].isData() ? rows[0] : undefined; - expect(row0).not.toBeUndefined(); - expect(row0?.original.firstName).toBe('Aria'); -}); + const table = createTable(data, { + sub: addSubRows({ children: 'children' }), + flatten: addFlatten({ initialDepth: 2 }) + }) + const columns = table.createColumns([ + table.column({ + accessor: 'firstName', + header: 'First Name' + }), + table.column({ + accessor: 'lastName', + header: 'Last Name' + }) + ]) + const vm = table.createViewModel(columns) + const rows = get(vm.rows) + expect(rows).toHaveLength(1) + const row0 = rows[0].isData() ? rows[0] : undefined + expect(row0).not.toBeUndefined() + expect(row0?.original.firstName).toBe('Aria') +}) diff --git a/src/lib/plugins/addFlatten.ts b/src/lib/plugins/addFlatten.ts index 3ace189..3d50c36 100644 --- a/src/lib/plugins/addFlatten.ts +++ b/src/lib/plugins/addFlatten.ts @@ -1,69 +1,61 @@ -import type { BodyRow } from '../bodyRows.js'; -import type { DeriveRowsFn, NewTablePropSet, TablePlugin } from '../types/TablePlugin.js'; -import { derived, writable, type Readable, type Writable } from 'svelte/store'; +import type { BodyRow } from '../bodyRows.js' +import type { DeriveRowsFn, NewTablePropSet, TablePlugin } from '../types/TablePlugin.js' +import { derived, writable, type Readable, type Writable } from 'svelte/store' export interface FlattenConfig { - initialDepth?: number; + initialDepth?: number } export interface FlattenState { - depth: Writable; + depth: Writable } // eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-interface export interface FlattenColumnOptions {} export type FlattenPropSet = NewTablePropSet<{ - 'tbody.tr.td': { - flatten: (depth: number) => void; - unflatten: () => void; - }; -}>; + 'tbody.tr.td': { + flatten: (depth: number) => void + unflatten: () => void + } +}> -export const getFlattenedRows = >( - rows: Row[], - depth: number -): Row[] => { - if (depth === 0) return rows; - const flattenedRows: Row[] = []; - for (const row of rows) { - if (row.subRows === undefined) continue; - // eslint-disable-next-line @typescript-eslint/no-explicit-any - flattenedRows.push(...(getFlattenedRows(row.subRows as any, depth - 1) as Row[])); - } - return flattenedRows; -}; +export const getFlattenedRows = >(rows: Row[], depth: number): Row[] => { + if (depth === 0) return rows + const flattenedRows: Row[] = [] + for (const row of rows) { + if (row.subRows === undefined) continue + // eslint-disable-next-line @typescript-eslint/no-explicit-any + flattenedRows.push(...(getFlattenedRows(row.subRows as any, depth - 1) as Row[])) + } + return flattenedRows +} export const addFlatten = - ({ initialDepth = 0 }: FlattenConfig = {}): TablePlugin< - Item, - FlattenState, - FlattenColumnOptions, - FlattenPropSet - > => - () => { - const depth = writable(initialDepth); - const pluginState: FlattenState = { depth }; - const deriveRows: DeriveRowsFn = (rows) => { - return derived([rows, depth], ([$rows, $depth]) => { - return getFlattenedRows($rows, $depth); - }); - }; + ({ initialDepth = 0 }: FlattenConfig = {}): TablePlugin, FlattenPropSet> => + () => { + const depth = writable(initialDepth) + const pluginState: FlattenState = { depth } + const deriveRows: DeriveRowsFn = (rows) => { + return derived([rows, depth], ([$rows, $depth]) => { + return getFlattenedRows($rows, $depth) + }) + } - return { - pluginState, - deriveRows, - hooks: { - 'tbody.tr.td': () => { - const props: Readable = derived([], () => { - const flatten = ($depth: number) => { - depth.set($depth); - }; - const unflatten = () => flatten(0); - return { flatten, unflatten }; - }); - return { props }; - }, - }, - }; - }; + return { + pluginState, + deriveRows, + hooks: { + 'tbody.tr.td': () => { + const props: Readable = derived([], () => { + const flatten = ($depth: number) => { + depth.set($depth) + } + const unflatten = () => flatten(0) + return { flatten, unflatten } + }) + return { props } + } + } + } + } diff --git a/src/lib/plugins/addGridLayout.ts b/src/lib/plugins/addGridLayout.ts index 63b67d5..d6bcdb0 100644 --- a/src/lib/plugins/addGridLayout.ts +++ b/src/lib/plugins/addGridLayout.ts @@ -1,91 +1,82 @@ -import type { - TableAttributes, - TableBodyAttributes, - TableHeadAttributes, -} from '../createViewModel.js'; -import type { DeriveFn, NewTablePropSet, TablePlugin } from '../types/TablePlugin.js'; -import { derived } from 'svelte/store'; +import type { TableAttributes, TableBodyAttributes, TableHeadAttributes } from '../createViewModel.js' +import type { DeriveFn, NewTablePropSet, TablePlugin } from '../types/TablePlugin.js' +import { derived } from 'svelte/store' export const addGridLayout = - (): TablePlugin< - Item, - Record, - Record, - NewTablePropSet - > => - ({ tableState }) => { - const pluginState = {}; + (): TablePlugin, Record, NewTablePropSet> => + ({ tableState }) => { + const pluginState = {} - const deriveTableAttrs: DeriveFn> = (attrs) => { - return derived([attrs, tableState.visibleColumns], ([$attrs, $visibleColumns]) => { - return { - ...$attrs, - style: { - display: 'grid', - 'grid-template-columns': `repeat(${$visibleColumns.length}, auto)`, - }, - }; - }); - }; + const deriveTableAttrs: DeriveFn> = (attrs) => { + return derived([attrs, tableState.visibleColumns], ([$attrs, $visibleColumns]) => { + return { + ...$attrs, + style: { + display: 'grid', + 'grid-template-columns': `repeat(${$visibleColumns.length}, auto)` + } + } + }) + } - const deriveTableHeadAttrs: DeriveFn> = (attrs) => { - return derived(attrs, ($attrs) => { - return { - ...$attrs, - style: { - display: 'contents', - }, - }; - }); - }; + const deriveTableHeadAttrs: DeriveFn> = (attrs) => { + return derived(attrs, ($attrs) => { + return { + ...$attrs, + style: { + display: 'contents' + } + } + }) + } - const deriveTableBodyAttrs: DeriveFn> = (attrs) => { - return derived(attrs, ($attrs) => { - return { - ...$attrs, - style: { - display: 'contents', - }, - }; - }); - }; + const deriveTableBodyAttrs: DeriveFn> = (attrs) => { + return derived(attrs, ($attrs) => { + return { + ...$attrs, + style: { + display: 'contents' + } + } + }) + } - return { - pluginState, - deriveTableAttrs, - deriveTableHeadAttrs, - deriveTableBodyAttrs, - hooks: { - 'thead.tr': () => { - const attrs = derived([], () => { - return { - style: { - display: 'contents', - }, - }; - }); - return { attrs }; - }, - 'thead.tr.th': (cell) => { - const attrs = derived([], () => { - return { - style: { - 'grid-column': `${cell.colstart + 1} / span ${cell.colspan}`, - }, - }; - }); - return { attrs }; - }, - 'tbody.tr': () => { - const attrs = derived([], () => { - return { - style: { - display: 'contents', - }, - }; - }); - return { attrs }; - }, - }, - }; - }; + return { + pluginState, + deriveTableAttrs, + deriveTableHeadAttrs, + deriveTableBodyAttrs, + hooks: { + 'thead.tr': () => { + const attrs = derived([], () => { + return { + style: { + display: 'contents' + } + } + }) + return { attrs } + }, + 'thead.tr.th': (cell) => { + const attrs = derived([], () => { + return { + style: { + 'grid-column': `${cell.colstart + 1} / span ${cell.colspan}` + } + } + }) + return { attrs } + }, + 'tbody.tr': () => { + const attrs = derived([], () => { + return { + style: { + display: 'contents' + } + } + }) + return { attrs } + } + } + } + } diff --git a/src/lib/plugins/addGroupBy.test.ts b/src/lib/plugins/addGroupBy.test.ts index 48983f8..59e908e 100644 --- a/src/lib/plugins/addGroupBy.test.ts +++ b/src/lib/plugins/addGroupBy.test.ts @@ -1,124 +1,124 @@ -import { createTable } from '../createTable.js'; -import type { Sample } from '../../routes/_createSamples.js'; -import { get, readable } from 'svelte/store'; -import { addGroupBy } from './addGroupBy.js'; -import { addSubRows } from './addSubRows.js'; +import { createTable } from '../createTable.js' +import type { Sample } from '../../routes/_createSamples.js' +import { get, readable } from 'svelte/store' +import { addGroupBy } from './addGroupBy.js' +import { addSubRows } from './addSubRows.js' test('basic row grouping', () => { - const data = readable([ - { firstName: 'Adam', lastName: 'Lee', age: 30, progress: 30, status: 'single', visits: 5 }, - { firstName: 'Bryan', lastName: 'Lee', age: 30, progress: 30, status: 'single', visits: 5 }, - { firstName: 'Charlie', lastName: 'Puth', age: 30, progress: 30, status: 'single', visits: 5 }, - { firstName: 'Danny', lastName: 'Lee', age: 40, progress: 40, status: 'single', visits: 5 }, - { firstName: 'Elliot', lastName: 'Page', age: 40, progress: 40, status: 'single', visits: 5 }, - ]); - const table = createTable(data, { - group: addGroupBy(), - }); - const columns = table.createColumns([ - table.column({ - accessor: 'firstName', - header: 'First Name', - }), - table.column({ - accessor: 'lastName', - header: 'Last Name', - }), - ]); - const vm = table.createViewModel(columns); + const data = readable([ + { firstName: 'Adam', lastName: 'Lee', age: 30, progress: 30, status: 'single', visits: 5 }, + { firstName: 'Bryan', lastName: 'Lee', age: 30, progress: 30, status: 'single', visits: 5 }, + { firstName: 'Charlie', lastName: 'Puth', age: 30, progress: 30, status: 'single', visits: 5 }, + { firstName: 'Danny', lastName: 'Lee', age: 40, progress: 40, status: 'single', visits: 5 }, + { firstName: 'Elliot', lastName: 'Page', age: 40, progress: 40, status: 'single', visits: 5 } + ]) + const table = createTable(data, { + group: addGroupBy() + }) + const columns = table.createColumns([ + table.column({ + accessor: 'firstName', + header: 'First Name' + }), + table.column({ + accessor: 'lastName', + header: 'Last Name' + }) + ]) + const vm = table.createViewModel(columns) - const { groupByIds } = vm.pluginStates.group; - groupByIds.toggle('lastName'); - const rows = get(vm.rows); + const { groupByIds } = vm.pluginStates.group + groupByIds.toggle('lastName') + const rows = get(vm.rows) - expect(rows).toHaveLength(3); - expect(rows[0].subRows).toHaveLength(3); - expect(rows[1].subRows).toHaveLength(1); - expect(rows[2].subRows).toHaveLength(1); + expect(rows).toHaveLength(3) + expect(rows[0].subRows).toHaveLength(3) + expect(rows[1].subRows).toHaveLength(1) + expect(rows[2].subRows).toHaveLength(1) - const subRow00 = rows[0].subRows?.[0]; - const subRow00Data = (subRow00?.isData() && subRow00.original) as Sample; - expect(subRow00Data.firstName).toBe('Adam'); + const subRow00 = rows[0].subRows?.[0] + const subRow00Data = (subRow00?.isData() && subRow00.original) as Sample + expect(subRow00Data.firstName).toBe('Adam') - const subRow11 = rows[0].subRows?.[1]; - const subRow11Data = (subRow11?.isData() && subRow11.original) as Sample; - expect(subRow11Data.firstName).toBe('Bryan'); + const subRow11 = rows[0].subRows?.[1] + const subRow11Data = (subRow11?.isData() && subRow11.original) as Sample + expect(subRow11Data.firstName).toBe('Bryan') - const subRow12 = rows[0].subRows?.[2]; - const subRow12Data = (subRow12?.isData() && subRow12.original) as Sample; - expect(subRow12Data.firstName).toBe('Danny'); -}); + const subRow12 = rows[0].subRows?.[2] + const subRow12Data = (subRow12?.isData() && subRow12.original) as Sample + expect(subRow12Data.firstName).toBe('Danny') +}) it('preserves subrows of a row after grouping', () => { - const data = readable([ - { - firstName: 'Adam', - lastName: 'Lee', - age: 30, - progress: 30, - status: 'single', - visits: 5, - children: [ - { firstName: 'Allie', lastName: 'Lee', age: 30, progress: 30, status: 'single', visits: 5 }, - { firstName: 'Amy', lastName: 'Lee', age: 30, progress: 30, status: 'single', visits: 5 }, - ], - }, - { - firstName: 'Bryan', - lastName: 'Lee', - age: 30, - progress: 30, - status: 'single', - visits: 5, - children: [ - { firstName: 'Ben', lastName: 'Lee', age: 30, progress: 30, status: 'single', visits: 5 }, - { firstName: 'Beth', lastName: 'Lee', age: 30, progress: 30, status: 'single', visits: 5 }, - ], - }, - { - firstName: 'Charlie', - lastName: 'Puth', - age: 30, - progress: 30, - status: 'single', - visits: 5, - children: [ - { firstName: 'Cory', lastName: 'Puth', age: 30, progress: 30, status: 'single', visits: 5 }, - { - firstName: 'Carmen', - lastName: 'Puth', - age: 30, - progress: 30, - status: 'single', - visits: 5, - }, - ], - }, - { firstName: 'Danny', lastName: 'Lee', age: 40, progress: 40, status: 'single', visits: 5 }, - { firstName: 'Elliot', lastName: 'Page', age: 40, progress: 40, status: 'single', visits: 5 }, - ]); - const table = createTable(data, { - sub: addSubRows({ - children: 'children', - }), - group: addGroupBy(), - }); - const columns = table.createColumns([ - table.column({ - accessor: 'firstName', - header: 'First Name', - }), - table.column({ - accessor: 'lastName', - header: 'Last Name', - }), - ]); - const vm = table.createViewModel(columns); + const data = readable([ + { + firstName: 'Adam', + lastName: 'Lee', + age: 30, + progress: 30, + status: 'single', + visits: 5, + children: [ + { firstName: 'Allie', lastName: 'Lee', age: 30, progress: 30, status: 'single', visits: 5 }, + { firstName: 'Amy', lastName: 'Lee', age: 30, progress: 30, status: 'single', visits: 5 } + ] + }, + { + firstName: 'Bryan', + lastName: 'Lee', + age: 30, + progress: 30, + status: 'single', + visits: 5, + children: [ + { firstName: 'Ben', lastName: 'Lee', age: 30, progress: 30, status: 'single', visits: 5 }, + { firstName: 'Beth', lastName: 'Lee', age: 30, progress: 30, status: 'single', visits: 5 } + ] + }, + { + firstName: 'Charlie', + lastName: 'Puth', + age: 30, + progress: 30, + status: 'single', + visits: 5, + children: [ + { firstName: 'Cory', lastName: 'Puth', age: 30, progress: 30, status: 'single', visits: 5 }, + { + firstName: 'Carmen', + lastName: 'Puth', + age: 30, + progress: 30, + status: 'single', + visits: 5 + } + ] + }, + { firstName: 'Danny', lastName: 'Lee', age: 40, progress: 40, status: 'single', visits: 5 }, + { firstName: 'Elliot', lastName: 'Page', age: 40, progress: 40, status: 'single', visits: 5 } + ]) + const table = createTable(data, { + sub: addSubRows({ + children: 'children' + }), + group: addGroupBy() + }) + const columns = table.createColumns([ + table.column({ + accessor: 'firstName', + header: 'First Name' + }), + table.column({ + accessor: 'lastName', + header: 'Last Name' + }) + ]) + const vm = table.createViewModel(columns) - const { groupByIds } = vm.pluginStates.group; - groupByIds.toggle('lastName'); - const rows = get(vm.rows); + const { groupByIds } = vm.pluginStates.group + groupByIds.toggle('lastName') + const rows = get(vm.rows) - const subRow00 = rows[0].subRows?.[0]; - expect(subRow00?.subRows).toHaveLength(2); -}); + const subRow00 = rows[0].subRows?.[0] + expect(subRow00?.subRows).toHaveLength(2) +}) diff --git a/src/lib/plugins/addGroupBy.ts b/src/lib/plugins/addGroupBy.ts index b0f3468..9e4ca6f 100644 --- a/src/lib/plugins/addGroupBy.ts +++ b/src/lib/plugins/addGroupBy.ts @@ -1,278 +1,264 @@ -import { DataBodyCell } from '../bodyCells.js'; -import { BodyRow, DisplayBodyRow } from '../bodyRows.js'; -import type { DataColumn } from '../columns.js'; -import type { DataLabel } from '../types/Label.js'; -import type { DeriveRowsFn, NewTablePropSet, TablePlugin } from '../types/TablePlugin.js'; -import { isShiftClick } from '../utils/event.js'; -import { nonUndefined } from '../utils/filter.js'; -import { arraySetStore, type ArraySetStore } from '../utils/store.js'; -import { derived, writable, type Readable } from 'svelte/store'; +import { DataBodyCell } from '../bodyCells.js' +import { BodyRow, DisplayBodyRow } from '../bodyRows.js' +import type { DataColumn } from '../columns.js' +import type { DataLabel } from '../types/Label.js' +import type { DeriveRowsFn, NewTablePropSet, TablePlugin } from '../types/TablePlugin.js' +import { isShiftClick } from '../utils/event.js' +import { nonUndefined } from '../utils/filter.js' +import { arraySetStore, type ArraySetStore } from '../utils/store.js' +import { derived, writable, type Readable } from 'svelte/store' export interface GroupByConfig { - initialGroupByIds?: string[]; - disableMultiGroup?: boolean; - isMultiGroupEvent?: (event: Event) => boolean; + initialGroupByIds?: string[] + disableMultiGroup?: boolean + isMultiGroupEvent?: (event: Event) => boolean } export interface GroupByState { - groupByIds: ArraySetStore; + groupByIds: ArraySetStore } export interface GroupByColumnOptions< - Item, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - Value = any, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - GroupOn extends string | number = any, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - Aggregate = any + Item, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + Value = any, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + GroupOn extends string | number = any, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + Aggregate = any > { - disable?: boolean; - getAggregateValue?: (values: GroupOn[]) => Aggregate; - getGroupOn?: (value: Value) => GroupOn; - cell?: DataLabel; + disable?: boolean + getAggregateValue?: (values: GroupOn[]) => Aggregate + getGroupOn?: (value: Value) => GroupOn + cell?: DataLabel } export type GroupByPropSet = NewTablePropSet<{ - 'thead.tr.th': { - grouped: boolean; - toggle: (event: Event) => void; - clear: () => void; - disabled: boolean; - }; - 'tbody.tr.td': { - repeated: boolean; - aggregated: boolean; - grouped: boolean; - }; -}>; + 'thead.tr.th': { + grouped: boolean + toggle: (event: Event) => void + clear: () => void + disabled: boolean + } + 'tbody.tr.td': { + repeated: boolean + aggregated: boolean + grouped: boolean + } +}> interface GetGroupedRowsProps { - repeatCellIds: Record; - aggregateCellIds: Record; - groupCellIds: Record; - allGroupByIds: string[]; + repeatCellIds: Record + aggregateCellIds: Record + groupCellIds: Record + allGroupByIds: string[] } const getIdPrefix = (id: string): string => { - const prefixTokens = id.split('>').slice(0, -1); - if (prefixTokens.length === 0) { - return ''; - } - return `${prefixTokens.join('>')}>`; -}; + const prefixTokens = id.split('>').slice(0, -1) + if (prefixTokens.length === 0) { + return '' + } + return `${prefixTokens.join('>')}>` +} const getIdLeaf = (id: string): string => { - const tokens = id.split('>'); - return tokens[tokens.length - 1] ?? ''; -}; + const tokens = id.split('>') + return tokens[tokens.length - 1] ?? '' +} // eslint-disable-next-line @typescript-eslint/no-explicit-any const deepenIdAndDepth = >(row: Row, parentId: string) => { - row.id = `${parentId}>${row.id}`; - row.depth = row.depth + 1; - row.subRows?.forEach((subRow) => deepenIdAndDepth(subRow, parentId)); -}; + row.id = `${parentId}>${row.id}` + row.depth = row.depth + 1 + row.subRows?.forEach((subRow) => deepenIdAndDepth(subRow, parentId)) +} // eslint-disable-next-line @typescript-eslint/no-explicit-any export const getGroupedRows = < - Item, - Row extends BodyRow, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - GroupOn extends string | number = any + Item, + Row extends BodyRow, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + GroupOn extends string | number = any >( - rows: Row[], - groupByIds: string[], - columnOptions: Record>, - { repeatCellIds, aggregateCellIds, groupCellIds, allGroupByIds }: GetGroupedRowsProps + rows: Row[], + groupByIds: string[], + columnOptions: Record>, + { repeatCellIds, aggregateCellIds, groupCellIds, allGroupByIds }: GetGroupedRowsProps ): Row[] => { - if (groupByIds.length === 0) { - return rows; - } - if (rows.length === 0) { - return rows; - } - const idPrefix = getIdPrefix(rows[0].id); - const [groupById, ...restIds] = groupByIds; + if (groupByIds.length === 0) { + return rows + } + if (rows.length === 0) { + return rows + } + const idPrefix = getIdPrefix(rows[0].id) + const [groupById, ...restIds] = groupByIds - const subRowsForGroupOnValue = new Map(); - for (const row of rows) { - const cell = row.cellForId[groupById]; - if (!cell.isData()) { - break; - } - const columnOption = columnOptions[groupById] ?? {}; - const { getGroupOn } = columnOption; - const groupOnValue = getGroupOn?.(cell.value) ?? cell.value; - if (typeof groupOnValue === 'function' || typeof groupOnValue === 'object') { - console.warn( - `Missing \`getGroupOn\` column option to aggregate column "${groupById}" with object values` - ); - } - const subRows = subRowsForGroupOnValue.get(groupOnValue) ?? []; - subRowsForGroupOnValue.set(groupOnValue, [...subRows, row]); - } + const subRowsForGroupOnValue = new Map() + for (const row of rows) { + const cell = row.cellForId[groupById] + if (!cell.isData()) { + break + } + const columnOption = columnOptions[groupById] ?? {} + const { getGroupOn } = columnOption + const groupOnValue = getGroupOn?.(cell.value) ?? cell.value + if (typeof groupOnValue === 'function' || typeof groupOnValue === 'object') { + console.warn(`Missing \`getGroupOn\` column option to aggregate column "${groupById}" with object values`) + } + const subRows = subRowsForGroupOnValue.get(groupOnValue) ?? [] + subRowsForGroupOnValue.set(groupOnValue, [...subRows, row]) + } - const groupedRows: Row[] = []; - let groupRowIdx = 0; - for (const [groupOnValue, subRows] of subRowsForGroupOnValue.entries()) { - // Guaranteed to have at least one subRow. - const firstRow = subRows[0]; - const groupRow = new DisplayBodyRow({ - id: `${idPrefix}${groupRowIdx++}`, - // TODO Differentiate data rows and grouped rows. - depth: firstRow.depth, - cells: [], - cellForId: {}, - }); - const groupRowCellForId = Object.fromEntries( - Object.entries(firstRow.cellForId).map(([id, cell]) => { - if (id === groupById) { - const newCell = new DataBodyCell({ - column: cell.column as DataColumn, - row: groupRow, - value: groupOnValue, - }); - return [id, newCell]; - } - const columnCells = subRows.map((row) => row.cellForId[id]).filter(nonUndefined); - if (!columnCells[0].isData()) { - const clonedCell = columnCells[0].clone(); - clonedCell.row = groupRow; - return [id, clonedCell]; - } - const { cell: label, getAggregateValue } = columnOptions[id] ?? {}; - const columnValues = (columnCells as DataBodyCell[]).map((cell) => cell.value); - const value = getAggregateValue === undefined ? '' : getAggregateValue(columnValues); - const newCell = new DataBodyCell({ - column: cell.column as DataColumn, - row: groupRow, - value, - label, - }); - return [id, newCell]; - }) - ); - const groupRowCells = firstRow.cells.map((cell) => { - return groupRowCellForId[cell.id]; - }); - groupRow.cellForId = groupRowCellForId; - groupRow.cells = groupRowCells; - const groupRowSubRows = subRows.map((subRow) => { - const clonedSubRow = subRow.clone({ includeCells: true, includeSubRows: true }); - deepenIdAndDepth(clonedSubRow, groupRow.id); - return clonedSubRow; - }); - groupRow.subRows = getGroupedRows(groupRowSubRows, restIds, columnOptions, { - repeatCellIds, - aggregateCellIds, - groupCellIds, - allGroupByIds, - }); - groupedRows.push(groupRow as unknown as Row); - groupRow.cells.forEach((cell) => { - if (cell.id === groupById) { - groupCellIds[cell.rowColId()] = true; - } else { - aggregateCellIds[cell.rowColId()] = true; - } - }); - groupRow.subRows.forEach((subRow) => { - subRow.parentRow = groupRow; - subRow.cells.forEach((cell) => { - if (allGroupByIds.includes(cell.id) && groupCellIds[cell.rowColId()] !== true) { - repeatCellIds[cell.rowColId()] = true; - } - }); - }); - } - return groupedRows; -}; + const groupedRows: Row[] = [] + let groupRowIdx = 0 + for (const [groupOnValue, subRows] of subRowsForGroupOnValue.entries()) { + // Guaranteed to have at least one subRow. + const firstRow = subRows[0] + const groupRow = new DisplayBodyRow({ + id: `${idPrefix}${groupRowIdx++}`, + // TODO Differentiate data rows and grouped rows. + depth: firstRow.depth, + cells: [], + cellForId: {} + }) + const groupRowCellForId = Object.fromEntries( + Object.entries(firstRow.cellForId).map(([id, cell]) => { + if (id === groupById) { + const newCell = new DataBodyCell({ + column: cell.column as DataColumn, + row: groupRow, + value: groupOnValue + }) + return [id, newCell] + } + const columnCells = subRows.map((row) => row.cellForId[id]).filter(nonUndefined) + if (!columnCells[0].isData()) { + const clonedCell = columnCells[0].clone() + clonedCell.row = groupRow + return [id, clonedCell] + } + const { cell: label, getAggregateValue } = columnOptions[id] ?? {} + const columnValues = (columnCells as DataBodyCell[]).map((cell) => cell.value) + const value = getAggregateValue === undefined ? '' : getAggregateValue(columnValues) + const newCell = new DataBodyCell({ + column: cell.column as DataColumn, + row: groupRow, + value, + label + }) + return [id, newCell] + }) + ) + const groupRowCells = firstRow.cells.map((cell) => { + return groupRowCellForId[cell.id] + }) + groupRow.cellForId = groupRowCellForId + groupRow.cells = groupRowCells + const groupRowSubRows = subRows.map((subRow) => { + const clonedSubRow = subRow.clone({ includeCells: true, includeSubRows: true }) + deepenIdAndDepth(clonedSubRow, groupRow.id) + return clonedSubRow + }) + groupRow.subRows = getGroupedRows(groupRowSubRows, restIds, columnOptions, { + repeatCellIds, + aggregateCellIds, + groupCellIds, + allGroupByIds + }) + groupedRows.push(groupRow as unknown as Row) + groupRow.cells.forEach((cell) => { + if (cell.id === groupById) { + groupCellIds[cell.rowColId()] = true + } else { + aggregateCellIds[cell.rowColId()] = true + } + }) + groupRow.subRows.forEach((subRow) => { + subRow.parentRow = groupRow + subRow.cells.forEach((cell) => { + if (allGroupByIds.includes(cell.id) && groupCellIds[cell.rowColId()] !== true) { + repeatCellIds[cell.rowColId()] = true + } + }) + }) + } + return groupedRows +} export const addGroupBy = - ({ - initialGroupByIds = [], - disableMultiGroup = false, - isMultiGroupEvent = isShiftClick, - }: GroupByConfig = {}): TablePlugin< - Item, - GroupByState, - GroupByColumnOptions, - GroupByPropSet - > => - ({ columnOptions }) => { - const disabledGroupIds = Object.entries(columnOptions) - .filter(([, option]) => option.disable === true) - .map(([columnId]) => columnId); + ({ initialGroupByIds = [], disableMultiGroup = false, isMultiGroupEvent = isShiftClick }: GroupByConfig = {}): TablePlugin, GroupByPropSet> => + ({ columnOptions }) => { + const disabledGroupIds = Object.entries(columnOptions) + .filter(([, option]) => option.disable === true) + .map(([columnId]) => columnId) - const groupByIds = arraySetStore(initialGroupByIds); + const groupByIds = arraySetStore(initialGroupByIds) - const repeatCellIds = writable>({}); - const aggregateCellIds = writable>({}); - const groupCellIds = writable>({}); + const repeatCellIds = writable>({}) + const aggregateCellIds = writable>({}) + const groupCellIds = writable>({}) - const pluginState: GroupByState = { - groupByIds, - }; + const pluginState: GroupByState = { + groupByIds + } - const deriveRows: DeriveRowsFn = (rows) => { - return derived([rows, groupByIds], ([$rows, $groupByIds]) => { - const $repeatCellIds = {}; - const $aggregateCellIds = {}; - const $groupCellIds = {}; - const $groupedRows = getGroupedRows($rows, $groupByIds, columnOptions, { - repeatCellIds: $repeatCellIds, - aggregateCellIds: $aggregateCellIds, - groupCellIds: $groupCellIds, - allGroupByIds: $groupByIds, - }); - repeatCellIds.set($repeatCellIds); - aggregateCellIds.set($aggregateCellIds); - groupCellIds.set($groupCellIds); - return $groupedRows; - }); - }; + const deriveRows: DeriveRowsFn = (rows) => { + return derived([rows, groupByIds], ([$rows, $groupByIds]) => { + const $repeatCellIds = {} + const $aggregateCellIds = {} + const $groupCellIds = {} + const $groupedRows = getGroupedRows($rows, $groupByIds, columnOptions, { + repeatCellIds: $repeatCellIds, + aggregateCellIds: $aggregateCellIds, + groupCellIds: $groupCellIds, + allGroupByIds: $groupByIds + }) + repeatCellIds.set($repeatCellIds) + aggregateCellIds.set($aggregateCellIds) + groupCellIds.set($groupCellIds) + return $groupedRows + }) + } - return { - pluginState, - deriveRows, - hooks: { - 'thead.tr.th': (cell) => { - const disabled = disabledGroupIds.includes(cell.id) || !cell.isData(); - const props = derived(groupByIds, ($groupByIds) => { - const grouped = $groupByIds.includes(cell.id); - const toggle = (event: Event) => { - if (!cell.isData()) return; - if (disabled) return; - groupByIds.toggle(cell.id, { - clearOthers: disableMultiGroup || !isMultiGroupEvent(event), - }); - }; - const clear = () => { - groupByIds.remove(cell.id); - }; - return { - grouped, - toggle, - clear, - disabled, - }; - }); - return { props }; - }, - 'tbody.tr.td': (cell) => { - const props: Readable = derived( - [repeatCellIds, aggregateCellIds, groupCellIds], - ([$repeatCellIds, $aggregateCellIds, $groupCellIds]) => { - return { - repeated: $repeatCellIds[cell.rowColId()] === true, - aggregated: $aggregateCellIds[cell.rowColId()] === true, - grouped: $groupCellIds[cell.rowColId()] === true, - }; - } - ); - return { props }; - }, - }, - }; - }; + return { + pluginState, + deriveRows, + hooks: { + 'thead.tr.th': (cell) => { + const disabled = disabledGroupIds.includes(cell.id) || !cell.isData() + const props = derived(groupByIds, ($groupByIds) => { + const grouped = $groupByIds.includes(cell.id) + const toggle = (event: Event) => { + if (!cell.isData()) return + if (disabled) return + groupByIds.toggle(cell.id, { + clearOthers: disableMultiGroup || !isMultiGroupEvent(event) + }) + } + const clear = () => { + groupByIds.remove(cell.id) + } + return { + grouped, + toggle, + clear, + disabled + } + }) + return { props } + }, + 'tbody.tr.td': (cell) => { + const props: Readable = derived([repeatCellIds, aggregateCellIds, groupCellIds], ([$repeatCellIds, $aggregateCellIds, $groupCellIds]) => { + return { + repeated: $repeatCellIds[cell.rowColId()] === true, + aggregated: $aggregateCellIds[cell.rowColId()] === true, + grouped: $groupCellIds[cell.rowColId()] === true + } + }) + return { props } + } + } + } + } diff --git a/src/lib/plugins/addHiddenColumns.ts b/src/lib/plugins/addHiddenColumns.ts index c2e2193..4cabfe0 100644 --- a/src/lib/plugins/addHiddenColumns.ts +++ b/src/lib/plugins/addHiddenColumns.ts @@ -1,37 +1,32 @@ -import type { DeriveFlatColumnsFn, NewTablePropSet, TablePlugin } from '../types/TablePlugin.js'; -import { derived, writable, type Writable } from 'svelte/store'; +import type { DeriveFlatColumnsFn, NewTablePropSet, TablePlugin } from '../types/TablePlugin.js' +import { derived, writable, type Writable } from 'svelte/store' export interface HiddenColumnsConfig { - initialHiddenColumnIds?: string[]; + initialHiddenColumnIds?: string[] } export interface HiddenColumnsState { - hiddenColumnIds: Writable; + hiddenColumnIds: Writable } export const addHiddenColumns = - ({ initialHiddenColumnIds = [] }: HiddenColumnsConfig = {}): TablePlugin< - Item, - HiddenColumnsState, - Record, - NewTablePropSet - > => - () => { - const hiddenColumnIds = writable(initialHiddenColumnIds); + ({ initialHiddenColumnIds = [] }: HiddenColumnsConfig = {}): TablePlugin, NewTablePropSet> => + () => { + const hiddenColumnIds = writable(initialHiddenColumnIds) - const pluginState: HiddenColumnsState = { hiddenColumnIds }; + const pluginState: HiddenColumnsState = { hiddenColumnIds } - const deriveFlatColumns: DeriveFlatColumnsFn = (flatColumns) => { - return derived([flatColumns, hiddenColumnIds], ([$flatColumns, $hiddenColumnIds]) => { - if ($hiddenColumnIds.length === 0) { - return $flatColumns; - } - return $flatColumns.filter((c) => !$hiddenColumnIds.includes(c.id)); - }); - }; + const deriveFlatColumns: DeriveFlatColumnsFn = (flatColumns) => { + return derived([flatColumns, hiddenColumnIds], ([$flatColumns, $hiddenColumnIds]) => { + if ($hiddenColumnIds.length === 0) { + return $flatColumns + } + return $flatColumns.filter((c) => !$hiddenColumnIds.includes(c.id)) + }) + } - return { - pluginState, - deriveFlatColumns, - }; - }; + return { + pluginState, + deriveFlatColumns + } + } diff --git a/src/lib/plugins/addPagination.ts b/src/lib/plugins/addPagination.ts index ddfa315..02c117b 100644 --- a/src/lib/plugins/addPagination.ts +++ b/src/lib/plugins/addPagination.ts @@ -1,146 +1,132 @@ -import type { BodyRow } from '../bodyRows.js'; -import type { DeriveRowsFn, NewTablePropSet, TablePlugin } from '../types/TablePlugin.js'; -import { derived, writable, type Readable, type Updater, type Writable } from 'svelte/store'; +import type { BodyRow } from '../bodyRows.js' +import type { DeriveRowsFn, NewTablePropSet, TablePlugin } from '../types/TablePlugin.js' +import { derived, writable, type Readable, type Updater, type Writable } from 'svelte/store' export type PaginationConfig = { - initialPageIndex?: number; - initialPageSize?: number; + initialPageIndex?: number + initialPageSize?: number } & ( - | { - serverSide?: false | undefined; - serverItemCount?: undefined; - } - | { - serverSide: true; - serverItemCount: Readable; - } -); + | { + serverSide?: false | undefined + serverItemCount?: undefined + } + | { + serverSide: true + serverItemCount: Readable + } +) export interface PaginationState { - pageSize: Writable; - pageIndex: Writable; - pageCount: Readable; - hasPreviousPage: Readable; - hasNextPage: Readable; + pageSize: Writable + pageIndex: Writable + pageCount: Readable + hasPreviousPage: Readable + hasNextPage: Readable } -const MIN_PAGE_SIZE = 1; +const MIN_PAGE_SIZE = 1 -export const createPageStore = ({ - items, - initialPageSize, - initialPageIndex, - serverSide, - serverItemCount, -}: PageStoreConfig) => { - const pageSize = writable(initialPageSize); - const updatePageSize = (fn: Updater) => { - pageSize.update(($pageSize) => { - const newPageSize = fn($pageSize); - return Math.max(newPageSize, MIN_PAGE_SIZE); - }); - }; - const setPageSize = (newPageSize: number) => updatePageSize(() => newPageSize); +export const createPageStore = ({ items, initialPageSize, initialPageIndex, serverSide, serverItemCount }: PageStoreConfig) => { + const pageSize = writable(initialPageSize) + const updatePageSize = (fn: Updater) => { + pageSize.update(($pageSize) => { + const newPageSize = fn($pageSize) + return Math.max(newPageSize, MIN_PAGE_SIZE) + }) + } + const setPageSize = (newPageSize: number) => updatePageSize(() => newPageSize) - const pageIndex = writable(initialPageIndex); + const pageIndex = writable(initialPageIndex) - function calcPageCountAndLimitIndex([$pageSize, $itemCount]: [ - $pageSize: number, - $itemCount: number - ]) { - const $pageCount = Math.ceil($itemCount / $pageSize); - pageIndex.update(($pageIndex) => { - if ($pageCount > 0 && $pageIndex >= $pageCount) { - return $pageCount - 1; - } - return $pageIndex; - }); - return $pageCount; - } + function calcPageCountAndLimitIndex([$pageSize, $itemCount]: [$pageSize: number, $itemCount: number]) { + const $pageCount = Math.ceil($itemCount / $pageSize) + pageIndex.update(($pageIndex) => { + if ($pageCount > 0 && $pageIndex >= $pageCount) { + return $pageCount - 1 + } + return $pageIndex + }) + return $pageCount + } - let pageCount; - if (serverSide && serverItemCount != null) { - pageCount = derived([pageSize, serverItemCount], calcPageCountAndLimitIndex); - } else { - const itemCount = derived(items, ($items) => $items.length); - pageCount = derived([pageSize, itemCount], calcPageCountAndLimitIndex); - } + let pageCount + if (serverSide && serverItemCount != null) { + pageCount = derived([pageSize, serverItemCount], calcPageCountAndLimitIndex) + } else { + const itemCount = derived(items, ($items) => $items.length) + pageCount = derived([pageSize, itemCount], calcPageCountAndLimitIndex) + } - const hasPreviousPage = derived(pageIndex, ($pageIndex) => { - return $pageIndex > 0; - }); - const hasNextPage = derived([pageIndex, pageCount], ([$pageIndex, $pageCount]) => { - return $pageIndex < $pageCount - 1; - }); + const hasPreviousPage = derived(pageIndex, ($pageIndex) => { + return $pageIndex > 0 + }) + const hasNextPage = derived([pageIndex, pageCount], ([$pageIndex, $pageCount]) => { + return $pageIndex < $pageCount - 1 + }) - return { - pageSize: { - subscribe: pageSize.subscribe, - update: updatePageSize, - set: setPageSize, - }, - pageIndex, - pageCount, - serverItemCount, - hasPreviousPage, - hasNextPage, - }; -}; + return { + pageSize: { + subscribe: pageSize.subscribe, + update: updatePageSize, + set: setPageSize + }, + pageIndex, + pageCount, + serverItemCount, + hasPreviousPage, + hasNextPage + } +} export interface PageStoreConfig { - items: Readable; - initialPageSize?: number; - initialPageIndex?: number; - serverSide?: boolean; - serverItemCount?: Readable; + items: Readable + initialPageSize?: number + initialPageIndex?: number + serverSide?: boolean + serverItemCount?: Readable } export const addPagination = - ({ - initialPageIndex = 0, - initialPageSize = 10, - serverSide = false, - serverItemCount, - }: PaginationConfig = {}): TablePlugin< - Item, - PaginationState, - Record, - NewTablePropSet - > => - () => { - const prePaginatedRows = writable[]>([]); - const paginatedRows = writable[]>([]); - const { pageSize, pageIndex, pageCount, hasPreviousPage, hasNextPage } = createPageStore({ - items: prePaginatedRows, - initialPageIndex, - initialPageSize, - serverSide, - serverItemCount, - }); - const pluginState: PaginationState = { - pageSize, - pageIndex, - pageCount, - hasPreviousPage, - hasNextPage, - }; + ({ initialPageIndex = 0, initialPageSize = 10, serverSide = false, serverItemCount }: PaginationConfig = {}): TablePlugin< + Item, + PaginationState, + Record, + NewTablePropSet + > => + () => { + const prePaginatedRows = writable[]>([]) + const paginatedRows = writable[]>([]) + const { pageSize, pageIndex, pageCount, hasPreviousPage, hasNextPage } = createPageStore({ + items: prePaginatedRows, + initialPageIndex, + initialPageSize, + serverSide, + serverItemCount + }) + const pluginState: PaginationState = { + pageSize, + pageIndex, + pageCount, + hasPreviousPage, + hasNextPage + } - const derivePageRows: DeriveRowsFn = (rows) => { - return derived([rows, pageSize, pageIndex], ([$rows, $pageSize, $pageIndex]) => { - prePaginatedRows.set($rows); - if (serverSide) { - paginatedRows.set($rows); - return $rows; - } - const startIdx = $pageIndex * $pageSize; - const _paginatedRows = $rows.slice(startIdx, startIdx + $pageSize); - paginatedRows.set(_paginatedRows); - return _paginatedRows; - }); - }; + const derivePageRows: DeriveRowsFn = (rows) => { + return derived([rows, pageSize, pageIndex], ([$rows, $pageSize, $pageIndex]) => { + prePaginatedRows.set($rows) + if (serverSide) { + paginatedRows.set($rows) + return $rows + } + const startIdx = $pageIndex * $pageSize + const _paginatedRows = $rows.slice(startIdx, startIdx + $pageSize) + paginatedRows.set(_paginatedRows) + return _paginatedRows + }) + } - return { - pluginState, - derivePageRows, - }; - }; + return { + pluginState, + derivePageRows + } + } diff --git a/src/lib/plugins/addResizedColumns.ts b/src/lib/plugins/addResizedColumns.ts index 8e51385..7bdbffc 100644 --- a/src/lib/plugins/addResizedColumns.ts +++ b/src/lib/plugins/addResizedColumns.ts @@ -1,313 +1,299 @@ -import type { HeaderCell } from '../headerCells.js'; -import type { NewTableAttributeSet, NewTablePropSet, TablePlugin } from '../types/TablePlugin.js'; -import { sum } from '../utils/math.js'; -import { keyed } from 'svelte-keyed'; -import { derived, writable, type Writable } from 'svelte/store'; +import type { HeaderCell } from '../headerCells.js' +import type { NewTableAttributeSet, NewTablePropSet, TablePlugin } from '../types/TablePlugin.js' +import { sum } from '../utils/math.js' +import { keyed } from 'svelte-keyed' +import { derived, writable, type Writable } from 'svelte/store' export interface AddResizedColumnsConfig { - onResizeEnd?: (ev: Event) => void; + onResizeEnd?: (ev: Event) => void } export type ResizedColumnsState = { - columnWidths: Writable>; -}; + columnWidths: Writable> +} export type ResizedColumnsColumnOptions = { - initialWidth?: number; - minWidth?: number; - maxWidth?: number; - disable?: boolean; -}; + initialWidth?: number + minWidth?: number + maxWidth?: number + disable?: boolean +} export type ResizedColumnsPropSet = NewTablePropSet<{ - 'thead.tr.th': { - (node: Element): void; - drag: (node: Element) => void; - reset: (node: Element) => void; - disabled: boolean; - }; -}>; + 'thead.tr.th': { + (node: Element): void + drag: (node: Element) => void + reset: (node: Element) => void + disabled: boolean + } +}> export type ResizedColumnsAttributeSet = NewTableAttributeSet<{ - 'thead.tr.th': { - style?: { - width: string; - 'min-width': string; - 'max-width': string; - 'box-sizing': 'border-box'; - }; - }; - 'tbody.tr.td': { - style?: { - width: string; - 'min-width': string; - 'max-width': string; - 'box-sizing': 'border-box'; - }; - }; -}>; + 'thead.tr.th': { + style?: { + width: string + 'min-width': string + 'max-width': string + 'box-sizing': 'border-box' + } + } + 'tbody.tr.td': { + style?: { + width: string + 'min-width': string + 'max-width': string + 'box-sizing': 'border-box' + } + } +}> const getDragXPos = (event: Event): number => { - if (event instanceof MouseEvent) return event.clientX; - if (event instanceof TouchEvent) return event.targetTouches[0].pageX; - return 0; -}; + if (event instanceof MouseEvent) return event.clientX + if (event instanceof TouchEvent) return event.targetTouches[0].pageX + return 0 +} // eslint-disable-next-line @typescript-eslint/no-explicit-any const isCellDisabled = (cell: HeaderCell, disabledIds: string[]) => { - if (disabledIds.includes(cell.id)) return true; - if (cell.isGroup() && cell.ids.every((id) => disabledIds.includes(id))) { - return true; - } - return false; -}; + if (disabledIds.includes(cell.id)) return true + if (cell.isGroup() && cell.ids.every((id) => disabledIds.includes(id))) { + return true + } + return false +} type ColumnsWidthState = { - current: Record; - start: Record; -}; + current: Record + start: Record +} export const addResizedColumns = - ({ onResizeEnd }: AddResizedColumnsConfig = {}): TablePlugin< - Item, - ResizedColumnsState, - ResizedColumnsColumnOptions, - ResizedColumnsPropSet, - ResizedColumnsAttributeSet - > => - ({ columnOptions }) => { - const disabledResizeIds = Object.entries(columnOptions) - .filter(([, option]) => option.disable === true) - .map(([columnId]) => columnId); + ({ onResizeEnd }: AddResizedColumnsConfig = {}): TablePlugin => + ({ columnOptions }) => { + const disabledResizeIds = Object.entries(columnOptions) + .filter(([, option]) => option.disable === true) + .map(([columnId]) => columnId) - const initialWidths = Object.fromEntries( - Object.entries(columnOptions) - .filter(([, option]) => option.initialWidth !== undefined) - .map(([columnId, { initialWidth }]) => [columnId, initialWidth as number]) - ); + const initialWidths = Object.fromEntries( + Object.entries(columnOptions) + .filter(([, option]) => option.initialWidth !== undefined) + .map(([columnId, { initialWidth }]) => [columnId, initialWidth as number]) + ) - const columnsWidthState = writable({ - current: initialWidths, - start: {}, - }); - const columnWidths = keyed(columnsWidthState, 'current'); + const columnsWidthState = writable({ + current: initialWidths, + start: {} + }) + const columnWidths = keyed(columnsWidthState, 'current') - const pluginState = { columnWidths }; + const pluginState = { columnWidths } - const dragStartXPosForId: Record = {}; - const nodeForId: Record = {}; + const dragStartXPosForId: Record = {} + const nodeForId: Record = {} - return { - pluginState, - hooks: { - 'thead.tr.th': (cell) => { - const dblClick = (event: Event) => { - if (isCellDisabled(cell, disabledResizeIds)) return; - const { target } = event; - if (target === null) return; - event.stopPropagation(); - event.preventDefault(); - if (cell.isGroup()) { - cell.ids.forEach((id) => { - const node = nodeForId[id]; - if (node !== undefined) { - columnWidths.update(($columnWidths) => ({ - ...$columnWidths, - [id]: initialWidths[id], - })); - } - }); - } else { - const node = nodeForId[cell.id]; - if (node !== undefined) { - columnWidths.update(($columnWidths) => ({ - ...$columnWidths, - [cell.id]: initialWidths[cell.id], - })); - } - } - }; - let tapedTwice = false; - const checkDoubleTap = (event: Event) => { - if (!tapedTwice) { - tapedTwice = true; - setTimeout(function () { - tapedTwice = false; - }, 300); - return false; - } - event.preventDefault(); - dblClick(event); - }; - const dragStart = (event: Event) => { - if (isCellDisabled(cell, disabledResizeIds)) return; - const { target } = event; - if (target === null) return; - event.stopPropagation(); - event.preventDefault(); - dragStartXPosForId[cell.id] = getDragXPos(event); - columnsWidthState.update(($columnsWidthState) => { - const $updatedState = { - ...$columnsWidthState, - start: { ...$columnsWidthState.start }, - }; - if (cell.isGroup()) { - cell.ids.forEach((id) => { - $updatedState.start[id] = $columnsWidthState.current[id]; - }); - } else { - $updatedState.start[cell.id] = $columnsWidthState.current[cell.id]; - } - return $updatedState; - }); - if (event instanceof MouseEvent) { - window.addEventListener('mousemove', dragMove); - window.addEventListener('mouseup', dragEnd); - } else { - window.addEventListener('touchmove', dragMove); - window.addEventListener('touchend', dragEnd); - } - }; - const dragMove = (event: Event) => { - event.stopPropagation(); - event.preventDefault(); - const deltaWidth = getDragXPos(event) - dragStartXPosForId[cell.id]; - columnsWidthState.update(($columnsWidthState) => { - const $updatedState = { - ...$columnsWidthState, - current: { ...$columnsWidthState.current }, - }; - if (cell.isGroup()) { - const enabledIds = cell.ids.filter((id) => !disabledResizeIds.includes(id)); - const totalStartWidth = sum(enabledIds.map((id) => $columnsWidthState.start[id])); - enabledIds.forEach((id) => { - const startWidth = $columnsWidthState.start[id]; - if (startWidth !== undefined) { - $updatedState.current[id] = Math.max( - 0, - startWidth + deltaWidth * (startWidth / totalStartWidth) - ); - } - }); - } else { - const startWidth = $columnsWidthState.start[cell.id]; - const { minWidth = 0, maxWidth } = columnOptions[cell.id] ?? {}; - if (startWidth !== undefined) { - $updatedState.current[cell.id] = Math.min( - Math.max(minWidth, startWidth + deltaWidth), - ...(maxWidth === undefined ? [] : [maxWidth]) - ); - } - } - return $updatedState; - }); - }; - const dragEnd = (event: Event) => { - event.stopPropagation(); - event.preventDefault(); - if (cell.isGroup()) { - cell.ids.forEach((id) => { - const node = nodeForId[id]; - if (node !== undefined) { - columnWidths.update(($columnWidths) => ({ - ...$columnWidths, - [id]: node.getBoundingClientRect().width, - })); - } - }); - } else { - const node = nodeForId[cell.id]; - if (node !== undefined) { - columnWidths.update(($columnWidths) => ({ - ...$columnWidths, - [cell.id]: node.getBoundingClientRect().width, - })); - } - } - onResizeEnd?.(event); - if (event instanceof MouseEvent) { - window.removeEventListener('mousemove', dragMove); - window.removeEventListener('mouseup', dragEnd); - } else { - window.removeEventListener('touchmove', dragMove); - window.removeEventListener('touchend', dragEnd); - } - }; - const $props = (node: Element) => { - nodeForId[cell.id] = node; - if (cell.isFlat()) { - columnWidths.update(($columnWidths) => ({ - ...$columnWidths, - [cell.id]: node.getBoundingClientRect().width, - })); - } - return { - destroy() { - delete nodeForId[cell.id]; - }, - }; - }; - $props.drag = (node: Element) => { - node.addEventListener('mousedown', dragStart); - node.addEventListener('touchstart', dragStart); - return { - destroy() { - node.removeEventListener('mousedown', dragStart); - node.removeEventListener('touchstart', dragStart); - }, - }; - }; - $props.reset = (node: Element) => { - node.addEventListener('dblclick', dblClick); - node.addEventListener('touchend', checkDoubleTap); - return { - destroy() { - node.removeEventListener('dblckick', dblClick); - node.removeEventListener('touchend', checkDoubleTap); - }, - }; - }; - $props.disabled = isCellDisabled(cell, disabledResizeIds); - const props = derived([], () => { - return $props; - }); - const attrs = derived(columnWidths, ($columnWidths) => { - const width = cell.isGroup() - ? sum(cell.ids.map((id) => $columnWidths[id])) - : $columnWidths[cell.id]; - if (width === undefined) { - return {}; - } - const widthPx = `${width}px`; - return { - style: { - width: widthPx, - 'min-width': widthPx, - 'max-width': widthPx, - 'box-sizing': 'border-box' as const, - }, - }; - }); - return { props, attrs }; - }, - 'tbody.tr.td': (cell) => { - const attrs = derived(columnWidths, ($columnWidths) => { - const width = $columnWidths[cell.id]; - if (width === undefined) { - return {}; - } - const widthPx = `${width}px`; - return { - style: { - width: widthPx, - 'min-width': widthPx, - 'max-width': widthPx, - 'box-sizing': 'border-box' as const, - }, - }; - }); - return { attrs }; - }, - }, - }; - }; + return { + pluginState, + hooks: { + 'thead.tr.th': (cell) => { + const dblClick = (event: Event) => { + if (isCellDisabled(cell, disabledResizeIds)) return + const { target } = event + if (target === null) return + event.stopPropagation() + event.preventDefault() + if (cell.isGroup()) { + cell.ids.forEach((id) => { + const node = nodeForId[id] + if (node !== undefined) { + columnWidths.update(($columnWidths) => ({ + ...$columnWidths, + [id]: initialWidths[id] + })) + } + }) + } else { + const node = nodeForId[cell.id] + if (node !== undefined) { + columnWidths.update(($columnWidths) => ({ + ...$columnWidths, + [cell.id]: initialWidths[cell.id] + })) + } + } + } + let tapedTwice = false + const checkDoubleTap = (event: Event) => { + if (!tapedTwice) { + tapedTwice = true + setTimeout(function () { + tapedTwice = false + }, 300) + return false + } + event.preventDefault() + dblClick(event) + } + const dragStart = (event: Event) => { + if (isCellDisabled(cell, disabledResizeIds)) return + const { target } = event + if (target === null) return + event.stopPropagation() + event.preventDefault() + dragStartXPosForId[cell.id] = getDragXPos(event) + columnsWidthState.update(($columnsWidthState) => { + const $updatedState = { + ...$columnsWidthState, + start: { ...$columnsWidthState.start } + } + if (cell.isGroup()) { + cell.ids.forEach((id) => { + $updatedState.start[id] = $columnsWidthState.current[id] + }) + } else { + $updatedState.start[cell.id] = $columnsWidthState.current[cell.id] + } + return $updatedState + }) + if (event instanceof MouseEvent) { + window.addEventListener('mousemove', dragMove) + window.addEventListener('mouseup', dragEnd) + } else { + window.addEventListener('touchmove', dragMove) + window.addEventListener('touchend', dragEnd) + } + } + const dragMove = (event: Event) => { + event.stopPropagation() + event.preventDefault() + const deltaWidth = getDragXPos(event) - dragStartXPosForId[cell.id] + columnsWidthState.update(($columnsWidthState) => { + const $updatedState = { + ...$columnsWidthState, + current: { ...$columnsWidthState.current } + } + if (cell.isGroup()) { + const enabledIds = cell.ids.filter((id) => !disabledResizeIds.includes(id)) + const totalStartWidth = sum(enabledIds.map((id) => $columnsWidthState.start[id])) + enabledIds.forEach((id) => { + const startWidth = $columnsWidthState.start[id] + if (startWidth !== undefined) { + $updatedState.current[id] = Math.max(0, startWidth + deltaWidth * (startWidth / totalStartWidth)) + } + }) + } else { + const startWidth = $columnsWidthState.start[cell.id] + const { minWidth = 0, maxWidth } = columnOptions[cell.id] ?? {} + if (startWidth !== undefined) { + $updatedState.current[cell.id] = Math.min(Math.max(minWidth, startWidth + deltaWidth), ...(maxWidth === undefined ? [] : [maxWidth])) + } + } + return $updatedState + }) + } + const dragEnd = (event: Event) => { + event.stopPropagation() + event.preventDefault() + if (cell.isGroup()) { + cell.ids.forEach((id) => { + const node = nodeForId[id] + if (node !== undefined) { + columnWidths.update(($columnWidths) => ({ + ...$columnWidths, + [id]: node.getBoundingClientRect().width + })) + } + }) + } else { + const node = nodeForId[cell.id] + if (node !== undefined) { + columnWidths.update(($columnWidths) => ({ + ...$columnWidths, + [cell.id]: node.getBoundingClientRect().width + })) + } + } + onResizeEnd?.(event) + if (event instanceof MouseEvent) { + window.removeEventListener('mousemove', dragMove) + window.removeEventListener('mouseup', dragEnd) + } else { + window.removeEventListener('touchmove', dragMove) + window.removeEventListener('touchend', dragEnd) + } + } + const $props = (node: Element) => { + nodeForId[cell.id] = node + if (cell.isFlat()) { + columnWidths.update(($columnWidths) => ({ + ...$columnWidths, + [cell.id]: node.getBoundingClientRect().width + })) + } + return { + destroy() { + delete nodeForId[cell.id] + } + } + } + $props.drag = (node: Element) => { + node.addEventListener('mousedown', dragStart) + node.addEventListener('touchstart', dragStart) + return { + destroy() { + node.removeEventListener('mousedown', dragStart) + node.removeEventListener('touchstart', dragStart) + } + } + } + $props.reset = (node: Element) => { + node.addEventListener('dblclick', dblClick) + node.addEventListener('touchend', checkDoubleTap) + return { + destroy() { + node.removeEventListener('dblckick', dblClick) + node.removeEventListener('touchend', checkDoubleTap) + } + } + } + $props.disabled = isCellDisabled(cell, disabledResizeIds) + const props = derived([], () => { + return $props + }) + const attrs = derived(columnWidths, ($columnWidths) => { + const width = cell.isGroup() ? sum(cell.ids.map((id) => $columnWidths[id])) : $columnWidths[cell.id] + if (width === undefined) { + return {} + } + const widthPx = `${width}px` + return { + style: { + width: widthPx, + 'min-width': widthPx, + 'max-width': widthPx, + 'box-sizing': 'border-box' as const + } + } + }) + return { props, attrs } + }, + 'tbody.tr.td': (cell) => { + const attrs = derived(columnWidths, ($columnWidths) => { + const width = $columnWidths[cell.id] + if (width === undefined) { + return {} + } + const widthPx = `${width}px` + return { + style: { + width: widthPx, + 'min-width': widthPx, + 'max-width': widthPx, + 'box-sizing': 'border-box' as const + } + } + }) + return { attrs } + } + } + } + } diff --git a/src/lib/plugins/addSelectedRows.test.ts b/src/lib/plugins/addSelectedRows.test.ts index 02abea9..bb96c07 100644 --- a/src/lib/plugins/addSelectedRows.test.ts +++ b/src/lib/plugins/addSelectedRows.test.ts @@ -1,435 +1,411 @@ /* eslint-disable @typescript-eslint/no-non-null-assertion */ -import { createTable } from '../createTable.js'; -import type { Sample } from '../../routes/_createSamples.js'; -import { derived, get, readable } from 'svelte/store'; -import { addSelectedRows } from './addSelectedRows.js'; -import { addSubRows } from './addSubRows.js'; -import { addPagination } from './addPagination.js'; +import { createTable } from '../createTable.js' +import type { Sample } from '../../routes/_createSamples.js' +import { derived, get, readable } from 'svelte/store' +import { addSelectedRows } from './addSelectedRows.js' +import { addSubRows } from './addSubRows.js' +import { addPagination } from './addPagination.js' const data = readable([ - { - firstName: 'Adam', - lastName: 'Lee', - age: 30, - progress: 30, - status: 'single', - visits: 5, - children: [ - { - firstName: 'Allie', - lastName: 'Lee', - age: 30, - progress: 30, - status: 'single', - visits: 5, - children: [ - { - firstName: 'Aria', - lastName: 'Lee', - age: 30, - progress: 30, - status: 'single', - visits: 5, - }, - ], - }, - { firstName: 'Amy', lastName: 'Lee', age: 30, progress: 30, status: 'single', visits: 5 }, - ], - }, - { - firstName: 'Bryan', - lastName: 'Lee', - age: 30, - progress: 30, - status: 'single', - visits: 5, - children: [ - { firstName: 'Ben', lastName: 'Lee', age: 30, progress: 30, status: 'single', visits: 5 }, - { firstName: 'Beth', lastName: 'Lee', age: 30, progress: 30, status: 'single', visits: 5 }, - ], - }, - { - firstName: 'Charlie', - lastName: 'Puth', - age: 30, - progress: 30, - status: 'single', - visits: 5, - children: [ - { firstName: 'Cory', lastName: 'Puth', age: 30, progress: 30, status: 'single', visits: 5 }, - { - firstName: 'Carmen', - lastName: 'Puth', - age: 30, - progress: 30, - status: 'single', - visits: 5, - }, - ], - }, - { firstName: 'Danny', lastName: 'Lee', age: 40, progress: 40, status: 'single', visits: 5 }, - { firstName: 'Elliot', lastName: 'Page', age: 40, progress: 40, status: 'single', visits: 5 }, -]); + { + firstName: 'Adam', + lastName: 'Lee', + age: 30, + progress: 30, + status: 'single', + visits: 5, + children: [ + { + firstName: 'Allie', + lastName: 'Lee', + age: 30, + progress: 30, + status: 'single', + visits: 5, + children: [ + { + firstName: 'Aria', + lastName: 'Lee', + age: 30, + progress: 30, + status: 'single', + visits: 5 + } + ] + }, + { firstName: 'Amy', lastName: 'Lee', age: 30, progress: 30, status: 'single', visits: 5 } + ] + }, + { + firstName: 'Bryan', + lastName: 'Lee', + age: 30, + progress: 30, + status: 'single', + visits: 5, + children: [ + { firstName: 'Ben', lastName: 'Lee', age: 30, progress: 30, status: 'single', visits: 5 }, + { firstName: 'Beth', lastName: 'Lee', age: 30, progress: 30, status: 'single', visits: 5 } + ] + }, + { + firstName: 'Charlie', + lastName: 'Puth', + age: 30, + progress: 30, + status: 'single', + visits: 5, + children: [ + { firstName: 'Cory', lastName: 'Puth', age: 30, progress: 30, status: 'single', visits: 5 }, + { + firstName: 'Carmen', + lastName: 'Puth', + age: 30, + progress: 30, + status: 'single', + visits: 5 + } + ] + }, + { firstName: 'Danny', lastName: 'Lee', age: 40, progress: 40, status: 'single', visits: 5 }, + { firstName: 'Elliot', lastName: 'Page', age: 40, progress: 40, status: 'single', visits: 5 } +]) test('basic row selection', () => { - const table = createTable(data, { - sub: addSubRows({ - children: 'children', - }), - select: addSelectedRows(), - }); - const columns = table.createColumns([ - table.display({ - id: 'selected', - header: (_, { pluginStates }) => { - const { allRowsSelected, someRowsSelected } = pluginStates.select; - return derived([allRowsSelected, someRowsSelected], ([$all, $some]) => { - return `all: ${$all}, some: ${$some}`; - }); - }, - cell: ({ row }, { pluginStates }) => { - const { isSelected, isSomeSubRowsSelected, isAllSubRowsSelected } = - pluginStates.select.getRowState(row); - return derived( - [isSelected, isSomeSubRowsSelected, isAllSubRowsSelected], - ([$selected, $someSubRowsSelected, $allSubRowsSelected]) => { - return `selected: ${$selected}, some subrows: ${$someSubRowsSelected}, all subrows: ${$allSubRowsSelected}`; - } - ); - }, - }), - table.column({ - header: 'First Name', - accessor: 'firstName', - }), - ]); - const vm = table.createViewModel(columns); - const rows = get(vm.rows); - const row0 = rows[0].isData() ? rows[0] : undefined; - expect(row0).not.toBeUndefined(); - - let row0Props = get(row0!.props()); - expect(row0Props.select.selected).toBe(false); - - const { selectedDataIds } = vm.pluginStates.select; - selectedDataIds.add('0'); - - row0Props = get(row0!.props()); - expect(row0Props.select.selected).toBe(true); -}); + const table = createTable(data, { + sub: addSubRows({ + children: 'children' + }), + select: addSelectedRows() + }) + const columns = table.createColumns([ + table.display({ + id: 'selected', + header: (_, { pluginStates }) => { + const { allRowsSelected, someRowsSelected } = pluginStates.select + return derived([allRowsSelected, someRowsSelected], ([$all, $some]) => { + return `all: ${$all}, some: ${$some}` + }) + }, + cell: ({ row }, { pluginStates }) => { + const { isSelected, isSomeSubRowsSelected, isAllSubRowsSelected } = pluginStates.select.getRowState(row) + return derived([isSelected, isSomeSubRowsSelected, isAllSubRowsSelected], ([$selected, $someSubRowsSelected, $allSubRowsSelected]) => { + return `selected: ${$selected}, some subrows: ${$someSubRowsSelected}, all subrows: ${$allSubRowsSelected}` + }) + } + }), + table.column({ + header: 'First Name', + accessor: 'firstName' + }) + ]) + const vm = table.createViewModel(columns) + const rows = get(vm.rows) + const row0 = rows[0].isData() ? rows[0] : undefined + expect(row0).not.toBeUndefined() + + let row0Props = get(row0!.props()) + expect(row0Props.select.selected).toBe(false) + + const { selectedDataIds } = vm.pluginStates.select + selectedDataIds.add('0') + + row0Props = get(row0!.props()) + expect(row0Props.select.selected).toBe(true) +}) test('linked data sub rows selection', () => { - const table = createTable(data, { - sub: addSubRows({ - children: 'children', - }), - select: addSelectedRows({ - linkDataSubRows: true, - }), - }); - const columns = table.createColumns([ - table.display({ - id: 'selected', - header: (_, { pluginStates }) => { - const { allRowsSelected, someRowsSelected } = pluginStates.select; - return derived([allRowsSelected, someRowsSelected], ([$all, $some]) => { - return `all: ${$all}, some: ${$some}`; - }); - }, - cell: ({ row }, { pluginStates }) => { - const { isSelected, isSomeSubRowsSelected, isAllSubRowsSelected } = - pluginStates.select.getRowState(row); - return derived( - [isSelected, isSomeSubRowsSelected, isAllSubRowsSelected], - ([$selected, $someSubRowsSelected, $allSubRowsSelected]) => { - return `selected: ${$selected}, some subrows: ${$someSubRowsSelected}, all subrows: ${$allSubRowsSelected}`; - } - ); - }, - }), - table.column({ - header: 'First Name', - accessor: 'firstName', - }), - ]); - const vm = table.createViewModel(columns); - const rows = get(vm.rows); - const row0 = rows[0].isData() ? rows[0] : undefined; - expect(row0).not.toBeUndefined(); - - let row0Props = get(row0!.props()); - expect(row0Props.select.selected).toBe(false); - expect(row0Props.select.allSubRowsSelected).toBe(false); - expect(row0Props.select.someSubRowsSelected).toBe(false); - - const { selectedDataIds } = vm.pluginStates.select; - selectedDataIds.add('0'); - - row0Props = get(row0!.props()); - expect(row0Props.select.selected).toBe(true); - - row0Props = get(row0!.props()); - expect(row0Props.select.selected).toBe(true); - expect(row0Props.select.allSubRowsSelected).toBe(false); - expect(row0Props.select.someSubRowsSelected).toBe(false); - - selectedDataIds.add('0>0>0'); - - row0Props = get(row0!.props()); - expect(row0Props.select.selected).toBe(true); - expect(row0Props.select.allSubRowsSelected).toBe(false); - expect(row0Props.select.someSubRowsSelected).toBe(true); - - selectedDataIds.add('0>1'); - - row0Props = get(row0!.props()); - expect(row0Props.select.selected).toBe(true); - expect(row0Props.select.allSubRowsSelected).toBe(true); - expect(row0Props.select.someSubRowsSelected).toBe(true); -}); + const table = createTable(data, { + sub: addSubRows({ + children: 'children' + }), + select: addSelectedRows({ + linkDataSubRows: true + }) + }) + const columns = table.createColumns([ + table.display({ + id: 'selected', + header: (_, { pluginStates }) => { + const { allRowsSelected, someRowsSelected } = pluginStates.select + return derived([allRowsSelected, someRowsSelected], ([$all, $some]) => { + return `all: ${$all}, some: ${$some}` + }) + }, + cell: ({ row }, { pluginStates }) => { + const { isSelected, isSomeSubRowsSelected, isAllSubRowsSelected } = pluginStates.select.getRowState(row) + return derived([isSelected, isSomeSubRowsSelected, isAllSubRowsSelected], ([$selected, $someSubRowsSelected, $allSubRowsSelected]) => { + return `selected: ${$selected}, some subrows: ${$someSubRowsSelected}, all subrows: ${$allSubRowsSelected}` + }) + } + }), + table.column({ + header: 'First Name', + accessor: 'firstName' + }) + ]) + const vm = table.createViewModel(columns) + const rows = get(vm.rows) + const row0 = rows[0].isData() ? rows[0] : undefined + expect(row0).not.toBeUndefined() + + let row0Props = get(row0!.props()) + expect(row0Props.select.selected).toBe(false) + expect(row0Props.select.allSubRowsSelected).toBe(false) + expect(row0Props.select.someSubRowsSelected).toBe(false) + + const { selectedDataIds } = vm.pluginStates.select + selectedDataIds.add('0') + + row0Props = get(row0!.props()) + expect(row0Props.select.selected).toBe(true) + + row0Props = get(row0!.props()) + expect(row0Props.select.selected).toBe(true) + expect(row0Props.select.allSubRowsSelected).toBe(false) + expect(row0Props.select.someSubRowsSelected).toBe(false) + + selectedDataIds.add('0>0>0') + + row0Props = get(row0!.props()) + expect(row0Props.select.selected).toBe(true) + expect(row0Props.select.allSubRowsSelected).toBe(false) + expect(row0Props.select.someSubRowsSelected).toBe(true) + + selectedDataIds.add('0>1') + + row0Props = get(row0!.props()) + expect(row0Props.select.selected).toBe(true) + expect(row0Props.select.allSubRowsSelected).toBe(true) + expect(row0Props.select.someSubRowsSelected).toBe(true) +}) test('reading rows selected store', () => { - const table = createTable(data, { - sub: addSubRows({ - children: 'children', - }), - select: addSelectedRows(), - }); - const columns = table.createColumns([ - table.display({ - id: 'selected', - header: (_, { pluginStates }) => { - const { allRowsSelected, someRowsSelected } = pluginStates.select; - return derived([allRowsSelected, someRowsSelected], ([$all, $some]) => { - return `all: ${$all}, some: ${$some}`; - }); - }, - cell: ({ row }, { pluginStates }) => { - const { isSelected, isSomeSubRowsSelected, isAllSubRowsSelected } = - pluginStates.select.getRowState(row); - return derived( - [isSelected, isSomeSubRowsSelected, isAllSubRowsSelected], - ([$selected, $someSubRowsSelected, $allSubRowsSelected]) => { - return `selected: ${$selected}, some subrows: ${$someSubRowsSelected}, all subrows: ${$allSubRowsSelected}`; - } - ); - }, - }), - table.column({ - header: 'First Name', - accessor: 'firstName', - }), - ]); - const vm = table.createViewModel(columns); - const { selectedDataIds, allRowsSelected, someRowsSelected } = vm.pluginStates.select; - - // Populate `tableState.rows` by subscribing to `vm.rows` and running all row - // derivation functions. - get(vm.rows); - selectedDataIds.add('0'); - - expect(get(someRowsSelected)).toBe(true); - expect(get(allRowsSelected)).toBe(false); - - get(vm.rows); - selectedDataIds.addAll(['0>0', '0>0>0', '0>1', '1', '1>0', '1>1', '2', '2>0', '2>1', '3', '4']); - - expect(get(someRowsSelected)).toBe(true); - expect(get(allRowsSelected)).toBe(true); - - get(vm.rows); - selectedDataIds.remove('0'); - - expect(get(someRowsSelected)).toBe(true); - expect(get(allRowsSelected)).toBe(false); - - get(vm.rows); - selectedDataIds.clear(); - - expect(get(someRowsSelected)).toBe(false); - expect(get(allRowsSelected)).toBe(false); -}); + const table = createTable(data, { + sub: addSubRows({ + children: 'children' + }), + select: addSelectedRows() + }) + const columns = table.createColumns([ + table.display({ + id: 'selected', + header: (_, { pluginStates }) => { + const { allRowsSelected, someRowsSelected } = pluginStates.select + return derived([allRowsSelected, someRowsSelected], ([$all, $some]) => { + return `all: ${$all}, some: ${$some}` + }) + }, + cell: ({ row }, { pluginStates }) => { + const { isSelected, isSomeSubRowsSelected, isAllSubRowsSelected } = pluginStates.select.getRowState(row) + return derived([isSelected, isSomeSubRowsSelected, isAllSubRowsSelected], ([$selected, $someSubRowsSelected, $allSubRowsSelected]) => { + return `selected: ${$selected}, some subrows: ${$someSubRowsSelected}, all subrows: ${$allSubRowsSelected}` + }) + } + }), + table.column({ + header: 'First Name', + accessor: 'firstName' + }) + ]) + const vm = table.createViewModel(columns) + const { selectedDataIds, allRowsSelected, someRowsSelected } = vm.pluginStates.select + + // Populate `tableState.rows` by subscribing to `vm.rows` and running all row + // derivation functions. + get(vm.rows) + selectedDataIds.add('0') + + expect(get(someRowsSelected)).toBe(true) + expect(get(allRowsSelected)).toBe(false) + + get(vm.rows) + selectedDataIds.addAll(['0>0', '0>0>0', '0>1', '1', '1>0', '1>1', '2', '2>0', '2>1', '3', '4']) + + expect(get(someRowsSelected)).toBe(true) + expect(get(allRowsSelected)).toBe(true) + + get(vm.rows) + selectedDataIds.remove('0') + + expect(get(someRowsSelected)).toBe(true) + expect(get(allRowsSelected)).toBe(false) + + get(vm.rows) + selectedDataIds.clear() + + expect(get(someRowsSelected)).toBe(false) + expect(get(allRowsSelected)).toBe(false) +}) test('updating all rows selected store', () => { - const table = createTable(data, { - sub: addSubRows({ - children: 'children', - }), - select: addSelectedRows(), - }); - const columns = table.createColumns([ - table.display({ - id: 'selected', - header: (_, { pluginStates }) => { - const { allRowsSelected, someRowsSelected } = pluginStates.select; - return derived([allRowsSelected, someRowsSelected], ([$all, $some]) => { - return `all: ${$all}, some: ${$some}`; - }); - }, - cell: ({ row }, { pluginStates }) => { - const { isSelected, isSomeSubRowsSelected, isAllSubRowsSelected } = - pluginStates.select.getRowState(row); - return derived( - [isSelected, isSomeSubRowsSelected, isAllSubRowsSelected], - ([$selected, $someSubRowsSelected, $allSubRowsSelected]) => { - return `selected: ${$selected}, some subrows: ${$someSubRowsSelected}, all subrows: ${$allSubRowsSelected}`; - } - ); - }, - }), - table.column({ - header: 'First Name', - accessor: 'firstName', - }), - ]); - const vm = table.createViewModel(columns); - const { selectedDataIds, allRowsSelected } = vm.pluginStates.select; - - get(vm.rows); - allRowsSelected.set(true); - - expect(get(selectedDataIds)).toEqual({ - '0': true, - '1': true, - '2': true, - '3': true, - '4': true, - }); - - get(vm.rows); - allRowsSelected.set(false); - - expect(get(selectedDataIds)).toEqual({}); -}); + const table = createTable(data, { + sub: addSubRows({ + children: 'children' + }), + select: addSelectedRows() + }) + const columns = table.createColumns([ + table.display({ + id: 'selected', + header: (_, { pluginStates }) => { + const { allRowsSelected, someRowsSelected } = pluginStates.select + return derived([allRowsSelected, someRowsSelected], ([$all, $some]) => { + return `all: ${$all}, some: ${$some}` + }) + }, + cell: ({ row }, { pluginStates }) => { + const { isSelected, isSomeSubRowsSelected, isAllSubRowsSelected } = pluginStates.select.getRowState(row) + return derived([isSelected, isSomeSubRowsSelected, isAllSubRowsSelected], ([$selected, $someSubRowsSelected, $allSubRowsSelected]) => { + return `selected: ${$selected}, some subrows: ${$someSubRowsSelected}, all subrows: ${$allSubRowsSelected}` + }) + } + }), + table.column({ + header: 'First Name', + accessor: 'firstName' + }) + ]) + const vm = table.createViewModel(columns) + const { selectedDataIds, allRowsSelected } = vm.pluginStates.select + + get(vm.rows) + allRowsSelected.set(true) + + expect(get(selectedDataIds)).toEqual({ + '0': true, + '1': true, + '2': true, + '3': true, + '4': true + }) + + get(vm.rows) + allRowsSelected.set(false) + + expect(get(selectedDataIds)).toEqual({}) +}) test('reading page rows selected store', () => { - const table = createTable(data, { - page: addPagination({ - initialPageSize: 2, - }), - sub: addSubRows({ - children: 'children', - }), - select: addSelectedRows(), - }); - const columns = table.createColumns([ - table.display({ - id: 'selected', - header: (_, { pluginStates }) => { - const { allRowsSelected, someRowsSelected } = pluginStates.select; - return derived([allRowsSelected, someRowsSelected], ([$all, $some]) => { - return `all: ${$all}, some: ${$some}`; - }); - }, - cell: ({ row }, { pluginStates }) => { - const { isSelected, isSomeSubRowsSelected, isAllSubRowsSelected } = - pluginStates.select.getRowState(row); - return derived( - [isSelected, isSomeSubRowsSelected, isAllSubRowsSelected], - ([$selected, $someSubRowsSelected, $allSubRowsSelected]) => { - return `selected: ${$selected}, some subrows: ${$someSubRowsSelected}, all subrows: ${$allSubRowsSelected}`; - } - ); - }, - }), - table.column({ - header: 'First Name', - accessor: 'firstName', - }), - ]); - const vm = table.createViewModel(columns); - const { selectedDataIds, allPageRowsSelected, somePageRowsSelected } = vm.pluginStates.select; - - // Populate `tableState.pageRows` by subscribing to `vm.pageRows` and running - // all row derivation functions. - get(vm.pageRows); - selectedDataIds.add('4'); - - console.log(get(vm.pageRows)); - - expect(get(somePageRowsSelected)).toBe(false); - expect(get(allPageRowsSelected)).toBe(false); - - get(vm.pageRows); - selectedDataIds.add('0'); - - expect(get(somePageRowsSelected)).toBe(true); - expect(get(allPageRowsSelected)).toBe(false); - - get(vm.pageRows); - selectedDataIds.addAll(['1']); - - expect(get(somePageRowsSelected)).toBe(true); - expect(get(allPageRowsSelected)).toBe(true); - - get(vm.pageRows); - selectedDataIds.remove('0'); - - expect(get(somePageRowsSelected)).toBe(true); - expect(get(allPageRowsSelected)).toBe(false); - - get(vm.pageRows); - selectedDataIds.clear(); - - expect(get(somePageRowsSelected)).toBe(false); - expect(get(allPageRowsSelected)).toBe(false); -}); + const table = createTable(data, { + page: addPagination({ + initialPageSize: 2 + }), + sub: addSubRows({ + children: 'children' + }), + select: addSelectedRows() + }) + const columns = table.createColumns([ + table.display({ + id: 'selected', + header: (_, { pluginStates }) => { + const { allRowsSelected, someRowsSelected } = pluginStates.select + return derived([allRowsSelected, someRowsSelected], ([$all, $some]) => { + return `all: ${$all}, some: ${$some}` + }) + }, + cell: ({ row }, { pluginStates }) => { + const { isSelected, isSomeSubRowsSelected, isAllSubRowsSelected } = pluginStates.select.getRowState(row) + return derived([isSelected, isSomeSubRowsSelected, isAllSubRowsSelected], ([$selected, $someSubRowsSelected, $allSubRowsSelected]) => { + return `selected: ${$selected}, some subrows: ${$someSubRowsSelected}, all subrows: ${$allSubRowsSelected}` + }) + } + }), + table.column({ + header: 'First Name', + accessor: 'firstName' + }) + ]) + const vm = table.createViewModel(columns) + const { selectedDataIds, allPageRowsSelected, somePageRowsSelected } = vm.pluginStates.select + + // Populate `tableState.pageRows` by subscribing to `vm.pageRows` and running + // all row derivation functions. + get(vm.pageRows) + selectedDataIds.add('4') + + console.log(get(vm.pageRows)) + + expect(get(somePageRowsSelected)).toBe(false) + expect(get(allPageRowsSelected)).toBe(false) + + get(vm.pageRows) + selectedDataIds.add('0') + + expect(get(somePageRowsSelected)).toBe(true) + expect(get(allPageRowsSelected)).toBe(false) + + get(vm.pageRows) + selectedDataIds.addAll(['1']) + + expect(get(somePageRowsSelected)).toBe(true) + expect(get(allPageRowsSelected)).toBe(true) + + get(vm.pageRows) + selectedDataIds.remove('0') + + expect(get(somePageRowsSelected)).toBe(true) + expect(get(allPageRowsSelected)).toBe(false) + + get(vm.pageRows) + selectedDataIds.clear() + + expect(get(somePageRowsSelected)).toBe(false) + expect(get(allPageRowsSelected)).toBe(false) +}) test('updating all page rows selected store', () => { - const table = createTable(data, { - page: addPagination({ - initialPageSize: 2, - }), - sub: addSubRows({ - children: 'children', - }), - select: addSelectedRows(), - }); - const columns = table.createColumns([ - table.display({ - id: 'selected', - header: (_, { pluginStates }) => { - const { allRowsSelected, someRowsSelected } = pluginStates.select; - return derived([allRowsSelected, someRowsSelected], ([$all, $some]) => { - return `all: ${$all}, some: ${$some}`; - }); - }, - cell: ({ row }, { pluginStates }) => { - const { isSelected, isSomeSubRowsSelected, isAllSubRowsSelected } = - pluginStates.select.getRowState(row); - return derived( - [isSelected, isSomeSubRowsSelected, isAllSubRowsSelected], - ([$selected, $someSubRowsSelected, $allSubRowsSelected]) => { - return `selected: ${$selected}, some subrows: ${$someSubRowsSelected}, all subrows: ${$allSubRowsSelected}`; - } - ); - }, - }), - table.column({ - header: 'First Name', - accessor: 'firstName', - }), - ]); - const vm = table.createViewModel(columns); - const { selectedDataIds, allPageRowsSelected } = vm.pluginStates.select; - - get(vm.pageRows); - allPageRowsSelected.set(true); - - expect(get(selectedDataIds)).toEqual({ - '0': true, - '1': true, - }); - - get(vm.pageRows); - allPageRowsSelected.set(false); - - expect(get(selectedDataIds)).toEqual({}); - - selectedDataIds.add('4'); - - get(vm.pageRows); - allPageRowsSelected.set(false); - - expect(get(selectedDataIds)).toEqual({ 4: true }); -}); + const table = createTable(data, { + page: addPagination({ + initialPageSize: 2 + }), + sub: addSubRows({ + children: 'children' + }), + select: addSelectedRows() + }) + const columns = table.createColumns([ + table.display({ + id: 'selected', + header: (_, { pluginStates }) => { + const { allRowsSelected, someRowsSelected } = pluginStates.select + return derived([allRowsSelected, someRowsSelected], ([$all, $some]) => { + return `all: ${$all}, some: ${$some}` + }) + }, + cell: ({ row }, { pluginStates }) => { + const { isSelected, isSomeSubRowsSelected, isAllSubRowsSelected } = pluginStates.select.getRowState(row) + return derived([isSelected, isSomeSubRowsSelected, isAllSubRowsSelected], ([$selected, $someSubRowsSelected, $allSubRowsSelected]) => { + return `selected: ${$selected}, some subrows: ${$someSubRowsSelected}, all subrows: ${$allSubRowsSelected}` + }) + } + }), + table.column({ + header: 'First Name', + accessor: 'firstName' + }) + ]) + const vm = table.createViewModel(columns) + const { selectedDataIds, allPageRowsSelected } = vm.pluginStates.select + + get(vm.pageRows) + allPageRowsSelected.set(true) + + expect(get(selectedDataIds)).toEqual({ + '0': true, + '1': true + }) + + get(vm.pageRows) + allPageRowsSelected.set(false) + + expect(get(selectedDataIds)).toEqual({}) + + selectedDataIds.add('4') + + get(vm.pageRows) + allPageRowsSelected.set(false) + + expect(get(selectedDataIds)).toEqual({ 4: true }) +}) diff --git a/src/lib/plugins/addSelectedRows.ts b/src/lib/plugins/addSelectedRows.ts index fff3589..416a1aa 100644 --- a/src/lib/plugins/addSelectedRows.ts +++ b/src/lib/plugins/addSelectedRows.ts @@ -1,286 +1,226 @@ -import type { BodyRow } from '../bodyRows.js'; -import type { NewTablePropSet, TablePlugin } from '../types/TablePlugin.js'; -import { nonNull } from '../utils/filter.js'; -import { recordSetStore, type RecordSetStore } from '../utils/store.js'; -import { derived, get, type Readable, type Updater, type Writable } from 'svelte/store'; +import type { BodyRow } from '../bodyRows.js' +import type { NewTablePropSet, TablePlugin } from '../types/TablePlugin.js' +import { nonNull } from '../utils/filter.js' +import { recordSetStore, type RecordSetStore } from '../utils/store.js' +import { derived, get, type Readable, type Updater, type Writable } from 'svelte/store' // eslint-disable-next-line @typescript-eslint/no-unused-vars export interface SelectedRowsConfig { - initialSelectedDataIds?: Record; - linkDataSubRows?: boolean; + initialSelectedDataIds?: Record + linkDataSubRows?: boolean } export interface SelectedRowsState { - selectedDataIds: RecordSetStore; - allRowsSelected: Writable; - someRowsSelected: Readable; - allPageRowsSelected: Writable; - somePageRowsSelected: Readable; - getRowState: (row: BodyRow) => SelectedRowsRowState; + selectedDataIds: RecordSetStore + allRowsSelected: Writable + someRowsSelected: Readable + allPageRowsSelected: Writable + somePageRowsSelected: Readable + getRowState: (row: BodyRow) => SelectedRowsRowState } export interface SelectedRowsRowState { - isSelected: Writable; - isSomeSubRowsSelected: Readable; - isAllSubRowsSelected: Readable; + isSelected: Writable + isSomeSubRowsSelected: Readable + isAllSubRowsSelected: Readable } export type SelectedRowsPropSet = NewTablePropSet<{ - 'tbody.tr': { - selected: boolean; - someSubRowsSelected: boolean; - allSubRowsSelected: boolean; - }; -}>; - -const isAllSubRowsSelectedForRow = ( - row: BodyRow, - $selectedDataIds: Record, - linkDataSubRows: boolean -): boolean => { - if (row.isData()) { - if (!linkDataSubRows || row.subRows === undefined) { - return $selectedDataIds[row.dataId] === true; - } - } - if (row.subRows === undefined) { - return false; - } - return row.subRows.every((subRow) => - isAllSubRowsSelectedForRow(subRow, $selectedDataIds, linkDataSubRows) - ); -}; + 'tbody.tr': { + selected: boolean + someSubRowsSelected: boolean + allSubRowsSelected: boolean + } +}> + +const isAllSubRowsSelectedForRow = (row: BodyRow, $selectedDataIds: Record, linkDataSubRows: boolean): boolean => { + if (row.isData()) { + if (!linkDataSubRows || row.subRows === undefined) { + return $selectedDataIds[row.dataId] === true + } + } + if (row.subRows === undefined) { + return false + } + return row.subRows.every((subRow) => isAllSubRowsSelectedForRow(subRow, $selectedDataIds, linkDataSubRows)) +} -const isSomeSubRowsSelectedForRow = ( - row: BodyRow, - $selectedDataIds: Record, - linkDataSubRows: boolean -): boolean => { - if (row.isData()) { - if (!linkDataSubRows || row.subRows === undefined) { - return $selectedDataIds[row.dataId] === true; - } - } - if (row.subRows === undefined) { - return false; - } - return row.subRows.some((subRow) => - isSomeSubRowsSelectedForRow(subRow, $selectedDataIds, linkDataSubRows) - ); -}; +const isSomeSubRowsSelectedForRow = (row: BodyRow, $selectedDataIds: Record, linkDataSubRows: boolean): boolean => { + if (row.isData()) { + if (!linkDataSubRows || row.subRows === undefined) { + return $selectedDataIds[row.dataId] === true + } + } + if (row.subRows === undefined) { + return false + } + return row.subRows.some((subRow) => isSomeSubRowsSelectedForRow(subRow, $selectedDataIds, linkDataSubRows)) +} -const writeSelectedDataIds = ( - row: BodyRow, - value: boolean, - $selectedDataIds: Record, - linkDataSubRows: boolean -): void => { - if (row.isData()) { - $selectedDataIds[row.dataId] = value; - if (!linkDataSubRows) { - return; - } - } - if (row.subRows === undefined) { - return; - } - row.subRows.forEach((subRow) => { - writeSelectedDataIds(subRow, value, $selectedDataIds, linkDataSubRows); - }); -}; +const writeSelectedDataIds = (row: BodyRow, value: boolean, $selectedDataIds: Record, linkDataSubRows: boolean): void => { + if (row.isData()) { + $selectedDataIds[row.dataId] = value + if (!linkDataSubRows) { + return + } + } + if (row.subRows === undefined) { + return + } + row.subRows.forEach((subRow) => { + writeSelectedDataIds(subRow, value, $selectedDataIds, linkDataSubRows) + }) +} -const getRowIsSelectedStore = ( - row: BodyRow, - selectedDataIds: RecordSetStore, - linkDataSubRows: boolean -): Writable => { - const { subscribe } = derived(selectedDataIds, ($selectedDataIds) => { - if (row.isData()) { - if (!linkDataSubRows) { - return $selectedDataIds[row.dataId] === true; - } - if ($selectedDataIds[row.dataId] === true) { - return true; - } - } - return isAllSubRowsSelectedForRow(row, $selectedDataIds, linkDataSubRows); - }); - const update = (fn: Updater) => { - selectedDataIds.update(($selectedDataIds) => { - const oldValue = isAllSubRowsSelectedForRow(row, $selectedDataIds, linkDataSubRows); - const $updatedSelectedDataIds = { ...$selectedDataIds }; - writeSelectedDataIds(row, fn(oldValue), $updatedSelectedDataIds, linkDataSubRows); - if (row.parentRow !== undefined && row.parentRow.isData()) { - $updatedSelectedDataIds[row.parentRow.dataId] = isAllSubRowsSelectedForRow( - row.parentRow, - $updatedSelectedDataIds, - linkDataSubRows - ); - } - return $updatedSelectedDataIds; - }); - }; - const set = (value: boolean) => update(() => value); - return { - subscribe, - update, - set, - }; -}; +const getRowIsSelectedStore = (row: BodyRow, selectedDataIds: RecordSetStore, linkDataSubRows: boolean): Writable => { + const { subscribe } = derived(selectedDataIds, ($selectedDataIds) => { + if (row.isData()) { + if (!linkDataSubRows) { + return $selectedDataIds[row.dataId] === true + } + if ($selectedDataIds[row.dataId] === true) { + return true + } + } + return isAllSubRowsSelectedForRow(row, $selectedDataIds, linkDataSubRows) + }) + const update = (fn: Updater) => { + selectedDataIds.update(($selectedDataIds) => { + const oldValue = isAllSubRowsSelectedForRow(row, $selectedDataIds, linkDataSubRows) + const $updatedSelectedDataIds = { ...$selectedDataIds } + writeSelectedDataIds(row, fn(oldValue), $updatedSelectedDataIds, linkDataSubRows) + if (row.parentRow !== undefined && row.parentRow.isData()) { + $updatedSelectedDataIds[row.parentRow.dataId] = isAllSubRowsSelectedForRow(row.parentRow, $updatedSelectedDataIds, linkDataSubRows) + } + return $updatedSelectedDataIds + }) + } + const set = (value: boolean) => update(() => value) + return { + subscribe, + update, + set + } +} export const addSelectedRows = - ({ - initialSelectedDataIds = {}, - linkDataSubRows = true, - }: SelectedRowsConfig = {}): TablePlugin< - Item, - SelectedRowsState, - Record, - SelectedRowsPropSet - > => - ({ tableState }) => { - const selectedDataIds = recordSetStore(initialSelectedDataIds); - - const getRowState = (row: BodyRow): SelectedRowsRowState => { - const isSelected = getRowIsSelectedStore(row, selectedDataIds, linkDataSubRows); - const isSomeSubRowsSelected = derived( - [isSelected, selectedDataIds], - ([$isSelected, $selectedDataIds]) => { - if ($isSelected) return false; - return isSomeSubRowsSelectedForRow(row, $selectedDataIds, linkDataSubRows); - } - ); - const isAllSubRowsSelected = derived(selectedDataIds, ($selectedDataIds) => { - return isAllSubRowsSelectedForRow(row, $selectedDataIds, linkDataSubRows); - }); - return { - isSelected, - isSomeSubRowsSelected, - isAllSubRowsSelected, - }; - }; - - // all rows - const _allRowsSelected = derived( - [tableState.rows, selectedDataIds], - ([$rows, $selectedDataIds]) => { - return $rows.every((row) => { - if (!row.isData()) { - return true; - } - return $selectedDataIds[row.dataId] === true; - }); - } - ); - const setAllRowsSelected = ($allRowsSelected: boolean) => { - if ($allRowsSelected) { - const $rows = get(tableState.rows); - const allDataIds = $rows.map((row) => (row.isData() ? row.dataId : null)).filter(nonNull); - selectedDataIds.addAll(allDataIds); - } else { - selectedDataIds.clear(); - } - }; - const allRowsSelected: Writable = { - subscribe: _allRowsSelected.subscribe, - update(fn) { - const $allRowsSelected = get(_allRowsSelected); - setAllRowsSelected(fn($allRowsSelected)); - }, - set: setAllRowsSelected, - }; - - const someRowsSelected = derived( - [tableState.rows, selectedDataIds], - ([$rows, $selectedDataIds]) => { - return $rows.some((row) => { - if (!row.isData()) { - return false; - } - return $selectedDataIds[row.dataId] === true; - }); - } - ); - - // page rows - const _allPageRowsSelected = derived( - [tableState.pageRows, selectedDataIds], - ([$pageRows, $selectedDataIds]) => { - return $pageRows.every((row) => { - if (!row.isData()) { - return true; - } - return $selectedDataIds[row.dataId] === true; - }); - } - ); - const setAllPageRowsSelected = ($allPageRowsSelected: boolean) => { - const $pageRows = get(tableState.pageRows); - const pageDataIds = $pageRows - .map((row) => (row.isData() ? row.dataId : null)) - .filter(nonNull); - if ($allPageRowsSelected) { - selectedDataIds.addAll(pageDataIds); - } else { - selectedDataIds.removeAll(pageDataIds); - } - }; - const allPageRowsSelected: Writable = { - subscribe: _allPageRowsSelected.subscribe, - update(fn) { - const $allPageRowsSelected = get(_allPageRowsSelected); - setAllPageRowsSelected(fn($allPageRowsSelected)); - }, - set: setAllPageRowsSelected, - }; - - const somePageRowsSelected = derived( - [tableState.pageRows, selectedDataIds], - ([$pageRows, $selectedDataIds]) => { - return $pageRows.some((row) => { - if (!row.isData()) { - return false; - } - return $selectedDataIds[row.dataId] === true; - }); - } - ); - - const pluginState = { - selectedDataIds, - getRowState, - allRowsSelected, - someRowsSelected, - allPageRowsSelected, - somePageRowsSelected, - }; - - return { - pluginState, - hooks: { - 'tbody.tr': (row) => { - const props = derived(selectedDataIds, ($selectedDataIds) => { - const someSubRowsSelected = isSomeSubRowsSelectedForRow( - row, - $selectedDataIds, - linkDataSubRows - ); - const allSubRowsSelected = isAllSubRowsSelectedForRow( - row, - $selectedDataIds, - linkDataSubRows - ); - const selected = row.isData() - ? $selectedDataIds[row.dataId] === true - : allSubRowsSelected; - return { - selected, - someSubRowsSelected, - allSubRowsSelected, - }; - }); - return { props }; - }, - }, - }; - }; + ({ initialSelectedDataIds = {}, linkDataSubRows = true }: SelectedRowsConfig = {}): TablePlugin, Record, SelectedRowsPropSet> => + ({ tableState }) => { + const selectedDataIds = recordSetStore(initialSelectedDataIds) + + const getRowState = (row: BodyRow): SelectedRowsRowState => { + const isSelected = getRowIsSelectedStore(row, selectedDataIds, linkDataSubRows) + const isSomeSubRowsSelected = derived([isSelected, selectedDataIds], ([$isSelected, $selectedDataIds]) => { + if ($isSelected) return false + return isSomeSubRowsSelectedForRow(row, $selectedDataIds, linkDataSubRows) + }) + const isAllSubRowsSelected = derived(selectedDataIds, ($selectedDataIds) => { + return isAllSubRowsSelectedForRow(row, $selectedDataIds, linkDataSubRows) + }) + return { + isSelected, + isSomeSubRowsSelected, + isAllSubRowsSelected + } + } + + // all rows + const _allRowsSelected = derived([tableState.rows, selectedDataIds], ([$rows, $selectedDataIds]) => { + return $rows.every((row) => { + if (!row.isData()) { + return true + } + return $selectedDataIds[row.dataId] === true + }) + }) + const setAllRowsSelected = ($allRowsSelected: boolean) => { + if ($allRowsSelected) { + const $rows = get(tableState.rows) + const allDataIds = $rows.map((row) => (row.isData() ? row.dataId : null)).filter(nonNull) + selectedDataIds.addAll(allDataIds) + } else { + selectedDataIds.clear() + } + } + const allRowsSelected: Writable = { + subscribe: _allRowsSelected.subscribe, + update(fn) { + const $allRowsSelected = get(_allRowsSelected) + setAllRowsSelected(fn($allRowsSelected)) + }, + set: setAllRowsSelected + } + + const someRowsSelected = derived([tableState.rows, selectedDataIds], ([$rows, $selectedDataIds]) => { + return $rows.some((row) => { + if (!row.isData()) { + return false + } + return $selectedDataIds[row.dataId] === true + }) + }) + + // page rows + const _allPageRowsSelected = derived([tableState.pageRows, selectedDataIds], ([$pageRows, $selectedDataIds]) => { + return $pageRows.every((row) => { + if (!row.isData()) { + return true + } + return $selectedDataIds[row.dataId] === true + }) + }) + const setAllPageRowsSelected = ($allPageRowsSelected: boolean) => { + const $pageRows = get(tableState.pageRows) + const pageDataIds = $pageRows.map((row) => (row.isData() ? row.dataId : null)).filter(nonNull) + if ($allPageRowsSelected) { + selectedDataIds.addAll(pageDataIds) + } else { + selectedDataIds.removeAll(pageDataIds) + } + } + const allPageRowsSelected: Writable = { + subscribe: _allPageRowsSelected.subscribe, + update(fn) { + const $allPageRowsSelected = get(_allPageRowsSelected) + setAllPageRowsSelected(fn($allPageRowsSelected)) + }, + set: setAllPageRowsSelected + } + + const somePageRowsSelected = derived([tableState.pageRows, selectedDataIds], ([$pageRows, $selectedDataIds]) => { + return $pageRows.some((row) => { + if (!row.isData()) { + return false + } + return $selectedDataIds[row.dataId] === true + }) + }) + + const pluginState = { + selectedDataIds, + getRowState, + allRowsSelected, + someRowsSelected, + allPageRowsSelected, + somePageRowsSelected + } + + return { + pluginState, + hooks: { + 'tbody.tr': (row) => { + const props = derived(selectedDataIds, ($selectedDataIds) => { + const someSubRowsSelected = isSomeSubRowsSelectedForRow(row, $selectedDataIds, linkDataSubRows) + const allSubRowsSelected = isAllSubRowsSelectedForRow(row, $selectedDataIds, linkDataSubRows) + const selected = row.isData() ? $selectedDataIds[row.dataId] === true : allSubRowsSelected + return { + selected, + someSubRowsSelected, + allSubRowsSelected + } + }) + return { props } + } + } + } + } diff --git a/src/lib/plugins/addSortBy.test.ts b/src/lib/plugins/addSortBy.test.ts index 7525692..e519cdd 100644 --- a/src/lib/plugins/addSortBy.test.ts +++ b/src/lib/plugins/addSortBy.test.ts @@ -1,65 +1,65 @@ -import { get, readable } from 'svelte/store'; -import { createTable } from '../createTable.js'; -import { addSortBy } from './addSortBy.js'; +import { get, readable } from 'svelte/store' +import { createTable } from '../createTable.js' +import { addSortBy } from './addSortBy.js' const data = readable([ - { id: 1, createdAt: new Date(2023, 1, 1), name: { first: 'Ariana', last: 'Grande' } }, - { id: 2, createdAt: new Date(1990, 1, 1), name: { first: 'Harry', last: 'Styles' } }, - { id: 3, createdAt: null, name: { first: 'Doja', last: 'Cat' } }, - { id: 4, createdAt: new Date(2010, 1, 1), name: { first: 'Sam', last: 'Smith' } }, -]); + { id: 1, createdAt: new Date(2023, 1, 1), name: { first: 'Ariana', last: 'Grande' } }, + { id: 2, createdAt: new Date(1990, 1, 1), name: { first: 'Harry', last: 'Styles' } }, + { id: 3, createdAt: null, name: { first: 'Doja', last: 'Cat' } }, + { id: 4, createdAt: new Date(2010, 1, 1), name: { first: 'Sam', last: 'Smith' } } +]) test('compare fn sort', () => { - const table = createTable(data, { - sort: addSortBy({ initialSortKeys: [{ id: 'name', order: 'asc' }] }), - }); - const columns = table.createColumns([ - table.column({ - accessor: 'name', - header: 'Name', - plugins: { - sort: { - compareFn(a, b) { - return a.first < b.first ? -1 : 1; - }, - }, - }, - }), - ]); - const vm = table.createViewModel(columns); - const rows = get(vm.rows); - const rowIds = rows.map((it) => it.isData() && it.original.id); - expect(rowIds).toStrictEqual([1, 3, 2, 4]); -}); + const table = createTable(data, { + sort: addSortBy({ initialSortKeys: [{ id: 'name', order: 'asc' }] }) + }) + const columns = table.createColumns([ + table.column({ + accessor: 'name', + header: 'Name', + plugins: { + sort: { + compareFn(a, b) { + return a.first < b.first ? -1 : 1 + } + } + } + }) + ]) + const vm = table.createViewModel(columns) + const rows = get(vm.rows) + const rowIds = rows.map((it) => it.isData() && it.original.id) + expect(rowIds).toStrictEqual([1, 3, 2, 4]) +}) test('ascending date sort', () => { - const table = createTable(data, { - sort: addSortBy({ initialSortKeys: [{ id: 'createdAt', order: 'asc' }] }), - }); - const columns = table.createColumns([ - table.column({ - accessor: 'createdAt', - header: 'Created At', - }), - ]); - const vm = table.createViewModel(columns); - const rows = get(vm.rows); - const rowIds = rows.map((it) => it.isData() && it.original.id); - expect(rowIds).toStrictEqual([3, 2, 4, 1]); -}); + const table = createTable(data, { + sort: addSortBy({ initialSortKeys: [{ id: 'createdAt', order: 'asc' }] }) + }) + const columns = table.createColumns([ + table.column({ + accessor: 'createdAt', + header: 'Created At' + }) + ]) + const vm = table.createViewModel(columns) + const rows = get(vm.rows) + const rowIds = rows.map((it) => it.isData() && it.original.id) + expect(rowIds).toStrictEqual([3, 2, 4, 1]) +}) test('descending date sort', () => { - const table = createTable(data, { - sort: addSortBy({ initialSortKeys: [{ id: 'createdAt', order: 'desc' }] }), - }); - const columns = table.createColumns([ - table.column({ - accessor: 'createdAt', - header: 'Created At', - }), - ]); - const vm = table.createViewModel(columns); - const rows = get(vm.rows); - const rowIds = rows.map((it) => it.isData() && it.original.id); - expect(rowIds).toStrictEqual([1, 4, 2, 3]); -}); + const table = createTable(data, { + sort: addSortBy({ initialSortKeys: [{ id: 'createdAt', order: 'desc' }] }) + }) + const columns = table.createColumns([ + table.column({ + accessor: 'createdAt', + header: 'Created At' + }) + ]) + const vm = table.createViewModel(columns) + const rows = get(vm.rows) + const rowIds = rows.map((it) => it.isData() && it.original.id) + expect(rowIds).toStrictEqual([1, 4, 2, 3]) +}) diff --git a/src/lib/plugins/addSortBy.ts b/src/lib/plugins/addSortBy.ts index fea47c2..0de7ead 100644 --- a/src/lib/plugins/addSortBy.ts +++ b/src/lib/plugins/addSortBy.ts @@ -1,244 +1,232 @@ -import type { DataBodyCell } from '../bodyCells.js'; -import type { BodyRow } from '../bodyRows.js'; -import type { TablePlugin, NewTablePropSet, DeriveRowsFn } from '../types/TablePlugin.js'; -import { compare } from '../utils/compare.js'; -import { isShiftClick } from '../utils/event.js'; -import { derived, writable, type Readable, type Writable } from 'svelte/store'; +import type { DataBodyCell } from '../bodyCells.js' +import type { BodyRow } from '../bodyRows.js' +import type { TablePlugin, NewTablePropSet, DeriveRowsFn } from '../types/TablePlugin.js' +import { compare } from '../utils/compare.js' +import { isShiftClick } from '../utils/event.js' +import { derived, writable, type Readable, type Writable } from 'svelte/store' export interface SortByConfig { - initialSortKeys?: SortKey[]; - disableMultiSort?: boolean; - isMultiSortEvent?: (event: Event) => boolean; - toggleOrder?: ('asc' | 'desc' | undefined)[]; - serverSide?: boolean; + initialSortKeys?: SortKey[] + disableMultiSort?: boolean + isMultiSortEvent?: (event: Event) => boolean + toggleOrder?: ('asc' | 'desc' | undefined)[] + serverSide?: boolean } -const DEFAULT_TOGGLE_ORDER: ('asc' | 'desc' | undefined)[] = ['asc', 'desc', undefined]; +const DEFAULT_TOGGLE_ORDER: ('asc' | 'desc' | undefined)[] = ['asc', 'desc', undefined] export interface SortByState { - sortKeys: WritableSortKeys; - preSortedRows: Readable[]>; + sortKeys: WritableSortKeys + preSortedRows: Readable[]> } export interface SortByColumnOptions { - disable?: boolean; - // eslint-disable-next-line @typescript-eslint/no-explicit-any - getSortValue?: (value: any) => string | number | (string | number)[]; - // eslint-disable-next-line @typescript-eslint/no-explicit-any - compareFn?: (left: any, right: any) => number; - invert?: boolean; + disable?: boolean + // eslint-disable-next-line @typescript-eslint/no-explicit-any + getSortValue?: (value: any) => string | number | (string | number)[] + // eslint-disable-next-line @typescript-eslint/no-explicit-any + compareFn?: (left: any, right: any) => number + invert?: boolean } export type SortByPropSet = NewTablePropSet<{ - 'thead.tr.th': { - order: 'asc' | 'desc' | undefined; - toggle: (event: Event) => void; - clear: () => void; - disabled: boolean; - }; - 'tbody.tr.td': { - order: 'asc' | 'desc' | undefined; - }; -}>; + 'thead.tr.th': { + order: 'asc' | 'desc' | undefined + toggle: (event: Event) => void + clear: () => void + disabled: boolean + } + 'tbody.tr.td': { + order: 'asc' | 'desc' | undefined + } +}> export interface SortKey { - id: string; - order: 'asc' | 'desc'; + id: string + order: 'asc' | 'desc' } export const createSortKeysStore = (initKeys: SortKey[]): WritableSortKeys => { - const { subscribe, update, set } = writable(initKeys); - const toggleId = ( - id: string, - { multiSort = true, toggleOrder = DEFAULT_TOGGLE_ORDER }: ToggleOptions = {} - ) => { - update(($sortKeys) => { - const keyIdx = $sortKeys.findIndex((key) => key.id === id); - const key = $sortKeys[keyIdx]; - const order = key?.order; - const orderIdx = toggleOrder.findIndex((o) => o === order); - const nextOrderIdx = (orderIdx + 1) % toggleOrder.length; - const nextOrder = toggleOrder[nextOrderIdx]; - if (!multiSort) { - if (nextOrder === undefined) { - return []; - } - return [{ id, order: nextOrder }]; - } - if (keyIdx === -1 && nextOrder !== undefined) { - return [...$sortKeys, { id, order: nextOrder }]; - } - if (nextOrder === undefined) { - return [...$sortKeys.slice(0, keyIdx), ...$sortKeys.slice(keyIdx + 1)]; - } - return [ - ...$sortKeys.slice(0, keyIdx), - { id, order: nextOrder }, - ...$sortKeys.slice(keyIdx + 1), - ]; - }); - }; - const clearId = (id: string) => { - update(($sortKeys) => { - const keyIdx = $sortKeys.findIndex((key) => key.id === id); - if (keyIdx === -1) { - return $sortKeys; - } - return [...$sortKeys.slice(0, keyIdx), ...$sortKeys.slice(keyIdx + 1)]; - }); - }; - return { - subscribe, - update, - set, - toggleId, - clearId, - }; -}; + const { subscribe, update, set } = writable(initKeys) + const toggleId = (id: string, { multiSort = true, toggleOrder = DEFAULT_TOGGLE_ORDER }: ToggleOptions = {}) => { + update(($sortKeys) => { + const keyIdx = $sortKeys.findIndex((key) => key.id === id) + const key = $sortKeys[keyIdx] + const order = key?.order + const orderIdx = toggleOrder.findIndex((o) => o === order) + const nextOrderIdx = (orderIdx + 1) % toggleOrder.length + const nextOrder = toggleOrder[nextOrderIdx] + if (!multiSort) { + if (nextOrder === undefined) { + return [] + } + return [{ id, order: nextOrder }] + } + if (keyIdx === -1 && nextOrder !== undefined) { + return [...$sortKeys, { id, order: nextOrder }] + } + if (nextOrder === undefined) { + return [...$sortKeys.slice(0, keyIdx), ...$sortKeys.slice(keyIdx + 1)] + } + return [...$sortKeys.slice(0, keyIdx), { id, order: nextOrder }, ...$sortKeys.slice(keyIdx + 1)] + }) + } + const clearId = (id: string) => { + update(($sortKeys) => { + const keyIdx = $sortKeys.findIndex((key) => key.id === id) + if (keyIdx === -1) { + return $sortKeys + } + return [...$sortKeys.slice(0, keyIdx), ...$sortKeys.slice(keyIdx + 1)] + }) + } + return { + subscribe, + update, + set, + toggleId, + clearId + } +} interface ToggleOptions { - multiSort?: boolean; - toggleOrder?: ('asc' | 'desc' | undefined)[]; + multiSort?: boolean + toggleOrder?: ('asc' | 'desc' | undefined)[] } export type WritableSortKeys = Writable & { - toggleId: (id: string, options: ToggleOptions) => void; - clearId: (id: string) => void; -}; + toggleId: (id: string, options: ToggleOptions) => void + clearId: (id: string) => void +} -const getSortedRows = >( - rows: Row[], - sortKeys: SortKey[], - columnOptions: Record -): Row[] => { - // Shallow clone to prevent sort affecting `preSortedRows`. - const $sortedRows = [...rows] as typeof rows; - $sortedRows.sort((a, b) => { - for (const key of sortKeys) { - const invert = columnOptions[key.id]?.invert ?? false; - // TODO check why cellForId returns `undefined`. - const cellA = a.cellForId[key.id]; - const cellB = b.cellForId[key.id]; - let order = 0; - const compareFn = columnOptions[key.id]?.compareFn; - const getSortValue = columnOptions[key.id]?.getSortValue; - // Only need to check properties of `cellA` as both should have the same - // properties. - if (!cellA.isData()) { - return 0; - } - const valueA = cellA.value; - const valueB = (cellB as DataBodyCell).value; - if (compareFn !== undefined) { - order = compareFn(valueA, valueB); - } else if (getSortValue !== undefined) { - const sortValueA = getSortValue(valueA); - const sortValueB = getSortValue(valueB); - order = compare(sortValueA, sortValueB); - } else if (typeof valueA === 'string' || typeof valueA === 'number') { - // typeof `cellB.value` is logically equal to `cellA.value`. - order = compare(valueA, valueB as string | number); - } else if (valueA instanceof Date || valueB instanceof Date) { - const sortValueA = valueA instanceof Date ? valueA.getTime() : 0; - const sortValueB = valueB instanceof Date ? valueB.getTime() : 0; - order = compare(sortValueA, sortValueB); - } - if (order !== 0) { - let orderFactor = 1; - // If the current key order is `'desc'`, reverse the order. - if (key.order === 'desc') { - orderFactor *= -1; - } - // If `invert` is `true`, we want to invert the sort without - // affecting the view model's indication. - if (invert) { - orderFactor *= -1; - } - return order * orderFactor; - } - } - return 0; - }); - for (let i = 0; i < $sortedRows.length; i++) { - const { subRows } = $sortedRows[i]; - if (subRows === undefined) { - continue; - } - const sortedSubRows = getSortedRows(subRows as Row[], sortKeys, columnOptions); - const clonedRow = $sortedRows[i].clone() as Row; - clonedRow.subRows = sortedSubRows; - $sortedRows[i] = clonedRow; - } - return $sortedRows; -}; +const getSortedRows = >(rows: Row[], sortKeys: SortKey[], columnOptions: Record): Row[] => { + // Shallow clone to prevent sort affecting `preSortedRows`. + const $sortedRows = [...rows] as typeof rows + $sortedRows.sort((a, b) => { + for (const key of sortKeys) { + const invert = columnOptions[key.id]?.invert ?? false + // TODO check why cellForId returns `undefined`. + const cellA = a.cellForId[key.id] + const cellB = b.cellForId[key.id] + let order = 0 + const compareFn = columnOptions[key.id]?.compareFn + const getSortValue = columnOptions[key.id]?.getSortValue + // Only need to check properties of `cellA` as both should have the same + // properties. + if (!cellA.isData()) { + return 0 + } + const valueA = cellA.value + const valueB = (cellB as DataBodyCell).value + if (compareFn !== undefined) { + order = compareFn(valueA, valueB) + } else if (getSortValue !== undefined) { + const sortValueA = getSortValue(valueA) + const sortValueB = getSortValue(valueB) + order = compare(sortValueA, sortValueB) + } else if (typeof valueA === 'string' || typeof valueA === 'number') { + // typeof `cellB.value` is logically equal to `cellA.value`. + order = compare(valueA, valueB as string | number) + } else if (valueA instanceof Date || valueB instanceof Date) { + const sortValueA = valueA instanceof Date ? valueA.getTime() : 0 + const sortValueB = valueB instanceof Date ? valueB.getTime() : 0 + order = compare(sortValueA, sortValueB) + } + if (order !== 0) { + let orderFactor = 1 + // If the current key order is `'desc'`, reverse the order. + if (key.order === 'desc') { + orderFactor *= -1 + } + // If `invert` is `true`, we want to invert the sort without + // affecting the view model's indication. + if (invert) { + orderFactor *= -1 + } + return order * orderFactor + } + } + return 0 + }) + for (let i = 0; i < $sortedRows.length; i++) { + const { subRows } = $sortedRows[i] + if (subRows === undefined) { + continue + } + const sortedSubRows = getSortedRows(subRows as Row[], sortKeys, columnOptions) + const clonedRow = $sortedRows[i].clone() as Row + clonedRow.subRows = sortedSubRows + $sortedRows[i] = clonedRow + } + return $sortedRows +} export const addSortBy = - ({ - initialSortKeys = [], - disableMultiSort = false, - isMultiSortEvent = isShiftClick, - toggleOrder, - serverSide = false, - }: SortByConfig = {}): TablePlugin, SortByColumnOptions, SortByPropSet> => - ({ columnOptions }) => { - const disabledSortIds = Object.entries(columnOptions) - .filter(([, option]) => option.disable === true) - .map(([columnId]) => columnId); + ({ initialSortKeys = [], disableMultiSort = false, isMultiSortEvent = isShiftClick, toggleOrder, serverSide = false }: SortByConfig = {}): TablePlugin< + Item, + SortByState, + SortByColumnOptions, + SortByPropSet + > => + ({ columnOptions }) => { + const disabledSortIds = Object.entries(columnOptions) + .filter(([, option]) => option.disable === true) + .map(([columnId]) => columnId) - const sortKeys = createSortKeysStore(initialSortKeys); - const preSortedRows = writable[]>([]); + const sortKeys = createSortKeysStore(initialSortKeys) + const preSortedRows = writable[]>([]) - const deriveRows: DeriveRowsFn = (rows) => { - return derived([rows, sortKeys], ([$rows, $sortKeys]) => { - preSortedRows.set($rows); - if (serverSide) { - return $rows; - } - return getSortedRows($rows, $sortKeys, columnOptions); - }); - }; + const deriveRows: DeriveRowsFn = (rows) => { + return derived([rows, sortKeys], ([$rows, $sortKeys]) => { + preSortedRows.set($rows) + if (serverSide) { + return $rows + } + return getSortedRows($rows, $sortKeys, columnOptions) + }) + } - const pluginState: SortByState = { sortKeys, preSortedRows }; + const pluginState: SortByState = { sortKeys, preSortedRows } - return { - pluginState, - deriveRows, - hooks: { - 'thead.tr.th': (cell) => { - const disabled = disabledSortIds.includes(cell.id); - const props = derived(sortKeys, ($sortKeys) => { - const key = $sortKeys.find((k) => k.id === cell.id); - const toggle = (event: Event) => { - if (!cell.isData()) return; - if (disabled) return; - sortKeys.toggleId(cell.id, { - multiSort: disableMultiSort ? false : isMultiSortEvent(event), - toggleOrder, - }); - }; - const clear = () => { - if (!cell.isData()) return; - if (disabledSortIds.includes(cell.id)) return; - sortKeys.clearId(cell.id); - }; - return { - order: key?.order, - toggle, - clear, - disabled, - }; - }); - return { props }; - }, - 'tbody.tr.td': (cell) => { - const props = derived(sortKeys, ($sortKeys) => { - const key = $sortKeys.find((k) => k.id === cell.id); - return { - order: key?.order, - }; - }); - return { props }; - }, - }, - }; - }; + return { + pluginState, + deriveRows, + hooks: { + 'thead.tr.th': (cell) => { + const disabled = disabledSortIds.includes(cell.id) + const props = derived(sortKeys, ($sortKeys) => { + const key = $sortKeys.find((k) => k.id === cell.id) + const toggle = (event: Event) => { + if (!cell.isData()) return + if (disabled) return + sortKeys.toggleId(cell.id, { + multiSort: disableMultiSort ? false : isMultiSortEvent(event), + toggleOrder + }) + } + const clear = () => { + if (!cell.isData()) return + if (disabledSortIds.includes(cell.id)) return + sortKeys.clearId(cell.id) + } + return { + order: key?.order, + toggle, + clear, + disabled + } + }) + return { props } + }, + 'tbody.tr.td': (cell) => { + const props = derived(sortKeys, ($sortKeys) => { + const key = $sortKeys.find((k) => k.id === cell.id) + return { + order: key?.order + } + }) + return { props } + } + } + } + } diff --git a/src/lib/plugins/addSubRows.ts b/src/lib/plugins/addSubRows.ts index fa3e182..245d65c 100644 --- a/src/lib/plugins/addSubRows.ts +++ b/src/lib/plugins/addSubRows.ts @@ -1,56 +1,45 @@ -import { DataBodyRow, getSubRows } from '../bodyRows.js'; -import type { DeriveRowsFn, NewTablePropSet, TablePlugin } from '../types/TablePlugin.js'; -import { derived } from 'svelte/store'; +import { DataBodyRow, getSubRows } from '../bodyRows.js' +import type { DeriveRowsFn, NewTablePropSet, TablePlugin } from '../types/TablePlugin.js' +import { derived } from 'svelte/store' export type ValidChildrenKey = { - [Key in keyof Item]: Item[Key] extends Item[] ? Key : never; -}[keyof Item]; + [Key in keyof Item]: Item[Key] extends Item[] ? Key : never +}[keyof Item] -export type ValidChildrenFn = (item: Item) => Item[] | undefined; +export type ValidChildrenFn = (item: Item) => Item[] | undefined export interface SubRowsConfig { - children: ValidChildrenKey | ValidChildrenFn; + children: ValidChildrenKey | ValidChildrenFn } -const withSubRows = >( - row: Row, - getChildren: ValidChildrenFn -): Row => { - const subItems = getChildren(row.original); - if (subItems === undefined) { - return row; - } - const subRows = getSubRows(subItems, row) as (typeof row)[]; - row.subRows = subRows.map((row) => withSubRows(row, getChildren)); - return row; -}; +const withSubRows = >(row: Row, getChildren: ValidChildrenFn): Row => { + const subItems = getChildren(row.original) + if (subItems === undefined) { + return row + } + const subRows = getSubRows(subItems, row) as (typeof row)[] + row.subRows = subRows.map((row) => withSubRows(row, getChildren)) + return row +} export const addSubRows = - ({ - children, - }: SubRowsConfig): TablePlugin< - Item, - Record, - Record, - NewTablePropSet - > => - () => { - const getChildren: ValidChildrenFn = - children instanceof Function ? children : (item) => item[children] as unknown as Item[]; + ({ children }: SubRowsConfig): TablePlugin, Record, NewTablePropSet> => + () => { + const getChildren: ValidChildrenFn = children instanceof Function ? children : (item) => item[children] as unknown as Item[] - const deriveRows: DeriveRowsFn = (rows) => { - return derived(rows, ($rows) => { - return $rows.map((row) => { - if (row.isData()) { - return withSubRows(row, getChildren); - } - return row; - }); - }); - }; + const deriveRows: DeriveRowsFn = (rows) => { + return derived(rows, ($rows) => { + return $rows.map((row) => { + if (row.isData()) { + return withSubRows(row, getChildren) + } + return row + }) + }) + } - return { - pluginState: {}, - deriveRows, - }; - }; + return { + pluginState: {}, + deriveRows + } + } diff --git a/src/lib/plugins/addTableFilter.ts b/src/lib/plugins/addTableFilter.ts index 6b131c2..e054675 100644 --- a/src/lib/plugins/addTableFilter.ts +++ b/src/lib/plugins/addTableFilter.ts @@ -1,164 +1,153 @@ -import type { BodyRow } from '../bodyRows.js'; -import type { TablePlugin, NewTablePropSet, DeriveRowsFn } from '../types/TablePlugin.js'; -import { recordSetStore } from '../utils/store.js'; -import { derived, writable, type Readable, type Writable } from 'svelte/store'; -import { textPrefixFilter } from './addColumnFilters.js'; +import type { BodyRow } from '../bodyRows.js' +import type { TablePlugin, NewTablePropSet, DeriveRowsFn } from '../types/TablePlugin.js' +import { recordSetStore } from '../utils/store.js' +import { derived, writable, type Readable, type Writable } from 'svelte/store' +import { textPrefixFilter } from './addColumnFilters.js' export interface TableFilterConfig { - fn?: TableFilterFn; - initialFilterValue?: string; - includeHiddenColumns?: boolean; - serverSide?: boolean; + fn?: TableFilterFn + initialFilterValue?: string + includeHiddenColumns?: boolean + serverSide?: boolean } export interface TableFilterState { - filterValue: Writable; - preFilteredRows: Readable[]>; + filterValue: Writable + preFilteredRows: Readable[]> } // Item generic needed to infer type on `getFilteredRows` // eslint-disable-next-line @typescript-eslint/no-unused-vars export interface TableFilterColumnOptions { - exclude?: boolean; - // eslint-disable-next-line @typescript-eslint/no-explicit-any - getFilterValue?: (value: any) => string; + exclude?: boolean + // eslint-disable-next-line @typescript-eslint/no-explicit-any + getFilterValue?: (value: any) => string } // eslint-disable-next-line @typescript-eslint/no-explicit-any -export type TableFilterFn = (props: TableFilterFnProps) => boolean; +export type TableFilterFn = (props: TableFilterFnProps) => boolean // eslint-disable-next-line @typescript-eslint/no-explicit-any export type TableFilterFnProps = { - filterValue: string; - value: string; -}; + filterValue: string + value: string +} export type TableFilterPropSet = NewTablePropSet<{ - 'tbody.tr.td': { - matches: boolean; - }; -}>; + 'tbody.tr.td': { + matches: boolean + } +}> interface GetFilteredRowsOptions { - tableCellMatches: Record; - fn: TableFilterFn; - includeHiddenColumns: boolean; + tableCellMatches: Record + fn: TableFilterFn + includeHiddenColumns: boolean } const getFilteredRows = >( - rows: Row[], - filterValue: string, - columnOptions: Record>, - { tableCellMatches, fn, includeHiddenColumns }: GetFilteredRowsOptions, + rows: Row[], + filterValue: string, + columnOptions: Record>, + { tableCellMatches, fn, includeHiddenColumns }: GetFilteredRowsOptions ): Row[] => { - const $filteredRows = rows - // Filter `subRows` - .map((row) => { - const { subRows } = row; - if (subRows === undefined) { - return row; - } - const filteredSubRows = getFilteredRows(subRows, filterValue, columnOptions, { - tableCellMatches, - fn, - includeHiddenColumns, - }); - const clonedRow = row.clone() as Row; - clonedRow.subRows = filteredSubRows; - return clonedRow; - }) - .filter((row) => { - if ((row.subRows?.length ?? 0) !== 0) { - return true; - } - // An array of booleans, true if the cell matches the filter. - const rowCellMatches = Object.values(row.cellForId).map((cell) => { - const options = columnOptions[cell.id] as TableFilterColumnOptions | undefined; - if (options?.exclude === true) { - return false; - } - const isHidden = row.cells.find((c) => c.id === cell.id) === undefined; - if (isHidden && !includeHiddenColumns) { - return false; - } - if (!cell.isData()) { - return false; - } - let value = cell.value; - if (options?.getFilterValue !== undefined) { - value = options?.getFilterValue(value); - } - const matches = fn({ value: String(value), filterValue }); - if (matches) { - const dataRowColId = cell.dataRowColId(); - if (dataRowColId !== undefined) { - tableCellMatches[dataRowColId] = matches; - } - } - return matches; - }); - // If any cell matches, include in the filtered results. - return rowCellMatches.includes(true); - }); - return $filteredRows; -}; + const $filteredRows = rows + // Filter `subRows` + .map((row) => { + const { subRows } = row + if (subRows === undefined) { + return row + } + const filteredSubRows = getFilteredRows(subRows, filterValue, columnOptions, { + tableCellMatches, + fn, + includeHiddenColumns + }) + const clonedRow = row.clone() as Row + clonedRow.subRows = filteredSubRows + return clonedRow + }) + .filter((row) => { + if ((row.subRows?.length ?? 0) !== 0) { + return true + } + // An array of booleans, true if the cell matches the filter. + const rowCellMatches = Object.values(row.cellForId).map((cell) => { + const options = columnOptions[cell.id] as TableFilterColumnOptions | undefined + if (options?.exclude === true) { + return false + } + const isHidden = row.cells.find((c) => c.id === cell.id) === undefined + if (isHidden && !includeHiddenColumns) { + return false + } + if (!cell.isData()) { + return false + } + let value = cell.value + if (options?.getFilterValue !== undefined) { + value = options?.getFilterValue(value) + } + const matches = fn({ value: String(value), filterValue }) + if (matches) { + const dataRowColId = cell.dataRowColId() + if (dataRowColId !== undefined) { + tableCellMatches[dataRowColId] = matches + } + } + return matches + }) + // If any cell matches, include in the filtered results. + return rowCellMatches.includes(true) + }) + return $filteredRows +} export const addTableFilter = - ({ - fn = textPrefixFilter, - initialFilterValue = '', - includeHiddenColumns = false, - serverSide = false, - }: TableFilterConfig = {}): TablePlugin< - Item, - TableFilterState, - TableFilterColumnOptions, - TableFilterPropSet - > => - ({ columnOptions }) => { - const filterValue = writable(initialFilterValue); - const preFilteredRows = writable[]>([]); - const tableCellMatches = recordSetStore(); + ({ fn = textPrefixFilter, initialFilterValue = '', includeHiddenColumns = false, serverSide = false }: TableFilterConfig = {}): TablePlugin< + Item, + TableFilterState, + TableFilterColumnOptions, + TableFilterPropSet + > => + ({ columnOptions }) => { + const filterValue = writable(initialFilterValue) + const preFilteredRows = writable[]>([]) + const tableCellMatches = recordSetStore() - const pluginState: TableFilterState = { filterValue, preFilteredRows }; + const pluginState: TableFilterState = { filterValue, preFilteredRows } - const deriveRows: DeriveRowsFn = (rows) => { - return derived([rows, filterValue], ([$rows, $filterValue]) => { - preFilteredRows.set($rows); - tableCellMatches.clear(); - const $tableCellMatches: Record = {}; - const $filteredRows = getFilteredRows($rows, $filterValue, columnOptions, { - tableCellMatches: $tableCellMatches, - fn, - includeHiddenColumns, - }); - tableCellMatches.set($tableCellMatches); - if (serverSide) { - return $rows; - } - return $filteredRows; - }); - }; + const deriveRows: DeriveRowsFn = (rows) => { + return derived([rows, filterValue], ([$rows, $filterValue]) => { + preFilteredRows.set($rows) + tableCellMatches.clear() + const $tableCellMatches: Record = {} + const $filteredRows = getFilteredRows($rows, $filterValue, columnOptions, { + tableCellMatches: $tableCellMatches, + fn, + includeHiddenColumns + }) + tableCellMatches.set($tableCellMatches) + if (serverSide) { + return $rows + } + return $filteredRows + }) + } - return { - pluginState, - deriveRows, - hooks: { - 'tbody.tr.td': (cell) => { - const props = derived( - [filterValue, tableCellMatches], - ([$filterValue, $tableCellMatches]) => { - const dataRowColId = cell.dataRowColId(); - return { - matches: - $filterValue !== '' && - dataRowColId !== undefined && - ($tableCellMatches[dataRowColId] ?? false), - }; - }, - ); - return { props }; - }, - }, - }; - }; + return { + pluginState, + deriveRows, + hooks: { + 'tbody.tr.td': (cell) => { + const props = derived([filterValue, tableCellMatches], ([$filterValue, $tableCellMatches]) => { + const dataRowColId = cell.dataRowColId() + return { + matches: $filterValue !== '' && dataRowColId !== undefined && ($tableCellMatches[dataRowColId] ?? false) + } + }) + return { props } + } + } + } + } diff --git a/src/lib/plugins/index.ts b/src/lib/plugins/index.ts index 347707a..0ec1b4c 100644 --- a/src/lib/plugins/index.ts +++ b/src/lib/plugins/index.ts @@ -1,16 +1,16 @@ -export * from './addColumnFilters.js'; -export * from './addColumnOrder.js'; -export * from './addDataExport.js'; -export * from './addExpandedRows.js'; -export * from './addFlatten.js'; -export * from './addGridLayout.js'; -export * from './addGroupBy.js'; -export * from './addHiddenColumns.js'; -export * from './addPagination.js'; -export * from './addResizedColumns.js'; -export * from './addSelectedRows.js'; -export * from './addSortBy.js'; -export * from './addSubRows.js'; -export * from './addTableFilter.js'; +export * from './addColumnFilters.js' +export * from './addColumnOrder.js' +export * from './addDataExport.js' +export * from './addExpandedRows.js' +export * from './addFlatten.js' +export * from './addGridLayout.js' +export * from './addGroupBy.js' +export * from './addHiddenColumns.js' +export * from './addPagination.js' +export * from './addResizedColumns.js' +export * from './addSelectedRows.js' +export * from './addSortBy.js' +export * from './addSubRows.js' +export * from './addTableFilter.js' // plugin helper types -export * from '../types/TablePlugin.js'; +export * from '../types/TablePlugin.js' diff --git a/src/lib/plugins/package.json b/src/lib/plugins/package.json index 94cd429..3207d25 100644 --- a/src/lib/plugins/package.json +++ b/src/lib/plugins/package.json @@ -1,5 +1,5 @@ { - "type": "module", - "svelte": "./index.js", - "types": "../lib/plugins/index.d.ts" + "type": "module", + "svelte": "./index.js", + "types": "../lib/plugins/index.d.ts" } diff --git a/src/lib/tableComponent.applyHook.test.ts b/src/lib/tableComponent.applyHook.test.ts index ff71459..9e97d89 100644 --- a/src/lib/tableComponent.applyHook.test.ts +++ b/src/lib/tableComponent.applyHook.test.ts @@ -1,106 +1,106 @@ -import { get, readable } from 'svelte/store'; -import { TableComponent } from './tableComponent.js'; -import type { AnyPlugins } from './types/TablePlugin.js'; +import { get, readable } from 'svelte/store' +import { TableComponent } from './tableComponent.js' +import type { AnyPlugins } from './types/TablePlugin.js' class TestComponent extends TableComponent { - clone(): TableComponent { - return new TestComponent({ - id: this.id, - }); - } + clone(): TableComponent { + return new TestComponent({ + id: this.id + }) + } } it('hooks plugin props', () => { - const component = new TestComponent({ id: '0' }); - const $props = { - a: 1, - b: 2, - }; - const props = readable($props); - component.applyHook('test', { props }); + const component = new TestComponent({ id: '0' }) + const $props = { + a: 1, + b: 2 + } + const props = readable($props) + component.applyHook('test', { props }) - const actual = component.props(); + const actual = component.props() - const expected = { - test: $props, - }; + const expected = { + test: $props + } - expect(get(actual)).toStrictEqual(expected); -}); + expect(get(actual)).toStrictEqual(expected) +}) it('hooks plugin attrs', () => { - const component = new TestComponent({ id: '0' }); - const $attrs = { - a: 1, - b: 2, - }; - const attrs = readable($attrs); - component.applyHook('test', { attrs }); + const component = new TestComponent({ id: '0' }) + const $attrs = { + a: 1, + b: 2 + } + const attrs = readable($attrs) + component.applyHook('test', { attrs }) - const actual = component.attrs(); + const actual = component.attrs() - const expected = $attrs; + const expected = $attrs - expect(get(actual)).toStrictEqual(expected); -}); + expect(get(actual)).toStrictEqual(expected) +}) it('hooks and merges plugin attrs', () => { - const component = new TestComponent({ id: '0' }); - const $attrs1 = { - a: 1, - b: 2, - }; - const attrs1 = readable($attrs1); - const $attrs2 = { - c: 3, - b: 4, - }; - const attrs2 = readable($attrs2); - component.applyHook('firstPlugin', { attrs: attrs1 }); - component.applyHook('secondPlugin', { attrs: attrs2 }); - - const actual = component.attrs(); - - const expected = { - a: 1, - c: 3, - b: 4, - }; - - expect(get(actual)).toStrictEqual(expected); -}); + const component = new TestComponent({ id: '0' }) + const $attrs1 = { + a: 1, + b: 2 + } + const attrs1 = readable($attrs1) + const $attrs2 = { + c: 3, + b: 4 + } + const attrs2 = readable($attrs2) + component.applyHook('firstPlugin', { attrs: attrs1 }) + component.applyHook('secondPlugin', { attrs: attrs2 }) + + const actual = component.attrs() + + const expected = { + a: 1, + c: 3, + b: 4 + } + + expect(get(actual)).toStrictEqual(expected) +}) it('hooks and merges plugin attrs styles', () => { - const component = new TestComponent({ id: '0' }); - const $attrs1 = { - a: 1, - b: 2, - style: { - x: '1', - y: '2', - }, - }; - const attrs1 = readable($attrs1); - const $attrs2 = { - c: 3, - b: 4, - style: { - z: '3', - y: '4', - }, - }; - const attrs2 = readable($attrs2); - component.applyHook('firstPlugin', { attrs: attrs1 }); - component.applyHook('secondPlugin', { attrs: attrs2 }); - - const actual = component.attrs(); - - const expected = { - a: 1, - b: 4, - c: 3, - style: 'x:1;y:4;z:3', - }; - - expect(get(actual)).toStrictEqual(expected); -}); + const component = new TestComponent({ id: '0' }) + const $attrs1 = { + a: 1, + b: 2, + style: { + x: '1', + y: '2' + } + } + const attrs1 = readable($attrs1) + const $attrs2 = { + c: 3, + b: 4, + style: { + z: '3', + y: '4' + } + } + const attrs2 = readable($attrs2) + component.applyHook('firstPlugin', { attrs: attrs1 }) + component.applyHook('secondPlugin', { attrs: attrs2 }) + + const actual = component.attrs() + + const expected = { + a: 1, + b: 4, + c: 3, + style: 'x:1;y:4;z:3' + } + + expect(get(actual)).toStrictEqual(expected) +}) diff --git a/src/lib/tableComponent.ts b/src/lib/tableComponent.ts index 8456862..f5ed876 100644 --- a/src/lib/tableComponent.ts +++ b/src/lib/tableComponent.ts @@ -1,59 +1,49 @@ -import { derived, type Readable } from 'svelte/store'; -import { derivedKeys } from 'svelte-subscribe'; -import type { - AnyPlugins, - ComponentKeys, - ElementHook, - PluginTablePropSet, -} from './types/TablePlugin.js'; -import type { TableState } from './createViewModel.js'; -import type { Clonable } from './utils/clone.js'; -import { finalizeAttributes, mergeAttributes } from './utils/attributes.js'; +import { derived, type Readable } from 'svelte/store' +import { derivedKeys } from '@humanspeak/svelte-subscribe' +import type { AnyPlugins, ComponentKeys, ElementHook, PluginTablePropSet } from './types/TablePlugin.js' +import type { TableState } from './createViewModel.js' +import type { Clonable } from './utils/clone.js' +import { finalizeAttributes, mergeAttributes } from './utils/attributes.js' export interface TableComponentInit { - id: string; + id: string } -export abstract class TableComponent - implements Clonable> -{ - id: string; - constructor({ id }: TableComponentInit) { - this.id = id; - } +export abstract class TableComponent implements Clonable> { + id: string + constructor({ id }: TableComponentInit) { + this.id = id + } - private attrsForName: Record>> = {}; - attrs(): Readable> { - return derived(Object.values(this.attrsForName), ($attrsArray) => { - let $mergedAttrs: Record = {}; - $attrsArray.forEach(($attrs) => { - $mergedAttrs = mergeAttributes($mergedAttrs, $attrs); - }); - return finalizeAttributes($mergedAttrs); - }); - } + private attrsForName: Record>> = {} + attrs(): Readable> { + return derived(Object.values(this.attrsForName), ($attrsArray) => { + let $mergedAttrs: Record = {} + $attrsArray.forEach(($attrs) => { + $mergedAttrs = mergeAttributes($mergedAttrs, $attrs) + }) + return finalizeAttributes($mergedAttrs) + }) + } - private propsForName: Record>> = {}; - props(): Readable[Key]> { - return derivedKeys(this.propsForName) as Readable[Key]>; - } + private propsForName: Record>> = {} + props(): Readable[Key]> { + return derivedKeys(this.propsForName) as Readable[Key]> + } - state?: TableState; - injectState(state: TableState) { - this.state = state; - } + state?: TableState + injectState(state: TableState) { + this.state = state + } - applyHook( - pluginName: string, - hook: ElementHook, Record> - ) { - if (hook.props !== undefined) { - this.propsForName[pluginName] = hook.props; - } - if (hook.attrs !== undefined) { - this.attrsForName[pluginName] = hook.attrs; - } - } + applyHook(pluginName: string, hook: ElementHook, Record>) { + if (hook.props !== undefined) { + this.propsForName[pluginName] = hook.props + } + if (hook.attrs !== undefined) { + this.attrsForName[pluginName] = hook.attrs + } + } - abstract clone(): TableComponent; + abstract clone(): TableComponent } diff --git a/src/lib/types/Action.ts b/src/lib/types/Action.ts index 03731a8..0908cf3 100644 --- a/src/lib/types/Action.ts +++ b/src/lib/types/Action.ts @@ -1,7 +1,7 @@ // eslint-disable-next-line @typescript-eslint/no-explicit-any export type ActionReturnType = { - update?: (newProps: Props) => void; - destroy?: () => void; -}; + update?: (newProps: Props) => void + destroy?: () => void +} -export type Action = (node: Element, props?: Props) => ActionReturnType | void; +export type Action = (node: Element, props?: Props) => ActionReturnType | void diff --git a/src/lib/types/Entries.ts b/src/lib/types/Entries.ts index 521ce53..7ef83dd 100644 --- a/src/lib/types/Entries.ts +++ b/src/lib/types/Entries.ts @@ -1,5 +1,5 @@ export type Entries = NonNullable< - { - [K in keyof Obj]: [K, NonNullable]; - }[keyof Obj] ->[]; + { + [K in keyof Obj]: [K, NonNullable] + }[keyof Obj] +>[] diff --git a/src/lib/types/KeyPath.ts b/src/lib/types/KeyPath.ts index ad08648..39d829c 100644 --- a/src/lib/types/KeyPath.ts +++ b/src/lib/types/KeyPath.ts @@ -1,21 +1,11 @@ -export type KeyPath = KeyPath_; +export type KeyPath = KeyPath_ type KeyPath_ = D extends S['length'] - ? never - : T extends object - ? { - [K in keyof T]-?: K extends string - ? `${K}` | Join> - : K extends number - ? `[${K}]` | Join<`[${K}]`, KeyPath_> - : never; - }[keyof T] - : ''; + ? never + : T extends object + ? { + [K in keyof T]-?: K extends string ? `${K}` | Join> : K extends number ? `[${K}]` | Join<`[${K}]`, KeyPath_> : never + }[keyof T] + : '' -type Join = K extends string | number - ? P extends string | number - ? P extends `[${string}` - ? `${K}${P}` - : `${K}${'' extends P ? '' : '.'}${P}` - : never - : never; +type Join = K extends string | number ? (P extends string | number ? (P extends `[${string}` ? `${K}${P}` : `${K}${'' extends P ? '' : '.'}${P}`) : never) : never diff --git a/src/lib/types/Label.ts b/src/lib/types/Label.ts index 63f2da4..37713e9 100644 --- a/src/lib/types/Label.ts +++ b/src/lib/types/Label.ts @@ -1,22 +1,14 @@ -import type { RenderConfig } from 'svelte-render'; -import type { DataBodyCell, DisplayBodyCell } from '../bodyCells.js'; -import type { TableState } from '../createViewModel.js'; -import type { HeaderCell } from '../headerCells.js'; -import type { AnyPlugins } from './TablePlugin.js'; +import type { RenderConfig } from 'svelte-render' +import type { DataBodyCell, DisplayBodyCell } from '../bodyCells.js' +import type { TableState } from '../createViewModel.js' +import type { HeaderCell } from '../headerCells.js' +import type { AnyPlugins } from './TablePlugin.js' // eslint-disable-next-line @typescript-eslint/no-explicit-any -export type DataLabel = ( - cell: DataBodyCell, - state: TableState -) => RenderConfig; +export type DataLabel = (cell: DataBodyCell, state: TableState) => RenderConfig -export type DisplayLabel = ( - cell: DisplayBodyCell, - state: TableState -) => RenderConfig; +export type DisplayLabel = (cell: DisplayBodyCell, state: TableState) => RenderConfig // If the function type is removed from the union, generics will not be // inferred for subtypes. -export type HeaderLabel = - | RenderConfig - | ((cell: HeaderCell, state: TableState) => RenderConfig); +export type HeaderLabel = RenderConfig | ((cell: HeaderCell, state: TableState) => RenderConfig) diff --git a/src/lib/types/Matrix.ts b/src/lib/types/Matrix.ts index 02048b7..749c3c7 100644 --- a/src/lib/types/Matrix.ts +++ b/src/lib/types/Matrix.ts @@ -1 +1 @@ -export type Matrix = T[][]; +export type Matrix = T[][] diff --git a/src/lib/types/TablePlugin.ts b/src/lib/types/TablePlugin.ts index f38dc7d..71ee9b2 100644 --- a/src/lib/types/TablePlugin.ts +++ b/src/lib/types/TablePlugin.ts @@ -1,165 +1,136 @@ -import type { BodyCell, BodyCellAttributes } from '../bodyCells.js'; -import type { BodyRow, BodyRowAttributes } from '../bodyRows.js'; -import type { DataColumn, FlatColumn } from '../columns.js'; -import type { HeaderCell, HeaderCellAttributes } from '../headerCells.js'; -import type { HeaderRow, HeaderRowAttributes } from '../headerRows.js'; -import type { - PluginInitTableState, - TableAttributes, - TableBodyAttributes, - TableHeadAttributes, -} from '../createViewModel.js'; -import type { Readable } from 'svelte/store'; - -export type TablePlugin< - Item, - PluginState, - ColumnOptions, - TablePropSet extends AnyTablePropSet = AnyTablePropSet, - TableAttributeSet extends AnyTableAttributeSet = AnyTableAttributeSet -> = ( - init: TablePluginInit -) => TablePluginInstance; +import type { BodyCell, BodyCellAttributes } from '../bodyCells.js' +import type { BodyRow, BodyRowAttributes } from '../bodyRows.js' +import type { DataColumn, FlatColumn } from '../columns.js' +import type { HeaderCell, HeaderCellAttributes } from '../headerCells.js' +import type { HeaderRow, HeaderRowAttributes } from '../headerRows.js' +import type { PluginInitTableState, TableAttributes, TableBodyAttributes, TableHeadAttributes } from '../createViewModel.js' +import type { Readable } from 'svelte/store' + +export type TablePlugin = ( + init: TablePluginInit +) => TablePluginInstance export type TablePluginInit = { - pluginName: string; - tableState: PluginInitTableState; - // eslint-disable-next-line @typescript-eslint/no-explicit-any - columnOptions: Record; -}; - -export type TablePluginInstance< - Item, - PluginState, - ColumnOptions, - TablePropSet extends AnyTablePropSet = AnyTablePropSet, - TableAttributeSet extends AnyTableAttributeSet = AnyTableAttributeSet -> = { - pluginState: PluginState; - transformFlatColumnsFn?: Readable>; - deriveFlatColumns?: DeriveFlatColumnsFn; - deriveRows?: DeriveRowsFn; - derivePageRows?: DeriveRowsFn; - deriveTableAttrs?: DeriveFn>; - deriveTableHeadAttrs?: DeriveFn>; - deriveTableBodyAttrs?: DeriveFn>; - columnOptions?: ColumnOptions; - hooks?: TableHooks; -}; + pluginName: string + tableState: PluginInitTableState + // eslint-disable-next-line @typescript-eslint/no-explicit-any + columnOptions: Record +} + +export type TablePluginInstance = { + pluginState: PluginState + transformFlatColumnsFn?: Readable> + deriveFlatColumns?: DeriveFlatColumnsFn + deriveRows?: DeriveRowsFn + derivePageRows?: DeriveRowsFn + deriveTableAttrs?: DeriveFn> + deriveTableHeadAttrs?: DeriveFn> + deriveTableBodyAttrs?: DeriveFn> + columnOptions?: ColumnOptions + hooks?: TableHooks +} export type AnyPlugins = Record< - // eslint-disable-next-line @typescript-eslint/no-explicit-any - any, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - TablePlugin ->; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + any, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + TablePlugin +> export type AnyPluginInstances = Record< - // eslint-disable-next-line @typescript-eslint/no-explicit-any - any, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - TablePluginInstance ->; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + any, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + TablePluginInstance +> -export type TransformFlatColumnsFn = (flatColumns: DataColumn[]) => DataColumn[]; +export type TransformFlatColumnsFn = (flatColumns: DataColumn[]) => DataColumn[] -export type DeriveFlatColumnsFn = >( - flatColumns: Readable -) => Readable; +export type DeriveFlatColumnsFn = >(flatColumns: Readable) => Readable -export type DeriveRowsFn = >( - rows: Readable -) => Readable; +export type DeriveRowsFn = >(rows: Readable) => Readable -export type DeriveFn = (obj: Readable) => Readable; +export type DeriveFn = (obj: Readable) => Readable export type Components = { - 'thead.tr': HeaderRow; - 'thead.tr.th': HeaderCell; - 'tbody.tr': BodyRow; - 'tbody.tr.td': BodyCell; -}; + 'thead.tr': HeaderRow + 'thead.tr.th': HeaderCell + 'tbody.tr': BodyRow + 'tbody.tr.td': BodyCell +} export type AttributesForKey = { - 'thead.tr': HeaderRowAttributes; - 'thead.tr.th': HeaderCellAttributes; - 'tbody.tr': BodyRowAttributes; - 'tbody.tr.td': BodyCellAttributes; -}; + 'thead.tr': HeaderRowAttributes + 'thead.tr.th': HeaderCellAttributes + 'tbody.tr': BodyRowAttributes + 'tbody.tr.td': BodyCellAttributes +} -export type ComponentKeys = keyof Components; +export type ComponentKeys = keyof Components type TablePropSet< - PropSet extends { - [K in ComponentKeys]?: unknown; - } + PropSet extends { + [K in ComponentKeys]?: unknown + } > = { - [K in ComponentKeys]: PropSet[K]; -}; + [K in ComponentKeys]: PropSet[K] +} export type NewTablePropSet< - PropSet extends { - [K in ComponentKeys]?: unknown; - } + PropSet extends { + [K in ComponentKeys]?: unknown + } > = { - [K in ComponentKeys]: unknown extends PropSet[K] ? never : PropSet[K]; -}; + [K in ComponentKeys]: unknown extends PropSet[K] ? never : PropSet[K] +} // eslint-disable-next-line @typescript-eslint/no-explicit-any -export type AnyTablePropSet = TablePropSet; +export type AnyTablePropSet = TablePropSet type TableAttributeSet< - AttributeSet extends { - [K in ComponentKeys]?: unknown; - } + AttributeSet extends { + [K in ComponentKeys]?: unknown + } > = { - [K in ComponentKeys]: AttributeSet[K]; -}; + [K in ComponentKeys]: AttributeSet[K] +} export type NewTableAttributeSet< - AttributeSet extends { - [K in ComponentKeys]?: unknown; - } + AttributeSet extends { + [K in ComponentKeys]?: unknown + } > = { - [K in ComponentKeys]: unknown extends AttributeSet[K] ? never : AttributeSet[K]; -}; + [K in ComponentKeys]: unknown extends AttributeSet[K] ? never : AttributeSet[K] +} // eslint-disable-next-line @typescript-eslint/no-explicit-any -export type AnyTableAttributeSet = TableAttributeSet; +export type AnyTableAttributeSet = TableAttributeSet -export type TableHooks< - Item, - PropSet extends AnyTablePropSet = AnyTablePropSet, - AttributeSet extends AnyTableAttributeSet = AnyTableAttributeSet -> = { - [ComponentKey in keyof Components]?: ( - component: Components[ComponentKey] - ) => ElementHook; -}; +export type TableHooks = { + [ComponentKey in keyof Components]?: (component: Components[ComponentKey]) => ElementHook +} export type ElementHook = { - props?: Readable; - attrs?: Readable; -}; + props?: Readable + attrs?: Readable +} export type PluginStates = { - [K in keyof Plugins]: ReturnType['pluginState']; -}; + [K in keyof Plugins]: ReturnType['pluginState'] +} type TablePropSetForPluginKey = { - // Plugins[K] does not extend TablePlugin - // eslint-disable-next-line @typescript-eslint/no-explicit-any - [K in keyof Plugins]: Plugins[K] extends TablePlugin - ? TablePropSet - : never; -}; + // Plugins[K] does not extend TablePlugin + // eslint-disable-next-line @typescript-eslint/no-explicit-any + [K in keyof Plugins]: Plugins[K] extends TablePlugin ? TablePropSet : never +} export type PluginTablePropSet = { - [ComponentKey in ComponentKeys]: { - [PluginKey in keyof Plugins]: TablePropSetForPluginKey[PluginKey][ComponentKey]; - }; -}; + [ComponentKey in ComponentKeys]: { + [PluginKey in keyof Plugins]: TablePropSetForPluginKey[PluginKey][ComponentKey] + } +} export type PluginColumnConfigs = Partial<{ - [K in keyof Plugins]: ReturnType['columnOptions']; -}>; + [K in keyof Plugins]: ReturnType['columnOptions'] +}> diff --git a/src/lib/utils/array.ts b/src/lib/utils/array.ts index eab010d..f5aa35a 100644 --- a/src/lib/utils/array.ts +++ b/src/lib/utils/array.ts @@ -1,11 +1,11 @@ -import { getCounter } from './counter.js'; +import { getCounter } from './counter.js' export const getDistinct = (items: T[]): T[] => { - return Array.from(getCounter(items).keys()); -}; + return Array.from(getCounter(items).keys()) +} export const getDuplicates = (items: T[]): T[] => { - return Array.from(getCounter(items).entries()) - .filter(([, count]) => count !== 1) - .map(([key]) => key); -}; + return Array.from(getCounter(items).entries()) + .filter(([, count]) => count !== 1) + .map(([key]) => key) +} diff --git a/src/lib/utils/attributes.finalizeAttributes.test.ts b/src/lib/utils/attributes.finalizeAttributes.test.ts index 749ef7e..554a0a1 100644 --- a/src/lib/utils/attributes.finalizeAttributes.test.ts +++ b/src/lib/utils/attributes.finalizeAttributes.test.ts @@ -1,38 +1,38 @@ -import { finalizeAttributes } from './attributes.js'; +import { finalizeAttributes } from './attributes.js' it('ignores undefined style', () => { - const actual = finalizeAttributes({ - a: 1, - b: 2, - }); + const actual = finalizeAttributes({ + a: 1, + b: 2 + }) - const expected = { a: 1, b: 2 }; + const expected = { a: 1, b: 2 } - expect(actual).toStrictEqual(expected); -}); + expect(actual).toStrictEqual(expected) +}) it('ignores string style', () => { - const actual = finalizeAttributes({ - a: 1, - b: 2, - style: 'display:flex', - }); + const actual = finalizeAttributes({ + a: 1, + b: 2, + style: 'display:flex' + }) - const expected = { a: 1, b: 2, style: 'display:flex' }; + const expected = { a: 1, b: 2, style: 'display:flex' } - expect(actual).toStrictEqual(expected); -}); + expect(actual).toStrictEqual(expected) +}) it('stringifies the style object', () => { - const actual = finalizeAttributes({ - a: 1, - b: 2, - style: { - display: 'flex', - }, - }); - - const expected = { a: 1, b: 2, style: 'display:flex' }; - - expect(actual).toStrictEqual(expected); -}); + const actual = finalizeAttributes({ + a: 1, + b: 2, + style: { + display: 'flex' + } + }) + + const expected = { a: 1, b: 2, style: 'display:flex' } + + expect(actual).toStrictEqual(expected) +}) diff --git a/src/lib/utils/attributes.mergeAttributes.test.ts b/src/lib/utils/attributes.mergeAttributes.test.ts index 7fad4a6..d7b980a 100644 --- a/src/lib/utils/attributes.mergeAttributes.test.ts +++ b/src/lib/utils/attributes.mergeAttributes.test.ts @@ -1,56 +1,56 @@ -import { mergeAttributes } from './attributes.js'; +import { mergeAttributes } from './attributes.js' it('merges basic attributes without styles', () => { - const actual = mergeAttributes( - { - a: 1, - b: 2, - }, - { - c: 3, - b: 4, - } - ); + const actual = mergeAttributes( + { + a: 1, + b: 2 + }, + { + c: 3, + b: 4 + } + ) - const expected = { - a: 1, - b: 4, - c: 3, - }; + const expected = { + a: 1, + b: 4, + c: 3 + } - expect(actual).toStrictEqual(expected); -}); + expect(actual).toStrictEqual(expected) +}) it('merges attributes with styles', () => { - const actual = mergeAttributes( - { - a: 1, - b: 2, - style: { - a: '1', - b: '2', - }, - }, - { - c: 3, - b: 4, - style: { - c: '3', - b: '4', - }, - } - ); + const actual = mergeAttributes( + { + a: 1, + b: 2, + style: { + a: '1', + b: '2' + } + }, + { + c: 3, + b: 4, + style: { + c: '3', + b: '4' + } + } + ) - const expected = { - a: 1, - b: 4, - c: 3, - style: { - a: '1', - b: '4', - c: '3', - }, - }; + const expected = { + a: 1, + b: 4, + c: 3, + style: { + a: '1', + b: '4', + c: '3' + } + } - expect(actual).toStrictEqual(expected); -}); + expect(actual).toStrictEqual(expected) +}) diff --git a/src/lib/utils/attributes.ts b/src/lib/utils/attributes.ts index 9bc49fc..3c2430e 100644 --- a/src/lib/utils/attributes.ts +++ b/src/lib/utils/attributes.ts @@ -1,33 +1,25 @@ -import { stringifyCss } from './css.js'; +import { stringifyCss } from './css.js' -export const mergeAttributes = < - T extends Record, - U extends Record ->( - a: T, - b: U -): T & U => { - if (a.style === undefined && b.style === undefined) { - return { ...a, ...b }; - } - return { - ...a, - ...b, - style: { - ...(typeof a.style === 'object' ? a.style : {}), - ...(typeof b.style === 'object' ? b.style : {}), - }, - }; -}; +export const mergeAttributes = , U extends Record>(a: T, b: U): T & U => { + if (a.style === undefined && b.style === undefined) { + return { ...a, ...b } + } + return { + ...a, + ...b, + style: { + ...(typeof a.style === 'object' ? a.style : {}), + ...(typeof b.style === 'object' ? b.style : {}) + } + } +} -export const finalizeAttributes = >( - attrs: T -): Record => { - if (attrs.style === undefined || typeof attrs.style !== 'object') { - return attrs; - } - return { - ...attrs, - style: stringifyCss(attrs.style as Record), - }; -}; +export const finalizeAttributes = >(attrs: T): Record => { + if (attrs.style === undefined || typeof attrs.style !== 'object') { + return attrs + } + return { + ...attrs, + style: stringifyCss(attrs.style as Record) + } +} diff --git a/src/lib/utils/clone.ts b/src/lib/utils/clone.ts index 42c493a..2a8f8ec 100644 --- a/src/lib/utils/clone.ts +++ b/src/lib/utils/clone.ts @@ -1,10 +1,10 @@ export interface Clonable { - clone(): T; + clone(): T } export const isClonable = (obj: unknown): obj is Clonable => { - return typeof (obj as Clonable).clone === 'function'; -}; + return typeof (obj as Clonable).clone === 'function' +} /** * Create a new instance of a class instance with all properties shallow @@ -15,9 +15,9 @@ export const isClonable = (obj: unknown): obj is Clonable => { * @returns A new instance object with all properties shallow copied. */ export const unsafeClone = (source: T, props?: Partial): T => { - const clone = Object.assign(Object.create(Object.getPrototypeOf(source)), source); - if (props !== undefined) { - Object.assign(clone, props); - } - return clone; -}; + const clone = Object.assign(Object.create(Object.getPrototypeOf(source)), source) + if (props !== undefined) { + Object.assign(clone, props) + } + return clone +} diff --git a/src/lib/utils/compare.ts b/src/lib/utils/compare.ts index c7d53be..97246eb 100644 --- a/src/lib/utils/compare.ts +++ b/src/lib/utils/compare.ts @@ -1,16 +1,16 @@ export const compare = (a: T | T[], b: T | T[]): number => { - if (Array.isArray(a) && Array.isArray(b)) { - return compareArray(a, b); - } - if (typeof a === 'number' && typeof b === 'number') return a - b; - return a < b ? -1 : a > b ? 1 : 0; -}; + if (Array.isArray(a) && Array.isArray(b)) { + return compareArray(a, b) + } + if (typeof a === 'number' && typeof b === 'number') return a - b + return a < b ? -1 : a > b ? 1 : 0 +} export const compareArray = (a: T[], b: T[]): number => { - const minLength = Math.min(a.length, b.length); - for (let i = 0; i < minLength; i++) { - const order = compare(a[i], b[i]); - if (order !== 0) return order; - } - return 0; -}; + const minLength = Math.min(a.length, b.length) + for (let i = 0; i < minLength; i++) { + const order = compare(a[i], b[i]) + if (order !== 0) return order + } + return 0 +} diff --git a/src/lib/utils/counter.ts b/src/lib/utils/counter.ts index fc18b99..9ea5e20 100644 --- a/src/lib/utils/counter.ts +++ b/src/lib/utils/counter.ts @@ -1,7 +1,7 @@ export const getCounter = (items: T[]): Map => { - const result = new Map(); - items.forEach((item) => { - result.set(item, (result.get(item) ?? 0) + 1); - }); - return result; -}; + const result = new Map() + items.forEach((item) => { + result.set(item, (result.get(item) ?? 0) + 1) + }) + return result +} diff --git a/src/lib/utils/css.ts b/src/lib/utils/css.ts index ba3aa4e..51eec0e 100644 --- a/src/lib/utils/css.ts +++ b/src/lib/utils/css.ts @@ -1,5 +1,5 @@ export const stringifyCss = (style: Record): string => { - return Object.entries(style) - .map(([name, value]) => `${name}:${value}`) - .join(';'); -}; + return Object.entries(style) + .map(([name, value]) => `${name}:${value}`) + .join(';') +} diff --git a/src/lib/utils/event.ts b/src/lib/utils/event.ts index b5506e8..f533993 100644 --- a/src/lib/utils/event.ts +++ b/src/lib/utils/event.ts @@ -1,4 +1,4 @@ export const isShiftClick = (event: Event) => { - if (!(event instanceof MouseEvent)) return false; - return event.shiftKey; -}; + if (!(event instanceof MouseEvent)) return false + return event.shiftKey +} diff --git a/src/lib/utils/filter.ts b/src/lib/utils/filter.ts index 2c5254f..d533f38 100644 --- a/src/lib/utils/filter.ts +++ b/src/lib/utils/filter.ts @@ -1,7 +1,7 @@ -export const nonNull = (value: T | null): value is T => value !== null; +export const nonNull = (value: T | null): value is T => value !== null -export const nonUndefined = (value: T | undefined): value is T => value !== undefined; +export const nonUndefined = (value: T | undefined): value is T => value !== undefined -export const nonNullish = (value: T | null | undefined): value is T => value != null; +export const nonNullish = (value: T | null | undefined): value is T => value != null -export const isNumber = (value: unknown): value is number => typeof value === 'number'; +export const isNumber = (value: unknown): value is number => typeof value === 'number' diff --git a/src/lib/utils/math.ts b/src/lib/utils/math.ts index 5c08a13..dc63de8 100644 --- a/src/lib/utils/math.ts +++ b/src/lib/utils/math.ts @@ -1,2 +1,2 @@ -export const sum = (nums: number[]): number => nums.reduce((a, b) => a + b, 0); -export const mean = (nums: number[]): number => (nums.length === 0 ? 0 : sum(nums) / nums.length); +export const sum = (nums: number[]): number => nums.reduce((a, b) => a + b, 0) +export const mean = (nums: number[]): number => (nums.length === 0 ? 0 : sum(nums) / nums.length) diff --git a/src/lib/utils/matrix.ts b/src/lib/utils/matrix.ts index 2f3fac5..b617240 100644 --- a/src/lib/utils/matrix.ts +++ b/src/lib/utils/matrix.ts @@ -1,26 +1,26 @@ -import type { Matrix } from '../types/Matrix.js'; +import type { Matrix } from '../types/Matrix.js' export const getNullMatrix = (width: number, height: number): Matrix => { - const result: Matrix = []; - // Use a loop to create a new array instance per row. - for (let i = 0; i < height; i++) { - result.push(Array(width).fill(null)); - } - return result; -}; + const result: Matrix = [] + // Use a loop to create a new array instance per row. + for (let i = 0; i < height; i++) { + result.push(Array(width).fill(null)) + } + return result +} export const getTransposed = (matrix: Matrix): Matrix => { - const height = matrix.length; - if (height === 0) { - return matrix; - } - const width = matrix[0].length; - const result: Matrix = getNullMatrix(height, width); - for (let i = 0; i < width; i++) { - for (let j = 0; j < height; j++) { - result[i][j] = matrix[j][i]; - } - } - // We guarantee that all elements are filled. - return result as Matrix; -}; + const height = matrix.length + if (height === 0) { + return matrix + } + const width = matrix[0].length + const result: Matrix = getNullMatrix(height, width) + for (let i = 0; i < width; i++) { + for (let j = 0; j < height; j++) { + result[i][j] = matrix[j][i] + } + } + // We guarantee that all elements are filled. + return result as Matrix +} diff --git a/src/lib/utils/store.arraySetStore.test.ts b/src/lib/utils/store.arraySetStore.test.ts index d1db3e1..8c85c56 100644 --- a/src/lib/utils/store.arraySetStore.test.ts +++ b/src/lib/utils/store.arraySetStore.test.ts @@ -1,154 +1,154 @@ -import { get } from 'svelte/store'; -import { arraySetStore } from './store.js'; +import { get } from 'svelte/store' +import { arraySetStore } from './store.js' it('initializes correctly', () => { - const actual = arraySetStore(); + const actual = arraySetStore() - const expected: never[] = []; + const expected: never[] = [] - expect(get(actual)).toStrictEqual(expected); -}); + expect(get(actual)).toStrictEqual(expected) +}) it('initializes with values correctly', () => { - const actual = arraySetStore([1, 2, 3]); + const actual = arraySetStore([1, 2, 3]) - const expected: number[] = [1, 2, 3]; + const expected: number[] = [1, 2, 3] - expect(get(actual)).toStrictEqual(expected); -}); + expect(get(actual)).toStrictEqual(expected) +}) it('toggles an existing value to remove it', () => { - const actual = arraySetStore([1, 2, 3]); + const actual = arraySetStore([1, 2, 3]) - actual.toggle(1); + actual.toggle(1) - const expected: number[] = [2, 3]; + const expected: number[] = [2, 3] - expect(get(actual)).toStrictEqual(expected); -}); + expect(get(actual)).toStrictEqual(expected) +}) it('toggles the last value to remove it', () => { - const actual = arraySetStore([1, 2, 3]); + const actual = arraySetStore([1, 2, 3]) - actual.toggle(3); + actual.toggle(3) - const expected: number[] = [1, 2]; + const expected: number[] = [1, 2] - expect(get(actual)).toStrictEqual(expected); -}); + expect(get(actual)).toStrictEqual(expected) +}) it('toggles a non-existing value to add it', () => { - const actual = arraySetStore([1, 2, 3]); + const actual = arraySetStore([1, 2, 3]) - actual.toggle(4); + actual.toggle(4) - const expected: number[] = [1, 2, 3, 4]; + const expected: number[] = [1, 2, 3, 4] - expect(get(actual)).toStrictEqual(expected); -}); + expect(get(actual)).toStrictEqual(expected) +}) it('toggles an existing value to remove it and clears others', () => { - const actual = arraySetStore([1, 2, 3]); + const actual = arraySetStore([1, 2, 3]) - actual.toggle(1, { clearOthers: true }); + actual.toggle(1, { clearOthers: true }) - const expected: number[] = []; + const expected: number[] = [] - expect(get(actual)).toStrictEqual(expected); -}); + expect(get(actual)).toStrictEqual(expected) +}) it('toggles the last value to remove it', () => { - const actual = arraySetStore([1, 2, 3]); + const actual = arraySetStore([1, 2, 3]) - actual.toggle(3, { clearOthers: true }); + actual.toggle(3, { clearOthers: true }) - const expected: number[] = []; + const expected: number[] = [] - expect(get(actual)).toStrictEqual(expected); -}); + expect(get(actual)).toStrictEqual(expected) +}) it('toggles a non-existing value to add it', () => { - const actual = arraySetStore([1, 2, 3]); + const actual = arraySetStore([1, 2, 3]) - actual.toggle(4, { clearOthers: true }); + actual.toggle(4, { clearOthers: true }) - const expected: number[] = [4]; + const expected: number[] = [4] - expect(get(actual)).toStrictEqual(expected); -}); + expect(get(actual)).toStrictEqual(expected) +}) it('adds a value', () => { - const actual = arraySetStore([1, 2, 3]); + const actual = arraySetStore([1, 2, 3]) - actual.add(4); + actual.add(4) - const expected: number[] = [1, 2, 3, 4]; + const expected: number[] = [1, 2, 3, 4] - expect(get(actual)).toStrictEqual(expected); -}); + expect(get(actual)).toStrictEqual(expected) +}) it('adds an existing value and changes nothing', () => { - const actual = arraySetStore([1, 2, 3]); + const actual = arraySetStore([1, 2, 3]) - actual.add(3); + actual.add(3) - const expected: number[] = [1, 2, 3]; + const expected: number[] = [1, 2, 3] - expect(get(actual)).toStrictEqual(expected); -}); + expect(get(actual)).toStrictEqual(expected) +}) it('removes a value', () => { - const actual = arraySetStore([1, 2, 3]); + const actual = arraySetStore([1, 2, 3]) - actual.remove(3); + actual.remove(3) - const expected: number[] = [1, 2]; + const expected: number[] = [1, 2] - expect(get(actual)).toStrictEqual(expected); -}); + expect(get(actual)).toStrictEqual(expected) +}) it('removes a non-existing value and changes nothing', () => { - const actual = arraySetStore([1, 2, 3]); + const actual = arraySetStore([1, 2, 3]) - actual.remove(4); + actual.remove(4) - const expected: number[] = [1, 2, 3]; + const expected: number[] = [1, 2, 3] - expect(get(actual)).toStrictEqual(expected); -}); + expect(get(actual)).toStrictEqual(expected) +}) it('resets the set', () => { - const actual = arraySetStore([1, 2, 3]); + const actual = arraySetStore([1, 2, 3]) - actual.clear(); + actual.clear() - const expected: number[] = []; + const expected: number[] = [] - expect(get(actual)).toStrictEqual(expected); -}); + expect(get(actual)).toStrictEqual(expected) +}) it('finds the right element with a custom isEqual function', () => { - type User = { - id: number; - name: string; - }; - const actual = arraySetStore( - [ - { id: 0, name: 'Ada' }, - { id: 1, name: 'Alan' }, - ], - { isEqual: (a, b) => a.id === b.id } - ); - - actual.add({ - id: 0, - name: 'Ken', - }); - - const expected: User[] = [ - { id: 0, name: 'Ada' }, - { id: 1, name: 'Alan' }, - ]; - - expect(get(actual)).toStrictEqual(expected); -}); + type User = { + id: number + name: string + } + const actual = arraySetStore( + [ + { id: 0, name: 'Ada' }, + { id: 1, name: 'Alan' } + ], + { isEqual: (a, b) => a.id === b.id } + ) + + actual.add({ + id: 0, + name: 'Ken' + }) + + const expected: User[] = [ + { id: 0, name: 'Ada' }, + { id: 1, name: 'Alan' } + ] + + expect(get(actual)).toStrictEqual(expected) +}) diff --git a/src/lib/utils/store.recordSetStore.test.ts b/src/lib/utils/store.recordSetStore.test.ts index 83b1014..c92aec5 100644 --- a/src/lib/utils/store.recordSetStore.test.ts +++ b/src/lib/utils/store.recordSetStore.test.ts @@ -1,191 +1,191 @@ -import { get } from 'svelte/store'; -import { recordSetStore } from './store.js'; +import { get } from 'svelte/store' +import { recordSetStore } from './store.js' it('initializes correctly', () => { - const actual = recordSetStore(); + const actual = recordSetStore() - const expected: Record = {}; + const expected: Record = {} - expect(get(actual)).toStrictEqual(expected); -}); + expect(get(actual)).toStrictEqual(expected) +}) it('initializes with values correctly', () => { - const actual = recordSetStore({ - 1: true, - 2: true, - 3: true, - }); + const actual = recordSetStore({ + 1: true, + 2: true, + 3: true + }) - const expected = { - 1: true, - 2: true, - 3: true, - }; + const expected = { + 1: true, + 2: true, + 3: true + } - expect(get(actual)).toStrictEqual(expected); -}); + expect(get(actual)).toStrictEqual(expected) +}) it('toggles an existing value to remove it', () => { - const actual = recordSetStore({ - 1: true, - 2: true, - 3: true, - }); + const actual = recordSetStore({ + 1: true, + 2: true, + 3: true + }) - actual.toggle(1); + actual.toggle(1) - const expected = { - 2: true, - 3: true, - }; + const expected = { + 2: true, + 3: true + } - expect(get(actual)).toStrictEqual(expected); -}); + expect(get(actual)).toStrictEqual(expected) +}) it('toggles the last value to remove it', () => { - const actual = recordSetStore({ - 1: true, - 2: true, - 3: true, - }); + const actual = recordSetStore({ + 1: true, + 2: true, + 3: true + }) - actual.toggle(3); + actual.toggle(3) - const expected = { - 1: true, - 2: true, - }; + const expected = { + 1: true, + 2: true + } - expect(get(actual)).toStrictEqual(expected); -}); + expect(get(actual)).toStrictEqual(expected) +}) it('toggles a non-existing value to add it', () => { - const actual = recordSetStore({ - 1: true, - 2: true, - 3: true, - }); + const actual = recordSetStore({ + 1: true, + 2: true, + 3: true + }) - actual.toggle(4); + actual.toggle(4) - const expected = { - 1: true, - 2: true, - 3: true, - 4: true, - }; + const expected = { + 1: true, + 2: true, + 3: true, + 4: true + } - expect(get(actual)).toStrictEqual(expected); -}); + expect(get(actual)).toStrictEqual(expected) +}) it('adds a value', () => { - const actual = recordSetStore({ - 1: true, - 2: true, - 3: true, - }); + const actual = recordSetStore({ + 1: true, + 2: true, + 3: true + }) - actual.add(4); + actual.add(4) - const expected = { - 1: true, - 2: true, - 3: true, - 4: true, - }; + const expected = { + 1: true, + 2: true, + 3: true, + 4: true + } - expect(get(actual)).toStrictEqual(expected); -}); + expect(get(actual)).toStrictEqual(expected) +}) it('adds an existing value and changes nothing', () => { - const actual = recordSetStore({ - 1: true, - 2: true, - 3: true, - }); + const actual = recordSetStore({ + 1: true, + 2: true, + 3: true + }) - actual.add(3); + actual.add(3) - const expected = { - 1: true, - 2: true, - 3: true, - }; + const expected = { + 1: true, + 2: true, + 3: true + } - expect(get(actual)).toStrictEqual(expected); -}); + expect(get(actual)).toStrictEqual(expected) +}) it('removes a value', () => { - const actual = recordSetStore({ - 1: true, - 2: true, - 3: true, - }); + const actual = recordSetStore({ + 1: true, + 2: true, + 3: true + }) - actual.remove(3); + actual.remove(3) - const expected = { - 1: true, - 2: true, - }; + const expected = { + 1: true, + 2: true + } - expect(get(actual)).toStrictEqual(expected); -}); + expect(get(actual)).toStrictEqual(expected) +}) it('removes a non-existing value and changes nothing', () => { - const actual = recordSetStore({ - 1: true, - 2: true, - 3: true, - }); + const actual = recordSetStore({ + 1: true, + 2: true, + 3: true + }) - actual.remove(4); + actual.remove(4) - const expected = { - 1: true, - 2: true, - 3: true, - }; + const expected = { + 1: true, + 2: true, + 3: true + } - expect(get(actual)).toStrictEqual(expected); -}); + expect(get(actual)).toStrictEqual(expected) +}) it('resets the set', () => { - const actual = recordSetStore({ - 1: true, - 2: true, - 3: true, - }); + const actual = recordSetStore({ + 1: true, + 2: true, + 3: true + }) - actual.clear(); + actual.clear() - const expected = {}; + const expected = {} - expect(get(actual)).toStrictEqual(expected); -}); + expect(get(actual)).toStrictEqual(expected) +}) it('removes false values on init', () => { - const actual = recordSetStore({ - 1: false, - 2: true, - 3: true, - }); + const actual = recordSetStore({ + 1: false, + 2: true, + 3: true + }) - const expected = { 2: true, 3: true }; + const expected = { 2: true, 3: true } - expect(get(actual)).toStrictEqual(expected); -}); + expect(get(actual)).toStrictEqual(expected) +}) it('removes false values on update', () => { - const actual = recordSetStore({ - 1: true, - 2: true, - 3: true, - }); + const actual = recordSetStore({ + 1: true, + 2: true, + 3: true + }) - actual.update(($set) => ({ ...$set, 1: false })); + actual.update(($set) => ({ ...$set, 1: false })) - const expected = { 2: true, 3: true }; + const expected = { 2: true, 3: true } - expect(get(actual)).toStrictEqual(expected); -}); + expect(get(actual)).toStrictEqual(expected) +}) diff --git a/src/lib/utils/store.ts b/src/lib/utils/store.ts index 110ba85..8d0cc12 100644 --- a/src/lib/utils/store.ts +++ b/src/lib/utils/store.ts @@ -1,171 +1,166 @@ -import { readable, writable, type Readable, type Updater, type Writable } from 'svelte/store'; +import { readable, writable, type Readable, type Updater, type Writable } from 'svelte/store' -export type ReadOrWritable = Readable | Writable; +export type ReadOrWritable = Readable | Writable // eslint-disable-next-line @typescript-eslint/no-explicit-any export const isReadable = (value: any): value is Readable => { - return value?.subscribe instanceof Function; -}; + return value?.subscribe instanceof Function +} // eslint-disable-next-line @typescript-eslint/no-explicit-any export const isWritable = (store: any): store is Writable => { - return store?.update instanceof Function && store.set instanceof Function; -}; + return store?.update instanceof Function && store.set instanceof Function +} export type WritableKeys = { - [K in keyof T]: T[K] extends undefined ? Writable : Writable; -}; + [K in keyof T]: T[K] extends undefined ? Writable : Writable +} export type ReadableKeys = { - [K in keyof T]: T[K] extends undefined ? Readable : Readable; -}; + [K in keyof T]: T[K] extends undefined ? Readable : Readable +} export type ReadOrWritableKeys = { - [K in keyof T]: T[K] extends undefined ? ReadOrWritable : ReadOrWritable; -}; + [K in keyof T]: T[K] extends undefined ? ReadOrWritable : ReadOrWritable +} -export const Undefined = readable(undefined); -export const UndefinedAs = () => Undefined as unknown as Readable; +export const Undefined = readable(undefined) +export const UndefinedAs = () => Undefined as unknown as Readable export interface ToggleOptions { - clearOthers?: boolean; + clearOthers?: boolean } export interface ArraySetStoreOptions { - isEqual?: (a: T, b: T) => boolean; + isEqual?: (a: T, b: T) => boolean } export interface ArraySetStore extends Writable { - toggle: (item: T, options?: ToggleOptions) => void; - add: (item: T) => void; - remove: (item: T) => void; - clear: () => void; + toggle: (item: T, options?: ToggleOptions) => void + add: (item: T) => void + remove: (item: T) => void + clear: () => void } -export const arraySetStore = ( - initial: T[] = [], - { isEqual = (a, b) => a === b }: ArraySetStoreOptions = {} -): ArraySetStore => { - const { subscribe, update, set } = writable(initial); - const toggle = (item: T, { clearOthers = false }: ToggleOptions = {}) => { - update(($arraySet) => { - const index = $arraySet.findIndex(($item) => isEqual($item, item)); - if (index === -1) { - if (clearOthers) { - return [item]; - } - return [...$arraySet, item]; - } - if (clearOthers) { - return []; - } - return [...$arraySet.slice(0, index), ...$arraySet.slice(index + 1)]; - }); - }; - const add = (item: T) => { - update(($arraySet) => { - const index = $arraySet.findIndex(($item) => isEqual($item, item)); - if (index === -1) { - return [...$arraySet, item]; - } - return $arraySet; - }); - }; - const remove = (item: T) => { - update(($arraySet) => { - const index = $arraySet.findIndex(($item) => isEqual($item, item)); - if (index === -1) { - return $arraySet; - } - return [...$arraySet.slice(0, index), ...$arraySet.slice(index + 1)]; - }); - }; - const clear = () => { - set([]); - }; - return { - subscribe, - update, - set, - toggle, - add, - remove, - clear, - }; -}; +export const arraySetStore = (initial: T[] = [], { isEqual = (a, b) => a === b }: ArraySetStoreOptions = {}): ArraySetStore => { + const { subscribe, update, set } = writable(initial) + const toggle = (item: T, { clearOthers = false }: ToggleOptions = {}) => { + update(($arraySet) => { + const index = $arraySet.findIndex(($item) => isEqual($item, item)) + if (index === -1) { + if (clearOthers) { + return [item] + } + return [...$arraySet, item] + } + if (clearOthers) { + return [] + } + return [...$arraySet.slice(0, index), ...$arraySet.slice(index + 1)] + }) + } + const add = (item: T) => { + update(($arraySet) => { + const index = $arraySet.findIndex(($item) => isEqual($item, item)) + if (index === -1) { + return [...$arraySet, item] + } + return $arraySet + }) + } + const remove = (item: T) => { + update(($arraySet) => { + const index = $arraySet.findIndex(($item) => isEqual($item, item)) + if (index === -1) { + return $arraySet + } + return [...$arraySet.slice(0, index), ...$arraySet.slice(index + 1)] + }) + } + const clear = () => { + set([]) + } + return { + subscribe, + update, + set, + toggle, + add, + remove, + clear + } +} export interface RecordSetStore extends Writable> { - toggle: (item: T) => void; - add: (item: T) => void; - addAll: (items: T[]) => void; - remove: (item: T) => void; - removeAll: (items: T[]) => void; - clear: () => void; + toggle: (item: T) => void + add: (item: T) => void + addAll: (items: T[]) => void + remove: (item: T) => void + removeAll: (items: T[]) => void + clear: () => void } -export const recordSetStore = ( - initial: Record = {} as Record -): RecordSetStore => { - const withFalseRemoved = (record: Record): Record => { - return Object.fromEntries(Object.entries(record).filter(([, v]) => v)) as Record; - }; - const { subscribe, update, set } = writable(withFalseRemoved(initial)); - const updateAndRemoveFalse = (fn: Updater>) => { - update(($recordSet) => { - const newRecordSet = fn($recordSet); - return withFalseRemoved(newRecordSet); - }); - }; - const toggle = (item: T) => { - update(($recordSet) => { - if ($recordSet[item] === true) { - delete $recordSet[item]; - return $recordSet; - } - return { - ...$recordSet, - [item]: true, - }; - }); - }; - const add = (item: T) => { - update(($recordSet) => ({ - ...$recordSet, - [item]: true, - })); - }; - const addAll = (items: T[]) => { - update(($recordSet) => ({ - ...$recordSet, - ...Object.fromEntries(items.map((item) => [item, true])), - })); - }; - const remove = (item: T) => { - update(($recordSet) => { - delete $recordSet[item]; - return $recordSet; - }); - }; - const removeAll = (items: T[]) => { - update(($recordSet) => { - for (const item of items) { - delete $recordSet[item]; - } - return $recordSet; - }); - }; - const clear = () => { - set({} as Record); - }; - return { - subscribe, - update: updateAndRemoveFalse, - set: (newValue) => updateAndRemoveFalse(() => newValue), - toggle, - add, - addAll, - remove, - removeAll, - clear, - }; -}; +export const recordSetStore = (initial: Record = {} as Record): RecordSetStore => { + const withFalseRemoved = (record: Record): Record => { + return Object.fromEntries(Object.entries(record).filter(([, v]) => v)) as Record + } + const { subscribe, update, set } = writable(withFalseRemoved(initial)) + const updateAndRemoveFalse = (fn: Updater>) => { + update(($recordSet) => { + const newRecordSet = fn($recordSet) + return withFalseRemoved(newRecordSet) + }) + } + const toggle = (item: T) => { + update(($recordSet) => { + if ($recordSet[item] === true) { + delete $recordSet[item] + return $recordSet + } + return { + ...$recordSet, + [item]: true + } + }) + } + const add = (item: T) => { + update(($recordSet) => ({ + ...$recordSet, + [item]: true + })) + } + const addAll = (items: T[]) => { + update(($recordSet) => ({ + ...$recordSet, + ...Object.fromEntries(items.map((item) => [item, true])) + })) + } + const remove = (item: T) => { + update(($recordSet) => { + delete $recordSet[item] + return $recordSet + }) + } + const removeAll = (items: T[]) => { + update(($recordSet) => { + for (const item of items) { + delete $recordSet[item] + } + return $recordSet + }) + } + const clear = () => { + set({} as Record) + } + return { + subscribe, + update: updateAndRemoveFalse, + set: (newValue) => updateAndRemoveFalse(() => newValue), + toggle, + add, + addAll, + remove, + removeAll, + clear + } +} diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index bd41c2e..8ed11d6 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -1,293 +1,284 @@

svelte-headless-table

- - {$pageIndex + 1} of {$pageCount} - - - + + {$pageIndex + 1} of {$pageCount} + + +
@@ -295,158 +286,148 @@ - - {#each $headerRows as headerRow (headerRow.id)} - - - {#each headerRow.cells as cell (cell.id)} - - - - {/each} - - - {/each} - - - - - - {#each $pageRows as row (row.id)} - - - {#each row.cells as cell (cell.id)} - - - - {/each} - - - {/each} - + + {#each $headerRows as headerRow (headerRow.id)} + + + {#each headerRow.cells as cell (cell.id)} + + + + {/each} + + + {/each} + + + + + + {#each $pageRows as row (row.id)} + + + {#each row.cells as cell (cell.id)} + + + + {/each} + + + {/each} +
-
- - {#if props.sort.order === 'asc'} - ⬇️ - {:else if props.sort.order === 'desc'} - ⬆️ - {/if} -
- {#if !props.group.disabled} - - {/if} - {#if props.filter?.render !== undefined} - - {/if} - {#if !props.resize.disabled} - -
- {/if} -
- -
- {#if !props.group.repeated} - - {/if} -
+
+ + {#if props.sort.order === 'asc'} + ⬇️ + {:else if props.sort.order === 'desc'} + ⬆️ + {/if} +
+ {#if !props.group.disabled} + + {/if} + {#if props.filter?.render !== undefined} + + {/if} + {#if !props.resize.disabled} + +
+ {/if} +
+ +
+ {#if !props.group.repeated} + + {/if} +
{JSON.stringify(
-		{
-			groupByIds: $groupByIds,
-			sortKeys: $sortKeys,
-			filterValues: $filterValues,
-			filterValue: $filterValue,
-			selectedDataIds: $selectedDataIds,
-			columnIdOrder: $columnIdOrder,
-			hiddenColumnIds: $hiddenColumnIds,
-			expandedIds: $expandedIds,
-			columnWidths: $columnWidths,
-		},
-		null,
-		2
-	)}
+        {
+            groupByIds: $groupByIds,
+            sortKeys: $sortKeys,
+            filterValues: $filterValues,
+            filterValue: $filterValue,
+            selectedDataIds: $selectedDataIds,
+            columnIdOrder: $columnIdOrder,
+            hiddenColumnIds: $hiddenColumnIds,
+            expandedIds: $expandedIds,
+            columnWidths: $columnWidths
+        },
+        null,
+        2
+    )}
 serverSide: {serverSide}
diff --git a/src/routes/_ExpandIndicator.svelte b/src/routes/_ExpandIndicator.svelte index c98bae1..8781b47 100644 --- a/src/routes/_ExpandIndicator.svelte +++ b/src/routes/_ExpandIndicator.svelte @@ -1,28 +1,28 @@ {#if $canExpand} - ($isExpanded = !$isExpanded)} style:--depth={depth}> - {#if $isExpanded} - {#if $isAllSubRowsExpanded} - ⬇️ - {:else} - ↘️ - {/if} - {:else} - ➡️ - {/if} - + ($isExpanded = !$isExpanded)} style:--depth={depth}> + {#if $isExpanded} + {#if $isAllSubRowsExpanded} + ⬇️ + {:else} + ↘️ + {/if} + {:else} + ➡️ + {/if} + {/if} diff --git a/src/routes/_Italic.svelte b/src/routes/_Italic.svelte index 11fc175..888d31e 100644 --- a/src/routes/_Italic.svelte +++ b/src/routes/_Italic.svelte @@ -1,14 +1,14 @@ {text} diff --git a/src/routes/_NumberRangeFilter.svelte b/src/routes/_NumberRangeFilter.svelte index 7d11429..b88f404 100644 --- a/src/routes/_NumberRangeFilter.svelte +++ b/src/routes/_NumberRangeFilter.svelte @@ -1,33 +1,23 @@
- - to - + + to +
diff --git a/src/routes/_Profile.svelte b/src/routes/_Profile.svelte index 13d8217..b656f45 100644 --- a/src/routes/_Profile.svelte +++ b/src/routes/_Profile.svelte @@ -1,14 +1,14 @@
{name}, {age}
{progress} / 100
diff --git a/src/routes/_SelectFilter.svelte b/src/routes/_SelectFilter.svelte index aa01711..76efd90 100644 --- a/src/routes/_SelectFilter.svelte +++ b/src/routes/_SelectFilter.svelte @@ -1,16 +1,16 @@ diff --git a/src/routes/_SelectIndicator.svelte b/src/routes/_SelectIndicator.svelte index b7de332..df727ff 100644 --- a/src/routes/_SelectIndicator.svelte +++ b/src/routes/_SelectIndicator.svelte @@ -1,8 +1,8 @@ diff --git a/src/routes/_TextFilter.svelte b/src/routes/_TextFilter.svelte index 43317d8..3683286 100644 --- a/src/routes/_TextFilter.svelte +++ b/src/routes/_TextFilter.svelte @@ -1,13 +1,8 @@ - + diff --git a/src/routes/_createSamples.d.ts b/src/routes/_createSamples.d.ts index 6d4bea6..d799df6 100644 --- a/src/routes/_createSamples.d.ts +++ b/src/routes/_createSamples.d.ts @@ -1,10 +1,10 @@ export interface Sample { - firstName: string; - lastName: string; - age: number; - visits: number; - progress: number; - status: string; - children?: Sample[]; + firstName: string + lastName: string + age: number + visits: number + progress: number + status: string + children?: Sample[] } -export declare const createSamples: (...lengths: number[]) => Sample[]; +export declare const createSamples: (...lengths: number[]) => Sample[] diff --git a/src/routes/_createSamples.ts b/src/routes/_createSamples.ts index 63aeb2b..f9c36f2 100644 --- a/src/routes/_createSamples.ts +++ b/src/routes/_createSamples.ts @@ -1,36 +1,36 @@ -import faker from 'faker'; +import faker from 'faker' export interface Sample { - firstName: string; - lastName: string; - age: number; - visits: number; - progress: number; - status: string; - children?: Sample[]; + firstName: string + lastName: string + age: number + visits: number + progress: number + status: string + children?: Sample[] } export const createSamples = (...lengths: number[]) => { - const createSamplesLevel = (depth = 0): Sample[] => { - const length = lengths[depth]; - return [...Array(length)].map(() => { - return { - ...getSample(), - ...(lengths[depth + 1] !== undefined ? { children: createSamplesLevel(depth + 1) } : {}), - }; - }); - }; - return createSamplesLevel(); -}; + const createSamplesLevel = (depth = 0): Sample[] => { + const length = lengths[depth] + return [...Array(length)].map(() => { + return { + ...getSample(), + ...(lengths[depth + 1] !== undefined ? { children: createSamplesLevel(depth + 1) } : {}) + } + }) + } + return createSamplesLevel() +} const getSample = (): Sample => { - const statusChance = Math.random(); - return { - firstName: faker.name.firstName(), - lastName: faker.name.lastName(), - age: Math.floor(Math.random() * 30), - visits: Math.floor(Math.random() * 100), - progress: Math.floor(Math.random() * 100), - status: statusChance > 0.66 ? 'relationship' : statusChance > 0.33 ? 'complicated' : 'single', - }; -}; + const statusChance = Math.random() + return { + firstName: faker.name.firstName(), + lastName: faker.name.lastName(), + age: Math.floor(Math.random() * 30), + visits: Math.floor(Math.random() * 100), + progress: Math.floor(Math.random() * 100), + status: statusChance > 0.66 ? 'relationship' : statusChance > 0.33 ? 'complicated' : 'single' + } +} diff --git a/src/routes/_getShuffled.ts b/src/routes/_getShuffled.ts index 36cc9ad..fbc559c 100644 --- a/src/routes/_getShuffled.ts +++ b/src/routes/_getShuffled.ts @@ -1,9 +1,9 @@ export const getShuffled = (items: T[]): T[] => { - items = [...items]; - const shuffled = []; - while (items.length) { - const rand = Math.floor(Math.random() * items.length); - shuffled.push(items.splice(rand, 1)[0]); - } - return shuffled; -}; + items = [...items] + const shuffled = [] + while (items.length) { + const rand = Math.floor(Math.random() * items.length) + shuffled.push(items.splice(rand, 1)[0]) + } + return shuffled +} diff --git a/svelte.config.js b/svelte.config.js index 2b35fe1..c46e9d8 100644 --- a/svelte.config.js +++ b/svelte.config.js @@ -1,18 +1,18 @@ -import adapter from '@sveltejs/adapter-auto'; -import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'; +import adapter from '@sveltejs/adapter-auto' +import { vitePreprocess } from '@sveltejs/vite-plugin-svelte' /** @type {import('@sveltejs/kit').Config} */ const config = { - // Consult https://kit.svelte.dev/docs/integrations#preprocessors - // for more information about preprocessors - preprocess: vitePreprocess(), + // Consult https://kit.svelte.dev/docs/integrations#preprocessors + // for more information about preprocessors + preprocess: vitePreprocess(), - kit: { - // adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list. - // If your environment is not supported or you settled on a specific environment, switch out the adapter. - // See https://kit.svelte.dev/docs/adapters for more information about adapters. - adapter: adapter() - } -}; + kit: { + // adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list. + // If your environment is not supported or you settled on a specific environment, switch out the adapter. + // See https://kit.svelte.dev/docs/adapters for more information about adapters. + adapter: adapter() + } +} -export default config; +export default config diff --git a/tsconfig.json b/tsconfig.json index e110f3a..87759ac 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,16 +1,16 @@ { - "extends": "./.svelte-kit/tsconfig.json", - "compilerOptions": { - "allowJs": true, - "checkJs": true, - "esModuleInterop": true, - "forceConsistentCasingInFileNames": true, - "resolveJsonModule": true, - "skipLibCheck": true, - "sourceMap": true, - "strict": true, - "module": "NodeNext", - "moduleResolution": "NodeNext", - "types": ["vitest/globals"], - } + "extends": "./.svelte-kit/tsconfig.json", + "compilerOptions": { + "allowJs": true, + "checkJs": true, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "resolveJsonModule": true, + "skipLibCheck": true, + "sourceMap": true, + "strict": true, + "module": "NodeNext", + "moduleResolution": "NodeNext", + "types": ["vitest/globals"] + } } diff --git a/vite.config.ts b/vite.config.ts index 7206df2..b3d0e39 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,14 +1,14 @@ -import { sveltekit } from '@sveltejs/kit/vite'; -import { defineConfig } from 'vitest/config'; +import { sveltekit } from '@sveltejs/kit/vite' +import { defineConfig } from 'vitest/config' export default defineConfig({ - plugins: [sveltekit()], - test: { - include: ['src/**/*.test.ts'], - globals: true, - coverage: { - reporter: 'lcov', - include: ['**/*.ts'] - } - } -}); + plugins: [sveltekit()], + test: { + include: ['src/**/*.test.ts'], + globals: true, + coverage: { + reporter: 'lcov', + include: ['**/*.ts'] + } + } +})