[
  {
    "path": ".editorconfig",
    "content": "root = true\n\n[*]\ncharset = utf-8\nindent_style = space\nindent_size = 2\nend_of_line = lf\ninsert_final_newline = true\ntrim_trailing_whitespace = true\n"
  },
  {
    "path": ".gitattributes",
    "content": "# Auto detect text files and perform LF normalization\n* text=auto eol=lf\n"
  },
  {
    "path": ".github/FUNDING.yml",
    "content": "# These are supported funding model platforms\n\ngithub: tannerlinsley\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/bug_report.yml",
    "content": "name: '🐛 Bug report'\ndescription: Report a reproducible bug or regression\nbody:\n  - type: markdown\n    attributes:\n      value: |\n        Thank you for reporting an issue :pray:.\n\n        This issue tracker is for reporting reproducible bugs or regression's found in [react-table](https://github.com/tanstack/table)\n        If you have a question about how to achieve or implement something and are struggling, please post a question\n        inside of react-table's [Discussions tab](https://github.com/tanstack/table/discussions) instead of filing an issue.\n\n        Before submitting a new bug/issue, please check the links below to see if there is a solution or question posted there already:\n        - TanStack Table's [Discussions tab](https://github.com/tanstack/table/discussions)\n        - TanStack Table's [Open Issues](https://github.com/tanstack/table/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc)\n        - TanStack Table's [Closed Issues](https://github.com/tanstack/table/issues?q=is%3Aissue+sort%3Aupdated-desc+is%3Aclosed)\n\n        The more information you fill in, the better the community can help you.\n\n  - type: input\n    id: tanstack-table-version\n    attributes:\n      label: TanStack Table version\n      description: |\n        - Please let us know the exact version of the TanStack Table framework adapter that you were using when the issue occurred. If you are using an older version, check to see if your bug has already been solved in the latest version. Please don't just put in \"latest\", as this is subject to change.\n        - The latest \"table-core\" version is <img alt=\"\" src=\"https://badgen.net/npm/v/@tanstack/react-table\" />\n      placeholder: |\n        e.g. v8.11.6\n    validations:\n      required: true\n\n  - type: input\n    id: framework-library-version\n    attributes:\n      label: Framework/Library version\n      description: Which framework and what version of that framework are you using?\n      placeholder: |\n        e.g. React v17.0.2\n    validations:\n      required: true\n\n  - type: textarea\n    id: description\n    attributes:\n      label: Describe the bug and the steps to reproduce it\n      description: Provide a clear and concise description of the challenge you are running into, and the steps we should take to try to reproduce your bug.\n    validations:\n      required: true\n\n  - type: input\n    id: link\n    attributes:\n      label: Your Minimal, Reproducible Example - (Sandbox Highly Recommended)\n      description: |\n        Please add a link to a minimal reproduction.\n        Note:\n          - Your bug may get fixed much faster if we can run your code and it doesn't have dependencies other than React.\n          - To create a shareable code example for web, you can use CodeSandbox (https://codesandbox.io/s/new) or Stackblitz (https://stackblitz.com/).\n          - Please make sure the example is complete and runnable without prior dependencies and free of unnecessary abstractions\n          - Feel free to fork any of the official CodeSandbox examples to reproduce your issue: https://github.com/tanstack/table/tree/main/examples/\n          - For React Native, you can use: https://snack.expo.dev/\n          - For TypeScript related issues only, a TypeScript Playground link might be sufficient: https://www.typescriptlang.org/play\n          - Please read these tips for providing a minimal example: https://stackoverflow.com/help/mcve.\n      placeholder: |\n        e.g. Code Sandbox, Stackblitz, TypeScript Playground, etc.\n    validations:\n      required: true\n\n  - type: textarea\n    id: screenshots_or_videos\n    attributes:\n      label: Screenshots or Videos (Optional)\n      description: |\n        If applicable, add screenshots or a video to help explain your problem.\n        For more information on the supported file image/file types and the file size limits, please refer\n        to the following link: https://docs.github.com/en/github/writing-on-github/working-with-advanced-formatting/attaching-files\n      placeholder: |\n        You can drag your video or image files inside of this editor ↓\n\n  - type: dropdown\n    attributes:\n      options:\n        - No, because I do not know how\n        - No, because I do not have time to dig into it\n        - Maybe, I'll investigate and start debugging\n        - Yes, I think I know how to fix it and will discuss it in the comments of this issue\n        - Yes, I am also opening a PR that solves the problem along side this issue\n      label: Do you intend to try to help solve this bug with your own PR?\n      description: |\n        If you think you know the cause of the problem, the fastest way to get it fixed is to suggest a fix, or fix it yourself! However, it is ok if you cannot solve this yourself and are just wanting help.\n  - type: checkboxes\n    id: agrees-to-terms\n    attributes:\n      label: Terms & Code of Conduct\n      description: By submitting this issue, you agree to follow our Code of Conduct and can verify that you have followed the requirements outlined above to the best of your ability.\n      options:\n        - label: I agree to follow this project's Code of Conduct\n          required: true\n        - label: I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.\n          required: true\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/config.yml",
    "content": "blank_issues_enabled: false\ncontact_links:\n  - name: 🤔 Feature Requests & Questions\n    url: https://github.com/TanStack/table/discussions\n    about: Please ask and answer questions here.\n  - name: 💬 Community Chat\n    url: https://discord.gg/mQd7egN\n    about: A dedicated discord server hosted by TanStack\n  - name: 🦋 TanStack Bluesky\n    url: https://bsky.app/profile/tanstack.com\n    about: Stay up to date with new releases of our libraries\n"
  },
  {
    "path": ".github/pull_request_template",
    "content": "## 🎯 Changes\n\n<!-- What changes are made in this PR? Describe the change and its motivation. -->\n\n## ✅ Checklist\n\n- [ ] I have followed the steps in the [Contributing guide](https://github.com/TanStack/table/blob/main/CONTRIBUTING.md).\n- [ ] I have tested this code locally with `pnpm test:pr`.\n"
  },
  {
    "path": ".github/workflows/autofix.yml",
    "content": "name: autofix.ci # needed to securely identify the workflow\n\non:\n  pull_request:\n  push:\n    branches: [main, alpha, beta, rc]\n\nconcurrency:\n  group: ${{ github.workflow }}-${{ github.event.number || github.ref }}\n  cancel-in-progress: true\n\npermissions:\n  contents: read\n\njobs:\n  autofix:\n    name: autofix\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v6.0.1\n        with:\n          fetch-depth: 0\n      - name: Setup Tools\n        uses: tanstack/config/.github/setup@main\n      - name: Fix formatting\n        run: pnpm format\n      - name: Apply fixes\n        uses: autofix-ci/action@dd55f44df8f7cdb7a6bf74c78677eb8acd40cd0a\n        with:\n          commit-message: 'ci: apply automated fixes'\n"
  },
  {
    "path": ".github/workflows/pr.yml",
    "content": "name: PR\n\non:\n  pull_request:\n    paths-ignore:\n      - 'docs/**'\n      - 'media/**'\n      - '**/*.md'\n\nconcurrency:\n  group: ${{ github.workflow }}-${{ github.event.number || github.ref }}\n  cancel-in-progress: true\n\nenv:\n  NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}\n\npermissions:\n  contents: read\n\njobs:\n  test:\n    name: Test\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v6.0.1\n        with:\n          fetch-depth: 0\n      - name: Start Nx Agents\n        run: npx nx-cloud start-ci-run --distribute-on=\".nx/workflows/dynamic-changesets.yaml\"\n      - name: Setup Tools\n        uses: tanstack/config/.github/setup@main\n      - name: Get base and head commits for `nx affected`\n        uses: nrwl/nx-set-shas@v4.4.0\n        with:\n          main-branch-name: main\n      - name: Run Checks\n        run: pnpm run test:pr --parallel=3\n      - name: Stop Nx Agents\n        if: ${{ always() }}\n        run: npx nx-cloud stop-all-agents\n  preview:\n    name: Preview\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v6.0.1\n        with:\n          fetch-depth: 0\n      - name: Setup Tools\n        uses: tanstack/config/.github/setup@main\n      - name: Build Packages\n        run: pnpm run build:all\n      - name: Publish Previews\n        run: pnpx pkg-pr-new publish --pnpm --compact './packages/*' --template './examples/*/*'\n"
  },
  {
    "path": ".github/workflows/release.yml",
    "content": "name: Release\n\non:\n  workflow_dispatch:\n    inputs:\n      tag:\n        description: override release tag\n        required: false\n  push:\n    branches: [main, alpha, beta, rc]\n\nconcurrency:\n  group: ${{ github.workflow }}-${{ github.event.number || github.ref }}\n  cancel-in-progress: true\n\nenv:\n  NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}\n\npermissions:\n  contents: write\n  id-token: write\n\njobs:\n  release:\n    name: Release\n    if: github.repository_owner == 'TanStack'\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v6.0.1\n        with:\n          fetch-depth: 0\n      - name: Start Nx Agents\n        run: npx nx-cloud start-ci-run --distribute-on=\".nx/workflows/dynamic-changesets.yaml\"\n      - name: Setup Tools\n        uses: tanstack/config/.github/setup@main\n      - name: Run Tests\n        run: pnpm run test:ci --parallel=3\n      - name: Stop Nx Agents\n        if: ${{ always() }}\n        run: npx nx-cloud stop-all-agents\n      - name: Publish\n        run: |\n          git config --global user.name 'Tanner Linsley'\n          git config --global user.email 'tannerlinsley@users.noreply.github.com'\n          pnpm run cipublish\n        env:\n          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n          TAG: ${{ inputs.tag }}\n"
  },
  {
    "path": ".gitignore",
    "content": "\n# See https://help.github.com/ignore-files/ for more about ignoring files.\n\n# dependencies\nnode_modules\npackage-lock.json\nyarn.lock\n\n# builds\nbuild\ndist\nlib\nes\nartifacts\n.rpt2_cache\ncoverage\n*.tgz\n\n# misc\n.DS_Store\n.env\n.env.local\n.env.development.local\n.env.test.local\n.env.production.local\n.next\n.svelte-kit\n\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\n.history\nsize-plugin.json\nstats-hydration.json\nstats-react.json\nstats.html\n.vscode/settings.json\n.idea\n\n*.log\n.DS_Store\n.cache\n.idea\n.pnpm-store\n\npackage-lock.json\nyarn.lock\n*.tsbuildinfo\n*.tsbuildinfo\n\n.svelte-kit\n.nx/cache\n.nx/workspace-data\nvite.config.js.timestamp-*\nvite.config.ts.timestamp-*\n\n.angular\n"
  },
  {
    "path": ".npmrc",
    "content": "provenance=true\n"
  },
  {
    "path": ".nvmrc",
    "content": "24.8.0\n"
  },
  {
    "path": ".nx/workflows/dynamic-changesets.yaml",
    "content": "distribute-on:\n  small-changeset: 3 linux-medium-js\n  medium-changeset: 6 linux-medium-js\n  large-changeset: 10 linux-medium-js\n"
  },
  {
    "path": ".prettierignore",
    "content": "**/.nx/\n**/.nx/cache\n**/.svelte-kit\n**/build\n**/coverage\n**/dist\n**/docs\n**/old-examples\n**/examples/**/*.svelte\npnpm-lock.yaml\n\n.angular\n"
  },
  {
    "path": ".vscode/extensions.json",
    "content": "{\n  \"recommendations\": [\"dbaeumer.vscode-eslint\", \"esbenp.prettier-vscode\"]\n}\n"
  },
  {
    "path": "CODE_OF_CONDUCT.md",
    "content": "---\ntitle: Code of Conduct\nid: code-of-conduct\n---\n\n# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nIn the interest of fostering an open and welcoming environment, we as\ncontributors and maintainers pledge to making participation in our project and\nour community a harassment-free experience for everyone, regardless of age, body\nsize, disability, ethnicity, sex characteristics, gender identity and expression,\nlevel of experience, education, socio-economic status, nationality, personal\nappearance, race, religion, or sexual identity and orientation.\n\n## Our Standards\n\nExamples of behavior that contributes to creating a positive environment\ninclude:\n\n- Using welcoming and inclusive language\n- Being respectful of differing viewpoints and experiences\n- Gracefully accepting constructive criticism\n- Focusing on what is best for the community\n- Showing empathy towards other community members\n\nExamples of unacceptable behavior by participants include:\n\n- The use of sexualized language or imagery and unwelcome sexual attention or\n  advances\n- Trolling, insulting/derogatory comments, and personal or political attacks\n- Public or private harassment\n- Publishing others' private information, such as a physical or electronic\n  address, without explicit permission\n- Other conduct which could reasonably be considered inappropriate in a\n  professional setting\n\n## Our Responsibilities\n\nProject maintainers are responsible for clarifying the standards of acceptable\nbehavior and are expected to take appropriate and fair corrective action in\nresponse to any instances of unacceptable behavior.\n\nProject maintainers have the right and responsibility to remove, edit, or\nreject comments, commits, code, wiki edits, issues, and other contributions\nthat are not aligned to this Code of Conduct, or to ban temporarily or\npermanently any contributor for other behaviors that they deem inappropriate,\nthreatening, offensive, or harmful.\n\n## Scope\n\nThis Code of Conduct applies both within project spaces and in public spaces\nwhen an individual is representing the project or its community. Examples of\nrepresenting a project or community include using an official project e-mail\naddress, posting via an official social media account, or acting as an appointed\nrepresentative at an online or offline event. Representation of a project may be\nfurther defined and clarified by project maintainers.\n\n## Enforcement\n\nInstances of abusive, harassing, or otherwise unacceptable behavior may be\nreported by contacting the project team at TANNERLINSLEY@GMAIL.COM. All\ncomplaints will be reviewed and investigated and will result in a response that\nis deemed necessary and appropriate to the circumstances. The project team is\nobligated to maintain confidentiality with regard to the reporter of an incident.\nFurther details of specific enforcement policies may be posted separately.\n\nProject maintainers who do not follow or enforce the Code of Conduct in good\nfaith may face temporary or permanent repercussions as determined by other\nmembers of the project's leadership.\n\n## Attribution\n\nThis Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,\navailable at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html\n\n[homepage]: https://www.contributor-covenant.org\n\nFor answers to common questions about this code of conduct, see\nhttps://www.contributor-covenant.org/faq\n"
  },
  {
    "path": "CONTRIBUTING.md",
    "content": "---\ntitle: Contributing\nid: contributing\n---\n\n# Contributing\n\n## Questions\n\nIf you have questions about implementation details, help or support, then please use our dedicated community forum at [Github Discussions](https://github.com/tanstack/table/discussions) **PLEASE NOTE:** If you choose to instead open an issue for your question, your issue will be immediately closed and redirected to the forum.\n\n## Reporting Issues\n\nIf you have found what you think is a bug, please [file an issue](https://github.com/tanstack/table/issues/new). **PLEASE NOTE:** Issues that are identified as implementation questions or non-issues will be immediately closed and redirected to [Github Discussions](https://github.com/tanstack/table/discussions)\n\n## Suggesting new features\n\nIf you are here to suggest a feature, first create an issue if it does not already exist. From there, we will discuss use-cases for the feature and then finally discuss how it could be implemented.\n\n## Development\n\nBefore proceeding with development, ensure you match one of the following criteria:\n\n- Fixing a small bug\n- Fixing a larger issue that has been previously discussed and agreed-upon by maintainers\n- Adding a new feature that has been previously discussed and agreed-upon by maintainers\n\n## Development Workflow\n\n- Fork this repository, we prefer the `feat-*` branch name style\n- Ensure you have `pnpm` installed\n- Install projects dependencies and linkages by running `pnpm install`\n- Auto-build and auto-test files as you edit by running `pnpm dev`\n- Implement your changes and tests\n- To run examples, follow their individual directions. Usually this includes:\n  - cd into the example directory\n  - Do NOT install dependencies again or do any linking. Nx already handles this for you. Only run install from the project root.\n  - Starting the dev server with `pnpm dev` or `pnpm start` (from the example directory)\n- To test in your own projects:\n  - Build/watch for changes with `pnpm build`/`pnpm dev`\n- Document your changes in the appropriate documentation website markdown pages\n- Commit your work and open a pull request\n- Submit PR for review\n\n## Adding a new example\n\n- Clone an existing example into the appropriate `examples` directory\n- Name it the example name in kebab-case\n- Update the new example's package.json to match the new example name and any other details\n- Check dependencies for unused packages\n- Install any additional packages to the example that you may need\n- Update the docs/config.json file to include the new example in the navigation sidebar\n- Commit the example eg. `docs: Add example-name`\n"
  },
  {
    "path": "LICENSE",
    "content": "MIT License\n\nCopyright (c) 2016 Tanner Linsley\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "<div align=\"center\">\n  <img src=\"./media/header_table.png\" alt=\"TanStack Table\">\n</div>\n\n<br />\n\n<div align=\"center\">\n<a href=\"https://npmjs.com/package/@tanstack/react-table\" target=\"\\_parent\">\n  <img alt=\"npm downloads\" src=\"https://img.shields.io/npm/dm/@tanstack/react-table.svg\" />\n</a>\n<a href=\"https://github.com/tanstack/table\" target=\"\\_parent\">\n  <img alt=\"github stars\" src=\"https://img.shields.io/github/stars/tanstack/react-table.svg?style=social&label=Star\" />\n</a>\n<a href=\"https://bundlephobia.com/result?p=@tanstack/react-table@latest\" target=\"\\_parent\">\n  <img alt=\"bundle size\" src=\"https://badgen.net/bundlephobia/minzip/@tanstack/react-table@latest\" />\n</a>\n</div>\n\n<div align=\"center\">\n<a href=\"#badge\">\n  <img alt=\"semantic-release\" src=\"https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg\">\n</a>\n<a href=\"https://bestofjs.org/projects/tanstack-table\"><img alt=\"Best of JS\" src=\"https://img.shields.io/endpoint?url=https://bestofjs-serverless.now.sh/api/project-badge?fullName=TanStack%2Ftable%26since=daily\" /></a>\n  <a href=\"https://twitter.com/tan_stack\"><img src=\"https://img.shields.io/twitter/follow/tan_stack.svg?style=social\" alt=\"Follow @TanStack\"/></a>\n</div>\n\n### [Become a Sponsor!](https://github.com/sponsors/tannerlinsley/)\n\n</div>\n\n# TanStack Table\n\n> [!NOTE]\n> You may know TanStack Table by the adapter names:\n>\n> - [Angular Table](https://tanstack.com/table/alpha/docs/framework/angular/angular-table)\n> - [Lit Table](https://tanstack.com/table/alpha/docs/framework/lit/lit-table)\n> - [React Table](https://tanstack.com/table/alpha/docs/framework/react/react-table)\n> - [Solid Table](https://tanstack.com/table/alpha/docs/framework/solid/solid-table)\n> - [Svelte Table](https://tanstack.com/table/alpha/docs/framework/svelte/svelte-table)\n> - [Vue Table](https://tanstack.com/table/alpha/docs/framework/vue/vue-table)\n\nA headless table library for building powerful datagrids with full control over markup, styles, and behavior.\n\n- Framework‑agnostic core with bindings for React, Vue & Solid\n- 100% customizable — bring your own UI, components, and styles\n- Sorting, filtering, grouping, aggregation & row selection\n- Lightweight, virtualizable & server‑side friendly\n\n### <a href=\"https://tanstack.com/table\">Read the Docs →</a>\n\n## Get Involved\n\n- We welcome issues and pull requests!\n- Participate in [GitHub discussions](https://github.com/TanStack/table/discussions)\n- Chat with the community on [Discord](https://discord.com/invite/WrRKjPJ)\n- See [CONTRIBUTING.md](./CONTRIBUTING.md) for setup instructions\n\n## Partners\n\n<table align=\"center\">\n  <tr>\n    <td>\n        <a href=\"https://www.coderabbit.ai/?via=tanstack&dub_id=aCcEEdAOqqutX6OS\">\n\t\t\t<picture>\n\t\t\t  <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://tanstack.com/assets/coderabbit-dark-CMcuvjEy.svg\" height=\"40\" />\n\t\t\t  <source media=\"(prefers-color-scheme: light)\" srcset=\"https://tanstack.com/assets/coderabbit-light-DVMJ2jHi.svg\" height=\"40\" />\n\t\t\t  <img src=\"https://tanstack.com/assets/coderabbit-light-DVMJ2jHi.svg\" height=\"40\" alt=\"CodeRabbit\" />\n\t\t\t</picture>        \n\t\t</a>\n    </td>\n    <td padding=\"20\">\n      <a href=\"https://www.cloudflare.com?utm_source=tanstack\">\n         <picture>\n\t\t  <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://tanstack.com/assets/cloudflare-white-DQDB7UaL.svg\" height=\"60\" />\n\t\t  <source media=\"(prefers-color-scheme: light)\" srcset=\"https://tanstack.com/assets/cloudflare-black-CPufaW0B.svg\" height=\"60\" />\n\t\t  <img src=\"https://tanstack.com/assets/cloudflare-black-CPufaW0B.svg\" height=\"60\" alt=\"Cloudflare\" />\n\t\t</picture>\n      </a>\n    </td>\n    <td>\n     <a href=\"https://ag-grid.com/react-data-grid/?utm_source=reacttable&utm_campaign=githubreacttable\" style=\"display: flex; align-items: center; border: none;\">\n       <picture>\n        <source media=\"(prefers-color-scheme: dark)\" srcset=\"./media/ag-grid-dark.svg\" height=\"40\" />\n        <source media=\"(prefers-color-scheme: light)\" srcset=\"./media/ag-grid-light.svg\" height=\"40\" />\n        <img src=\"https://raw.githubusercontent.com/tannerlinsley/files/master/partners/ag-grid.svg\" height=\"60\" alt=\"AG Grid\" />\n      </picture>\n      </a>\n    </td>\n  </tr>\n</table>\n\n<div align=\"center\">\n<img src=\"./media/partner_logo.svg\" alt=\"Table & you?\" height=\"65\">\n<p>\nWe're looking for TanStack Table Partners to join our mission! Partner with us to push the boundaries of TanStack Table and build amazing things together.\n</p>\n<a href=\"mailto:partners@tanstack.com?subject=TanStack Table Partnership\"><b>LET'S CHAT</b></a>\n</div>\n\n## Explore the TanStack Ecosystem\n\n- <a href=\"https://github.com/tanstack/config\"><b>TanStack Config</b></a> – Tooling for JS/TS packages\n- <a href=\"https://github.com/tanstack/db\"><b>TanStack DB</b></a> – Reactive sync client store\n- <a href=\"https://github.com/tanstack/devtools\"><b>TanStack DevTools</b></a> – Unified devtools panel\n- <a href=\"https://github.com/tanstack/form\"><b>TanStack Form</b></a> – Type‑safe form state\n- <a href=\"https://github.com/tanstack/pacer\"><b>TanStack Pacer</b></a> – Debouncing, throttling, batching <br/>\n- <a href=\"https://github.com/tanstack/query\"><b>TanStack Query</b></a> – Async state & caching\n- <a href=\"https://github.com/tanstack/ranger\"><b>TanStack Ranger</b></a> – Range & slider primitives\n- <a href=\"https://github.com/tanstack/router\"><b>TanStack Router</b></a> – Type‑safe routing, caching & URL state\n- <a href=\"https://github.com/tanstack/router\"><b>TanStack Start</b></a> – Full‑stack SSR & streaming\n- <a href=\"https://github.com/tanstack/store\"><b>TanStack Store</b></a> – Reactive data store\n- <a href=\"https://github.com/tanstack/virtual\"><b>TanStack Virtual</b></a> – Virtualized rendering\n\n… and more at <a href=\"https://tanstack.com\"><b>TanStack.com »</b></a>\n\n<!-- USE THE FORCE LUKE -->\n"
  },
  {
    "path": "docs/config.json",
    "content": "{\n  \"$schema\": \"https://raw.githubusercontent.com/TanStack/tanstack.com/main/tanstack-docs-config.schema.json\",\n  \"docSearch\": {\n    \"appId\": \"74SF5EKVW9\",\n    \"apiKey\": \"9fc015a3310be6669ed66c6c459f319f\",\n    \"indexName\": \"tanstack-table\"\n  },\n  \"sections\": [\n    {\n      \"label\": \"Getting Started\",\n      \"children\": [\n        {\n          \"label\": \"Introduction\",\n          \"to\": \"introduction\"\n        },\n        {\n          \"label\": \"Overview\",\n          \"to\": \"overview\"\n        },\n        {\n          \"label\": \"Installation\",\n          \"to\": \"installation\"\n        },\n        {\n          \"label\": \"FAQ\",\n          \"to\": \"faq\"\n        }\n      ],\n      \"frameworks\": [\n        {\n          \"label\": \"angular\",\n          \"children\": [\n            {\n              \"label\": \"Angular Table Adapter\",\n              \"to\": \"framework/angular/angular-table\"\n            },\n            {\n              \"label\": \"Migrating to V9\",\n              \"to\": \"framework/angular/guide/migrating\"\n            },\n            {\n              \"label\": \"Rendering components\",\n              \"to\": \"framework/angular/guide/rendering\"\n            },\n            {\n              \"label\": \"Table composition\",\n              \"to\": \"framework/angular/guide/table-composition\"\n            }\n          ]\n        },\n        {\n          \"label\": \"lit\",\n          \"children\": [\n            {\n              \"label\": \"Lit Table Adapter\",\n              \"to\": \"framework/lit/lit-table\"\n            }\n          ]\n        },\n        {\n          \"label\": \"react\",\n          \"children\": [\n            {\n              \"label\": \"React Table Adapter\",\n              \"to\": \"framework/react/react-table\"\n            },\n            {\n              \"label\": \"createTableHook Guide\",\n              \"to\": \"framework/react/guide/create-table-hook\"\n            },\n            {\n              \"label\": \"Migrating to V9\",\n              \"to\": \"framework/react/guide/migrating\"\n            },\n            {\n              \"label\": \"useLegacyTable Guide\",\n              \"to\": \"framework/react/guide/use-legacy-table\"\n            }\n          ]\n        },\n        {\n          \"label\": \"preact\",\n          \"children\": [\n            {\n              \"label\": \"createTableHook Guide\",\n              \"to\": \"framework/preact/guide/create-table-hook\"\n            }\n          ]\n        },\n        {\n          \"label\": \"solid\",\n          \"children\": [\n            {\n              \"label\": \"Solid Table Adapter\",\n              \"to\": \"framework/solid/solid-table\"\n            }\n          ]\n        },\n        {\n          \"label\": \"svelte\",\n          \"children\": [\n            {\n              \"label\": \"Svelte Table Adapter\",\n              \"to\": \"framework/svelte/svelte-table\"\n            }\n          ]\n        },\n        {\n          \"label\": \"vue\",\n          \"children\": [\n            {\n              \"label\": \"Vue Table Adapter\",\n              \"to\": \"framework/vue/vue-table\"\n            }\n          ]\n        },\n        {\n          \"label\": \"vanilla\",\n          \"children\": [\n            {\n              \"label\": \"Vanilla JS (No Framework)\",\n              \"to\": \"vanilla\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"label\": \"Core Guides\",\n      \"children\": [\n        {\n          \"label\": \"Data\",\n          \"to\": \"guide/data\"\n        },\n        {\n          \"label\": \"Column Defs\",\n          \"to\": \"guide/column-defs\"\n        },\n        {\n          \"label\": \"Table Instance\",\n          \"to\": \"guide/tables\"\n        },\n        {\n          \"label\": \"Row Models\",\n          \"to\": \"guide/row-models\"\n        },\n        {\n          \"label\": \"Rows\",\n          \"to\": \"guide/rows\"\n        },\n        {\n          \"label\": \"Cells\",\n          \"to\": \"guide/cells\"\n        },\n        {\n          \"label\": \"Header Groups\",\n          \"to\": \"guide/header-groups\"\n        },\n        {\n          \"label\": \"Headers\",\n          \"to\": \"guide/headers\"\n        },\n        {\n          \"label\": \"Columns\",\n          \"to\": \"guide/columns\"\n        }\n      ],\n      \"frameworks\": [\n        {\n          \"label\": \"angular\",\n          \"children\": [\n            {\n              \"label\": \"Table State\",\n              \"to\": \"framework/angular/guide/table-state\"\n            }\n          ]\n        },\n        {\n          \"label\": \"lit\",\n          \"children\": [\n            {\n              \"label\": \"Table State\",\n              \"to\": \"framework/lit/guide/table-state\"\n            }\n          ]\n        },\n        {\n          \"label\": \"react\",\n          \"children\": [\n            {\n              \"label\": \"Table State\",\n              \"to\": \"framework/react/guide/table-state\"\n            }\n          ]\n        },\n        {\n          \"label\": \"solid\",\n          \"children\": [\n            {\n              \"label\": \"Table State\",\n              \"to\": \"framework/solid/guide/table-state\"\n            }\n          ]\n        },\n        {\n          \"label\": \"svelte\",\n          \"children\": [\n            {\n              \"label\": \"Table State\",\n              \"to\": \"framework/svelte/guide/table-state\"\n            }\n          ]\n        },\n        {\n          \"label\": \"vue\",\n          \"children\": [\n            {\n              \"label\": \"Table State\",\n              \"to\": \"framework/vue/guide/table-state\"\n            }\n          ]\n        },\n        {\n          \"label\": \"vanilla\",\n          \"children\": [\n            {\n              \"label\": \"Table State\",\n              \"to\": \"framework/vanilla/guide/table-state\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"label\": \"Feature Guides\",\n      \"children\": [\n        {\n          \"label\": \"Column Ordering\",\n          \"to\": \"guide/column-ordering\"\n        },\n        {\n          \"label\": \"Column Pinning\",\n          \"to\": \"guide/column-pinning\"\n        },\n        {\n          \"label\": \"Column Sizing\",\n          \"to\": \"guide/column-sizing\"\n        },\n        {\n          \"label\": \"Column Visibility\",\n          \"to\": \"guide/column-visibility\"\n        },\n        {\n          \"label\": \"Column Filtering\",\n          \"to\": \"guide/column-filtering\"\n        },\n        {\n          \"label\": \"Global Filtering\",\n          \"to\": \"guide/global-filtering\"\n        },\n        {\n          \"label\": \"Fuzzy Filtering\",\n          \"to\": \"guide/fuzzy-filtering\"\n        },\n        {\n          \"label\": \"Column Faceting\",\n          \"to\": \"guide/column-faceting\"\n        },\n        {\n          \"label\": \"Global Faceting\",\n          \"to\": \"guide/global-faceting\"\n        },\n        {\n          \"label\": \"Grouping\",\n          \"to\": \"guide/grouping\"\n        },\n        {\n          \"label\": \"Expanding\",\n          \"to\": \"guide/expanding\"\n        },\n        {\n          \"label\": \"Pagination\",\n          \"to\": \"guide/pagination\"\n        },\n        {\n          \"label\": \"Row Pinning\",\n          \"to\": \"guide/row-pinning\"\n        },\n        {\n          \"label\": \"Row Selection\",\n          \"to\": \"guide/row-selection\"\n        },\n        {\n          \"label\": \"Sorting\",\n          \"to\": \"guide/sorting\"\n        },\n        {\n          \"label\": \"Virtualization\",\n          \"to\": \"guide/virtualization\"\n        },\n        {\n          \"label\": \"Custom Features\",\n          \"to\": \"guide/custom-features\"\n        }\n      ]\n    },\n    {\n      \"label\": \"API Reference\",\n      \"children\": [\n        {\n          \"label\": \"Core API Reference\",\n          \"to\": \"reference/index\"\n        }\n      ],\n      \"frameworks\": [\n        {\n          \"label\": \"angular\",\n          \"children\": [\n            {\n              \"label\": \"Angular API Reference\",\n              \"to\": \"framework/angular/reference/index\"\n            }\n          ]\n        },\n        {\n          \"label\": \"react\",\n          \"children\": [\n            {\n              \"label\": \"React API Reference\",\n              \"to\": \"framework/react/reference/index\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"collapsible\": true,\n      \"defaultCollapsed\": true,\n      \"label\": \"Table API Reference\",\n      \"children\": [\n        { \"label\": \"Table\", \"to\": \"reference/type-aliases/Table\" },\n        { \"label\": \"Table_Core\", \"to\": \"reference/type-aliases/Table_Core\" },\n        { \"label\": \"Table_CoreProperties\", \"to\": \"reference/interfaces/Table_CoreProperties\" },\n        { \"label\": \"Table_Table\", \"to\": \"reference/interfaces/Table_Table\" },\n        { \"label\": \"Table_Columns\", \"to\": \"reference/interfaces/Table_Columns\" },\n        { \"label\": \"Table_Rows\", \"to\": \"reference/interfaces/Table_Rows\" },\n        { \"label\": \"Table_Headers\", \"to\": \"reference/interfaces/Table_Headers\" },\n        { \"label\": \"Table_Plugins\", \"to\": \"reference/interfaces/Table_Plugins\" },\n        { \"label\": \"TableOptions\", \"to\": \"reference/type-aliases/TableOptions\" },\n        { \"label\": \"TableOptions_All\", \"to\": \"reference/type-aliases/TableOptions_All\" },\n        { \"label\": \"TableOptions_Core\", \"to\": \"reference/interfaces/TableOptions_Core\" },\n        { \"label\": \"TableOptions_Table\", \"to\": \"reference/interfaces/TableOptions_Table\" },\n        { \"label\": \"TableOptions_Columns\", \"to\": \"reference/interfaces/TableOptions_Columns\" },\n        { \"label\": \"TableOptions_Rows\", \"to\": \"reference/interfaces/TableOptions_Rows\" },\n        { \"label\": \"TableOptions_Cell\", \"to\": \"reference/interfaces/TableOptions_Cell\" },\n        { \"label\": \"TableOptions_Plugins\", \"to\": \"reference/interfaces/TableOptions_Plugins\" },\n        { \"label\": \"TableState\", \"to\": \"reference/type-aliases/TableState\" },\n        { \"label\": \"TableState_All\", \"to\": \"reference/type-aliases/TableState_All\" },\n        { \"label\": \"TableState_Plugins\", \"to\": \"reference/interfaces/TableState_Plugins\" },\n        { \"label\": \"TableMeta\", \"to\": \"reference/interfaces/TableMeta\" },\n        { \"label\": \"TableFeature\", \"to\": \"reference/interfaces/TableFeature\" },\n        { \"label\": \"TableFeatures\", \"to\": \"reference/interfaces/TableFeatures\" },\n        { \"label\": \"StockFeatures\", \"to\": \"reference/interfaces/StockFeatures\" },\n        { \"label\": \"CoreFeatures\", \"to\": \"reference/interfaces/CoreFeatures\" },\n        { \"label\": \"constructTable\", \"to\": \"reference/functions/constructTable\" },\n        { \"label\": \"constructTableHelper\", \"to\": \"reference/functions/constructTableHelper\" },\n        { \"label\": \"createTableStore\", \"to\": \"reference/functions/createTableStore\" },\n        { \"label\": \"tableOptions\", \"to\": \"reference/functions/tableOptions\" },\n        { \"label\": \"tableFeatures\", \"to\": \"reference/functions/tableFeatures\" },\n        { \"label\": \"getInitialTableState\", \"to\": \"reference/functions/getInitialTableState\" },\n        { \"label\": \"table_setOptions\", \"to\": \"reference/functions/table_setOptions\" },\n        { \"label\": \"table_mergeOptions\", \"to\": \"reference/functions/table_mergeOptions\" },\n        { \"label\": \"table_reset\", \"to\": \"reference/functions/table_reset\" },\n        { \"label\": \"table_getRowModel\", \"to\": \"reference/functions/table_getRowModel\" },\n        { \"label\": \"table_getRow\", \"to\": \"reference/functions/table_getRow\" },\n        { \"label\": \"table_getRowCount\", \"to\": \"reference/functions/table_getRowCount\" },\n        { \"label\": \"table_getRowId\", \"to\": \"reference/functions/table_getRowId\" },\n        { \"label\": \"TableHelperOptions\", \"to\": \"reference/type-aliases/TableHelperOptions\" },\n        { \"label\": \"TableHelper_Core\", \"to\": \"reference/type-aliases/TableHelper_Core\" },\n        { \"label\": \"OnChangeFn\", \"to\": \"reference/type-aliases/OnChangeFn\" },\n        { \"label\": \"Updater\", \"to\": \"reference/type-aliases/Updater\" },\n        { \"label\": \"DebugOptions\", \"to\": \"reference/type-aliases/DebugOptions\" }\n      ],\n      \"frameworks\": [\n        {\n          \"label\": \"react\",\n          \"children\": [\n            { \"label\": \"useTable\", \"to\": \"framework/react/reference/index/functions/useTable\" },\n            { \"label\": \"createTableHook\", \"to\": \"framework/react/reference/index/functions/createTableHook\" },\n            { \"label\": \"ReactTable\", \"to\": \"framework/react/reference/index/type-aliases/ReactTable\" },\n            { \"label\": \"AppReactTable\", \"to\": \"framework/react/reference/index/type-aliases/AppReactTable\" },\n            { \"label\": \"CreateTableHookOptions\", \"to\": \"framework/react/reference/index/type-aliases/CreateTableHookOptions\" },\n            { \"label\": \"Subscribe\", \"to\": \"framework/react/reference/index/functions/Subscribe\" },\n            { \"label\": \"SubscribeProps\", \"to\": \"framework/react/reference/index/type-aliases/SubscribeProps\" },\n            { \"label\": \"FlexRender\", \"to\": \"framework/react/reference/index/functions/FlexRender-1\" },\n            { \"label\": \"flexRender\", \"to\": \"framework/react/reference/index/functions/flexRender\" },\n            { \"label\": \"FlexRenderProps\", \"to\": \"framework/react/reference/index/type-aliases/FlexRenderProps\" },\n            { \"label\": \"Renderable\", \"to\": \"framework/react/reference/index/type-aliases/Renderable\" },\n            { \"label\": \"AppTableComponent\", \"to\": \"framework/react/reference/index/interfaces/AppTableComponent\" },\n            { \"label\": \"AppTablePropsWithSelector\", \"to\": \"framework/react/reference/index/interfaces/AppTablePropsWithSelector\" },\n            { \"label\": \"AppTablePropsWithoutSelector\", \"to\": \"framework/react/reference/index/interfaces/AppTablePropsWithoutSelector\" }\n          ]\n        },\n        {\n          \"label\": \"angular\",\n          \"children\": [\n            { \"label\": \"injectTable\", \"to\": \"framework/angular/reference/functions/injectTable\" },\n            { \"label\": \"createTableHook\", \"to\": \"framework/angular/reference/functions/createTableHook\" },\n            { \"label\": \"AngularTable\", \"to\": \"framework/angular/reference/type-aliases/AngularTable\" },\n            { \"label\": \"AppAngularTable\", \"to\": \"framework/angular/reference/type-aliases/AppAngularTable\" },\n            { \"label\": \"CreateTableHookResult\", \"to\": \"framework/angular/reference/type-aliases/CreateTableHookResult\" },\n            { \"label\": \"CreateTableContextOptions\", \"to\": \"framework/angular/reference/type-aliases/CreateTableContextOptions\" },\n            { \"label\": \"flexRenderComponent\", \"to\": \"framework/angular/reference/functions/flexRenderComponent\" },\n            { \"label\": \"FlexRenderComponent\", \"to\": \"framework/angular/reference/interfaces/FlexRenderComponent\" },\n            { \"label\": \"FlexRenderContent\", \"to\": \"framework/angular/reference/type-aliases/FlexRenderContent\" },\n            { \"label\": \"FlexRenderInputContent\", \"to\": \"framework/angular/reference/type-aliases/FlexRenderInputContent\" },\n            { \"label\": \"FlexRenderComponentProps\", \"to\": \"framework/angular/reference/type-aliases/FlexRenderComponentProps\" },\n            { \"label\": \"FlexRender\", \"to\": \"framework/angular/reference/variables/FlexRender\" },\n            { \"label\": \"FlexRenderDirective\", \"to\": \"framework/angular/reference/classes/FlexRenderDirective\" },\n            { \"label\": \"FlexRenderCell\", \"to\": \"framework/angular/reference/classes/FlexRenderCell\" },\n            { \"label\": \"TanStackTable\", \"to\": \"framework/angular/reference/classes/TanStackTable\" },\n            { \"label\": \"TanStackTableToken\", \"to\": \"framework/angular/reference/variables/TanStackTableToken\" },\n            { \"label\": \"injectTableContext\", \"to\": \"framework/angular/reference/functions/injectTableContext\" },\n            { \"label\": \"AngularReactivityFlags\", \"to\": \"framework/angular/reference/interfaces/AngularReactivityFlags\" }\n          ]\n        }\n      ]\n    },\n    {\n      \"collapsible\": true,\n      \"defaultCollapsed\": true,\n      \"label\": \"Column API Reference\",\n      \"children\": [\n        { \"label\": \"Column\", \"to\": \"reference/type-aliases/Column\" },\n        { \"label\": \"Column_Core\", \"to\": \"reference/interfaces/Column_Core\" },\n        { \"label\": \"Column_CoreProperties\", \"to\": \"reference/interfaces/Column_CoreProperties\" },\n        { \"label\": \"Column_Column\", \"to\": \"reference/interfaces/Column_Column\" },\n        { \"label\": \"Column_Plugins\", \"to\": \"reference/interfaces/Column_Plugins\" },\n        { \"label\": \"ColumnDef\", \"to\": \"reference/type-aliases/ColumnDef\" },\n        { \"label\": \"ColumnDefBase\", \"to\": \"reference/type-aliases/ColumnDefBase\" },\n        { \"label\": \"AccessorColumnDef\", \"to\": \"reference/type-aliases/AccessorColumnDef\" },\n        { \"label\": \"DisplayColumnDef\", \"to\": \"reference/type-aliases/DisplayColumnDef\" },\n        { \"label\": \"GroupColumnDef\", \"to\": \"reference/type-aliases/GroupColumnDef\" },\n        { \"label\": \"ColumnDefTemplate\", \"to\": \"reference/type-aliases/ColumnDefTemplate\" },\n        { \"label\": \"ColumnHelper\", \"to\": \"reference/type-aliases/ColumnHelper\" },\n        { \"label\": \"ColumnDefaultOptions\", \"to\": \"reference/interfaces/ColumnDefaultOptions\" },\n        { \"label\": \"ColumnMeta\", \"to\": \"reference/interfaces/ColumnMeta\" },\n        { \"label\": \"createColumnHelper\", \"to\": \"reference/functions/createColumnHelper\" },\n        { \"label\": \"constructColumn\", \"to\": \"reference/functions/constructColumn\" },\n        { \"label\": \"column_getFlatColumns\", \"to\": \"reference/functions/column_getFlatColumns\" },\n        { \"label\": \"column_getLeafColumns\", \"to\": \"reference/functions/column_getLeafColumns\" },\n        { \"label\": \"column_getIndex\", \"to\": \"reference/functions/column_getIndex\" },\n        { \"label\": \"column_getIsFirstColumn\", \"to\": \"reference/functions/column_getIsFirstColumn\" },\n        { \"label\": \"column_getIsLastColumn\", \"to\": \"reference/functions/column_getIsLastColumn\" },\n        { \"label\": \"column_getSize\", \"to\": \"reference/functions/column_getSize\" },\n        { \"label\": \"column_getStart\", \"to\": \"reference/functions/column_getStart\" },\n        { \"label\": \"column_getAfter\", \"to\": \"reference/functions/column_getAfter\" },\n        { \"label\": \"AccessorFn\", \"to\": \"reference/type-aliases/AccessorFn\" },\n        { \"label\": \"DeepKeys\", \"to\": \"reference/type-aliases/DeepKeys\" },\n        { \"label\": \"DeepValue\", \"to\": \"reference/type-aliases/DeepValue\" }\n      ],\n      \"frameworks\": [\n        {\n          \"label\": \"react\",\n          \"children\": [\n            { \"label\": \"AppColumnHelper\", \"to\": \"framework/react/reference/index/type-aliases/AppColumnHelper\" }\n          ]\n        },\n        {\n          \"label\": \"angular\",\n          \"children\": [\n            { \"label\": \"AppColumnHelper\", \"to\": \"framework/angular/reference/type-aliases/AppColumnHelper\" }\n          ]\n        }\n      ]\n    },\n    {\n      \"collapsible\": true,\n      \"defaultCollapsed\": true,\n      \"label\": \"Row API Reference\",\n      \"children\": [\n        { \"label\": \"Row\", \"to\": \"reference/type-aliases/Row\" },\n        { \"label\": \"Row_Core\", \"to\": \"reference/interfaces/Row_Core\" },\n        { \"label\": \"Row_CoreProperties\", \"to\": \"reference/interfaces/Row_CoreProperties\" },\n        { \"label\": \"Row_Row\", \"to\": \"reference/interfaces/Row_Row\" },\n        { \"label\": \"Row_Plugins\", \"to\": \"reference/interfaces/Row_Plugins\" },\n        { \"label\": \"RowData\", \"to\": \"reference/type-aliases/RowData\" },\n        { \"label\": \"RowModel\", \"to\": \"reference/interfaces/RowModel\" },\n        { \"label\": \"constructRow\", \"to\": \"reference/functions/constructRow\" },\n        { \"label\": \"row_getValue\", \"to\": \"reference/functions/row_getValue\" },\n        { \"label\": \"row_getUniqueValues\", \"to\": \"reference/functions/row_getUniqueValues\" },\n        { \"label\": \"row_renderValue\", \"to\": \"reference/functions/row_renderValue\" },\n        { \"label\": \"row_getAllCells\", \"to\": \"reference/functions/row_getAllCells\" },\n        { \"label\": \"row_getAllCellsByColumnId\", \"to\": \"reference/functions/row_getAllCellsByColumnId\" },\n        { \"label\": \"row_getVisibleCells\", \"to\": \"reference/functions/row_getVisibleCells\" },\n        { \"label\": \"row_getLeftVisibleCells\", \"to\": \"reference/functions/row_getLeftVisibleCells\" },\n        { \"label\": \"row_getCenterVisibleCells\", \"to\": \"reference/functions/row_getCenterVisibleCells\" },\n        { \"label\": \"row_getRightVisibleCells\", \"to\": \"reference/functions/row_getRightVisibleCells\" },\n        { \"label\": \"row_getAllVisibleCells\", \"to\": \"reference/functions/row_getAllVisibleCells\" },\n        { \"label\": \"row_getLeafRows\", \"to\": \"reference/functions/row_getLeafRows\" },\n        { \"label\": \"row_getParentRow\", \"to\": \"reference/functions/row_getParentRow\" },\n        { \"label\": \"row_getParentRows\", \"to\": \"reference/functions/row_getParentRows\" },\n        { \"label\": \"RowModelFns\", \"to\": \"reference/type-aliases/RowModelFns\" },\n        { \"label\": \"RowModelFns_Core\", \"to\": \"reference/interfaces/RowModelFns_Core\" },\n        { \"label\": \"RowModelFns_Plugins\", \"to\": \"reference/interfaces/RowModelFns_Plugins\" },\n        { \"label\": \"createCoreRowModel\", \"to\": \"reference/functions/createCoreRowModel\" },\n        { \"label\": \"createFilteredRowModel\", \"to\": \"reference/functions/createFilteredRowModel\" },\n        { \"label\": \"createSortedRowModel\", \"to\": \"reference/functions/createSortedRowModel\" },\n        { \"label\": \"createGroupedRowModel\", \"to\": \"reference/functions/createGroupedRowModel\" },\n        { \"label\": \"createExpandedRowModel\", \"to\": \"reference/functions/createExpandedRowModel\" },\n        { \"label\": \"createPaginatedRowModel\", \"to\": \"reference/functions/createPaginatedRowModel\" },\n        { \"label\": \"createFacetedRowModel\", \"to\": \"reference/functions/createFacetedRowModel\" },\n        { \"label\": \"createFacetedMinMaxValues\", \"to\": \"reference/functions/createFacetedMinMaxValues\" },\n        { \"label\": \"createFacetedUniqueValues\", \"to\": \"reference/functions/createFacetedUniqueValues\" },\n        { \"label\": \"Table_RowModels_Core\", \"to\": \"reference/interfaces/Table_RowModels_Core\" },\n        { \"label\": \"Table_RowModels_Filtered\", \"to\": \"reference/interfaces/Table_RowModels_Filtered\" },\n        { \"label\": \"Table_RowModels_Sorted\", \"to\": \"reference/interfaces/Table_RowModels_Sorted\" },\n        { \"label\": \"Table_RowModels_Grouped\", \"to\": \"reference/interfaces/Table_RowModels_Grouped\" },\n        { \"label\": \"Table_RowModels_Expanded\", \"to\": \"reference/interfaces/Table_RowModels_Expanded\" },\n        { \"label\": \"Table_RowModels_Paginated\", \"to\": \"reference/interfaces/Table_RowModels_Paginated\" },\n        { \"label\": \"Table_RowModels_Faceted\", \"to\": \"reference/interfaces/Table_RowModels_Faceted\" }\n      ]\n    },\n    {\n      \"collapsible\": true,\n      \"defaultCollapsed\": true,\n      \"label\": \"Cell API Reference\",\n      \"children\": [\n        { \"label\": \"Cell\", \"to\": \"reference/type-aliases/Cell\" },\n        { \"label\": \"Cell_Core\", \"to\": \"reference/interfaces/Cell_Core\" },\n        { \"label\": \"Cell_CoreProperties\", \"to\": \"reference/interfaces/Cell_CoreProperties\" },\n        { \"label\": \"Cell_Cell\", \"to\": \"reference/interfaces/Cell_Cell\" },\n        { \"label\": \"Cell_ColumnGrouping\", \"to\": \"reference/interfaces/Cell_ColumnGrouping\" },\n        { \"label\": \"Cell_Plugins\", \"to\": \"reference/interfaces/Cell_Plugins\" },\n        { \"label\": \"CellContext\", \"to\": \"reference/interfaces/CellContext\" },\n        { \"label\": \"CellData\", \"to\": \"reference/type-aliases/CellData\" },\n        { \"label\": \"constructCell\", \"to\": \"reference/functions/constructCell\" },\n        { \"label\": \"cell_getContext\", \"to\": \"reference/functions/cell_getContext\" },\n        { \"label\": \"cell_getValue\", \"to\": \"reference/functions/cell_getValue\" },\n        { \"label\": \"cell_renderValue\", \"to\": \"reference/functions/cell_renderValue\" },\n        { \"label\": \"cell_getIsGrouped\", \"to\": \"reference/functions/cell_getIsGrouped\" },\n        { \"label\": \"cell_getIsPlaceholder\", \"to\": \"reference/functions/cell_getIsPlaceholder\" },\n        { \"label\": \"cell_getIsAggregated\", \"to\": \"reference/functions/cell_getIsAggregated\" }\n      ],\n      \"frameworks\": [\n        {\n          \"label\": \"react\",\n          \"children\": [\n            { \"label\": \"AppCellContext\", \"to\": \"framework/react/reference/index/type-aliases/AppCellContext\" },\n            { \"label\": \"AppCellComponent\", \"to\": \"framework/react/reference/index/interfaces/AppCellComponent\" },\n            { \"label\": \"AppCellPropsWithSelector\", \"to\": \"framework/react/reference/index/interfaces/AppCellPropsWithSelector\" },\n            { \"label\": \"AppCellPropsWithoutSelector\", \"to\": \"framework/react/reference/index/interfaces/AppCellPropsWithoutSelector\" }\n          ]\n        },\n        {\n          \"label\": \"angular\",\n          \"children\": [\n            { \"label\": \"AppCellContext\", \"to\": \"framework/angular/reference/type-aliases/AppCellContext\" },\n            { \"label\": \"TanStackTableCell\", \"to\": \"framework/angular/reference/classes/TanStackTableCell\" },\n            { \"label\": \"TanStackTableCellToken\", \"to\": \"framework/angular/reference/variables/TanStackTableCellToken\" },\n            { \"label\": \"TanStackTableCellContext\", \"to\": \"framework/angular/reference/interfaces/TanStackTableCellContext\" },\n            { \"label\": \"injectTableCellContext\", \"to\": \"framework/angular/reference/functions/injectTableCellContext\" }\n          ]\n        }\n      ]\n    },\n    {\n      \"collapsible\": true,\n      \"defaultCollapsed\": true,\n      \"label\": \"Header API Reference\",\n      \"children\": [\n        { \"label\": \"Header\", \"to\": \"reference/type-aliases/Header\" },\n        { \"label\": \"Header_Core\", \"to\": \"reference/interfaces/Header_Core\" },\n        { \"label\": \"Header_CoreProperties\", \"to\": \"reference/interfaces/Header_CoreProperties\" },\n        { \"label\": \"Header_Header\", \"to\": \"reference/interfaces/Header_Header\" },\n        { \"label\": \"Header_Plugins\", \"to\": \"reference/interfaces/Header_Plugins\" },\n        { \"label\": \"HeaderGroup\", \"to\": \"reference/type-aliases/HeaderGroup\" },\n        { \"label\": \"HeaderGroup_Core\", \"to\": \"reference/interfaces/HeaderGroup_Core\" },\n        { \"label\": \"HeaderGroup_Header\", \"to\": \"reference/interfaces/HeaderGroup_Header\" },\n        { \"label\": \"HeaderGroup_Plugins\", \"to\": \"reference/interfaces/HeaderGroup_Plugins\" },\n        { \"label\": \"HeaderContext\", \"to\": \"reference/interfaces/HeaderContext\" },\n        { \"label\": \"constructHeader\", \"to\": \"reference/functions/constructHeader\" },\n        { \"label\": \"buildHeaderGroups\", \"to\": \"reference/functions/buildHeaderGroups\" },\n        { \"label\": \"header_getContext\", \"to\": \"reference/functions/header_getContext\" },\n        { \"label\": \"header_getLeafHeaders\", \"to\": \"reference/functions/header_getLeafHeaders\" },\n        { \"label\": \"header_getSize\", \"to\": \"reference/functions/header_getSize\" },\n        { \"label\": \"header_getStart\", \"to\": \"reference/functions/header_getStart\" },\n        { \"label\": \"header_getResizeHandler\", \"to\": \"reference/functions/header_getResizeHandler\" },\n        { \"label\": \"table_getHeaderGroups\", \"to\": \"reference/functions/table_getHeaderGroups\" },\n        { \"label\": \"table_getLeftHeaderGroups\", \"to\": \"reference/functions/table_getLeftHeaderGroups\" },\n        { \"label\": \"table_getCenterHeaderGroups\", \"to\": \"reference/functions/table_getCenterHeaderGroups\" },\n        { \"label\": \"table_getRightHeaderGroups\", \"to\": \"reference/functions/table_getRightHeaderGroups\" },\n        { \"label\": \"table_getFooterGroups\", \"to\": \"reference/functions/table_getFooterGroups\" },\n        { \"label\": \"table_getLeftFooterGroups\", \"to\": \"reference/functions/table_getLeftFooterGroups\" },\n        { \"label\": \"table_getCenterFooterGroups\", \"to\": \"reference/functions/table_getCenterFooterGroups\" },\n        { \"label\": \"table_getRightFooterGroups\", \"to\": \"reference/functions/table_getRightFooterGroups\" },\n        { \"label\": \"table_getFlatHeaders\", \"to\": \"reference/functions/table_getFlatHeaders\" },\n        { \"label\": \"table_getLeftFlatHeaders\", \"to\": \"reference/functions/table_getLeftFlatHeaders\" },\n        { \"label\": \"table_getCenterFlatHeaders\", \"to\": \"reference/functions/table_getCenterFlatHeaders\" },\n        { \"label\": \"table_getRightFlatHeaders\", \"to\": \"reference/functions/table_getRightFlatHeaders\" },\n        { \"label\": \"table_getLeafHeaders\", \"to\": \"reference/functions/table_getLeafHeaders\" },\n        { \"label\": \"table_getLeftLeafHeaders\", \"to\": \"reference/functions/table_getLeftLeafHeaders\" },\n        { \"label\": \"table_getCenterLeafHeaders\", \"to\": \"reference/functions/table_getCenterLeafHeaders\" },\n        { \"label\": \"table_getRightLeafHeaders\", \"to\": \"reference/functions/table_getRightLeafHeaders\" }\n      ],\n      \"frameworks\": [\n        {\n          \"label\": \"react\",\n          \"children\": [\n            { \"label\": \"AppHeaderContext\", \"to\": \"framework/react/reference/index/type-aliases/AppHeaderContext\" },\n            { \"label\": \"AppHeaderComponent\", \"to\": \"framework/react/reference/index/interfaces/AppHeaderComponent\" },\n            { \"label\": \"AppHeaderPropsWithSelector\", \"to\": \"framework/react/reference/index/interfaces/AppHeaderPropsWithSelector\" },\n            { \"label\": \"AppHeaderPropsWithoutSelector\", \"to\": \"framework/react/reference/index/interfaces/AppHeaderPropsWithoutSelector\" }\n          ]\n        },\n        {\n          \"label\": \"angular\",\n          \"children\": [\n            { \"label\": \"AppHeaderContext\", \"to\": \"framework/angular/reference/type-aliases/AppHeaderContext\" },\n            { \"label\": \"TanStackTableHeader\", \"to\": \"framework/angular/reference/classes/TanStackTableHeader\" },\n            { \"label\": \"TanStackTableHeaderToken\", \"to\": \"framework/angular/reference/variables/TanStackTableHeaderToken\" },\n            { \"label\": \"TanStackTableHeaderContext\", \"to\": \"framework/angular/reference/interfaces/TanStackTableHeaderContext\" },\n            { \"label\": \"injectTableHeaderContext\", \"to\": \"framework/angular/reference/functions/injectTableHeaderContext\" },\n            { \"label\": \"injectFlexRenderContext\", \"to\": \"framework/angular/reference/functions/injectFlexRenderContext\" }\n          ]\n        }\n      ]\n    },\n    {\n      \"collapsible\": true,\n      \"defaultCollapsed\": true,\n      \"label\": \"Features API Reference\",\n      \"children\": [\n        { \"label\": \"stockFeatures\", \"to\": \"reference/variables/stockFeatures\" },\n        { \"label\": \"coreFeatures\", \"to\": \"reference/variables/coreFeatures\" },\n        { \"label\": \"coreCellsFeature\", \"to\": \"reference/variables/coreCellsFeature\" },\n        { \"label\": \"coreColumnsFeature\", \"to\": \"reference/variables/coreColumnsFeature\" },\n        { \"label\": \"coreHeadersFeature\", \"to\": \"reference/variables/coreHeadersFeature\" },\n        { \"label\": \"coreRowModelsFeature\", \"to\": \"reference/variables/coreRowModelsFeature\" },\n        { \"label\": \"coreRowsFeature\", \"to\": \"reference/variables/coreRowsFeature\" },\n        { \"label\": \"coreTablesFeature\", \"to\": \"reference/variables/coreTablesFeature\" },\n        { \"label\": \"columnFilteringFeature\", \"to\": \"reference/variables/columnFilteringFeature\" },\n        { \"label\": \"columnFacetingFeature\", \"to\": \"reference/variables/columnFacetingFeature\" },\n        { \"label\": \"columnGroupingFeature\", \"to\": \"reference/variables/columnGroupingFeature\" },\n        { \"label\": \"columnOrderingFeature\", \"to\": \"reference/variables/columnOrderingFeature\" },\n        { \"label\": \"columnPinningFeature\", \"to\": \"reference/variables/columnPinningFeature\" },\n        { \"label\": \"columnResizingFeature\", \"to\": \"reference/variables/columnResizingFeature\" },\n        { \"label\": \"columnSizingFeature\", \"to\": \"reference/variables/columnSizingFeature\" },\n        { \"label\": \"columnVisibilityFeature\", \"to\": \"reference/variables/columnVisibilityFeature\" },\n        { \"label\": \"globalFilteringFeature\", \"to\": \"reference/variables/globalFilteringFeature\" },\n        { \"label\": \"rowExpandingFeature\", \"to\": \"reference/variables/rowExpandingFeature\" },\n        { \"label\": \"rowPaginationFeature\", \"to\": \"reference/variables/rowPaginationFeature\" },\n        { \"label\": \"rowPinningFeature\", \"to\": \"reference/variables/rowPinningFeature\" },\n        { \"label\": \"rowSelectionFeature\", \"to\": \"reference/variables/rowSelectionFeature\" },\n        { \"label\": \"rowSortingFeature\", \"to\": \"reference/variables/rowSortingFeature\" },\n        { \"label\": \"Column_ColumnFiltering\", \"to\": \"reference/interfaces/Column_ColumnFiltering\" },\n        { \"label\": \"Column_ColumnFaceting\", \"to\": \"reference/interfaces/Column_ColumnFaceting\" },\n        { \"label\": \"Column_ColumnGrouping\", \"to\": \"reference/interfaces/Column_ColumnGrouping\" },\n        { \"label\": \"Column_ColumnOrdering\", \"to\": \"reference/interfaces/Column_ColumnOrdering\" },\n        { \"label\": \"Column_ColumnPinning\", \"to\": \"reference/interfaces/Column_ColumnPinning\" },\n        { \"label\": \"Column_ColumnResizing\", \"to\": \"reference/interfaces/Column_ColumnResizing\" },\n        { \"label\": \"Column_ColumnSizing\", \"to\": \"reference/interfaces/Column_ColumnSizing\" },\n        { \"label\": \"Column_ColumnVisibility\", \"to\": \"reference/interfaces/Column_ColumnVisibility\" },\n        { \"label\": \"Column_GlobalFiltering\", \"to\": \"reference/interfaces/Column_GlobalFiltering\" },\n        { \"label\": \"Column_RowSorting\", \"to\": \"reference/interfaces/Column_RowSorting\" },\n        { \"label\": \"Table_ColumnFiltering\", \"to\": \"reference/interfaces/Table_ColumnFiltering\" },\n        { \"label\": \"Table_ColumnFaceting\", \"to\": \"reference/interfaces/Table_ColumnFaceting\" },\n        { \"label\": \"Table_ColumnGrouping\", \"to\": \"reference/interfaces/Table_ColumnGrouping\" },\n        { \"label\": \"Table_ColumnOrdering\", \"to\": \"reference/interfaces/Table_ColumnOrdering\" },\n        { \"label\": \"Table_ColumnPinning\", \"to\": \"reference/interfaces/Table_ColumnPinning\" },\n        { \"label\": \"Table_ColumnResizing\", \"to\": \"reference/interfaces/Table_ColumnResizing\" },\n        { \"label\": \"Table_ColumnSizing\", \"to\": \"reference/interfaces/Table_ColumnSizing\" },\n        { \"label\": \"Table_ColumnVisibility\", \"to\": \"reference/interfaces/Table_ColumnVisibility\" },\n        { \"label\": \"Table_GlobalFiltering\", \"to\": \"reference/interfaces/Table_GlobalFiltering\" },\n        { \"label\": \"Table_RowExpanding\", \"to\": \"reference/interfaces/Table_RowExpanding\" },\n        { \"label\": \"Table_RowPagination\", \"to\": \"reference/interfaces/Table_RowPagination\" },\n        { \"label\": \"Table_RowPinning\", \"to\": \"reference/interfaces/Table_RowPinning\" },\n        { \"label\": \"Table_RowSelection\", \"to\": \"reference/interfaces/Table_RowSelection\" },\n        { \"label\": \"Table_RowSorting\", \"to\": \"reference/interfaces/Table_RowSorting\" },\n        { \"label\": \"Row_ColumnFiltering\", \"to\": \"reference/interfaces/Row_ColumnFiltering\" },\n        { \"label\": \"Row_ColumnGrouping\", \"to\": \"reference/interfaces/Row_ColumnGrouping\" },\n        { \"label\": \"Row_ColumnPinning\", \"to\": \"reference/interfaces/Row_ColumnPinning\" },\n        { \"label\": \"Row_ColumnVisibility\", \"to\": \"reference/interfaces/Row_ColumnVisibility\" },\n        { \"label\": \"Row_RowExpanding\", \"to\": \"reference/interfaces/Row_RowExpanding\" },\n        { \"label\": \"Row_RowPinning\", \"to\": \"reference/interfaces/Row_RowPinning\" },\n        { \"label\": \"Row_RowSelection\", \"to\": \"reference/interfaces/Row_RowSelection\" },\n        { \"label\": \"Header_ColumnResizing\", \"to\": \"reference/interfaces/Header_ColumnResizing\" },\n        { \"label\": \"Header_ColumnSizing\", \"to\": \"reference/interfaces/Header_ColumnSizing\" },\n        { \"label\": \"TableOptions_ColumnFiltering\", \"to\": \"reference/interfaces/TableOptions_ColumnFiltering\" },\n        { \"label\": \"TableOptions_ColumnGrouping\", \"to\": \"reference/interfaces/TableOptions_ColumnGrouping\" },\n        { \"label\": \"TableOptions_ColumnOrdering\", \"to\": \"reference/interfaces/TableOptions_ColumnOrdering\" },\n        { \"label\": \"TableOptions_ColumnPinning\", \"to\": \"reference/interfaces/TableOptions_ColumnPinning\" },\n        { \"label\": \"TableOptions_ColumnResizing\", \"to\": \"reference/interfaces/TableOptions_ColumnResizing\" },\n        { \"label\": \"TableOptions_ColumnSizing\", \"to\": \"reference/interfaces/TableOptions_ColumnSizing\" },\n        { \"label\": \"TableOptions_ColumnVisibility\", \"to\": \"reference/interfaces/TableOptions_ColumnVisibility\" },\n        { \"label\": \"TableOptions_GlobalFiltering\", \"to\": \"reference/interfaces/TableOptions_GlobalFiltering\" },\n        { \"label\": \"TableOptions_RowExpanding\", \"to\": \"reference/interfaces/TableOptions_RowExpanding\" },\n        { \"label\": \"TableOptions_RowPagination\", \"to\": \"reference/interfaces/TableOptions_RowPagination\" },\n        { \"label\": \"TableOptions_RowPinning\", \"to\": \"reference/interfaces/TableOptions_RowPinning\" },\n        { \"label\": \"TableOptions_RowSelection\", \"to\": \"reference/interfaces/TableOptions_RowSelection\" },\n        { \"label\": \"TableOptions_RowSorting\", \"to\": \"reference/interfaces/TableOptions_RowSorting\" },\n        { \"label\": \"TableState_ColumnFiltering\", \"to\": \"reference/interfaces/TableState_ColumnFiltering\" },\n        { \"label\": \"TableState_ColumnGrouping\", \"to\": \"reference/interfaces/TableState_ColumnGrouping\" },\n        { \"label\": \"TableState_ColumnOrdering\", \"to\": \"reference/interfaces/TableState_ColumnOrdering\" },\n        { \"label\": \"TableState_ColumnPinning\", \"to\": \"reference/interfaces/TableState_ColumnPinning\" },\n        { \"label\": \"TableState_ColumnResizing\", \"to\": \"reference/interfaces/TableState_ColumnResizing\" },\n        { \"label\": \"TableState_ColumnSizing\", \"to\": \"reference/interfaces/TableState_ColumnSizing\" },\n        { \"label\": \"TableState_ColumnVisibility\", \"to\": \"reference/interfaces/TableState_ColumnVisibility\" },\n        { \"label\": \"TableState_GlobalFiltering\", \"to\": \"reference/interfaces/TableState_GlobalFiltering\" },\n        { \"label\": \"TableState_RowExpanding\", \"to\": \"reference/interfaces/TableState_RowExpanding\" },\n        { \"label\": \"TableState_RowPagination\", \"to\": \"reference/interfaces/TableState_RowPagination\" },\n        { \"label\": \"TableState_RowPinning\", \"to\": \"reference/interfaces/TableState_RowPinning\" },\n        { \"label\": \"TableState_RowSelection\", \"to\": \"reference/interfaces/TableState_RowSelection\" },\n        { \"label\": \"TableState_RowSorting\", \"to\": \"reference/interfaces/TableState_RowSorting\" },\n        { \"label\": \"ColumnDef_ColumnFiltering\", \"to\": \"reference/interfaces/ColumnDef_ColumnFiltering\" },\n        { \"label\": \"ColumnDef_ColumnGrouping\", \"to\": \"reference/interfaces/ColumnDef_ColumnGrouping\" },\n        { \"label\": \"ColumnDef_ColumnPinning\", \"to\": \"reference/interfaces/ColumnDef_ColumnPinning\" },\n        { \"label\": \"ColumnDef_ColumnResizing\", \"to\": \"reference/interfaces/ColumnDef_ColumnResizing\" },\n        { \"label\": \"ColumnDef_ColumnSizing\", \"to\": \"reference/interfaces/ColumnDef_ColumnSizing\" },\n        { \"label\": \"ColumnDef_ColumnVisibility\", \"to\": \"reference/interfaces/ColumnDef_ColumnVisibility\" },\n        { \"label\": \"ColumnDef_GlobalFiltering\", \"to\": \"reference/interfaces/ColumnDef_GlobalFiltering\" },\n        { \"label\": \"ColumnDef_RowSorting\", \"to\": \"reference/interfaces/ColumnDef_RowSorting\" },\n        { \"label\": \"ColumnDef_Plugins\", \"to\": \"reference/interfaces/ColumnDef_Plugins\" },\n        { \"label\": \"ColumnPinningState\", \"to\": \"reference/interfaces/ColumnPinningState\" },\n        { \"label\": \"ColumnSort\", \"to\": \"reference/interfaces/ColumnSort\" },\n        { \"label\": \"ColumnFilter\", \"to\": \"reference/interfaces/ColumnFilter\" },\n        { \"label\": \"PaginationState\", \"to\": \"reference/interfaces/PaginationState\" },\n        { \"label\": \"RowPinningState\", \"to\": \"reference/interfaces/RowPinningState\" },\n        { \"label\": \"columnResizingState\", \"to\": \"reference/interfaces/columnResizingState\" },\n        { \"label\": \"ColumnFiltersState\", \"to\": \"reference/type-aliases/ColumnFiltersState\" },\n        { \"label\": \"ColumnOrderState\", \"to\": \"reference/type-aliases/ColumnOrderState\" },\n        { \"label\": \"ColumnSizingState\", \"to\": \"reference/type-aliases/ColumnSizingState\" },\n        { \"label\": \"ColumnVisibilityState\", \"to\": \"reference/type-aliases/ColumnVisibilityState\" },\n        { \"label\": \"ExpandedState\", \"to\": \"reference/type-aliases/ExpandedState\" },\n        { \"label\": \"GroupingState\", \"to\": \"reference/type-aliases/GroupingState\" },\n        { \"label\": \"RowSelectionState\", \"to\": \"reference/type-aliases/RowSelectionState\" },\n        { \"label\": \"SortingState\", \"to\": \"reference/type-aliases/SortingState\" },\n        { \"label\": \"FilterFn\", \"to\": \"reference/interfaces/FilterFn\" },\n        { \"label\": \"FilterFns\", \"to\": \"reference/interfaces/FilterFns\" },\n        { \"label\": \"FilterMeta\", \"to\": \"reference/interfaces/FilterMeta\" },\n        { \"label\": \"SortFn\", \"to\": \"reference/interfaces/SortFn\" },\n        { \"label\": \"SortFns\", \"to\": \"reference/interfaces/SortFns\" },\n        { \"label\": \"AggregationFns\", \"to\": \"reference/interfaces/AggregationFns\" },\n        { \"label\": \"filterFns\", \"to\": \"reference/variables/filterFns\" },\n        { \"label\": \"sortFns\", \"to\": \"reference/variables/sortFns\" },\n        { \"label\": \"aggregationFns\", \"to\": \"reference/variables/aggregationFns\" }\n      ]\n    },\n    {\n      \"collapsible\": true,\n      \"defaultCollapsed\": true,\n      \"label\": \"Legacy API Reference\",\n      \"children\": [],\n      \"frameworks\": [\n        {\n          \"label\": \"react\",\n          \"children\": [\n            { \"label\": \"Legacy API Overview\", \"to\": \"framework/react/reference/legacy/index\" },\n            { \"label\": \"useLegacyTable\", \"to\": \"framework/react/reference/legacy/functions/useLegacyTable\" },\n            { \"label\": \"legacyCreateColumnHelper\", \"to\": \"framework/react/reference/legacy/functions/legacyCreateColumnHelper\" },\n            { \"label\": \"getCoreRowModel\", \"to\": \"framework/react/reference/legacy/functions/getCoreRowModel\" },\n            { \"label\": \"getFilteredRowModel\", \"to\": \"framework/react/reference/legacy/functions/getFilteredRowModel\" },\n            { \"label\": \"getSortedRowModel\", \"to\": \"framework/react/reference/legacy/functions/getSortedRowModel\" },\n            { \"label\": \"getGroupedRowModel\", \"to\": \"framework/react/reference/legacy/functions/getGroupedRowModel\" },\n            { \"label\": \"getExpandedRowModel\", \"to\": \"framework/react/reference/legacy/functions/getExpandedRowModel\" },\n            { \"label\": \"getPaginationRowModel\", \"to\": \"framework/react/reference/legacy/functions/getPaginationRowModel\" },\n            { \"label\": \"getFacetedRowModel\", \"to\": \"framework/react/reference/legacy/functions/getFacetedRowModel\" },\n            { \"label\": \"getFacetedMinMaxValues\", \"to\": \"framework/react/reference/legacy/functions/getFacetedMinMaxValues\" },\n            { \"label\": \"getFacetedUniqueValues\", \"to\": \"framework/react/reference/legacy/functions/getFacetedUniqueValues\" },\n            { \"label\": \"LegacyRowModelOptions\", \"to\": \"framework/react/reference/legacy/interfaces/LegacyRowModelOptions\" },\n            { \"label\": \"LegacyTable\", \"to\": \"framework/react/reference/legacy/type-aliases/LegacyTable\" },\n            { \"label\": \"LegacyTableOptions\", \"to\": \"framework/react/reference/legacy/type-aliases/LegacyTableOptions\" },\n            { \"label\": \"LegacyReactTable\", \"to\": \"framework/react/reference/legacy/type-aliases/LegacyReactTable\" },\n            { \"label\": \"LegacyColumnDef\", \"to\": \"framework/react/reference/legacy/type-aliases/LegacyColumnDef\" },\n            { \"label\": \"LegacyColumn\", \"to\": \"framework/react/reference/legacy/type-aliases/LegacyColumn\" },\n            { \"label\": \"LegacyRow\", \"to\": \"framework/react/reference/legacy/type-aliases/LegacyRow\" },\n            { \"label\": \"LegacyCell\", \"to\": \"framework/react/reference/legacy/type-aliases/LegacyCell\" },\n            { \"label\": \"LegacyHeader\", \"to\": \"framework/react/reference/legacy/type-aliases/LegacyHeader\" },\n            { \"label\": \"LegacyHeaderGroup\", \"to\": \"framework/react/reference/legacy/type-aliases/LegacyHeaderGroup\" }\n          ]\n        }\n      ]\n    },\n    {\n      \"label\": \"Enterprise\",\n      \"children\": [\n        {\n          \"label\": \"AG Grid\",\n          \"to\": \"enterprise/ag-grid\"\n        }\n      ]\n    },\n    {\n      \"label\": \"Basic Examples\",\n      \"children\": [],\n      \"frameworks\": [\n        {\n          \"label\": \"angular\",\n          \"children\": [\n            { \"to\": \"framework/angular/examples/basic\", \"label\": \"Basic\" },\n            { \"to\": \"framework/angular/examples/basic-app-table\", \"label\": \"Basic (App Table)\" }\n          ]\n        },\n        {\n          \"label\": \"lit\",\n          \"children\": [\n            { \"to\": \"framework/lit/examples/basic\", \"label\": \"Basic\" }\n          ]\n        },\n        {\n          \"label\": \"react\",\n          \"children\": [\n            { \"to\": \"framework/react/examples/basic-use-table\", \"label\": \"Basic (useTable)\" },\n            { \"to\": \"framework/react/examples/basic-use-app-table\", \"label\": \"Basic (useAppTable)\" },\n            { \"to\": \"framework/react/examples/basic-use-legacy-table\", \"label\": \"Basic (useLegacyTable)\" },\n            { \"to\": \"framework/react/examples/basic-external-state\", \"label\": \"Basic (External State)\" },\n            { \"to\": \"framework/react/examples/basic-external-store\", \"label\": \"Basic (External Store)\" },\n            { \"to\": \"framework/react/examples/basic-shadcn\", \"label\": \"Shadcn Basic\" },\n            { \"to\": \"framework/react/examples/column-groups\", \"label\": \"Header Groups\" }\n          ]\n        },\n        {\n          \"label\": \"solid\",\n          \"children\": [\n            { \"to\": \"framework/solid/examples/basic-use-table\", \"label\": \"Basic (createTable)\" },\n            { \"to\": \"framework/solid/examples/basic-app-table\", \"label\": \"Basic (createAppTable)\" },\n            { \"to\": \"framework/solid/examples/basic-external-state\", \"label\": \"Basic (External State)\" },\n            { \"to\": \"framework/solid/examples/basic-external-store\", \"label\": \"Basic (External Store)\" },\n            { \"to\": \"framework/solid/examples/column-groups\", \"label\": \"Header Groups\" }\n          ]\n        },\n        {\n          \"label\": \"svelte\",\n          \"children\": [\n            { \"to\": \"framework/svelte/examples/basic\", \"label\": \"Basic\" },\n            { \"to\": \"framework/svelte/examples/basic-snippets\", \"label\": \"Basic Snippets\" },\n            { \"to\": \"framework/svelte/examples/basic-table-helper\", \"label\": \"Basic with Helpers\" },\n            { \"to\": \"framework/svelte/examples/column-groups\", \"label\": \"Header Groups\" }\n          ]\n        },\n        {\n          \"label\": \"vue\",\n          \"children\": [\n            { \"to\": \"framework/vue/examples/basic\", \"label\": \"Basic\" }\n          ]\n        },\n        {\n          \"label\": \"preact\",\n          \"children\": [\n            { \"to\": \"framework/preact/examples/basic\", \"label\": \"Basic\" }\n          ]\n        },\n        {\n          \"label\": \"vanilla\",\n          \"children\": [\n            { \"to\": \"framework/vanilla/examples/basic\", \"label\": \"Basic\" }\n          ]\n        }\n      ]\n    },\n    {\n      \"label\": \"Feature Examples\",\n      \"children\": [],\n      \"frameworks\": [\n        {\n          \"label\": \"angular\",\n          \"children\": [\n            { \"to\": \"framework/angular/examples/filters\", \"label\": \"Column Filters\" },\n            { \"to\": \"framework/angular/examples/column-ordering\", \"label\": \"Column Ordering\" },\n            { \"to\": \"framework/angular/examples/column-pinning\", \"label\": \"Column Pinning\" },\n            { \"to\": \"framework/angular/examples/column-pinning-sticky\", \"label\": \"Column Pinning (Sticky)\" },\n            { \"to\": \"framework/angular/examples/column-resizing-performant\", \"label\": \"Column Resizing\" },\n            { \"to\": \"framework/angular/examples/column-visibility\", \"label\": \"Column Visibility\" },\n            { \"to\": \"framework/angular/examples/expanding\", \"label\": \"Row Expanding\" },\n            { \"to\": \"framework/angular/examples/grouping\", \"label\": \"Column Grouping\" },\n            { \"to\": \"framework/angular/examples/row-selection\", \"label\": \"Row Selection\" },\n            { \"to\": \"framework/angular/examples/row-selection-signal\", \"label\": \"Row Selection (Signal)\" }\n          ]\n        },\n        {\n          \"label\": \"lit\",\n          \"children\": [\n            { \"to\": \"framework/lit/examples/column-sizing\", \"label\": \"Column Sizing\" },\n            { \"to\": \"framework/lit/examples/filters\", \"label\": \"Filters\" },\n            { \"to\": \"framework/lit/examples/row-selection\", \"label\": \"Row Selection\" },\n            { \"to\": \"framework/lit/examples/sorting\", \"label\": \"Sorting\" },\n            { \"to\": \"framework/lit/examples/sorting-dynamic-data\", \"label\": \"Sorting (Dynamic Data)\" }\n          ]\n        },\n        {\n          \"label\": \"react\",\n          \"children\": [\n            { \"to\": \"framework/react/examples/filters\", \"label\": \"Column Filters\" },\n            { \"to\": \"framework/react/examples/filters-faceted\", \"label\": \"Column Filters (Faceted)\" },\n            { \"to\": \"framework/react/examples/filters-fuzzy\", \"label\": \"Fuzzy Search Filters\" },\n            { \"to\": \"framework/react/examples/column-ordering\", \"label\": \"Column Ordering\" },\n            { \"to\": \"framework/react/examples/column-dnd\", \"label\": \"Column Ordering (DnD)\" },\n            { \"to\": \"framework/react/examples/column-pinning\", \"label\": \"Column Pinning\" },\n            { \"to\": \"framework/react/examples/column-pinning-split\", \"label\": \"Column Pinning (Split)\" },\n            { \"to\": \"framework/react/examples/column-pinning-sticky\", \"label\": \"Sticky Column Pinning\" },\n            { \"to\": \"framework/react/examples/column-sizing\", \"label\": \"Column Sizing\" },\n            { \"to\": \"framework/react/examples/column-resizing\", \"label\": \"Column Resizing\" },\n            { \"to\": \"framework/react/examples/column-resizing-performant\", \"label\": \"Performant Column Resizing\" },\n            { \"to\": \"framework/react/examples/column-visibility\", \"label\": \"Column Visibility\" },\n            { \"to\": \"framework/react/examples/expanding\", \"label\": \"Expanding\" },\n            { \"to\": \"framework/react/examples/grouping\", \"label\": \"Grouping\" },\n            { \"to\": \"framework/react/examples/pagination\", \"label\": \"Pagination\" },\n            { \"to\": \"framework/react/examples/row-dnd\", \"label\": \"Row DnD\" },\n            { \"to\": \"framework/react/examples/row-pinning\", \"label\": \"Row Pinning\" },\n            { \"to\": \"framework/react/examples/row-selection\", \"label\": \"Row Selection\" },\n            { \"to\": \"framework/react/examples/sorting\", \"label\": \"Sorting\" }\n          ]\n        },\n        {\n          \"label\": \"solid\",\n          \"children\": [\n            { \"to\": \"framework/solid/examples/column-ordering\", \"label\": \"Column Ordering\" },\n            { \"to\": \"framework/solid/examples/column-visibility\", \"label\": \"Column Visibility\" },\n            { \"to\": \"framework/solid/examples/filters\", \"label\": \"Filters\" },\n            { \"to\": \"framework/solid/examples/filters-faceted\", \"label\": \"Filters (Faceted)\" },\n            { \"to\": \"framework/solid/examples/row-selection\", \"label\": \"Row Selection\" },\n            { \"to\": \"framework/solid/examples/sorting\", \"label\": \"Sorting\" }\n          ]\n        },\n        {\n          \"label\": \"svelte\",\n          \"children\": [\n            { \"to\": \"framework/svelte/examples/column-ordering\", \"label\": \"Column Ordering\" },\n            { \"to\": \"framework/svelte/examples/column-pinning\", \"label\": \"Column Pinning\" },\n            { \"to\": \"framework/svelte/examples/column-visibility\", \"label\": \"Column Visibility\" },\n            { \"to\": \"framework/svelte/examples/filtering\", \"label\": \"Filtering\" },\n            { \"to\": \"framework/svelte/examples/row-selection\", \"label\": \"Row Selection\" },\n            { \"to\": \"framework/svelte/examples/sorting\", \"label\": \"Sorting\" }\n          ]\n        },\n        {\n          \"label\": \"vue\",\n          \"children\": [\n            { \"to\": \"framework/vue/examples/column-ordering\", \"label\": \"Column Ordering\" },\n            { \"to\": \"framework/vue/examples/column-pinning\", \"label\": \"Column Pinning\" },\n            { \"to\": \"framework/vue/examples/pagination\", \"label\": \"Pagination\" },\n            { \"to\": \"framework/vue/examples/pagination-controlled\", \"label\": \"Pagination Controlled\" },\n            { \"to\": \"framework/vue/examples/row-selection\", \"label\": \"Row Selection\" },\n            { \"to\": \"framework/vue/examples/sorting\", \"label\": \"Sorting\" },\n            { \"to\": \"framework/vue/examples/filters\", \"label\": \"Column Filters\" }\n          ]\n        },\n        {\n          \"label\": \"preact\",\n          \"children\": [\n            { \"to\": \"framework/preact/examples/sorting\", \"label\": \"Sorting\" }\n          ]\n        },\n        {\n          \"label\": \"vanilla\",\n          \"children\": [\n            { \"to\": \"framework/vanilla/examples/pagination\", \"label\": \"Pagination\" },\n            { \"to\": \"framework/vanilla/examples/sorting\", \"label\": \"Sorting\" }\n          ]\n        }\n      ]\n    },\n    {\n      \"label\": \"Specialized Examples\",\n      \"children\": [],\n      \"frameworks\": [\n        {\n          \"label\": \"angular\",\n          \"children\": [\n            { \"to\": \"framework/angular/examples/composable-tables\", \"label\": \"Composable Tables\" },\n            { \"to\": \"framework/angular/examples/custom-plugin\", \"label\": \"Custom Plugin\" },\n            { \"to\": \"framework/angular/examples/sub-components\", \"label\": \"Sub Components\" },\n            { \"to\": \"framework/angular/examples/remote-data\", \"label\": \"Fetch API data (SPA / SSR)\" },\n            { \"to\": \"framework/angular/examples/signal-input\", \"label\": \"Signal Input\" },\n            { \"to\": \"framework/angular/examples/editable\", \"label\": \"Editable data\" },\n            { \"to\": \"framework/angular/examples/row-dnd\", \"label\": \"Row Drag & Drop\" }\n          ]\n        },\n        {\n          \"label\": \"lit\",\n          \"children\": [\n            { \"to\": \"framework/lit/examples/virtualized-rows\", \"label\": \"With TanStack Virtual - Rows\" }\n          ]\n        },\n        {\n          \"label\": \"react\",\n          \"children\": [\n            { \"to\": \"framework/react/examples/composable-tables\", \"label\": \"Composable Tables\" },\n            { \"to\": \"framework/react/examples/custom-plugin\", \"label\": \"Custom Plugin\" },\n            { \"to\": \"framework/react/examples/sub-components\", \"label\": \"Sub Components\" },\n            { \"to\": \"framework/react/examples/virtualized-columns\", \"label\": \"With TanStack Virtual - Columns\" },\n            { \"to\": \"framework/react/examples/virtualized-columns-experimental\", \"label\": \"With TanStack Virtual - Columns (Exp)\" },\n            { \"to\": \"framework/react/examples/virtualized-rows\", \"label\": \"With TanStack Virtual - Rows\" },\n            { \"to\": \"framework/react/examples/virtualized-rows-experimental\", \"label\": \"With TanStack Virtual - Rows (Exp)\" },\n            { \"to\": \"framework/react/examples/virtualized-infinite-scrolling\", \"label\": \"With TanStack Virtual - Infinite Scrolling\" },\n            { \"to\": \"framework/react/examples/with-tanstack-form\", \"label\": \"With TanStack Form\" },\n            { \"to\": \"framework/react/examples/with-tanstack-query\", \"label\": \"With TanStack Query\" },\n            { \"to\": \"framework/react/examples/with-tanstack-router\", \"label\": \"With TanStack Router\" }\n          ]\n        },\n        {\n          \"label\": \"solid\",\n          \"children\": [\n            { \"to\": \"framework/solid/examples/bootstrap\", \"label\": \"Solid Bootstrap\" },\n            { \"to\": \"framework/solid/examples/composable-tables\", \"label\": \"Composable Tables\" },\n            { \"to\": \"framework/solid/examples/with-tanstack-query\", \"label\": \"With TanStack Query\" }]\n        },\n        {\n          \"label\": \"vue\",\n          \"children\": [\n            { \"to\": \"framework/vue/examples/sub-components\", \"label\": \"Sub Components\" },\n            { \"to\": \"framework/vue/examples/virtualized-rows\", \"label\": \"With TanStack Virtual (Rows)\" }\n          ]\n        }\n      ]\n    },\n    {\n      \"label\": \"Kitchen Sink\",\n      \"children\": [],\n      \"frameworks\": [\n        {\n          \"label\": \"react\",\n          \"children\": [\n            { \"to\": \"framework/react/examples/kitchen-sink-shadcn\", \"label\": \"Kitchen Sink (Shadcn)\" }\n          ]\n        }\n      ]\n    }\n  ]\n}\n"
  },
  {
    "path": "docs/enterprise/ag-grid.md",
    "content": "---\ntitle: AG Grid - An alternative enterprise data-grid solution\n---\n\n<p>\n  <a href=\"https://ag-grid.com/react-data-grid/?utm_source=reacttable&utm_campaign=githubreacttable\">\n    <img src=\"https://blog.ag-grid.com/content/images/2021/02/new-logo-1.png\" style={{ width:400 }} />\n  </a>\n</p>\n\nWhile we clearly love TanStack Table, we acknowledge that it is not a \"batteries\" included product packed with customer support and enterprise polish. We realize that some of our users may need this though! To help out here, we want to introduce you to AG Grid, an enterprise-grade data grid solution that can supercharge your applications with its extensive feature set and robust performance. While TanStack Table is also a powerful option for implementing data grids, we believe in providing our users with a diverse range of choices that best fit their specific requirements. AG Grid is one such choice, and we're excited to highlight its capabilities for you.\n\n## Why Choose [AG Grid](https://ag-grid.com/react-data-grid/?utm_source=reacttable&utm_campaign=githubreacttable)?\n\nHere are some good reasons to consider AG Grid for your next project:\n\n### Comprehensive Feature Set\n\nAG Grid offers an extensive set of features, making it a versatile and powerful data grid solution. With AG Grid, you get access to a wide range of functionalities that cater to the needs of complex enterprise applications. From advanced sorting, filtering, and grouping capabilities to column pinning, multi-level headers, and tree data structure support, AG Grid provides you with the tools to create dynamic and interactive data grids that meet your application's unique demands.\n\n### High Performance\n\nWhen it comes to handling large datasets and achieving exceptional performance, AG Grid delivers outstanding results. It employs highly optimized rendering techniques, efficient data updates, and virtualization to ensure smooth scrolling and fast response times, even when dealing with thousands or millions of rows of data. AG Grid's performance optimizations make it an excellent choice for applications that require high-speed data manipulation and visualization.\n\n### Customization and Extensibility\n\nAG Grid is designed to be highly customizable and extensible, allowing you to tailor the grid to your specific needs. It provides a rich set of APIs and events that enable you to integrate custom functionality seamlessly. You can define custom cell renderers, editors, filters, and aggregators to enhance the grid's behavior and appearance. AG Grid also supports a variety of themes, allowing you to match the grid's visual style to your application's design.\n\n### Support for Enterprise Needs\n\nAs an enterprise-focused solution, AG Grid caters to the requirements of complex business applications. It offers enterprise-specific features such as row grouping, column pinning, server-side row model, master/detail grids, and rich editing capabilities. AG Grid also integrates well with other enterprise frameworks and libraries, making it a reliable choice for large-scale projects.\n\n### Active Development and Community Support\n\nAG Grid benefits from active development and a thriving community of developers. The team behind AG Grid consistently introduces new features and enhancements, ensuring that the product evolves to meet the changing needs of the industry. The community support is robust, with forums, documentation, and examples readily available to assist you in utilizing the full potential of AG Grid.\n\n## Conclusion\n\nWhile TanStack Table remains a powerful and flexible option for implementing data grids, we understand that different projects have different requirements. AG Grid offers a compelling enterprise-grade solution that may be particularly suited to your needs. Its comprehensive feature set, high performance, customization options, and focus on enterprise requirements make AG Grid an excellent choice for projects that demand a robust and scalable data grid solution.\n\nWe encourage you to explore AG Grid further by visiting their website and trying out their demo. Remember that both TanStack Table and AG Grid have their unique strengths and considerations. We believe in providing options to our users, empowering you to make informed decisions and choose the best fit for your specific use case.\n\nVisit the [AG Grid website](https://www.ag-grid.com).\n"
  },
  {
    "path": "docs/faq.md",
    "content": "---\ntitle: FAQ\n---\n\n## How do I stop infinite rendering loops?\n\nIf you are using React, there is a very common pitfall that can cause infinite rendering. If you fail to give your `columns`, `data`, or `state` a stable reference, React will enter an infinite loop of re-rendering upon any change to the table state.\n\nWhy does this happen? Is this a bug in TanStack Table? **No**, it is not. *This is fundamentally how React works*, and properly managing your columns, data, and state will prevent this from happening.\n\nTanStack Table is designed to trigger a re-render whenever either the `data` or `columns` that are passed into the table change, or whenever any of the table's state changes.\n\n> Failing to give `columns` or `data` stable references can cause an infinite loop of re-renders.\n\n### Pitfall 1: Creating new columns or data on every render\n\n```js\nexport default function MyComponent() {\n  //😵 BAD: This will cause an infinite loop of re-renders because `columns` is redefined as a new array on every render!\n  const columns = [\n    // ...\n  ];\n\n  //😵 BAD: This will cause an infinite loop of re-renders because `data` is redefined as a new array on every render!\n  const data = [\n    // ...\n  ];\n\n  //❌ Columns and data are defined in the same scope as `useTable` without a stable reference, will cause infinite loop!\n  const table = useTable({\n    columns,\n    data,\n  });\n\n  return <table>...</table>;\n}\n```\n\n### Solution 1: Stable references with useMemo or useState\n\nIn React, you can give a \"stable\" reference to variables by defining them outside/above the component, or by using `useMemo` or `useState`, or by using a 3rd party state management library (like Redux or React Query 😉)\n\n```js\n//✅ OK: Define columns outside of the component\nconst columns = [\n  // ...\n];\n\n//✅ OK: Define data outside of the component\nconst data = [\n  // ...\n];\n\n// Usually it's more practical to define columns and data inside the component, so use `useMemo` or `useState` to give them stable references\nexport default function MyComponent() {\n  //✅ GOOD: This will not cause an infinite loop of re-renders because `columns` is a stable reference\n  const columns = useMemo(() => [\n    // ...\n  ], []);\n\n  //✅ GOOD: This will not cause an infinite loop of re-renders because `data` is a stable reference\n  const [data, setData] = useState(() => [\n    // ...\n  ]);\n\n  // Columns and data are defined in a stable reference, will not cause infinite loop!\n  const table = useTable({\n    columns,\n    data,\n  });\n\n  return <table>...</table>;\n}\n```\n\n### Pitfall 2: Mutating columns or data in place\n\nEven if you give your initial `columns` and `data` stable references, you can still run into infinite loops if you mutate them in place. This is a common pitfall that you may not notice that you are doing at first. Something as simple as an inline `data.filter()` can cause an infinite loop if you are not careful.\n\n```js\nexport default function MyComponent() {\n  //✅ GOOD\n  const columns = useMemo(() => [\n    // ...\n  ], []);\n\n  //✅ GOOD (React Query provides stable references to data automatically)\n  const { data, isLoading } = useQuery({\n    //...\n  });\n\n  const table = useTable({\n    columns,\n    //❌ BAD: This will cause an infinite loop of re-renders because `data` is mutated in place (destroys stable reference)\n    data: data?.filter(d => d.isActive) ?? [],\n  });\n\n  return <table>...</table>;\n}\n```\n\n### Solution 2: Memoize your data transformations\n\nTo prevent infinite loops, you should always memoize your data transformations. This can be done with `useMemo` or similar.\n\n```js\nexport default function MyComponent() {\n  //✅ GOOD\n  const columns = useMemo(() => [\n    // ...\n  ], []);\n\n  //✅ GOOD\n  const { data, isLoading } = useQuery({\n    //...\n  });\n\n  //✅ GOOD: This will not cause an infinite loop of re-renders because `filteredData` is memoized\n  const filteredData = useMemo(() => data?.filter(d => d.isActive) ?? [], [data]);\n\n  const table = useTable({\n    columns,\n    data: filteredData, // stable reference!\n  });\n\n  return <table>...</table>;\n}\n```\n\n### React Forget\n\nWhen React Forget is released, these problems might be a thing of the past. Or just use Solid.js... 🤓\n\n## How do I stop my table state from automatically resetting when my data changes?\n\nMost plugins use state that _should_ normally reset when the data sources changes, but sometimes you need to suppress that from happening if you are filtering your data externally, or immutably editing your data while looking at it, or simply doing anything external with your data that you don't want to trigger a piece of table state to reset automatically.\n\nFor those situations, each plugin provides a way to disable the state from automatically resetting internally when data or other dependencies for a piece of state change. By setting any of them to `false`, you can stop the automatic resets from being triggered.\n\nHere is a React-based example of stopping basically every piece of state from changing as they normally do while we edit the `data` source for a table:\n\n```js\nconst [data, setData] = React.useState([])\nconst skipPageResetRef = React.useRef()\n\nconst updateData = newData => {\n  // When data gets updated with this function, set a flag\n  // to disable all of the auto resetting\n  skipPageResetRef.current = true\n\n  setData(newData)\n}\n\nReact.useEffect(() => {\n  // After the table has updated, always remove the flag\n  skipPageResetRef.current = false\n})\n\nuseTable({\n  ...\n  autoResetPageIndex: !skipPageResetRef.current,\n  autoResetExpanded: !skipPageResetRef.current,\n})\n```\n\nNow, when we update our data, the above table states will not automatically reset!\n"
  },
  {
    "path": "docs/framework/angular/angular-table.md",
    "content": "---\ntitle: Angular Table\n---\n\nThe `@tanstack/angular-table` adapter is a wrapper around the core table logic. Most of it's job is related to managing\nstate using angular signals, providing types and the rendering implementation of cell/header/footer templates.\n\n## Exports\n\n`@tanstack/angular-table` re-exports all of `@tanstack/table-core`'s APIs and the following:\n\n### `injectTable`\n\nCreates and returns an Angular-reactive table instance.\n\n`injectTable` accepts either:\n\n- an options function `() => TableOptions`\n- a computed signal returning `TableOptions`\n\nThe initializer is intentionally re-evaluated whenever any signal read inside it changes.\nThis is how the adapter keeps the table in sync with Angular's reactivity model.\n\nBecause of that behavior, keep expensive/static values (for example `columns`, feature setup, row models) as stable references outside the initializer, and only read reactive state (`data()`, pagination/filter/sorting signals, etc.) inside it.\n\nSince `ColumnDef` is stricter about generics, prefer building columns with `createColumnHelper<TFeatures, TData>()` so feature and row types are inferred consistently.\n\nThe returned table is also signal-reactive: table state and table APIs are wired for Angular signals, so you can safely consume table methods inside `computed(...)` and `effect(...)`.\n\n```ts\nimport { computed, effect, signal } from '@angular/core'\nimport {\n  createColumnHelper,\n  injectTable,\n  type ColumnDef,\n  rowPaginationFeature,\n  stockFeatures\n} from '@tanstack/angular-table'\n\n// Register all table core features\nconst _features = tableFeatures(stockFeatures);\n// ...or register only your needed features \nconst _features = tableFeatures({\n  rowPaginationFeature,\n  // ...all other features\n})\n\nconst columnHelper = createColumnHelper<typeof _features, Person>()\n\nexport class AppComponent {\n  readonly data = signal<Person[]>([])\n\n  // If you type columns manually, include both generics:\n  // readonly columns: ColumnDef<typeof _features, Person>[] = [...]\n  readonly columns = columnHelper.columns([\n    columnHelper.accessor('firstName', {\n      header: 'First name',\n      cell: info => info.getValue(),\n    }),\n    // ...\n  ])\n\n  // This function is re-run when any signal read inside changes.\n  readonly table = injectTable(() => ({\n    _features: _features,\n    // Reactive state can be read directly\n    data: this.data(),\n\n    state: {\n      // ...\n    },\n\n    // Keep stable references outside the initializer\n    columns: this.columns,\n  }))\n\n  constructor() {\n    effect(() => {\n      console.log('Visible rows:', this.table.getRowModel().rows.length)\n    })\n  }\n}\n```\n\nSee [injectTable API Reference](reference/functions/injectTable)\n\n### `createTableHook`\n\n`createTableHook` is the Angular composition API for building reusable table infrastructure.\n\nUse it when multiple tables should share the same defaults (features, row models, default options, and component registries) while keeping strong types across the app.\n\nAt runtime, `createTableHook` wraps `injectTable` and returns typed helpers such as:\n\n- `injectAppTable` for creating tables with shared defaults\n- `createAppColumnHelper` for strongly typed column definitions\n- pre-typed context helpers (`injectTableContext`, `injectTableCellContext`, `injectTableHeaderContext`, `injectFlexRenderCellContext`, `injectFlexRenderHeaderContext`)\n\nFor full setup and patterns, see the [Table Composition Guide](./guide/table-composition.md).\n\n### `FlexRender`\n\nAn Angular structural rendering primitive for cell/header/footer content.\n\nIt supports the same content kinds as Angular rendering:\n\n- primitive values (`string`, `number`, plain objects)\n- `TemplateRef`\n- component types\n- `flexRenderComponent(component, options?)` wrappers with typed `inputs`, `outputs`, `injector`, `bindings`, and `directives`\n\nColumn render functions (`header`, `cell`, `footer`) run in Angular injection context, so you can use `inject()` and signals directly in render logic.\n\nFor complete rendering details (`*flexRender`, shorthand directives, `flexRenderComponent`, `TemplateRef`, component inputs/outputs, and `injectFlexRenderContext`), see the [Rendering components Guide](./guide/rendering.md).\n\n### Context helpers and directives\n\n`@tanstack/angular-table` also exports Angular DI helpers and directives for table/cell/header context:\n\n- `TanStackTable` + `injectTableContext()`\n- `TanStackTableCell` + `injectTableCellContext()`\n- `TanStackTableHeader` + `injectTableHeaderContext()`\n\nThese APIs provide signal-based context values and are available from nearest directives or from `*flexRender`-rendered components when matching props are present.\n\n### Full API Reference\n\nSee [Angular API Reference](reference/index.md)\n"
  },
  {
    "path": "docs/framework/angular/guide/migrating.md",
    "content": "---\ntitle: Migrating to TanStack Table v9 (Angular)\n---\n\n## What's New in TanStack Table v9\n\nTanStack Table v9 is a major release that introduces significant architectural improvements while maintaining the core table logic you're familiar with. Here are the key changes:\n\n### 1. Tree-shaking\n\n- **Features are tree-shakeable**: Features are now treated as plugins—import only what you use. If your table only needs sorting, you won't ship filtering, pagination, or other feature code. Bundlers can eliminate unused code, so for smaller tables you can expect a meaningfully smaller bundle compared to v8. This also lets TanStack Table add features over time without bloating everyone's bundles.\n- **Row models and their functions are refactored**: Row model factories (`createFilteredRowModel`, `createSortedRowModel`, etc.) now accept their processing functions (`filterFns`, `sortFns`, `aggregationFns`) as parameters. This enables tree-shaking of the functions themselves—if you use a custom filter, you don't pay for built-in filters you never use.\n\n### 2. State Management\n\n- **Uses TanStack Store**: The internal state system has been rebuilt on [TanStack Store](https://tanstack.com/store), providing a reactive, framework-agnostic foundation.\n- **Opt-in subscriptions instead of memo hacks**: In Angular, you consume state via signals and `computed(...)`. You can keep reads scoped to the state you actually need and avoid unnecessary template work.\n\n### 3. Composability\n\n- **`tableOptions`**: New utilities let you compose and share table configurations. Define `_features`, `_rowModels`, and default options once, then reuse them across tables or pass them through `createTableHook`.\n- **`createTableHook`** (optional, advanced): Create reusable, strongly typed Angular table factories with pre-bound features, row models, default options, and component registries.\n\n### The Good News: Most Upgrades Are Opt-in\n\nWhile v9 is a significant upgrade, **you don't have to adopt everything at once**:\n\n- **Don't want to think about tree-shaking yet?** You can start with `stockFeatures` to include most commonly used features.\n- **Your table markup is largely unchanged.** How you render `<table>`, `<thead>`, `<tr>`, `<td>`, etc. remains the same.\n\nThe main change is **how you define a table** with the Angular adapter — specifically the new `_features` and `_rowModels` options.\n\n---\n\n## Quick Legacy Migration\n\nAngular does **not** ship a legacy API.\n\nIf you're migrating an Angular project from TanStack Table v8 to v9, you will migrate directly to the v9 Angular adapter APIs (`injectTable`, `_features`, and `_rowModels`).\n\n---\n\nThe rest of this guide focuses on migrating to the full v9 API and taking advantage of its features.\n\n## Core Breaking Changes\n\n### Entrypoint Change\n\nThe Angular adapter entrypoint to create a table instance is `injectTable`:\n\n```ts\n// v8\nimport { createAngularTable } from '@tanstack/angular-table'\n\nconst v8Table = createAngularTable(() => ({\n  // options\n}))\n\n// v9\nimport { injectTable } from '@tanstack/angular-table'\n\nconst v9Table = injectTable(() => ({\n  // options\n}))\n```\n\n> Note: `injectTable` evaluates your initializer whenever any Angular signal read inside of it changes.\n> Keep expensive/static values (like `columns`, `_features`, and `_rowModels`) as stable references outside the initializer.\n\n### New Required Options: `_features` and `_rowModels`\n\nIn v9, you must explicitly declare which features and row models your table uses:\n\n```ts\n// v8\nimport { createAngularTable, getCoreRowModel } from '@tanstack/angular-table'\n\nconst v8Table = createAngularTable(() => ({\n  columns,\n  data: data(),\n  getCoreRowModel: getCoreRowModel(),\n}))\n\n// v9\nimport {\n  injectTable,\n  tableFeatures,\n} from '@tanstack/angular-table'\n\nconst _features = tableFeatures({}) // Empty = core feaFtures only\n\n// Define stable references outside the initializer\nconst v9Table = injectTable(() => ({\n  _features,\n  _rowModels: {}, // Core row model is automatic\n  columns: this.columns,\n  data: this.data(),\n}))\n```\n\n---\n\n## The `_features` Option\n\nFeatures control what table functionality is available. In v8, all features were bundled. In v9, you import only what you need.\n\n### Importing Individual Features\n\n```ts\nimport {\n  tableFeatures,\n  // Import only the features you need\n  columnFilteringFeature,\n  rowSortingFeature,\n  rowPaginationFeature,\n  columnVisibilityFeature,\n  rowSelectionFeature,\n} from '@tanstack/angular-table'\n\n// Create a features object (define this outside your injectTable initializer for stable reference)\nconst _features = tableFeatures({\n  columnFilteringFeature,\n  rowSortingFeature,\n  rowPaginationFeature,\n  columnVisibilityFeature,\n  rowSelectionFeature,\n})\n```\n\n### Using `stockFeatures` for v8-like Behavior\n\nIf you want all features without thinking about it (like v8), import `stockFeatures`:\n\n```ts\nimport { injectTable, stockFeatures } from '@tanstack/angular-table'\n\nclass TableCmp {\n  readonly table = injectTable(() => ({\n    _features: stockFeatures, // All features included\n    _rowModels: { /* ... */ },\n    columns: this.columns,\n    data: this.data(),\n  }))\n}\n```\n\n### Available Features\n\n| Feature | Import Name |\n|---------|-------------|\n| Column Filtering | `columnFilteringFeature` |\n| Global Filtering | `globalFilteringFeature` |\n| Row Sorting | `rowSortingFeature` |\n| Row Pagination | `rowPaginationFeature` |\n| Row Selection | `rowSelectionFeature` |\n| Row Expanding | `rowExpandingFeature` |\n| Row Pinning | `rowPinningFeature` |\n| Column Pinning | `columnPinningFeature` |\n| Column Visibility | `columnVisibilityFeature` |\n| Column Ordering | `columnOrderingFeature` |\n| Column Sizing | `columnSizingFeature` |\n| Column Resizing | `columnResizingFeature` |\n| Column Grouping | `columnGroupingFeature` |\n| Column Faceting | `columnFacetingFeature` |\n\n---\n\n## The `_rowModels` Option\n\nRow models are the functions that process your data (filtering, sorting, pagination, etc.). In v9, they're configured via `_rowModels` instead of `get*RowModel` options.\n\n### Migration Mapping\n\n| v8 Option | v9 `_rowModels` Key | v9 Factory Function |\n|-----------|---------------------|---------------------|\n| `getCoreRowModel()` | (automatic) | Not needed — always included |\n| `getFilteredRowModel()` | `filteredRowModel` | `createFilteredRowModel(filterFns)` |\n| `getSortedRowModel()` | `sortedRowModel` | `createSortedRowModel(sortFns)` |\n| `getPaginationRowModel()` | `paginatedRowModel` | `createPaginatedRowModel()` |\n| `getExpandedRowModel()` | `expandedRowModel` | `createExpandedRowModel()` |\n| `getGroupedRowModel()` | `groupedRowModel` | `createGroupedRowModel(aggregationFns)` |\n| `getFacetedRowModel()` | `facetedRowModel` | `createFacetedRowModel()` |\n| `getFacetedMinMaxValues()` | `facetedMinMaxValues` | `createFacetedMinMaxValues()` |\n| `getFacetedUniqueValues()` | `facetedUniqueValues` | `createFacetedUniqueValues()` |\n\n### Key Change: Row Model Functions Now Accept Parameters\n\nSeveral row model factories now accept their processing functions as parameters. This enables better tree-shaking and explicit configuration:\n\n```ts\nimport {\n  injectTable,\n  createFilteredRowModel,\n  createSortedRowModel,\n  createGroupedRowModel,\n  createPaginatedRowModel,\n  filterFns, // Built-in filter functions\n  sortFns, // Built-in sort functions\n  aggregationFns, // Built-in aggregation functions\n} from '@tanstack/angular-table'\n\nclass TableCmp {\n  readonly table = injectTable(() => ({\n    _features,\n    _rowModels: {\n      filteredRowModel: createFilteredRowModel(filterFns),\n      sortedRowModel: createSortedRowModel(sortFns),\n      groupedRowModel: createGroupedRowModel(aggregationFns),\n      paginatedRowModel: createPaginatedRowModel(),\n    },\n    columns: this.columns,\n    data: this.data(),\n  }))\n}\n```\n\n### Full Migration Example\n\n```ts\n// v8\nimport {\n  injectTable,\n  getCoreRowModel,\n  getFilteredRowModel,\n  getSortedRowModel,\n  getPaginationRowModel,\n  filterFns,\n  sortingFns,\n} from '@tanstack/angular-table'\n\nconst v8Table = createAngularTable(() => ({\n  columns,\n  data: data(),\n  getCoreRowModel: getCoreRowModel(), // used to be called \"get*RowModel()\"\n  getFilteredRowModel: getFilteredRowModel(),\n  getSortedRowModel: getSortedRowModel(),\n  getPaginationRowModel: getPaginationRowModel(),\n  filterFns, // used to be passed in as a root option\n  sortingFns,\n}))\n\n// v9\nimport {\n  injectTable,\n  tableFeatures,\n  columnFilteringFeature,\n  rowSortingFeature,\n  rowPaginationFeature,\n  createFilteredRowModel,\n  createSortedRowModel,\n  createPaginatedRowModel,\n  filterFns,\n  sortFns,\n} from '@tanstack/angular-table'\n\nconst _features = tableFeatures({\n  columnFilteringFeature,\n  rowSortingFeature,\n  rowPaginationFeature,\n})\n\nconst v9Table = injectTable(() => ({\n  _features,\n  _rowModels: {\n    filteredRowModel: createFilteredRowModel(filterFns),\n    sortedRowModel: createSortedRowModel(sortFns),\n    paginatedRowModel: createPaginatedRowModel(),\n  },\n  columns,\n  data: data(),\n}))\n```\n\n---\n\n## State Management Changes\n\n### Accessing State\n\nIn v8, you accessed state via `table.getState()`. In v9, state is accessed via the store:\n\n```ts\n// v8\nconst state = table.getState()\nconst v8 = table.getState()\nconst { sorting, pagination } = v8\n\n// v9 - via the store\nconst fullState = table.store.state\nconst v9 = table.store.state\nconst { sorting: v9Sorting, pagination: v9Pagination } = v9\n```\n\n### Optimizing Reads with Angular Signals\n\nIn Angular, you have a few good options for consuming table state.\n\n#### Option 1: Prefer `table.store.subscribe(...)` for a sliced signal\n\nTanStack Store lets you subscribe to (and derive) a slice of state. With the Angular adapter, you can use that to create a signal-like value that only updates when the selected slice changes.\n\nThis is the closest equivalent to the fine-grained subscription examples you might see in other frameworks.\n\n```ts\nimport { computed, effect } from '@angular/core'\n\nclass TableCmp {\n  readonly table = injectTable(() => ({\n    _features,\n    _rowModels: { /* ... */ },\n    columns: this.columns,\n    data: this.data(),\n  }))\n\n  // Create a computed to a slice of state.\n  // The store will only emit when this selected value changes.\n  private readonly pagination = this.table.computed(\n    state => state.pagination,\n  )\n\n  constructor() {\n    effect(() => {\n      const { pageIndex, pageSize } = this.pagination()\n      console.log('Page', pageIndex, 'Size', pageSize)\n    })\n  }\n}\n```\n\n#### Option 2: Use `computed(...)` and read from `table.store.state`\n\nYou can also use Angular `computed(...)` and directly read from `table.store.state`. This is simple and works well, but for object/array slices you should provide an equality function to avoid unnecessary downstream work when the slice is recreated with the same values.\n\n```ts\nimport { computed, effect } from '@angular/core'\n\nclass TableCmp {\n  readonly table = injectTable(() => ({\n    _features,\n    _rowModels: { /* ... */ },\n    columns: this.columns,\n    data: this.data(),\n  }))\n\n  // Provide an equality function for object slices\n  readonly pagination = computed(\n    () => this.table.store.state.pagination,\n    {\n      equal: (a, b) => a.pageIndex === b.pageIndex && a.pageSize === b.pageSize,\n    },\n  )\n\n  constructor() {\n    effect(() => {\n      // This effect only re-runs when pagination changes\n      const { pageIndex, pageSize } = this.pagination()\n      console.log('Page', pageIndex, 'Size', pageSize)\n    })\n  }\n}\n```\n\n### Controlled State\n\nControlled state patterns are pretty the same as v8:\n\n```ts\nimport { signal } from '@angular/core'\nimport type { SortingState, PaginationState } from '@tanstack/angular-table'\n\nclass TableCmp {\n  readonly sorting = signal<SortingState>([])\n  readonly pagination = signal<PaginationState>({ pageIndex: 0, pageSize: 10 })\n\n  readonly table = injectTable(() => ({\n    _features,\n    _rowModels: { /* ... */ },\n    columns: this.columns,\n    data: this.data(),\n    state: {\n      sorting: this.sorting(),\n      pagination: this.pagination(),\n    },\n    onSortingChange: (updater) => {\n      updater instanceof Function\n        ? this.sorting.update(updater)\n        : this.sorting.set(updater)\n    },\n    onPaginationChange: (updater) => {\n      updater instanceof Function\n        ? this.pagination.update(updater)\n        : this.pagination.set(updater)\n    },\n  }))\n}\n```\n\n---\n\n## Column Helper Changes\n\nThe `createColumnHelper` function now requires a `TFeatures` type parameter in addition to `TData`:\n\n```ts\n// v8\nimport { createColumnHelper } from '@tanstack/angular-table'\n\nconst columnHelperV8 = createColumnHelper<Person>()\n\n// v9\nimport { createColumnHelper, tableFeatures, rowSortingFeature } from '@tanstack/angular-table'\n\nconst _features = tableFeatures({ rowSortingFeature })\nconst columnHelperV9 = createColumnHelper<typeof _features, Person>()\n```\n\n### New `columns()` Helper Method\n\nv9 adds a `columns()` helper for better type inference when wrapping column arrays.\n\n```ts\nconst columnHelper = createColumnHelper<typeof _features, Person>()\n\n// Wrap your columns array for better type inference\nconst columns = columnHelper.columns([\n  columnHelper.accessor('firstName', {\n    header: 'First Name',\n    cell: (info) => info.getValue(),\n  }),\n  columnHelper.accessor('lastName', {\n    id: 'lastName',\n    header: () => 'Last Name',\n    cell: (info) => info.getValue(),\n  }),\n  columnHelper.display({\n    id: 'actions',\n    header: 'Actions',\n    cell: () => 'Edit',\n  }),\n])\n```\n\n### Using with `createTableHook`\n\nWhen using `createTableHook`, you get a pre-bound `createAppColumnHelper` that only requires `TData`:\n\n```ts\nimport { createTableHook, tableFeatures, rowSortingFeature } from '@tanstack/angular-table'\n\nconst { injectAppTable, createAppColumnHelper } = createTableHook({\n  _features: tableFeatures({ rowSortingFeature }),\n  _rowModels: { /* ... */ },\n})\n\n// TFeatures is already bound — only need TData!\nconst columnHelper = createAppColumnHelper<Person>()\n```\n\n---\n\n## Rendering Changes\n\n### `FlexRender`\n\nThe rendering primitives in the Angular adapter are `FlexRender` and the `*flexRender` directives.\n\nIn v9, you can continue to render header/cell/footer content using the Angular adapter rendering utilities, but there are a few important improvements and helper APIs to be aware of.\n\n#### Structural directive rendering\n\nAngular rendering is directive-based:\n\n- `FlexRender` / `*flexRender` renders arbitrary render content (primitives, `TemplateRef`, component types, or `flexRenderComponent(...)` wrappers)\n- The directive is responsible for mounting embedded views or components via `ViewContainerRef`\n\n#### Shorthand directives\n\nIf you're rendering standard table content, prefer the shorthand helpers:\n\n- `*flexRenderCell=\"cell; let value\"`\n- `*flexRenderHeader=\"header; let value\"`\n- `*flexRenderFooter=\"footer; let value\"`\n\nThese automatically select the correct column definition (`columnDef.cell` / `header` / `footer`) and the right props (`cell.getContext()` / `header.getContext()`), so you don't need to manually provide `props:`.\n\n#### DI-aware render functions + context injection\n\nColumn definition render functions (`header`, `cell`, `footer`) run inside an Angular injection context, so they can safely call `inject()` and use signals.\n\nWhen a component is rendered through the FlexRender directives, you can also access the full render props object via DI using `injectFlexRenderContext()`.\n\n#### Component rendering helper: `flexRenderComponent`\n\nIf you need to render an Angular component with explicit configuration (custom `inputs`, `outputs`, `injector`, and Angular v20+ creation-time `bindings`/`directives`), return a `flexRenderComponent(Component, options)` wrapper from your column definition.\n\nFor complete rendering details (including component rendering, `TemplateRef`, `flexRenderComponent`, and context helpers), see the [Rendering components Guide](./rendering.md).\n\n---\n\n## The `tableOptions()` Utility\n\nThe `tableOptions()` helper provides type-safe composition of table options. It's useful for creating reusable partial configurations that can be spread into your table setup.\n\n### Basic Usage\n\n```ts\nimport { injectTable, tableOptions, tableFeatures, rowSortingFeature } from '@tanstack/angular-table'\nimport { isDevMode } from '@angular/core';\n\n// Create a reusable options object with features pre-configured\nconst baseOptions = tableOptions({\n  _features: tableFeatures({ rowSortingFeature }),\n  debugTable: isDevMode()\n})\n\nclass TableCmp {\n  readonly table = injectTable(() => ({\n    ...baseOptions,\n    columns: this.columns,\n    data: this.data(),\n    _rowModels: {},\n  }))\n}\n```\n\n### Composing Partial Options\n\n`tableOptions()` allows you to omit certain required fields (like `data`, `columns`, or `_features`) when creating partial configurations:\n\n```ts\nimport {\n  tableOptions,\n  tableFeatures,\n  rowSortingFeature,\n  columnFilteringFeature,\n  createSortedRowModel,\n  createFilteredRowModel,\n  filterFns,\n  sortFns,\n} from '@tanstack/angular-table'\n\n// Partial options without data or columns\nconst featureOptions = tableOptions({\n  _features: tableFeatures({\n    rowSortingFeature,\n    columnFilteringFeature,\n  }),\n  _rowModels: {\n    sortedRowModel: createSortedRowModel(sortFns),\n    filteredRowModel: createFilteredRowModel(filterFns),\n  },\n})\n```\n\n```ts\nimport { injectTable, tableOptions, createPaginatedRowModel } from '@tanstack/angular-table'\n\n// Another partial without _features (inherits from spread)\nconst paginationDefaults = tableOptions({\n  _rowModels: {\n    paginatedRowModel: createPaginatedRowModel(),\n  },\n  initialState: {\n    pagination: { pageIndex: 0, pageSize: 25 },\n  },\n})\n\nclass TableCmp {\n  readonly table = injectTable(() => ({\n    ...featureOptions,\n    ...paginationDefaults,\n    columns: this.columns,\n    data: this.data(),\n  }))\n}\n```\n\n### Using with `createTableHook`\n\n`tableOptions()` pairs well with `createTableHook` for building composable table factories:\n\n```ts\nimport {\n  createTableHook,\n  tableOptions,\n  tableFeatures,\n  rowSortingFeature,\n  rowPaginationFeature,\n  createSortedRowModel,\n  createPaginatedRowModel,\n  sortFns,\n} from '@tanstack/angular-table'\n\nconst sharedOptions = tableOptions({\n  _features: tableFeatures({ rowSortingFeature, rowPaginationFeature }),\n  _rowModels: {\n    sortedRowModel: createSortedRowModel(sortFns),\n    paginatedRowModel: createPaginatedRowModel(),\n  },\n})\n\nconst { injectAppTable } = createTableHook(sharedOptions)\n```\n\n---\n\n## `createTableHook`: Composable Table Patterns\n\n**This is an advanced, optional feature.** You don't need to use `createTableHook`—`injectTable` is sufficient for most use cases.\n\nFor applications with multiple tables sharing the same configuration, `createTableHook` lets you define features, row models, and reusable components once.\n\nFor full setup and patterns, see the [Table composition Guide](./table-composition.md).\n\n---\n\n## Other Breaking Changes\n\n### Column Pinning Option Split\n\nThe `enablePinning` option has been split into separate options:\n\n```ts\n// v8\nenablePinning: true\n\n// v9\nenableColumnPinning: true\nenableRowPinning: true\n```\n\n### Removed Internal APIs\n\nAll internal APIs prefixed with `_` have been removed. If you were using any of these, use their public equivalents.\n\n### Column Sizing vs. Column Resizing Split\n\nIn v8, column sizing and resizing were combined in a single feature. In v9, they've been split into separate features for better tree-shaking.\n\n| v8 | v9 |\n|----|-----|\n| `ColumnSizing` (combined feature) | `columnSizingFeature` + `columnResizingFeature` |\n| `columnSizingInfo` state | `columnResizing` state |\n| `setColumnSizingInfo()` | `setColumnResizing()` |\n| `onColumnSizingInfoChange` option | `onColumnResizingChange` option |\n\nIf you only need column sizing (fixed widths) without interactive resizing, you can import just `columnSizingFeature`. If you need drag-to-resize functionality, import both.\n\n### Sorting API Renames\n\nSorting-related APIs have been renamed for consistency:\n\n| v8 | v9 |\n|----|-----|\n| `sortingFn` (column def option) | `sortFn` |\n| `column.getSortingFn()` | `column.getSortFn()` |\n| `column.getAutoSortingFn()` | `column.getAutoSortFn()` |\n| `SortingFn` type | `SortFn` type |\n| `SortingFns` interface | `SortFns` interface |\n| `sortingFns` (built-in functions) | `sortFns` |\n\nUpdate your column definitions.\n\n### Row API Changes\n\nSome row APIs have changed from private to public:\n\n| v8 | v9 |\n|----|-----|\n| `row._getAllCellsByColumnId()` (private) | `row.getAllCellsByColumnId()` (public) |\n\n---\n\n## TypeScript Changes Summary\n\n### Type Generics\n\nMost types now require a `TFeatures` parameter:\n\n```txt\n// v8\ntype Column<TData>\ntype ColumnDef<TData>\ntype Table<TData>\ntype Row<TData>\ntype Cell<TData, TValue>\n\n// v9\ntype Column<TFeatures, TData, TValue>\ntype ColumnDef<TFeatures, TData, TValue>\ntype Table<TFeatures, TData>\ntype Row<TFeatures, TData>\ntype Cell<TFeatures, TData, TValue>\n```\n\n### Using `typeof _features`\n\nThe easiest way to get the `TFeatures` type is with `typeof`:\n\n```ts\nconst _features = tableFeatures({\n  rowSortingFeature,\n  columnFilteringFeature,\n})\n\ntype MyFeatures = typeof _features\n\nconst columns: ColumnDef<typeof _features, Person>[] = [...]\n```\n\n### Using `StockFeatures`\n\nIf using `stockFeatures`, use the `StockFeatures` type:\n\n```ts\nimport type { StockFeatures, ColumnDef } from '@tanstack/angular-table'\n\nconst columns: ColumnDef<StockFeatures, Person>[] = [...]\n```\n\n### `ColumnMeta` Generic Change\n\nIf you're using module augmentation to extend `ColumnMeta`, note that it now requires a `TFeatures` parameter.\n\n### `RowData` Type Restriction\n\nThe `RowData` type is now more restrictive.\n\n---\n\n## Migration Checklist\n\n- [ ] Update your table setup to v9 and define `_features` using `tableFeatures()` (or use `stockFeatures`)\n- [ ] Migrate `get*RowModel()` options to `_rowModels`\n- [ ] Update row model factories to include `Fns` parameters where needed\n- [ ] Update TypeScript types to include `TFeatures` generic\n- [ ] Update state access: `table.getState()` → `table.store.state`\n- [ ] Update `createColumnHelper<TData>()` → `createColumnHelper<TFeatures, TData>()`\n- [ ] Replace `enablePinning` with `enableColumnPinning`/`enableRowPinning` if used\n- [ ] Rename `sortingFn` → `sortFn` in column definitions\n- [ ] Split column sizing/resizing: use both `columnSizingFeature` and `columnResizingFeature` if needed\n- [ ] Rename `columnSizingInfo` state → `columnResizing` (and related options)\n- [ ] Update `ColumnMeta` module augmentation to include `TFeatures` generic (if used)\n- [ ] (Optional) Use `tableOptions()` for composable configurations\n- [ ] (Optional) Use `createTableHook` for reusable table patterns\n\n---\n\n## Examples\n\nCheck out these examples to see v9 patterns in action:\n- [Basic](../examples/basic)\n- [Basic (App Table)](../examples/basic-app-table)\n- [Filters](../examples/filters)\n- [Column Ordering](../examples/column-ordering)\n- [Column Pinning](../examples/column-pinning)\n- [Column Visibility](../examples/column-visibility)\n- [Expanding](../examples/expanding)\n- [Grouping](../examples/grouping)\n- [Row Selection](../examples/row-selection)\n- [Composable Tables](../examples/composable-tables)\n\n\n\n"
  },
  {
    "path": "docs/framework/angular/guide/rendering.md",
    "content": "---\ntitle: Rendering components\n---\n\nThe `@tanstack/angular-table` adapter provides structural directives and dependency injection primitives for rendering table content in Angular templates.\n\n## FlexRender\n\n[`FlexRender`](../reference/variables/FlexRender) is the rendering primitive.\nIt is exported as a tuple of two directives:\n\n- [`FlexRenderDirective`](../reference/classes/FlexRenderDirective) — the base structural directive (`*flexRender`)\n- [`FlexRenderCell`](../reference/classes/FlexRenderCell.md) — shorthand directives (`*flexRenderCell`, `*flexRenderHeader`, `*flexRenderFooter`)\n\nImport `FlexRender` to get both:\n\n```ts\nimport { Component } from '@angular/core'\nimport { FlexRender } from '@tanstack/angular-table'\n\n@Component({\n  imports: [FlexRender],\n  templateUrl: './app.html',\n})\nexport class AppComponent {}\n```\n\n### How it works\n\n`FlexRender` is an Angular **structural directive**. Internally, it resolves the column definition's `header`, `cell`, or `footer` function and renders the result using [`ViewContainerRef`](https://angular.dev/api/core/ViewContainerRef):\n\n- **Primitives** (`string`, `number`): rendered via `createEmbeddedView` into the host `ng-template`. The value is exposed as the template's implicit context (`let value`).\n- **`TemplateRef`**: rendered via `createEmbeddedView`. The render context (`CellContext`, `HeaderContext`) is passed as `$implicit`.\n- **`flexRenderComponent(...)`**: rendered via `createComponent` with explicit `inputs`, `outputs`, `bindings`, `directives`, and `injector`.\n- **Component type** (`Type<T>`): rendered via [`createComponent`](https://angular.dev/api/core/ViewContainerRef#createComponent). All properties from the render context are set as component inputs through [`ComponentRef.setInput`](https://angular.dev/api/core/ComponentRef#setInput).\n\nColumn definition functions (`header`, `cell`, `footer`) are called inside [`runInInjectionContext`](https://angular.dev/api/core/runInInjectionContext), which means you can call `inject()`, use signals, and access DI tokens directly in your render logic.\n\n## Cell rendering\n\nPrefer the shorthand directives for standard rendering:\n\n| Directive | Input | Column definition |\n|---|---|---|\n| `*flexRenderCell` | `Cell` | `columnDef.cell` |\n| `*flexRenderHeader` | `Header` | `columnDef.header` |\n| `*flexRenderFooter` | `Header` | `columnDef.footer` |\n\nEach shorthand resolves the correct column definition function and render context automatically through a `computed` signal, so no manual `props` mapping is needed.\n\n### Example\n\n```html\n<thead>\n  @for (headerGroup of table.getHeaderGroups(); track headerGroup.id) {\n    <tr>\n      @for (header of headerGroup.headers; track header.id) {\n        <th>\n          @if (!header.isPlaceholder) {\n            <ng-container *flexRenderHeader=\"header; let value\">\n              {{ value }}\n            </ng-container>\n          }\n        </th>\n      }\n    </tr>\n  }\n</thead>\n\n<tbody>\n  @for (row of table.getRowModel().rows; track row.id) {\n    <tr>\n      @for (cell of row.getVisibleCells(); track cell.id) {\n        <td>\n          <ng-container *flexRenderCell=\"cell; let value\">\n            {{ value }}\n          </ng-container>\n        </td>\n      }\n    </tr>\n  }\n</tbody>\n```\n\n## Cell rendering with custom props\n\nWhen you need full control over the `props` passed to the render function, use `*flexRender` directly.\n\n`FlexRenderDirective` accepts two inputs:\n\n- `flexRender` — the render definition (a column def function, a string, a `TemplateRef`, a component type, or a `flexRenderComponent(...)` wrapper)\n- `flexRenderProps` — the props object passed to the render function and used as the implicit template context\n\nStandard usage:\n\n```html\n<ng-container\n  *flexRender=\"\n    cell.column.columnDef.cell;\n    props: cell.getContext();\n    let rendered\n  \"\n>\n  {{ rendered }}\n</ng-container>\n```\n\nYou can pass a custom props object to override the default context shape:\n\n```html\n<ng-container\n  *flexRender=\"\n    cell.column.columnDef.cell;\n    props: {\n      value: cell.getValue(),\n      ...cell.getContext(),\n    };\n    let rendered\n  \"\n>\n  {{ rendered }}\n</ng-container>\n```\n\nInside rendered components, the full props object is available via [`injectFlexRenderContext()`](#injectflexrendercontext).\n\n## Component rendering\n\nYou can render Angular components from column definitions in two ways:\n\n### Using `flexRenderComponent`\n\n[`flexRenderComponent(component, options?)`](../reference/functions/flexRenderComponent) wraps a component type with explicit options for `inputs`, `outputs`, `injector`, `bindings`, and `directives`.\n\nUse this when you need to:\n\n- pass custom inputs not derived from the render context\n- subscribe to component outputs\n- provide a custom `Injector`\n- use creation-time `bindings` (Angular v20+)\n- apply host directives and binding values at runtime\n\n```ts\nimport { flexRenderComponent, type ColumnDef } from '@tanstack/angular-table'\n\nconst columns: ColumnDef<Person>[] = [\n  {\n    id: 'custom-cell',\n    cell: ctx =>\n      flexRenderComponent(CustomCellComponent, {\n        inputs: {\n          content: ctx.row.original.firstName,\n        },\n        outputs: {\n          clicked: value => {\n            console.log(value)\n          },\n        },\n      }),\n  },\n]\n```\n\n#### How inputs and outputs work\n\n**Inputs** are applied through [`ComponentRef.setInput(key, value)`](https://angular.dev/api/core/ComponentRef#setInput). This works with both `input()` signals and `@Input()` decorators. Inputs are diffed on every change detection cycle using `KeyValueDiffers` — only changed values trigger `setInput`.\n\nFor object-like inputs, updates are reference-based: if the object reference is stable, Angular's default input equality semantics prevent unnecessary updates.\n\n**Outputs** work through `OutputEmitterRef` subscriptions. The factory reads the component instance property by name, checks that it is an `OutputEmitterRef`, and subscribes to it. When the output emits, the corresponding callback from `outputs` is invoked. Subscriptions are cleaned up automatically when the component is destroyed.\n\n#### `bindings` API (Angular v20+)\n\n`flexRenderComponent` also accepts `bindings` and `directives`, forwarded directly to [`ViewContainerRef.createComponent`](https://angular.dev/api/core/ViewContainerRef#createComponent) at creation time.\n\nThis supports Angular programmatic rendering APIs for passing host directives and binding values at runtime.\n\nUnlike `inputs`/`outputs` (which are applied imperatively after creation), `bindings` are applied **at creation time** — they participate in the component's initial change detection cycle.\n\n```ts\nimport {\n  inputBinding,\n  outputBinding,\n  twoWayBinding,\n  signal,\n} from '@angular/core'\nimport { flexRenderComponent } from '@tanstack/angular-table'\n\nreadonly name = signal('Ada')\n\ncell: () =>\n  flexRenderComponent(EditableNameCellComponent, {\n    bindings: [\n      inputBinding('value', this.name),\n      outputBinding('valueChange', value => {\n        console.log('changed', value)\n      }),\n      twoWayBinding('value', this.name),\n    ],\n  })\n```\n\n> Avoid mixing `bindings` with `inputs`/`outputs` on the same property. `bindings` are applied at creation, while `inputs`/`outputs` are applied post-creation — mixing them can lead to double initialization or conflicting values.\n\nSee the Angular docs for details:\n\n- [Programmatic rendering — Binding inputs/outputs/directives](https://angular.dev/guide/components/programmatic-rendering#binding-inputs-outputs-and-setting-host-directives-at-creation)\n- [`inputBinding`](https://angular.dev/api/core/inputBinding), [`outputBinding`](https://angular.dev/api/core/outputBinding), [`twoWayBinding`](https://angular.dev/api/core/twoWayBinding)\n\n### Returning a component class\n\nReturn a component class from `header`, `cell`, or `footer`. \n\nThe render context properties (`table`, `column`, `header`, `cell`, `row`, `getValue`, etc.) are automatically set as component inputs via `ComponentRef.setInput(...)`.\n\nDefine input signals matching the context property names you need:\n\n```ts\nimport { Component, input } from '@angular/core'\nimport type { ColumnDef, Table, CellContext } from '@tanstack/angular-table'\n\nconst columns: ColumnDef<Person>[] = [\n  {\n    id: 'select',\n    header: () => TableHeadSelectionComponent,\n    cell: () => TableRowSelectionComponent,\n  },\n]\n\n@Component({\n  template: `\n    <input\n      type=\"checkbox\"\n      [checked]=\"table().getIsAllRowsSelected()\"\n      [indeterminate]=\"table().getIsSomeRowsSelected()\"\n      (change)=\"table().toggleAllRowsSelected()\"\n    />\n  `,\n})\nexport class TableHeadSelectionComponent<T> {\n  readonly table = input.required<Table<T>>();\n  // column = input.required<Column<typeof _features, T, unknown>>()\n  // header = input.required<Header<typeof _features, T, unknown>>()\n}\n```\n\nOnly properties declared with `input()` / `input.required()` are set — other context properties are silently ignored. You can also access the full context via [`injectFlexRenderContext()`](#injectflexrendercontext).\n\n## TemplateRef rendering\n\nYou can return a `TemplateRef` from column definitions. The render context is passed as the template's `$implicit` context.\n\nUse `viewChild(...)` to capture template references:\n\n```ts\nimport { Component, TemplateRef, viewChild } from '@angular/core'\nimport type {\n  CellContext,\n  ColumnDef,\n  HeaderContext,\n} from '@tanstack/angular-table'\n\n@Component({\n  template: `\n    <ng-template #customHeader let-context>\n      {{ context.column.id }}\n    </ng-template>\n\n    <ng-template #customCell let-context>\n      {{ context.getValue() }}\n    </ng-template>\n  `,\n})\nexport class AppComponent {\n  readonly customHeader =\n    viewChild.required<TemplateRef<{ $implicit: HeaderContext<any, any, any> }>>(\n      'customHeader',\n    )\n  readonly customCell =\n    viewChild.required<TemplateRef<{ $implicit: CellContext<any, any, any> }>>(\n      'customCell',\n    )\n\n  readonly columns: ColumnDef<any>[] = [\n    {\n      id: 'templated',\n      header: () => this.customHeader(),\n      cell: () => this.customCell(),\n    },\n  ]\n}\n```\n\n`TemplateRef` rendering uses `createEmbeddedView` with an injector that includes the [DI context tokens](#dependency-injection). For reusable render blocks shared across multiple screens, prefer standalone components over `TemplateRef`.\n\n## Dependency injection\n\n`FlexRender` automatically provides DI tokens when rendering components and templates. These tokens are created in the `#getInjector` method of the renderer, which builds a child `Injector` with the render context properties.\n\n### `injectFlexRenderContext`\n\n[`injectFlexRenderContext<T>()`](../reference/functions/injectFlexRenderContext) returns the full props object passed to `*flexRender`. The return type depends on the column definition slot:\n\n- In a `cell` definition: `CellContext<TFeatures, TData, TValue>`\n- In a `header`/`footer` definition: `HeaderContext<TFeatures, TData, TValue>`\n\n```ts\nimport { Component } from '@angular/core'\nimport {\n  injectFlexRenderContext,\n  type CellContext,\n} from '@tanstack/angular-table'\n\n@Component({\n  template: `\n    <span>{{ context.getValue() }}</span>\n    <button (click)=\"context.row.toggleSelected()\">Toggle</button>\n  `,\n})\nexport class InteractiveCellComponent {\n  readonly context = injectFlexRenderContext<CellContext<any, any, any>>()\n}\n```\n\nInternally, the renderer wraps the context in a `Proxy` so that property access always reflects the latest values, even after re-renders.\n\n### Context directives\n\nThree optional directives let you expose table, header, and cell context to **any descendant** in the template — not just components rendered by `*flexRender`.\n\nThis eliminates prop drilling: instead of passing data through multiple `input()` layers, any nested component or directive can inject the context directly.\n\n| Directive | Selector | Token | Inject helper |\n|---|---|---|---|\n| [`TanStackTable`](../reference/functions/injectTableContext) | `[tanStackTable]` | `TanStackTableToken` | `injectTableContext()` |\n| [`TanStackTableHeader`](../reference/functions/injectTableHeaderContext) | `[tanStackTableHeader]` | `TanStackTableHeaderToken` | `injectTableHeaderContext()` |\n| [`TanStackTableCell`](../reference/functions/injectTableCellContext) | `[tanStackTableCell]` | `TanStackTableCellToken` | `injectTableCellContext()` |\n\nImport them alongside `FlexRender`:\n\n```ts\nimport {\n  FlexRender,\n  TanStackTable,\n  TanStackTableHeader,\n  TanStackTableCell,\n} from '@tanstack/angular-table'\n\n@Component({\n  imports: [FlexRender, TanStackTable, TanStackTableHeader, TanStackTableCell],\n  templateUrl: './app.html',\n})\nexport class AppComponent {}\n```\n\nApply them in the template to establish injection scopes:\n\n```html\n<table [tanStackTable]=\"table\">\n   <!-- components can access to table context -->\n\n  @for (headerGroup of table.getHeaderGroups(); track headerGroup.id) {\n    <tr>\n      @for (header of headerGroup.headers; track header.id) {\n        <th [tanStackTableHeader]=\"header\">\n            <!-- components can access to table header context -->\n        </th>\n      }\n    </tr>\n  }\n\n  @for (row of table.getRowModel().rows; track row.id) {\n    <tr>\n      @for (cell of row.getVisibleCells(); track cell.id) {\n        <td [tanStackTableCell]=\"cell\">\n            <!-- components can access to table cell context -->\n        </td>\n      }\n    </tr>\n  }\n</table>\n```\n\nAny component nested inside a `[tanStackTableCell]` host can inject the cell context:\n\n```ts\nimport { Component } from '@angular/core'\nimport { injectTableCellContext } from '@tanstack/angular-table'\n\n@Component({\n  template: `\n    <button (click)=\"onAction()\">\n      Action for {{ cell().id }}\n    </button>\n  `,\n})\nexport class CellActionsComponent {\n  readonly cell = injectTableCellContext()\n\n  onAction() {\n    console.log('Cell:', this.cell())\n  }\n}\n```\n\n```html\n<!-- No need to pass cell as an input — it's injected -->\n<td [tanStackTableCell]=\"cell\">\n  <app-cell-actions />\n</td>\n```\n\nEach directive uses Angular's `providers` array to register a factory that reads its own input signal.\n\nThis means the token is scoped to the directive's host element and its descendants. Multiple `[tanStackTableCell]` directives on different elements provide independent contexts.\n\n### Automatic token injection in FlexRender\n\nWhen `FlexRender` renders a component or template, it also provides DI tokens automatically based on the render context shape. In the renderer's `#getInjector` method, if the context object contains `table`, `cell`, or `header` properties, the corresponding `TanStackTableToken`, `TanStackTableCellToken`, or `TanStackTableHeaderToken` tokens are provided in the child injector.\n\nThis means that even **without** the context directives, components rendered via `*flexRender` can use `injectTableContext()`, `injectTableCellContext()`, and `injectTableHeaderContext()`. The context directives are only needed for components that live **outside** the `*flexRender` rendering tree (e.g. sibling components in the same `<td>`).\n"
  },
  {
    "path": "docs/framework/angular/guide/table-composition.md",
    "content": "---\ntitle: Table Composition (createTableHook)\n---\n\n`createTableHook` is a convenience API for creating reusable, type-safe table configurations with pre-bound components. It is inspired by [TanStack Form's `createFormHook`](https://tanstack.com/form/latest/docs/framework/react/guides/form-composition) — a pattern where you define shared infrastructure once and consume it across your application with minimal boilerplate.\n\n> **When to use it:** Use `createTableHook` when you have multiple tables that share the same configuration (features, row models, and reusable components). For a single table, `injectTable` is sufficient.\n\n## Examples\n\n- [Composable Tables](../examples/composable-tables) — Two tables (Users and Products) sharing the same `createTableHook` configuration, with table/cell/header components, sorting, filtering, and pagination.\n- [Basic App Table](../examples/basic-app-table) — Minimal example using `createTableHook` with no pre-bound components.\n\n### createTableHook\n\n`createTableHook` centralizes your table configuration into a single factory call. It returns a set of typed functions — `injectAppTable`, `createAppColumnHelper`, and pre-typed injection helpers — that you use instead of the base APIs.\n\n## Setup\n\nCall `createTableHook` with your shared configuration and destructure the returned utilities:\n\n```ts\n// table.ts — shared table infrastructure\n\nimport {\n  createTableHook,\n  tableFeatures,\n  columnFilteringFeature,\n  createFilteredRowModel,\n  createPaginatedRowModel,\n  createSortedRowModel,\n  filterFns,\n  rowPaginationFeature,\n  rowSortingFeature,\n  sortFns,\n} from '@tanstack/angular-table'\n\nimport { PaginationControls, RowCount, TableToolbar } from './components/table-components'\nimport { TextCell, NumberCell, StatusCell, ProgressCell } from './components/cell-components'\nimport { SortIndicator, ColumnFilter } from './components/header-components'\n\nexport const {\n  createAppColumnHelper,\n  injectAppTable,\n  injectTableContext,\n  injectTableCellContext,\n  injectTableHeaderContext,\n} = createTableHook({\n  // Features and row models are shared across all tables\n  _features: tableFeatures({\n    columnFilteringFeature,\n    rowPaginationFeature,\n    rowSortingFeature,\n  }),\n  _rowModels: {\n    sortedRowModel: createSortedRowModel(sortFns),\n    filteredRowModel: createFilteredRowModel(filterFns),\n    paginatedRowModel: createPaginatedRowModel(),\n  },\n  // Default table options applied to every table\n  getRowId: (row) => row.id,\n\n  // Pre-bound component registries\n  tableComponents: {\n    PaginationControls,\n    RowCount,\n    TableToolbar,\n  },\n  cellComponents: {\n    TextCell,\n    NumberCell,\n    StatusCell,\n    ProgressCell,\n  },\n  headerComponents: {\n    SortIndicator,\n    ColumnFilter,\n  },\n})\n```\n\nThis single file becomes the source of truth for your application's table infrastructure.\n\n## What `createTableHook` returns\n\n| Export | Description |\n|---|---|\n| `injectAppTable` | A wrapper around `injectTable` that merges default options and attaches component registries. Returns an `AppAngularTable` with table/cell/header components available directly on the instance. |\n| `createAppColumnHelper` | A typed column helper where `cell`, `header`, and `footer` definitions receive enhanced context types with the registered components. |\n| `injectTableContext` | Pre-typed `injectTableContext()` bound to your feature set. |\n| `injectTableCellContext` | Pre-typed `injectTableCellContext()` bound to your feature set. |\n| `injectTableHeaderContext` | Pre-typed `injectTableHeaderContext()` bound to your feature set. |\n| `injectFlexRenderCellContext` | Pre-typed `injectFlexRenderContext()` for cell context. |\n| `injectFlexRenderHeaderContext` | Pre-typed `injectFlexRenderContext()` for header context. |\n\n## Component registries\n\n`createTableHook` accepts three component registries that map string keys to Angular components or render functions:\n\n### `tableComponents`\n\nComponents that need access to the **table instance**. These are attached directly to the `AppAngularTable` object returned by `injectAppTable`, so you can reference them in templates as `table.PaginationControls`, `table.RowCount`, etc.\n\nUse `injectTableContext()` inside these components to access the table:\n\n```ts\n@Component({\n  selector: 'app-pagination-controls',\n  template: `\n    <div class=\"pagination\">\n      <button (click)=\"table().previousPage()\" [disabled]=\"!table().getCanPreviousPage()\">\n        Previous\n      </button>\n      <button (click)=\"table().nextPage()\" [disabled]=\"!table().getCanNextPage()\">\n        Next\n      </button>\n    </div>\n  `,\n  changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class PaginationControls {\n  readonly table = injectTableContext()\n}\n```\n\nRender table components via Angular `NgComponentOutlet`:\n\n```html\n<ng-container *ngComponentOutlet=\"table.PaginationControls\" />\n<ng-container *ngComponentOutlet=\"table.RowCount\" />\n<ng-container\n  *ngComponentOutlet=\"table.TableToolbar; inputs: { title: 'Users', onRefresh }\"\n/>\n```\n\n### `cellComponents`\n\nComponents that render **cell content**. These are attached to the `Cell` prototype, so they are available in column definitions through the enhanced `AppCellContext`:\n\n```ts\nconst columnHelper = createAppColumnHelper<Person>()\n\nconst columns = columnHelper.columns([\n  columnHelper.accessor('firstName', {\n    header: 'First Name',\n    cell: ({ cell }) => cell.TextCell,\n  }),\n  columnHelper.accessor('age', {\n    header: 'Age',\n    cell: ({ cell }) => cell.NumberCell,\n  }),\n  columnHelper.accessor('status', {\n    header: 'Status',\n    cell: ({ cell }) => cell.StatusCell,\n  }),\n])\n```\n\nUse `injectTableCellContext()` or `injectFlexRenderContext()` inside cell components:\n\n```ts\n@Component({\n  selector: 'span',\n  template: `{{ cell().getValue() }}`,\n})\nexport class TextCell {\n  readonly cell = injectTableCellContext<string>()\n}\n```\n\n### `headerComponents`\n\nComponents or render functions that render **header/footer content**. These are attached to the `Header` prototype and available through the enhanced `AppHeaderContext`:\n\n```ts\n// Render functions work too — they run in injection context\nexport function SortIndicator(): string | null {\n  const header = injectTableHeaderContext()\n  const sorted = header().column.getIsSorted()\n  if (!sorted) return null\n  return sorted === 'asc' ? '🔼' : '🔽'\n}\n```\n\nAccess header components in the template via `table.appHeader(header)`:\n\n```html\n@for (_header of headerGroup.headers; track _header.id) {\n  @let header = table.appHeader(_header);\n  <th (click)=\"header.column.toggleSorting()\">\n    <ng-container *flexRenderHeader=\"header; let value\">{{ value }}</ng-container>\n    <ng-container *flexRender=\"header.SortIndicator; props: header.getContext(); let value\">\n      <div [innerHTML]=\"value\"></div>\n    </ng-container>\n  </th>\n}\n```\n\n## Using `injectAppTable`\n\n`injectAppTable` is a wrapper around `injectTable`. It merges the default options from `createTableHook` with the per-table options, and returns an `AppAngularTable` — the standard table instance augmented with:\n\n- **Table components** directly on the table object (`table.PaginationControls`, `table.TableToolbar`, etc.)\n- **`table.appCell(cell)`** — utility type functions for templates that wraps a `Cell` with the registered `cellComponents`\n- **`table.appHeader(header)`** — utility type functions for templates that wraps a `Header` with the registered `headerComponents`\n- **`table.appFooter(footer)`** — utility type functions for templates that wraps a `Header` (footer) with the registered `headerComponents`\n\nYou do not need to pass `_features` or `_rowModels` — they are inherited from the hook configuration:\n\n```ts\n@Component({\n  selector: 'users-table',\n  templateUrl: './users-table.html',\n  imports: [FlexRender, TanStackTable, TanStackTableHeader, TanStackTableCell, NgComponentOutlet],\n  changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class UsersTable {\n  readonly data = signal(makeData(100))\n\n  readonly columns = columnHelper.columns([\n    columnHelper.accessor('firstName', {\n      header: 'First Name',\n      cell: ({ cell }) => cell.TextCell,\n    }),\n    // ...\n  ])\n\n  // No need to specify _features, _rowModels, ... — they come from createTableHook\n  table = injectAppTable(() => ({\n    columns: this.columns,\n    data: this.data(),\n  }))\n}\n```\n\n## Using `createAppColumnHelper`\n\n`createAppColumnHelper<TData>()` returns a column helper identical to `createColumnHelper` at runtime, but with enhanced types: the `cell`, `header`, and `footer` definition callbacks receive `AppCellContext` / `AppHeaderContext` instead of the base context types.\n\nThis means TypeScript knows about your registered components and provides autocompletion:\n\n```ts\nconst columnHelper = createAppColumnHelper<Person>()\n\ncolumnHelper.accessor('firstName', {\n  cell: ({ cell }) => {\n    // ✅ TypeScript knows about TextCell, NumberCell, StatusCell, etc.\n    return cell.TextCell\n  },\n  header: ({ header }) => {\n    // ✅ TypeScript knows about SortIndicator, ColumnFilter, etc.\n    return flexRenderComponent(header.SortIndicator)\n  },\n})\n```\n\nYou can also use `flexRenderComponent(...)` to wrap the component with custom inputs/outputs:\n\n```ts\ncolumnHelper.accessor('firstName', {\n  cell: ({ cell }) => flexRenderComponent(cell.TextCell),\n  footer: ({ header }) => flexRenderComponent(header.FooterColumnId),\n})\n```\n\n## Multiple table configurations\n\nYou can call `createTableHook` multiple times to create different table configurations for different parts of your application. Each call returns an independent set of utilities with its own feature set and component registries:\n\n```ts\n// admin-table.ts — tables with editing capabilities\nexport const {\n  injectAppTable: injectAdminTable,\n  createAppColumnHelper: createAdminColumnHelper,\n} = createTableHook({\n  _features: tableFeatures({ rowSortingFeature, columnFilteringFeature }),\n  _rowModels: { /* ... */ },\n  cellComponents: { EditableCell, DeleteButton },\n})\n\n// readonly-table.ts — simpler read-only tables\nexport const {\n  injectAppTable: injectReadonlyTable,\n  createAppColumnHelper: createReadonlyColumnHelper,\n} = createTableHook({\n  _features: tableFeatures({ rowSortingFeature }),\n  _rowModels: { /* ... */ },\n  cellComponents: { TextCell, NumberCell },\n})\n```\n\n## Examples\n\n- [Composable Tables](../examples/composable-tables) — Full example with two tables sharing the same `createTableHook` configuration.\n- [Basic App Table](../examples/basic-app-table) — Minimal example with no pre-bound components.\n"
  },
  {
    "path": "docs/framework/angular/guide/table-state.md",
    "content": "---\ntitle: Table State (Angular) Guide\n---\n\n## Table State (Angular) Guide\n\nTanStack Table has a simple underlying internal state management system to store and manage the state of the table. It also lets you selectively pull out any state that you need to manage in your own state management. This guide will walk you through the different ways in which you can interact with and manage the state of the table.\n\n### Accessing Table State\n\nYou do not need to set up anything special in order for the table state to work. If you pass nothing into either `state`, `initialState`, or any of the `on[State]Change` table options, the table will manage its own state internally. You can access any part of this internal state by using the `table.store.state` table instance API.\n\n```ts\ntable = injectTable(() => ({\n  columns: this.columns,\n  data: this.data(),\n  //...\n}))\n\nsomeHandler() {\n  console.log(this.table.store.state) //access the entire internal state\n  console.log(this.table.store.state.rowSelection) //access just the row selection state\n}\n```\n\n### Custom Initial State\n\nIf all you need to do for certain states is customize their initial default values, you still do not need to manage any of the state yourself. You can simply set values in the `initialState` option of the table instance.\n\n```jsx\ntable = injectTable(() => ({\n  columns: this.columns,\n  data: this.data(),\n  initialState: {\n    columnOrder: ['age', 'firstName', 'lastName'], //customize the initial column order\n    columnVisibility: {\n      id: false //hide the id column by default\n    },\n    expanded: true, //expand all rows by default\n    sorting: [\n      {\n        id: 'age',\n        desc: true //sort by age in descending order by default\n      }\n    ]\n  },\n  //...\n}))\n```\n\n> **Note**: Only specify each particular state in either `initialState` or `state`, but not both. If you pass in a particular state value to both `initialState` and `state`, the initialized state in `state` will take overwrite any corresponding value in `initialState`.\n\n### Controlled State\n\nIf you need easy access to the table state in other areas of your application, TanStack Table makes it easy to control and manage any or all of the table state in your own state management system. You can do this by passing in your own state and state management functions to the `state` and `on[State]Change` table options.\n\n#### Individual Controlled State\n\nYou can control just the state that you need easy access to. You do NOT have to control all of the table state if you do not need to. It is recommended to only control the state that you need on a case-by-case basis.\n\nIn order to control a particular state, you need to both pass in the corresponding `state` value and the `on[State]Change` function to the table instance.\n\nLet's take filtering, sorting, and pagination as an example in a \"manual\" server-side data fetching scenario. You can store the filtering, sorting, and pagination state in your own state management, but leave out any other state like column order, column visibility, etc. if your API does not care about those values.\n\n```ts\nimport {signal} from '@angular/core';\nimport {SortingState, ColumnFiltersState, PaginationState} from '@tanstack/angular-table'\nimport {toObservable} from \"@angular/core/rxjs-interop\";\nimport {combineLatest, switchMap} from 'rxjs';\n\nclass TableComponent {\n  readonly columnFilters = signal<ColumnFiltersState>([]) //no default filters\n  readonly sorting = signal<SortingState>([\n    {\n      id: 'age',\n      desc: true, //sort by age in descending order by default\n    }\n  ])\n  readonly pagination = signal<PaginationState>({\n    pageIndex: 0,\n    pageSize: 15\n  })\n\n  //Use our controlled state values to fetch data\n  readonly data$ = combineLatest({\n    filters: toObservable(this.columnFilters),\n    sorting: toObservable(this.sorting),\n    pagination: toObservable(this.pagination)\n  }).pipe(\n    switchMap(({filters, sorting, pagination}) => fetchData(filters, sorting, pagination))\n  )\n  readonly data = toSignal(this.data$);\n\n  readonly table = injectTable(() => ({\n    columns: this.columns,\n    data: this.data(),\n    //...\n    state: {\n      columnFilters: this.columnFilters(), //pass controlled state back to the table (overrides internal state)\n      sorting: this.sorting(),\n      pagination: this.pagination(),\n    },\n    onColumnFiltersChange: updater => { //hoist columnFilters state into our own state management\n      updater instanceof Function\n        ? this.columnFilters.update(updater)\n        : this.columnFilters.set(updater)\n    },\n    onSortingChange: updater => {\n      updater instanceof Function\n        ? this.sorting.update(updater)\n        : this.sorting.set(updater)\n    },\n    onPaginationChange: updater => {\n      updater instanceof Function\n        ? this.pagination.update(updater)\n        : this.pagination.set(updater)\n    },\n  }))\n}\n\n//...\n```\n\n#### Fully Controlled State\n\nAlternatively, you can control the entire table state with the `onStateChange` table option. It will hoist out the entire table state into your own state management system. Be careful with this approach, as you might find that raising some frequently changing state values up a component tree, like `columnSizingInfo` state`, might cause bad performance issues.\n\nA couple of more tricks may be needed to make this work. If you use the `onStateChange` table option, the initial values of the `state` must be populated with all of the relevant state values for all of the features that you want to use. You can either manually type out all of the initial state values, or use a constructor in a special way as shown below.\n\n```ts\n\n\nclass TableComponent {\n  // create an empty table state, we'll override it later\n  readonly state = signal({} as TableState);\n\n  // create a table instance with default state values\n  readonly table = injectTable(() => ({\n    columns: this.columns,\n    data: this.data(),\n    // our fully controlled state overrides the internal state\n    state: this.state(),\n    onStateChange: updater => {\n      // any state changes will be pushed up to our own state management\n      this.state.set(\n        updater instanceof Function ? updater(this.state()) : updater\n      )\n    }\n  }))\n\n  constructor() {\n    // set the initial table state\n    this.state.set({\n      // populate the initial state with all of the default state values\n      // from the table instance\n      ...this.table.initialState,\n      pagination: {\n        pageIndex: 0,\n        pageSize: 15, // optionally customize the initial pagination state.\n      },\n    })\n  }\n}\n```\n\n### On State Change Callbacks\n\nSo far, we have seen the `on[State]Change` and `onStateChange` table options work to \"hoist\" the table state changes into our own state management. However, there are a few things about these using these options that you should be aware of.\n\n#### 1. **State Change Callbacks MUST have their corresponding state value in the `state` option**.\n\nSpecifying an `on[State]Change` callback tells the table instance that this will be a controlled state. If you do not specify the corresponding `state` value, that state will be \"frozen\" with its initial value.\n\n```ts\nclass TableComponent {\n  sorting = signal<SortingState>([])\n\n  table = injectTable(() => ({\n    columns: this.columns,\n    data: this.data(),\n    //...\n    state: {\n      sorting: this.sorting(), // required because we are using `onSortingChange`\n    },\n    onSortingChange: updater => { // makes the `state.sorting` controlled\n      updater instanceof Function\n        ? this.sorting.update(updater)\n        : this.sorting.set(updater)\n    }\n  }))\n}\n```\n\n#### 2. **Updaters can either be raw values or callback functions**.\n\nThe `on[State]Change` and `onStateChange` callbacks work exactly like the `setState` functions in React. The updater values can either be a new state value or a callback function that takes the previous state value and returns the new state value.\n\nWhat implications does this have? It means that if you want to add in some extra logic in any of the `on[State]Change` callbacks, you can do so, but you need to check whether or not the new incoming updater value is a function or value.\n\nThis is why you will see the `updater instanceof Function ? this.state.update(updater) : this.state.set(updater)` pattern in the examples above. This pattern checks if the updater is a function, and if it is, it calls the function with the previous state value to get the new state value, or the signal will require `signal.update` to be called with the updater instead of `signal.set`.\n\n### State Types\n\nAll complex states in TanStack Table have their own TypeScript types that you can import and use. This can be handy for ensuring that you are using the correct data structures and properties for the state values that you are controlling.\n\n```ts\nimport {injectTable, type SortingState} from '@tanstack/angular-table'\n\nclass TableComponent {\n  readonly sorting = signal<SortingState>([\n    {\n      id: 'age', // you should get autocomplete for the `id` and `desc` properties\n      desc: true,\n    }\n  ])\n}\n```\n"
  },
  {
    "path": "docs/framework/angular/reference/classes/FlexRenderCell.md",
    "content": "---\nid: FlexRenderCell\ntitle: FlexRenderCell\n---\n\n# Class: FlexRenderCell\\<TFeatures, TData, TValue\\>\n\nDefined in: [helpers/flexRenderCell.ts:62](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/flexRenderCell.ts#L62)\n\nSimplified directive wrapper of `*flexRender`.\n\nUse this utility component to render headers, cells, or footers with custom markup.\n\nOnly one prop (`cell`, `header`, or `footer`) may be passed based on the used selector.\n\n## Examples\n\n```html\n<td *flexRenderCell=\"cell; let cell\">{{cell}}</td>\n<th *flexRenderHeader=\"header; let header\">{{header}}</th>\n<th *flexRenderFooter=\"footer; let footer\">{{footer}}</th>\n```\n\nThis replaces calling `*flexRender` directly like this:\n```html\n<td *flexRender=\"cell.column.columnDef.cell; props: cell.getContext(); let cell\">{{cell}}</td>\n<td *flexRender=\"header.column.columnDef.header; props: header.getContext(); let header\">{{header}}</td>\n<td *flexRender=\"footer.column.columnDef.footer; props: footer.getContext(); let footer\">{{footer}}</td>\n```\n\nCan be imported through FlexRenderCell or [FlexRender](../variables/FlexRender.md) import,\nwhich the latter is preferred.\n\n```ts\nimport {FlexRender} from '@tanstack/angular-table\n\n@Component({\n // ...\n imports: [\n   FlexRender\n ]\n})\n```\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* `TableFeatures`\n\n### TData\n\n`TData` *extends* `RowData`\n\n### TValue\n\n`TValue` *extends* `CellData`\n\n## Constructors\n\n### Constructor\n\n```ts\nnew FlexRenderCell<TFeatures, TData, TValue>(): FlexRenderCell<TFeatures, TData, TValue>;\n```\n\nDefined in: [helpers/flexRenderCell.ts:118](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/flexRenderCell.ts#L118)\n\n#### Returns\n\n`FlexRenderCell`\\<`TFeatures`, `TData`, `TValue`\\>\n\n## Properties\n\n### cell\n\n```ts\nreadonly cell: InputSignal<Cell<TFeatures, TData, TValue> | undefined>;\n```\n\nDefined in: [helpers/flexRenderCell.ts:67](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/flexRenderCell.ts#L67)\n\n***\n\n### footer\n\n```ts\nreadonly footer: InputSignal<Header<TFeatures, TData, TValue> | undefined>;\n```\n\nDefined in: [helpers/flexRenderCell.ts:75](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/flexRenderCell.ts#L75)\n\n***\n\n### header\n\n```ts\nreadonly header: InputSignal<Header<TFeatures, TData, TValue> | undefined>;\n```\n\nDefined in: [helpers/flexRenderCell.ts:71](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/flexRenderCell.ts#L71)\n"
  },
  {
    "path": "docs/framework/angular/reference/classes/FlexRenderComponentInstance.md",
    "content": "---\nid: FlexRenderComponentInstance\ntitle: FlexRenderComponentInstance\n---\n\n# Class: FlexRenderComponentInstance\\<TComponent\\>\n\nDefined in: [flex-render/flexRenderComponent.ts:259](https://github.com/TanStack/table/blob/main/packages/angular-table/src/flex-render/flexRenderComponent.ts#L259)\n\nWrapper class for a component that will be used as content for [FlexRenderDirective](FlexRenderDirective.md)\n\nPrefer [flexRenderComponent](../functions/flexRenderComponent.md) helper for better type-safety\n\n## Type Parameters\n\n### TComponent\n\n`TComponent` = `any`\n\n## Implements\n\n- [`FlexRenderComponent`](../interfaces/FlexRenderComponent.md)\\<`TComponent`\\>\n\n## Constructors\n\n### Constructor\n\n```ts\nnew FlexRenderComponentInstance<TComponent>(\n   component, \n   inputs?, \n   injector?, \n   outputs?, \n   directives?, \nbindings?): FlexRenderComponentInstance<TComponent>;\n```\n\nDefined in: [flex-render/flexRenderComponent.ts:266](https://github.com/TanStack/table/blob/main/packages/angular-table/src/flex-render/flexRenderComponent.ts#L266)\n\n#### Parameters\n\n##### component\n\n`Type`\\<`TComponent`\\>\n\n##### inputs?\n\n`Inputs`\\<`TComponent`\\>\n\n##### injector?\n\n`Injector`\n\n##### outputs?\n\n`Outputs`\\<`TComponent`\\>\n\n##### directives?\n\n(`Type`\\<`unknown`\\> \\| `DirectiveWithBindings`\\<`unknown`\\>)[]\n\n##### bindings?\n\n`Binding`[]\n\n#### Returns\n\n`FlexRenderComponentInstance`\\<`TComponent`\\>\n\n## Properties\n\n### allowedInputNames\n\n```ts\nreadonly allowedInputNames: string[] = [];\n```\n\nDefined in: [flex-render/flexRenderComponent.ts:263](https://github.com/TanStack/table/blob/main/packages/angular-table/src/flex-render/flexRenderComponent.ts#L263)\n\nList of allowed input names.\n\n#### Implementation of\n\n[`FlexRenderComponent`](../interfaces/FlexRenderComponent.md).[`allowedInputNames`](../interfaces/FlexRenderComponent.md#allowedinputnames)\n\n***\n\n### allowedOutputNames\n\n```ts\nreadonly allowedOutputNames: string[] = [];\n```\n\nDefined in: [flex-render/flexRenderComponent.ts:264](https://github.com/TanStack/table/blob/main/packages/angular-table/src/flex-render/flexRenderComponent.ts#L264)\n\nList of allowed output names.\n\n#### Implementation of\n\n[`FlexRenderComponent`](../interfaces/FlexRenderComponent.md).[`allowedOutputNames`](../interfaces/FlexRenderComponent.md#allowedoutputnames)\n\n***\n\n### bindings?\n\n```ts\nreadonly optional bindings: Binding[];\n```\n\nDefined in: [flex-render/flexRenderComponent.ts:272](https://github.com/TanStack/table/blob/main/packages/angular-table/src/flex-render/flexRenderComponent.ts#L272)\n\nBindings to apply to the root component\n\n#### See\n\nFlexRenderOptions#bindings\n\n#### Implementation of\n\n[`FlexRenderComponent`](../interfaces/FlexRenderComponent.md).[`bindings`](../interfaces/FlexRenderComponent.md#bindings)\n\n***\n\n### component\n\n```ts\nreadonly component: Type<TComponent>;\n```\n\nDefined in: [flex-render/flexRenderComponent.ts:267](https://github.com/TanStack/table/blob/main/packages/angular-table/src/flex-render/flexRenderComponent.ts#L267)\n\nThe component type\n\n#### Implementation of\n\n[`FlexRenderComponent`](../interfaces/FlexRenderComponent.md).[`component`](../interfaces/FlexRenderComponent.md#component)\n\n***\n\n### directives?\n\n```ts\nreadonly optional directives: (Type<unknown> | DirectiveWithBindings<unknown>)[];\n```\n\nDefined in: [flex-render/flexRenderComponent.ts:271](https://github.com/TanStack/table/blob/main/packages/angular-table/src/flex-render/flexRenderComponent.ts#L271)\n\nDirectives that should be applied to the component.\n\n#### See\n\n#### Implementation of\n\n[`FlexRenderComponent`](../interfaces/FlexRenderComponent.md).[`directives`](../interfaces/FlexRenderComponent.md#directives)\n\n***\n\n### injector?\n\n```ts\nreadonly optional injector: Injector;\n```\n\nDefined in: [flex-render/flexRenderComponent.ts:269](https://github.com/TanStack/table/blob/main/packages/angular-table/src/flex-render/flexRenderComponent.ts#L269)\n\nOptional Injector that will be used when rendering the component.\n\n#### See\n\nFlexRenderOptions#injector\n\n#### Implementation of\n\n[`FlexRenderComponent`](../interfaces/FlexRenderComponent.md).[`injector`](../interfaces/FlexRenderComponent.md#injector)\n\n***\n\n### inputs?\n\n```ts\nreadonly optional inputs: Inputs<TComponent>;\n```\n\nDefined in: [flex-render/flexRenderComponent.ts:268](https://github.com/TanStack/table/blob/main/packages/angular-table/src/flex-render/flexRenderComponent.ts#L268)\n\nComponent instance inputs. Set via [componentRef.setInput API](https://angular.dev/api/core/ComponentRef#setInput))\n\n#### See\n\nFlexRenderOptions#inputs\n\n#### Implementation of\n\n[`FlexRenderComponent`](../interfaces/FlexRenderComponent.md).[`inputs`](../interfaces/FlexRenderComponent.md#inputs)\n\n***\n\n### mirror\n\n```ts\nreadonly mirror: ComponentMirror<TComponent>;\n```\n\nDefined in: [flex-render/flexRenderComponent.ts:262](https://github.com/TanStack/table/blob/main/packages/angular-table/src/flex-render/flexRenderComponent.ts#L262)\n\nReflected metadata about the component.\n\n#### Implementation of\n\n[`FlexRenderComponent`](../interfaces/FlexRenderComponent.md).[`mirror`](../interfaces/FlexRenderComponent.md#mirror)\n\n***\n\n### outputs?\n\n```ts\nreadonly optional outputs: Outputs<TComponent>;\n```\n\nDefined in: [flex-render/flexRenderComponent.ts:270](https://github.com/TanStack/table/blob/main/packages/angular-table/src/flex-render/flexRenderComponent.ts#L270)\n\nComponent instance outputs. Subscribed via OutputEmitterRef#subscribe\n\n#### See\n\nFlexRenderOptions#outputs\n\n#### Implementation of\n\n[`FlexRenderComponent`](../interfaces/FlexRenderComponent.md).[`outputs`](../interfaces/FlexRenderComponent.md#outputs)\n"
  },
  {
    "path": "docs/framework/angular/reference/classes/FlexRenderDirective.md",
    "content": "---\nid: FlexRenderDirective\ntitle: FlexRenderDirective\n---\n\n# Class: FlexRenderDirective\\<TFeatures, TRowData, TValue, TProps\\>\n\nDefined in: [flexRender.ts:84](https://github.com/TanStack/table/blob/main/packages/angular-table/src/flexRender.ts#L84)\n\nUse this utility directive to render headers, cells, or footers with custom markup.\n\nNote: If you are rendering cell, header, or footer without custom context or other props,\nyou can use the [FlexRenderCell](FlexRenderCell.md) directive as shorthand instead .\n\n## Example\n\n```ts\nimport {FlexRender} from '@tanstack/angular-table';\n\n@Component({\n  imports: [FlexRender],\n  template: `\n     <td\n       *flexRender=\"\n         cell.column.columnDef.cell;\n         props: cell.getContext();\n         let cell\"\n     >\n       {{cell}}\n     </td>\n\n     <th\n       *flexRender=\"\n         header.column.columnDef.header;\n         props: header.getContext();\n         let header\"\n       >\n       {{header}}\n     </td>\n\n     <td\n       *flexRender=\"\n         footer.column.columnDef.footer;\n         props: footer.getContext();\n         let footer\"\n     >\n       {{footer}}\n     </td>\n  `,\n})\nclass App {\n}\n```\n\nCan be imported through FlexRenderDirective or [FlexRender](../variables/FlexRender.md) import,\nwhich the latter is preferred.\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* `TableFeatures`\n\n### TRowData\n\n`TRowData` *extends* `RowData`\n\n### TValue\n\n`TValue` *extends* `CellData`\n\n### TProps\n\n`TProps` *extends* \n  \\| `NonNullable`\\<`unknown`\\>\n  \\| `CellContext`\\<`TFeatures`, `TRowData`, `TValue`\\>\n  \\| `HeaderContext`\\<`TFeatures`, `TRowData`, `TValue`\\>\n\n## Constructors\n\n### Constructor\n\n```ts\nnew FlexRenderDirective<TFeatures, TRowData, TValue, TProps>(): FlexRenderDirective<TFeatures, TRowData, TValue, TProps>;\n```\n\nDefined in: [flexRender.ts:109](https://github.com/TanStack/table/blob/main/packages/angular-table/src/flexRender.ts#L109)\n\n#### Returns\n\n`FlexRenderDirective`\\<`TFeatures`, `TRowData`, `TValue`, `TProps`\\>\n\n## Properties\n\n### content\n\n```ts\nreadonly content: InputSignal<FlexRenderInputContent<TProps>>;\n```\n\nDefined in: [flexRender.ts:93](https://github.com/TanStack/table/blob/main/packages/angular-table/src/flexRender.ts#L93)\n\n***\n\n### injector\n\n```ts\nreadonly injector: InputSignal<Injector>;\n```\n\nDefined in: [flexRender.ts:102](https://github.com/TanStack/table/blob/main/packages/angular-table/src/flexRender.ts#L102)\n\n***\n\n### props\n\n```ts\nreadonly props: InputSignal<TProps>;\n```\n\nDefined in: [flexRender.ts:98](https://github.com/TanStack/table/blob/main/packages/angular-table/src/flexRender.ts#L98)\n"
  },
  {
    "path": "docs/framework/angular/reference/classes/TanStackTable.md",
    "content": "---\nid: TanStackTable\ntitle: TanStackTable\n---\n\n# Class: TanStackTable\\<TFeatures, TData, TSelected\\>\n\nDefined in: [helpers/table.ts:59](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/table.ts#L59)\n\nProvides a TanStack Table instance (`AngularTable`) in Angular DI.\n\nThe table can be injected by:\n- any descendant of an element using `[tanStackTable]=\"...\"`\n- any component instantiated by `*flexRender` when the render props contains `table`\n\n## Example\n\n```html\n<div [tanStackTable]=\"table\">\n  <app-pagination />\n</div>\n```\n\n```ts\n@Component({\n  selector: 'app-pagination',\n  template: `\n    <button (click)=\"prev()\" [disabled]=\"!table().getCanPreviousPage()\">Prev</button>\n    <button (click)=\"next()\" [disabled]=\"!table().getCanNextPage()\">Next</button>\n  `,\n})\nexport class PaginationComponent {\n  readonly table = injectTableContext()\n\n  prev() {\n    this.table().previousPage()\n  }\n  next() {\n    this.table().nextPage()\n  }\n}\n```\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* `TableFeatures`\n\n### TData\n\n`TData` *extends* `RowData`\n\n### TSelected\n\n`TSelected` *extends* `object` = `TableState`\\<`TFeatures`\\>\n\n## Constructors\n\n### Constructor\n\n```ts\nnew TanStackTable<TFeatures, TData, TSelected>(): TanStackTable<TFeatures, TData, TSelected>;\n```\n\n#### Returns\n\n`TanStackTable`\\<`TFeatures`, `TData`, `TSelected`\\>\n\n## Properties\n\n### table\n\n```ts\nreadonly table: InputSignal<AngularTable<TFeatures, TData, TSelected>>;\n```\n\nDefined in: [helpers/table.ts:69](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/table.ts#L69)\n\nThe current TanStack Table instance.\n\nProvided as a required signal input so DI consumers always read the latest value.\n"
  },
  {
    "path": "docs/framework/angular/reference/classes/TanStackTableCell.md",
    "content": "---\nid: TanStackTableCell\ntitle: TanStackTableCell\n---\n\n# Class: TanStackTableCell\\<TFeatures, TData, TValue\\>\n\nDefined in: [helpers/cell.ts:76](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/cell.ts#L76)\n\nProvides a TanStack Table `Cell` instance in Angular DI.\n\nThe cell can be injected by:\n- any descendant of an element using `[tanStackTableCell]=\"...\"`\n- any component instantiated by `*flexRender` when the render props contains `cell`\n\n## Examples\n\nInject from the nearest `[tanStackTableCell]`:\n```html\n<td [tanStackTableCell]=\"cell\">\n  <app-cell-actions />\n</td>\n```\n\n```ts\n@Component({\n  selector: 'app-cell-actions',\n  template: `{{ cell().id }}`,\n})\nexport class CellActionsComponent {\n  readonly cell = injectTableCellContext()\n}\n```\n\nInject inside a component rendered via `flexRender`:\n```ts\n@Component({\n  selector: 'app-price-cell',\n  template: `{{ cell().getValue() }}`,\n})\nexport class PriceCellComponent {\n  readonly cell = injectTableCellContext()\n}\n```\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* `TableFeatures`\n\n### TData\n\n`TData` *extends* `RowData`\n\n### TValue\n\n`TValue` *extends* `CellData`\n\n## Implements\n\n- [`TanStackTableCellContext`](../interfaces/TanStackTableCellContext.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n## Constructors\n\n### Constructor\n\n```ts\nnew TanStackTableCell<TFeatures, TData, TValue>(): TanStackTableCell<TFeatures, TData, TValue>;\n```\n\n#### Returns\n\n`TanStackTableCell`\\<`TFeatures`, `TData`, `TValue`\\>\n\n## Properties\n\n### cell\n\n```ts\nreadonly cell: InputSignal<Cell<TFeatures, TData, TValue>>;\n```\n\nDefined in: [helpers/cell.ts:86](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/cell.ts#L86)\n\nThe current TanStack Table cell.\n\nProvided as a required signal input so DI consumers always read the latest value.\n\n#### Implementation of\n\n[`TanStackTableCellContext`](../interfaces/TanStackTableCellContext.md).[`cell`](../interfaces/TanStackTableCellContext.md#cell)\n"
  },
  {
    "path": "docs/framework/angular/reference/classes/TanStackTableHeader.md",
    "content": "---\nid: TanStackTableHeader\ntitle: TanStackTableHeader\n---\n\n# Class: TanStackTableHeader\\<TFeatures, TData, TValue\\>\n\nDefined in: [helpers/header.ts:71](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/header.ts#L71)\n\nProvides a TanStack Table `Header` instance in Angular DI.\n\nThe header can be injected by:\n- any descendant of an element using `[tanStackTableHeader]=\"...\"`\n- any component instantiated by `*flexRender` when the render props contains `header`\n\n## Example\n\n```html\n<th [tanStackTableHeader]=\"header\">\n  <app-sort-indicator />\n</th>\n```\n\n```ts\n@Component({\n  selector: 'app-sort-indicator',\n  template: `\n    <button (click)=\"toggle()\">\n      {{ header().column.id }}\n    </button>\n  `,\n})\nexport class SortIndicatorComponent {\n  readonly header = injectTableHeaderContext()\n\n  toggle() {\n    this.header().column.toggleSorting()\n  }\n}\n```\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* `TableFeatures`\n\n### TData\n\n`TData` *extends* `RowData`\n\n### TValue\n\n`TValue` *extends* `CellData`\n\n## Implements\n\n- [`TanStackTableHeaderContext`](../interfaces/TanStackTableHeaderContext.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n## Constructors\n\n### Constructor\n\n```ts\nnew TanStackTableHeader<TFeatures, TData, TValue>(): TanStackTableHeader<TFeatures, TData, TValue>;\n```\n\n#### Returns\n\n`TanStackTableHeader`\\<`TFeatures`, `TData`, `TValue`\\>\n\n## Properties\n\n### header\n\n```ts\nreadonly header: InputSignal<Header<TFeatures, TData, TValue>>;\n```\n\nDefined in: [helpers/header.ts:81](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/header.ts#L81)\n\nThe current TanStack Table header.\n\nProvided as a required signal input so DI consumers always read the latest value.\n\n#### Implementation of\n\n[`TanStackTableHeaderContext`](../interfaces/TanStackTableHeaderContext.md).[`header`](../interfaces/TanStackTableHeaderContext.md#header)\n"
  },
  {
    "path": "docs/framework/angular/reference/functions/createTableHook.md",
    "content": "---\nid: createTableHook\ntitle: createTableHook\n---\n\n# Function: createTableHook()\n\n```ts\nfunction createTableHook<TFeatures, TTableComponents, TCellComponents, THeaderComponents>(__namedParameters): CreateTableHookResult<TFeatures, TTableComponents, TCellComponents, THeaderComponents>;\n```\n\nDefined in: [helpers/createTableHook.ts:352](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/createTableHook.ts#L352)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* `TableFeatures`\n\n### TTableComponents\n\n`TTableComponents` *extends* `Record`\\<`string`, `RenderableComponent`\\>\n\n### TCellComponents\n\n`TCellComponents` *extends* `Record`\\<`string`, `RenderableComponent`\\>\n\n### THeaderComponents\n\n`THeaderComponents` *extends* `Record`\\<`string`, `RenderableComponent`\\>\n\n## Parameters\n\n### \\_\\_namedParameters\n\n[`CreateTableContextOptions`](../type-aliases/CreateTableContextOptions.md)\\<`TFeatures`, `TTableComponents`, `TCellComponents`, `THeaderComponents`\\>\n\n## Returns\n\n[`CreateTableHookResult`](../type-aliases/CreateTableHookResult.md)\\<`TFeatures`, `TTableComponents`, `TCellComponents`, `THeaderComponents`\\>\n"
  },
  {
    "path": "docs/framework/angular/reference/functions/flexRenderComponent.md",
    "content": "---\nid: flexRenderComponent\ntitle: flexRenderComponent\n---\n\n# Function: flexRenderComponent()\n\n```ts\nfunction flexRenderComponent<TComponent>(component, options?): FlexRenderComponent<TComponent>;\n```\n\nDefined in: [flex-render/flexRenderComponent.ts:150](https://github.com/TanStack/table/blob/main/packages/angular-table/src/flex-render/flexRenderComponent.ts#L150)\n\nHelper function to create a [FlexRenderComponent](../interfaces/FlexRenderComponent.md) instance, with better type-safety.\n\n## Type Parameters\n\n### TComponent\n\n`TComponent` = `any`\n\n## Parameters\n\n### component\n\n`Type`\\<`TComponent`\\>\n\n### options?\n\n`FlexRenderOptions`\\<`Inputs`\\<`TComponent`\\>, `Outputs`\\<`TComponent`\\>\\>\n\n## Returns\n\n[`FlexRenderComponent`](../interfaces/FlexRenderComponent.md)\\<`TComponent`\\>\n\n## Example\n\n```ts\nimport {flexRenderComponent} from '@tanstack/angular-table'\nimport {inputBinding, outputBinding} from '@angular/core';\n\nconst columns = [\n  {\n    cell: ({ row }) => {\n       return flexRenderComponent(MyComponent, {\n         inputs: { value: mySignalValue() },\n         outputs: { valueChange: (val) => {} }\n         // or using angular native createComponent#binding api\n         bindings: [\n           inputBinding('value', mySignalValue),\n           outputBinding('valueChange', value => {\n             console.log(\"my value changed to\", value)\n           })\n         ]\n       })\n    },\n  },\n]\n```\n"
  },
  {
    "path": "docs/framework/angular/reference/functions/injectFlexRenderContext.md",
    "content": "---\nid: injectFlexRenderContext\ntitle: injectFlexRenderContext\n---\n\n# Function: injectFlexRenderContext()\n\n```ts\nfunction injectFlexRenderContext<T>(): T;\n```\n\nDefined in: [flex-render/context.ts:12](https://github.com/TanStack/table/blob/main/packages/angular-table/src/flex-render/context.ts#L12)\n\nInject the flex render context props.\n\nCan be used in components rendered via FlexRender directives.\n\n## Type Parameters\n\n### T\n\n`T` *extends* `object`\n\n## Returns\n\n`T`\n"
  },
  {
    "path": "docs/framework/angular/reference/functions/injectTable.md",
    "content": "---\nid: injectTable\ntitle: injectTable\n---\n\n# Function: injectTable()\n\n```ts\nfunction injectTable<TFeatures, TData, TSelected>(options, selector): AngularTable<TFeatures, TData, TSelected>;\n```\n\nDefined in: [injectTable.ts:95](https://github.com/TanStack/table/blob/main/packages/angular-table/src/injectTable.ts#L95)\n\nCreates and returns an Angular-reactive table instance.\n\nThe initializer is intentionally re-evaluated whenever any signal read inside it changes.\nThis is how the adapter keeps the table in sync with Angular's reactivity model.\n\nBecause of that behavior, keep expensive/static values (for example `columns`, feature setup, row models)\nas stable references outside the initializer, and only read reactive state (`data()`, pagination/filter/sorting signals, etc.)\ninside it.\n\nThe returned table is also signal-reactive: table state and table APIs are wired for Angular signals, so you can safely consume table methods inside `computed(...)` and `effect(...)`.\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* `TableFeatures`\n\n### TData\n\n`TData` *extends* `RowData`\n\n### TSelected\n\n`TSelected` = `TableState`\\<`TFeatures`\\>\n\n## Parameters\n\n### options\n\n() => `TableOptions`\\<`TFeatures`, `TData`\\>\n\n### selector\n\n(`state`) => `TSelected`\n\n## Returns\n\n[`AngularTable`](../type-aliases/AngularTable.md)\\<`TFeatures`, `TData`, `TSelected`\\>\n\nAn Angular-reactive TanStack Table instance.\n\n## Example\n\n1. Register the table features you need\n```ts\n// Register only the features you need\nimport {tableFeatures, rowPaginationFeature} from '@tanstack/angular-table';\nconst _features = tableFeatures({\n rowPaginationFeature,\n // ...all other features you need\n})\n\n// Use all table core features\nimport {stockFeatures} from '@tanstack/angular-table';\nconst _features = tableFeatures(stockFeatures);\n```\n2. Prepare the table columns\n```ts\nimport {ColumnDef} from '@tanstack/angular-table';\n\ntype MyData = {}\n\nconst columns: ColumnDef<typeof _features, MyData>[] = [\n  // ...column definitions\n]\n\n// or using createColumnHelper\nimport {createColumnHelper} from '@tanstack/angular-table';\nconst columnHelper = createColumnHelper<typeof _features, MyData>();\nconst columns = columnHelper.columns([\n columnHelper.accessor(...),\n // ...other columns\n])\n```\n3. Create the table instance with `injectTable`\n```ts\nconst table = injectTable(() => {\n  // ...table options,\n  _features,\n  columns: columns,\n  data: myDataSignal(),\n})\n```\n"
  },
  {
    "path": "docs/framework/angular/reference/functions/injectTableCellContext.md",
    "content": "---\nid: injectTableCellContext\ntitle: injectTableCellContext\n---\n\n# Function: injectTableCellContext()\n\n```ts\nfunction injectTableCellContext<TFeatures, TData, TValue>(): Signal<Cell<TFeatures, TData, TValue>>;\n```\n\nDefined in: [helpers/cell.ts:98](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/cell.ts#L98)\n\nInjects the current TanStack Table cell signal.\n\nAvailable when:\n- there is a nearest `[tanStackTableCell]` directive in the DI tree, or\n- the caller is rendered via `*flexRender` with render props containing `cell`\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* `TableFeatures`\n\n### TData\n\n`TData` *extends* `RowData`\n\n### TValue\n\n`TValue` *extends* `unknown`\n\n## Returns\n\n`Signal`\\<`Cell`\\<`TFeatures`, `TData`, `TValue`\\>\\>\n"
  },
  {
    "path": "docs/framework/angular/reference/functions/injectTableContext.md",
    "content": "---\nid: injectTableContext\ntitle: injectTableContext\n---\n\n# Function: injectTableContext()\n\n```ts\nfunction injectTableContext<TFeatures, TData, TSelected>(): Signal<AngularTable<TFeatures, TData, TSelected>>;\n```\n\nDefined in: [helpers/table.ts:81](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/table.ts#L81)\n\nInjects the current TanStack Table instance signal.\n\nAvailable when:\n- there is a nearest `[tanStackTable]` directive in the DI tree, or\n- the caller is rendered via `*flexRender` with render props containing `table`\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* `TableFeatures`\n\n### TData\n\n`TData` *extends* `RowData`\n\n### TSelected\n\n`TSelected` *extends* `object` = `TableState`\\<`TFeatures`\\>\n\n## Returns\n\n`Signal`\\<[`AngularTable`](../type-aliases/AngularTable.md)\\<`TFeatures`, `TData`, `TSelected`\\>\\>\n"
  },
  {
    "path": "docs/framework/angular/reference/functions/injectTableHeaderContext.md",
    "content": "---\nid: injectTableHeaderContext\ntitle: injectTableHeaderContext\n---\n\n# Function: injectTableHeaderContext()\n\n```ts\nfunction injectTableHeaderContext<TFeatures, TData, TValue>(): Signal<Header<TFeatures, TData, TValue>>;\n```\n\nDefined in: [helpers/header.ts:93](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/header.ts#L93)\n\nInjects the current TanStack Table header signal.\n\nAvailable when:\n- there is a nearest `[tanStackTableHeader]` directive in the DI tree, or\n- the caller is rendered via `*flexRender` with render props containing `header`\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* `TableFeatures`\n\n### TData\n\n`TData` *extends* `RowData`\n\n### TValue\n\n`TValue` *extends* `unknown`\n\n## Returns\n\n`Signal`\\<`Header`\\<`TFeatures`, `TData`, `TValue`\\>\\>\n"
  },
  {
    "path": "docs/framework/angular/reference/index.md",
    "content": "---\nid: \"@tanstack/angular-table\"\ntitle: \"@tanstack/angular-table\"\n---\n\n# @tanstack/angular-table\n\n## Classes\n\n- [FlexRenderCell](classes/FlexRenderCell.md)\n- [FlexRenderComponentInstance](classes/FlexRenderComponentInstance.md)\n- [FlexRenderDirective](classes/FlexRenderDirective.md)\n- [TanStackTable](classes/TanStackTable.md)\n- [TanStackTableCell](classes/TanStackTableCell.md)\n- [TanStackTableHeader](classes/TanStackTableHeader.md)\n\n## Interfaces\n\n- [AngularReactivityFlags](interfaces/AngularReactivityFlags.md)\n- [FlexRenderComponent](interfaces/FlexRenderComponent.md)\n- [TanStackTableCellContext](interfaces/TanStackTableCellContext.md)\n- [TanStackTableHeaderContext](interfaces/TanStackTableHeaderContext.md)\n\n## Type Aliases\n\n- [AngularTable](type-aliases/AngularTable.md)\n- [AppAngularTable](type-aliases/AppAngularTable.md)\n- [AppCellContext](type-aliases/AppCellContext.md)\n- [AppColumnHelper](type-aliases/AppColumnHelper.md)\n- [AppHeaderContext](type-aliases/AppHeaderContext.md)\n- [CreateTableContextOptions](type-aliases/CreateTableContextOptions.md)\n- [CreateTableHookResult](type-aliases/CreateTableHookResult.md)\n- [FlexRenderComponentProps](type-aliases/FlexRenderComponentProps.md)\n- [FlexRenderContent](type-aliases/FlexRenderContent.md)\n- [FlexRenderInputContent](type-aliases/FlexRenderInputContent.md)\n\n## Variables\n\n- [FlexRender](variables/FlexRender.md)\n- [TanStackTableCellToken](variables/TanStackTableCellToken.md)\n- [TanStackTableHeaderToken](variables/TanStackTableHeaderToken.md)\n- [TanStackTableToken](variables/TanStackTableToken.md)\n\n## Functions\n\n- [createTableHook](functions/createTableHook.md)\n- [flexRenderComponent](functions/flexRenderComponent.md)\n- [injectFlexRenderContext](functions/injectFlexRenderContext.md)\n- [injectTable](functions/injectTable.md)\n- [injectTableCellContext](functions/injectTableCellContext.md)\n- [injectTableContext](functions/injectTableContext.md)\n- [injectTableHeaderContext](functions/injectTableHeaderContext.md)\n"
  },
  {
    "path": "docs/framework/angular/reference/interfaces/AngularReactivityFlags.md",
    "content": "---\nid: AngularReactivityFlags\ntitle: AngularReactivityFlags\n---\n\n# Interface: AngularReactivityFlags\n\nDefined in: [angularReactivityFeature.ts:55](https://github.com/TanStack/table/blob/main/packages/angular-table/src/angularReactivityFeature.ts#L55)\n\nFine-grained configuration for Angular reactivity.\n\nEach key controls whether prototype methods/getters on the corresponding TanStack Table\nobjects are wrapped with signal-aware access.\n\n- `true` enables wrapping using the default skip rules.\n- `false` disables wrapping entirely for that object type.\n- a function allows customizing the skip rules (see SkipPropertyFn).\n\n## Example\n\n```ts\nconst table = injectTable(() => {\n // ...table options,\n reactivity: {\n   // fine-grained control over which table objects have reactive properties,\n   // and which properties are wrapped\n   header: true,\n   column: true,\n   row: true,\n   cell: true,\n }\n})\n```\n\n## Properties\n\n### cell\n\n```ts\ncell: boolean | SkipPropertyFn;\n```\n\nDefined in: [angularReactivityFeature.ts:63](https://github.com/TanStack/table/blob/main/packages/angular-table/src/angularReactivityFeature.ts#L63)\n\nControls reactive wrapping for `Cell` instances.\n\n***\n\n### column\n\n```ts\ncolumn: boolean | SkipPropertyFn;\n```\n\nDefined in: [angularReactivityFeature.ts:59](https://github.com/TanStack/table/blob/main/packages/angular-table/src/angularReactivityFeature.ts#L59)\n\nControls reactive wrapping for `Column` instances.\n\n***\n\n### header\n\n```ts\nheader: boolean | SkipPropertyFn;\n```\n\nDefined in: [angularReactivityFeature.ts:57](https://github.com/TanStack/table/blob/main/packages/angular-table/src/angularReactivityFeature.ts#L57)\n\nControls reactive wrapping for `Header` instances.\n\n***\n\n### row\n\n```ts\nrow: boolean | SkipPropertyFn;\n```\n\nDefined in: [angularReactivityFeature.ts:61](https://github.com/TanStack/table/blob/main/packages/angular-table/src/angularReactivityFeature.ts#L61)\n\nControls reactive wrapping for `Row` instances.\n"
  },
  {
    "path": "docs/framework/angular/reference/interfaces/FlexRenderComponent.md",
    "content": "---\nid: FlexRenderComponent\ntitle: FlexRenderComponent\n---\n\n# Interface: FlexRenderComponent\\<TComponent\\>\n\nDefined in: [flex-render/flexRenderComponent.ts:205](https://github.com/TanStack/table/blob/main/packages/angular-table/src/flex-render/flexRenderComponent.ts#L205)\n\nWrapper interface for a component that will be used as content for [FlexRenderDirective](../classes/FlexRenderDirective.md).\nCan be created using [flexRenderComponent](../functions/flexRenderComponent.md) helper.\n\n## Example\n\n```ts\nimport {flexRenderComponent} from '@tanstack/angular-table'\n\n// Usage in cell/header/footer definition\nconst columns = [\n  {\n    cell: ({ row }) => {\n       return flexRenderComponent(MyComponent, {\n         inputs: { value: mySignalValue() },\n         outputs: { valueChange: (val) => {} }\n         // or using angular createComponent#bindings api\n         bindings: [\n           inputBinding('value', mySignalValue),\n           outputBinding('valueChange', value => {\n             console.log(\"my value changed to\", value)\n           })\n         ]\n       })\n    },\n  },\n]\n\nimport {input, output} from '@angular/core';\n\n@Component({\n selector: 'my-component',\n})\nclass MyComponent {\n   readonly value = input(0);\n   readonly valueChange = output<number>();\n}\n\n```\n\n## Type Parameters\n\n### TComponent\n\n`TComponent` = `any`\n\n## Properties\n\n### allowedInputNames\n\n```ts\nreadonly allowedInputNames: string[];\n```\n\nDefined in: [flex-render/flexRenderComponent.ts:217](https://github.com/TanStack/table/blob/main/packages/angular-table/src/flex-render/flexRenderComponent.ts#L217)\n\nList of allowed input names.\n\n***\n\n### allowedOutputNames\n\n```ts\nreadonly allowedOutputNames: string[];\n```\n\nDefined in: [flex-render/flexRenderComponent.ts:221](https://github.com/TanStack/table/blob/main/packages/angular-table/src/flex-render/flexRenderComponent.ts#L221)\n\nList of allowed output names.\n\n***\n\n### bindings?\n\n```ts\noptional bindings: Binding[];\n```\n\nDefined in: [flex-render/flexRenderComponent.ts:245](https://github.com/TanStack/table/blob/main/packages/angular-table/src/flex-render/flexRenderComponent.ts#L245)\n\nBindings to apply to the root component\n\n#### See\n\nFlexRenderOptions#bindings\n\n***\n\n### component\n\n```ts\nreadonly component: Type<TComponent>;\n```\n\nDefined in: [flex-render/flexRenderComponent.ts:209](https://github.com/TanStack/table/blob/main/packages/angular-table/src/flex-render/flexRenderComponent.ts#L209)\n\nThe component type\n\n***\n\n### directives?\n\n```ts\noptional directives: (Type<unknown> | DirectiveWithBindings<unknown>)[];\n```\n\nDefined in: [flex-render/flexRenderComponent.ts:251](https://github.com/TanStack/table/blob/main/packages/angular-table/src/flex-render/flexRenderComponent.ts#L251)\n\nDirectives that should be applied to the component.\n\n#### See\n\n***\n\n### injector?\n\n```ts\nreadonly optional injector: Injector;\n```\n\nDefined in: [flex-render/flexRenderComponent.ts:239](https://github.com/TanStack/table/blob/main/packages/angular-table/src/flex-render/flexRenderComponent.ts#L239)\n\nOptional Injector that will be used when rendering the component.\n\n#### See\n\nFlexRenderOptions#injector\n\n***\n\n### inputs?\n\n```ts\nreadonly optional inputs: Inputs<TComponent>;\n```\n\nDefined in: [flex-render/flexRenderComponent.ts:233](https://github.com/TanStack/table/blob/main/packages/angular-table/src/flex-render/flexRenderComponent.ts#L233)\n\nComponent instance inputs. Set via [componentRef.setInput API](https://angular.dev/api/core/ComponentRef#setInput))\n\n#### See\n\nFlexRenderOptions#inputs\n\n***\n\n### mirror\n\n```ts\nreadonly mirror: ComponentMirror<TComponent>;\n```\n\nDefined in: [flex-render/flexRenderComponent.ts:213](https://github.com/TanStack/table/blob/main/packages/angular-table/src/flex-render/flexRenderComponent.ts#L213)\n\nReflected metadata about the component.\n\n***\n\n### outputs?\n\n```ts\nreadonly optional outputs: Outputs<TComponent>;\n```\n\nDefined in: [flex-render/flexRenderComponent.ts:227](https://github.com/TanStack/table/blob/main/packages/angular-table/src/flex-render/flexRenderComponent.ts#L227)\n\nComponent instance outputs. Subscribed via OutputEmitterRef#subscribe\n\n#### See\n\nFlexRenderOptions#outputs\n"
  },
  {
    "path": "docs/framework/angular/reference/interfaces/TanStackTableCellContext.md",
    "content": "---\nid: TanStackTableCellContext\ntitle: TanStackTableCellContext\n---\n\n# Interface: TanStackTableCellContext\\<TFeatures, TData, TValue\\>\n\nDefined in: [helpers/cell.ts:11](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/cell.ts#L11)\n\nDI context shape for a TanStack Table cell.\n\nThis exists to make the current `Cell` injectable by any nested component/directive\nwithout having to pass it through inputs/props manually.\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* `TableFeatures`\n\n### TData\n\n`TData` *extends* `RowData`\n\n### TValue\n\n`TValue` *extends* `CellData`\n\n## Properties\n\n### cell\n\n```ts\ncell: Signal<Cell<TFeatures, TData, TValue>>;\n```\n\nDefined in: [helpers/cell.ts:17](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/cell.ts#L17)\n\nSignal that returns the current cell instance.\n"
  },
  {
    "path": "docs/framework/angular/reference/interfaces/TanStackTableHeaderContext.md",
    "content": "---\nid: TanStackTableHeaderContext\ntitle: TanStackTableHeaderContext\n---\n\n# Interface: TanStackTableHeaderContext\\<TFeatures, TData, TValue\\>\n\nDefined in: [helpers/header.ts:11](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/header.ts#L11)\n\nDI context shape for a TanStack Table header.\n\nThis exists to make the current `Header` injectable by any nested component/directive\nwithout passing it through inputs/props.\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* `TableFeatures`\n\n### TData\n\n`TData` *extends* `RowData`\n\n### TValue\n\n`TValue` *extends* `CellData`\n\n## Properties\n\n### header\n\n```ts\nheader: Signal<Header<TFeatures, TData, TValue>>;\n```\n\nDefined in: [helpers/header.ts:17](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/header.ts#L17)\n\nSignal that returns the current header instance.\n"
  },
  {
    "path": "docs/framework/angular/reference/type-aliases/AngularTable.md",
    "content": "---\nid: AngularTable\ntitle: AngularTable\n---\n\n# Type Alias: AngularTable\\<TFeatures, TData, TSelected\\>\n\n```ts\ntype AngularTable<TFeatures, TData, TSelected> = Table<TFeatures, TData> & object;\n```\n\nDefined in: [injectTable.ts:21](https://github.com/TanStack/table/blob/main/packages/angular-table/src/injectTable.ts#L21)\n\n## Type Declaration\n\n### state\n\n```ts\nreadonly state: Signal<Readonly<TSelected>>;\n```\n\nThe selected state from the table store, based on the selector provided.\n\n### Subscribe()\n\n```ts\nSubscribe: <TSubSelected>(props) => Signal<Readonly<TSubSelected>>;\n```\n\nSubscribe to changes in the table store with a custom selector.\n\n#### Type Parameters\n\n##### TSubSelected\n\n`TSubSelected` = \\{\n\\}\n\n#### Parameters\n\n##### props\n\n###### equal?\n\n`ValueEqualityFn`\\<`TSubSelected`\\>\n\n###### selector\n\n(`state`) => `TSubSelected`\n\n#### Returns\n\n`Signal`\\<`Readonly`\\<`TSubSelected`\\>\\>\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* `TableFeatures`\n\n### TData\n\n`TData` *extends* `RowData`\n\n### TSelected\n\n`TSelected` = `TableState`\\<`TFeatures`\\>\n"
  },
  {
    "path": "docs/framework/angular/reference/type-aliases/AppAngularTable.md",
    "content": "---\nid: AppAngularTable\ntitle: AppAngularTable\n---\n\n# Type Alias: AppAngularTable\\<TFeatures, TData, TSelected, TTableComponents, TCellComponents, THeaderComponents\\>\n\n```ts\ntype AppAngularTable<TFeatures, TData, TSelected, TTableComponents, TCellComponents, THeaderComponents> = AngularTable<TFeatures, TData, TSelected> & NoInfer<TTableComponents> & object;\n```\n\nDefined in: [helpers/createTableHook.ts:243](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/createTableHook.ts#L243)\n\nExtended table API returned by useAppTable with all App wrapper components\n\n## Type Declaration\n\n### appCell()\n\n```ts\nappCell: <TValue>(cell) => Cell<TFeatures, TData, TValue> & NoInfer<TCellComponents>;\n```\n\n#### Type Parameters\n\n##### TValue\n\n`TValue`\n\n#### Parameters\n\n##### cell\n\n`Cell`\\<`TFeatures`, `TData`, `TValue`\\>\n\n#### Returns\n\n`Cell`\\<`TFeatures`, `TData`, `TValue`\\> & `NoInfer`\\<`TCellComponents`\\>\n\n### appFooter()\n\n```ts\nappFooter: <TValue>(footer) => Header<TFeatures, TData, TValue> & NoInfer<THeaderComponents>;\n```\n\n#### Type Parameters\n\n##### TValue\n\n`TValue`\n\n#### Parameters\n\n##### footer\n\n`Header`\\<`TFeatures`, `TData`, `TValue`\\>\n\n#### Returns\n\n`Header`\\<`TFeatures`, `TData`, `TValue`\\> & `NoInfer`\\<`THeaderComponents`\\>\n\n### appHeader()\n\n```ts\nappHeader: <TValue>(header) => Header<TFeatures, TData, TValue> & NoInfer<THeaderComponents>;\n```\n\n#### Type Parameters\n\n##### TValue\n\n`TValue`\n\n#### Parameters\n\n##### header\n\n`Header`\\<`TFeatures`, `TData`, `TValue`\\>\n\n#### Returns\n\n`Header`\\<`TFeatures`, `TData`, `TValue`\\> & `NoInfer`\\<`THeaderComponents`\\>\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* `TableFeatures`\n\n### TData\n\n`TData` *extends* `RowData`\n\n### TSelected\n\n`TSelected`\n\n### TTableComponents\n\n`TTableComponents` *extends* `Record`\\<`string`, `RenderableComponent`\\>\n\n### TCellComponents\n\n`TCellComponents` *extends* `Record`\\<`string`, `RenderableComponent`\\>\n\n### THeaderComponents\n\n`THeaderComponents` *extends* `Record`\\<`string`, `RenderableComponent`\\>\n"
  },
  {
    "path": "docs/framework/angular/reference/type-aliases/AppCellContext.md",
    "content": "---\nid: AppCellContext\ntitle: AppCellContext\n---\n\n# Type Alias: AppCellContext\\<TFeatures, TData, TValue, TCellComponents\\>\n\n```ts\ntype AppCellContext<TFeatures, TData, TValue, TCellComponents> = object;\n```\n\nDefined in: [helpers/createTableHook.ts:47](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/createTableHook.ts#L47)\n\nEnhanced CellContext with pre-bound cell components.\nThe `cell` property includes the registered cellComponents.\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* `TableFeatures`\n\n### TData\n\n`TData` *extends* `RowData`\n\n### TValue\n\n`TValue` *extends* `CellData`\n\n### TCellComponents\n\n`TCellComponents` *extends* `Record`\\<`string`, `RenderableComponent`\\>\n\n## Properties\n\n### cell\n\n```ts\ncell: Cell<TFeatures, TData, TValue> & TCellComponents & object;\n```\n\nDefined in: [helpers/createTableHook.ts:53](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/createTableHook.ts#L53)\n\n#### Type Declaration\n\n##### FlexRender()\n\n```ts\nFlexRender: () => unknown;\n```\n\n###### Returns\n\n`unknown`\n\n***\n\n### column\n\n```ts\ncolumn: Column<TFeatures, TData, TValue>;\n```\n\nDefined in: [helpers/createTableHook.ts:55](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/createTableHook.ts#L55)\n\n***\n\n### getValue\n\n```ts\ngetValue: CellContext<TFeatures, TData, TValue>[\"getValue\"];\n```\n\nDefined in: [helpers/createTableHook.ts:56](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/createTableHook.ts#L56)\n\n***\n\n### renderValue\n\n```ts\nrenderValue: CellContext<TFeatures, TData, TValue>[\"renderValue\"];\n```\n\nDefined in: [helpers/createTableHook.ts:57](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/createTableHook.ts#L57)\n\n***\n\n### row\n\n```ts\nrow: Row<TFeatures, TData>;\n```\n\nDefined in: [helpers/createTableHook.ts:58](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/createTableHook.ts#L58)\n\n***\n\n### table\n\n```ts\ntable: Table<TFeatures, TData>;\n```\n\nDefined in: [helpers/createTableHook.ts:59](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/createTableHook.ts#L59)\n"
  },
  {
    "path": "docs/framework/angular/reference/type-aliases/AppColumnHelper.md",
    "content": "---\nid: AppColumnHelper\ntitle: AppColumnHelper\n---\n\n# Type Alias: AppColumnHelper\\<TFeatures, TData, TCellComponents, THeaderComponents\\>\n\n```ts\ntype AppColumnHelper<TFeatures, TData, TCellComponents, THeaderComponents> = object;\n```\n\nDefined in: [helpers/createTableHook.ts:168](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/createTableHook.ts#L168)\n\nEnhanced column helper with pre-bound components in cell/header/footer contexts.\nThis enables TypeScript to know about the registered components when defining columns.\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* `TableFeatures`\n\n### TData\n\n`TData` *extends* `RowData`\n\n### TCellComponents\n\n`TCellComponents` *extends* `Record`\\<`string`, `RenderableComponent`\\>\n\n### THeaderComponents\n\n`THeaderComponents` *extends* `Record`\\<`string`, `RenderableComponent`\\>\n\n## Properties\n\n### accessor()\n\n```ts\naccessor: <TAccessor, TValue>(accessor, column) => TAccessor extends AccessorFn<TData> ? AccessorFnColumnDef<TFeatures, TData, TValue> : AccessorKeyColumnDef<TFeatures, TData, TValue>;\n```\n\nDefined in: [helpers/createTableHook.ts:178](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/createTableHook.ts#L178)\n\nCreates a data column definition with an accessor key or function.\nThe cell, header, and footer contexts include pre-bound components.\n\n#### Type Parameters\n\n##### TAccessor\n\n`TAccessor` *extends* `AccessorFn`\\<`TData`\\> \\| `DeepKeys`\\<`TData`\\>\n\n##### TValue\n\n`TValue` *extends* `TAccessor` *extends* `AccessorFn`\\<`TData`, infer TReturn\\> ? `TReturn` : `TAccessor` *extends* `DeepKeys`\\<`TData`\\> ? `DeepValue`\\<`TData`, `TAccessor`\\> : `never`\n\n#### Parameters\n\n##### accessor\n\n`TAccessor`\n\n##### column\n\n`TAccessor` *extends* `AccessorFn`\\<`TData`\\> ? `AppColumnDefBase`\\<`TFeatures`, `TData`, `TValue`, `TCellComponents`, `THeaderComponents`\\> & `object` : `AppColumnDefBase`\\<`TFeatures`, `TData`, `TValue`, `TCellComponents`, `THeaderComponents`\\>\n\n#### Returns\n\n`TAccessor` *extends* `AccessorFn`\\<`TData`\\> ? `AccessorFnColumnDef`\\<`TFeatures`, `TData`, `TValue`\\> : `AccessorKeyColumnDef`\\<`TFeatures`, `TData`, `TValue`\\>\n\n***\n\n### columns()\n\n```ts\ncolumns: <TColumns>(columns) => ColumnDef<TFeatures, TData, any>[] & [...TColumns];\n```\n\nDefined in: [helpers/createTableHook.ts:209](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/createTableHook.ts#L209)\n\nWraps an array of column definitions to preserve each column's individual TValue type.\n\n#### Type Parameters\n\n##### TColumns\n\n`TColumns` *extends* `ReadonlyArray`\\<`ColumnDef`\\<`TFeatures`, `TData`, `any`\\>\\>\n\n#### Parameters\n\n##### columns\n\n\\[`...TColumns`\\]\n\n#### Returns\n\n`ColumnDef`\\<`TFeatures`, `TData`, `any`\\>[] & \\[`...TColumns`\\]\n\n***\n\n### display()\n\n```ts\ndisplay: (column) => DisplayColumnDef<TFeatures, TData, unknown>;\n```\n\nDefined in: [helpers/createTableHook.ts:217](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/createTableHook.ts#L217)\n\nCreates a display column definition for non-data columns.\nThe cell, header, and footer contexts include pre-bound components.\n\n#### Parameters\n\n##### column\n\n`AppDisplayColumnDef`\\<`TFeatures`, `TData`, `TCellComponents`, `THeaderComponents`\\>\n\n#### Returns\n\n`DisplayColumnDef`\\<`TFeatures`, `TData`, `unknown`\\>\n\n***\n\n### group()\n\n```ts\ngroup: (column) => GroupColumnDef<TFeatures, TData, unknown>;\n```\n\nDefined in: [helpers/createTableHook.ts:230](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/createTableHook.ts#L230)\n\nCreates a group column definition with nested child columns.\nThe cell, header, and footer contexts include pre-bound components.\n\n#### Parameters\n\n##### column\n\n`AppGroupColumnDef`\\<`TFeatures`, `TData`, `TCellComponents`, `THeaderComponents`\\>\n\n#### Returns\n\n`GroupColumnDef`\\<`TFeatures`, `TData`, `unknown`\\>\n"
  },
  {
    "path": "docs/framework/angular/reference/type-aliases/AppHeaderContext.md",
    "content": "---\nid: AppHeaderContext\ntitle: AppHeaderContext\n---\n\n# Type Alias: AppHeaderContext\\<TFeatures, TData, TValue, THeaderComponents\\>\n\n```ts\ntype AppHeaderContext<TFeatures, TData, TValue, THeaderComponents> = object;\n```\n\nDefined in: [helpers/createTableHook.ts:66](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/createTableHook.ts#L66)\n\nEnhanced HeaderContext with pre-bound header components.\nThe `header` property includes the registered headerComponents.\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* `TableFeatures`\n\n### TData\n\n`TData` *extends* `RowData`\n\n### TValue\n\n`TValue` *extends* `CellData`\n\n### THeaderComponents\n\n`THeaderComponents` *extends* `Record`\\<`string`, `RenderableComponent`\\>\n\n## Properties\n\n### column\n\n```ts\ncolumn: Column<TFeatures, TData, TValue>;\n```\n\nDefined in: [helpers/createTableHook.ts:72](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/createTableHook.ts#L72)\n\n***\n\n### header\n\n```ts\nheader: Header<TFeatures, TData, TValue> & THeaderComponents & object;\n```\n\nDefined in: [helpers/createTableHook.ts:73](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/createTableHook.ts#L73)\n\n#### Type Declaration\n\n##### FlexRender()\n\n```ts\nFlexRender: () => unknown;\n```\n\n###### Returns\n\n`unknown`\n\n***\n\n### table\n\n```ts\ntable: Table<TFeatures, TData>;\n```\n\nDefined in: [helpers/createTableHook.ts:75](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/createTableHook.ts#L75)\n"
  },
  {
    "path": "docs/framework/angular/reference/type-aliases/CreateTableContextOptions.md",
    "content": "---\nid: CreateTableContextOptions\ntitle: CreateTableContextOptions\n---\n\n# Type Alias: CreateTableContextOptions\\<TFeatures, TTableComponents, TCellComponents, THeaderComponents\\>\n\n```ts\ntype CreateTableContextOptions<TFeatures, TTableComponents, TCellComponents, THeaderComponents> = Omit<TableOptions<TFeatures, any>, \"columns\" | \"data\" | \"store\" | \"state\" | \"initialState\"> & object;\n```\n\nDefined in: [helpers/createTableHook.ts:273](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/createTableHook.ts#L273)\n\nOptions for creating a table hook with pre-bound components and default table options.\nExtends all TableOptions except 'columns' | 'data' | 'store' | 'state' | 'initialState'.\n\n## Type Declaration\n\n### cellComponents?\n\n```ts\noptional cellComponents: TCellComponents;\n```\n\nCell-level components that need access to the cell instance.\nThese are available on the cell object passed to AppCell's children.\nUse `useCellContext()` inside these components.\n\n#### Example\n\n```ts\n{ TextCell, NumberCell, DateCell, CurrencyCell }\n```\n\n### headerComponents?\n\n```ts\noptional headerComponents: THeaderComponents;\n```\n\nHeader-level components that need access to the header instance.\nThese are available on the header object passed to AppHeader/AppFooter's children.\nUse `useHeaderContext()` inside these components.\n\n#### Example\n\n```ts\n{ SortIndicator, ColumnFilter, ResizeHandle }\n```\n\n### tableComponents?\n\n```ts\noptional tableComponents: TTableComponents;\n```\n\nTable-level components that need access to the table instance.\nThese are available directly on the table object returned by useAppTable.\nUse `useTableContext()` inside these components.\n\n#### Example\n\n```ts\n{ PaginationControls, GlobalFilter, RowCount }\n```\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* `TableFeatures`\n\n### TTableComponents\n\n`TTableComponents` *extends* `Record`\\<`string`, `RenderableComponent`\\>\n\n### TCellComponents\n\n`TCellComponents` *extends* `Record`\\<`string`, `RenderableComponent`\\>\n\n### THeaderComponents\n\n`THeaderComponents` *extends* `Record`\\<`string`, `RenderableComponent`\\>\n"
  },
  {
    "path": "docs/framework/angular/reference/type-aliases/CreateTableHookResult.md",
    "content": "---\nid: CreateTableHookResult\ntitle: CreateTableHookResult\n---\n\n# Type Alias: CreateTableHookResult\\<TFeatures, TTableComponents, TCellComponents, THeaderComponents\\>\n\n```ts\ntype CreateTableHookResult<TFeatures, TTableComponents, TCellComponents, THeaderComponents> = object;\n```\n\nDefined in: [helpers/createTableHook.ts:305](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/createTableHook.ts#L305)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* `TableFeatures`\n\n### TTableComponents\n\n`TTableComponents` *extends* `Record`\\<`string`, `RenderableComponent`\\>\n\n### TCellComponents\n\n`TCellComponents` *extends* `Record`\\<`string`, `RenderableComponent`\\>\n\n### THeaderComponents\n\n`THeaderComponents` *extends* `Record`\\<`string`, `RenderableComponent`\\>\n\n## Properties\n\n### createAppColumnHelper()\n\n```ts\ncreateAppColumnHelper: <TData>() => AppColumnHelper<TFeatures, TData, TCellComponents, THeaderComponents>;\n```\n\nDefined in: [helpers/createTableHook.ts:311](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/createTableHook.ts#L311)\n\n#### Type Parameters\n\n##### TData\n\n`TData` *extends* `RowData`\n\n#### Returns\n\n[`AppColumnHelper`](AppColumnHelper.md)\\<`TFeatures`, `TData`, `TCellComponents`, `THeaderComponents`\\>\n\n***\n\n### injectAppTable()\n\n```ts\ninjectAppTable: <TData, TSelected>(tableOptions, selector?) => AppAngularTable<TFeatures, TData, TSelected, TTableComponents, TCellComponents, THeaderComponents>;\n```\n\nDefined in: [helpers/createTableHook.ts:336](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/createTableHook.ts#L336)\n\n#### Type Parameters\n\n##### TData\n\n`TData` *extends* `RowData`\n\n##### TSelected\n\n`TSelected` = `TableState`\\<`TFeatures`\\>\n\n#### Parameters\n\n##### tableOptions\n\n() => `Omit`\\<`TableOptions`\\<`TFeatures`, `TData`\\>, `\"_features\"` \\| `\"_rowModels\"`\\>\n\n##### selector?\n\n(`state`) => `TSelected`\n\n#### Returns\n\n[`AppAngularTable`](AppAngularTable.md)\\<`TFeatures`, `TData`, `TSelected`, `TTableComponents`, `TCellComponents`, `THeaderComponents`\\>\n\n***\n\n### injectFlexRenderCellContext()\n\n```ts\ninjectFlexRenderCellContext: <TData, TValue>() => CellContext<TFeatures, TData, TValue>;\n```\n\nDefined in: [helpers/createTableHook.ts:332](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/createTableHook.ts#L332)\n\n#### Type Parameters\n\n##### TData\n\n`TData` *extends* `RowData`\n\n##### TValue\n\n`TValue` *extends* `CellData`\n\n#### Returns\n\n`CellContext`\\<`TFeatures`, `TData`, `TValue`\\>\n\n***\n\n### injectFlexRenderHeaderContext()\n\n```ts\ninjectFlexRenderHeaderContext: <TData, TValue>() => HeaderContext<TFeatures, TData, TValue>;\n```\n\nDefined in: [helpers/createTableHook.ts:328](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/createTableHook.ts#L328)\n\n#### Type Parameters\n\n##### TData\n\n`TData` *extends* `RowData`\n\n##### TValue\n\n`TValue` *extends* `CellData`\n\n#### Returns\n\n`HeaderContext`\\<`TFeatures`, `TData`, `TValue`\\>\n\n***\n\n### injectTableCellContext()\n\n```ts\ninjectTableCellContext: <TValue, TRowData>() => Signal<Cell<TFeatures, TRowData, TValue>>;\n```\n\nDefined in: [helpers/createTableHook.ts:324](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/createTableHook.ts#L324)\n\n#### Type Parameters\n\n##### TValue\n\n`TValue` *extends* `CellData` = `CellData`\n\n##### TRowData\n\n`TRowData` *extends* `RowData` = `RowData`\n\n#### Returns\n\n`Signal`\\<`Cell`\\<`TFeatures`, `TRowData`, `TValue`\\>\\>\n\n***\n\n### injectTableContext()\n\n```ts\ninjectTableContext: <TData>() => Signal<AngularTable<TFeatures, TData>>;\n```\n\nDefined in: [helpers/createTableHook.ts:317](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/createTableHook.ts#L317)\n\n#### Type Parameters\n\n##### TData\n\n`TData` *extends* `RowData` = `RowData`\n\n#### Returns\n\n`Signal`\\<[`AngularTable`](AngularTable.md)\\<`TFeatures`, `TData`\\>\\>\n\n***\n\n### injectTableHeaderContext()\n\n```ts\ninjectTableHeaderContext: <TValue, TRowData>() => Signal<Header<TFeatures, TRowData, TValue>>;\n```\n\nDefined in: [helpers/createTableHook.ts:320](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/createTableHook.ts#L320)\n\n#### Type Parameters\n\n##### TValue\n\n`TValue` *extends* `CellData` = `CellData`\n\n##### TRowData\n\n`TRowData` *extends* `RowData` = `RowData`\n\n#### Returns\n\n`Signal`\\<`Header`\\<`TFeatures`, `TRowData`, `TValue`\\>\\>\n"
  },
  {
    "path": "docs/framework/angular/reference/type-aliases/FlexRenderComponentProps.md",
    "content": "---\nid: FlexRenderComponentProps\ntitle: FlexRenderComponentProps\n---\n\n# Type Alias: FlexRenderComponentProps\n\n```ts\ntype FlexRenderComponentProps = InjectionToken<{\n}>;\n```\n\nDefined in: [flex-render/context.ts:3](https://github.com/TanStack/table/blob/main/packages/angular-table/src/flex-render/context.ts#L3)\n"
  },
  {
    "path": "docs/framework/angular/reference/type-aliases/FlexRenderContent.md",
    "content": "---\nid: FlexRenderContent\ntitle: FlexRenderContent\n---\n\n# Type Alias: FlexRenderContent\\<TProps\\>\n\n```ts\ntype FlexRenderContent<TProps> = \n  | string\n  | number\n  | Type<TProps>\n  | FlexRenderComponent<TProps>\n  | TemplateRef<{\n  $implicit: TProps;\n}>\n  | null\n  | Record<any, any>\n  | undefined;\n```\n\nDefined in: [flex-render/renderer.ts:40](https://github.com/TanStack/table/blob/main/packages/angular-table/src/flex-render/renderer.ts#L40)\n\nContent supported by the `flexRender` directive when declaring\na table column header/cell.\n\n## Type Parameters\n\n### TProps\n\n`TProps` *extends* `NonNullable`\\<`unknown`\\>\n"
  },
  {
    "path": "docs/framework/angular/reference/type-aliases/FlexRenderInputContent.md",
    "content": "---\nid: FlexRenderInputContent\ntitle: FlexRenderInputContent\n---\n\n# Type Alias: FlexRenderInputContent\\<TProps\\>\n\n```ts\ntype FlexRenderInputContent<TProps> = \n  | number\n  | string\n  | (props) => FlexRenderContent<TProps>\n  | null\n  | undefined;\n```\n\nDefined in: [flex-render/renderer.ts:53](https://github.com/TanStack/table/blob/main/packages/angular-table/src/flex-render/renderer.ts#L53)\n\nInput content supported by the `flexRender` directives.\n\n## Type Parameters\n\n### TProps\n\n`TProps` *extends* `NonNullable`\\<`unknown`\\>\n"
  },
  {
    "path": "docs/framework/angular/reference/variables/FlexRender.md",
    "content": "---\nid: FlexRender\ntitle: FlexRender\n---\n\n# Variable: FlexRender\n\n```ts\nconst FlexRender: readonly [typeof FlexRenderDirective, typeof FlexRenderCell];\n```\n\nDefined in: [index.ts:25](https://github.com/TanStack/table/blob/main/packages/angular-table/src/index.ts#L25)\n\nConstant helper to import FlexRender directives.\n\nYou should prefer to use this constant over importing the directives separately,\nas it ensures you always have the correct set of directives over library updates.\n\n## See\n\n[FlexRenderDirective](../classes/FlexRenderDirective.md) and [FlexRenderCell](../classes/FlexRenderCell.md) for more details on the directives included in this export.\n"
  },
  {
    "path": "docs/framework/angular/reference/variables/TanStackTableCellToken.md",
    "content": "---\nid: TanStackTableCellToken\ntitle: TanStackTableCellToken\n---\n\n# Variable: TanStackTableCellToken\n\n```ts\nconst TanStackTableCellToken: InjectionToken<Signal<any>>;\n```\n\nDefined in: [helpers/cell.ts:25](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/cell.ts#L25)\n\nInjection token that provides access to the current cell.\n\nThis token is provided by the [TanStackTableCell](../classes/TanStackTableCell.md) directive.\n"
  },
  {
    "path": "docs/framework/angular/reference/variables/TanStackTableHeaderToken.md",
    "content": "---\nid: TanStackTableHeaderToken\ntitle: TanStackTableHeaderToken\n---\n\n# Variable: TanStackTableHeaderToken\n\n```ts\nconst TanStackTableHeaderToken: InjectionToken<Signal<any>>;\n```\n\nDefined in: [helpers/header.ts:25](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/header.ts#L25)\n\nInjection token that provides access to the current header.\n\nThis token is provided by the [TanStackTableHeader](../classes/TanStackTableHeader.md) directive.\n"
  },
  {
    "path": "docs/framework/angular/reference/variables/TanStackTableToken.md",
    "content": "---\nid: TanStackTableToken\ntitle: TanStackTableToken\n---\n\n# Variable: TanStackTableToken\n\n```ts\nconst TanStackTableToken: InjectionToken<Signal<any>>;\n```\n\nDefined in: [helpers/table.ts:11](https://github.com/TanStack/table/blob/main/packages/angular-table/src/helpers/table.ts#L11)\n\nInjection token that provides access to the current [AngularTable](../type-aliases/AngularTable.md) instance.\n\nThis token is provided by the [TanStackTable](../classes/TanStackTable.md) directive.\n"
  },
  {
    "path": "docs/framework/lit/guide/table-state.md",
    "content": "---\ntitle: Table State (Lit) Guide\n---\n\n## Table State (Lit) Guide\n\nTanStack Table has a simple underlying internal state management system to store and manage the state of the table. It also lets you selectively pull out any state that you need to manage in your own state management. This guide will walk you through the different ways in which you can interact with and manage the state of the table.\n\n### Accessing Table State\n\nYou do not need to set up anything special in order for the table state to work. If you pass nothing into either `state`, `initialState`, or any of the `on[State]Change` table options, the table will manage its own state internally. You can access any part of this internal state by using the `table.store.state` table instance API.\n\n```ts\nprivate tableController = new TableController<Person>(this);\n\nrender() {\n  const table = this.tableController.table({\n    columns,\n    data,\n    ...\n  })\n\n  console.log(table.store.state) //access the entire internal state\n  console.log(table.store.state.rowSelection) //access just the row selection state\n  // ...\n}\n```\n\n### Custom Initial State\n\nIf all you need to do for certain states is customize their initial default values, you still do not need to manage any of the state yourself. You can simply set values in the `initialState` option of the table instance.\n\n```ts\nrender() {\n  const table = this.tableController.table({\n    columns,\n    data,\n    initialState: {\n      columnOrder: ['age', 'firstName', 'lastName'], //customize the initial column order\n      columnVisibility: {\n        id: false //hide the id column by default\n      },\n      expanded: true, //expand all rows by default\n      sorting: [\n        {\n          id: 'age',\n          desc: true //sort by age in descending order by default\n        }\n      ]\n    },\n  })\n\n  return html`...`;\n}\n```\n\n> **Note**: Only specify each particular state in either `initialState` or `state`, but not both. If you pass in a particular state value to both `initialState` and `state`, the initialized state in `state` will take overwrite any corresponding value in `initialState`.\n\n### Controlled State\n\nIf you need easy access to the table state in other areas of your application, TanStack Table makes it easy to control and manage any or all of the table state in your own state management system. You can do this by passing in your own state and state management functions to the `state` and `on[State]Change` table options.\n\n#### Individual Controlled State\n\nYou can control just the state that you need easy access to. You do NOT have to control all of the table state if you do not need to. It is recommended to only control the state that you need on a case-by-case basis.\n\nIn order to control a particular state, you need to both pass in the corresponding `state` value and the `on[State]Change` function to the table instance.\n\nLet's take filtering, sorting, and pagination as an example in a \"manual\" server-side data fetching scenario. You can store the filtering, sorting, and pagination state in your own state management, but leave out any other state like column order, column visibility, etc. if your API does not care about those values.\n\n```jsx\nimport {html} from \"lit\";\n\n@customElement('my-component')\nclass MyComponent extends LitElement {\n  @state()\n  private _sorting: SortingState = []\n\n  render() {\n    const table = this.tableController.table({\n      columns,\n      data,\n      state: {\n        sorting: this._sorting,\n      },\n      onSortingChange: updaterOrValue => {\n        if (typeof updaterOrValue === 'function') {\n          this._sorting = updaterOrValue(this._sorting)\n        } else {\n          this._sorting = updaterOrValue\n        }\n      },\n      getSortedRowModel: createSortedRowModel(sortFns),\n      getCoreRowModel: createCoreRowModel(),\n    })\n\n    return html`...`\n  }\n}\n//...\n```\n\n#### Fully Controlled State\n\nAlternatively, you can control the entire table state with the `onStateChange` table option. It will hoist out the entire table state into your own state management system. Be careful with this approach, as you might find that raising some frequently changing state values up a component tree, like `columnSizingInfo` state`, might cause bad performance issues.\n\nA couple of more tricks may be needed to make this work. If you use the `onStateChange` table option, the initial values of the `state` must be populated with all of the relevant state values for all of the features that you want to use. You can either manually type out all of the initial state values, or use the `table.setOptions` API in a special way as shown below.\n\n```ts\n\nprivate tableController = new TableController<Person>(this);\n\n@state()\nprivate _tableState;\n\nrender() {\n  const table = this.tableController.table({\n    columns,\n    data,\n    getCoreRowModel: createCoreRowModel(),\n    getSortedRowModel: createSortedRowModel(sortFns)\n  })\n  const state = { ...table.initialState, ...this.tableState };\n  table.setOptions(prev => ({\n    ...prev,\n    state,\n    onStateChange: updater => {\n      this.tableState =\n        updater instanceof Function ? updater(state) : updater //any state changes will be pushed up to our own state management\n    },\n  }))\n\n  return html`...`;\n}\n```\n\n### On State Change Callbacks\n\nSo far, we have seen the `on[State]Change` and `onStateChange` table options work to \"hoist\" the table state changes into our own state management. However, there are a few things about these using these options that you should be aware of.\n\n#### 1. **State Change Callbacks MUST have their corresponding state value in the `state` option**.\n\nSpecifying an `on[State]Change` callback tells the table instance that this will be a controlled state. If you do not specify the corresponding `state` value, that state will be \"frozen\" with its initial value.\n\n```jsx\n@state()\nprivate _sorting = [];\n//...\nrender() {\n  const table = this.tableController.table({\n    columns,\n    data,\n    state: {\n      sorting: this._sorting,\n    },\n    onSortingChange: updaterOrValue => {\n      if (typeof updaterOrValue === 'function') {\n        this._sorting = updaterOrValue(this._sorting)\n      } else {\n        this._sorting = updaterOrValue\n      }\n    },\n    getSortedRowModel: createSortedRowModel(sortFns),\n    getCoreRowModel: createCoreRowModel(),\n  })\n\n  return html`...`;\n}\n```\n\n#### 2. **Updaters can either be raw values or callback functions**.\n\nThe `on[State]Change` and `onStateChange` callbacks work exactly like the `setState` functions in React. The updater values can either be a new state value or a callback function that takes the previous state value and returns the new state value.\n\nWhat implications does this have? It means that if you want to add in some extra logic in any of the `on[State]Change` callbacks, you can do so, but you need to check whether or not the new incoming updater value is a function or value.\n\nThis is why you will see the `updater instanceof Function ? updater(state.value) : updater` pattern in the examples above. This pattern checks if the updater is a function, and if it is, it calls the function with the previous state value to get the new state value.\n\n### State Types\n\nAll complex states in TanStack Table have their own TypeScript types that you can import and use. This can be handy for ensuring that you are using the correct data structures and properties for the state values that you are controlling.\n\n```tsx\nimport { TableController, type SortingState } from '@tanstack/lit-table'\n//...\n@state()\nprivate _sorting: SortingState = [\n  {\n    id: 'age', //you should get autocomplete for the `id` and `desc` properties\n    desc: true,\n  }\n]\n```\n"
  },
  {
    "path": "docs/framework/lit/lit-table.md",
    "content": "---\ntitle: Lit Table\n---\n\nThe `@tanstack/lit-table` adapter is a wrapper around the core table logic. Most of it's job is related to managing state the \"lit\" way, providing types and the rendering implementation of cell/header/footer templates.\n\n## Exports\n\n`@tanstack/lit-table` re-exports all of `@tanstack/table-core`'s APIs and the following:\n\n### `TableController`\n\nIs a reactive controller that provides a `table` API that takes an `options` object and returns a table instance.\n\n```ts\nimport { TableController } from '@tanstack/lit-table'\n\n@customElement('my-table-element')\nclass MyTableElement extends LitElement {\n  private tableController = new TableController<Person>(this)\n\n  protected render() {\n    const table = this.tableController.table(options)\n    // ...render your table\n  }\n}\n```\n\n### `flexRender`\n\nA utility function for rendering cell/header/footer templates with dynamic values.\n\nExample:\n\n```jsx\nimport { flexRender } from '@tanstack/lit-table'\n//...\nreturn html`\n<tbody>\n  ${table\n    .getRowModel()\n    .rows.slice(0, 10)\n    .map(\n      row => html`\n        <tr>\n          ${row\n            .getVisibleCells()\n            .map(\n              cell => html`\n                <td>\n                  ${flexRender(\n                    cell.column.columnDef.cell,\n                    cell.getContext()\n                  )}\n                </td>\n              `\n            )}\n        </tr>\n      `\n    )}\n</tbody>\n`\n```\n"
  },
  {
    "path": "docs/framework/preact/guide/create-table-hook.md",
    "content": "---\ntitle: createTableHook Guide\n---\n\n`createTableHook` is an advanced API for building reusable, composable table configurations in Preact. It mirrors the [React `createTableHook` API](../react/guide/create-table-hook) — you define features, row models, and pre-bound components once, then reuse them across multiple tables with minimal boilerplate.\n\n> **When to use it:** Use `createTableHook` when you have multiple tables that share the same configuration. For a single table, `useTable` is sufficient.\n\n## Setup\n\nCreate a shared table configuration file and call `createTableHook` with your features, row models, and component registries:\n\n```tsx\n// hooks/table.ts\n\nimport {\n  createTableHook,\n  tableFeatures,\n  columnFilteringFeature,\n  rowPaginationFeature,\n  rowSortingFeature,\n  createFilteredRowModel,\n  createPaginatedRowModel,\n  createSortedRowModel,\n  filterFns,\n  sortFns,\n} from '@tanstack/preact-table'\n\nimport { PaginationControls, RowCount, TableToolbar } from '../components/table-components'\nimport { TextCell, NumberCell, StatusCell } from '../components/cell-components'\nimport { SortIndicator, ColumnFilter } from '../components/header-components'\n\nexport const {\n  createAppColumnHelper,\n  useAppTable,\n  useTableContext,\n  useCellContext,\n  useHeaderContext,\n} = createTableHook({\n  _features: tableFeatures({\n    columnFilteringFeature,\n    rowPaginationFeature,\n    rowSortingFeature,\n  }),\n\n  _rowModels: {\n    sortedRowModel: createSortedRowModel(sortFns),\n    filteredRowModel: createFilteredRowModel(filterFns),\n    paginatedRowModel: createPaginatedRowModel(),\n  },\n\n  getRowId: (row) => row.id,\n\n  tableComponents: {\n    PaginationControls,\n    RowCount,\n    TableToolbar,\n  },\n\n  cellComponents: {\n    TextCell,\n    NumberCell,\n    StatusCell,\n  },\n\n  headerComponents: {\n    SortIndicator,\n    ColumnFilter,\n  },\n})\n```\n\n## What `createTableHook` Returns\n\n| Export | Description |\n|--------|-------------|\n| `useAppTable` | Hook for creating tables. Merges default options from the hook with per-table options. |\n| `createAppColumnHelper` | Column helper with `TFeatures` pre-bound. Only requires `TData`. |\n| `useTableContext` | Access the table instance inside `tableComponents`. |\n| `useCellContext` | Access the cell instance inside `cellComponents`. |\n| `useHeaderContext` | Access the header instance inside `headerComponents`. |\n\n## Component Registries\n\nThe API matches React's `createTableHook`:\n\n- **`tableComponents`** — Components attached to the table (`table.PaginationControls`, etc.). Use `useTableContext()` inside them.\n- **`cellComponents`** — Components attached to the cell (`cell.TextCell`, etc.). Use `useCellContext()` inside them.\n- **`headerComponents`** — Components attached to the header (`header.SortIndicator`, etc.). Use `useHeaderContext()` inside them.\n\n## Using `useAppTable`\n\n```tsx\nconst personColumnHelper = createAppColumnHelper<Person>()\n\nfunction UsersTable() {\n  const [data, setData] = useState(() => makeData(100))\n\n  const columns = useMemo(\n    () =>\n      personColumnHelper.columns([\n        personColumnHelper.accessor('firstName', {\n          header: 'First Name',\n          cell: ({ cell }) => <cell.TextCell />,\n        }),\n        personColumnHelper.accessor('age', {\n          header: 'Age',\n          cell: ({ cell }) => <cell.NumberCell />,\n        }),\n      ]),\n    [],\n  )\n\n  const table = useAppTable({\n    columns,\n    data,\n  })\n\n  return (\n    <table.AppTable selector={(state) => ({ pagination: state.pagination })}>\n      {() => (\n        <div>\n          <table.TableToolbar title=\"Users\" onRefresh={() => setData(makeData(100))} />\n          <table>\n            <thead>\n              {table.getHeaderGroups().map((headerGroup) => (\n                <tr key={headerGroup.id}>\n                  {headerGroup.headers.map((h) => (\n                    <table.AppHeader header={h} key={h.id}>\n                      {(header) => (\n                        <th onClick={header.column.getToggleSortingHandler()}>\n                          <header.FlexRender />\n                          <header.SortIndicator />\n                        </th>\n                      )}\n                    </table.AppHeader>\n                  ))}\n                </tr>\n              ))}\n            </thead>\n            <tbody>\n              {table.getRowModel().rows.map((row) => (\n                <tr key={row.id}>\n                  {row.getAllCells().map((c) => (\n                    <table.AppCell cell={c} key={c.id}>\n                      {(cell) => <td><cell.FlexRender /></td>}\n                    </table.AppCell>\n                  ))}\n                </tr>\n              ))}\n            </tbody>\n          </table>\n          <table.PaginationControls />\n          <table.RowCount />\n        </div>\n      )}\n    </table.AppTable>\n  )\n}\n```\n\n## AppTable, AppHeader, AppCell, AppFooter\n\nSame as React: `table.AppTable`, `table.AppHeader`, `table.AppCell`, and `table.AppFooter` provide context to your registered components. Use the `selector` prop on `AppTable` for optimized re-renders.\n\n## See Also\n\n- [React createTableHook Guide](../react/guide/create-table-hook) — The React guide has more detailed examples and the same API.\n- [Composable Tables (React)](../react/examples/composable-tables) — Reference implementation (Preact API mirrors React).\n"
  },
  {
    "path": "docs/framework/react/guide/create-table-hook.md",
    "content": "---\ntitle: createTableHook Guide\n---\n\n`createTableHook` is an advanced API for building reusable, composable table configurations. It lets you define features, row models, and pre-bound components once, then reuse them across multiple tables with minimal boilerplate. It is inspired by [TanStack Form's `createFormHook`](https://tanstack.com/form/latest/docs/framework/react/guides/form-composition).\n\n> **When to use it:** Use `createTableHook` when you have multiple tables that share the same configuration (features, row models, and reusable components). For a single table, `useTable` is sufficient.\n\n## Examples\n\n- [Composable Tables](../examples/composable-tables) — Two tables (Users and Products) sharing the same `createTableHook` configuration, with table/cell/header components, sorting, filtering, and pagination.\n- [Basic useAppTable](../examples/basic-use-app-table) — Minimal example using `createTableHook` with no pre-bound components.\n\n## Setup\n\nCreate a shared table configuration file and call `createTableHook` with your features, row models, and component registries:\n\n```tsx\n// hooks/table.ts\n\nimport {\n  createTableHook,\n  tableFeatures,\n  columnFilteringFeature,\n  rowPaginationFeature,\n  rowSortingFeature,\n  createFilteredRowModel,\n  createPaginatedRowModel,\n  createSortedRowModel,\n  filterFns,\n  sortFns,\n} from '@tanstack/react-table'\n\nimport { PaginationControls, RowCount, TableToolbar } from '../components/table-components'\nimport { TextCell, NumberCell, StatusCell, ProgressCell } from '../components/cell-components'\nimport { SortIndicator, ColumnFilter } from '../components/header-components'\n\nexport const {\n  createAppColumnHelper,\n  useAppTable,\n  useTableContext,\n  useCellContext,\n  useHeaderContext,\n} = createTableHook({\n  _features: tableFeatures({\n    columnFilteringFeature,\n    rowPaginationFeature,\n    rowSortingFeature,\n  }),\n\n  _rowModels: {\n    sortedRowModel: createSortedRowModel(sortFns),\n    filteredRowModel: createFilteredRowModel(filterFns),\n    paginatedRowModel: createPaginatedRowModel(),\n  },\n\n  getRowId: (row) => row.id,\n\n  tableComponents: {\n    PaginationControls,\n    RowCount,\n    TableToolbar,\n  },\n\n  cellComponents: {\n    TextCell,\n    NumberCell,\n    StatusCell,\n    ProgressCell,\n  },\n\n  headerComponents: {\n    SortIndicator,\n    ColumnFilter,\n  },\n})\n```\n\n## What `createTableHook` Returns\n\n| Export | Description |\n|--------|-------------|\n| `useAppTable` | Hook for creating tables. Merges default options from the hook with per-table options. No need to pass `_features` or `_rowModels`—they come from the hook. |\n| `createAppColumnHelper` | Column helper with `TFeatures` pre-bound. Only requires `TData`. Use `createAppColumnHelper<Person>()` instead of `createColumnHelper<typeof _features, Person>()`. |\n| `useTableContext` | Access the table instance inside `tableComponents`. |\n| `useCellContext` | Access the cell instance inside `cellComponents`. |\n| `useHeaderContext` | Access the header instance inside `headerComponents`. |\n\n## Component Registries\n\n### `tableComponents`\n\nComponents that need access to the **table instance**. They are attached to the table object, so you use them as `table.PaginationControls`, `table.RowCount`, etc.\n\nUse `useTableContext()` inside these components:\n\n```tsx\nexport function PaginationControls() {\n  const table = useTableContext()\n\n  return (\n    <div className=\"pagination\">\n      <button onClick={() => table.previousPage()} disabled={!table.getCanPreviousPage()}>\n        Previous\n      </button>\n      <button onClick={() => table.nextPage()} disabled={!table.getCanNextPage()}>\n        Next\n      </button>\n    </div>\n  )\n}\n```\n\n### `cellComponents`\n\nComponents that render **cell content**. They are attached to the `cell` object in column definitions, so you use them as `cell.TextCell`, `cell.NumberCell`, etc.\n\nUse `useCellContext()` inside these components:\n\n```tsx\nexport function TextCell() {\n  const cell = useCellContext<string>()\n  return <span>{cell.getValue()}</span>\n}\n\nexport function NumberCell() {\n  const cell = useCellContext<number>()\n  return <span>{cell.getValue().toLocaleString()}</span>\n}\n```\n\n### `headerComponents`\n\nComponents that render **header/footer content**. They are attached to the `header` object, so you use them as `header.SortIndicator`, `header.ColumnFilter`, etc.\n\nUse `useHeaderContext()` inside these components:\n\n```tsx\nexport function SortIndicator() {\n  const header = useHeaderContext()\n  const sorted = header.column.getIsSorted()\n  if (!sorted) return null\n  return <span>{sorted === 'asc' ? '🔼' : '🔽'}</span>\n}\n```\n\n## Using `useAppTable`\n\nCreate tables with `useAppTable`—`_features` and `_rowModels` are inherited from the hook:\n\n```tsx\nconst personColumnHelper = createAppColumnHelper<Person>()\n\nfunction UsersTable() {\n  const [data, setData] = useState(() => makeData(1000))\n\n  const columns = useMemo(\n    () =>\n      personColumnHelper.columns([\n        personColumnHelper.accessor('firstName', {\n          header: 'First Name',\n          cell: ({ cell }) => <cell.TextCell />,\n        }),\n        personColumnHelper.accessor('age', {\n          header: 'Age',\n          cell: ({ cell }) => <cell.NumberCell />,\n        }),\n        personColumnHelper.accessor('status', {\n          header: 'Status',\n          cell: ({ cell }) => <cell.StatusCell />,\n        }),\n      ]),\n    [],\n  )\n\n  const table = useAppTable({\n    columns,\n    data,\n    debugTable: true,\n  })\n\n  return (\n    <table.AppTable selector={(state) => ({ pagination: state.pagination, sorting: state.sorting })}>\n      {({ sorting }) => (\n        <div>\n          <table.TableToolbar title=\"Users\" onRefresh={() => setData(makeData(1000))} />\n          <table>\n            <thead>\n              {table.getHeaderGroups().map((headerGroup) => (\n                <tr key={headerGroup.id}>\n                  {headerGroup.headers.map((h) => (\n                    <table.AppHeader header={h} key={h.id}>\n                      {(header) => (\n                        <th onClick={header.column.getToggleSortingHandler()}>\n                          <header.FlexRender />\n                          <header.SortIndicator />\n                          <header.ColumnFilter />\n                        </th>\n                      )}\n                    </table.AppHeader>\n                  ))}\n                </tr>\n              ))}\n            </thead>\n            <tbody>\n              {table.getRowModel().rows.map((row) => (\n                <tr key={row.id}>\n                  {row.getAllCells().map((c) => (\n                    <table.AppCell cell={c} key={c.id}>\n                      {(cell) => <td><cell.FlexRender /></td>}\n                    </table.AppCell>\n                  ))}\n                </tr>\n              ))}\n            </tbody>\n          </table>\n          <table.PaginationControls />\n          <table.RowCount />\n        </div>\n      )}\n    </table.AppTable>\n  )\n}\n```\n\n## AppTable, AppHeader, AppCell, AppFooter\n\nThe table returned by `useAppTable` includes wrapper components that provide context to your registered components:\n\n- **`table.AppTable`** — Wraps the table UI and provides a `selector` prop for optimized re-renders. Renders its children with the selected state.\n- **`table.AppHeader`** — Wraps a header and provides the enhanced `header` context (with `header.SortIndicator`, `header.ColumnFilter`, etc.) to its render prop.\n- **`table.AppCell`** — Wraps a cell and provides the enhanced `cell` context (with `cell.TextCell`, `cell.FlexRender`, etc.) to its render prop.\n- **`table.AppFooter`** — Same as AppHeader but for footer cells.\n\n## Optimized Rendering with `selector`\n\nPass a `selector` to `table.AppTable` to subscribe only to the state slices you need. This reduces re-renders when other state (e.g., column filters) changes but your component doesn't use it:\n\n```tsx\n<table.AppTable\n  selector={(state) => ({\n    pagination: state.pagination,\n    sorting: state.sorting,\n    columnFilters: state.columnFilters,\n  })}\n>\n  {({ sorting, columnFilters }) => (\n    // This only re-renders when pagination, sorting, or columnFilters change\n    <div>...</div>\n  )}\n</table.AppTable>\n```\n\nFor v8-style behavior (re-render on any state change), pass `(state) => state`.\n\n## Multiple Table Configurations\n\nYou can call `createTableHook` multiple times for different parts of your app:\n\n```tsx\n// admin-tables.ts\nexport const { useAppTable: useAdminTable, createAppColumnHelper: createAdminColumnHelper } =\n  createTableHook({\n    _features: tableFeatures({ rowSortingFeature, columnFilteringFeature, rowSelectionFeature }),\n    _rowModels: { /* ... */ },\n    cellComponents: { EditableCell, DeleteButton },\n  })\n\n// readonly-tables.ts\nexport const { useAppTable: useReadonlyTable, createAppColumnHelper: createReadonlyColumnHelper } =\n  createTableHook({\n    _features: tableFeatures({ rowSortingFeature }),\n    _rowModels: { /* ... */ },\n    cellComponents: { TextCell, NumberCell },\n  })\n```\n\n## See Also\n\n- [Migrating to v9](./migrating) — Includes a createTableHook section\n- [Composable Tables example](../examples/composable-tables) — Full implementation with two tables\n"
  },
  {
    "path": "docs/framework/react/guide/migrating.md",
    "content": "---\ntitle: Migrating to TanStack Table v9 (React)\n---\n\n## What's New in TanStack Table v9\n\nTanStack Table v9 is a major release that introduces significant architectural improvements while maintaining the core table logic you're familiar with. Here are the key changes:\n\n### 1. Tree-shaking\n\n- **Features are tree-shakeable**: Features are now treated as plugins—import only what you use. If your table only needs sorting, you won't ship filtering, pagination, or other feature code. Bundlers can eliminate unused code, so for smaller tables you can expect to bundle ~6–7kb compared to 15–20kb for the same table in v8. This also lets TanStack Table add features over time without bloating everyone's bundles.\n- **Row models and their functions are refactored**: Row model factories (`createFilteredRowModel`, `createSortedRowModel`, etc.) now accept their processing functions (`filterFns`, `sortFns`, `aggregationFns`) as parameters. This enables tree-shaking of the functions themselves—if you use a custom filter, you don't pay for built-in filters you never use.\n\n### 2. State Management\n\n- **Uses TanStack Store**: The internal state system has been rebuilt on [TanStack Store](https://tanstack.com/store), providing a reactive, framework-agnostic foundation. This works similarly to TanStack Form's state model.\n- **Opt-in subscriptions instead of memo hacks**: Use `table.Subscribe` or pass a selector to `useTable` to subscribe to specific slices of state. Only re-render when the state you care about changes—no more `React.memo` or manual memoization. Pass `state => state` if you want v8-style behavior where any state change triggers a re-render.\n\n### 3. Composability\n\n- **`tableOptions`**: New utilities let you compose and share table configurations. Define `_features`, `_rowModels`, and default options once, then reuse them across tables or pass them through `createTableHook`.\n- **`createTableHook`** (optional, advanced): Create custom table hooks with pre-bound features, row models, and components—similar to TanStack Form's `createFormHook`. Define your table setup once and reuse it across many tables. You don't need this for most use cases; `useTable` is sufficient.\n\n### The Good News: Most Upgrades Are Opt-in\n\nWhile v9 is a significant upgrade, **you don't have to adopt everything at once**:\n\n- **Don't want to optimize renders?** Pass `state => state` as the selector to `useTable` and rendering works like v8.\n- **Don't want to think about tree-shaking?** Import `stockFeatures` to include all features, just like v8.\n- **Table markup is largely unchanged.** How you render `<table>`, `<thead>`, `<tr>`, `<td>`, etc. remains the same.\n\nThe main change is **how you define a table** with the `useTable` hook — specifically the new `_features` and `_rowModels` options.\n\n---\n\n## Quick Legacy Migration\n\nNeed to migrate incrementally? Use `useLegacyTable` — it accepts the v8-style API while using v9 under the hood. **This is deprecated** and intended only as a temporary migration aid. It includes all features by default, resulting in a larger bundle size.\n\nLegacy APIs live in a separate export. Import core utilities from `@tanstack/react-table` and legacy-specific APIs from `@tanstack/react-table/legacy`:\n\n```tsx\nimport { flexRender } from '@tanstack/react-table'\nimport {\n  useLegacyTable,\n  getCoreRowModel,\n  getFilteredRowModel,\n  getSortedRowModel,\n  getPaginationRowModel,\n  legacyCreateColumnHelper,\n} from '@tanstack/react-table/legacy'\n```\n\nSee the [useLegacyTable Guide](./use-legacy-table.md) for full documentation, examples, and type helpers.\n\n---\n\nThe rest of this guide focuses on migrating to the full v9 API and taking advantage of its features.\n\n## Core Breaking Changes\n\n### Hook Rename\n\nThe hook name has been simplified to be consistent across all TanStack libraries:\n\n```tsx\n// v8\nimport { useReactTable } from '@tanstack/react-table'\nconst table = useReactTable(options)\n\n// v9\nimport { useTable } from '@tanstack/react-table'\nconst table = useTable(options)\n```\n\n### New Required Options: `_features` and `_rowModels`\n\nIn v9, you must explicitly declare which features and row models your table uses:\n\n```tsx\n// v8\nimport { useReactTable, getCoreRowModel } from '@tanstack/react-table'\n\nconst table = useReactTable({\n  columns,\n  data,\n  getCoreRowModel: getCoreRowModel(),\n})\n\n// v9\nimport { useTable, tableFeatures } from '@tanstack/react-table'\n\nconst _features = tableFeatures({}) // Empty = core features only\n\nconst table = useTable({\n  _features,\n  _rowModels: {}, // Core row model is automatic\n  columns,\n  data,\n})\n```\n\n---\n\n## The `_features` Option\n\nFeatures control what table functionality is available. In v8, all features were bundled. In v9, you import only what you need.\n\n### Importing Individual Features\n\n```tsx\nimport {\n  tableFeatures,\n  // Import only the features you need\n  columnFilteringFeature,\n  rowSortingFeature,\n  rowPaginationFeature,\n  columnVisibilityFeature,\n  rowSelectionFeature,\n} from '@tanstack/react-table'\n\n// Create a features object (define this outside your component for stable reference)\nconst _features = tableFeatures({\n  columnFilteringFeature,\n  rowSortingFeature,\n  rowPaginationFeature,\n  columnVisibilityFeature,\n  rowSelectionFeature,\n})\n```\n\n### Using `stockFeatures` for v8-like Behavior\n\nIf you want all features without thinking about it (like v8), import `stockFeatures`:\n\n```tsx\nimport { useTable, stockFeatures } from '@tanstack/react-table'\n\nconst table = useTable({\n  _features: stockFeatures, // All features included\n  _rowModels: { /* ... */ },\n  columns,\n  data,\n})\n```\n\n### Available Features\n\n| Feature | Import Name |\n|---------|-------------|\n| Column Filtering | `columnFilteringFeature` |\n| Global Filtering | `globalFilteringFeature` |\n| Row Sorting | `rowSortingFeature` |\n| Row Pagination | `rowPaginationFeature` |\n| Row Selection | `rowSelectionFeature` |\n| Row Expanding | `rowExpandingFeature` |\n| Row Pinning | `rowPinningFeature` |\n| Column Pinning | `columnPinningFeature` |\n| Column Visibility | `columnVisibilityFeature` |\n| Column Ordering | `columnOrderingFeature` |\n| Column Sizing | `columnSizingFeature` |\n| Column Resizing | `columnResizingFeature` |\n| Column Grouping | `columnGroupingFeature` |\n| Column Faceting | `columnFacetingFeature` |\n\n---\n\n## The `_rowModels` Option\n\nRow models are the functions that process your data (filtering, sorting, pagination, etc.). In v9, they're configured via `_rowModels` instead of `get*RowModel` options.\n\n### Migration Mapping\n\n| v8 Option | v9 `_rowModels` Key | v9 Factory Function |\n|-----------|---------------------|---------------------|\n| `getCoreRowModel()` | (automatic) | Not needed — always included |\n| `getFilteredRowModel()` | `filteredRowModel` | `createFilteredRowModel(filterFns)` |\n| `getSortedRowModel()` | `sortedRowModel` | `createSortedRowModel(sortFns)` |\n| `getPaginationRowModel()` | `paginatedRowModel` | `createPaginatedRowModel()` |\n| `getExpandedRowModel()` | `expandedRowModel` | `createExpandedRowModel()` |\n| `getGroupedRowModel()` | `groupedRowModel` | `createGroupedRowModel(aggregationFns)` |\n| `getFacetedRowModel()` | `facetedRowModel` | `createFacetedRowModel()` |\n| `getFacetedMinMaxValues()` | `facetedMinMaxValues` | `createFacetedMinMaxValues()` |\n| `getFacetedUniqueValues()` | `facetedUniqueValues` | `createFacetedUniqueValues()` |\n\n### Key Change: Row Model Functions Now Accept Parameters\n\nSeveral row model factories now accept their processing functions as parameters. This enables better tree-shaking and explicit configuration:\n\n```tsx\nimport {\n  createFilteredRowModel,\n  createSortedRowModel,\n  createGroupedRowModel,\n  filterFns,  // Built-in filter functions\n  sortFns,    // Built-in sort functions\n  aggregationFns, // Built-in aggregation functions\n} from '@tanstack/react-table'\n\nconst table = useTable({\n  _features,\n  _rowModels: {\n    filteredRowModel: createFilteredRowModel(filterFns),\n    sortedRowModel: createSortedRowModel(sortFns),\n    groupedRowModel: createGroupedRowModel(aggregationFns),\n    paginatedRowModel: createPaginatedRowModel(),\n  },\n  columns,\n  data,\n})\n```\n\n### Full Migration Example\n\n```tsx\n// v8\nimport {\n  useReactTable,\n  getCoreRowModel,\n  getFilteredRowModel,\n  getSortedRowModel,\n  getPaginationRowModel,\n  filterFns,\n  sortingFns,\n} from '@tanstack/react-table'\n\nconst table = useReactTable({\n  columns,\n  data,\n  getCoreRowModel: getCoreRowModel(), // used to be called \"get*RowModel()\"\n  getFilteredRowModel: getFilteredRowModel(),\n  getSortedRowModel: getSortedRowModel(),\n  getPaginationRowModel: getPaginationRowModel(),\n  filterFns, // used to be passed in as a root option\n  sortingFns,\n})\n\n// v9\nimport {\n  useTable,\n  tableFeatures,\n  columnFilteringFeature,\n  rowSortingFeature,\n  rowPaginationFeature,\n  createFilteredRowModel,\n  createSortedRowModel,\n  createPaginatedRowModel,\n  filterFns,\n  sortFns,\n} from '@tanstack/react-table'\n\nconst _features = tableFeatures({\n  columnFilteringFeature,\n  rowSortingFeature,\n  rowPaginationFeature,\n})\n\nconst table = useTable({\n  _features,\n  _rowModels: {\n    filteredRowModel: createFilteredRowModel(filterFns), // now called \"create*RowModel()\" with a Fns parameter\n    sortedRowModel: createSortedRowModel(sortFns),\n    paginatedRowModel: createPaginatedRowModel(),\n  },\n  columns,\n  data,\n})\n```\n\n---\n\n## State Management Changes\n\n### Accessing State\n\nIn v8, you accessed state via `table.getState()`. In v9, state is accessed differently:\n\n```tsx\n// v8\nconst state = table.getState()\nconst { sorting, pagination } = table.getState()\n\n// v9 - via the store (full state)\nconst fullState = table.store.state\nconst { sorting, pagination } = table.store.state\n\n// v9 - via table.state (selected state from your selector)\nconst table = useTable(options, (state) => ({\n  sorting: state.sorting,\n  pagination: state.pagination,\n}))\n// Now table.state only contains sorting and pagination\nconst { sorting, pagination } = table.state\n```\n\n### Optimized Rendering with `table.Subscribe`\n\nThe biggest state management improvement is `table.Subscribe`, which enables fine-grained reactivity:\n\n```tsx\nfunction MyTable() {\n  const table = useTable({\n    _features,\n    _rowModels: { /* ... */ },\n    columns,\n    data,\n  })\n\n  return (\n    <table.Subscribe\n      selector={(state) => ({\n        sorting: state.sorting,\n        pagination: state.pagination,\n      })}\n    >\n      {({ sorting, pagination }) => (\n        // This only re-renders when sorting or pagination changes\n        <div>\n          <table>{/* ... */}</table>\n          <div>Page {pagination.pageIndex + 1}</div>\n        </div>\n      )}\n    </table.Subscribe>\n  )\n}\n```\n\n### Opt-Out: v8-Style Full State Subscription\n\nIf you want v8-style behavior where the component re-renders on any state change, pass `state => state` as the selector:\n\n```tsx\n// Re-renders on ANY state change (like v8)\nconst table = useTable(\n  {\n    _features,\n    _rowModels: { /* ... */ },\n    columns,\n    data,\n  },\n  (state) => state, // Subscribe to entire state\n)\n\n// table.state now contains the full state\nconst { sorting, pagination, columnFilters } = table.state\n```\n\n### Controlled State\n\nControlled state patterns work similarly to v8:\n\n```tsx\nconst [sorting, setSorting] = useState<SortingState>([])\nconst [pagination, setPagination] = useState<PaginationState>({\n  pageIndex: 0,\n  pageSize: 10,\n})\n\nconst table = useTable({\n  _features,\n  _rowModels: { /* ... */ },\n  columns,\n  data,\n  state: {\n    sorting,\n    pagination,\n  },\n  onSortingChange: setSorting,\n  onPaginationChange: setPagination,\n})\n```\n\n---\n\n## Column Helper Changes\n\nThe `createColumnHelper` function now requires a `TFeatures` type parameter in addition to `TData`:\n\n```tsx\n// v8\nimport { createColumnHelper } from '@tanstack/react-table'\n\nconst columnHelper = createColumnHelper<Person>()\n\n// v9\nimport { createColumnHelper, tableFeatures, rowSortingFeature } from '@tanstack/react-table'\n\nconst _features = tableFeatures({ rowSortingFeature })\nconst columnHelper = createColumnHelper<typeof _features, Person>()\n```\n\n### New `columns()` Helper Method\n\nv9 adds a `columns()` helper for better type inference when wrapping column arrays. In v8, `TValue` wasn't always type-safe—especially with group columns, where nested column types could be lost or widened. The `columns()` helper uses variadic tuple types to preserve each column's individual `TValue` type, so `info.getValue()` and cell renderers stay correctly typed throughout nested structures:\n\n```tsx\nconst columnHelper = createColumnHelper<typeof _features, Person>()\n\n// Wrap your columns array for better type inference\nconst columns = columnHelper.columns([\n  columnHelper.accessor('firstName', {\n    header: 'First Name',\n    cell: (info) => info.getValue(),\n  }),\n  columnHelper.accessor('lastName', {\n    id: 'lastName',\n    header: () => <span>Last Name</span>,\n    cell: (info) => <i>{info.getValue()}</i>,\n  }),\n  columnHelper.display({\n    id: 'actions',\n    header: 'Actions',\n    cell: (info) => <button>Edit</button>,\n  }),\n])\n```\n\n### Using with `createTableHook`\n\nWhen using `createTableHook`, you get a pre-bound `createAppColumnHelper` that only requires `TData`:\n\n```tsx\nconst { useAppTable, createAppColumnHelper } = createTableHook({\n  _features: tableFeatures({ rowSortingFeature }),\n  _rowModels: { /* ... */ },\n})\n\n// TFeatures is already bound — only need TData!\nconst columnHelper = createAppColumnHelper<Person>()\n```\n\n---\n\n## Rendering Changes\n\n### `flexRender` Function\n\nThe `flexRender` function still exists and works the same way:\n\n```tsx\nimport { flexRender } from '@tanstack/react-table'\n\n// Still works in v9\n{flexRender(cell.column.columnDef.cell, cell.getContext())}\n{flexRender(header.column.columnDef.header, header.getContext())}\n```\n\n### New `<table.FlexRender />` Component\n\nv9 adds a cleaner component-based approach attached to the table instance:\n\n```tsx\nconst table = useTable({ /* ... */ })\n\n// Instead of:\n{flexRender(header.column.columnDef.header, header.getContext())}\n\n// You can use:\n<table.FlexRender header={header} />\n<table.FlexRender cell={cell} />\n<table.FlexRender footer={footer} />\n```\n\nThis should be way more convenient and type-safe than the old `flexRender` function!\n\n### Standalone `<FlexRender />` Component\n\nThere's also a standalone component you can import:\n\n```tsx\nimport { FlexRender } from '@tanstack/react-table'\n\n<FlexRender header={header} />\n<FlexRender cell={cell} />\n<FlexRender footer={footer} />\n```\n\n---\n\n## The `tableOptions()` Utility\n\nThe `tableOptions()` helper provides type-safe composition of table options. It's useful for creating reusable partial configurations that can be spread into your table setup.\n\n### Basic Usage\n\n```tsx\nimport { tableOptions, tableFeatures, rowSortingFeature } from '@tanstack/react-table'\n\n// Create a reusable options object with features pre-configured\nconst baseOptions = tableOptions({\n  _features: tableFeatures({ rowSortingFeature }),\n  debugTable: process.env.NODE_ENV === 'development',\n})\n\n// Use in your table — columns, data, and other options can be added\nconst table = useTable({\n  ...baseOptions,\n  columns,\n  data,\n  _rowModels: {},\n})\n```\n\n### Composing Partial Options\n\n`tableOptions()` allows you to omit certain required fields (like `data`, `columns`, or `_features`) when creating partial configurations:\n\n```tsx\n// Partial options without data or columns\nconst featureOptions = tableOptions({\n  _features: tableFeatures({\n    rowSortingFeature,\n    columnFilteringFeature,\n  }),\n  _rowModels: {\n    sortedRowModel: createSortedRowModel(sortFns),\n    filteredRowModel: createFilteredRowModel(filterFns),\n  },\n})\n\n// Another partial without _features (inherits from spread)\nconst paginationDefaults = tableOptions({\n  _rowModels: {\n    paginatedRowModel: createPaginatedRowModel(),\n  },\n  initialState: {\n    pagination: { pageIndex: 0, pageSize: 25 },\n  },\n})\n\n// Combine them\nconst table = useTable({\n  ...featureOptions,\n  ...paginationDefaults,\n  columns,\n  data,\n})\n```\n\n### Using with `createTableHook`\n\n`tableOptions()` pairs well with `createTableHook` for building composable table factories:\n\n```tsx\nconst sharedOptions = tableOptions({\n  _features: tableFeatures({ rowSortingFeature, rowPaginationFeature }),\n  _rowModels: {\n    sortedRowModel: createSortedRowModel(sortFns),\n    paginatedRowModel: createPaginatedRowModel(),\n  },\n})\n\nconst { useAppTable } = createTableHook(sharedOptions)\n```\n\n---\n\n## `createTableHook`: Composable Table Patterns\n\n**This is an advanced, optional feature.** You don't need to use `createTableHook`—`useTable` is sufficient for most use cases. If you're familiar with [TanStack Form](https://tanstack.com/form)'s `createFormHook`, `createTableHook` works almost the same way: it creates a custom hook with pre-bound configuration that you can reuse across many tables.\n\nFor applications with multiple tables sharing the same configuration, `createTableHook` lets you define features, row models, and reusable components once:\n\n```tsx\n// hooks/table.ts\nimport {\n  createTableHook,\n  tableFeatures,\n  columnFilteringFeature,\n  rowSortingFeature,\n  rowPaginationFeature,\n  createFilteredRowModel,\n  createSortedRowModel,\n  createPaginatedRowModel,\n  filterFns,\n  sortFns,\n} from '@tanstack/react-table'\n\n// Import your reusable components\nimport { PaginationControls, SortIndicator, TextCell } from './components'\n\nexport const {\n  useAppTable,\n  createAppColumnHelper,\n  useTableContext,\n  useCellContext,\n  useHeaderContext,\n} = createTableHook({\n  // Features defined once\n  _features: tableFeatures({\n    columnFilteringFeature,\n    rowSortingFeature,\n    rowPaginationFeature,\n  }),\n\n  // Row models defined once\n  _rowModels: {\n    filteredRowModel: createFilteredRowModel(filterFns),\n    sortedRowModel: createSortedRowModel(sortFns),\n    paginatedRowModel: createPaginatedRowModel(),\n  },\n\n  // Default table options\n  debugTable: process.env.NODE_ENV === 'development',\n\n  // Register reusable components\n  tableComponents: { PaginationControls },\n  cellComponents: { TextCell },\n  headerComponents: { SortIndicator },\n})\n```\n\n### Using `useAppTable`\n\n```tsx\n// features/users.tsx\nimport { useAppTable, createAppColumnHelper } from './hooks/table'\n\nconst columnHelper = createAppColumnHelper<Person>()\n\nconst columns = columnHelper.columns([\n  columnHelper.accessor('firstName', {\n    header: 'First Name',\n    cell: ({ cell }) => <cell.TextCell />, // Pre-bound component!\n  }),\n])\n\nfunction UsersTable({ data }: { data: Person[] }) {\n  const table = useAppTable({\n    columns,\n    data,\n    // _features and _rowModels already configured!\n  })\n\n  return (\n    <table.AppTable>\n      <table>\n        <thead>\n          {table.getHeaderGroups().map((headerGroup) => (\n            <tr key={headerGroup.id}>\n              {headerGroup.headers.map((h) => (\n                <table.AppHeader header={h} key={h.id}>\n                  {(header) => (\n                    <th>\n                      <header.FlexRender />\n                      <header.SortIndicator />\n                    </th>\n                  )}\n                </table.AppHeader>\n              ))}\n            </tr>\n          ))}\n        </thead>\n        <tbody>\n          {table.getRowModel().rows.map((row) => (\n            <tr key={row.id}>\n              {row.getAllCells().map((c) => (\n                <table.AppCell cell={c} key={c.id}>\n                  {(cell) => (\n                    <td>\n                      <cell.FlexRender />\n                    </td>\n                  )}\n                </table.AppCell>\n              ))}\n            </tr>\n          ))}\n        </tbody>\n      </table>\n      <table.PaginationControls />\n    </table.AppTable>\n  )\n}\n```\n\n### Context Hooks for Components\n\nComponents registered via `createTableHook` can access their context:\n\n```tsx\n// components/SortIndicator.tsx\nimport { useHeaderContext } from './hooks/table'\n\nexport function SortIndicator() {\n  const header = useHeaderContext()\n  const sorted = header.column.getIsSorted()\n  \n  if (!sorted) return null\n  return sorted === 'asc' ? ' 🔼' : ' 🔽'\n}\n\n// components/TextCell.tsx\nimport { useCellContext } from './hooks/table'\n\nexport function TextCell() {\n  const cell = useCellContext()\n  return <span>{cell.getValue() as string}</span>\n}\n\n// components/PaginationControls.tsx\nimport { useTableContext } from './hooks/table'\n\nexport function PaginationControls() {\n  const table = useTableContext()\n  \n  return (\n    <table.Subscribe selector={(s) => s.pagination}>\n      {(pagination) => (\n        <div>\n          <button onClick={() => table.previousPage()}>Previous</button>\n          <span>Page {pagination.pageIndex + 1}</span>\n          <button onClick={() => table.nextPage()}>Next</button>\n        </div>\n      )}\n    </table.Subscribe>\n  )\n}\n```\n\n---\n\n## Other Breaking Changes\n\n### Column Pinning Option Split\n\nThe `enablePinning` option has been split into separate options:\n\n```tsx\n// v8\nenablePinning: true\n\n// v9\nenableColumnPinning: true\nenableRowPinning: true\n```\n\n### Removed Internal APIs\n\nAll internal APIs prefixed with `_` have been removed. If you were using any of these, use their public equivalents:\n\n- Removed: `table._getPinnedRows()`\n- Removed: `table._getFacetedRowModel()`\n- Removed: `table._getFacetedMinMaxValues()`\n- Removed: `table._getFacetedUniqueValues()`\n\n### Column Sizing vs. Column Resizing Split\n\nIn v8, column sizing and resizing were combined in a single feature. In v9, they've been split into separate features for better tree-shaking.\n\n| v8 | v9 |\n|----|-----|\n| `ColumnSizing` (combined feature) | `columnSizingFeature` + `columnResizingFeature` |\n| `columnSizingInfo` state | `columnResizing` state |\n| `setColumnSizingInfo()` | `setColumnResizing()` |\n| `onColumnSizingInfoChange` option | `onColumnResizingChange` option |\n\nIf you only need column sizing (fixed widths) without interactive resizing, you can import just `columnSizingFeature`. If you need drag-to-resize functionality, import both:\n\n```tsx\nimport { columnSizingFeature, columnResizingFeature } from '@tanstack/react-table'\n\nconst _features = tableFeatures({\n  columnSizingFeature,\n  columnResizingFeature, // Only if you need interactive resizing\n})\n```\n\n### Sorting API Renames\n\nSorting-related APIs have been renamed for consistency:\n\n| v8 | v9 |\n|----|-----|\n| `sortingFn` (column def option) | `sortFn` |\n| `column.getSortingFn()` | `column.getSortFn()` |\n| `column.getAutoSortingFn()` | `column.getAutoSortFn()` |\n| `SortingFn` type | `SortFn` type |\n| `SortingFns` interface | `SortFns` interface |\n| `sortingFns` (built-in functions) | `sortFns` |\n\nUpdate your column definitions:\n\n```tsx\n// v8\nconst columns = [\n  {\n    accessorKey: 'name',\n    sortingFn: 'alphanumeric', // or custom function\n  },\n]\n\n// v9\nconst columns = [\n  {\n    accessorKey: 'name',\n    sortFn: 'alphanumeric', // or custom function\n  },\n]\n```\n\n### Row API Changes\n\nSome row APIs have changed from private to public:\n\n| v8 | v9 |\n|----|-----|\n| `row._getAllCellsByColumnId()` (private) | `row.getAllCellsByColumnId()` (public) |\n\nIf you were accessing this internal API, you can now use it without the underscore prefix.\n\n---\n\n## TypeScript Changes Summary\n\n### Type Generics\n\nMost types now require a `TFeatures` parameter:\n\n```tsx\n// v8\ntype Column<TData>\ntype ColumnDef<TData>\ntype Table<TData>\ntype Row<TData>\ntype Cell<TData, TValue>\n\n// v9\ntype Column<TFeatures, TData, TValue>\ntype ColumnDef<TFeatures, TData, TValue>\ntype Table<TFeatures, TData>\ntype Row<TFeatures, TData>\ntype Cell<TFeatures, TData, TValue>\n```\n\n### Using `typeof _features`\n\nThe easiest way to get the `TFeatures` type is with `typeof`:\n\n```tsx\nconst _features = tableFeatures({\n  rowSortingFeature,\n  columnFilteringFeature,\n})\n\n// Use typeof to get the type\ntype MyFeatures = typeof _features\n\nconst columns: ColumnDef<typeof _features, Person>[] = [...]\n\nfunction Filter({ column }: { column: Column<typeof _features, Person, unknown> }) {\n  // ...\n}\n```\n\n### Using `StockFeatures`\n\nIf using `stockFeatures` with `useTable`, use the `StockFeatures` type:\n\n```tsx\nimport type { StockFeatures, ColumnDef } from '@tanstack/react-table'\n\nconst columns: ColumnDef<StockFeatures, Person>[] = [...]\n```\n\n### `ColumnMeta` Generic Change\n\nIf you're using module augmentation to extend `ColumnMeta`, note that it now requires a `TFeatures` parameter:\n\n```tsx\n// v8\ndeclare module '@tanstack/react-table' {\n  interface ColumnMeta<TData, TValue> {\n    customProperty: string\n  }\n}\n\n// v9 - TFeatures is now the first parameter\ndeclare module '@tanstack/react-table' {\n  interface ColumnMeta<TFeatures, TData, TValue> {\n    customProperty: string\n  }\n}\n```\n\n### `RowData` Type Restriction\n\nThe `RowData` type is now more restrictive:\n\n```tsx\n// v8 - very permissive\ntype RowData = unknown | object | any[]\n\n// v9 - must be a record or array\ntype RowData = Record<string, any> | Array<any>\n```\n\nThis change improves type safety. If you were passing unusual data types, ensure your data conforms to `Record<string, any>` or `Array<any>`.\n\n---\n\n## Migration Checklist\n\n- [ ] Update import: `useReactTable` → `useTable`\n- [ ] Define `_features` using `tableFeatures()` (or use `stockFeatures`)\n- [ ] Migrate `get*RowModel()` options to `_rowModels`\n- [ ] Update row model factories to include `Fns` parameters where needed\n- [ ] Update TypeScript types to include `TFeatures` generic\n- [ ] Update state access: `table.getState()` → `table.store.state` or `table.state`\n- [ ] Update `createColumnHelper<TData>()` → `createColumnHelper<TFeatures, TData>()`\n- [ ] Replace `enablePinning` with `enableColumnPinning`/`enableRowPinning` if used\n- [ ] Rename `sortingFn` → `sortFn` in column definitions\n- [ ] Split column sizing/resizing: use both `columnSizingFeature` and `columnResizingFeature` if needed\n- [ ] Rename `columnSizingInfo` state → `columnResizing` (and related options)\n- [ ] Update `ColumnMeta` module augmentation to include `TFeatures` generic (if used)\n- [ ] (Optional) Add `table.Subscribe` for render optimizations\n- [ ] (Optional) Use `tableOptions()` for composable configurations\n- [ ] (Optional) Migrate to `createTableHook` for reusable table patterns\n\n---\n\n## Examples\n\nCheck out these examples to see v9 patterns in action:\n\n- [Basic useTable](../examples/basic-use-table) - Simple table with the new `useTable` hook\n- [Basic useLegacyTable](../examples/basic-use-legacy-table) - Migration example using `useLegacyTable`\n- [Basic useAppTable](../examples/basic-use-app-table) - Using `createTableHook`\n- [Filters](../examples/filters) - Filtering with the new API\n- [Sorting](../examples/sorting) - Sorting with the new API\n- [Composable Tables](../examples/composable-tables) - Advanced `createTableHook` patterns\n"
  },
  {
    "path": "docs/framework/react/guide/table-state.md",
    "content": "---\ntitle: Table State (React) Guide\n---\n\n## Examples\n\nWant to skip to the implementation? Check out these examples:\n\n- [kitchen sink](../examples/kitchen-sink)\n- [fully controlled](../examples/fully-controlled)\n\n## Table State (React) Guide\n\nTanStack Table has a simple underlying internal state management system to store and manage the state of the table. It also lets you selectively pull out any state that you need to manage in your own state management. This guide will walk you through the different ways in which you can interact with and manage the state of the table.\n\n### Accessing Table State\n\nYou do not need to set up anything special in order for the table state to work. If you pass nothing into either `state`, `initialState`, or any of the `on[State]Change` table options, the table will manage its own state internally. You can access any part of this internal state by using the `table.store.state` table instance API.\n\n```jsx\nconst table = useTable({\n  columns,\n  data,\n  //...\n})\n\nconsole.log(table.store.state) //access the entire internal state\nconsole.log(table.store.state.rowSelection) //access just the row selection state\n```\n\n### Custom Initial State\n\nIf all you need to do for certain states is customize their initial default values, you still do not need to manage any of the state yourself. You can simply set values in the `initialState` option of the table instance.\n\n```jsx\nconst table = useTable({\n  columns,\n  data,\n  initialState: {\n    columnOrder: ['age', 'firstName', 'lastName'], //customize the initial column order\n    columnVisibility: {\n      id: false //hide the id column by default\n    },\n    expanded: true, //expand all rows by default\n    sorting: [\n      {\n        id: 'age',\n        desc: true //sort by age in descending order by default\n      }\n    ]\n  },\n  //...\n})\n```\n\n> **Note**: Only specify each particular state in either `initialState` or `state`, but not both. If you pass in a particular state value to both `initialState` and `state`, the initialized state in `state` will take overwrite any corresponding value in `initialState`.\n\n### Controlled State\n\nIf you need easy access to the table state in other areas of your application, TanStack Table makes it easy to control and manage any or all of the table state in your own state management system. You can do this by passing in your own state and state management functions to the `state` and `on[State]Change` table options.\n\n#### Individual Controlled State\n\nYou can control just the state that you need easy access to. You do NOT have to control all of the table state if you do not need to. It is recommended to only control the state that you need on a case-by-case basis.\n\nIn order to control a particular state, you need to both pass in the corresponding `state` value and the `on[State]Change` function to the table instance.\n\nLet's take filtering, sorting, and pagination as an example in a \"manual\" server-side data fetching scenario. You can store the filtering, sorting, and pagination state in your own state management, but leave out any other state like column order, column visibility, etc. if your API does not care about those values.\n\n```jsx\nconst [columnFilters, setColumnFilters] = React.useState([]) //no default filters\nconst [sorting, setSorting] = React.useState([{\n  id: 'age',\n  desc: true, //sort by age in descending order by default\n}]) \nconst [pagination, setPagination] = React.useState({ pageIndex: 0, pageSize: 15 })\n\n//Use our controlled state values to fetch data\nconst tableQuery = useQuery({\n  queryKey: ['users', columnFilters, sorting, pagination],\n  queryFn: () => fetchUsers(columnFilters, sorting, pagination),\n  //...\n})\n\nconst table = useTable({\n  columns,\n  data: tableQuery.data,\n  //...\n  state: {\n    columnFilters, //pass controlled state back to the table (overrides internal state)\n    sorting,\n    pagination\n  },\n  onColumnFiltersChange: setColumnFilters, //hoist columnFilters state into our own state management\n  onSortingChange: setSorting,\n  onPaginationChange: setPagination,\n})\n//...\n```\n\n#### Fully Controlled State\n\nAlternatively, you can control the entire table state with the `onStateChange` table option. It will hoist out the entire table state into your own state management system. Be careful with this approach, as you might find that raising some frequently changing state values up a react tree, like `columnSizingInfo` state`, might cause bad performance issues.\n\nA couple of more tricks may be needed to make this work. If you use the `onStateChange` table option, the initial values of the `state` must be populated with all of the relevant state values for all of the features that you want to use. You can either manually type out all of the initial state values, or use the `table.setOptions` API in a special way as shown below.\n\n```jsx\n//create a table instance with default state values\nconst table = useTable({\n  columns,\n  data,\n  //... Note: `state` values are NOT passed in yet\n})\n\n\nconst [state, setState] = React.useState({\n  ...table.initialState, //populate the initial state with all of the default state values from the table instance\n  pagination: {\n    pageIndex: 0,\n    pageSize: 15 //optionally customize the initial pagination state.\n  }\n})\n\n//Use the table.setOptions API to merge our fully controlled state onto the table instance\ntable.setOptions(prev => ({\n  ...prev, //preserve any other options that we have set up above\n  state, //our fully controlled state overrides the internal state\n  onStateChange: setState //any state changes will be pushed up to our own state management\n}))\n```\n\n### On State Change Callbacks\n\nSo far, we have seen the `on[State]Change` and `onStateChange` table options work to \"hoist\" the table state changes into our own state management. However, there are a few things about using these options that you should be aware of.\n\n#### 1. **State Change Callbacks MUST have their corresponding state value in the `state` option**.\n\nSpecifying an `on[State]Change` callback tells the table instance that this will be a controlled state. If you do not specify the corresponding `state` value, that state will be \"frozen\" with its initial value.\n\n```jsx\nconst [sorting, setSorting] = React.useState([])\n//...\nconst table = useTable({\n  columns,\n  data,\n  //...\n  state: {\n    sorting, //required because we are using `onSortingChange`\n  },\n  onSortingChange: setSorting, //makes the `state.sorting` controlled\n})\n```\n\n#### 2. **Updaters can either be raw values or callback functions**.\n\nThe `on[State]Change` and `onStateChange` callbacks work exactly like the `setState` functions in React. The updater values can either be a new state value or a callback function that takes the previous state value and returns the new state value.\n\nWhat implications does this have? It means that if you want to add in some extra logic in any of the `on[State]Change` callbacks, you can do so, but you need to check whether or not the new incoming updater value is a function or value.\n\n```jsx\nconst [sorting, setSorting] = React.useState([])\nconst [pagination, setPagination] = React.useState({ pageIndex: 0, pageSize: 10 })\n\nconst table = useTable({\n  columns,\n  data,\n  //...\n  state: {\n    pagination,\n    sorting,\n  }\n  //syntax 1\n  onPaginationChange: (updater) => {\n    setPagination(old => {\n      const newPaginationValue = updater instanceof Function ? updater(old) : updater\n      //do something with the new pagination value\n      //...\n      return newPaginationValue\n    })\n  },\n  //syntax 2\n  onSortingChange: (updater) => {\n    const newSortingValue = updater instanceof Function ? updater(sorting) : updater\n    //do something with the new sorting value\n    //...\n    setSorting(updater) //normal state update\n  }\n})\n```\n\n### State Types\n\nAll complex states in TanStack Table have their own TypeScript types that you can import and use. This can be handy for ensuring that you are using the correct data structures and properties for the state values that you are controlling.\n\n```tsx\nimport { useTable, type SortingState } from '@tanstack/react-table'\n//...\nconst [sorting, setSorting] = React.useState<SortingState[]>([\n  {\n    id: 'age', //you should get autocomplete for the `id` and `desc` properties\n    desc: true,\n  }\n])\n```\n"
  },
  {
    "path": "docs/framework/react/guide/use-legacy-table.md",
    "content": "---\ntitle: Using useLegacyTable for Incremental Migration\n---\n\nThe `useLegacyTable` hook provides a compatibility layer that accepts the v8-style API while using v9 under the hood. This is useful for teams that need to migrate incrementally or have large codebases where a full migration isn't immediately practical.\n\n> **Warning:** `useLegacyTable` is **deprecated** and intended only as a temporary migration aid. It includes all features by default, resulting in a larger bundle size compared to the tree-shakeable v9 API. Plan to migrate to `useTable` for better performance and smaller bundles.\n\n## When to Use `useLegacyTable`\n\n- You have an existing v8 codebase and need to upgrade dependencies\n- You want to migrate incrementally, one table at a time\n- You need v9 compatibility but don't have time for a full migration yet\n\n## Basic Usage\n\n```tsx\nimport { useState } from 'react'\nimport { flexRender } from '@tanstack/react-table'\nimport {\n  getCoreRowModel,\n  getFilteredRowModel,\n  getPaginationRowModel,\n  getSortedRowModel,\n  legacyCreateColumnHelper,\n  useLegacyTable,\n} from '@tanstack/react-table/legacy'\nimport type {\n  ColumnFiltersState,\n  PaginationState,\n  SortingState,\n} from '@tanstack/react-table'\nimport type {\n  LegacyColumn,\n  LegacyColumnDef,\n  LegacyRow,\n} from '@tanstack/react-table/legacy'\n\ninterface Person {\n  name: string\n  email: string\n  age: number\n}\n\nconst columnHelper = legacyCreateColumnHelper<Person>()\n\nconst columns: LegacyColumnDef<Person>[] = [\n  columnHelper.accessor('name', { header: 'Name' }),\n  columnHelper.accessor('email', { header: 'Email' }),\n  columnHelper.accessor('age', { header: 'Age' }),\n  columnHelper.display({ id: 'actions', header: 'Actions' }),\n]\n\nfunction MyTable({ data }: { data: Person[] }) {\n  const [sorting, setSorting] = useState<SortingState>([])\n  const [columnFilters, setColumnFilters] = useState<ColumnFiltersState>([])\n  const [pagination, setPagination] = useState<PaginationState>({\n    pageIndex: 0,\n    pageSize: 10,\n  })\n\n  // useLegacyTable accepts the v8-style API\n  const table = useLegacyTable({\n    columns,\n    data,\n    getCoreRowModel: getCoreRowModel(),\n    getFilteredRowModel: getFilteredRowModel(),\n    getSortedRowModel: getSortedRowModel(),\n    getPaginationRowModel: getPaginationRowModel(),\n    state: { sorting, columnFilters, pagination },\n    onSortingChange: setSorting,\n    onColumnFiltersChange: setColumnFilters,\n    onPaginationChange: setPagination,\n  })\n\n  return (\n    <table>\n      <thead>\n        {table.getHeaderGroups().map((headerGroup) => (\n          <tr key={headerGroup.id}>\n            {headerGroup.headers.map((header) => (\n              <th key={header.id}>\n                {flexRender(\n                  header.column.columnDef.header,\n                  header.getContext()\n                )}\n                {header.column.getCanFilter() ? (\n                  <Filter column={header.column} />\n                ) : null}\n              </th>\n            ))}\n          </tr>\n        ))}\n      </thead>\n      <tbody>\n        {table.getRowModel().rows.map((row) => (\n          <tr key={row.id}>\n            {row.getAllCells().map((cell) => (\n              <td key={cell.id}>\n                {cell.column.id === 'actions' ? (\n                  <RowActions row={row} />\n                ) : (\n                  flexRender(cell.column.columnDef.cell, cell.getContext())\n                )}\n              </td>\n            ))}\n          </tr>\n        ))}\n      </tbody>\n    </table>\n  )\n}\n\nfunction Filter({ column }: { column: LegacyColumn<Person> }) {\n  return (\n    <input\n      value={(column.getFilterValue() as string) ?? ''}\n      onChange={(e) => column.setFilterValue(e.target.value)}\n      placeholder=\"Filter...\"\n    />\n  )\n}\n\nfunction RowActions({ row }: { row: LegacyRow<Person> }) {\n  return <button onClick={() => console.log(row.original)}>Edit</button>\n}\n```\n\n## Type Helpers\n\nWhen using `useLegacyTable`, use these type helpers for proper TypeScript support:\n\n| Type | Description |\n|------|-------------|\n| `LegacyColumnDef<TData>` | Column definition type (equivalent to v8's `ColumnDef<TData>`) |\n| `LegacyColumn<TData>` | Column instance type |\n| `LegacyRow<TData>` | Row instance type |\n| `LegacyCell<TData>` | Cell instance type |\n| `LegacyTable<TData>` | Table instance type |\n| `legacyCreateColumnHelper<TData>()` | Column helper with StockFeatures pre-bound—only requires TData |\n\n### Using `legacyCreateColumnHelper`\n\nUse `legacyCreateColumnHelper` instead of `createColumnHelper`—it has StockFeatures pre-bound, so you only need to specify `TData`:\n\n```tsx\nimport { legacyCreateColumnHelper } from '@tanstack/react-table/legacy'\nimport type { LegacyColumnDef } from '@tanstack/react-table/legacy'\n\nconst columnHelper = legacyCreateColumnHelper<Person>()\n\nconst columns: LegacyColumnDef<Person>[] = [\n  columnHelper.accessor('name', { header: 'Name' }),\n  // ...\n]\n```\n\n## API Differences from v8\n\nWhile `useLegacyTable` aims for v8 compatibility, there are a few differences:\n\n### Row Model Functions\n\nThe `get*RowModel()` functions are imported from `@tanstack/react-table/legacy`:\n\n```tsx\nimport {\n  getCoreRowModel,\n  getFilteredRowModel,\n  getSortedRowModel,\n  getPaginationRowModel,\n  getExpandedRowModel,\n  getGroupedRowModel,\n  getFacetedRowModel,\n  getFacetedMinMaxValues,\n  getFacetedUniqueValues,\n} from '@tanstack/react-table/legacy'\n```\n\n### Sorting Function Renames\n\nNote that in v9, sorting-related APIs have been renamed. If you're using custom sorting functions in column definitions:\n\n| v8 | v9 |\n|----|-----|\n| `sortingFn` | `sortFn` |\n\nThe legacy table adapter handles this internally for built-in sorting, but if you're defining custom sorting functions, be aware of the rename.\n\n## Caveats and Limitations\n\n### Bundle Size\n\n`useLegacyTable` includes **all features** by default, similar to v8. This means:\n\n- No tree-shaking benefits\n- Bundle size is **much larger** than v8—each feature has grown since v8, and you pay for all of them\n- The tree-shakeable v9 API exists so TanStack Table can add features over time without bloating everyone's bundles; only users who opt into a feature pay for it\n- If bundle size is a concern, prioritize migrating to the full v9 API\n\n### Deprecation\n\n`useLegacyTable` is deprecated and will be removed in a future major version. It exists solely to ease migration. Plan your migration timeline accordingly.\n\n### No `table.Subscribe`\n\nThe fine-grained reactivity feature (`table.Subscribe`) is not available with `useLegacyTable`. The table re-renders on every state change, like v8.\n\n### No `createTableHook` Integration\n\n`useLegacyTable` cannot be used with `createTableHook`. If you want to create reusable table configurations, migrate to the full v9 API.\n\n## Migration Path\n\nOnce you're ready to migrate to the full v9 API:\n\n1. Replace `useLegacyTable` with `useTable`\n2. Define your `_features` using `tableFeatures()`\n3. Convert `get*RowModel()` options to `_rowModels`\n4. Update types from `Legacy*` to the standard v9 types\n\nSee the [main migration guide](./migrating.md) for complete instructions.\n\n## Example\n\nSee the [Basic useLegacyTable example](../examples/basic-use-legacy-table) for a working implementation.\n"
  },
  {
    "path": "docs/framework/react/react-table.md",
    "content": "---\ntitle: React Table\n---\n\nThe `@tanstack/react-table` adapter is a wrapper around the core table logic. Most of its job is related to managing state the \"react\" way, providing types and the rendering implementation of cell/header/footer templates.\n\n## `useTable`\n\nTakes an `options` object and returns a table.\n\n```tsx\nimport { useTable } from '@tanstack/react-table'\n\nfunction App() {\n  const table = useTable(options)\n\n  // ...render your table\n}\n```\n"
  },
  {
    "path": "docs/framework/react/reference/index/functions/FlexRender-1.md",
    "content": "---\nid: FlexRender\ntitle: FlexRender\n---\n\n# Function: FlexRender()\n\n```ts\nfunction FlexRender<TFeatures, TData, TValue>(props): \n  | string\n  | number\n  | bigint\n  | boolean\n  | Iterable<ReactNode, any, any>\n  | Promise<AwaitedReactNode>\n  | Element\n  | null\n  | undefined;\n```\n\nDefined in: [FlexRender.tsx:97](https://github.com/TanStack/table/blob/main/packages/react-table/src/FlexRender.tsx#L97)\n\nSimplified component wrapper of `flexRender`. Use this utility component to render headers, cells, or footers with custom markup.\nOnly one prop (`cell`, `header`, or `footer`) may be passed.\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* `TableFeatures`\n\n### TData\n\n`TData` *extends* `RowData`\n\n### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n## Parameters\n\n### props\n\n[`FlexRenderProps`](../type-aliases/FlexRenderProps.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n## Returns\n\n  \\| `string`\n  \\| `number`\n  \\| `bigint`\n  \\| `boolean`\n  \\| `Iterable`\\<`ReactNode`, `any`, `any`\\>\n  \\| `Promise`\\<`AwaitedReactNode`\\>\n  \\| `Element`\n  \\| `null`\n  \\| `undefined`\n\n## Example\n\n```tsx\n<FlexRender cell={cell} />\n<FlexRender header={header} />\n<FlexRender footer={footer} />\n```\n\nThis replaces calling `flexRender` directly like this:\n```tsx\nflexRender(cell.column.columnDef.cell, cell.getContext())\nflexRender(header.column.columnDef.header, header.getContext())\nflexRender(footer.column.columnDef.footer, footer.getContext())\n```\n"
  },
  {
    "path": "docs/framework/react/reference/index/functions/Subscribe.md",
    "content": "---\nid: Subscribe\ntitle: Subscribe\n---\n\n# Function: Subscribe()\n\n```ts\nfunction Subscribe<TFeatures, TData, TSelected>(props): ReactNode | Promise<ReactNode>;\n```\n\nDefined in: [Subscribe.ts:58](https://github.com/TanStack/table/blob/main/packages/react-table/src/Subscribe.ts#L58)\n\nA React component that allows you to subscribe to the table state.\n\nThis is useful for opting into state re-renders for specific parts of the table state.\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* `TableFeatures`\n\n### TData\n\n`TData` *extends* `RowData`\n\n### TSelected\n\n`TSelected` = \\{\n\\}\n\n## Parameters\n\n### props\n\n[`SubscribeProps`](../type-aliases/SubscribeProps.md)\\<`TFeatures`, `TData`, `TSelected`\\>\n\n## Returns\n\n`ReactNode` \\| `Promise`\\<`ReactNode`\\>\n\n## Examples\n\n```tsx\n// As a standalone component\n<Subscribe table={table} selector={(state) => ({ rowSelection: state.rowSelection })}>\n  {({ rowSelection }) => (\n    <div>Selected rows: {Object.keys(rowSelection).length}</div>\n  )}\n</Subscribe>\n```\n\n```tsx\n// As table.Subscribe (table instance method)\n<table.Subscribe selector={(state) => ({ rowSelection: state.rowSelection })}>\n  {({ rowSelection }) => (\n    <div>Selected rows: {Object.keys(rowSelection).length}</div>\n  )}\n</table.Subscribe>\n```\n"
  },
  {
    "path": "docs/framework/react/reference/index/functions/createTableHook.md",
    "content": "---\nid: createTableHook\ntitle: createTableHook\n---\n\n# Function: createTableHook()\n\n```ts\nfunction createTableHook<TFeatures, TTableComponents, TCellComponents, THeaderComponents>(__namedParameters): object;\n```\n\nDefined in: [createTableHook.tsx:590](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L590)\n\nCreates a custom table hook with pre-bound components for composition.\n\nThis is the table equivalent of TanStack Form's `createFormHook`. It allows you to:\n- Define features, row models, and default options once, shared across all tables\n- Register reusable table, cell, and header components\n- Access table/cell/header instances via context in those components\n- Get a `useAppTable` hook that returns an extended table with App wrapper components\n- Get a `createAppColumnHelper` function pre-bound to your features\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* `TableFeatures`\n\n### TTableComponents\n\n`TTableComponents` *extends* `Record`\\<`string`, `ComponentType`\\<`any`\\>\\>\n\n### TCellComponents\n\n`TCellComponents` *extends* `Record`\\<`string`, `ComponentType`\\<`any`\\>\\>\n\n### THeaderComponents\n\n`THeaderComponents` *extends* `Record`\\<`string`, `ComponentType`\\<`any`\\>\\>\n\n## Parameters\n\n### \\_\\_namedParameters\n\n[`CreateTableHookOptions`](../type-aliases/CreateTableHookOptions.md)\\<`TFeatures`, `TTableComponents`, `TCellComponents`, `THeaderComponents`\\>\n\n## Returns\n\n### appFeatures\n\n```ts\nappFeatures: TFeatures;\n```\n\n### createAppColumnHelper()\n\n```ts\ncreateAppColumnHelper: <TData>() => AppColumnHelper<TFeatures, TData, TCellComponents, THeaderComponents>;\n```\n\nCreate a column helper pre-bound to the features and components configured in this table hook.\nThe cell, header, and footer contexts include pre-bound components (e.g., `cell.TextCell`).\n\n#### Type Parameters\n\n##### TData\n\n`TData` *extends* `RowData`\n\n#### Returns\n\n[`AppColumnHelper`](../type-aliases/AppColumnHelper.md)\\<`TFeatures`, `TData`, `TCellComponents`, `THeaderComponents`\\>\n\n#### Example\n\n```tsx\nconst columnHelper = createAppColumnHelper<Person>()\n\nconst columns = [\n  columnHelper.accessor('firstName', {\n    header: 'First Name',\n    cell: ({ cell }) => <cell.TextCell />, // cell has pre-bound components!\n  }),\n  columnHelper.accessor('age', {\n    header: 'Age',\n    cell: ({ cell }) => <cell.NumberCell />,\n  }),\n]\n```\n\n### useAppTable()\n\n```ts\nuseAppTable: <TData, TSelected>(tableOptions, selector?) => AppReactTable<TFeatures, TData, TSelected, TTableComponents, TCellComponents, THeaderComponents>;\n```\n\nEnhanced useTable hook that returns a table with App wrapper components\nand pre-bound tableComponents attached directly to the table object.\n\nDefault options from createTableHook are automatically merged with\nthe options passed here. Options passed here take precedence.\n\nTFeatures is already known from the createTableHook call; TData is inferred from the data prop.\n\n#### Type Parameters\n\n##### TData\n\n`TData` *extends* `RowData`\n\n##### TSelected\n\n`TSelected` = \\{\n\\}\n\n#### Parameters\n\n##### tableOptions\n\n`Omit`\\<`TableOptions`\\<`TFeatures`, `TData`\\>, `\"_features\"` \\| `\"_rowModels\"`\\>\n\n##### selector?\n\n(`state`) => `TSelected`\n\n#### Returns\n\n[`AppReactTable`](../type-aliases/AppReactTable.md)\\<`TFeatures`, `TData`, `TSelected`, `TTableComponents`, `TCellComponents`, `THeaderComponents`\\>\n\n### useCellContext()\n\n```ts\nuseCellContext: <TValue>() => Cell<TFeatures, any, TValue>;\n```\n\nAccess the cell instance from within an `AppCell` wrapper.\nUse this in custom `cellComponents` passed to `createTableHook`.\nTFeatures is already known from the createTableHook call.\n\n#### Type Parameters\n\n##### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n#### Returns\n\n`Cell`\\<`TFeatures`, `any`, `TValue`\\>\n\n#### Example\n\n```tsx\nfunction TextCell() {\n  const cell = useCellContext<string>()\n  return <span>{cell.getValue()}</span>\n}\n\nfunction NumberCell({ format }: { format?: Intl.NumberFormatOptions }) {\n  const cell = useCellContext<number>()\n  return <span>{cell.getValue().toLocaleString(undefined, format)}</span>\n}\n```\n\n### useHeaderContext()\n\n```ts\nuseHeaderContext: <TValue>() => Header<TFeatures, any, TValue>;\n```\n\nAccess the header instance from within an `AppHeader` or `AppFooter` wrapper.\nUse this in custom `headerComponents` passed to `createTableHook`.\nTFeatures is already known from the createTableHook call.\n\n#### Type Parameters\n\n##### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n#### Returns\n\n`Header`\\<`TFeatures`, `any`, `TValue`\\>\n\n#### Example\n\n```tsx\nfunction SortIndicator() {\n  const header = useHeaderContext()\n  const sorted = header.column.getIsSorted()\n  return sorted === 'asc' ? '🔼' : sorted === 'desc' ? '🔽' : null\n}\n\nfunction ColumnFilter() {\n  const header = useHeaderContext()\n  if (!header.column.getCanFilter()) return null\n  return (\n    <input\n      value={(header.column.getFilterValue() ?? '') as string}\n      onChange={(e) => header.column.setFilterValue(e.target.value)}\n      placeholder=\"Filter...\"\n    />\n  )\n}\n```\n\n### useTableContext()\n\n```ts\nuseTableContext: <TData>() => ReactTable<TFeatures, TData>;\n```\n\nAccess the table instance from within an `AppTable` wrapper.\nUse this in custom `tableComponents` passed to `createTableHook`.\nTFeatures is already known from the createTableHook call.\n\n#### Type Parameters\n\n##### TData\n\n`TData` *extends* `RowData` = `RowData`\n\n#### Returns\n\n[`ReactTable`](../type-aliases/ReactTable.md)\\<`TFeatures`, `TData`\\>\n\n#### Example\n\n```tsx\nfunction PaginationControls() {\n  const table = useTableContext()\n  return (\n    <table.Subscribe selector={(s) => s.pagination}>\n      {(pagination) => (\n        <div>\n          <button onClick={() => table.previousPage()}>Prev</button>\n          <span>Page {pagination.pageIndex + 1}</span>\n          <button onClick={() => table.nextPage()}>Next</button>\n        </div>\n      )}\n    </table.Subscribe>\n  )\n}\n```\n\n## Example\n\n```tsx\n// hooks/table.ts\nexport const {\n  useAppTable,\n  createAppColumnHelper,\n  useTableContext,\n  useCellContext,\n  useHeaderContext,\n} = createTableHook({\n  _features: tableFeatures({\n    rowPaginationFeature,\n    rowSortingFeature,\n    columnFilteringFeature,\n  }),\n  _rowModels: {\n    paginatedRowModel: createPaginatedRowModel(),\n    sortedRowModel: createSortedRowModel(sortFns),\n    filteredRowModel: createFilteredRowModel(filterFns),\n  },\n  tableComponents: { PaginationControls, RowCount },\n  cellComponents: { TextCell, NumberCell },\n  headerComponents: { SortIndicator, ColumnFilter },\n})\n\n// Create column helper with TFeatures already bound\nconst columnHelper = createAppColumnHelper<Person>()\n\n// components/table-components.tsx\nfunction PaginationControls() {\n  const table = useTableContext() // TFeatures already known!\n  return <table.Subscribe selector={(s) => s.pagination}>...</table.Subscribe>\n}\n\n// features/users.tsx\nfunction UsersTable({ data }: { data: Person[] }) {\n  const table = useAppTable({\n    columns,\n    data, // TData inferred from Person[]\n  })\n\n  return (\n    <table.AppTable>\n      <table>\n        <thead>\n          {table.getHeaderGroups().map(headerGroup => (\n            <tr key={headerGroup.id}>\n              {headerGroup.headers.map(h => (\n                <table.AppHeader header={h} key={h.id}>\n                  {(header) => (\n                    <th>\n                      <table.FlexRender header={h} />\n                      <header.SortIndicator />\n                    </th>\n                  )}\n                </table.AppHeader>\n              ))}\n            </tr>\n          ))}\n        </thead>\n        <tbody>\n          {table.getRowModel().rows.map(row => (\n            <tr key={row.id}>\n              {row.getAllCells().map(c => (\n                <table.AppCell cell={c} key={c.id}>\n                  {(cell) => <td><cell.TextCell /></td>}\n                </table.AppCell>\n              ))}\n            </tr>\n          ))}\n        </tbody>\n      </table>\n      <table.PaginationControls />\n    </table.AppTable>\n  )\n}\n```\n"
  },
  {
    "path": "docs/framework/react/reference/index/functions/flexRender.md",
    "content": "---\nid: flexRender\ntitle: flexRender\n---\n\n# Function: flexRender()\n\n```ts\nfunction flexRender<TProps>(Comp, props): ReactNode | Element;\n```\n\nDefined in: [FlexRender.tsx:45](https://github.com/TanStack/table/blob/main/packages/react-table/src/FlexRender.tsx#L45)\n\nIf rendering headers, cells, or footers with custom markup, use flexRender instead of `cell.getValue()` or `cell.renderValue()`.\n\n## Type Parameters\n\n### TProps\n\n`TProps` *extends* `object`\n\n## Parameters\n\n### Comp\n\n[`Renderable`](../type-aliases/Renderable.md)\\<`TProps`\\>\n\n### props\n\n`TProps`\n\n## Returns\n\n`ReactNode` \\| `Element`\n\n## Example\n\n```ts\nflexRender(cell.column.columnDef.cell, cell.getContext())\n```\n"
  },
  {
    "path": "docs/framework/react/reference/index/functions/useTable.md",
    "content": "---\nid: useTable\ntitle: useTable\n---\n\n# Function: useTable()\n\n```ts\nfunction useTable<TFeatures, TData, TSelected>(tableOptions, selector): ReactTable<TFeatures, TData, TSelected>;\n```\n\nDefined in: [useTable.ts:78](https://github.com/TanStack/table/blob/main/packages/react-table/src/useTable.ts#L78)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* `TableFeatures`\n\n### TData\n\n`TData` *extends* `RowData`\n\n### TSelected\n\n`TSelected` = \\{\n\\}\n\n## Parameters\n\n### tableOptions\n\n`TableOptions`\\<`TFeatures`, `TData`\\>\n\n### selector\n\n(`state`) => `TSelected`\n\n## Returns\n\n[`ReactTable`](../type-aliases/ReactTable.md)\\<`TFeatures`, `TData`, `TSelected`\\>\n"
  },
  {
    "path": "docs/framework/react/reference/index/index.md",
    "content": "---\nid: index\ntitle: index\n---\n\n# index\n\n## Interfaces\n\n- [AppCellComponent](interfaces/AppCellComponent.md)\n- [AppCellPropsWithoutSelector](interfaces/AppCellPropsWithoutSelector.md)\n- [AppCellPropsWithSelector](interfaces/AppCellPropsWithSelector.md)\n- [AppHeaderComponent](interfaces/AppHeaderComponent.md)\n- [AppHeaderPropsWithoutSelector](interfaces/AppHeaderPropsWithoutSelector.md)\n- [AppHeaderPropsWithSelector](interfaces/AppHeaderPropsWithSelector.md)\n- [AppTableComponent](interfaces/AppTableComponent.md)\n- [AppTablePropsWithoutSelector](interfaces/AppTablePropsWithoutSelector.md)\n- [AppTablePropsWithSelector](interfaces/AppTablePropsWithSelector.md)\n\n## Type Aliases\n\n- [AppCellContext](type-aliases/AppCellContext.md)\n- [AppColumnHelper](type-aliases/AppColumnHelper.md)\n- [AppHeaderContext](type-aliases/AppHeaderContext.md)\n- [AppReactTable](type-aliases/AppReactTable.md)\n- [CreateTableHookOptions](type-aliases/CreateTableHookOptions.md)\n- [FlexRenderProps](type-aliases/FlexRenderProps.md)\n- [ReactTable](type-aliases/ReactTable.md)\n- [Renderable](type-aliases/Renderable.md)\n- [SubscribeProps](type-aliases/SubscribeProps.md)\n\n## Functions\n\n- [createTableHook](functions/createTableHook.md)\n- [flexRender](functions/flexRender.md)\n- [FlexRender](functions/FlexRender-1.md)\n- [Subscribe](functions/Subscribe.md)\n- [useTable](functions/useTable.md)\n"
  },
  {
    "path": "docs/framework/react/reference/index/interfaces/AppCellComponent.md",
    "content": "---\nid: AppCellComponent\ntitle: AppCellComponent\n---\n\n# Interface: AppCellComponent()\\<TFeatures, TData, TCellComponents\\>\n\nDefined in: [createTableHook.tsx:368](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L368)\n\nComponent type for AppCell - wraps a cell and provides cell context with optional Subscribe\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* `TableFeatures`\n\n### TData\n\n`TData` *extends* `RowData`\n\n### TCellComponents\n\n`TCellComponents` *extends* `Record`\\<`string`, `ComponentType`\\<`any`\\>\\>\n\n## Call Signature\n\n```ts\nAppCellComponent<TValue>(props): ReactNode;\n```\n\nDefined in: [createTableHook.tsx:373](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L373)\n\nComponent type for AppCell - wraps a cell and provides cell context with optional Subscribe\n\n### Type Parameters\n\n#### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n### Parameters\n\n#### props\n\n[`AppCellPropsWithoutSelector`](AppCellPropsWithoutSelector.md)\\<`TFeatures`, `TData`, `TValue`, `TCellComponents`\\>\n\n### Returns\n\n`ReactNode`\n\n## Call Signature\n\n```ts\nAppCellComponent<TValue, TSelected>(props): ReactNode;\n```\n\nDefined in: [createTableHook.tsx:381](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L381)\n\nComponent type for AppCell - wraps a cell and provides cell context with optional Subscribe\n\n### Type Parameters\n\n#### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n#### TSelected\n\n`TSelected` = `unknown`\n\n### Parameters\n\n#### props\n\n[`AppCellPropsWithSelector`](AppCellPropsWithSelector.md)\\<`TFeatures`, `TData`, `TValue`, `TCellComponents`, `TSelected`\\>\n\n### Returns\n\n`ReactNode`\n"
  },
  {
    "path": "docs/framework/react/reference/index/interfaces/AppCellPropsWithSelector.md",
    "content": "---\nid: AppCellPropsWithSelector\ntitle: AppCellPropsWithSelector\n---\n\n# Interface: AppCellPropsWithSelector\\<TFeatures, TData, TValue, TCellComponents, TSelected\\>\n\nDefined in: [createTableHook.tsx:313](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L313)\n\nProps for AppCell component - with selector\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* `TableFeatures`\n\n### TData\n\n`TData` *extends* `RowData`\n\n### TValue\n\n`TValue` *extends* `CellData`\n\n### TCellComponents\n\n`TCellComponents` *extends* `Record`\\<`string`, `ComponentType`\\<`any`\\>\\>\n\n### TSelected\n\n`TSelected`\n\n## Properties\n\n### cell\n\n```ts\ncell: Cell<TFeatures, TData, TValue>;\n```\n\nDefined in: [createTableHook.tsx:320](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L320)\n\n***\n\n### children()\n\n```ts\nchildren: (cell, state) => ReactNode;\n```\n\nDefined in: [createTableHook.tsx:321](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L321)\n\n#### Parameters\n\n##### cell\n\n`Cell_Cell`\\<`TFeatures`, `TData`, `TValue`\\> & `UnionToIntersection`\\<`\"columnGroupingFeature\"` *extends* keyof `TFeatures` ? `Cell_ColumnGrouping` : `never`\\> & `UnionToIntersection`\\<\\{ \\[K in string \\| number \\| symbol\\]: TFeatures\\[K\\] extends TableFeature\\<FeatureConstructorOptions\\> ? \"Cell\" extends keyof FeatureConstructorOptions ? FeatureConstructorOptions\\[keyof FeatureConstructorOptions & \"Cell\"\\] : never : any \\}\\[keyof `TFeatures`\\]\\> & `Cell_Plugins`\\<`TFeatures`, `TData`, `TValue`\\> & `TCellComponents` & `object`\n\n##### state\n\n`TSelected`\n\n#### Returns\n\n`ReactNode`\n\n***\n\n### selector()\n\n```ts\nselector: (state) => TSelected;\n```\n\nDefined in: [createTableHook.tsx:326](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L326)\n\n#### Parameters\n\n##### state\n\n`TableState`\\<`TFeatures`\\>\n\n#### Returns\n\n`TSelected`\n"
  },
  {
    "path": "docs/framework/react/reference/index/interfaces/AppCellPropsWithoutSelector.md",
    "content": "---\nid: AppCellPropsWithoutSelector\ntitle: AppCellPropsWithoutSelector\n---\n\n# Interface: AppCellPropsWithoutSelector\\<TFeatures, TData, TValue, TCellComponents\\>\n\nDefined in: [createTableHook.tsx:296](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L296)\n\nProps for AppCell component - without selector\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* `TableFeatures`\n\n### TData\n\n`TData` *extends* `RowData`\n\n### TValue\n\n`TValue` *extends* `CellData`\n\n### TCellComponents\n\n`TCellComponents` *extends* `Record`\\<`string`, `ComponentType`\\<`any`\\>\\>\n\n## Properties\n\n### cell\n\n```ts\ncell: Cell<TFeatures, TData, TValue>;\n```\n\nDefined in: [createTableHook.tsx:302](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L302)\n\n***\n\n### children()\n\n```ts\nchildren: (cell) => ReactNode;\n```\n\nDefined in: [createTableHook.tsx:303](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L303)\n\n#### Parameters\n\n##### cell\n\n`Cell_Cell`\\<`TFeatures`, `TData`, `TValue`\\> & `UnionToIntersection`\\<`\"columnGroupingFeature\"` *extends* keyof `TFeatures` ? `Cell_ColumnGrouping` : `never`\\> & `UnionToIntersection`\\<\\{ \\[K in string \\| number \\| symbol\\]: TFeatures\\[K\\] extends TableFeature\\<FeatureConstructorOptions\\> ? \"Cell\" extends keyof FeatureConstructorOptions ? FeatureConstructorOptions\\[keyof FeatureConstructorOptions & \"Cell\"\\] : never : any \\}\\[keyof `TFeatures`\\]\\> & `Cell_Plugins`\\<`TFeatures`, `TData`, `TValue`\\> & `TCellComponents` & `object`\n\n#### Returns\n\n`ReactNode`\n\n***\n\n### selector?\n\n```ts\noptional selector: undefined;\n```\n\nDefined in: [createTableHook.tsx:307](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L307)\n"
  },
  {
    "path": "docs/framework/react/reference/index/interfaces/AppHeaderComponent.md",
    "content": "---\nid: AppHeaderComponent\ntitle: AppHeaderComponent\n---\n\n# Interface: AppHeaderComponent()\\<TFeatures, TData, THeaderComponents\\>\n\nDefined in: [createTableHook.tsx:395](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L395)\n\nComponent type for AppHeader/AppFooter - wraps a header and provides header context with optional Subscribe\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* `TableFeatures`\n\n### TData\n\n`TData` *extends* `RowData`\n\n### THeaderComponents\n\n`THeaderComponents` *extends* `Record`\\<`string`, `ComponentType`\\<`any`\\>\\>\n\n## Call Signature\n\n```ts\nAppHeaderComponent<TValue>(props): ReactNode;\n```\n\nDefined in: [createTableHook.tsx:400](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L400)\n\nComponent type for AppHeader/AppFooter - wraps a header and provides header context with optional Subscribe\n\n### Type Parameters\n\n#### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n### Parameters\n\n#### props\n\n[`AppHeaderPropsWithoutSelector`](AppHeaderPropsWithoutSelector.md)\\<`TFeatures`, `TData`, `TValue`, `THeaderComponents`\\>\n\n### Returns\n\n`ReactNode`\n\n## Call Signature\n\n```ts\nAppHeaderComponent<TValue, TSelected>(props): ReactNode;\n```\n\nDefined in: [createTableHook.tsx:408](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L408)\n\nComponent type for AppHeader/AppFooter - wraps a header and provides header context with optional Subscribe\n\n### Type Parameters\n\n#### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n#### TSelected\n\n`TSelected` = `unknown`\n\n### Parameters\n\n#### props\n\n[`AppHeaderPropsWithSelector`](AppHeaderPropsWithSelector.md)\\<`TFeatures`, `TData`, `TValue`, `THeaderComponents`, `TSelected`\\>\n\n### Returns\n\n`ReactNode`\n"
  },
  {
    "path": "docs/framework/react/reference/index/interfaces/AppHeaderPropsWithSelector.md",
    "content": "---\nid: AppHeaderPropsWithSelector\ntitle: AppHeaderPropsWithSelector\n---\n\n# Interface: AppHeaderPropsWithSelector\\<TFeatures, TData, TValue, THeaderComponents, TSelected\\>\n\nDefined in: [createTableHook.tsx:349](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L349)\n\nProps for AppHeader/AppFooter component - with selector\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* `TableFeatures`\n\n### TData\n\n`TData` *extends* `RowData`\n\n### TValue\n\n`TValue` *extends* `CellData`\n\n### THeaderComponents\n\n`THeaderComponents` *extends* `Record`\\<`string`, `ComponentType`\\<`any`\\>\\>\n\n### TSelected\n\n`TSelected`\n\n## Properties\n\n### children()\n\n```ts\nchildren: (header, state) => ReactNode;\n```\n\nDefined in: [createTableHook.tsx:357](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L357)\n\n#### Parameters\n\n##### header\n\n`Header_Core`\\<`TFeatures`, `TData`, `TValue`\\> & `UnionToIntersection`\\<\n  \\| `\"columnSizingFeature\"` *extends* keyof `TFeatures` ? `Header_ColumnSizing` : `never`\n  \\| `\"columnResizingFeature\"` *extends* keyof `TFeatures` ? `Header_ColumnResizing` : `never`\\> & `UnionToIntersection`\\<\\{ \\[K in string \\| number \\| symbol\\]: TFeatures\\[K\\] extends TableFeature\\<FeatureConstructorOptions\\> ? \"Header\" extends keyof FeatureConstructorOptions ? FeatureConstructorOptions\\[keyof FeatureConstructorOptions & \"Header\"\\] : never : any \\}\\[keyof `TFeatures`\\]\\> & `Header_Plugins`\\<`TFeatures`, `TData`, `TValue`\\> & `THeaderComponents` & `object`\n\n##### state\n\n`TSelected`\n\n#### Returns\n\n`ReactNode`\n\n***\n\n### header\n\n```ts\nheader: Header<TFeatures, TData, TValue>;\n```\n\nDefined in: [createTableHook.tsx:356](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L356)\n\n***\n\n### selector()\n\n```ts\nselector: (state) => TSelected;\n```\n\nDefined in: [createTableHook.tsx:362](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L362)\n\n#### Parameters\n\n##### state\n\n`TableState`\\<`TFeatures`\\>\n\n#### Returns\n\n`TSelected`\n"
  },
  {
    "path": "docs/framework/react/reference/index/interfaces/AppHeaderPropsWithoutSelector.md",
    "content": "---\nid: AppHeaderPropsWithoutSelector\ntitle: AppHeaderPropsWithoutSelector\n---\n\n# Interface: AppHeaderPropsWithoutSelector\\<TFeatures, TData, TValue, THeaderComponents\\>\n\nDefined in: [createTableHook.tsx:332](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L332)\n\nProps for AppHeader/AppFooter component - without selector\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* `TableFeatures`\n\n### TData\n\n`TData` *extends* `RowData`\n\n### TValue\n\n`TValue` *extends* `CellData`\n\n### THeaderComponents\n\n`THeaderComponents` *extends* `Record`\\<`string`, `ComponentType`\\<`any`\\>\\>\n\n## Properties\n\n### children()\n\n```ts\nchildren: (header) => ReactNode;\n```\n\nDefined in: [createTableHook.tsx:339](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L339)\n\n#### Parameters\n\n##### header\n\n`Header_Core`\\<`TFeatures`, `TData`, `TValue`\\> & `UnionToIntersection`\\<\n  \\| `\"columnSizingFeature\"` *extends* keyof `TFeatures` ? `Header_ColumnSizing` : `never`\n  \\| `\"columnResizingFeature\"` *extends* keyof `TFeatures` ? `Header_ColumnResizing` : `never`\\> & `UnionToIntersection`\\<\\{ \\[K in string \\| number \\| symbol\\]: TFeatures\\[K\\] extends TableFeature\\<FeatureConstructorOptions\\> ? \"Header\" extends keyof FeatureConstructorOptions ? FeatureConstructorOptions\\[keyof FeatureConstructorOptions & \"Header\"\\] : never : any \\}\\[keyof `TFeatures`\\]\\> & `Header_Plugins`\\<`TFeatures`, `TData`, `TValue`\\> & `THeaderComponents` & `object`\n\n#### Returns\n\n`ReactNode`\n\n***\n\n### header\n\n```ts\nheader: Header<TFeatures, TData, TValue>;\n```\n\nDefined in: [createTableHook.tsx:338](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L338)\n\n***\n\n### selector?\n\n```ts\noptional selector: undefined;\n```\n\nDefined in: [createTableHook.tsx:343](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L343)\n"
  },
  {
    "path": "docs/framework/react/reference/index/interfaces/AppTableComponent.md",
    "content": "---\nid: AppTableComponent\ntitle: AppTableComponent\n---\n\n# Interface: AppTableComponent()\\<TFeatures\\>\n\nDefined in: [createTableHook.tsx:422](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L422)\n\nComponent type for AppTable - root wrapper with optional Subscribe\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* `TableFeatures`\n\n## Call Signature\n\n```ts\nAppTableComponent(props): ReactNode;\n```\n\nDefined in: [createTableHook.tsx:423](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L423)\n\nComponent type for AppTable - root wrapper with optional Subscribe\n\n### Parameters\n\n#### props\n\n[`AppTablePropsWithoutSelector`](AppTablePropsWithoutSelector.md)\n\n### Returns\n\n`ReactNode`\n\n## Call Signature\n\n```ts\nAppTableComponent<TSelected>(props): ReactNode;\n```\n\nDefined in: [createTableHook.tsx:424](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L424)\n\nComponent type for AppTable - root wrapper with optional Subscribe\n\n### Type Parameters\n\n#### TSelected\n\n`TSelected`\n\n### Parameters\n\n#### props\n\n[`AppTablePropsWithSelector`](AppTablePropsWithSelector.md)\\<`TFeatures`, `TSelected`\\>\n\n### Returns\n\n`ReactNode`\n"
  },
  {
    "path": "docs/framework/react/reference/index/interfaces/AppTablePropsWithSelector.md",
    "content": "---\nid: AppTablePropsWithSelector\ntitle: AppTablePropsWithSelector\n---\n\n# Interface: AppTablePropsWithSelector\\<TFeatures, TSelected\\>\n\nDefined in: [createTableHook.tsx:285](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L285)\n\nProps for AppTable component - with selector\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* `TableFeatures`\n\n### TSelected\n\n`TSelected`\n\n## Properties\n\n### children()\n\n```ts\nchildren: (state) => ReactNode;\n```\n\nDefined in: [createTableHook.tsx:289](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L289)\n\n#### Parameters\n\n##### state\n\n`TSelected`\n\n#### Returns\n\n`ReactNode`\n\n***\n\n### selector()\n\n```ts\nselector: (state) => TSelected;\n```\n\nDefined in: [createTableHook.tsx:290](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L290)\n\n#### Parameters\n\n##### state\n\n`TableState`\\<`TFeatures`\\>\n\n#### Returns\n\n`TSelected`\n"
  },
  {
    "path": "docs/framework/react/reference/index/interfaces/AppTablePropsWithoutSelector.md",
    "content": "---\nid: AppTablePropsWithoutSelector\ntitle: AppTablePropsWithoutSelector\n---\n\n# Interface: AppTablePropsWithoutSelector\n\nDefined in: [createTableHook.tsx:277](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L277)\n\nProps for AppTable component - without selector\n\n## Properties\n\n### children\n\n```ts\nchildren: ReactNode;\n```\n\nDefined in: [createTableHook.tsx:278](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L278)\n\n***\n\n### selector?\n\n```ts\noptional selector: undefined;\n```\n\nDefined in: [createTableHook.tsx:279](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L279)\n"
  },
  {
    "path": "docs/framework/react/reference/index/type-aliases/AppCellContext.md",
    "content": "---\nid: AppCellContext\ntitle: AppCellContext\n---\n\n# Type Alias: AppCellContext\\<TFeatures, TData, TValue, TCellComponents\\>\n\n```ts\ntype AppCellContext<TFeatures, TData, TValue, TCellComponents> = object;\n```\n\nDefined in: [createTableHook.tsx:41](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L41)\n\nEnhanced CellContext with pre-bound cell components.\nThe `cell` property includes the registered cellComponents.\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* `TableFeatures`\n\n### TData\n\n`TData` *extends* `RowData`\n\n### TValue\n\n`TValue` *extends* `CellData`\n\n### TCellComponents\n\n`TCellComponents` *extends* `Record`\\<`string`, `ComponentType`\\<`any`\\>\\>\n\n## Properties\n\n### cell\n\n```ts\ncell: Cell<TFeatures, TData, TValue> & TCellComponents & object;\n```\n\nDefined in: [createTableHook.tsx:47](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L47)\n\n#### Type Declaration\n\n##### FlexRender()\n\n```ts\nFlexRender: () => ReactNode;\n```\n\n###### Returns\n\n`ReactNode`\n\n***\n\n### column\n\n```ts\ncolumn: Column<TFeatures, TData, TValue>;\n```\n\nDefined in: [createTableHook.tsx:49](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L49)\n\n***\n\n### getValue\n\n```ts\ngetValue: CellContext<TFeatures, TData, TValue>[\"getValue\"];\n```\n\nDefined in: [createTableHook.tsx:50](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L50)\n\n***\n\n### renderValue\n\n```ts\nrenderValue: CellContext<TFeatures, TData, TValue>[\"renderValue\"];\n```\n\nDefined in: [createTableHook.tsx:51](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L51)\n\n***\n\n### row\n\n```ts\nrow: Row<TFeatures, TData>;\n```\n\nDefined in: [createTableHook.tsx:52](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L52)\n\n***\n\n### table\n\n```ts\ntable: Table<TFeatures, TData>;\n```\n\nDefined in: [createTableHook.tsx:53](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L53)\n"
  },
  {
    "path": "docs/framework/react/reference/index/type-aliases/AppColumnHelper.md",
    "content": "---\nid: AppColumnHelper\ntitle: AppColumnHelper\n---\n\n# Type Alias: AppColumnHelper\\<TFeatures, TData, TCellComponents, THeaderComponents\\>\n\n```ts\ntype AppColumnHelper<TFeatures, TData, TCellComponents, THeaderComponents> = object;\n```\n\nDefined in: [createTableHook.tsx:162](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L162)\n\nEnhanced column helper with pre-bound components in cell/header/footer contexts.\nThis enables TypeScript to know about the registered components when defining columns.\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* `TableFeatures`\n\n### TData\n\n`TData` *extends* `RowData`\n\n### TCellComponents\n\n`TCellComponents` *extends* `Record`\\<`string`, `ComponentType`\\<`any`\\>\\>\n\n### THeaderComponents\n\n`THeaderComponents` *extends* `Record`\\<`string`, `ComponentType`\\<`any`\\>\\>\n\n## Properties\n\n### accessor()\n\n```ts\naccessor: <TAccessor, TValue>(accessor, column) => TAccessor extends AccessorFn<TData> ? AccessorFnColumnDef<TFeatures, TData, TValue> : AccessorKeyColumnDef<TFeatures, TData, TValue>;\n```\n\nDefined in: [createTableHook.tsx:172](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L172)\n\nCreates a data column definition with an accessor key or function.\nThe cell, header, and footer contexts include pre-bound components.\n\n#### Type Parameters\n\n##### TAccessor\n\n`TAccessor` *extends* `AccessorFn`\\<`TData`\\> \\| `DeepKeys`\\<`TData`\\>\n\n##### TValue\n\n`TValue` *extends* `TAccessor` *extends* `AccessorFn`\\<`TData`, infer TReturn\\> ? `TReturn` : `TAccessor` *extends* `DeepKeys`\\<`TData`\\> ? `DeepValue`\\<`TData`, `TAccessor`\\> : `never`\n\n#### Parameters\n\n##### accessor\n\n`TAccessor`\n\n##### column\n\n`TAccessor` *extends* `AccessorFn`\\<`TData`\\> ? `AppColumnDefBase`\\<`TFeatures`, `TData`, `TValue`, `TCellComponents`, `THeaderComponents`\\> & `object` : `AppColumnDefBase`\\<`TFeatures`, `TData`, `TValue`, `TCellComponents`, `THeaderComponents`\\>\n\n#### Returns\n\n`TAccessor` *extends* `AccessorFn`\\<`TData`\\> ? `AccessorFnColumnDef`\\<`TFeatures`, `TData`, `TValue`\\> : `AccessorKeyColumnDef`\\<`TFeatures`, `TData`, `TValue`\\>\n\n***\n\n### columns()\n\n```ts\ncolumns: <TColumns>(columns) => ColumnDef<TFeatures, TData, any>[] & [...TColumns];\n```\n\nDefined in: [createTableHook.tsx:203](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L203)\n\nWraps an array of column definitions to preserve each column's individual TValue type.\n\n#### Type Parameters\n\n##### TColumns\n\n`TColumns` *extends* `ReadonlyArray`\\<`ColumnDef`\\<`TFeatures`, `TData`, `any`\\>\\>\n\n#### Parameters\n\n##### columns\n\n\\[`...TColumns`\\]\n\n#### Returns\n\n`ColumnDef`\\<`TFeatures`, `TData`, `any`\\>[] & \\[`...TColumns`\\]\n\n***\n\n### display()\n\n```ts\ndisplay: (column) => DisplayColumnDef<TFeatures, TData, unknown>;\n```\n\nDefined in: [createTableHook.tsx:211](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L211)\n\nCreates a display column definition for non-data columns.\nThe cell, header, and footer contexts include pre-bound components.\n\n#### Parameters\n\n##### column\n\n`AppDisplayColumnDef`\\<`TFeatures`, `TData`, `TCellComponents`, `THeaderComponents`\\>\n\n#### Returns\n\n`DisplayColumnDef`\\<`TFeatures`, `TData`, `unknown`\\>\n\n***\n\n### group()\n\n```ts\ngroup: (column) => GroupColumnDef<TFeatures, TData, unknown>;\n```\n\nDefined in: [createTableHook.tsx:224](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L224)\n\nCreates a group column definition with nested child columns.\nThe cell, header, and footer contexts include pre-bound components.\n\n#### Parameters\n\n##### column\n\n`AppGroupColumnDef`\\<`TFeatures`, `TData`, `TCellComponents`, `THeaderComponents`\\>\n\n#### Returns\n\n`GroupColumnDef`\\<`TFeatures`, `TData`, `unknown`\\>\n"
  },
  {
    "path": "docs/framework/react/reference/index/type-aliases/AppHeaderContext.md",
    "content": "---\nid: AppHeaderContext\ntitle: AppHeaderContext\n---\n\n# Type Alias: AppHeaderContext\\<TFeatures, TData, TValue, THeaderComponents\\>\n\n```ts\ntype AppHeaderContext<TFeatures, TData, TValue, THeaderComponents> = object;\n```\n\nDefined in: [createTableHook.tsx:60](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L60)\n\nEnhanced HeaderContext with pre-bound header components.\nThe `header` property includes the registered headerComponents.\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* `TableFeatures`\n\n### TData\n\n`TData` *extends* `RowData`\n\n### TValue\n\n`TValue` *extends* `CellData`\n\n### THeaderComponents\n\n`THeaderComponents` *extends* `Record`\\<`string`, `ComponentType`\\<`any`\\>\\>\n\n## Properties\n\n### column\n\n```ts\ncolumn: Column<TFeatures, TData, TValue>;\n```\n\nDefined in: [createTableHook.tsx:66](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L66)\n\n***\n\n### header\n\n```ts\nheader: Header<TFeatures, TData, TValue> & THeaderComponents & object;\n```\n\nDefined in: [createTableHook.tsx:67](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L67)\n\n#### Type Declaration\n\n##### FlexRender()\n\n```ts\nFlexRender: () => ReactNode;\n```\n\n###### Returns\n\n`ReactNode`\n\n***\n\n### table\n\n```ts\ntable: Table<TFeatures, TData>;\n```\n\nDefined in: [createTableHook.tsx:69](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L69)\n"
  },
  {
    "path": "docs/framework/react/reference/index/type-aliases/AppReactTable.md",
    "content": "---\nid: AppReactTable\ntitle: AppReactTable\n---\n\n# Type Alias: AppReactTable\\<TFeatures, TData, TSelected, TTableComponents, TCellComponents, THeaderComponents\\>\n\n```ts\ntype AppReactTable<TFeatures, TData, TSelected, TTableComponents, TCellComponents, THeaderComponents> = ReactTable<TFeatures, TData, TSelected> & NoInfer<TTableComponents> & object;\n```\n\nDefined in: [createTableHook.tsx:430](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L430)\n\nExtended table API returned by useAppTable with all App wrapper components\n\n## Type Declaration\n\n### AppCell\n\n```ts\nAppCell: AppCellComponent<TFeatures, TData, NoInfer<TCellComponents>>;\n```\n\nWraps a cell and provides cell context with pre-bound cellComponents.\nOptionally accepts a selector for Subscribe functionality.\n\n#### Example\n\n```tsx\n// Without selector\n<table.AppCell cell={cell}>\n  {(c) => <td><c.TextCell /></td>}\n</table.AppCell>\n\n// With selector - children receives cell and selected state\n<table.AppCell cell={cell} selector={(s) => s.columnFilters}>\n  {(c, filters) => <td>{filters.length}</td>}\n</table.AppCell>\n```\n\n### AppFooter\n\n```ts\nAppFooter: AppHeaderComponent<TFeatures, TData, NoInfer<THeaderComponents>>;\n```\n\nWraps a footer and provides header context with pre-bound headerComponents.\nOptionally accepts a selector for Subscribe functionality.\n\n#### Example\n\n```tsx\n<table.AppFooter header={footer}>\n  {(f) => <td><table.FlexRender footer={footer} /></td>}\n</table.AppFooter>\n```\n\n### AppHeader\n\n```ts\nAppHeader: AppHeaderComponent<TFeatures, TData, NoInfer<THeaderComponents>>;\n```\n\nWraps a header and provides header context with pre-bound headerComponents.\nOptionally accepts a selector for Subscribe functionality.\n\n#### Example\n\n```tsx\n// Without selector\n<table.AppHeader header={header}>\n  {(h) => <th><h.SortIndicator /></th>}\n</table.AppHeader>\n\n// With selector\n<table.AppHeader header={header} selector={(s) => s.sorting}>\n  {(h, sorting) => <th>{sorting.length} sorted</th>}\n</table.AppHeader>\n```\n\n### AppTable\n\n```ts\nAppTable: AppTableComponent<TFeatures>;\n```\n\nRoot wrapper component that provides table context with optional Subscribe.\n\n#### Example\n\n```tsx\n// Without selector - children is ReactNode\n<table.AppTable>\n  <table>...</table>\n</table.AppTable>\n\n// With selector - children receives selected state\n<table.AppTable selector={(s) => s.pagination}>\n  {(pagination) => <div>Page {pagination.pageIndex}</div>}\n</table.AppTable>\n```\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* `TableFeatures`\n\n### TData\n\n`TData` *extends* `RowData`\n\n### TSelected\n\n`TSelected`\n\n### TTableComponents\n\n`TTableComponents` *extends* `Record`\\<`string`, `ComponentType`\\<`any`\\>\\>\n\n### TCellComponents\n\n`TCellComponents` *extends* `Record`\\<`string`, `ComponentType`\\<`any`\\>\\>\n\n### THeaderComponents\n\n`THeaderComponents` *extends* `Record`\\<`string`, `ComponentType`\\<`any`\\>\\>\n"
  },
  {
    "path": "docs/framework/react/reference/index/type-aliases/CreateTableHookOptions.md",
    "content": "---\nid: CreateTableHookOptions\ntitle: CreateTableHookOptions\n---\n\n# Type Alias: CreateTableHookOptions\\<TFeatures, TTableComponents, TCellComponents, THeaderComponents\\>\n\n```ts\ntype CreateTableHookOptions<TFeatures, TTableComponents, TCellComponents, THeaderComponents> = Omit<TableOptions<TFeatures, any>, \"columns\" | \"data\" | \"store\" | \"state\" | \"initialState\"> & object;\n```\n\nDefined in: [createTableHook.tsx:242](https://github.com/TanStack/table/blob/main/packages/react-table/src/createTableHook.tsx#L242)\n\nOptions for creating a table hook with pre-bound components and default table options.\nExtends all TableOptions except 'columns' | 'data' | 'store' | 'state' | 'initialState'.\n\n## Type Declaration\n\n### cellComponents?\n\n```ts\noptional cellComponents: TCellComponents;\n```\n\nCell-level components that need access to the cell instance.\nThese are available on the cell object passed to AppCell's children.\nUse `useCellContext()` inside these components.\n\n#### Example\n\n```ts\n{ TextCell, NumberCell, DateCell, CurrencyCell }\n```\n\n### headerComponents?\n\n```ts\noptional headerComponents: THeaderComponents;\n```\n\nHeader-level components that need access to the header instance.\nThese are available on the header object passed to AppHeader/AppFooter's children.\nUse `useHeaderContext()` inside these components.\n\n#### Example\n\n```ts\n{ SortIndicator, ColumnFilter, ResizeHandle }\n```\n\n### tableComponents?\n\n```ts\noptional tableComponents: TTableComponents;\n```\n\nTable-level components that need access to the table instance.\nThese are available directly on the table object returned by useAppTable.\nUse `useTableContext()` inside these components.\n\n#### Example\n\n```ts\n{ PaginationControls, GlobalFilter, RowCount }\n```\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* `TableFeatures`\n\n### TTableComponents\n\n`TTableComponents` *extends* `Record`\\<`string`, `ComponentType`\\<`any`\\>\\>\n\n### TCellComponents\n\n`TCellComponents` *extends* `Record`\\<`string`, `ComponentType`\\<`any`\\>\\>\n\n### THeaderComponents\n\n`THeaderComponents` *extends* `Record`\\<`string`, `ComponentType`\\<`any`\\>\\>\n"
  },
  {
    "path": "docs/framework/react/reference/index/type-aliases/FlexRenderProps.md",
    "content": "---\nid: FlexRenderProps\ntitle: FlexRenderProps\n---\n\n# Type Alias: FlexRenderProps\\<TFeatures, TData, TValue\\>\n\n```ts\ntype FlexRenderProps<TFeatures, TData, TValue> = \n  | {\n  cell: Cell<TFeatures, TData, TValue>;\n  footer?: never;\n  header?: never;\n}\n  | {\n  cell?: never;\n  footer?: never;\n  header: Header<TFeatures, TData, TValue>;\n}\n  | {\n  cell?: never;\n  footer: Header<TFeatures, TData, TValue>;\n  header?: never;\n};\n```\n\nDefined in: [FlexRender.tsx:63](https://github.com/TanStack/table/blob/main/packages/react-table/src/FlexRender.tsx#L63)\n\nSimplified component wrapper of `flexRender`. Use this utility component to render headers, cells, or footers with custom markup.\nOnly one prop (`cell`, `header`, or `footer`) may be passed.\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* `TableFeatures`\n\n### TData\n\n`TData` *extends* `RowData`\n\n### TValue\n\n`TValue` *extends* `CellData` = `CellData`\n\n## Examples\n\n```ts\n<FlexRender cell={cell} />\n```\n\n```ts\n<FlexRender header={header} />\n```\n\n```ts\n<FlexRender footer={footer} />\n```\n"
  },
  {
    "path": "docs/framework/react/reference/index/type-aliases/ReactTable.md",
    "content": "---\nid: ReactTable\ntitle: ReactTable\n---\n\n# Type Alias: ReactTable\\<TFeatures, TData, TSelected\\>\n\n```ts\ntype ReactTable<TFeatures, TData, TSelected> = Table<TFeatures, TData> & object;\n```\n\nDefined in: [useTable.ts:23](https://github.com/TanStack/table/blob/main/packages/react-table/src/useTable.ts#L23)\n\n## Type Declaration\n\n### FlexRender()\n\n```ts\nFlexRender: <TValue>(props) => ReactNode;\n```\n\nA React component that renders headers, cells, or footers with custom markup.\nUse this utility component instead of manually calling flexRender.\n\n#### Type Parameters\n\n##### TValue\n\n`TValue` *extends* `CellData` = `CellData`\n\n#### Parameters\n\n##### props\n\n[`FlexRenderProps`](FlexRenderProps.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n#### Returns\n\n`ReactNode`\n\n#### Example\n\n```tsx\n<table.FlexRender cell={cell} />\n<table.FlexRender header={header} />\n<table.FlexRender footer={footer} />\n```\n\nThis replaces calling `flexRender` directly like this:\n```tsx\nflexRender(cell.column.columnDef.cell, cell.getContext())\nflexRender(header.column.columnDef.header, header.getContext())\nflexRender(footer.column.columnDef.footer, footer.getContext())\n```\n\n### state\n\n```ts\nreadonly state: Readonly<TSelected>;\n```\n\nThe selected state of the table. This state may not match the structure of `table.store.state` because it is selected by the `selector` function that you pass as the 2nd argument to `useTable`.\n\n#### Example\n\n```ts\nconst table = useTable(options, (state) => ({ globalFilter: state.globalFilter })) // only globalFilter is part of the selected state\n\nconsole.log(table.state.globalFilter)\n```\n\n### Subscribe()\n\n```ts\nSubscribe: <TSelected>(props) => ReturnType<FunctionComponent>;\n```\n\nA React HOC (Higher Order Component) that allows you to subscribe to the table state.\n\nThis is useful for opting into state re-renders for specific parts of the table state.\n\n#### Type Parameters\n\n##### TSelected\n\n`TSelected`\n\n#### Parameters\n\n##### props\n\n###### children\n\n(`state`) => `ReactNode` \\| `ReactNode`\n\n###### selector\n\n(`state`) => `TSelected`\n\n#### Returns\n\n`ReturnType`\\<`FunctionComponent`\\>\n\n#### Example\n\n```ts\n<table.Subscribe selector={(state) => ({ rowSelection: state.rowSelection })}>\n  {({ rowSelection }) => ( // important to include `{() => {()}}` syntax\n    <tr key={row.id}>\n         // render the row\n    </tr>\n  ))}\n</table.Subscribe>\n```\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* `TableFeatures`\n\n### TData\n\n`TData` *extends* `RowData`\n\n### TSelected\n\n`TSelected` = \\{\n\\}\n"
  },
  {
    "path": "docs/framework/react/reference/index/type-aliases/Renderable.md",
    "content": "---\nid: Renderable\ntitle: Renderable\n---\n\n# Type Alias: Renderable\\<TProps\\>\n\n```ts\ntype Renderable<TProps> = ReactNode | ComponentType<TProps>;\n```\n\nDefined in: [FlexRender.tsx:11](https://github.com/TanStack/table/blob/main/packages/react-table/src/FlexRender.tsx#L11)\n\n## Type Parameters\n\n### TProps\n\n`TProps`\n"
  },
  {
    "path": "docs/framework/react/reference/index/type-aliases/SubscribeProps.md",
    "content": "---\nid: SubscribeProps\ntitle: SubscribeProps\n---\n\n# Type Alias: SubscribeProps\\<TFeatures, TData, TSelected\\>\n\n```ts\ntype SubscribeProps<TFeatures, TData, TSelected> = object;\n```\n\nDefined in: [Subscribe.ts:12](https://github.com/TanStack/table/blob/main/packages/react-table/src/Subscribe.ts#L12)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* `TableFeatures`\n\n### TData\n\n`TData` *extends* `RowData`\n\n### TSelected\n\n`TSelected` = \\{\n\\}\n\n## Properties\n\n### children\n\n```ts\nchildren: (state) => ReactNode | ReactNode;\n```\n\nDefined in: [Subscribe.ts:30](https://github.com/TanStack/table/blob/main/packages/react-table/src/Subscribe.ts#L30)\n\nThe children to render. Can be a function that receives the selected state, or a React node.\n\n***\n\n### selector()\n\n```ts\nselector: (state) => TSelected;\n```\n\nDefined in: [Subscribe.ts:26](https://github.com/TanStack/table/blob/main/packages/react-table/src/Subscribe.ts#L26)\n\nA selector function that selects the part of the table state to subscribe to.\nThis allows for fine-grained reactivity by only re-rendering when the selected state changes.\n\n#### Parameters\n\n##### state\n\n`NoInfer`\\<`TableState`\\<`TFeatures`\\>\\>\n\n#### Returns\n\n`TSelected`\n\n***\n\n### table\n\n```ts\ntable: Table<TFeatures, TData>;\n```\n\nDefined in: [Subscribe.ts:21](https://github.com/TanStack/table/blob/main/packages/react-table/src/Subscribe.ts#L21)\n\nThe table instance to subscribe to. Required when using as a standalone component.\nNot needed when using as `table.Subscribe`.\n"
  },
  {
    "path": "docs/framework/react/reference/index.md",
    "content": "---\nid: \"@tanstack/react-table\"\ntitle: \"@tanstack/react-table\"\n---\n\n# @tanstack/react-table\n\n## Modules\n\n- [index](index/index.md)\n- [legacy](legacy/index.md)\n"
  },
  {
    "path": "docs/framework/react/reference/legacy/functions/getCoreRowModel.md",
    "content": "---\nid: getCoreRowModel\ntitle: getCoreRowModel\n---\n\n# ~~Function: getCoreRowModel()~~\n\n```ts\nfunction getCoreRowModel<TData>(): RowModelFactory<TData>;\n```\n\nDefined in: [useLegacyTable.ts:147](https://github.com/TanStack/table/blob/main/packages/react-table/src/useLegacyTable.ts#L147)\n\n## Type Parameters\n\n### TData\n\n`TData` *extends* `RowData`\n\n## Returns\n\n`RowModelFactory`\\<`TData`\\>\n\n## Deprecated\n\nThe core row model is always created automatically in v9.\n\nThis is a stub function for v8 API compatibility with `useLegacyTable`.\nIt does nothing - the core row model is always available.\n"
  },
  {
    "path": "docs/framework/react/reference/legacy/functions/getExpandedRowModel.md",
    "content": "---\nid: getExpandedRowModel\ntitle: getExpandedRowModel\n---\n\n# ~~Function: getExpandedRowModel()~~\n\n```ts\nfunction getExpandedRowModel<TData>(): RowModelFactory<TData>;\n```\n\nDefined in: [useLegacyTable.ts:87](https://github.com/TanStack/table/blob/main/packages/react-table/src/useLegacyTable.ts#L87)\n\n## Type Parameters\n\n### TData\n\n`TData` *extends* `RowData`\n\n## Returns\n\n`RowModelFactory`\\<`TData`\\>\n\n## Deprecated\n\nUse `createExpandedRowModel()` with the new `useTable` hook instead.\n\nThis is a stub function for v8 API compatibility with `useLegacyTable`.\nIt acts as a marker to enable the expanded row model.\n"
  },
  {
    "path": "docs/framework/react/reference/legacy/functions/getFacetedMinMaxValues.md",
    "content": "---\nid: getFacetedMinMaxValues\ntitle: getFacetedMinMaxValues\n---\n\n# ~~Function: getFacetedMinMaxValues()~~\n\n```ts\nfunction getFacetedMinMaxValues<TData>(): FacetedMinMaxValuesFactory<TData>;\n```\n\nDefined in: [useLegacyTable.ts:123](https://github.com/TanStack/table/blob/main/packages/react-table/src/useLegacyTable.ts#L123)\n\n## Type Parameters\n\n### TData\n\n`TData` *extends* `RowData`\n\n## Returns\n\n`FacetedMinMaxValuesFactory`\\<`TData`\\>\n\n## Deprecated\n\nUse `createFacetedMinMaxValues()` with the new `useTable` hook instead.\n\nThis is a stub function for v8 API compatibility with `useLegacyTable`.\nIt acts as a marker to enable the faceted min/max values.\n"
  },
  {
    "path": "docs/framework/react/reference/legacy/functions/getFacetedRowModel.md",
    "content": "---\nid: getFacetedRowModel\ntitle: getFacetedRowModel\n---\n\n# ~~Function: getFacetedRowModel()~~\n\n```ts\nfunction getFacetedRowModel<TData>(): FacetedRowModelFactory<TData>;\n```\n\nDefined in: [useLegacyTable.ts:111](https://github.com/TanStack/table/blob/main/packages/react-table/src/useLegacyTable.ts#L111)\n\n## Type Parameters\n\n### TData\n\n`TData` *extends* `RowData`\n\n## Returns\n\n`FacetedRowModelFactory`\\<`TData`\\>\n\n## Deprecated\n\nUse `createFacetedRowModel()` with the new `useTable` hook instead.\n\nThis is a stub function for v8 API compatibility with `useLegacyTable`.\nIt acts as a marker to enable the faceted row model.\n"
  },
  {
    "path": "docs/framework/react/reference/legacy/functions/getFacetedUniqueValues.md",
    "content": "---\nid: getFacetedUniqueValues\ntitle: getFacetedUniqueValues\n---\n\n# ~~Function: getFacetedUniqueValues()~~\n\n```ts\nfunction getFacetedUniqueValues<TData>(): FacetedUniqueValuesFactory<TData>;\n```\n\nDefined in: [useLegacyTable.ts:135](https://github.com/TanStack/table/blob/main/packages/react-table/src/useLegacyTable.ts#L135)\n\n## Type Parameters\n\n### TData\n\n`TData` *extends* `RowData`\n\n## Returns\n\n`FacetedUniqueValuesFactory`\\<`TData`\\>\n\n## Deprecated\n\nUse `createFacetedUniqueValues()` with the new `useTable` hook instead.\n\nThis is a stub function for v8 API compatibility with `useLegacyTable`.\nIt acts as a marker to enable the faceted unique values.\n"
  },
  {
    "path": "docs/framework/react/reference/legacy/functions/getFilteredRowModel.md",
    "content": "---\nid: getFilteredRowModel\ntitle: getFilteredRowModel\n---\n\n# ~~Function: getFilteredRowModel()~~\n\n```ts\nfunction getFilteredRowModel<TData>(): RowModelFactory<TData>;\n```\n\nDefined in: [useLegacyTable.ts:51](https://github.com/TanStack/table/blob/main/packages/react-table/src/useLegacyTable.ts#L51)\n\n## Type Parameters\n\n### TData\n\n`TData` *extends* `RowData`\n\n## Returns\n\n`RowModelFactory`\\<`TData`\\>\n\n## Deprecated\n\nUse `createFilteredRowModel(filterFns)` with the new `useTable` hook instead.\n\nThis is a stub function for v8 API compatibility with `useLegacyTable`.\nIt acts as a marker to enable the filtered row model.\n"
  },
  {
    "path": "docs/framework/react/reference/legacy/functions/getGroupedRowModel.md",
    "content": "---\nid: getGroupedRowModel\ntitle: getGroupedRowModel\n---\n\n# ~~Function: getGroupedRowModel()~~\n\n```ts\nfunction getGroupedRowModel<TData>(): RowModelFactory<TData>;\n```\n\nDefined in: [useLegacyTable.ts:99](https://github.com/TanStack/table/blob/main/packages/react-table/src/useLegacyTable.ts#L99)\n\n## Type Parameters\n\n### TData\n\n`TData` *extends* `RowData`\n\n## Returns\n\n`RowModelFactory`\\<`TData`\\>\n\n## Deprecated\n\nUse `createGroupedRowModel(aggregationFns)` with the new `useTable` hook instead.\n\nThis is a stub function for v8 API compatibility with `useLegacyTable`.\nIt acts as a marker to enable the grouped row model.\n"
  },
  {
    "path": "docs/framework/react/reference/legacy/functions/getPaginationRowModel.md",
    "content": "---\nid: getPaginationRowModel\ntitle: getPaginationRowModel\n---\n\n# ~~Function: getPaginationRowModel()~~\n\n```ts\nfunction getPaginationRowModel<TData>(): RowModelFactory<TData>;\n```\n\nDefined in: [useLegacyTable.ts:75](https://github.com/TanStack/table/blob/main/packages/react-table/src/useLegacyTable.ts#L75)\n\n## Type Parameters\n\n### TData\n\n`TData` *extends* `RowData`\n\n## Returns\n\n`RowModelFactory`\\<`TData`\\>\n\n## Deprecated\n\nUse `createPaginatedRowModel()` with the new `useTable` hook instead.\n\nThis is a stub function for v8 API compatibility with `useLegacyTable`.\nIt acts as a marker to enable the paginated row model.\n"
  },
  {
    "path": "docs/framework/react/reference/legacy/functions/getSortedRowModel.md",
    "content": "---\nid: getSortedRowModel\ntitle: getSortedRowModel\n---\n\n# ~~Function: getSortedRowModel()~~\n\n```ts\nfunction getSortedRowModel<TData>(): RowModelFactory<TData>;\n```\n\nDefined in: [useLegacyTable.ts:63](https://github.com/TanStack/table/blob/main/packages/react-table/src/useLegacyTable.ts#L63)\n\n## Type Parameters\n\n### TData\n\n`TData` *extends* `RowData`\n\n## Returns\n\n`RowModelFactory`\\<`TData`\\>\n\n## Deprecated\n\nUse `createSortedRowModel(sortFns)` with the new `useTable` hook instead.\n\nThis is a stub function for v8 API compatibility with `useLegacyTable`.\nIt acts as a marker to enable the sorted row model.\n"
  },
  {
    "path": "docs/framework/react/reference/legacy/functions/legacyCreateColumnHelper.md",
    "content": "---\nid: legacyCreateColumnHelper\ntitle: legacyCreateColumnHelper\n---\n\n# ~~Function: legacyCreateColumnHelper()~~\n\n```ts\nfunction legacyCreateColumnHelper<TData>(): ColumnHelper<StockFeatures, TData>;\n```\n\nDefined in: [useLegacyTable.ts:321](https://github.com/TanStack/table/blob/main/packages/react-table/src/useLegacyTable.ts#L321)\n\n## Type Parameters\n\n### TData\n\n`TData` *extends* `RowData`\n\n## Returns\n\n`ColumnHelper`\\<`StockFeatures`, `TData`\\>\n\n## Deprecated\n\nUse `createColumnHelper<TFeatures, TData>()` with useTable instead.\n\nA column helper with StockFeatures pre-bound for use with useLegacyTable.\nOnly requires TData—no need to specify TFeatures.\n"
  },
  {
    "path": "docs/framework/react/reference/legacy/functions/useLegacyTable.md",
    "content": "---\nid: useLegacyTable\ntitle: useLegacyTable\n---\n\n# ~~Function: useLegacyTable()~~\n\n```ts\nfunction useLegacyTable<TData>(options): LegacyReactTable<TData>;\n```\n\nDefined in: [useLegacyTable.ts:363](https://github.com/TanStack/table/blob/main/packages/react-table/src/useLegacyTable.ts#L363)\n\n## Type Parameters\n\n### TData\n\n`TData` *extends* `RowData`\n\n## Parameters\n\n### options\n\n[`LegacyTableOptions`](../type-aliases/LegacyTableOptions.md)\\<`TData`\\>\n\nLegacy v8-style table options\n\n## Returns\n\n[`LegacyReactTable`](../type-aliases/LegacyReactTable.md)\\<`TData`\\>\n\nA table instance with the full state subscribed and a `getState()` method\n\n## Deprecated\n\nThis hook is provided as a compatibility layer for migrating from TanStack Table v8.\n\nUse the new `useTable` hook instead with explicit `_features` and `_rowModels`:\n\n```tsx\n// New v9 API\nconst _features = tableFeatures({\n  columnFilteringFeature,\n  rowSortingFeature,\n  rowPaginationFeature,\n})\n\nconst table = useTable({\n  _features,\n  _rowModels: {\n    filteredRowModel: createFilteredRowModel(filterFns),\n    sortedRowModel: createSortedRowModel(sortFns),\n    paginatedRowModel: createPaginatedRowModel(),\n  },\n  columns,\n  data,\n})\n```\n\nKey differences from v8:\n- Features are tree-shakeable - only import what you use\n- Row models are explicitly passed via `_rowModels`\n- Use `table.Subscribe` for fine-grained re-renders\n- State is accessed via `table.state` after selecting with the 2nd argument\n"
  },
  {
    "path": "docs/framework/react/reference/legacy/index.md",
    "content": "---\nid: legacy\ntitle: legacy\n---\n\n# legacy\n\n## Interfaces\n\n- [LegacyRowModelOptions](interfaces/LegacyRowModelOptions.md)\n\n## Type Aliases\n\n- [~~LegacyCell~~](type-aliases/LegacyCell.md)\n- [~~LegacyColumn~~](type-aliases/LegacyColumn.md)\n- [~~LegacyColumnDef~~](type-aliases/LegacyColumnDef.md)\n- [~~LegacyHeader~~](type-aliases/LegacyHeader.md)\n- [~~LegacyHeaderGroup~~](type-aliases/LegacyHeaderGroup.md)\n- [~~LegacyReactTable~~](type-aliases/LegacyReactTable.md)\n- [~~LegacyRow~~](type-aliases/LegacyRow.md)\n- [~~LegacyTable~~](type-aliases/LegacyTable.md)\n- [~~LegacyTableOptions~~](type-aliases/LegacyTableOptions.md)\n\n## Functions\n\n- [~~getCoreRowModel~~](functions/getCoreRowModel.md)\n- [~~getExpandedRowModel~~](functions/getExpandedRowModel.md)\n- [~~getFacetedMinMaxValues~~](functions/getFacetedMinMaxValues.md)\n- [~~getFacetedRowModel~~](functions/getFacetedRowModel.md)\n- [~~getFacetedUniqueValues~~](functions/getFacetedUniqueValues.md)\n- [~~getFilteredRowModel~~](functions/getFilteredRowModel.md)\n- [~~getGroupedRowModel~~](functions/getGroupedRowModel.md)\n- [~~getPaginationRowModel~~](functions/getPaginationRowModel.md)\n- [~~getSortedRowModel~~](functions/getSortedRowModel.md)\n- [~~legacyCreateColumnHelper~~](functions/legacyCreateColumnHelper.md)\n- [~~useLegacyTable~~](functions/useLegacyTable.md)\n"
  },
  {
    "path": "docs/framework/react/reference/legacy/interfaces/LegacyRowModelOptions.md",
    "content": "---\nid: LegacyRowModelOptions\ntitle: LegacyRowModelOptions\n---\n\n# Interface: LegacyRowModelOptions\\<TData\\>\n\nDefined in: [useLegacyTable.ts:191](https://github.com/TanStack/table/blob/main/packages/react-table/src/useLegacyTable.ts#L191)\n\nLegacy v8-style row model options\n\n## Type Parameters\n\n### TData\n\n`TData` *extends* `RowData`\n\n## Properties\n\n### ~~getCoreRowModel?~~\n\n```ts\noptional getCoreRowModel: RowModelFactory<TData>;\n```\n\nDefined in: [useLegacyTable.ts:196](https://github.com/TanStack/table/blob/main/packages/react-table/src/useLegacyTable.ts#L196)\n\nReturns the core row model for the table.\n\n#### Deprecated\n\nThis option is no longer needed in v9. The core row model is always created automatically.\n\n***\n\n### ~~getExpandedRowModel?~~\n\n```ts\noptional getExpandedRowModel: RowModelFactory<TData>;\n```\n\nDefined in: [useLegacyTable.ts:216](https://github.com/TanStack/table/blob/main/packages/react-table/src/useLegacyTable.ts#L216)\n\nReturns the expanded row model for the table.\n\n#### Deprecated\n\nUse `_rowModels.expandedRowModel` with `createExpandedRowModel()` instead.\n\n***\n\n### ~~getFacetedMinMaxValues?~~\n\n```ts\noptional getFacetedMinMaxValues: FacetedMinMaxValuesFactory<TData>;\n```\n\nDefined in: [useLegacyTable.ts:231](https://github.com/TanStack/table/blob/main/packages/react-table/src/useLegacyTable.ts#L231)\n\nReturns the faceted min/max values for a column.\n\n#### Deprecated\n\nUse `_rowModels.facetedMinMaxValues` with `createFacetedMinMaxValues()` instead.\n\n***\n\n### ~~getFacetedRowModel?~~\n\n```ts\noptional getFacetedRowModel: FacetedRowModelFactory<TData>;\n```\n\nDefined in: [useLegacyTable.ts:226](https://github.com/TanStack/table/blob/main/packages/react-table/src/useLegacyTable.ts#L226)\n\nReturns the faceted row model for a column.\n\n#### Deprecated\n\nUse `_rowModels.facetedRowModel` with `createFacetedRowModel()` instead.\n\n***\n\n### ~~getFacetedUniqueValues?~~\n\n```ts\noptional getFacetedUniqueValues: FacetedUniqueValuesFactory<TData>;\n```\n\nDefined in: [useLegacyTable.ts:236](https://github.com/TanStack/table/blob/main/packages/react-table/src/useLegacyTable.ts#L236)\n\nReturns the faceted unique values for a column.\n\n#### Deprecated\n\nUse `_rowModels.facetedUniqueValues` with `createFacetedUniqueValues()` instead.\n\n***\n\n### ~~getFilteredRowModel?~~\n\n```ts\noptional getFilteredRowModel: RowModelFactory<TData>;\n```\n\nDefined in: [useLegacyTable.ts:201](https://github.com/TanStack/table/blob/main/packages/react-table/src/useLegacyTable.ts#L201)\n\nReturns the filtered row model for the table.\n\n#### Deprecated\n\nUse `_rowModels.filteredRowModel` with `createFilteredRowModel(filterFns)` instead.\n\n***\n\n### ~~getGroupedRowModel?~~\n\n```ts\noptional getGroupedRowModel: RowModelFactory<TData>;\n```\n\nDefined in: [useLegacyTable.ts:221](https://github.com/TanStack/table/blob/main/packages/react-table/src/useLegacyTable.ts#L221)\n\nReturns the grouped row model for the table.\n\n#### Deprecated\n\nUse `_rowModels.groupedRowModel` with `createGroupedRowModel(aggregationFns)` instead.\n\n***\n\n### ~~getPaginationRowModel?~~\n\n```ts\noptional getPaginationRowModel: RowModelFactory<TData>;\n```\n\nDefined in: [useLegacyTable.ts:211](https://github.com/TanStack/table/blob/main/packages/react-table/src/useLegacyTable.ts#L211)\n\nReturns the paginated row model for the table.\n\n#### Deprecated\n\nUse `_rowModels.paginatedRowModel` with `createPaginatedRowModel()` instead.\n\n***\n\n### ~~getSortedRowModel?~~\n\n```ts\noptional getSortedRowModel: RowModelFactory<TData>;\n```\n\nDefined in: [useLegacyTable.ts:206](https://github.com/TanStack/table/blob/main/packages/react-table/src/useLegacyTable.ts#L206)\n\nReturns the sorted row model for the table.\n\n#### Deprecated\n\nUse `_rowModels.sortedRowModel` with `createSortedRowModel(sortFns)` instead.\n"
  },
  {
    "path": "docs/framework/react/reference/legacy/type-aliases/LegacyCell.md",
    "content": "---\nid: LegacyCell\ntitle: LegacyCell\n---\n\n# ~~Type Alias: LegacyCell\\<TData, TValue\\>~~\n\n```ts\ntype LegacyCell<TData, TValue> = Cell<StockFeatures, TData, TValue>;\n```\n\nDefined in: [useLegacyTable.ts:285](https://github.com/TanStack/table/blob/main/packages/react-table/src/useLegacyTable.ts#L285)\n\n## Type Parameters\n\n### TData\n\n`TData` *extends* `RowData`\n\n### TValue\n\n`TValue` = `unknown`\n\n## Deprecated\n\nUse Cell<TFeatures, TData, TValue> with useTable instead.\n"
  },
  {
    "path": "docs/framework/react/reference/legacy/type-aliases/LegacyColumn.md",
    "content": "---\nid: LegacyColumn\ntitle: LegacyColumn\n---\n\n# ~~Type Alias: LegacyColumn\\<TData, TValue\\>~~\n\n```ts\ntype LegacyColumn<TData, TValue> = Column<StockFeatures, TData, TValue>;\n```\n\nDefined in: [useLegacyTable.ts:275](https://github.com/TanStack/table/blob/main/packages/react-table/src/useLegacyTable.ts#L275)\n\n## Type Parameters\n\n### TData\n\n`TData` *extends* `RowData`\n\n### TValue\n\n`TValue` = `unknown`\n\n## Deprecated\n\nUse Column<TFeatures, TData, TValue> with useTable instead.\n"
  },
  {
    "path": "docs/framework/react/reference/legacy/type-aliases/LegacyColumnDef.md",
    "content": "---\nid: LegacyColumnDef\ntitle: LegacyColumnDef\n---\n\n# ~~Type Alias: LegacyColumnDef\\<TData, TValue\\>~~\n\n```ts\ntype LegacyColumnDef<TData, TValue> = ColumnDef<StockFeatures, TData, TValue>;\n```\n\nDefined in: [useLegacyTable.ts:305](https://github.com/TanStack/table/blob/main/packages/react-table/src/useLegacyTable.ts#L305)\n\n## Type Parameters\n\n### TData\n\n`TData` *extends* `RowData`\n\n### TValue\n\n`TValue` = `unknown`\n\n## Deprecated\n\nUse ColumnDef<TFeatures, TData, TValue> with useTable instead.\n"
  },
  {
    "path": "docs/framework/react/reference/legacy/type-aliases/LegacyHeader.md",
    "content": "---\nid: LegacyHeader\ntitle: LegacyHeader\n---\n\n# ~~Type Alias: LegacyHeader\\<TData, TValue\\>~~\n\n```ts\ntype LegacyHeader<TData, TValue> = Header<StockFeatures, TData, TValue>;\n```\n\nDefined in: [useLegacyTable.ts:292](https://github.com/TanStack/table/blob/main/packages/react-table/src/useLegacyTable.ts#L292)\n\n## Type Parameters\n\n### TData\n\n`TData` *extends* `RowData`\n\n### TValue\n\n`TValue` = `unknown`\n\n## Deprecated\n\nUse Header<TFeatures, TData, TValue> with useTable instead.\n"
  },
  {
    "path": "docs/framework/react/reference/legacy/type-aliases/LegacyHeaderGroup.md",
    "content": "---\nid: LegacyHeaderGroup\ntitle: LegacyHeaderGroup\n---\n\n# ~~Type Alias: LegacyHeaderGroup\\<TData\\>~~\n\n```ts\ntype LegacyHeaderGroup<TData> = HeaderGroup<StockFeatures, TData>;\n```\n\nDefined in: [useLegacyTable.ts:299](https://github.com/TanStack/table/blob/main/packages/react-table/src/useLegacyTable.ts#L299)\n\n## Type Parameters\n\n### TData\n\n`TData` *extends* `RowData`\n\n## Deprecated\n\nUse HeaderGroup<TFeatures, TData> with useTable instead.\n"
  },
  {
    "path": "docs/framework/react/reference/legacy/type-aliases/LegacyReactTable.md",
    "content": "---\nid: LegacyReactTable\ntitle: LegacyReactTable\n---\n\n# ~~Type Alias: LegacyReactTable\\<TData\\>~~\n\n```ts\ntype LegacyReactTable<TData> = ReactTable<StockFeatures, TData, TableState<StockFeatures>> & object;\n```\n\nDefined in: [useLegacyTable.ts:258](https://github.com/TanStack/table/blob/main/packages/react-table/src/useLegacyTable.ts#L258)\n\nLegacy table instance type that includes the v8-style `getState()` method.\n\n## Type Declaration\n\n### ~~getState()~~\n\n```ts\ngetState: () => TableState<StockFeatures>;\n```\n\nReturns the current table state.\n\n#### Returns\n\n`TableState`\\<`StockFeatures`\\>\n\n#### Deprecated\n\nIn v9, access state directly via `table.state` or use `table.store.state` for the full state.\n\n## Type Parameters\n\n### TData\n\n`TData` *extends* `RowData`\n\n## Deprecated\n\nUse `useTable` with explicit state selection instead.\n"
  },
  {
    "path": "docs/framework/react/reference/legacy/type-aliases/LegacyRow.md",
    "content": "---\nid: LegacyRow\ntitle: LegacyRow\n---\n\n# ~~Type Alias: LegacyRow\\<TData\\>~~\n\n```ts\ntype LegacyRow<TData> = Row<StockFeatures, TData>;\n```\n\nDefined in: [useLegacyTable.ts:282](https://github.com/TanStack/table/blob/main/packages/react-table/src/useLegacyTable.ts#L282)\n\n## Type Parameters\n\n### TData\n\n`TData` *extends* `RowData`\n\n## Deprecated\n\nUse Row<TFeatures, TData> with useTable instead.\n"
  },
  {
    "path": "docs/framework/react/reference/legacy/type-aliases/LegacyTable.md",
    "content": "---\nid: LegacyTable\ntitle: LegacyTable\n---\n\n# ~~Type Alias: LegacyTable\\<TData\\>~~\n\n```ts\ntype LegacyTable<TData> = Table<StockFeatures, TData>;\n```\n\nDefined in: [useLegacyTable.ts:309](https://github.com/TanStack/table/blob/main/packages/react-table/src/useLegacyTable.ts#L309)\n\n## Type Parameters\n\n### TData\n\n`TData` *extends* `RowData`\n\n## Deprecated\n\nUse Table<TFeatures, TData> with useTable instead.\n"
  },
  {
    "path": "docs/framework/react/reference/legacy/type-aliases/LegacyTableOptions.md",
    "content": "---\nid: LegacyTableOptions\ntitle: LegacyTableOptions\n---\n\n# ~~Type Alias: LegacyTableOptions\\<TData\\>~~\n\n```ts\ntype LegacyTableOptions<TData> = Omit<TableOptions<StockFeatures, TData>, \"_features\" | \"_rowModels\"> & LegacyRowModelOptions<TData>;\n```\n\nDefined in: [useLegacyTable.ts:247](https://github.com/TanStack/table/blob/main/packages/react-table/src/useLegacyTable.ts#L247)\n\nLegacy v8-style table options that work with useLegacyTable.\n\nThis type omits `_features` and `_rowModels` and instead accepts the v8-style\n`get*RowModel` function options.\n\n## Type Parameters\n\n### TData\n\n`TData` *extends* `RowData`\n\n## Deprecated\n\nThis is a compatibility layer for migrating from v8. Use `useTable` with explicit `_features` and `_rowModels` instead.\n"
  },
  {
    "path": "docs/framework/solid/guide/table-state.md",
    "content": "---\ntitle: Table State (Solid) Guide\n---\n\n## Table State (Solid) Guide\n\nTanStack Table has a simple underlying internal state management system to store and manage the state of the table. It also lets you selectively pull out any state that you need to manage in your own state management. This guide will walk you through the different ways in which you can interact with and manage the state of the table.\n\n### Accessing Table State\n\nYou do not need to set up anything special in order for the table state to work. If you pass nothing into either `state`, `initialState`, or any of the `on[State]Change` table options, the table will manage its own state internally. You can access any part of this internal state by using the `table.store.state` table instance API.\n\n```jsx\nconst table = createTable({\n  columns,\n  get data() {\n    return data()\n  },\n  //...\n})\n\nconsole.log(table.store.state) //access the entire internal state\nconsole.log(table.store.state.rowSelection) //access just the row selection state\n```\n\n### Custom Initial State\n\nIf all you need to do for certain states is customize their initial default values, you still do not need to manage any of the state yourself. You can simply set values in the `initialState` option of the table instance.\n\n```jsx\nconst table = createTable({\n  columns,\n  data,\n  initialState: {\n    columnOrder: ['age', 'firstName', 'lastName'], //customize the initial column order\n    columnVisibility: {\n      id: false //hide the id column by default\n    },\n    expanded: true, //expand all rows by default\n    sorting: [\n      {\n        id: 'age',\n        desc: true //sort by age in descending order by default\n      }\n    ]\n  },\n  //...\n})\n```\n\n> **Note**: Only specify each particular state in either `initialState` or `state`, but not both. If you pass in a particular state value to both `initialState` and `state`, the initialized state in `state` will take overwrite any corresponding value in `initialState`.\n\n### Controlled State\n\nIf you need easy access to the table state in other areas of your application, TanStack Table makes it easy to control and manage any or all of the table state in your own state management system. You can do this by passing in your own state and state management functions to the `state` and `on[State]Change` table options.\n\n#### Individual Controlled State\n\nYou can control just the state that you need easy access to. You do NOT have to control all of the table state if you do not need to. It is recommended to only control the state that you need on a case-by-case basis.\n\nIn order to control a particular state, you need to both pass in the corresponding `state` value and the `on[State]Change` function to the table instance.\n\nLet's take filtering, sorting, and pagination as an example in a \"manual\" server-side data fetching scenario. You can store the filtering, sorting, and pagination state in your own state management, but leave out any other state like column order, column visibility, etc. if your API does not care about those values.\n\n```jsx\nconst [columnFilters, setColumnFilters] = createSignal([]) //no default filters\nconst [sorting, setSorting] = createSignal([{\n  id: 'age',\n  desc: true, //sort by age in descending order by default\n}]) \nconst [pagination, setPagination] = createSignal({ pageIndex: 0, pageSize: 15 })\n\n//Use our controlled state values to fetch data\nconst tableQuery = createQuery({\n  queryKey: ['users', columnFilters, sorting, pagination],\n  queryFn: () => fetchUsers(columnFilters, sorting, pagination),\n  //...\n})\n\nconst table = createTable({\n  columns,\n  get data() {\n    return tableQuery.data()\n  },\n  //...\n  state: {\n    get columnFilters() {\n      return columnFilters() //pass controlled state back to the table (overrides internal state)\n    },\n    get sorting() {\n      return sorting()\n    },\n    get pagination() {\n      return pagination()\n    },\n  },\n  onColumnFiltersChange: setColumnFilters, //hoist columnFilters state into our own state management\n  onSortingChange: setSorting,\n  onPaginationChange: setPagination,\n})\n//...\n```\n\n#### Fully Controlled State\n\nAlternatively, you can control the entire table state with the `onStateChange` table option. It will hoist out the entire table state into your own state management system. Be careful with this approach, as you might find that raising some frequently changing state values up a solid tree, like `columnSizingInfo` state`, might cause bad performance issues.\n\nA couple of more tricks may be needed to make this work. If you use the `onStateChange` table option, the initial values of the `state` must be populated with all of the relevant state values for all of the features that you want to use. You can either manually type out all of the initial state values, or use the `table.setOptions` API in a special way as shown below.\n\n```jsx\n//create a table instance with default state values\nconst table = createTable({\n  columns,\n  get data() {\n    return data()\n  },\n  //... Note: `state` values are NOT passed in yet\n})\n\n\nconst [state, setState] = createSignal({\n  ...table.initialState, //populate the initial state with all of the default state values from the table instance\n  pagination: {\n    pageIndex: 0,\n    pageSize: 15 //optionally customize the initial pagination state.\n  }\n})\n\n//Use the table.setOptions API to merge our fully controlled state onto the table instance\ntable.setOptions(prev => ({\n  ...prev, //preserve any other options that we have set up above\n  get state() {\n    return state() //our fully controlled state overrides the internal state\n  },\n  onStateChange: setState //any state changes will be pushed up to our own state management\n}))\n```\n\n### On State Change Callbacks\n\nSo far, we have seen the `on[State]Change` and `onStateChange` table options work to \"hoist\" the table state changes into our own state management. However, there are a few things about these using these options that you should be aware of.\n\n#### 1. **State Change Callbacks MUST have their corresponding state value in the `state` option**.\n\nSpecifying an `on[State]Change` callback tells the table instance that this will be a controlled state. If you do not specify the corresponding `state` value, that state will be \"frozen\" with its initial value.\n\n```jsx\nconst [sorting, setSorting] = createSignal([])\n//...\nconst table = createTable({\n  columns,\n  data,\n  //...\n  state: {\n    get sorting() {\n      return sorting() //required because we are using `onSortingChange`\n    },\n  },\n  onSortingChange: setSorting, //makes the `state.sorting` controlled\n})\n```\n\n#### 2. **Updaters can either be raw values or callback functions**.\n\nThe `on[State]Change` and `onStateChange` callbacks work exactly like the `setState` functions in React (Solid Setters). The updater values can either be a new state value or a callback function that takes the previous state value and returns the new state value.\n\nWhat implications does this have? It means that if you want to add in some extra logic in any of the `on[State]Change` callbacks, you can do so, but you need to check whether or not the new incoming updater value is a function or value.\n\n```jsx\nconst [sorting, setSorting] = createSignal([])\nconst [pagination, setPagination] = createSignal({ pageIndex: 0, pageSize: 10 })\n\nconst table = createTable({\n  get columns() {\n    return columns()\n  },\n  get data() {\n    return data()\n  },\n  //...\n  state: {\n    get pagination() {\n      return pagination()\n    },\n    get sorting() {\n      return sorting()\n    },\n  }\n  //syntax 1\n  onPaginationChange: (updater) => {\n    setPagination(old => {\n      const newPaginationValue = updater instanceof Function ? updater(old) : updater\n      //do something with the new pagination value\n      //...\n      return newPaginationValue\n    })\n  },\n  //syntax 2\n  onSortingChange: (updater) => {\n    const newSortingValue = updater instanceof Function ? updater(sorting) : updater\n    //do something with the new sorting value\n    //...\n    setSorting(updater) //normal state update\n  }\n})\n```\n\n### State Types\n\nAll complex states in TanStack Table have their own TypeScript types that you can import and use. This can be handy for ensuring that you are using the correct data structures and properties for the state values that you are controlling.\n\n```tsx\nimport { createTable, type SortingState } from '@tanstack/solid-table'\n//...\nconst [sorting, setSorting] = createSignal<SortingState[]>([\n  {\n    id: 'age', //you should get autocomplete for the `id` and `desc` properties\n    desc: true,\n  }\n])\n```"
  },
  {
    "path": "docs/framework/solid/solid-table.md",
    "content": "---\ntitle: Solid Table\n---\n\nThe `@tanstack/solid-table` adapter is a wrapper around the core table logic. Most of it's job is related to managing state the \"solid\" way, providing types and the rendering implementation of cell/header/footer templates.\n\n## `createTable`\n\nTakes an `options` object and returns a table.\n\n```tsx\nimport { createTable } from '@tanstack/solid-table'\n\nfunction App() {\n  const table = createTable(options)\n\n  // ...render your table\n}\n```\n"
  },
  {
    "path": "docs/framework/svelte/guide/table-state.md",
    "content": "---\ntitle: Table State (Svelte) Guide\n---\n\n## Table State (Svelte) Guide\n\nTanStack Table has a simple underlying internal state management system to store and manage the state of the table. It also lets you selectively pull out any state that you need to manage in your own state management. This guide will walk you through the different ways in which you can interact with and manage the state of the table.\n\n### Accessing Table State\n\nYou do not need to set up anything special in order for the table state to work. If you pass nothing into either `state`, `initialState`, or any of the `on[State]Change` table options, the table will manage its own state internally. You can access any part of this internal state by using the `table.store.state` table instance API.\n\n```ts\nconst table = createTable({\n  columns,\n  get data() {\n    return data\n  },\n  //...\n})\n\nconsole.log(table.store.state) //access the entire internal state\nconsole.log(table.store.state.rowSelection) //access just the row selection state\n```\n\n### Custom Initial State\n\nIf all you need to do for certain states is customize their initial default values, you still do not need to manage any of the state yourself. You can simply set values in the `initialState` option of the table instance.\n\n```ts\nconst table = createTable({\n  columns,\n  data,\n  initialState: {\n    columnOrder: ['age', 'firstName', 'lastName'], //customize the initial column order\n    columnVisibility: {\n      id: false //hide the id column by default\n    },\n    expanded: true, //expand all rows by default\n    sorting: [\n      {\n        id: 'age',\n        desc: true //sort by age in descending order by default\n      }\n    ]\n  },\n  //...\n})\n```\n\n> **Note**: Only specify each particular state in either `initialState` or `state`, but not both. If you pass in a particular state value to both `initialState` and `state`, the initialized state in `state` will overwrite any corresponding value in `initialState`.\n\n### Controlled State\n\nIf you need easy access to the table state in other areas of your application, TanStack Table makes it easy to control and manage any or all of the table state in your own state management system. You can do this by passing in your own state and state management functions to the `state` and `on[State]Change` table options.\n\n#### Individual Controlled State\n\nYou can control just the state that you need easy access to. You do NOT have to control all of the table state if you do not need to. It is recommended to only control the state that you need on a case-by-case basis.\n\nIn order to control a particular state, you need to both pass in the corresponding `state` value and the `on[State]Change` function to the table instance.\n\nLet's take filtering, sorting, and pagination as an example in a \"manual\" server-side data fetching scenario. You can store the filtering, sorting, and pagination state in your own state management, but leave out any other state like column order, column visibility, etc. if your API does not care about those values.\n\n```ts\nlet sorting: SortingState = $state([\n  {\n    id: 'age',\n    desc: true, //sort by age in descending order by default\n  },\n])\nfunction setSorting(updater: Updater<SortingState>) {\n  if (updater instanceof Function) {\n    sorting = updater(sorting)\n  } else sorting = updater\n}\n\nlet columnFilters: ColumnFiltersState = $state([]) //no default filters\nfunction setColumnFilters(updater: Updater<ColumnFiltersState>) {\n  if (updater instanceof Function) {\n    columnFilters = updater(columnFilters)\n  } else columnFilters = updater\n}\n\nlet pagination: PaginationState = $state(\n  { pageIndex: 0, pageSize: 15 } //default pagination\n)\nfunction setPagination(updater: Updater<PaginationState>) {\n  if (updater instanceof Function) {\n    pagination = updater(pagination)\n  } else pagination = updater\n}\n\nlet data = $state(makeData(100_000))\n\nconst options = {\n  columns,\n  get data() {\n    return data\n  }\n  //...\n  state: {\n    get sorting() {\n      return sorting\n    },\n    get columnFilters() {\n      return columnFilters\n    },\n    get pagination() {\n      return pagination\n    }\n  },\n  onColumnFiltersChange: setColumnFilters, //hoist columnFilters state into our own state management\n  onSortingChange: setSorting,\n  onPaginationChange: setPagination,\n}\n\nconst table = createTable(options)\n//...\n```\n\n#### Fully Controlled State\n\nAlternatively, you can control the entire table state with the `onStateChange` table option. It will hoist out the entire table state into your own state management system. Be careful with this approach, as you might find that raising some frequently changing state values up a Svelte tree, like `columnSizingInfo` state, might cause bad performance issues.\n\nA couple of more tricks may be needed to make this work. If you use the `onStateChange` table option, the initial values of the `state` must be populated with all of the relevant state values for all of the features that you want to use. You can either manually type out all of the initial state values, or use the `table.setOptions` API in a special way as shown below.\n\n```ts\n//create a table instance with default state values\nconst table = createTable({\n  columns,\n  get data() {\n    return data\n  },\n  //... Note: `state` values are NOT passed in yet\n})\n\nconst state = $state({\n  ...table.initialState, //populate the initial state with all of the default state values from the table instance\n  pagination: {\n    pageIndex: 0,\n    pageSize: 15 //optionally customize the initial pagination state.\n  }\n})\n\nconst setState = updater => {\n  if (updater instanceof Function) {\n    state = updater(state)\n  } state = updater\n}\n\n//Use the table.setOptions API to merge our fully controlled state onto the table instance\ntable.setOptions(prev => ({\n  ...prev, //preserve any other options that we have set up above\n  get state() {\n    return state //our fully controlled state overrides the internal state\n  },\n  onStateChange: setState //any state changes will be pushed up to our own state management\n}))\n```\n\n### On State Change Callbacks\n\nSo far, we have seen the `on[State]Change` and `onStateChange` table options work to \"hoist\" the table state changes into our own state management. However, there are a few things about using these options that you should be aware of.\n\n#### 1. **State Change Callbacks MUST have their corresponding state value in the `state` option**.\n\nSpecifying an `on[State]Change` callback tells the table instance that this will be a controlled state. If you do not specify the corresponding `state` value, that state will be \"frozen\" with its initial value.\n\n```ts\nlet sorting = $state([])\nconst setSorting = updater => {\n  if (updater instanceof Function) {\n    sorting = updater(sorting)\n  } else sorting = updater\n}\n// ...\nconst table = createTable({\n  columns,\n  data,\n  //...\n  state: {\n    get sorting() {\n      return sorting //required because we are using `onSortingChange`\n    },\n  },\n  onSortingChange: setSorting, //makes the `state.sorting` controlled\n})\n```\n\n#### 2. **Updaters can either be raw values or callback functions**.\n\nThe `on[State]Change` and `onStateChange` callbacks work exactly like the `setState` functions in React. The updater values can either be a new state value or a callback function that takes the previous state value and returns the new state value.\n\nWhat implications does this have? It means that if you want to add in some extra logic in any of the `on[State]Change` callbacks, you can do so, but you need to check whether or not the new incoming updater value is a function or value.\n\nThis is why you see the `if (updater instanceof Function)` check in the `setState` functions in the examples above.\n\n### State Types\n\nAll complex states in TanStack Table have their own TypeScript types that you can import and use. This can be handy for ensuring that you are using the correct data structures and properties for the state values that you are controlling.\n\n```ts\nimport { createTable, type SortingState, type Updater } from '@tanstack/svelte-table'\n//...\nlet sorting: SortingState[] = [\n  {\n    id: 'age', //you should get autocomplete for the `id` and `desc` properties\n    desc: true,\n  }\n]\nconst setSorting = (updater: Updater<SortingState>)  => {\n  if (updater instanceof Function) {\n    sorting = updater(sorting)\n  } else sorting = updater\n}\n```\n"
  },
  {
    "path": "docs/framework/svelte/svelte-table.md",
    "content": "---\ntitle: Svelte Table\n---\n\n> **IMPORTANT:** This version of `@tanstack/svelte-table` only supports **Svelte 5 or  newer**. For Svelte 3/4 support, use version 8 of `@tanstack/svelte-table`.\n> Alternatively, you can still use `@tanstack/table-core` v9 with Svelte 3/4 by copying the source code from the [v8 `@tanstack/svelte-table`](https://github.com/TanStack/table/tree/v8/packages/svelte-table/src) as a custom adapter.\n\nThe `@tanstack/svelte-table` adapter is a wrapper around the core table logic. Most of its job is related to managing state the \"Svelte\" way, providing types and the rendering implementation of cell/header/footer templates.\n\n## Exports\n\n`@tanstack/svelte-table` re-exports all of `@tanstack/table-core`'s APIs and the following:\n\n### `createTable`\n\nTakes an `options` object and returns a table.\n\n```svelte\n<script>\n  import { createTable } from '@tanstack/svelte-table'\n\n  const table = createTable({\n      /* ...table options... */\n  })\n</script>\n\n<!-- ...render your table in markup -->\n```\n\n### FlexRender\n\nA Svelte component for rendering cell/header/footer templates with dynamic values.\n\nFlexRender supports any type of renderable content supported by Svelte:\n\n- Scalar data types such as numbers, strings, etc.\n- Svelte components (when wrapped with `renderComponent`)\n- Svelte snippets (when wrapped with `renderSnippet`)\n\nExample:\n\n```svelte\n<script lang=\"ts\">\n  import {\n    type ColumnDef,\n    FlexRender,\n    createTable,\n    getCoreRowModel,\n    renderComponent,\n    renderSnippet\n  } from '@tanstack/svelte-table'\n  import { StatusTag } from '$lib/components/status-tag.svelte'\n  import type { Person } from './types'\n  import { peopleData, type Person } from './people'\n\n  const columns: ColumnDef<Person>[] = [\n    {\n      /* Renders a string */\n      accessorKey: 'name',\n      cell: info => info.getValue(),\n    },\n    {\n      /* Renders a Svelte component */\n      accessorKey: 'status',\n      cell: (info) => renderComponent(StatusTag, { value: info.getValue() })\n    },\n    {\n      /* Renders a Svelte component */\n      accessorKey: 'email',\n      cell: (info) => renderSnippet(mailtoLink, info.getValue())\n    }\n  ]\n\n  const table = createTable({\n    data: peopleData,\n    columns,\n    getCoreRowModel: createCoreRowModel()\n  })\n</script>\n\n{#snippet mailtoLink(email: string)}\n  <a href=\"mailto:{email}\">\n    {email}\n  </a>\n{/snippet}\n\n<table>\n  <tbody>\n    {#each table.getRowModel().rows as row}\n      <tr>\n        {#each row.getVisibleCells() as cell}\n          <td>\n            <FlexRender\n              content={cell.column.columnDef.cell}\n              context={cell.getContext()}\n            />\n          </td>\n        {/each}\n      </tr>\n    {/each}\n  </tbody>\n</table>\n```\n"
  },
  {
    "path": "docs/framework/vanilla/guide/table-state.md",
    "content": "---\ntitle: Table State (Vanilla JS) Guide\n---\n\n## Table State (Vanilla JS) Guide\n"
  },
  {
    "path": "docs/framework/vanilla/table-core.md",
    "content": ""
  },
  {
    "path": "docs/framework/vue/guide/table-state.md",
    "content": "---\ntitle: Table State (Vue) Guide\n---\n\n## Table State (Vue) Guide\n\nTanStack Table has a simple underlying internal state management system to store and manage the state of the table. It also lets you selectively pull out any state that you need to manage in your own state management. This guide will walk you through the different ways in which you can interact with and manage the state of the table.\n\n### Accessing Table State\n\nYou do not need to set up anything special in order for the table state to work. If you pass nothing into either `state`, `initialState`, or any of the `on[State]Change` table options, the table will manage its own state internally. You can access any part of this internal state by using the `table.store.state` table instance API.\n\n```ts\nconst table = useTable({\n  columns,\n  data: dataRef, // Reactive data support\n  //...\n})\n\nconsole.log(table.store.state) //access the entire internal state\nconsole.log(table.store.state.rowSelection) //access just the row selection state\n```\n\n### Using Reactive Data\n\n> **New in v8.20.0**\n\nThe `useVueTable` hook now supports reactive data. This means you can pass a Vue `ref` or `computed` containing your data to the `data`-option. The table will automatically react to changes in the data.\n\n```ts\nconst columns = [\n  { accessor: 'id', Header: 'ID' },\n  { accessor: 'name', Header: 'Name' }\n]\n\nconst dataRef = ref([\n  { id: 1, name: 'John' },\n  { id: 2, name: 'Jane' }\n])\n\nconst table = useVueTable({\n  columns,\n  data: dataRef, // Pass the reactive data ref\n})\n\n// Later, updating dataRef will automatically update the table\ndataRef.value = [\n  { id: 1, name: 'John' },\n  { id: 2, name: 'Jane' },\n  { id: 3, name: 'Doe' }\n]\n```\n\n> ⚠️ `shallowRef` is used under the hood for performance reasons, meaning that the data is not deeply reactive, only the `.value` is. To update the data you have to mutate the data directly.\n\n```ts\nconst dataRef = ref([\n  { id: 1, name: 'John' },\n  { id: 2, name: 'Jane' }\n])\n\n// This will NOT update the table ❌\ndataRef.value.push({ id: 4, name: 'John' })\n\n// This will update the table ✅\ndataRef.value = [\n  ...dataRef.value,\n  { id: 4, name: 'John' }\n]\n```\n\n### Custom Initial State\n\nIf all you need to do for certain states is customize their initial default values, you still do not need to manage any of the state yourself. You can simply set values in the `initialState` option of the table instance.\n\n```jsx\nconst table = useTable({\n  columns,\n  data,\n  initialState: {\n    columnOrder: ['age', 'firstName', 'lastName'], //customize the initial column order\n    columnVisibility: {\n      id: false //hide the id column by default\n    },\n    expanded: true, //expand all rows by default\n    sorting: [\n      {\n        id: 'age',\n        desc: true //sort by age in descending order by default\n      }\n    ]\n  },\n  //...\n})\n```\n\n> **Note**: Only specify each particular state in either `initialState` or `state`, but not both. If you pass in a particular state value to both `initialState` and `state`, the initialized state in `state` will take overwrite any corresponding value in `initialState`.\n\n### Controlled State\n\nIf you need easy access to the table state in other areas of your application, TanStack Table makes it easy to control and manage any or all of the table state in your own state management system. You can do this by passing in your own state and state management functions to the `state` and `on[State]Change` table options.\n\n#### Individual Controlled State\n\nYou can control just the state that you need easy access to. You do NOT have to control all of the table state if you do not need to. It is recommended to only control the state that you need on a case-by-case basis.\n\nIn order to control a particular state, you need to both pass in the corresponding `state` value and the `on[State]Change` function to the table instance.\n\nLet's take filtering, sorting, and pagination as an example in a \"manual\" server-side data fetching scenario. You can store the filtering, sorting, and pagination state in your own state management, but leave out any other state like column order, column visibility, etc. if your API does not care about those values.\n\n```ts\nconst columnFilters = ref([]) //no default filters\nconst sorting = ref([{\n  id: 'age',\n  desc: true, //sort by age in descending order by default\n}])\nconst pagination = ref({ pageIndex: 0, pageSize: 15 }\n\n//Use our controlled state values to fetch data\nconst tableQuery = useQuery({\n  queryKey: ['users', columnFilters, sorting, pagination],\n  queryFn: () => fetchUsers(columnFilters, sorting, pagination),\n  //...\n})\n\nconst table = useTable({\n  columns,\n  data: tableQuery.data,\n  //...\n  state: {\n    get columnFilters() {\n      return columnFilters.value\n    },\n    get sorting() {\n      return sorting.value\n    },\n    get pagination() {\n      return pagination.value\n    }\n  },\n  onColumnFiltersChange: updater => {\n    columnFilters.value =\n      updater instanceof Function\n        ? updater(columnFilters.value)\n        : updater\n  },\n  onSortingChange: updater => {\n    sorting.value =\n      updater instanceof Function\n        ? updater(sorting.value)\n        : updater\n  },\n  onPaginationChange: updater => {\n    pagination.value =\n      updater instanceof Function\n        ? updater(pagination.value)\n        : updater\n  },\n})\n//...\n```\n\n#### Fully Controlled State\n\nAlternatively, you can control the entire table state with the `onStateChange` table option. It will hoist out the entire table state into your own state management system. Be careful with this approach, as you might find that raising some frequently changing state values up a react tree, like `columnSizingInfo` state`, might cause bad performance issues.\n\nA couple of more tricks may be needed to make this work. If you use the `onStateChange` table option, the initial values of the `state` must be populated with all of the relevant state values for all of the features that you want to use. You can either manually type out all of the initial state values, or use the `table.setOptions` API in a special way as shown below.\n\n```jsx\n//create a table instance with default state values\nconst table = useTable({\n  get columns() {\n    return columns.value\n  },\n  data,\n  //... Note: `state` values are NOT passed in yet\n})\n\nconst state = ref({\n  ...table.initialState,\n  pagination: {\n    pageIndex: 0,\n    pageSize: 15\n  }\n})\nconst setState = updater => {\n  state.value = updater instanceof Function ? updater(state.value) : updater\n}\n\n//Use the table.setOptions API to merge our fully controlled state onto the table instance\ntable.setOptions(prev => ({\n  ...prev, //preserve any other options that we have set up above\n  get state() {\n    return state.value\n  },\n  onStateChange: setState //any state changes will be pushed up to our own state management\n}))\n```\n\n### On State Change Callbacks\n\nSo far, we have seen the `on[State]Change` and `onStateChange` table options work to \"hoist\" the table state changes into our own state management. However, there are a few things about these using these options that you should be aware of.\n\n#### 1. **State Change Callbacks MUST have their corresponding state value in the `state` option**.\n\nSpecifying an `on[State]Change` callback tells the table instance that this will be a controlled state. If you do not specify the corresponding `state` value, that state will be \"frozen\" with its initial value.\n\n```jsx\nconst sorting = ref([])\nconst setSorting = updater => {\n  sorting.value = updater instanceof Function ? updater(sorting.value) : updater\n}\n//...\nconst table = useTable({\n  columns,\n  data,\n  //...\n  state: {\n    get sorting() {\n      return sorting //required because we are using `onSortingChange`\n    },\n  },\n  onSortingChange: setSorting, //makes the `state.sorting` controlled\n})\n```\n\n#### 2. **Updaters can either be raw values or callback functions**.\n\nThe `on[State]Change` and `onStateChange` callbacks work exactly like the `setState` functions in React. The updater values can either be a new state value or a callback function that takes the previous state value and returns the new state value.\n\nWhat implications does this have? It means that if you want to add in some extra logic in any of the `on[State]Change` callbacks, you can do so, but you need to check whether or not the new incoming updater value is a function or value.\n\nThis is why we have the `updater instanceof Function` check in the `setState` functions above. This check allows us to handle both raw values and callback functions in the same function.\n\n### State Types\n\nAll complex states in TanStack Table have their own TypeScript types that you can import and use. This can be handy for ensuring that you are using the correct data structures and properties for the state values that you are controlling.\n\n```tsx\nimport { useTable, type SortingState } from '@tanstack/vue-table'\n//...\nconst sorting = ref<SortingState[]>([\n  {\n    id: 'age', //you should get autocomplete for the `id` and `desc` properties\n    desc: true,\n  }\n])\n```\n"
  },
  {
    "path": "docs/framework/vue/vue-table.md",
    "content": "---\ntitle: Vue Table\n---\n\nThe `@tanstack/vue-table` adapter is a wrapper around the core table logic. Most of it's job is related to managing state the \"vue\" way, providing types and the rendering implementation of cell/header/footer templates.\n\n## Exports\n\n`@tanstack/vue-table` re-exports all of `@tanstack/table-core`'s APIs and the following:\n\n### `useTable`\n\nTakes an `options` object and returns a table.\n\n```ts\nimport { useTable } from '@tanstack/vue-table'\n\nconst table = useTable(options)\n// ...render your table\n\n```\n\n### `FlexRender`\n\nA Vue component for rendering cell/header/footer templates with dynamic values.\n\nExample:\n\n```vue\nimport { FlexRender } from '@tanstack/vue-table'\n\n<template>\n  <tbody>\n    <tr v-for=\"row in table.getRowModel().rows\" :key=\"row.id\">\n      <td v-for=\"cell in row.getVisibleCells()\" :key=\"cell.id\">\n        <FlexRender\n          :render=\"cell.column.columnDef.cell\"\n          :props=\"cell.getContext()\"\n        />\n      </td>\n    </tr>\n  </tbody>\n</template>\n```\n"
  },
  {
    "path": "docs/guide/cells.md",
    "content": "---\ntitle: Cells Guide\n---\n\n## API\n\n[Cell API](../api/core/cell)\n\n## Cells Guide\n\nThis quick guide will discuss the different ways you can retrieve and interact with `cell` objects in TanStack Table.\n\n### Where to Get Cells From\n\nCells come from [Rows](./rows). Enough said, right? \n\nThere are multiple `row` instance APIs you can use to retrieve the appropriate cells from a row depending on which features you are using. Most commonly, you will use the `row.getAllCells` or `row.getVisibleCells` APIs (if you are using column visibility features), but there are a handful of other similar APIs that you can use.\n\n### Cell Objects\n\nEvery cell object can be associated with a `<td>` or similar cell element in your UI. There are a few properties and methods on `cell` objects that you can use to interact with the table state and extract cell values from the table based on the state of the table.\n\n#### Cell IDs\n\nEvery cell object has an `id` property that makes it unique within the table instance. Each `cell.id` is constructed simply as a union of its parent row and column IDs separated by an underscore.\n\n```js\n{ id: `${row.id}_${column.id}` }\n```\n\nDuring grouping or aggregation features, the `cell.id` will have additional string appended to it.\n\n#### Cell Parent Objects\n\nEvery cell stores a reference to its parent [row](./rows) and [column](./columns) objects.\n\n#### Access Cell Values\n\nThe recommended way to access data values from a cell is to use either the `cell.getValue` or `cell.renderValue` APIs. Using either of these APIs will cache the results of the accessor functions and keep rendering efficient. The only difference between the two is that `cell.renderValue` will return either the value or the `renderFallbackValue` if the value is undefined, whereas `cell.getValue` will return the value or `undefined` if the value is undefined.\n\n> Note: The `cell.getValue` and `cell.renderValue` APIs are shortcuts `row.getValue` and `row.renderValue` APIs, respectively.\n\n```js\n// Access data from any of the columns\nconst firstName = cell.getValue('firstName') // read the cell value from the firstName column\nconst renderedLastName = cell.renderValue('lastName') // render the value from the lastName column\n```\n\n#### Access Other Row Data from Any Cell\n\nSince every cell object is associated with its parent row, you can access any data from the original row that you are using in your table using `cell.row.original`.\n\n```js\n// Even if we are in the scope of a different cell, we can still access the original row data\nconst firstName = cell.row.original.firstName // { firstName: 'John', lastName: 'Doe' }\n```\n\n### More Cell APIs\n\nDepending on the features that you are using for your table, there are dozens more useful APIs for interacting with cells. See each features' respective API docs or guide for more information.\n\n### Cell Rendering\n\nYou can just use the `cell.renderValue` or `cell.getValue` APIs to render the cells of your table. However, these APIs will only spit out the raw cell values (from accessor functions). If you are using the `cell: () => JSX` column definition options, you will want to use the `flexRender` API utility from your adapter.\n\nUsing the `flexRender` API will allow the cell to be rendered correctly with any extra markup or JSX and it will call the callback function with the correct parameters.\n\n```jsx\nimport { flexRender } from '@tanstack/react-table'\n\nconst columns = [\n  {\n    accessorKey: 'fullName',\n    cell: ({ cell, row }) => {\n      return <div><strong>{row.original.firstName}</strong> {row.original.lastName}</div>\n    }\n    //...\n  }\n]\n//...\n<tr>\n  {row.getVisibleCells().map(cell => {\n    return <td key={cell.id}>{flexRender(cell.column.columnDef.cell, cell.getContext())}</td>\n  })}\n</tr>"
  },
  {
    "path": "docs/guide/column-defs.md",
    "content": "---\ntitle: Columns Definitions Guide\n---\n\n## API\n\n[Column Def](../api/core/column-def)\n\n## Column Definitions Guide\n\n> Note: This guide is about setting up column definitions for your table and NOT about the actual [`column`](./columns) objects that are generated within the table instance.\n\nColumn defs are the single most important part of building a table. They are responsible for:\n\n- Building the underlying data model that will be used for everything including sorting, filtering, grouping, etc.\n- Formatting the data model into what will be displayed in the table\n- Creating [header groups](../api/core/header-group), [headers](../api/core/header) and [footers](../api/core/column-def#footer)\n- Creating columns for display-only purposes, eg. action buttons, checkboxes, expanders, sparklines, etc.\n\n## Column Def Types\n\nThe following \"types\" of column defs aren't actually TypeScript types, but more so a way to talk about and describe overall categories of column defs:\n\n- `Accessor Columns`\n  - Accessor columns have an underlying data model which means they can be sorted, filtered, grouped, etc.\n- `Display Columns`\n  - Display columns do **not** have a data model which means they cannot be sorted, filtered, etc, but they can be used to display arbitrary content in the table, eg. a row actions button, checkbox, expander, etc.\n- `Grouping Columns`\n  - Group columns do **not** have a data model so they too cannot be sorted, filtered, etc, and are used to group other columns together. It's common to define a header or footer for a column group.\n\n## Column Helpers\n\nWhile column defs are just plain objects at the end of the day, a `createColumnHelper` function is exposed from the table core which, when called with your features type and row type, returns a utility for creating different column definition types with the highest type-safety possible.\n\nIn v9, `createColumnHelper` requires two type parameters: `TFeatures` (from your `_features` object) and `TData` (your row type). Use `typeof _features` to get the features type.\n\nHere's an example of creating and using a column helper:\n\n```tsx\n// Define your row shape\ntype Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  status: string\n  progress: number\n}\n\nconst _features = tableFeatures({}) // or tableFeatures({ rowSortingFeature, ... })\nconst columnHelper = createColumnHelper<typeof _features, Person>()\n\n// Make some columns! Use columnHelper.columns([...]) for better type inference with nested groups\nconst defaultColumns = columnHelper.columns([\n  // Display Column\n  columnHelper.display({\n    id: 'actions',\n    cell: props => <RowActions row={props.row} />,\n  }),\n  // Grouping Column\n  columnHelper.group({\n    header: 'Name',\n    footer: props => props.column.id,\n    columns: [\n      // Accessor Column\n      columnHelper.accessor('firstName', {\n        cell: info => info.getValue(),\n        footer: props => props.column.id,\n      }),\n      // Accessor Column\n      columnHelper.accessor(row => row.lastName, {\n        id: 'lastName',\n        cell: info => info.getValue(),\n        header: () => <span>Last Name</span>,\n        footer: props => props.column.id,\n      }),\n    ],\n  }),\n  // Grouping Column\n  columnHelper.group({\n    header: 'Info',\n    footer: props => props.column.id,\n    columns: [\n      // Accessor Column\n      columnHelper.accessor('age', {\n        header: () => 'Age',\n        footer: props => props.column.id,\n      }),\n      // Grouping Column\n      columnHelper.group({\n        header: 'More Info',\n        columns: [\n          // Accessor Column\n          columnHelper.accessor('visits', {\n            header: () => <span>Visits</span>,\n            footer: props => props.column.id,\n          }),\n          // Accessor Column\n          columnHelper.accessor('status', {\n            header: 'Status',\n            footer: props => props.column.id,\n          }),\n          // Accessor Column\n          columnHelper.accessor('progress', {\n            header: 'Profile Progress',\n            footer: props => props.column.id,\n          }),\n        ],\n      }),\n    ],\n  }),\n])\n```\n\n## Creating Accessor Columns\n\nData columns are unique in that they must be configured to extract primitive values for each item in your `data` array.\n\nThere are 3 ways to do this:\n\n- If your items are `objects`, use an object-key that corresponds to the value you want to extract.\n- If your items are nested `arrays`, use an array index that corresponds to the value you want to extract.\n- Use an accessor function that returns the value you want to extract.\n\n## Object Keys\n\nIf each of your items is an object with the following shape:\n\n```tsx\ntype Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  status: string\n  progress: number\n}\n```\n\nYou could extract the `firstName` value like so:\n\n```tsx\n\ncolumnHelper.accessor('firstName')\n\n// OR\n\n{\n  accessorKey: 'firstName',\n}\n```\n\n## Deep Keys\n\nIf each of your items is an object with the following shape:\n\n```tsx\ntype Person = {\n  name: {\n    first: string\n    last: string\n  }\n  info: {\n    age: number\n    visits: number\n  }\n}\n```\n\nYou could extract the `first` value like so:\n\n```tsx\ncolumnHelper.accessor('name.first', {\n  id: 'firstName',\n})\n\n// OR\n\n{\n  accessorKey: 'name.first',\n  id: 'firstName',\n}\n```\n\n## Array Indices\n\nIf each of your items is an array with the following shape:\n\n```tsx\ntype Sales = [Date, number]\n```\n\nYou could extract the `number` value like so:\n\n```tsx\ncolumnHelper.accessor(1)\n\n// OR\n\n{\n  accessorKey: 1,\n}\n```\n\n## Accessor Functions\n\nIf each of your items is an object with the following shape:\n\n```tsx\ntype Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  status: string\n  progress: number\n}\n```\n\nYou could extract a computed full-name value like so:\n\n```tsx\ncolumnHelper.accessor(row => `${row.firstName} ${row.lastName}`, {\n  id: 'fullName',\n})\n\n// OR\n\n{\n  id: 'fullName',\n  accessorFn: row => `${row.firstName} ${row.lastName}`,\n}\n```\n\n> 🧠 Remember, the accessed value is what is used to sort, filter, etc. so you'll want to make sure your accessor function returns a primitive value that can be manipulated in a meaningful way. If you return a non-primitive value like an object or array, you will need the appropriate filter/sort/grouping functions to manipulate them, or even supply your own! 😬\n\n## Unique Column IDs\n\nColumns are uniquely identified with 3 strategies:\n\n- If defining an accessor column with an object key or array index, the same will be used to uniquely identify the column.\n  - Any periods (`.`) in an object key will be replaced by underscores (`_`).\n- If defining an accessor column with an accessor function\n  - The columns `id` property will be used to uniquely identify the column OR\n  - If a primitive `string` header is supplied, that header string will be used to uniquely identify the column\n\n> 🧠 An easy way to remember: If you define a column with an accessor function, either provide a string header or provide a unique `id` property.\n\n## Column Formatting & Rendering\n\nBy default, columns cells will display their data model value as a string. You can override this behavior by providing custom rendering implementations. Each implementation is provided relevant information about the cell, header or footer and returns something your framework adapter can render eg. JSX/Components/strings/etc. This will depend on which adapter you are using.\n\nThere are a couple of formatters available to you:\n\n- `cell`: Used for formatting cells.\n- `aggregatedCell`: Used for formatting cells when aggregated.\n- `header`: Used for formatting headers.\n- `footer`: Used for formatting footers.\n\n## Cell Formatting\n\nYou can provide a custom cell formatter by passing a function to the `cell` property and using the `props.getValue()` function to access your cell's value:\n\n```tsx\ncolumnHelper.accessor('firstName', {\n  cell: props => <span>{props.getValue().toUpperCase()}</span>,\n})\n```\n\nCell formatters are also provided the `row` and `table` objects, allowing you to customize the cell formatting beyond just the cell value. The example below provides `firstName` as the accessor, but also displays a prefixed user ID located on the original row object:\n\n```tsx\ncolumnHelper.accessor('firstName', {\n  cell: props => (\n    <span>{`${props.row.original.id} - ${props.getValue()}`}</span>\n  ),\n})\n```\n\n## Aggregated Cell Formatting\n\nFor more info on aggregated cells, see [grouping](./grouping).\n\n## Header & Footer Formatting\n\nHeaders and footers do not have access to row data, but still use the same concepts for displaying custom content.\n"
  },
  {
    "path": "docs/guide/column-faceting.md",
    "content": "---\ntitle: Column Faceting Guide\n---\n\n## Examples\n\nWant to skip to the implementation? Check out these examples:\n\n- [filters-faceted](../framework/react/examples/filters-faceted)\n\n## API\n\n[Column Faceting API](../api/features/column-faceting)\n\n## Column Faceting Guide\n\nColumn Faceting is a feature that allows you to generate lists of values for a given column from that column's data. For example, a list of unique values in a column can be generated from all rows in that column to be used as search suggestions in an autocomplete filter component. Or, a tuple of minimum and maximum values can be generated from a column of numbers to be used as a range for a range slider filter component.\n\n### Column Faceting Row Models\n\nIn order to use any of the column faceting features, add the `columnFacetingFeature` to your features and the appropriate faceted row models to `_rowModels`.\n\n```ts\nimport {\n  useTable,\n  tableFeatures,\n  columnFacetingFeature,\n  createFacetedRowModel,\n  createFacetedMinMaxValues,\n  createFacetedUniqueValues,\n} from '@tanstack/react-table'\n\nconst _features = tableFeatures({ columnFacetingFeature })\n\nconst table = useTable({\n  _features,\n  _rowModels: {\n    facetedRowModel: createFacetedRowModel(), // required for faceting (other faceted row models depend on this)\n    facetedMinMaxValues: createFacetedMinMaxValues(), // if you need min/max values\n    facetedUniqueValues: createFacetedUniqueValues(), // if you need a list of unique values\n  },\n  columns,\n  data,\n})\n```\n\nFirst, you must include the `facetedRowModel`. This row model will generate a list of values for a given column. If you need a list of unique values, include the `facetedUniqueValues` row model. If you need a tuple of minimum and maximum values, include the `facetedMinMaxValues` row model.\n\n### Use Faceted Row Models\n\nOnce you have included the appropriate row models in your table options, you will be able to use the faceting column instance APIs to access the lists of values generated by the faceted row models.\n\n```ts\n// list of unique values for autocomplete filter\nconst autoCompleteSuggestions = \n Array.from(column.getFacetedUniqueValues().keys())\n  .sort()\n  .slice(0, 5000);\n```\n\n```ts\n// tuple of min and max values for range filter\nconst [min, max] = column.getFacetedMinMaxValues() ?? [0, 1];\n```\n\n### Custom (Server-Side) Faceting\n\nIf instead of using the built-in client-side faceting features, you can implement your own faceting logic on the server-side and pass the faceted values to the client-side. You can use the `getFacetedUniqueValues` and `getFacetedMinMaxValues` table options to resolve the faceted values from the server-side.\n\n```ts\nconst facetingQuery = useQuery(\n  //...\n)\n\nconst table = useTable({\n  _features,\n  _rowModels: {\n    facetedRowModel: createFacetedRowModel(),\n    facetedUniqueValues: createFacetedUniqueValues(),\n    facetedMinMaxValues: createFacetedMinMaxValues(),\n  },\n  columns,\n  data,\n  getFacetedUniqueValues: (table, columnId) => {\n    const uniqueValueMap = new Map<string, number>()\n    //...\n    return uniqueValueMap\n  },\n  getFacetedMinMaxValues: (table, columnId) => {\n    //...\n    return [min, max]\n  },\n  //...\n})\n```\n\nAlternatively, you don't have to put any of your faceting logic through the TanStack Table APIs at all. Just fetch your lists and pass them to your filter components directly."
  },
  {
    "path": "docs/guide/column-filtering.md",
    "content": "---\ntitle: Column Filtering Guide\n---\n\n## Examples\n\nWant to skip to the implementation? Check out these examples:\n\n- [Column Filters](../framework/react/examples/filters)\n- [Faceted Filters](../framework/react/examples/filters-faceted) (Autocomplete and Range filters)\n- [Fuzzy Search](../framework/react/examples/filters-fuzzy) (Match Sorter)\n- [Editable Data](../framework/react/examples/editable-data)\n- [Expanding](../framework/react/examples/expanding) (Filtering from Sub-Rows)\n- [Grouping](../framework/react/examples/grouping)\n- [Pagination](../framework/react/examples/pagination)\n- [Row Selection](../framework/react/examples/row-selection)\n\n## API\n\n[Column Filtering API](../api/features/column-filtering)\n\n## Column Filtering Guide\n\nFiltering comes in 2 flavors: Column Filtering and Global Filtering.\n\nThis guide will focus on column filtering, which is a filter that is applied to a single column's accessor value.\n\nTanStack table supports both client-side and manual server-side filtering. This guide will go over how to implement and customize both, and help you decide which one is best for your use-case.\n\n### Client-Side vs Server-Side Filtering\n\nIf you have a large dataset, you may not want to load all of that data into the client's browser in order to filter it. In this case, you will most likely want to implement server-side filtering, sorting, pagination, etc. \n\nHowever, as also discussed in the [Pagination Guide](./pagination#should-you-use-client-side-pagination), a lot of developers underestimate how many rows can be loaded client-side without a performance hit. The TanStack table examples are often tested to handle up to 100,000 rows or more with decent performance for client-side filtering, sorting, pagination, and grouping. This doesn't necessarily mean that your app will be able to handle that many rows, but if your table is only going to have a few thousand rows at most, you might be able to take advantage of the client-side filtering, sorting, pagination, and grouping that TanStack table provides.\n\n> TanStack Table can handle thousands of client-side rows with good performance. Don't rule out client-side filtering, pagination, sorting, etc. without some thought first.\n\nEvery use-case is different and will depend on the complexity of the table, how many columns you have, how large every piece of data is, etc. The main bottlenecks to pay attention to are:\n\n1. Can your server query all of the data in a reasonable amount of time (and cost)?\n2. What is the total size of the fetch? (This might not scale as badly as you think if you don't have many columns.)\n3. Is the client's browser using too much memory if all of the data is loaded at once?\n\nIf you're not sure, you can always start with client-side filtering and pagination and then switch to server-side strategies in the future as your data grows.\n\n### Manual Server-Side Filtering\n\nIf you have decided that you need to implement server-side filtering instead of using the built-in client-side filtering, here's how you do that.\n\nNo `filteredRowModel` is needed for manual server-side filtering. Instead, the `data` that you pass to the table should already be filtered. However, if you have added a `filteredRowModel` to `_rowModels`, you can tell the table to skip it by setting the `manualFiltering` option to `true`.\n\n```jsx\nconst table = useTable({\n  _features: tableFeatures({ columnFilteringFeature }),\n  _rowModels: {}, // no filteredRowModel needed for manual server-side filtering\n  data,\n  columns,\n  manualFiltering: true,\n})\n```\n\n> **Note:** When using manual filtering, many of the options that are discussed in the rest of this guide will have no effect. When `manualFiltering` is set to `true`, the table instance will not apply any filtering logic to the rows that are passed to it. Instead, it will assume that the rows are already filtered and will use the `data` that you pass to it as-is.\n\n### Client-Side Filtering\n\nIf you are using the built-in client-side filtering features, add the `columnFilteringFeature` to your features and the `filteredRowModel` to your row models. Import `createFilteredRowModel` and `filterFns` from TanStack Table:\n\n```jsx\nimport {\n  useTable,\n  tableFeatures,\n  columnFilteringFeature,\n  createFilteredRowModel,\n  filterFns,\n} from '@tanstack/react-table'\n\nconst _features = tableFeatures({ columnFilteringFeature })\n\nconst table = useTable({\n  _features,\n  _rowModels: {\n    filteredRowModel: createFilteredRowModel(filterFns),\n  },\n  data,\n  columns,\n})\n```\n\n### Column Filter State\n\nWhether or not you use client-side or server-side filtering, you can take advantage of the built-in column filter state management that TanStack Table provides. There are many table and column APIs to mutate and interact with the filter state and retrieving the column filter state.\n\nThe column filtering state is defined as an array of objects with the following shape:\n\n```ts\ninterface ColumnFilter {\n  id: string\n  value: unknown\n}\ntype ColumnFiltersState = ColumnFilter[]\n```\n\nSince the column filter state is an array of objects, you can have multiple column filters applied at once.\n\n#### Accessing Column Filter State\n\nYou can access the column filter state from the table instance just like any other table state using the `table.store.state` API.\n\n```jsx\nconst table = useTable({\n  _features,\n  _rowModels: { filteredRowModel: createFilteredRowModel(filterFns) },\n  columns,\n  data,\n  //...\n})\n\nconsole.log(table.store.state.columnFilters) // access the column filters state from the table instance\n```\n\nHowever, if you need to access the column filter state before the table is initialized, you can \"control\" the column filter state like down below.\n\n### Controlled Column Filter State\n\nIf you need easy access to the column filter state, you can control/manage the column filter state in your own state management with the `state.columnFilters` and `onColumnFiltersChange` table options.\n\n```tsx\nconst [columnFilters, setColumnFilters] = useState<ColumnFiltersState>([]) // can set initial column filter state here\n//...\nconst table = useTable({\n  _features,\n  _rowModels: { filteredRowModel: createFilteredRowModel(filterFns) },\n  columns,\n  data,\n  //...\n  state: {\n    columnFilters,\n  },\n  onColumnFiltersChange: setColumnFilters,\n})\n```\n\n#### Initial Column Filter State\n\nIf you do not need to control the column filter state in your own state management or scope, but you still want to set an initial column filter state, you can use the `initialState` table option instead of `state`.\n\n```jsx\nconst table = useTable({\n  _features,\n  _rowModels: { filteredRowModel: createFilteredRowModel(filterFns) },\n  columns,\n  data,\n  //...\n  initialState: {\n    columnFilters: [\n      {\n        id: 'name',\n        value: 'John', // filter the name column by 'John' by default\n      },\n    ],\n  },\n})\n```\n\n> **NOTE**: Do not use both `initialState.columnFilters` and `state.columnFilters` at the same time, as the initialized state in the `state.columnFilters` will override the `initialState.columnFilters`.\n\n### FilterFns\n\nEach column can have its own unique filtering logic. Choose from any of the filter functions that are provided by TanStack Table, or create your own.\n\nBy default there are 10 built-in filter functions to choose from:\n\n- `includesString` - Case-insensitive string inclusion\n- `includesStringSensitive` - Case-sensitive string inclusion\n- `equalsString` - Case-insensitive string equality\n- `equalsStringSensitive` - Case-sensitive string equality\n- `arrIncludes` - Item inclusion within an array\n- `arrIncludesAll` - All items included in an array\n- `arrIncludesSome` - Some items included in an array\n- `equals` - Object/referential equality `Object.is`/`===`\n- `weakEquals` - Weak object/referential equality `==`\n- `inNumberRange` - Number range inclusion\n\nYou can also define your own custom filter functions either as the `filterFn` column option, or as a global filter function using the `filterFns` table option.\n\n#### Custom Filter Functions\n\n> **Note:** These filter functions only run during client-side filtering.\n\nWhen defining a custom filter function in either the `filterFn` column option or the `filterFns` table option, it should have the following signature:\n\n```ts\nconst myCustomFilterFn: FilterFn = (row: Row, columnId: string, filterValue: any, addMeta: (meta: any) => void) => boolean\n```\n\nEvery filter function receives:\n\n- The row to filter\n- The columnId to use to retrieve the row's value\n- The filter value\n\nand should return `true` if the row should be included in the filtered rows, and `false` if it should be removed.\n\n```jsx\nconst columns = [\n  {\n    header: () => 'Name',\n    accessorKey: 'name',\n    filterFn: 'includesString', // use built-in filter function\n  },\n  {\n    header: () => 'Age',\n    accessorKey: 'age',\n    filterFn: 'inNumberRange',\n  },\n  {\n    header: () => 'Birthday',\n    accessorKey: 'birthday',\n    filterFn: 'myCustomFilterFn', // use custom global filter function\n  },\n  {\n    header: () => 'Profile',\n    accessorKey: 'profile',\n    // use custom filter function directly\n    filterFn: (row, columnId, filterValue) => {\n      return // true or false based on your custom logic\n    },\n  }\n]\n//...\nconst table = useTable({\n  _features,\n  _rowModels: {\n    filteredRowModel: createFilteredRowModel({\n      ...filterFns,\n      myCustomFilterFn: (row, columnId, filterValue) => {\n        return // true or false based on your custom logic\n      },\n      startsWith: startsWithFilterFn, // defined elsewhere\n    }),\n  },\n  columns,\n  data,\n})\n```\n\n##### Customize Filter Function Behavior\n\nYou can attach a few other properties to filter functions to customize their behavior:\n\n- `filterFn.resolveFilterValue` - This optional \"hanging\" method on any given `filterFn` allows the filter function to transform/sanitize/format the filter value before it is passed to the filter function.\n\n- `filterFn.autoRemove` - This optional \"hanging\" method on any given `filterFn` is passed a filter value and expected to return `true` if the filter value should be removed from the filter state. eg. Some boolean-style filters may want to remove the filter value from the table state if the filter value is set to `false`.\n\n```tsx\nconst startsWithFilterFn = <TData extends MRT_RowData>(\n  row: Row<TFeatures, TData>,\n  columnId: string,\n  filterValue: number | string, //resolveFilterValue will transform this to a string\n) =>\n  row\n    .getValue<number | string>(columnId)\n    .toString()\n    .toLowerCase()\n    .trim()\n    .startsWith(filterValue); // toString, toLowerCase, and trim the filter value in `resolveFilterValue`\n\n// remove the filter value from filter state if it is falsy (empty string in this case)\nstartsWithFilterFn.autoRemove = (val: any) => !val; \n\n// transform/sanitize/format the filter value before it is passed to the filter function\nstartsWithFilterFn.resolveFilterValue = (val: any) => val.toString().toLowerCase().trim(); \n```\n\n### Customize Column Filtering\n\nThere are a lot of table and column options that you can use to further customize the column filtering behavior.\n\n#### Disable Column Filtering\n\nBy default, column filtering is enabled for all columns. You can disable the column filtering for all columns or for specific columns by using the `enableColumnFilters` table option or the `enableColumnFilter` column option. You can also turn off both column and global filtering by setting the `enableFilters` table option to `false`.\n\nDisabling column filtering for a column will cause the `column.getCanFilter` API to return `false` for that column.\n\n```jsx\nconst columns = [\n  {\n    header: () => 'Id',\n    accessorKey: 'id',\n    enableColumnFilter: false, // disable column filtering for this column\n  },\n  //...\n]\n//...\nconst table = useTable({\n  _features,\n  _rowModels: { filteredRowModel: createFilteredRowModel(filterFns) },\n  columns,\n  data,\n  enableColumnFilters: false, // disable column filtering for all columns\n})\n```\n\n#### Filtering Sub-Rows (Expanding)\n\nThere are a few additional table options to customize the behavior of column filtering when using features like expanding, grouping, and aggregation.\n\n##### Filter From Leaf Rows\n\nBy default, filtering is done from parent rows down, so if a parent row is filtered out, all of its child sub-rows will be filtered out as well. Depending on your use-case, this may be the desired behavior if you only want the user to be searching through the top-level rows, and not the sub-rows. This is also the most performant option.\n\nHowever, if you want to allow sub-rows to be filtered and searched through, regardless of whether the parent row is filtered out, you can set the `filterFromLeafRows` table option to `true`. Setting this option to `true` will cause filtering to be done from leaf rows up, which means parent rows will be included so long as one of their child or grand-child rows is also included.\n\n```jsx\nconst table = useTable({\n  _features: tableFeatures({ columnFilteringFeature, rowExpandingFeature }),\n  _rowModels: {\n    filteredRowModel: createFilteredRowModel(filterFns),\n    expandedRowModel: createExpandedRowModel(),\n  },\n  columns,\n  data,\n  filterFromLeafRows: true, // filter and search through sub-rows\n})\n```\n\n##### Max Leaf Row Filter Depth\n\nBy default, filtering is done for all rows in a tree, no matter if they are root level parent rows or the child leaf rows of a parent row. Setting the `maxLeafRowFilterDepth` table option to `0` will cause filtering to only be applied to the root level parent rows, with all sub-rows remaining unfiltered. Similarly, setting this option to `1` will cause filtering to only be applied to child leaf rows 1 level deep, and so on.\n\nUse `maxLeafRowFilterDepth: 0` if you want to preserve a parent row's sub-rows from being filtered out while the parent row is passing the filter.\n\n```jsx\nconst table = useTable({\n  _features: tableFeatures({ columnFilteringFeature, rowExpandingFeature }),\n  _rowModels: {\n    filteredRowModel: createFilteredRowModel(filterFns),\n    expandedRowModel: createExpandedRowModel(),\n  },\n  columns,\n  data,\n  maxLeafRowFilterDepth: 0, // only filter root level parent rows out\n})\n```\n\n### Column Filter APIs\n\nThere are a lot of Column and Table APIs that you can use to interact with the column filter state and hook up to your UI components. Here is a list of the available APIs and their most common use-cases:\n\n- `table.setColumnFilters` - Overwrite the entire column filter state with a new state.\n- `table.resetColumnFilters` - Useful for a \"clear all/reset filters\" button.\n\n- **`column.getFilterValue`** - Useful for getting the default initial filter value for an input, or even directly providing the filter value to a filter input.\n- **`column.setFilterValue`** - Useful for connecting filter inputs to their `onChange` or `onBlur` handlers.\n\n- `column.getCanFilter` - Useful for disabling/enabling filter inputs.\n- `column.getIsFiltered` - Useful for displaying a visual indicator that a column is currently being filtered.\n- `column.getFilterIndex` - Useful for displaying in what order the current filter is being applied.\n\n- `column.getAutoFilterFn` - Used internally to find the default filter function for a column if none is specified.\n- `column.getFilterFn` - Useful for displaying which filter mode or function is currently being used.\n"
  },
  {
    "path": "docs/guide/column-ordering.md",
    "content": "---\ntitle: Column Ordering Guide\n---\n\n## Examples\n\nWant to skip to the implementation? Check out these examples:\n\n- [column-ordering](../framework/react/examples/column-ordering)\n- [column-dnd](../framework/react/examples/column-dnd)\n\n## API\n\n[Column Ordering API](../api/features/column-ordering)\n\n## Column Ordering Guide\n\nBy default, columns are ordered in the order they are defined in the `columns` array. However, you can manually specify the column order using the `columnOrder` state. Other features like column pinning and grouping can also affect the column order.\n\n### What Affects Column Order\n\nThere are 3 table features that can reorder columns, which happen in the following order:\n\n1. [Column Pinning](./column-pinning) - If pinning, columns are split into left, center (unpinned), and right pinned columns.\n2. Manual **Column Ordering** - A manually specified column order is applied.\n3. [Grouping](./grouping) - If grouping is enabled, a grouping state is active, and `tableOptions.groupedColumnMode` is set to `'reorder' | 'remove'`, then the grouped columns are reordered to the start of the column flow.\n\n> **Note:** `columnOrder` state will only affect unpinned columns if used in conjunction with column pinning.\n\n### Column Order State\n\nIf you don't provide a `columnOrder` state, TanStack Table will just use the order of the columns in the `columns` array. However, you can provide an array of string column ids to the `columnOrder` state to specify the order of the columns.\n\n#### Default Column Order\n\nIf all you need to do is specify the initial column order, you can just specify the `columnOrder` state in the `initialState` table option.\n\n```jsx\nconst table = useTable({\n  _features: tableFeatures({ columnOrderingFeature }),\n  _rowModels: {},\n  //...\n  initialState: {\n    columnOrder: ['columnId1', 'columnId2', 'columnId3'],\n  },\n  //...\n})\n```\n\n> **Note:** If you are using the `state` table option to also specify the `columnOrder` state, the `initialState` will have no effect. Only specify particular states in either `initialState` or `state`, not both.\n\n#### Managing Column Order State\n\nIf you need to dynamically change the column order, or set the column order after the table has been initialized, you can manage the `columnOrder` state just like any other table state.\n\n```jsx\nconst [columnOrder, setColumnOrder] = useState<string[]>(['columnId1', 'columnId2', 'columnId3'])\n//...\nconst table = useTable({\n  _features: tableFeatures({ columnOrderingFeature }),\n  _rowModels: {},\n  //...\n  state: {\n    columnOrder,\n    //...\n  }\n  onColumnOrderChange: setColumnOrder,\n  //...\n});\n```\n\n### Reordering Columns\n\nIf the table has UI that allows the user to reorder columns, you can set up the logic something like this:\n\n```tsx\nconst [columnOrder, setColumnOrder] = useState<string[]>(columns.map(c => c.id));\n\n//depending on your dnd solution of choice, you may or may not need state like this\nconst [movingColumnId, setMovingColumnId] = useState<string | null>(null);\nconst [targetColumnId, setTargetColumnId] = useState<string | null>(null);\n\n//util function to splice and reorder the columnOrder array\nconst reorderColumn = <TFeatures extends TableFeatures,  TData extends RowData>(\n  movingColumnId: Column<TFeatures, TData>,\n  targetColumnId: Column<TFeatures, TData>,\n): string[] => {\n  const newColumnOrder = [...columnOrder];\n  newColumnOrder.splice(\n    newColumnOrder.indexOf(targetColumnId),\n    0,\n    newColumnOrder.splice(newColumnOrder.indexOf(movingColumnId), 1)[0],\n  );\n  setColumnOrder(newColumnOrder);\n};\n\nconst handleDragEnd = (e: DragEvent) => {\n  if(!movingColumnId || !targetColumnId) return;\n  setColumnOrder(reorderColumn(movingColumnId, targetColumnId));\n};\n\n//use your dnd solution of choice\n```\n\n#### Drag and Drop Column Reordering Suggestions (React)\n\nThere are undoubtedly many ways to implement drag and drop features along-side TanStack Table. Here are a few suggestions in order for you to not have a bad time:\n\n1. Do NOT try to use [`\"react-dnd\"`](https://react-dnd.github.io/react-dnd/docs/overview) _if you are using React 18 or newer_. React DnD was an important library for its time, but it now does not get updated very often, and it has incompatibilities with React 18, especially in React Strict Mode. It is still possible to get it to work, but there are newer alternatives that have better compatibility and are more actively maintained. React DnD's Provider may also interfere and conflict with any other DnD solutions you may want to try in your app.\n\n2. Use [`\"@dnd-kit/core\"`](https://dndkit.com/). DnD Kit is a modern, modular and lightweight drag and drop library that is highly compatible with the modern React ecosystem, and it works well with semantic `<table>` markup. Both of the official TanStack DnD examples, [Column DnD](../framework/react/examples/column-dnd) and [Row DnD](../framework/react/examples/row-dnd), now use DnD Kit.\n\n3. Consider other DnD libraries like [`\"react-beautiful-dnd\"`](https://github.com/atlassian/react-beautiful-dnd), but be aware of their potentially large bundle sizes, maintenance status, and compatibility with `<table>` markup.\n\n4. Consider using native browser events and state management to implement lightweight drag and drop features. However, be aware that this approach may not be best for mobile users if you do not go the extra mile to implement proper touch events. [Material React Table V2](https://www.material-react-table.com/docs/examples/column-ordering) is an example of a library that implements TanStack Table with only browser drag and drop events such as `onDragStart`, `onDragEnd`, `onDragEnter` and no other dependencies. Browse its source code to see how it is done."
  },
  {
    "path": "docs/guide/column-pinning.md",
    "content": "---\ntitle: Column Pinning Guide\n---\n\n## Examples\n\nWant to skip to the implementation? Check out these examples:\n\n- [column-pinning](../framework/react/examples/column-pinning)\n- [sticky-column-pinning](../framework/react/examples/column-pinning-sticky)\n\n ### Other Examples\n \n- [Svelte column-pinning](../framework/svelte/examples/column-pinning)\n- [Vue column-pinning](../framework/vue/examples/column-pinning)\n\n## API\n\n[Column Pinning API](../api/features/column-pinning)\n\n## Column Pinning Guide\n\nTanStack Table offers state and APIs helpful for implementing column pinning features in your table UI. You can implement column pinning in multiple ways. You can either split pinned columns into their own separate tables, or you can keep all columns in the same table, but use the pinning state to order the columns correctly and use sticky CSS to pin the columns to the left or right.\n\n### How Column Pinning Affects Column Order\n\nThere are 3 table features that can reorder columns, which happen in the following order:\n\n1. **Column Pinning** - If pinning, columns are split into left, center (unpinned), and right pinned columns.\n2. Manual [Column Ordering](./column-ordering) - A manually specified column order is applied.\n3. [Grouping](./grouping) - If grouping is enabled, a grouping state is active, and `tableOptions.groupedColumnMode` is set to `'reorder' | 'remove'`, then the grouped columns are reordered to the start of the column flow.\n\nThe only way to change the order of the pinned columns is in the `columnPinning.left` and `columnPinning.right` state itself. `columnOrder` state will only affect the order of the unpinned (\"center\") columns.\n\n### Column Pinning State\n\nManaging the `columnPinning` state is optional, and usually not necessary unless you are adding persistent state features. TanStack Table will already keep track of the column pinning state for you. Manage the `columnPinning` state just like any other table state if you need to.\n\n```jsx\nimport { useTable, tableFeatures, columnPinningFeature } from '@tanstack/react-table'\n\nconst _features = tableFeatures({ columnPinningFeature })\n\nconst [columnPinning, setColumnPinning] = useState<ColumnPinningState>({\n  left: [],\n  right: [],\n})\n\nconst table = useTable({\n  _features,\n  _rowModels: {},\n  //...\n  state: {\n    columnPinning,\n    //...\n  },\n  onColumnPinningChange: setColumnPinning,\n  //...\n})\n```\n\n### Pin Columns by Default\n\nA very common use case is to pin some columns by default. You can do this by either initializing the `columnPinning` state with the pinned columnIds, or by using the `initialState` table option\n\n```jsx\nconst table = useTable({\n  _features,\n  _rowModels: {},\n  //...\n  initialState: {\n    columnPinning: {\n      left: ['expand-column'],\n      right: ['actions-column'],\n    },\n    //...\n  },\n  //...\n})\n```\n\n### Useful Column Pinning APIs\n\n> Note: These APIs are available when using `columnPinningFeature`.\n\nThere are a handful of useful Column API methods to help you implement column pinning features:\n\n- [`column.getCanPin`](../api/features/column-pinning#getcanpin): Use to determine if a column can be pinned.\n- [`column.pin`](../api/features/column-pinning#pin): Use to pin a column to the left or right. Or use to unpin a column.\n- [`column.getIsPinned`](../api/features/column-pinning#getispinned): Use to determine where a column is pinned.\n- [`column.getStart`](../api/features/column-pinning#getstart): Use to provide the correct `left` CSS value for a pinned column.\n- [`column.getAfter`](../api/features/column-pinning#getafter): Use to provide the correct `right` CSS value for a pinned column.\n- [`column.getIsLastColumn`](../api/features/column-pinning#getislastcolumn): Use to determine if a column is the last column in its pinned group. Useful for adding a box-shadow\n- [`column.getIsFirstColumn`](../api/features/column-pinning#getisfirstcolumn): Use to determine if a column is the first column in its pinned group. Useful for adding a box-shadow\n\n### Split Table Column Pinning\n\nIf you are just using sticky CSS to pin columns, you can for the most part, just render the table as you normally would with the `table.getHeaderGroups` and `row.getVisibleCells` methods.\n\nHowever, if you are splitting up pinned columns into their own separate tables, you can make use of the `table.getLeftHeaderGroups`, `table.getCenterHeaderGroups`, `table.getRightHeaderGroups`, `row.getLeftVisibleCells`, `row.getCenterVisibleCells`, and `row.getRightVisibleCells` methods to only render the columns that are relevant to the current table.\n"
  },
  {
    "path": "docs/guide/column-sizing.md",
    "content": "---\ntitle: Column Sizing Guide\n---\n\n## Examples\n\nWant to skip to the implementation? Check out these examples:\n\n- [column-sizing](../framework/react/examples/column-sizing)\n- [column-resizing-performant](../framework/react/examples/column-resizing-performant)\n\n## API\n\n[Column Sizing API](../api/features/column-sizing)\n\n## Column Sizing Guide\n\nThe column sizing feature allows you to optionally specify the width of each column including min and max widths. It also allows you and your users the ability to dynamically change the width of all columns at will, eg. by dragging the column headers.\n\n### Column Widths\n\nColumns by default are given the following measurement options:\n\n```tsx\nexport const defaultColumnSizing = {\n  size: 150,\n  minSize: 20,\n  maxSize: Number.MAX_SAFE_INTEGER,\n}\n```\n\nThese defaults can be overridden by both `tableOptions.defaultColumn` and individual column defs, in that order.\n\n```tsx\nconst columns = [\n  {\n    accessorKey: 'col1',\n    size: 270, //set column size for this column\n  },\n  //...\n]\n\nconst table = useTable({\n  _features: tableFeatures({ columnSizingFeature, columnResizingFeature }), // columnResizingFeature for drag-to-resize\n  _rowModels: {},\n  defaultColumn: {\n    size: 200, // starting column size\n    minSize: 50, // enforced during column resizing\n    maxSize: 500, // enforced during column resizing\n  },\n  //...\n})\n```\n\nThe column \"sizes\" are stored in the table state as numbers, and are usually interpreted as pixel unit values, but you can hook up these column sizing values to your css styles however you see fit.\n\nAs a headless utility, table logic for column sizing is really only a collection of states that you can apply to your own layouts how you see fit (our example above implements 2 styles of this logic). You can apply these width measurements in a variety of ways:\n\n- semantic `table` elements or any elements being displayed in a table css mode\n- `div/span` elements or any elements being displayed in a non-table css mode\n  - Block level elements with strict widths\n  - Absolutely positioned elements with strict widths\n  - Flexbox positioned elements with loose widths\n  - Grid positioned elements with loose widths\n- Really any layout mechanism that can interpolate cell widths into a table structure.\n\nEach of these approaches has its own tradeoffs and limitations which are usually opinions held by a UI/component library or design system, luckily not you 😉.\n\n### Column Resizing\n\nTanStack Table provides built-in column resizing state and APIs that allow you to easily implement column resizing in your table UI with a variety of options for UX and performance.\n\n#### Enable Column Resizing\n\nBy default, the `column.getCanResize()` API will return `true` by default for all columns, but you can either disable column resizing for all columns with the `enableColumnResizing` table option, or disable column resizing on a per-column basis with the `enableResizing` column option.\n\n```tsx\nconst columns = [\n  {\n    accessorKey: 'id',\n    enableResizing: false, //disable resizing for just this column\n    size: 200, //starting column size\n  },\n  //...\n]\n```\n\n#### Column Resize Mode\n\nBy default, the column resize mode is set to `\"onEnd\"`. This means that the `column.getSize()` API will not return the new column size until the user has finished resizing (dragging) the column. Usually a small UI indicator will be displayed while the user is resizing the column.\n\nIn React TanStack Table adapter, where achieving 60 fps column resizing renders can be difficult, depending on the complexity of your table or web page, the `\"onEnd\"` column resize mode can be a good default option to avoid stuttering or lagging while the user resizes columns. That is not to say that you cannot achieve 60 fps column resizing renders while using TanStack React Table, but you may have to do some extra memoization or other performance optimizations in order to achieve this.\n\n> Advanced column resizing performance tips will be discussed [down below](#advanced-column-resizing-performance).\n\nIf you want to change the column resize mode to `\"onChange\"` for immediate column resizing renders, you can do so with the `columnResizeMode` table option.\n\n```tsx\nconst table = useTable({\n  //...\n  columnResizeMode: 'onChange', //change column resize mode to \"onChange\"\n})\n```\n\n#### Column Resize Direction\n\nBy default, TanStack Table assumes that the table markup is laid out in a left-to-right direction. For right-to-left layouts, you may need to change the column resize direction to `\"rtl\"`.\n\n```tsx\nconst table = useTable({\n  //...\n  columnResizeDirection: 'rtl', //change column resize direction to \"rtl\" for certain locales\n})\n```\n\n#### Connect Column Resizing APIs to UI\n\nThere are a few really handy APIs that you can use to hook up your column resizing drag interactions to your UI.\n\n##### Column Size APIs\n\nTo apply the size of a column to the column head cells, data cells, or footer cells, you can use the following APIs:\n\n```ts\nheader.getSize()\ncolumn.getSize()\ncell.column.getSize()\n```\n\nHow you apply these size styles to your markup is up to you, but it is pretty common to use either CSS variables or inline styles to apply the column sizes.\n\n```tsx\n<th\n  key={header.id}\n  colSpan={header.colSpan}\n  style={{ width: `${header.getSize()}px` }}\n>\n```\n\nThough, as discussed in the [advanced column resizing performance section](#advanced-column-resizing-performance), you may want to consider using CSS variables to apply column sizes to your markup.\n\n##### Column Resize APIs\n\nTanStack Table provides a pre-built event handler to make your drag interactions easy to implement. These event handlers are just convenience functions that call other internal APIs to update the column sizing state and re-render the table. Use `header.getResizeHandler()` to connect to your column resize drag interactions, for both mouse and touch events.\n\n```tsx\n<ColumnResizeHandle\n  onMouseDown={header.getResizeHandler()} //for desktop\n  onTouchStart={header.getResizeHandler()} //for mobile\n/>\n```\n\n##### Column Resize Indicator with ColumnSizingInfoState\n\nTanStack Table keeps track of an state object called `columnSizingInfo` that you can use to render a column resize indicator UI.\n\n```jsx\n<ColumnResizeIndicator\n  style={{\n    transform: header.column.getIsResizing()\n      ? `translateX(${table.store.state.columnSizingInfo.deltaOffset}px)`\n      : '',\n  }}\n/>\n```\n\n#### Advanced Column Resizing Performance\n\nIf you are creating large or complex tables (and using React 😉), you may find that if you do not add proper memoization to your render logic, your users may experience degraded performance while resizing columns.\n\nWe have created a [performant column resizing example](../framework/react/examples/column-resizing-performant) that demonstrates how to achieve 60 fps column resizing renders with a complex table that may otherwise have slow renders. It is recommended that you just look at that example to see how it is done, but these are the basic things to keep in mind:\n\n1. Don't use `column.getSize()` on every header and every data cell. Instead, calculate all column widths once upfront, **memoized**!\n2. Memoize your Table Body while resizing is in progress.\n3. Use CSS variables to communicate column widths to your table cells.\n\nIf you follow these steps, you should see significant performance improvements while resizing columns.\n\nIf you are not using React, and are using the Svelte, Vue, or Solid adapters instead, you may not need to worry about this as much, but similar principles apply.\n"
  },
  {
    "path": "docs/guide/column-visibility.md",
    "content": "---\ntitle: Column Visibility Guide\n---\n\n## Examples\n\nWant to skip to the implementation? Check out these examples:\n\n- [column-visibility](../framework/react/examples/column-visibility)\n- [column-ordering](../framework/react/examples/column-ordering)\n- [sticky-column-pinning](../framework/react/examples/column-pinning-sticky)\n\n### Other Examples\n\n- [SolidJS column-visibility](../framework/solid/examples/column-visibility)\n- [Svelte column-visibility](../framework/svelte/examples/column-visibility)\n\n## API\n\n[Column Visibility API](../api/features/column-visibility)\n\n## Column Visibility Guide\n\nThe column visibility feature allows table columns to be hidden or shown dynamically. In v9, add `columnVisibilityFeature` to your `_features` to enable this. There is a dedicated `columnVisibility` state and APIs for managing column visibility dynamically.\n\n### Column Visibility State\n\nThe `columnVisibility` state is a map of column IDs to boolean values. A column will be hidden if its ID is present in the map and the value is `false`. If the column ID is not present in the map, or the value is `true`, the column will be shown.\n\n```jsx\nimport { useTable, tableFeatures, columnVisibilityFeature } from '@tanstack/react-table'\n\nconst [columnVisibility, setColumnVisibility] = useState({\n  columnId1: true,\n  columnId2: false, // hide this column by default\n  columnId3: true,\n})\n\nconst table = useTable({\n  _features: tableFeatures({ columnVisibilityFeature }),\n  _rowModels: {},\n  //...\n  state: {\n    columnVisibility,\n    //...\n  },\n  onColumnVisibilityChange: setColumnVisibility,\n})\n```\n\nAlternatively, if you don't need to manage the column visibility state outside of the table, you can still set the initial default column visibility state using the `initialState` option.\n\n> **Note**: If `columnVisibility` is provided to both `initialState` and `state`, the `state` initialization will take precedence and `initialState` will be ignored. Do not provide `columnVisibility` to both `initialState` and `state`, only one or the other.\n\n```jsx\nconst table = useTable({\n  _features: tableFeatures({ columnVisibilityFeature }),\n  _rowModels: {},\n  //...\n  initialState: {\n    columnVisibility: {\n      columnId1: true,\n      columnId2: false, // hide this column by default\n      columnId3: true,\n    },\n    //...\n  },\n})\n```\n\n### Disable Hiding Columns\n\nBy default, all columns can be hidden or shown. If you want to prevent certain columns from being hidden, you set the `enableHiding` column option to `false` for those columns.\n\n```jsx\nconst columns = [\n  {\n    header: 'ID',\n    accessorKey: 'id',\n    enableHiding: false, // disable hiding for this column\n  },\n  {\n    header: 'Name',\n    accessor: 'name', // can be hidden\n  },\n];\n```\n\n### Column Visibility Toggle APIs\n\nThere are several column API methods that are useful for rendering column visibility toggles in the UI.\n\n- `column.getCanHide` - Useful for disabling the visibility toggle for a column that has `enableHiding` set to `false`.\n- `column.getIsVisible` - Useful for setting the initial state of the visibility toggle.\n- `column.toggleVisibility` - Useful for toggling the visibility of a column.\n- `column.getToggleVisibilityHandler` - Shortcut for hooking up the `column.toggleVisibility` method to a UI event handler.\n\n```jsx\n{table.getAllColumns().map((column) => (\n  <label key={column.id}>\n    <input\n      checked={column.getIsVisible()}\n      disabled={!column.getCanHide()}\n      onChange={column.getToggleVisibilityHandler()}\n      type=\"checkbox\"\n    />\n    {column.columnDef.header}\n  </label>\n))}\n```\n\n### Column Visibility Aware Table APIs\n\nWhen you render your header, body, and footer cells, there are a lot of API options available. You may see APIs like `table.getAllLeafColumns` and `row.getAllCells`, but if you use these APIs, they will not take column visibility into account. Instead, you need to use the \"visible\" variants of these APIs, such as `table.getVisibleLeafColumns` and `row.getVisibleCells`.\n\n```jsx\n<table>\n  <thead>\n    <tr>\n      {table.getVisibleLeafColumns().map((column) => ( // takes column visibility into account\n        //\n      ))}\n    </tr>\n  </thead>\n  <tbody>\n    {table.getRowModel().rows.map((row) => (\n      <tr key={row.id}>\n        {row.getVisibleCells().map((cell) => ( // takes column visibility into account\n          //\n        ))}\n      </tr>\n    ))}\n  </tbody>\n</table>\n```\n\nIf you are using the Header Group APIs, they will already take column visibility into account.\n"
  },
  {
    "path": "docs/guide/columns.md",
    "content": "---\ntitle: Columns Guide\n---\n\n## API\n\n[Column API](../api/core/column)\n\n## Columns Guide\n\n> Note: This guide is about the actual `column` objects that are generated within the table instance and NOT about setting up the [column definitions](./column-defs) for your table.\n\nThis quick guide will discuss the different ways you can retrieve and interact with `column` objects in TanStack Table.\n\n### Where to Get Columns From\n\nYou can find the `column` objects in many places. They are often attached\n\n#### Header and Cell Objects\n\nBefore you reach for one of the `table` instance APIs, consider if you actually need to retrieve either [headers](./headers) or [cells](./cells) instead of `columns`. If you are rending out the markup for your table, you will most likely want to reach for the APIs that return headers or cells instead of columns. The column objects themselves are not really meant to render out the headers or cells, but the `header` and `cell` objects will contain references to these `column` objects from which they can derive the necessary information to render their UI.\n\n```js\nconst column = cell.column; // get column from cell\nconst column = header.column; // get column from header\n```\n\n#### Column Table Instance APIs\n\nThere are dozens of `table` instance APIs you can use to retrieve columns from the table instance. Which APIs you will use will depend entirely on which features you are using in your table and your use-case.\n\n##### Get Column\n\nIf you need to just get a single column by its ID, you can use the `table.getColumn` API.\n\n```js\nconst column = table.getColumn('firstName');\n```\n\n##### Get Columns\n\nThe simplest column API is `table.getAllColumns`, which will return a list of all columns in the table. There are dozens of other column APIs that are affected by other features and the state of the table that come alongside this API though. `table.getAllFlatColumns`, `table.getAllLeafColumns`, `getCenterLeafColumns`, `table.getLeftVisibleLeafColumns` are just some examples of other column APIs that you might use in tandem with the column visibility or column pinning features.\n\n### Column Objects\n\nColumn objects are not actually meant to be used to render out the table UI directly, so they are not associated 1-to-1 with any `<th>` or `<td>` elements in your table, but they contain a lot of useful properties and methods that you can use to interact with the table state.\n\n#### Column IDs\n\nEvery column must have a unique `id` defined in their associated [Column Definition](./column-defs). Usually, you define this `id` yourself, or it is derived from the `accessorKey` or `header` properties in the column definition.\n\n#### ColumnDef\n\nA reference to the original `columnDef` object that was used to created the column is always available on the column object.\n\n#### Nested Grouped Columns Properties\n\nThere are a few properties on `column` objects that are only useful if the column is part of a nested or grouped column structure. These properties include:\n\n- `columns`: An array of child columns that belong to a group column.\n- `depth`: The header group \"row index\" that the column group belongs to.\n- `parent`: The parent column of the column. If the column is a top-level column, this will be `undefined`.\n\n### More Column APIs\n\nThere are dozens of Column APIs that you can use to interact with the table state and extract cell values from the table based on the state of the table. See each features column API documentation for more information.\n\n### Column Rendering\n\nDon't necessarily use `column` objects to render `headers` or `cells` directly. Instead, use the [`header`](./headers) and [`cell`](./cells) objects, as discussed above.\n\nBut if you are just rendering a list of columns somewhere else in your UI for something like a column visibility menu or something similar, you can just map over a columns array and render out the UI as you normally would.\n"
  },
  {
    "path": "docs/guide/custom-features.md",
    "content": "---\ntitle: Custom Features Guide\n---\n\n## Examples\n\nWant to skip to the implementation? Check out these examples:\n\n- [custom-features](../framework/react/examples/custom-features)\n\n## Custom Features Guide\n\nIn this guide, we'll cover how to extend TanStack Table with custom features, and along the way, we'll learn more about how the TanStack Table v9 codebase is structured and how it works.\n\n### TanStack Table Strives to be Lean\n\nTanStack Table has a core set of features that are built into the library such as sorting, filtering, pagination, etc. We've received a lot of requests and sometimes even some well thought out PRs to add even more features to the library. While we are always open to improving the library, we also want to make sure that TanStack Table remains a lean library that does not include too much bloat and code that is unlikely to be used in most use cases. Not every PR can, or should, be accepted into the core library, even if it does solve a real problem. This can be frustrating to developers where TanStack Table solves 90% of their use case, but they need a little bit more control. \n\nTanStack Table has always been built in a way that allows it to be highly extensible (at least since v7). The `table` instance that is returned from whichever framework adapter that you are using (`createTable`, `useTable`, etc) is a plain JavaScript object that can have extra properties or APIs added to it. It has always been possible to use composition to add custom logic, state, and APIs to the table instance. Libraries like [Material React Table](https://github.com/KevinVandy/material-react-table/blob/v2/packages/material-react-table/src/hooks/useMRT_TableInstance.ts) have simply created custom wrapper hooks around the `useTable` hook to extend the table instance with custom functionality.\n\nIn v9, TanStack Table uses the `_features` option (via `tableFeatures()`) to declare which features your table uses. This enables tree-shaking—you only bundle the code for the features you need. You can add custom features to the table instance in exactly the same way as the built-in features.\n\n> In v9, features are opt-in. Use `tableFeatures({ ... })` to declare which features your table uses, including custom features.\n\n### How TanStack Table Features Work\n\nTanStack Table's source code is arguably somewhat simple (at least we think so). All code for each feature is split up into its own object/file with instantiation methods to create initial state, default table and column options, and API methods that can be added to the `table`, `header`, `column`, `row`, and `cell` instances.\n\nAll of the functionality of a feature object can be described with the `TableFeature` type that is exported from TanStack Table. This type is a TypeScript interface that describes the shape of a feature object needed to create a feature.\n\n```ts\nexport interface TableFeature<TFeatures extends TableFeatures,  TData extends RowData = any> {\n  constructCell?: (\n    cell: Cell<TFeatures, TData, unknown>,\n    column: Column<TFeatures, TData>,\n    row: Row<TFeatures, TData>,\n    table: Table<TFeatures, TData>\n  ) => void\n  constructColumn?: (column: Column<TFeatures, TData, unknown>, table: Table<TFeatures, TData>) => void\n  constructHeader?: (header: Header<TFeatures, TData, unknown>, table: Table<TFeatures, TData>) => void\n  constructRow?: (row: Row<TFeatures, TData>, table: Table<TFeatures, TData>) => void\n  constructTable?: (table: Table<TFeatures, TData>) => void\n  getDefaultColumnDef?: () => Partial<ColumnDef<TFeatures, TData, unknown>>\n  getDefaultTableOptions?: (\n    table: Table<TFeatures, TData>\n  ) => Partial<TableOptions<TFeatures, TData>>\n  getInitialState?: (initialState?: InitialTableState) => Partial<TableState>\n}\n```\n\nThis might be a bit confusing, so let's break down what each of these methods do:\n\n#### Default Options and Initial State\n\n<br />\n\n##### getDefaultTableOptions\n\nThe `getDefaultTableOptions` method in a table feature is responsible for setting the default table options for that feature. For example, in the [Column Sizing](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/columnSizingFeature.ts) feature, the `getDefaultTableOptions` method sets the default `columnResizeMode` option with a default value of `\"onEnd\"`.\n\n<br />\n\n##### getDefaultColumnDef\n\nThe `getDefaultColumnDef` method in a table feature is responsible for setting the default column options for that feature. For example, in the [Sorting](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/rowSortingFeature.ts) feature, the `getDefaultColumnDef` method sets the default `sortUndefined` column option with a default value of `1`.\n\n<br />\n\n##### getInitialState\n\nThe `getInitialState` method in a table feature is responsible for setting the default state for that feature. For example, in the [Pagination](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/rowPaginationFeature.ts) feature, the `getInitialState` method sets the default `pageSize` state with a value of `10` and the default `pageIndex` state with a value of `0`.\n\n#### API Creators\n\n<br />\n\n##### constructTable\n\nThe `constructTable` method in a table feature is responsible for adding methods to the `table` instance. For example, in the [Row Selection](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/rowSelectionFeature.ts) feature, the `constructTable` method adds many table instance API methods such as `toggleAllRowsSelected`, `getIsAllRowsSelected`, `getIsSomeRowsSelected`, etc. So then, when you call `table.toggleAllRowsSelected()`, you are calling a method that was added to the table instance by the `rowSelectionFeature` feature.\n\n<br />\n\n##### constructHeader\n\nThe `constructHeader` method in a table feature is responsible for adding methods to the `header` instance. For example, in the [Column Sizing](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/columnSizingFeature.ts) feature, the `constructHeader` method adds many header instance API methods such as `getStart`, and many others. So then, when you call `header.getStart()`, you are calling a method that was added to the header instance by the `columnSizingFeature` feature.\n\n<br />\n\n##### constructColumn\n\nThe `constructColumn` method in a table feature is responsible for adding methods to the `column` instance. For example, in the [Sorting](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/rowSortingFeature.ts) feature, the `constructColumn` method adds many column instance API methods such as `getNextSortingOrder`, `toggleSorting`, etc. So then, when you call `column.toggleSorting()`, you are calling a method that was added to the column instance by the `rowSortingFeature` feature.\n\n<br />\n\n##### constructRow\n\nThe `constructRow` method in a table feature is responsible for adding methods to the `row` instance. For example, in the [Row Selection](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/rowSelectionFeature.ts) feature, the `constructRow` method adds many row instance API methods such as `toggleSelected`, `getIsSelected`, etc. So then, when you call `row.toggleSelected()`, you are calling a method that was added to the row instance by the `rowSelectionFeature` feature.\n\n<br />\n\n##### constructCell\n\nThe `constructCell` method in a table feature is responsible for adding methods to the `cell` instance. For example, in the [Column Grouping](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/columnGroupingFeature.ts) feature, the `constructCell` method adds many cell instance API methods such as `getIsGrouped`, `getIsAggregated`, etc. So then, when you call `cell.getIsGrouped()`, you are calling a method that was added to the cell instance by the `columnGroupingFeature` feature.\n\n### Adding a Custom Feature\n\nLet's walk through making a custom table feature for a hypothetical use case. Let's say we want to add a feature to the table instance that allows the user to change the \"density\" (padding of cells) of the table. \n\nCheck out the full [custom-features](../framework/react/examples/custom-features) example to see the full implementation, but here's an in-depth look at the steps to create a custom feature.\n\n#### Step 1: Set up TypeScript Types\n\nAssuming you want the same full type-safety that the built-in features in TanStack Table have, let's set up all of the TypeScript types for our new feature. We'll create types for new table options, state, and table instance API methods.\n\nThese types are following the naming convention used internally within TanStack Table, but you can name them whatever you want. We are not adding these types to TanStack Table yet, but we'll do that in the next step.\n\n```ts\n// define types for our new feature's custom state\nexport type DensityState = 'sm' | 'md' | 'lg'\nexport interface DensityTableState {\n  density: DensityState\n}\n\n// define types for our new feature's table options\nexport interface DensityOptions {\n  enableDensity?: boolean\n  onDensityChange?: OnChangeFn<DensityState>\n}\n\n// Define types for our new feature's table APIs\nexport interface DensityInstance {\n  setDensity: (updater: Updater<DensityState>) => void\n  toggleDensity: (value?: DensityState) => void\n}\n```\n\n#### Step 2: Use Declaration Merging to Add New Types to TanStack Table\n\nWe can tell TypeScript to modify the exported types from TanStack Table to include our new feature's types. This is called \"declaration merging\" and it's a powerful feature of TypeScript. This way, we should not have to use any TypeScript hacks such as `as unknown as CustomTable` or `// @ts-ignore` in our new feature's code or in our application code.\n\n```ts\n// Use declaration merging to add our new feature APIs and state types to TanStack Table's existing types.\ndeclare module '@tanstack/react-table' { // or whatever framework adapter you are using\n  //merge our new feature's state with the existing table state\n  interface TableState extends DensityTableState {}\n  //merge our new feature's options with the existing table options\n  interface TableOptions<TFeatures extends TableFeatures,  TData extends RowData>\n    extends DensityOptions {}\n  //merge our new feature's instance APIs with the existing table instance APIs\n  interface Table<TFeatures extends TableFeatures,  TData extends RowData> extends DensityInstance {}\n  // if you need to add cell instance APIs...\n  // interface Cell<TFeatures extends TableFeatures,  TData extends RowData, TValue> extends DensityCell\n  // if you need to add row instance APIs...\n  // interface Row<TFeatures extends TableFeatures,  TData extends RowData> extends DensityRow\n  // if you need to add column instance APIs...\n  // interface Column<TFeatures extends TableFeatures,  TData extends RowData, TValue> extends DensityColumn\n  // if you need to add header instance APIs...\n  // interface Header<TFeatures extends TableFeatures,  TData extends RowData, TValue> extends DensityHeader\n\n  // Note: declaration merging on `ColumnDef` is not possible because it is a complex type, not an interface.\n  // But you can still use declaration merging on `ColumnDef.meta`\n}\n```\n\nOnce we do this correctly, we should have no TypeScript errors when we try to both create our new feature's code and use it in our application.\n\n##### Caveats of Using Declaration Merging\n\nOne caveat of using declaration merging is that it will affect the TanStack Table types for every table across your codebase. This is not a problem if you plan on loading the same feature set for every table in your application, but it could be a problem if some of your tables load extra features and some do not. Alternatively, you can just make a bunch of custom types that extend off of the TanStack Table types with your new features added. This is what [Material React Table](https://github.com/KevinVandy/material-react-table/blob/v2/packages/material-react-table/src/types.ts) does in order to avoid affecting the types of vanilla TanStack Table tables, but it's a bit more tedious, and requires a lot of type casting at certain points.\n\n#### Step 3: Create the Feature Object\n\nWith all of that TypeScript setup out of the way, we can now create the feature object for our new feature. This is where we define all of the methods that will be added to the table instance.\n\nUse the `TableFeature` type to ensure that you are creating the feature object correctly. If the TypeScript types are set up correctly, you should have no TypeScript errors when you create the feature object with the new state, options, and instance APIs.\n\n```ts\nexport const DensityFeature: TableFeature<any> = { //Use the TableFeature type!!\n  // define the new feature's initial state\n  getInitialState: (state): DensityTableState => {\n    return {\n      density: 'md',\n      ...state,\n    }\n  },\n\n  // define the new feature's default options\n  getDefaultTableOptions: <TFeatures extends TableFeatures,  TData extends RowData>(\n    table: Partial<Table<TFeatures, TData>>\n  ): DensityOptions => {\n    return {\n      enableDensity: true,\n      onDensityChange: makeStateUpdater('density', table),\n    } as DensityOptions\n  },\n  // if you need to add a default column definition...\n  // getDefaultColumnDef: <TFeatures extends TableFeatures,  TData extends RowData>(): Partial<ColumnDef<TFeatures, TData>> => {\n  //   return { meta: {} } //use meta instead of directly adding to the columnDef to avoid typescript stuff that's hard to workaround\n  // },\n\n  // define the new feature's table instance methods\n  constructTable: <TFeatures extends TableFeatures,  TData extends RowData>(table: Table<TFeatures, TData>): void => {\n    table.setDensity = updater => {\n      const safeUpdater: Updater<DensityState> = old => {\n        let newState = functionalUpdate(updater, old)\n        return newState\n      }\n      return table.options.onDensityChange?.(safeUpdater)\n    }\n    table.toggleDensity = value => {\n      table.setDensity(old => {\n        if (value) return value\n        return old === 'lg' ? 'md' : old === 'md' ? 'sm' : 'lg' //cycle through the 3 options\n      })\n    }\n  },\n\n  // if you need to add row instance APIs...\n  // constructRow: <TFeatures extends TableFeatures,  TData extends RowData>(row, table): void => {},\n  // if you need to add cell instance APIs...\n  // constructCell: <TFeatures extends TableFeatures,  TData extends RowData>(cell, column, row, table): void => {},\n  // if you need to add column instance APIs...\n  // constructColumn: <TFeatures extends TableFeatures,  TData extends RowData>(column, table): void => {},\n  // if you need to add header instance APIs...\n  // constructHeader: <TFeatures extends TableFeatures,  TData extends RowData>(header, table): void => {},\n}\n```\n\n#### Step 4: Add the Feature to the Table\n\nNow that we have our feature object, we can add it to the table instance by including it in the `tableFeatures()` call and passing the result to the `_features` option when we create the table instance.\n\n```ts\nconst _features = tableFeatures({ DensityFeature })\n\nconst table = useTable({\n  _features,\n  _rowModels: {},\n  columns,\n  data,\n  //..\n})\n```\n\n#### Step 5: Use the Feature in Your Application\n\nNow that the feature is added to the table instance, you can use the new instance APIs options, and state in your application.\n\n```tsx\nconst _features = tableFeatures({ DensityFeature })\n\nconst table = useTable({\n  _features,\n  _rowModels: {},\n  columns,\n  data,\n  //...\n  state: {\n    density,\n  },\n  onDensityChange: setDensity,\n})\n//...\nconst { density } = table.store.state\nreturn(\n  <td\n    key={cell.id}\n    style={{\n      //using our new feature in the code\n      padding:\n        density === 'sm'\n          ? '4px'\n          : density === 'md'\n            ? '8px'\n            : '16px',\n      transition: 'padding 0.2s',\n    }}\n  >\n    {flexRender(cell.column.columnDef.cell, cell.getContext())}\n  </td>\n)\n```\n\n#### Do We Have to Do It This Way?\n\nThis is just a new way to integrate custom code along-side the built-in features in TanStack Table. In our example up above, we could have just as easily stored the `density` state in a `React.useState`, defined our own `toggleDensity` handler wherever, and just used it in our code separately from the table instance. Building table features along-side TanStack Table instead of deeply integrating them into the table instance is still a perfectly valid way to build custom features. Depending on your use case, this may or may not be the cleanest way to extend TanStack Table with custom features.\n"
  },
  {
    "path": "docs/guide/data.md",
    "content": "---\ntitle: Data Guide\n---\n\n## Data Guide\n\nTables start with your data. Your column definitions and rows will depend on the shape of your data. TanStack Table has some TypeScript features that will help you create the rest of your table code with a great type-safe experience. If you set up your data and types correctly, TanStack Table will be able to infer the shape of your data and enforce that your column definitions are made correctly.\n\n### TypeScript\n\nTypeScript is NOT required to use the TanStack Table packages... ***BUT*** TanStack Table is written and organized in such a way that makes the awesome TypeScript experience that you get feel like it is one of the main selling points of the library. If you are not using TypeScript, you will be missing out on a lot of great autocompletion and type-checking features that will both speed up your development time and reduce the number of bugs in your code.\n\n#### TypeScript Generics\n\nHaving a basic understanding of what TypeScript Generics are and how they work will help you understand this guide better, but it should be easy enough to pick up as you go. The official [TypeScript Generics Docs](https://www.typescriptlang.org/docs/handbook/2/generics.html) may be helpful for those not yet familiar with TypeScript.\n\n### Defining Data Types\n\n`data` is an array of objects that will be turned into the rows of your table. Each object in the array represents a row of data (under normal circumstances). If you are using TypeScript, we usually define a type for the shape of our data. This type is used as a generic type for all of the other table, column, row, and cell instances. This Generic is usually referred to as `TData` throughout the rest of the TanStack Table types and APIs.\n\nFor example, if we have a table that displays a list of users in an array like this:\n\n```json\n[\n  {\n    \"firstName\": \"Tanner\",\n    \"lastName\": \"Linsley\",\n    \"age\": 33,\n    \"visits\": 100,\n    \"progress\": 50,\n    \"status\": \"Married\"\n  },\n  {\n    \"firstName\": \"Kevin\",\n    \"lastName\": \"Vandy\",\n    \"age\": 27,\n    \"visits\": 200,\n    \"progress\": 100,\n    \"status\": \"Single\"\n  }\n]\n```\n\nThen we can define a User (TData) type like this:\n\n```ts\n//TData\ntype User = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  progress: number\n  status: string\n}\n```\n\nWe can then define our `data` array with this type, and then TanStack Table will be able to intelligently infer lots of types for us later on in our columns, rows, cells, etc. This is because the `data` type is literally defined as the `TData` generic type. Whatever you pass to the `data` table option will become the `TData` type for the rest of the table instance. Just make sure your column definitions use the same `TData` type as the `data` type when you define them later.\n\n```ts\n//note: data needs a \"stable\" reference in order to prevent infinite re-renders\nconst data: User[] = []\n//or\nconst [data, setData] = React.useState<User[]>([])\n//or\nconst data = ref<User[]>([]) //vue\n//etc...\n```\n\n#### Deep Keyed Data\n\nIf your data is not a nice flat array of objects, that's okay! Once you get around to defining your columns, there are strategies for accessing deeply nested data in your accessors.\n\nIf your `data` looks something like this:\n\n```json\n[\n  {\n    \"name\": {\n      \"first\": \"Tanner\",\n      \"last\": \"Linsley\"\n    },\n    \"info\": {\n      \"age\": 33,\n      \"visits\": 100,\n    }\n  },\n  {\n    \"name\": {\n      \"first\": \"Kevin\",\n      \"last\": \"Vandy\"\n    },\n    \"info\": {\n      \"age\": 27,\n      \"visits\": 200,\n    }\n  }\n]\n```\n\nYou can define a type like this:\n\n```ts\ntype User = {\n  name: {\n    first: string\n    last: string\n  }\n  info: {\n    age: number\n    visits: number\n  }\n}\n```\n\nAnd you will be able to access the data in your column definitions with either dot notation in an accessorKey or simply by using an accessorFn.\n\n```ts\nconst columns = [\n  {\n    header: 'First Name',\n    accessorKey: 'name.first',\n  },\n  {\n    header: 'Last Name',\n    accessorKey: 'name.last',\n  },\n  {\n    header: 'Age',\n    accessorFn: info => info.age, \n  },\n  //...\n]\n```\n\nThis is discussed in more detail in the [Column Def Guide](./column-defs).\n\n> NOTE: The \"keys\" in your json data can usually be anything, but any periods in the keys will be interpreted as a deep key and will cause errors.\n\n#### Nested Sub-Row Data\n\nIf you are using expanding features, it can be common to have nested sub-rows in your data. This results in a recursive type that is a bit different.\n\nSo if your data looks like this:\n\n```json\n[\n  {\n    \"firstName\": \"Tanner\",\n    \"lastName\": \"Linsley\",\n    \"subRows\": [\n      {\n        \"firstName\": \"Kevin\",\n        \"lastName\": \"Vandy\",\n      },\n      {\n        \"firstName\": \"John\",\n        \"lastName\": \"Doe\",\n        \"subRows\": [\n          //...\n        ]\n      }\n    ]\n  },\n  {\n    \"firstName\": \"Jane\",\n    \"lastName\": \"Doe\",\n  }\n]\n```\n\nYou can define a type like this:\n\n```ts\ntype User = {\n  firstName: string\n  lastName: string\n  subRows?: User[] //does not have to be called \"subRows\", can be called anything\n}\n```\n\nWhere `subRows` is an optional array of `User` objects. This is discussed in more detail in the [Expanding Guide](./expanding).\n\n### Give Data a \"Stable\" Reference\n\nThe `data` array that you pass to the table instance ***MUST*** have a \"stable\" reference in order to prevent bugs that cause infinite re-renders (especially in React).\n\nThis will depend on which framework adapter you are using, but in React, you should often use `React.useState`, `React.useMemo`, or similar to ensure that both the `data` and `columns` table options have stable references.\n\n```tsx\nconst fallbackData = []\nconst _features = tableFeatures({}) // Define outside component for stable reference\n\nexport default function MyComponent() {\n  //✅ GOOD: This will not cause an infinite loop of re-renders because `columns` is a stable reference\n  const columns = useMemo(() => [\n    // ...\n  ], []);\n\n  //✅ GOOD: This will not cause an infinite loop of re-renders because `data` is a stable reference\n  const [data, setData] = useState(() => [\n    // ...\n  ]);\n\n  // Columns and data are defined in a stable reference, will not cause infinite loop!\n  const table = useTable({\n    _features,\n    _rowModels: {},\n    columns,\n    data ?? fallbackData, //also good to use a fallback array that is defined outside of the component (stable reference)\n  });\n\n  return <table>...</table>;\n}\n```\n\n`React.useState` and `React.useMemo` are not the only ways to give your data a stable reference. You can also define your data outside of the component or use a 3rd party state management library like Redux, Zustand, or TanStack Query.\n\nThe main thing to avoid is defining the `data` array inside the same scope as the `useTable` call. That will cause the `data` array to be redefined on every render, which will cause an infinite loop of re-renders.\n\n```tsx\nexport default function MyComponent() {\n  //😵 BAD: This will cause an infinite loop of re-renders because `columns` is redefined as a new array on every render!\n  const columns = [\n    // ...\n  ];\n\n  //😵 BAD: This will cause an infinite loop of re-renders because `data` is redefined as a new array on every render!\n  const data = [\n    // ...\n  ];\n\n  //❌ Columns and data are defined in the same scope as `useTable` without a stable reference, will cause infinite loop!\n  const table = useTable({\n    _features: tableFeatures({}), //❌ Also re-created on every render\n    _rowModels: {},\n    columns,\n    data ?? [], //❌ Also bad because the fallback array is re-created on every render\n  });\n\n  return <table>...</table>;\n}\n```\n\n### How TanStack Table Transforms Data\n\nLater, in other parts of these docs, you will see how TanStack Table processes the `data` that you pass to the table and generates the row and cell objects that are used to create the table. The `data` that you pass to the table is never mutated by TanStack Table, but the actual values in the rows and cells may be transformed by the accessors in your column definitions, or by other features performed by [row models](./row-models) like grouping or aggregation.\n\n### How Much Data Can TanStack Table Handle?\n\nBelieve it or not, TanStack Table was actually built to scale up to handle potentially hundreds of thousands of rows of data in the client. This is obviously not always possible, depending on the size of each column's data and the number of columns. However, the sorting, filtering, pagination, and grouping features are all built with performance in mind for large datasets.\n\nThe default mindset of a developer building a data grid is to implement server-side pagination, sorting, and filtering for large datasets. This is still usually a good idea, but a lot of developers underestimate how much data can actually be handled in the client with modern browsers and the right optimizations. If your table will never have more than a few thousand rows, you can probably take advantage of the client-side features in TanStack Table instead of implementing them yourself on the server. Before committing to letting TanStack Table's client-side features handle your large dataset, you should test it with your actual data to see if it performs well enough for your needs, of course.\n\nThis is discussed in more detail in the [Pagination Guide](./pagination#should-you-use-client-side-pagination).\n"
  },
  {
    "path": "docs/guide/expanding.md",
    "content": "---\ntitle: Expanding Guide\n---\n\n## Examples\n\nWant to skip to the implementation? Check out these examples:\n\n- [expanding](../framework/react/examples/expanding)\n- [grouping](../framework/react/examples/grouping)\n- [sub-components](../framework/react/examples/sub-components)\n\n## API\n\n[Expanding API](../api/features/expanding)\n\n## Expanding Feature Guide\n\nExpanding is a feature that allows you to show and hide additional rows of data related to a specific row. This can be useful in cases where you have hierarchical data and you want to allow users to drill down into the data from a higher level. Or it can be useful for showing additional information related to a row.\n\n### Different use cases for Expanding Features\n\nThere are multiple use cases for expanding features in TanStack Table that will be discussed below.\n\n1. Expanding sub-rows (child rows, aggregate rows, etc.)\n2. Expanding custom UI (detail panels, sub-tables, etc.)\n\n### Enable Client-Side Expanding\n\nTo use the client-side expanding features, add the `rowExpandingFeature` to your features and the `expandedRowModel` to your row models:\n\n```ts\nimport {\n  useTable,\n  tableFeatures,\n  rowExpandingFeature,\n  createExpandedRowModel,\n} from '@tanstack/react-table'\n\nconst _features = tableFeatures({ rowExpandingFeature })\n\nconst table = useTable({\n  _features,\n  _rowModels: {\n    expandedRowModel: createExpandedRowModel(),\n  },\n  // other options...\n})\n```\n\nExpanded data can either contain table rows or any other data you want to display. We will discuss how to handle both cases in this guide.\n\n### Table rows as expanded data\n\nExpanded rows are essentially child rows that inherit the same column structure as their parent rows. If your data object already includes these expanded rows data, you can utilize the `getSubRows` function to specify these child rows. However, if your data object does not contain the expanded rows data, they can be treated as custom expanded data, which is discussed in next section.\n\nFor example, if you have a data object like this:\n\n```ts\ntype Person = {\n  id: number\n  name: string\n  age: number\n  children?: Person[] | undefined\n}\n\nconst data: Person[] =  [\n  { id: 1, \n  name: 'John', \n  age: 30, \n  children: [\n      { id: 2, name: 'Jane', age: 5 },\n      { id: 5, name: 'Jim', age: 10 }\n    ] \n  },\n  { id: 3,\n   name: 'Doe', \n   age: 40, \n    children: [\n      { id: 4, name: 'Alice', age: 10 }\n    ] \n  },\n]\n```\n\nThen you can use the getSubRows function to return the children array in each row as expanded rows. The table instance will now understand where to look for the sub rows on each row.\n\n```ts\nconst table = useTable({\n  _features,\n  _rowModels: {\n    expandedRowModel: createExpandedRowModel(),\n  },\n  getSubRows: (row) => row.children, // return the children array as sub-rows\n  // other options...\n})\n```\n\n> **Note:** You can have a complicated `getSubRows` function, but keep in mind that it will run for every row and every sub-row. This can be expensive if the function is not optimized. Async functions are not supported.\n\n### Custom Expanding UI\n\nIn some cases, you may wish to show extra details or information, which may or may not be part of your table data object, such as expanded data for rows. This kind of expanding row UI has gone by many names over the years including \"expandable rows\", \"detail panels\", \"sub-components\", etc.\n\nBy default, the `row.getCanExpand()` row instance API will return false unless it finds `subRows` on a row. This can be overridden by implementing your own `getRowCanExpand` function in the table instance options.\n\n```ts\n//...\nconst table = useTable({\n  _features,\n  _rowModels: {\n    expandedRowModel: createExpandedRowModel(),\n  },\n  getRowCanExpand: (row) => true, // Add your logic to determine if a row can be expanded. True means all rows include expanded data\n  // other options...\n})\n//...\n<tbody>\n  {table.getRowModel().rows.map((row) => (\n    <React.Fragment key={row.id}>\n     {/* Normal row UI */}\n      <tr>\n        {row.getVisibleCells().map((cell) => (\n          <td key={cell.id}>\n            {flexRender(cell.column.columnDef.cell, cell.getContext())}\n          </td>\n        ))}\n      </tr>\n      {/* If the row is expanded, render the expanded UI as a separate row with a single cell that spans the width of the table */}\n      {row.getIsExpanded() && (\n        <tr>\n          <td colSpan={row.getAllCells().length}> // The number of columns you wish to span for the expanded data if it is not a row that shares the same columns as the parent row\n            // Your custom UI goes here\n          </td>\n        </tr>\n      )}\n    </React.Fragment>\n  ))}\n</tbody>\n//...\n```\n\n### Expanded rows state\n\nIf you need to control the expanded state of the rows in your table, you can do so by using the expanded state and the `onExpandedChange` option. This allows you to manage the expanded state according to your requirements.\n\n```ts\nconst [expanded, setExpanded] = useState<ExpandedState>({})\n\nconst table = useTable({\n  _features,\n  _rowModels: { expandedRowModel: createExpandedRowModel() },\n  // other options...\n  state: {\n    expanded,\n  },\n  onExpandedChange: setExpanded,\n})\n```\n\nThe ExpandedState type is defined as follows:\n\n```ts\ntype ExpandedState = true | Record<string, boolean>\n```\n\nIf the ExpandedState is true, it means all rows are expanded. If it's a record, only the rows with IDs present as keys in the record and have their value set to true are expanded.  For example, if the expanded state is { row1: true, row2: false }, it means the row with ID row1 is expanded and the row with ID row2 is not expanded. This state is used by the table to determine which rows are expanded and should display their subRows, if any.\n\n### UI toggling handler for expanded rows\n\nTanStack table will not add a toggling handler UI for expanded data to your table. You should manually add it within each row's UI to allow users to expand and collapse the row. For example, you can add a button UI within the columns definition.\n\n```ts\nconst columns = [\n  {\n    accessorKey: 'name',\n    header: 'Name',\n  },\n  {\n    accessorKey: 'age',\n    header: 'Age',\n  },\n  {\n    header: 'Children',\n    cell: ({ row }) => {\n      return row.getCanExpand() ?\n        <button\n          onClick={row.getToggleExpandedHandler()}\n          style={{ cursor: 'pointer' }}\n        >\n        {row.getIsExpanded() ? '👇' : '👉'}\n        </button>\n       : '';\n    },\n  },\n]\n```\n\n### Filtering Expanded Rows\n\nBy default, the filtering process starts from the parent rows and moves downwards. This means if a parent row is excluded by the filter, all its child rows will also be excluded. However, you can change this behavior by using the `filterFromLeafRows` option. When this option is enabled, the filtering process starts from the leaf (child) rows and moves upwards. This ensures that a parent row will be included in the filtered results as long as at least one of its child or grandchild rows meets the filter criteria. Additionally, you can control how deep into the child hierarchy the filter process goes by using the `maxLeafRowFilterDepth` option. This option allows you to specify the maximum depth of child rows that the filter should consider.\n\n```ts\n//...\nconst table = useTable({\n  _features: tableFeatures({ columnFilteringFeature, rowExpandingFeature }),\n  _rowModels: {\n    filteredRowModel: createFilteredRowModel(filterFns),\n    expandedRowModel: createExpandedRowModel(),\n  },\n  getSubRows: (row) => row.subRows,\n  filterFromLeafRows: true, // search through the expanded rows\n  maxLeafRowFilterDepth: 1, // limit the depth of the expanded rows that are searched\n  // other options...\n})\n```\n\n### Paginating Expanded Rows\n\nBy default, expanded rows are paginated along with the rest of the table (which means expanded rows may span multiple pages). If you want to disable this behavior (which means expanded rows will always render on their parents page. This also means more rows will be rendered than the set page size) you can use the `paginateExpandedRows` option.\n\n```ts\nconst table = useTable({\n  _features,\n  _rowModels: { expandedRowModel: createExpandedRowModel() },\n  // other options...\n  paginateExpandedRows: false,\n})\n```\n\n### Pinning Expanded Rows\n\nPinning expanded rows works the same way as pinning regular rows. You can pin expanded rows to the top or bottom of the table. Please refer to the [Pinning Guide](./pinning.md) for more information on row pinning.\n\n### Sorting Expanded Rows\n\nBy default, expanded rows are sorted along with the rest of the table.\n\n### Manual Expanding (server-side)\n\nIf you are doing server-side expansion, you can enable manual row expansion by setting the manualExpanding option to true. This means that the `getExpandedRowModel` will not be used to expand rows and you would be expected to perform the expansion in your own data model.\n\n```ts\nconst table = useTable({\n  _features: tableFeatures({ rowExpandingFeature }),\n  _rowModels: {}, // no expandedRowModel needed for manual expanding\n  // other options...\n  manualExpanding: true,\n})\n```\n"
  },
  {
    "path": "docs/guide/features.md",
    "content": "---\ntitle: Features Guide\n---\n\nTanStack Table comes with many features, each with their own associated options and API.\n\n> **v9 note:** In v9, features are opt-in. You declare which features your table uses via the `_features` option (using `tableFeatures()`). This enables tree-shaking—you only bundle the code for the features you need. See the [Table Instance Guide](./tables) and [Row Models Guide](./row-models) for setup. To include all features (v8-style), use `stockFeatures`.\n\n- [Column Ordering](./column-ordering)\n- [Column Pinning](./column-pinning)\n- [Column Sizing](./column-sizing)\n- [Column Visibility](./column-visibility)\n- [Expanding](./expanding)\n- [Column Faceting](./column-faceting)\n- [Column Filtering](./column-filtering)\n- [Global Faceting](./global-faceting)\n- [Global Filtering](./global-filtering)\n- [Grouping](./grouping)\n- [Pagination](./pagination)\n- [Row Pinning](./row-pinning)\n- [Row Selection](./row-selection)\n- [Sorting](./sorting)\n- [Virtualization](./virtualization)"
  },
  {
    "path": "docs/guide/filters.md",
    "content": "---\ntitle: Filters Guide\n---\n\n<!-- Deprecated -->\n\nThe filter guides are now split into multiple guides:\n\n- [Column Filtering](./column-filtering)\n- [Global Filtering](./global-filtering)\n- [Fuzzy Filtering](./fuzzy-filtering)\n- [Column Faceting](./column-faceting)\n- [Global Faceting](./global-faceting)"
  },
  {
    "path": "docs/guide/fuzzy-filtering.md",
    "content": "---\ntitle: Fuzzy Filtering Guide\n---\n\n## Examples\n\nWant to skip to the implementation? Check out these examples:\n\n- [filters-fuzzy](../framework/react/examples/filters-fuzzy)\n\n## API\n\n[Filters API](../api/features/filters)\n\n## Fuzzy Filtering Guide\n\nFuzzy filtering is a technique that allows you to filter data based on approximate matches. This can be useful when you want to search for data that is similar to a given value, rather than an exact match.\n\nYou can implement a client side fuzzy filtering by defining a custom filter function. This function should take in the row, columnId, and filter value, and return a boolean indicating whether the row should be included in the filtered data.\n\nFuzzy filtering is mostly used with global filtering, but you can also apply it to individual columns. We will discuss how to implement fuzzy filtering for both cases.\n\n> **Note:** You will need to install the `@tanstack/match-sorter-utils` library to use fuzzy filtering.\n> TanStack Match Sorter Utils is a fork of [match-sorter](https://github.com/kentcdodds/match-sorter) by Kent C. Dodds. It was forked in order to work better with TanStack Table's row by row filtering approach.\n\nUsing the match-sorter libraries is optional, but the TanStack Match Sorter Utils library provides a great way to both fuzzy filter and sort by the rank information it returns, so that rows can be sorted by their closest matches to the search query.\n\n### Defining a Custom Fuzzy Filter Function\n\nHere's an example of a custom fuzzy filter function:\n\n```typescript\nimport { rankItem } from '@tanstack/match-sorter-utils';\nimport { FilterFn } from '@tanstack/table';\n\nconst fuzzyFilter: FilterFn<any> = (row, columnId, value, addMeta) => {\n  // Rank the item\n  const itemRank = rankItem(row.getValue(columnId), value)\n\n  // Store the itemRank info\n  addMeta({ itemRank })\n\n  // Return if the item should be filtered in/out\n  return itemRank.passed\n}\n```\n\nIn this function, we're using the rankItem function from the @tanstack/match-sorter-utils library to rank the item. We then store the ranking information in the meta data of the row, and return whether the item passed the ranking criteria.\n\n### Using Fuzzy Filtering with Global Filtering\n\nTo use fuzzy filtering with global filtering, you can specify the fuzzy filter function in the globalFilterFn option of the table instance:\n\n```typescript\nimport {\n  useTable,\n  tableFeatures,\n  globalFilteringFeature,\n  rowSortingFeature,\n  createFilteredRowModel,\n  createSortedRowModel,\n  filterFns,\n  sortFns,\n} from '@tanstack/react-table'\n\nconst _features = tableFeatures({ globalFilteringFeature, rowSortingFeature })\n\nconst table = useTable({\n  _features,\n  _rowModels: {\n    filteredRowModel: createFilteredRowModel({\n      ...filterFns,\n      fuzzy: fuzzyFilter,\n    }),\n    sortedRowModel: createSortedRowModel(sortFns), // needed if you want sorting with fuzzy rank\n  },\n  columns,\n  data,\n  globalFilterFn: 'fuzzy',\n})\n```\n\n### Using Fuzzy Filtering with Column Filtering\n\nTo use fuzzy filtering with column filtering, pass your fuzzy filter function to `createFilteredRowModel` (merging it with the built-in `filterFns`). You can then specify the fuzzy filter by name in the `filterFn` option of the column definition:\n\n```typescript\nconst column = [\n  {\n    accessorFn: row => `${row.firstName} ${row.lastName}`,\n    id: 'fullName',\n    header: 'Full Name',\n    cell: info => info.getValue(),\n    filterFn: 'fuzzy', //using our custom fuzzy filter function\n  },\n  // other columns...\n];\n```\n\nIn this example, we're applying the fuzzy filter to a column that combines the firstName and lastName fields of the data.\n\n#### Sorting with Fuzzy Filtering\n\nWhen using fuzzy filtering with column filtering, you might also want to sort the data based on the ranking information. You can do this by defining a custom sorting function:\n\n```typescript\nimport { compareItems } from '@tanstack/match-sorter-utils'\nimport { sortFns } from '@tanstack/table'\n\nconst fuzzySort: SortFn<any> = (rowA, rowB, columnId) => {\n  let dir = 0\n\n  // Only sort by rank if the column has ranking information\n  if (rowA.columnFiltersMeta[columnId]) {\n    dir = compareItems(\n      rowA.columnFiltersMeta[columnId]?.itemRank!,\n      rowB.columnFiltersMeta[columnId]?.itemRank!\n    )\n  }\n\n  // Provide an alphanumeric fallback for when the item ranks are equal\n  return dir === 0 ? sortFns.alphanumeric(rowA, rowB, columnId) : dir\n}\n```\n\nIn this function, we're comparing the ranking information of the two rows. If the ranks are equal, we fall back to alphanumeric sorting.\n\nYou can then specify this sorting function in the sortFn option of the column definition:\n\n```typescript\n{\n  accessorFn: row => `${row.firstName} ${row.lastName}`,\n  id: 'fullName',\n  header: 'Full Name',\n  cell: info => info.getValue(),\n  filterFn: 'fuzzy', //using our custom fuzzy filter function\n  sortFn: 'fuzzySort', //using our custom fuzzy sort function\n}\n```\n"
  },
  {
    "path": "docs/guide/global-faceting.md",
    "content": "---\ntitle: Global Faceting Guide\n---\n\n## Examples\n\nWant to skip to the implementation? Check out these examples:\n\n- [filters-faceted](../framework/react/examples/filters)\n\n## API\n\n[Global Faceting API](../api/features/global-faceting)\n\n## Global Faceting Guide\n\nGlobal Faceting allows you to generate lists of values for all columns from the table's data. For example, a list of unique values in a table can be generated from all rows in all columns to be used as search suggestions in an autocomplete filter component. Or, a tuple of minimum and maximum values can be generated from a table of numbers to be used as a range for a range slider filter component.\n\n### Global Faceting Row Models\n\nIn order to use any of the global faceting features, add the appropriate faceted row models to your `_rowModels`:\n\n```ts\nimport {\n  useTable,\n  tableFeatures,\n  createFacetedRowModel,\n  createFacetedMinMaxValues,\n  createFacetedUniqueValues,\n} from '@tanstack/react-table'\n\nconst _features = tableFeatures({}) // add globalFilteringFeature if using global filtering\n\nconst table = useTable({\n  _features,\n  _rowModels: {\n    facetedRowModel: createFacetedRowModel(), // required (other faceting methods depend on this)\n    facetedMinMaxValues: createFacetedMinMaxValues(), // if you need min/max values\n    facetedUniqueValues: createFacetedUniqueValues(), // if you need a list of unique values\n  },\n  // other options...\n})\n```\n\n### Use Global Faceted Row Models\n\nOnce you have included the appropriate row models in your table options, you will be able to use the faceting table instance APIs to access the lists of values generated by the faceted row models.\n\n```ts\n// list of unique values for autocomplete filter\nconst autoCompleteSuggestions =\n Array.from(table.getGlobalFacetedUniqueValues().keys())\n  .sort()\n  .slice(0, 5000);\n```\n\n```ts\n// tuple of min and max values for range filter\nconst [min, max] = table.getGlobalFacetedMinMaxValues() ?? [0, 1];\n```\n\n### Custom Global (Server-Side) Faceting\n\nIf instead of using the built-in client-side faceting features, you can implement your own faceting logic on the server-side and pass the faceted values to the client-side. You can use the getGlobalFacetedUniqueValues and getGlobalFacetedMinMaxValues table options to resolve the faceted values from the server-side.\n\n```ts\nconst facetingQuery = useQuery(\n  'faceting',\n  async () => {\n    const response = await fetch('/api/faceting');\n    return response.json();\n  },\n  {\n    onSuccess: (data) => {\n      table.getGlobalFacetedUniqueValues = () => data.uniqueValues;\n      table.getGlobalFacetedMinMaxValues = () => data.minMaxValues;\n    },\n  }\n);\n```\n\nIn this example, we use the `useQuery` hook from `react-query` to fetch faceting data from the server. Once the data is fetched, we set the `getGlobalFacetedUniqueValues` and `getGlobalFacetedMinMaxValues` table options to return the faceted values from the server response. This will allow the table to use the server-side faceting data for generating autocomplete suggestions and range filters.\n"
  },
  {
    "path": "docs/guide/global-filtering.md",
    "content": "---\ntitle: Global Filtering Guide\n---\n\n## Examples\n\nWant to skip to the implementation? Check out these examples:\n\n- [Global Filters](../framework/react/examples/filters-global)\n\n## API\n\n[Global Filtering API](../api/features/global-filtering)\n\n## Global Filtering Guide\n\nFiltering comes in 2 flavors: Column Filtering and Global Filtering.\n\nThis guide will focus on global filtering, which is a filter that is applied across all columns.\n\n### Client-Side vs Server-Side Filtering\n\nIf you have a large dataset, you may not want to load all of that data into the client's browser in order to filter it. In this case, you will most likely want to implement server-side filtering, sorting, pagination, etc.\n\nHowever, as also discussed in the [Pagination Guide](./pagination#should-you-use-client-side-pagination), a lot of developers underestimate how many rows can be loaded client-side without a performance hit. The TanStack table examples are often tested to handle up to 100,000 rows or more with decent performance for client-side filtering, sorting, pagination, and grouping. This doesn't necessarily mean that your app will be able to handle that many rows, but if your table is only going to have a few thousand rows at most, you might be able to take advantage of the client-side filtering, sorting, pagination, and grouping that TanStack table provides.\n\n> TanStack Table can handle thousands of client-side rows with good performance. Don't rule out client-side filtering, pagination, sorting, etc. without some thought first.\n\nEvery use-case is different and will depend on the complexity of the table, how many columns you have, how large every piece of data is, etc. The main bottlenecks to pay attention to are:\n\n1. Can your server query all of the data in a reasonable amount of time (and cost)?\n2. What is the total size of the fetch? (This might not scale as badly as you think if you don't have many columns.)\n3. Is the client's browser using too much memory if all of the data is loaded at once?\n\nIf you're not sure, you can always start with client-side filtering and pagination and then switch to server-side strategies in the future as your data grows.\n\n### Manual Server-Side Global Filtering\n\nIf you have decided that you need to implement server-side global filtering instead of using the built-in client-side global filtering, here's how you do that.\n\nNo `filteredRowModel` is needed for manual server-side global filtering. Instead, the `data` that you pass to the table should already be filtered. However, if you have added a `filteredRowModel` to `_rowModels`, you can tell the table to skip it by setting the `manualFiltering` option to `true`.\n\n```jsx\nimport {\n  useTable,\n  tableFeatures,\n  globalFilteringFeature,\n} from '@tanstack/react-table'\n\nconst _features = tableFeatures({ globalFilteringFeature })\n\nconst table = useTable({\n  _features,\n  _rowModels: {}, // no filteredRowModel needed for manual server-side global filtering\n  data,\n  columns,\n  manualFiltering: true,\n})\n```\n\nNote: When using manual global filtering, many of the options that are discussed in the rest of this guide will have no effect. When manualFiltering is set to true, the table instance will not apply any global filtering logic to the rows that are passed to it. Instead, it will assume that the rows are already filtered and will use the data that you pass to it as-is.\n\n### Client-Side Global Filtering\n\nIf you are using the built-in client-side global filtering, add the `globalFilteringFeature` to your features and the `filteredRowModel` to your row models:\n\n```jsx\nimport {\n  useTable,\n  tableFeatures,\n  globalFilteringFeature,\n  createFilteredRowModel,\n  filterFns,\n} from '@tanstack/react-table'\n\nconst _features = tableFeatures({ globalFilteringFeature })\n\nconst table = useTable({\n  _features,\n  _rowModels: {\n    filteredRowModel: createFilteredRowModel(filterFns),\n  },\n  // other options...\n})\n```\n\n### Global Filter Function\n\nThe globalFilterFn option allows you to specify the filter function that will be used for global filtering. The filter function can be a string that references a built-in filter function, a string that references a custom filter function provided via the tableOptions.filterFns option, or a custom filter function.\n\n```jsx\nconst table = useTable({\n  _features,\n  _rowModels: {\n    filteredRowModel: createFilteredRowModel(filterFns),\n  },\n  data,\n  columns,\n  globalFilterFn: 'text', // built-in filter function\n})\n```\n\nBy default there are 10 built-in filter functions to choose from:\n\n- includesString - Case-insensitive string inclusion\n- includesStringSensitive - Case-sensitive string inclusion\n- equalsString - Case-insensitive string equality\n- equalsStringSensitive - Case-sensitive string equality\n- arrIncludes - Item inclusion within an array\n- arrIncludesAll - All items included in an array\n- arrIncludesSome - Some items included in an array\n- equals - Object/referential equality Object.is/===\n- weakEquals - Weak object/referential equality ==\n- inNumberRange - Number range inclusion\n\nYou can also define your own custom filter functions either as the globalFilterFn table option.\n\n### Global Filter State\n\nThe global filter state is stored in the table's internal state and can be accessed via the table.store.state.globalFilter property. If you want to persist the global filter state outside of the table, you can use the onGlobalFilterChange option to provide a callback function that will be called whenever the global filter state changes.\n\n```jsx\nconst [globalFilter, setGlobalFilter] = useState<any>([])\n\nconst table = useTable({\n  _features,\n  _rowModels: { filteredRowModel: createFilteredRowModel(filterFns) },\n  // other options...\n  state: {\n    globalFilter,\n  },\n  onGlobalFilterChange: setGlobalFilter,\n})\n```\n\nThe global filtering state is defined as an object with the following shape:\n\n```jsx\ninterface GlobalFilter {\n  globalFilter: any\n}\n```\n\n### Adding global filter input to UI\n\nTanStack table will not add a global filter input UI to your table. You should manually add it to your UI to allow users to filter the table. For example, you can add an input UI above the table to allow users to enter a search term.\n\n```jsx\nreturn (\n  <div>\n    <input\n      value=\"\"\n      onChange={e => table.setGlobalFilter(String(e.target.value))}\n      placeholder=\"Search...\"\n    />\n  </div>\n)\n```\n\n### Custom Global Filter Function\n\nIf you want to use a custom global filter function, you can define the function and pass it to the globalFilterFn option.\n\n> **Note:** It is often a popular idea to use fuzzy filtering functions for global filtering. This is discussed in the [Fuzzy Filtering Guide](./fuzzy-filtering.md).\n\n```jsx\nconst customFilterFn = (rows, columnId, filterValue) => {\n  // custom filter logic\n}\n\nconst table = useTable({\n  _features,\n  _rowModels: { filteredRowModel: createFilteredRowModel(filterFns) },\n  // other options...\n  globalFilterFn: customFilterFn,\n})\n```\n\n### Initial Global Filter State\n\nIf you want to set an initial global filter state when the table is initialized, you can pass the global filter state as part of the table initialState option.\n\nHowever, you can also just specify the initial global filter state in the state.globalFilter option.\n\n```jsx\nconst [globalFilter, setGlobalFilter] = useState(\"search term\") //recommended to initialize globalFilter state here\n\nconst table = useTable({\n  _features,\n  _rowModels: { filteredRowModel: createFilteredRowModel(filterFns) },\n  // other options...\n  initialState: {\n    globalFilter: 'search term', // if not managing globalFilter state, set initial state here\n  },\n  state: {\n    globalFilter, // pass our managed globalFilter state to the table\n  },\n})\n```\n\n> NOTE: Do not use both initialState.globalFilter and state.globalFilter at the same time, as the initialized state in the state.globalFilter will override the initialState.globalFilter.\n\n### Disable Global Filtering\n\nBy default, global filtering is enabled for all columns. You can disable the global filtering for all columns by using the enableGlobalFilter table option. You can also turn off both column and global filtering by setting the enableFilters table option to false.\n\nDisabling global filtering will cause the column.getCanGlobalFilter API to return false for that column.\n\n```jsx\nconst columns = [\n  {\n    header: () => 'Id',\n    accessorKey: 'id',\n    enableGlobalFilter: false, // disable global filtering for this column\n  },\n  //...\n]\n//...\nconst table = useTable({\n  _features,\n  _rowModels: { filteredRowModel: createFilteredRowModel(filterFns) },\n  // other options...\n  columns,\n  enableGlobalFilter: false, // disable global filtering for all columns\n})\n```\n"
  },
  {
    "path": "docs/guide/grouping.md",
    "content": "---\ntitle: Grouping Guide\n---\n\n## Examples\n\nWant to skip to the implementation? Check out these examples:\n\n- [grouping](../framework/react/examples/grouping)\n\n## API\n\n[Grouping API](../api/features/grouping)\n\n## Grouping Guide\n\nThere are 3 table features that can reorder columns, which happen in the following order:\n\n1. [Column Pinning](./column-pinning) - If pinning, columns are split into left, center (unpinned), and right pinned columns.\n2. Manual [Column Ordering](./column-ordering) - A manually specified column order is applied.\n3. **Grouping** - If grouping is enabled, a grouping state is active, and `tableOptions.groupedColumnMode` is set to `'reorder' | 'remove'`, then the grouped columns are reordered to the start of the column flow.\n\nGrouping in TanStack table is a feature that applies to columns and allows you to categorize and organize the table rows based on specific columns. This can be useful in cases where you have a large amount of data and you want to group them together based on certain criteria.\n\nTo use the grouping feature, add the `columnGroupingFeature` to your features and the `groupedRowModel` to your row models. The grouped row model is responsible for grouping the rows based on the grouping state.\n\n```tsx\nimport {\n  useTable,\n  tableFeatures,\n  columnGroupingFeature,\n  createGroupedRowModel,\n  aggregationFns,\n} from '@tanstack/react-table'\n\nconst _features = tableFeatures({ columnGroupingFeature })\n\nconst table = useTable({\n  _features,\n  _rowModels: {\n    groupedRowModel: createGroupedRowModel(aggregationFns),\n  },\n  // other options...\n})\n```\n\nWhen grouping state is active, the table will add matching rows as subRows to the grouped row. The grouped row will be added to the table rows at the same index as the first matching row. The matching rows will be removed from the table rows.\nTo allow the user to expand and collapse the grouped rows, you can use the expanding feature.\n\n```tsx\nconst _features = tableFeatures({ columnGroupingFeature, rowExpandingFeature })\n\nconst table = useTable({\n  _features,\n  _rowModels: {\n    groupedRowModel: createGroupedRowModel(aggregationFns),\n    expandedRowModel: createExpandedRowModel(),\n  },\n  // other options...\n})\n```\n\n### Grouping state\n\nThe grouping state is an array of strings, where each string is the ID of a column to group by. The order of the strings in the array determines the order of the grouping. For example, if the grouping state is ['column1', 'column2'], then the table will first group by column1, and then within each group, it will group by column2. You can control the grouping state using the setGrouping function:\n\n```tsx\ntable.setGrouping(['column1', 'column2']);\n```\n\nYou can also reset the grouping state to its initial state using the resetGrouping function:\n\n```tsx\ntable.resetGrouping();\n```\n\nBy default, when a column is grouped, it is moved to the start of the table. You can control this behavior using the groupedColumnMode option. If you set it to 'reorder', then the grouped columns will be moved to the start of the table. If you set it to 'remove', then the grouped columns will be removed from the table. If you set it to false, then the grouped columns will not be moved or removed.\n\n```tsx\nconst table = useTable({\n  _features,\n  _rowModels: { groupedRowModel: createGroupedRowModel(aggregationFns) },\n  // other options...\n  groupedColumnMode: 'reorder',\n})\n```\n\n### Aggregations\n\nWhen rows are grouped, you can aggregate the data in the grouped rows by columns using the aggregationFn option. This is a string that is the ID of the aggregation function. You can define the aggregation functions using the aggregationFns option.\n\n```tsx\nconst column = columnHelper.accessor('key', {\n  aggregationFn: 'sum',\n})\n```\n\nIn the above example, the sum aggregation function will be used to aggregate the data in the grouped rows.\nBy default, numeric columns will use the sum aggregation function, and non-numeric columns will use the count aggregation function. You can override this behavior by specifying the aggregationFn option in the column definition.\n\nThere are several built-in aggregation functions that you can use:\n\n- sum - Sums the values in the grouped rows.\n- count - Counts the number of rows in the grouped rows.\n- min - Finds the minimum value in the grouped rows.\n- max - Finds the maximum value in the grouped rows.\n- extent - Finds the extent (min and max) of the values in the grouped rows.\n- mean - Finds the mean of the values in the grouped rows.\n- median - Finds the median of the values in the grouped rows.\n- unique - Returns an array of unique values in the grouped rows.\n- uniqueCount - Counts the number of unique values in the grouped rows.\n\n#### Custom Aggregations\n\nWhen rows are grouped, you can aggregate the data in the grouped rows using the aggregationFns option. This is a record where the keys are the IDs of the aggregation functions, and the values are the aggregation functions themselves. You can then reference these aggregation functions in a column's aggregationFn option.\n\n```tsx\nconst table = useTable({\n  _features,\n  _rowModels: {\n    groupedRowModel: createGroupedRowModel({\n      ...aggregationFns,\n      myCustomAggregation: (columnId, leafRows, childRows) => {\n        // return the aggregated value\n      },\n    }),\n  },\n  // other options...\n})\n```\n\nIn the above example, myCustomAggregation is a custom aggregation function that takes the column ID, the leaf rows, and the child rows, and returns the aggregated value. You can then use this aggregation function in a column's aggregationFn option:\n\n```tsx\nconst column = columnHelper.accessor('key', {\n  aggregationFn: 'myCustomAggregation',\n})\n```\n\n### Manual Grouping\n\nIf you are doing server-side grouping and aggregation, you can enable manual grouping using the manualGrouping option. When this option is set to true, the table will not automatically group rows using getGroupedRowModel() and instead will expect you to manually group the rows before passing them to the table.\n\n```tsx\nconst table = useTable({\n  _features: tableFeatures({ columnGroupingFeature }),\n  _rowModels: {}, // no groupedRowModel needed for manual grouping\n  // other options...\n  manualGrouping: true,\n})\n```\n\n> **Note:** There are not currently many known easy ways to do server-side grouping with TanStack Table. You will need to do lots of custom cell rendering to make this work.\n\n### Grouping Change Handler\n\nIf you want to manage the grouping state yourself, you can use the onGroupingChange option. This option is a function that is called when the grouping state changes. You can pass the managed state back to the table via the tableOptions.state.grouping option.\n\n```tsx\nconst [grouping, setGrouping] = useState<string[]>([])\n\nconst table = useTable({\n  _features,\n  _rowModels: { groupedRowModel: createGroupedRowModel(aggregationFns) },\n  // other options...\n  state: {\n    grouping,\n  },\n  onGroupingChange: setGrouping,\n})\n```\n"
  },
  {
    "path": "docs/guide/header-groups.md",
    "content": "---\ntitle: Header Groups Guide\n---\n\n## API\n\n[Header Group API](../api/core/header-group)\n\n## Header Groups Guide\n\nThis quick guide will discuss the different ways you can retrieve and interact with header group objects in TanStack Table.\n\n### What are Header Groups?\n\nHeader Groups are simply \"rows\" of headers. Don't let the name confuse you, it's just that simple. The large majority of tables will only have one row of headers (a single header group), but if you define your column structure with nested columns as with the [Column Groups example](../framework/react/examples/column-groups), you can have multiple rows of headers (multiple header groups).\n\n### Where to Get Header Groups From\n\nThere are multiple `table` instance APIs you can use to retrieve header groups from the table instance. `table.getHeaderGroups` is the most common API to use, but depending on the features that you are using, you may need to use other APIs, such as `table.get[Left/Center/Right]HeaderGroups` if you are using column pinning features.\n\n### Header Group Objects\n\nHeader Group objects are similar to [Row](./rows) objects, though simpler since there is not as much going on in header rows as there are in the body rows.\n\nBy default, header groups only have three properties:\n\n- `id`: The unique identifier for the header group that is generated from its depth (index). This is useful as a key for React components.\n- `depth`: The depth of the header group, zero-indexed based. Think of this as the row index amongst all header rows.\n- `headers`: An array of [Header](./headers) cell objects that belong to this header group (row).\n\n### Access Header Cells\n\nTo render the header cells in a header group, you just map over the `headers` array from the header group object.\n\n```jsx\n<thead>\n  {table.getHeaderGroups().map(headerGroup => {\n    return (\n      <tr key={headerGroup.id}>\n        {headerGroup.headers.map(header => ( // map over the headerGroup headers array\n          <th key={header.id} colSpan={header.colSpan}>\n            {/* */}\n          </th>\n        ))}\n      </tr>\n    )\n  })}\n</thead>\n```"
  },
  {
    "path": "docs/guide/headers.md",
    "content": "---\ntitle: Headers Guide\n---\n\n## API\n\n[Header API](../api/core/header)\n\n## Headers Guide\n\nThis quick guide will discuss the different ways you can retrieve and interact with `header` objects in TanStack Table.\n\nHeaders are the equivalent of cells, but meant for the `<thead>` section of the table instead of the `<tbody>` section.\n\n### Where to Get Headers From\n\nHeaders come from [Header Groups](./header-groups), which are the equivalent of rows, but meant for the `<thead>` section of the table instead of the `<tbody>` section.\n\n#### HeaderGroup Headers\n\nIf you are in a header group, the headers are stored as an array in the `headerGroup.headers` property. Usually you will just map over this array to render your headers.\n\n```jsx\n<thead>\n  {table.getHeaderGroups().map(headerGroup => {\n    return (\n      <tr key={headerGroup.id}>\n        {headerGroup.headers.map(header => ( // map over the headerGroup headers array\n          <th key={header.id} colSpan={header.colSpan}>\n            {/* */}\n          </th>\n        ))}\n      </tr>\n    )\n  })}\n</thead>\n```\n\n#### Header Table Instance APIs\n\nThere are multiple `table` instance APIs that you can use to retrieve a list of headers depending on the features that you are using. The most common API you might use is `table.getFlatHeaders`, which will return a flat list of all headers in the table, but there are at least a dozen other headers that are useful in tandem with the column visibility and column pinning features. APIs like `table.getLeftLeafHeaders` or `table.getRightFlatHeaders` could be useful depending on your use case.\n\n### Header Objects\n\nHeader objects are similar to [Cell](./cells) objects, but meant for the `<thead>` section of the table instead of the `<tbody>` section. Every header object can be associated with a `<th>` or similar cell element in your UI. There are a few properties and methods on `header` objects that you can use to interact with the table state and extract cell values from the table based on the state of the table.\n\n#### Header IDs\n\nEvery header object has an `id` property that makes it unique within the table instance. Usually you only need this `id` as a unique identifier for React keys or if you are following the [performant column resizing example](../framework/react/examples/column-resizing-performant).\n\nFor simple headers with no advanced nested or grouped headers logic, the `header.id` will be the same as it's parent `column.id`. However, if the header is part group column or a placeholder cell, it will have a more complicated id that is constructed from the header family, depth/header row index, column id, and header group id.\n\n#### Nested Grouped Headers Properties\n\nThere are a few properties on `header` objects that are only useful if the header is part of a nested or grouped header structure. These properties include:\n\n- `colspan`: The number of columns that the header should span. This is useful for rendering the `colSpan` attribute on the `<th>` element.\n- `rowSpan`: The number of rows that the header should span. This is useful for rendering the `rowSpan` attribute on the `<th>` element. (Currently not implemented in default TanStack Table)\n- `depth`: The header group \"row index\" that the header group belongs to.\n- `isPlaceholder`: A boolean flag that is true if the header is a placeholder header. Placeholder headers are used to fill in the gaps when a column is hidden or when a column is part of a group column.\n- `placeholderId`: The unique identifier for the placeholder header.\n- `subHeaders`: The array of sub/child headers that belong to this header. Will be empty if the header is a leaf header.\n\n> Note: `header.index` refers to its index within the header group (row of headers), i.e. its position from left to right. It is not the same as `header.depth`, which refers to the header group \"row index\".\n\n#### Header Parent Objects\n\nEvery header stores a reference to its parent [column](./columns) object and its parent [header group](./header-groups) object.\n\n### More Header APIs\n\nHeaders have a few more useful APIs attached to them that are useful for interacting with the table state. Most of them relate to the Column sizing and resizing features. See the [Column Resizing Guide](./column-resizing) for more information.\n\n### Header Rendering\n\nSince the `header` column option you defined can be either a string, jsx, or a function returning either of those, the best way to render the headers is to use the `flexRender` utility from your adapter, which will handle all of those cases for you.\n\n```jsx\n{headerGroup.headers.map(header => (\n  <th key={header.id} colSpan={header.colSpan}>\n    {/* Handles all possible header column def scenarios for `header` */}\n    {flexRender(header.column.columnDef.header, header.getContext())}\n  </th>\n))}"
  },
  {
    "path": "docs/guide/pagination.md",
    "content": "---\ntitle: Pagination Guide\n---\n\n## Examples\n\nWant to skip to the implementation? Check out these examples:\n\n- [pagination](../framework/react/examples/pagination)\n- [pagination-controlled (React Query)](../framework/react/examples/pagination-controlled)\n- [editable-data](../framework/react/examples/editable-data)\n- [expanding](../framework/react/examples/expanding)\n- [filters](../framework/react/examples/filters)\n- [fully-controlled](../framework/react/examples/fully-controlled)\n- [row-selection](../framework/react/examples/row-selection)\n\n## API\n\n[Pagination API](../api/features/pagination)\n\n## Pagination Guide\n\nTanStack Table has great support for both client-side and server-side pagination. This guide will walk you through the different ways to implement pagination in your table.\n\n### Client-Side Pagination\n\nUsing client-side pagination means that the `data` that you fetch will contain ***ALL*** of the rows for the table, and the table instance will handle pagination logic in the front-end.\n\n#### Should You Use Client-Side Pagination?\n\nClient-side pagination is usually the simplest way to implement pagination when using TanStack Table, but it might not be practical for very large datasets.\n\nHowever, a lot of people underestimate just how much data can be handled client-side. If your table will only ever have a few thousand rows or less, client-side pagination can still be a viable option. TanStack Table is designed to scale up to 10s of thousands of rows with decent performance for pagination, filtering, sorting, and grouping. The [official pagination example](../framework/react/examples/pagination) loads 100,000 rows and still performs well, albeit with only handful of columns.\n\nEvery use-case is different and will depend on the complexity of the table, how many columns you have, how large every piece of data is, etc. The main bottlenecks to pay attention to are:\n\n1. Can your server query all of the data in a reasonable amount of time (and cost)?\n2. What is the total size of the fetch? (This might not scale as badly as you think if you don't have many columns.)\n3. Is the client's browser using too much memory if all of the data is loaded at once?\n\nIf you're not sure, you can always start with client-side pagination and then switch to server-side pagination in the future as your data grows.\n\n#### Should You Use Virtualization Instead?\n\nAlternatively, instead of paginating the data, you can render all rows of a large dataset on the same page, but only use the browser's resources to render the rows that are visible in the viewport. This strategy is often called \"virtualization\" or \"windowing\". TanStack offers a virtualization library called [TanStack Virtual](https://tanstack.com/virtual/latest) that can work well with TanStack Table. The UI/UX of both virtualization and pagination have their own trade-offs, so see which one works best for your use-case.\n\n#### Pagination Row Model\n\nIf you want to take advantage of the built-in client-side pagination in TanStack Table, add the `rowPaginationFeature` to your features and the `paginatedRowModel` to your row models:\n\n```jsx\nimport {\n  useTable,\n  tableFeatures,\n  rowPaginationFeature,\n  createPaginatedRowModel,\n} from '@tanstack/react-table'\n\nconst _features = tableFeatures({ rowPaginationFeature })\n\nconst table = useTable({\n  _features,\n  _rowModels: {\n    paginatedRowModel: createPaginatedRowModel(),\n  },\n  columns,\n  data,\n})\n```\n\n> **Migrating from v8?** See [useLegacyTable](../framework/react/guide/use-legacy-table) for incremental migration.\n\n### Manual Server-Side Pagination\n\nIf you decide that you need to use server-side pagination, here is how you can implement it.\n\nNo pagination row model is needed for server-side pagination, but if you have provided it for other tables that do need it in a shared component, you can still turn off the client-side pagination by setting the `manualPagination` option to `true`. Setting the `manualPagination` option to `true` will tell the table instance to use the `table.getPrePaginatedRowModel` row model under the hood, and it will make the table instance assume that the `data` that you pass in is already paginated.\n\n#### Page Count and Row Count\n\nThe table instance will have no way of knowing how many rows/pages there are in total in your back-end unless you tell it. Provide either the `rowCount` or `pageCount` table option to let the table instance know how many pages there are in total. If you provide a `rowCount`, the table instance will calculate the `pageCount` internally from `rowCount` and `pageSize`. Otherwise, you can directly provide the `pageCount` if you already have it. If you don't know the page count, you can just pass in `-1` for the `pageCount`, but the `getCanNextPage` and `getCanPreviousPage` row model functions will always return `true` in this case.\n\n```jsx\nimport {\n  useTable,\n  tableFeatures,\n  rowPaginationFeature,\n} from '@tanstack/react-table'\n\nconst _features = tableFeatures({ rowPaginationFeature })\n\nconst table = useTable({\n  _features,\n  _rowModels: {}, // no paginatedRowModel needed for server-side pagination\n  columns,\n  data,\n  manualPagination: true, // turn off client-side pagination\n  rowCount: dataQuery.data?.rowCount, // pass in the total row count so the table knows how many pages there are (pageCount calculated internally if not provided)\n  // pageCount: dataQuery.data?.pageCount, // alternatively directly pass in pageCount instead of rowCount\n})\n```\n\n> **Note**: Setting the `manualPagination` option to `true` will make the table instance assume that the `data` that you pass in is already paginated.\n\n### Pagination State\n\nWhether or not you are using client-side or manual server-side pagination, you can use the built-in `pagination` state and APIs.\n\nThe `pagination` state is an object that contains the following properties:\n\n- `pageIndex`: The current page index (zero-based).\n- `pageSize`: The current page size.\n\nYou can manage the `pagination` state just like any other state in the table instance.\n\n```jsx\nimport {\n  useTable,\n  tableFeatures,\n  rowPaginationFeature,\n  createPaginatedRowModel,\n} from '@tanstack/react-table'\n\nconst _features = tableFeatures({ rowPaginationFeature })\n\nconst [pagination, setPagination] = useState({\n  pageIndex: 0, // initial page index\n  pageSize: 10, // default page size\n})\n\nconst table = useTable({\n  _features,\n  _rowModels: {\n    paginatedRowModel: createPaginatedRowModel(),\n  },\n  columns,\n  data,\n  onPaginationChange: setPagination,\n  state: {\n    pagination,\n  },\n})\n```\n\nAlternatively, if you have no need for managing the `pagination` state in your own scope, but you need to set different initial values for the `pageIndex` and `pageSize`, you can use the `initialState` option.\n\n```jsx\nconst table = useTable({\n  _features,\n  _rowModels: {\n    paginatedRowModel: createPaginatedRowModel(),\n  },\n  columns,\n  data,\n  initialState: {\n    pagination: {\n      pageIndex: 2, // custom initial page index\n      pageSize: 25, // custom default page size\n    },\n  },\n})\n```\n\n> **Note**: Do NOT pass the `pagination` state to both the `state` and `initialState` options. `state` will overwrite `initialState`. Only use one or the other.\n\n### Pagination Options\n\nBesides the `manualPagination`, `pageCount`, and `rowCount` options which are useful for manual server-side pagination (and discussed [above](#manual-server-side-pagination)), there is one other table option that is useful to understand.\n\n#### Auto Reset Page Index\n\nBy default, `pageIndex` is reset to `0` when page-altering state changes occur, such as when the `data` is updated, filters change, grouping changes, etc. This behavior is automatically disabled when `manualPagination` is true but it can be overridden by explicitly assigning a boolean value to the `autoResetPageIndex` table option.\n\n```jsx\nconst table = useTable({\n  _features,\n  _rowModels: {\n    paginatedRowModel: createPaginatedRowModel(),\n  },\n  columns,\n  data,\n  autoResetPageIndex: false, // turn off auto reset of pageIndex\n})\n```\n\nBe aware, however, that if you turn off `autoResetPageIndex`, you may need to add some logic to handle resetting the `pageIndex` yourself to avoid showing empty pages.\n\n### Pagination APIs\n\nThere are several pagination table instance APIs that are useful for hooking up your pagination UI components.\n\n#### Pagination Button APIs\n\n- `getCanPreviousPage`: Useful for disabling the \"previous page\" button when on the first page.\n- `getCanNextPage`: Useful for disabling the \"next page\" button when there are no more pages.\n- `previousPage`: Useful for going to the previous page. (Button click handler)\n- `nextPage`: Useful for going to the next page. (Button click handler)\n- `firstPage`: Useful for going to the first page. (Button click handler)\n- `lastPage`: Useful for going to the last page. (Button click handler)\n- `setPageIndex`: Useful for a \"go to page\" input.\n- `resetPageIndex`: Useful for resetting the table state to the original page index.\n- `setPageSize`: Useful for a \"page size\" input/select.\n- `resetPageSize`: Useful for resetting the table state to the original page size.\n- `setPagination`: Useful for setting all of the pagination state at once.\n- `resetPagination`: Useful for resetting the table state to the original pagination state.\n\n> **Note**: These pagination APIs are available when using `rowPaginationFeature`.\n\n```jsx\n<Button\n  onClick={() => table.firstPage()}\n  disabled={!table.getCanPreviousPage()}\n>\n  {'<<'}\n</Button>\n<Button\n  onClick={() => table.previousPage()}\n  disabled={!table.getCanPreviousPage()}\n>\n  {'<'}\n</Button>\n<Button\n  onClick={() => table.nextPage()}\n  disabled={!table.getCanNextPage()}\n>\n  {'>'}\n</Button>\n<Button\n  onClick={() => table.lastPage()}\n  disabled={!table.getCanNextPage()}\n>\n  {'>>'}\n</Button>\n<select\n  value={table.store.state.pagination.pageSize}\n  onChange={e => {\n    table.setPageSize(Number(e.target.value))\n  }}\n>\n  {[10, 20, 30, 40, 50].map(pageSize => (\n    <option key={pageSize} value={pageSize}>\n      {pageSize}\n    </option>\n  ))}\n</select>\n```\n\n#### Pagination Info APIs\n\n- `getPageCount`: Useful for showing the total number of pages.\n- `getRowCount`: Useful for showing the total number of rows.\n"
  },
  {
    "path": "docs/guide/pinning.md",
    "content": "---\ntitle: Pinning Guide\n---\n\n<!-- Deprecated  -->\n\nPinning is split into 2 different feature guides:\n\n- [Column Pinning](./column-pinning)\n- [Row Pinning](./row-pinning)"
  },
  {
    "path": "docs/guide/row-models.md",
    "content": "---\ntitle: Row Models Guide\n---\n\n## Row Models Guide\n\nIf you take a look at the most basic example of TanStack Table, you'll see a code snippet like this:\n\n```ts\nimport { tableFeatures, useTable } from '@tanstack/react-table'\n\nconst _features = tableFeatures({}) // Core features only\n\nfunction Component() {\n  const table = useTable({\n    _features,\n    _rowModels: {}, // Core row model is automatic; add others as needed\n    columns,\n    data,\n  })\n}\n```\n\nIn v9, row models are configured via the `_rowModels` option. The core row model is always included automatically. You only add the row models you need for filtering, sorting, pagination, etc. This keeps your bundle small—you only import and use the code for the features you enable.\n\n### What are Row Models?\n\nRow models run under the hood of TanStack Table to transform your original data in useful ways that are needed for data grid features like filtering, sorting, grouping, expanding, and pagination. The rows that get generated and render on screen won't necessarily be a 1:1 mapping of the original data that you passed to the table. They may be sorted, filtered, paginated, etc.\n\n### Configuring Row Models\n\nYou should only add the row models that you need. Here are all of the row models that are available via `_rowModels`:\n\n| `_rowModels` Key | Factory Function | Purpose |\n|------------------|------------------|---------|\n| (automatic) | — | Core row model (always included) |\n| `filteredRowModel` | `createFilteredRowModel(filterFns)` | Filtering (column + global) |\n| `sortedRowModel` | `createSortedRowModel(sortFns)` | Sorting |\n| `paginatedRowModel` | `createPaginatedRowModel()` | Pagination |\n| `expandedRowModel` | `createExpandedRowModel()` | Row expanding |\n| `groupedRowModel` | `createGroupedRowModel(aggregationFns)` | Grouping and aggregation |\n| `facetedRowModel` | `createFacetedRowModel()` | Faceted filtering |\n| `facetedMinMaxValues` | `createFacetedMinMaxValues()` | Min/max for faceted filters |\n| `facetedUniqueValues` | `createFacetedUniqueValues()` | Unique values for faceted filters |\n\nYou must also add the corresponding features to `_features` for each row model you use. For example:\n\n```ts\nimport {\n  tableFeatures,\n  useTable,\n  columnFilteringFeature,\n  rowSortingFeature,\n  rowPaginationFeature,\n  createFilteredRowModel,\n  createSortedRowModel,\n  createPaginatedRowModel,\n  filterFns,\n  sortFns,\n} from '@tanstack/react-table'\n\nconst _features = tableFeatures({\n  columnFilteringFeature,\n  rowSortingFeature,\n  rowPaginationFeature,\n})\n\nconst table = useTable({\n  _features,\n  _rowModels: {\n    filteredRowModel: createFilteredRowModel(filterFns),\n    sortedRowModel: createSortedRowModel(sortFns),\n    paginatedRowModel: createPaginatedRowModel(),\n  },\n  columns,\n  data,\n})\n```\n\nNote that `createFilteredRowModel`, `createSortedRowModel`, and `createGroupedRowModel` accept their processing functions (`filterFns`, `sortFns`, `aggregationFns`) as parameters. This enables tree-shaking—if you use a custom filter, you don't pay for built-in filters you never use.\n\n### Customize/Fork Row Models\n\nYou don't have to use the exact row models that are provided by TanStack Table. If you need some advanced customization for certain row models, feel free to copy the [source code](https://github.com/TanStack/table/tree/main/packages/table-core/src/utils) for the row model you want to customize and modify it to your needs.\n\n### Using Row Models\n\nOnce your table instance has been created, you can access all of the row models that you may need directly from the table instance. There are even more derived row models available apart from the ones that you may have imported.\n\nFor normal rendering use cases, you will probably only need to use the `table.getRowModel()` method, as this row model will use all/any of the other row models depending on which features you have enabled or disabled. All of the other row models are available for you to \"dig into\" some of the underlying data transformations that are happening in the table.\n\n### Available Row Models on Table Instance\n\n- **`getRowModel`** - This is the main row model that you should use for rendering your table rows markup. It will use all of the other row models to generate the final row model that you will use to render your table rows.\n\n- `getCoreRowModel` - returns a basic row model that is just a 1:1 mapping of the original data passed to the table.\n\n- `getFilteredRowModel` - returns a row model that accounts for column filtering and global filtering.\n- `getPreFilteredRowModel` - returns a row model before column filtering and global filtering are applied.\n\n- `getGroupedRowModel` - returns a row model that applies grouping and aggregation to the data and creates sub-rows.\n- `getPreGroupedRowModel` - returns a row model before grouping and aggregation are applied.\n\n- `getSortedRowModel` - returns a row model that has had sorting applied to it.\n- `getPreSortedRowModel` - returns a row model before sorting is applied (rows are in original order).\n\n- `getExpandedRowModel` - returns a row model that accounts for expanded/hidden sub-rows.\n- `getPreExpandedRowModel` - returns a row model that only includes root level rows with no expanded sub-rows included. Still includes sorting.\n\n- `getPaginatedRowModel` - returns a row model that only includes the rows that should be displayed on the current page based on the pagination state.\n- `getPrePaginatedRowModel` - returns a row model without pagination applied (includes all rows).\n\n- `getSelectedRowModel` - returns a row model of all selected rows (but only based on the data that was passed to the table). Runs after getCoreRowModel.\n- `getPreSelectedRowModel` - returns a row model before row selection is applied (Just returns getCoreRowModel).\n- `getGroupedSelectedRowModel` - returns a row model of selected rows after grouping. Runs after getSortedRowModel, which runs after getGroupedRowModel, which runs after getFilteredRowModel.\n- `getFilteredSelectedRowModel` - returns a row model of selected rows after column filtering and global filtering. Runs after getFilteredRowModel.\n\n### The Order of Row Model Execution\n\nKnowing how TanStack Table processes rows internally can help you gain a better understanding of what is happening under the hood, and help you debug any issues you may encounter.\n\nInternally, this is the order in which each of the row models are applied to the data, if their respective features are enabled:\n\n`getCoreRowModel` -> `getFilteredRowModel` -> `getGroupedRowModel` -> `getSortedRowModel` -> `getExpandedRowModel` -> `getPaginatedRowModel` -> `getRowModel`\n\nIf in any case the respective feature is disabled or turned off with a `\"manual*\"` table option, the `getPre*RowModel` will be used instead in that step of the process.\n\nAs you can see above, first the data is filtered, then grouped, then sorted, then expanded, and then finally paginated as the final step.\n\n### Row Model Data Structure\n\nEach row model will provide you the rows in 3 different useful formats:\n\n1. `rows` - An array of rows.\n2. `flatRows` - An array of rows, but all sub-rows are flattened into the top level.\n3. `rowsById` - An object of rows, where each row is keyed by its `id`. This is useful for quickly looking up rows by their `id` with better performance.\n\n```ts\nconsole.log(table.getRowModel().rows) // array of rows\nconsole.log(table.getRowModel().flatRows) // array of rows, but all sub-rows are flattened into the top level\nconsole.log(table.getRowModel().rowsById['row-id']) // object of rows, where each row is keyed by its `id`\n```"
  },
  {
    "path": "docs/guide/row-pinning.md",
    "content": "---\ntitle: Row Pinning Guide\n---\n\n## Examples\n\nWant to skip to the implementation? Check out these examples:\n\n- [row-pinning](../framework/react/examples/row-pinning)\n\n## API\n\n[Row Pinning API](../api/features/row-pinning)\n\n## Row Pinning Guide\n\nThere are 2 table features that can reorder rows, which happen in the following order:\n\n1. **Row Pinning** - If pinning, rows are split into top, center (unpinned), and bottom pinned rows.\n2. [Sorting](./sorting)"
  },
  {
    "path": "docs/guide/row-selection.md",
    "content": "---\ntitle: Row Selection Guide\n---\n\n## Examples\n\nWant to skip to the implementation? Check out these examples:\n\n- [React row-selection](../framework/react/examples/row-selection)\n- [Vue row-selection](../framework/vue/row-selection)\n- [React expanding](../framework/react/examples/expanding)\n\n## API\n\n[Row Selection API](../api/features/row-selection)\n\n## Row Selection Guide\n\nThe row selection feature keeps track of which rows are selected and allows you to toggle the selection of rows in a myriad of ways. Let's take a look at some common use cases.\n\n### Access Row Selection State\n\nThe table instance already manages the row selection state for you (though as seen down below, it may be more convenient to manage the row selection state in your own scope). You can access the internal row selection state or the selected rows from a few APIs.\n\n- `table.store.state.rowSelection` - returns the internal row selection state\n- `getSelectedRowModel()` - returns selected rows\n- `getFilteredSelectedRowModel()` - returns selected rows after filtering\n- `getGroupedSelectedRowModel()` - returns selected rows after grouping and sorting\n\n```ts\nconsole.log(table.store.state.rowSelection) //get the row selection state - { 1: true, 2: false, etc... }\nconsole.log(table.getSelectedRowModel().rows) //get full client-side selected rows\nconsole.log(table.getFilteredSelectedRowModel().rows) //get filtered client-side selected rows\nconsole.log(table.getGroupedSelectedRowModel().rows) //get grouped client-side selected rows\n```\n\n> Note: If you are using `manualPagination`, be aware that the `getSelectedRowModel` API will only return selected rows on the current page because table row models can only generate rows based on the `data` that is passed in. Row selection state, however, can contain row ids that are not present in the `data` array just fine.\n\n### Manage Row Selection State\n\nEven though the table instance will already manage the row selection state for you, it is usually more convenient to manage the state yourself in order to have easy access to the selected row ids that you can use to make API calls or other actions.\n\nUse the `onRowSelectionChange` table option to hoist up the row selection state to your own scope. Then pass the row selection state back to the table instance using in the `state` table option.\n\n```ts\nimport { useTable, tableFeatures, rowSelectionFeature } from '@tanstack/react-table'\n\nconst _features = tableFeatures({ rowSelectionFeature })\n\nconst [rowSelection, setRowSelection] = useState<RowSelectionState>({})\n\nconst table = useTable({\n  _features,\n  _rowModels: {},\n  //...\n  onRowSelectionChange: setRowSelection,\n  state: {\n    rowSelection,\n  },\n})\n```\n\n### Useful Row Ids\n\nBy default, the row id for each row is simply the `row.index`. If you are using row selection features, you most likely want to use a more useful row identifier, since the row selection state is keyed by row id. You can use the `getRowId` table option to specify a function that returns a unique row id for each row.\n\n```ts\nconst table = useTable({\n  _features,\n  _rowModels: {},\n  //...\n  getRowId: (row) => row.uuid, // use the row's uuid from your database as the row id\n})\n```\n\nNow as rows are selected, the row selection state will look something like this:\n\n```json\n{\n  \"13e79140-62a8-4f9c-b087-5da737903b76\": true,\n  \"f3e2a5c0-5b7a-4d8a-9a5c-9c9b8a8e5f7e\": false\n  //...\n}\n```\n\ninstead of this:\n\n```json\n{\n  \"0\": true,\n  \"1\": false\n  //...\n}\n```\n\n### Enable Row Selection Conditionally\n\nRow selection is enabled by default for all rows. To either enable row selection conditionally for certain rows or disable row selection for all rows, you can use the `enableRowSelection` table option which accepts either a boolean or a function for more granular control.\n\n```ts\nconst table = useTable({\n  //...\n  enableRowSelection: row => row.original.age > 18, //only enable row selection for adults\n})\n```\n\nTo enforce whether a row is selectable or not in your UI, you can use the `row.getCanSelect()` API for your checkboxes or other selection UI.\n\n### Single Row Selection\n\nBy default, the table allows multiple rows to be selected at once. If, however, you only want to allow a single row to be selected at once, you can set the `enableMultiRowSelection` table option to `false` to disable multi-row selection, or pass in a function to disable multi-row selection conditionally for a row's sub-rows.\n\nThis is useful for making tables that have radio buttons instead of checkboxes.\n\n```ts\nconst table = useTable({\n  //...\n  enableMultiRowSelection: false, //only allow a single row to be selected at once\n  // enableMultiRowSelection: row => row.original.age > 18, //only allow a single row to be selected at once for adults\n})\n```\n\n### Sub-Row Selection\n\nBy default, selecting a parent row will select all of its sub-rows. If you want to disable auto sub-row selection, you can set the `enableSubRowSelection` table option to `false` to disable sub-row selection, or pass in a function to disable sub-row selection conditionally for a row's sub-rows.\n\n```ts\nconst table = useTable({\n  //...\n  enableSubRowSelection: false, //disable sub-row selection\n  // enableSubRowSelection: row => row.original.age > 18, //disable sub-row selection for adults\n})\n```\n\n### Render Row Selection UI\n\nTanStack table does not dictate how you should render your row selection UI. You can use checkboxes, radio buttons, or simply hook up click events to the row itself. The table instance provides a few APIs to help you render your row selection UI.\n\n#### Connect Row Selection APIs to Checkbox Inputs\n\nTanStack Table provides some handler functions that you can connect directly to your checkbox inputs to make it easy to toggle row selection. These function automatically call other internal APIs to update the row selection state and re-render the table.\n\nUse the `row.getToggleSelectedHandler()` API to connect to your checkbox inputs to toggle the selection of a row.\n\nUse the `table.getToggleAllRowsSelectedHandler()` or `table.getToggleAllPageRowsSelectedHandler` APIs to connect to your \"select all\" checkbox input to toggle the selection of all rows.\n\nIf you need more granular control over these function handlers, you can always just use the `row.toggleSelected()` or `table.toggleAllRowsSelected()` APIs directly. Or you can even just call the `table.setRowSelection()` API to directly set the row selection state just as you would with any other state updater. These handler functions are just a convenience.\n\n```tsx\nconst columns = [\n  {\n    id: 'select-col',\n    header: ({ table }) => (\n      <Checkbox\n        checked={table.getIsAllRowsSelected()}\n        indeterminate={table.getIsSomeRowsSelected()}\n        onChange={table.getToggleAllRowsSelectedHandler()} //or getToggleAllPageRowsSelectedHandler\n      />\n    ),\n    cell: ({ row }) => (\n      <Checkbox\n        checked={row.getIsSelected()}\n        disabled={!row.getCanSelect()}\n        onChange={row.getToggleSelectedHandler()}\n      />\n    ),\n  },\n  //... more column definitions...\n]\n```\n\n#### Connect Row Selection APIs to UI\n\nIf you want a simpler row selection UI, you can just hook up click events to the row itself. The `row.getToggleSelectedHandler()` API is also useful for this use case.\n\n```tsx\n<tbody>\n  {table.getRowModel().rows.map(row => {\n    return (\n      <tr\n        key={row.id}\n        className={row.getIsSelected() ? 'selected' : null}\n        onClick={row.getToggleSelectedHandler()}\n      >\n        {row.getVisibleCells().map(cell => {\n          return <td key={cell.id}>{/* */}</td>\n        })}\n      </tr>\n    )\n  })}\n</tbody>\n```\n"
  },
  {
    "path": "docs/guide/rows.md",
    "content": "---\ntitle: Rows Guide\n---\n\n## API\n\n[Row API](../api/core/row)\n\n## Rows Guide\n\nThis quick guide will discuss the different ways you can retrieve and interact with row objects in TanStack Table.\n\n### Where to Get Rows From\n\nThere are multiple `table` instance APIs you can use to retrieve rows from the table instance.\n\n#### table.getRow\n\nIf you need to access a specific row by its `id`, you can use the `table.getRow` table instance API.\n\n```js\nconst row = table.getRow(rowId)\n```\n\n#### Row Models\n\nThe `table` instance generates `row` objects and stores them in useful arrays called [\"Row Models\"](./row-models). This is discussed in much more detail in the [Row Models Guide](./row-models), but here are the most common ways you may access the row models.\n\n##### Render Rows\n\n```jsx\n<tbody>\n  {table.getRowModel().rows.map(row => (\n    <tr key={row.id}>\n     {/* ... */}\n    </tr>\n  ))}\n</tbody>\n```\n\n##### Get Selected Rows\n\n```js\nconst selectedRows = table.getSelectedRowModel().rows\n```\n\n### Row Objects\n\nEvery row object contains row data and many APIs to either interact with the table state or extract cells from the row based on the state of the table.\n\n#### Row IDs\n\nEvery row object has an `id` property that makes it unique within the table instance. By default the `row.id` is the same as the `row.index` that is created in the row model. However, it can be useful to override each row's `id` with a unique identifier from the row's data. You can use the `getRowId` table option to do this.\n\n```js\nconst table = useTable({\n  _features,\n  _rowModels: {},\n  columns,\n  data,\n  getRowId: (originalRow) => originalRow.uuid, // override the row.id with the uuid from the original row's data\n})\n```\n\n> Note: In some features like grouping and expanding, the `row.id` will have additional string appended to it.\n\n#### Access Row Values\n\nThe recommended way to access data values from a row is to use either the `row.getValue` or `row.renderValue` APIs. Using either of these APIs will cache the results of the accessor functions and keep rendering efficient. The only difference between the two is that `row.renderValue` will return either the value or the `renderFallbackValue` if the value is undefined, whereas `row.getValue` will return the value or `undefined` if the value is undefined.\n\n```js\n// Access data from any of the columns\nconst firstName = row.getValue('firstName') // read the row value from the firstName column\nconst renderedLastName = row.renderValue('lastName') // render the value from the lastName column\n```\n\n> Note: `cell.getValue` and `cell.renderValue` are shortcuts for the `row.getValue` and `row.renderValue` APIs, respectively.\n\n#### Access Original Row Data\n\nFor every row object, you can access the original corresponding `data` that was passed to the table instance via the `row.original` property. None of the data in the `row.original` will have been modified by the accessors in your column definitions, so if you were doing any sort of data transformations in your accessors, those will not be reflected in the `row.original` object.\n\n```js\n// Access any data from the original row\nconst firstName = row.original.firstName // { firstName: 'John', lastName: 'Doe' }\n```\n\n### Sub Rows\n\nIf you are using either grouping or expanding features, your rows may contain sub-rows or parent row references. This is discussed in much more detail in the [Expanding Guide](./expanding), but here is a quick overview of useful properties and methods for working with sub-rows.\n\n- `row.subRows`: An array of sub-rows for the row.\n- `row.depth`: The depth of the row (if nested or grouped) relative to the root row array. 0 for root level rows, 1 for child rows, 2 for grandchild rows, etc.\n- `row.parentId`: The unique ID of the parent row for the row (The row that contains this row in its subRows array).\n- `row.getParentRow`: Returns the parent row for the row, if it exists.\n\n### More Row APIs\n\nDepending on the features that you are using for your table, there are dozens more useful APIs for interacting with rows. See each features' respective API docs or guide for more information."
  },
  {
    "path": "docs/guide/sorting.md",
    "content": "---\ntitle: Sorting Guide\n---\n\n## Examples\n\nWant to skip to the implementation? Check out these examples:\n\n- [sorting](../framework/react/examples/sorting)\n- [filters](../framework/react/examples/filters)\n\n## API\n\n[Sorting API](../api/features/sorting)\n\n## Sorting Guide\n\nTanStack Table provides solutions for just about any sorting use-case you might have. This guide will walk you through the various options that you can use to customize the built-in client-side sorting functionality, as well as how to opt out of client-side sorting in favor of manual server-side sorting.\n\n### Sorting State\n\nThe sorting state is defined as an array of objects with the following shape:\n\n```tsx\ntype ColumnSort = {\n  id: string\n  desc: boolean\n}\ntype SortingState = ColumnSort[]\n```\n\nSince the sorting state is an array, it is possible to sort by multiple columns at once. Read more about the multi-sorting customizations down [below](#multi-sorting).\n\n#### Accessing Sorting State\n\nYou can access the sorting state directly from the table instance just like any other state using the `table.store.state` API.\n\n```tsx\nconst table = useTable({\n  _features,\n  _rowModels: { sortedRowModel: createSortedRowModel(sortFns) },\n  columns,\n  data,\n  //...\n})\n\nconsole.log(table.store.state.sorting) // access the sorting state from the table instance\n```\n\nHowever, if you need to access the sorting state before the table is initialized, you can \"control\" the sorting state like down below.\n\n#### Controlled Sorting State\n\nIf you need easy access to the sorting state, you can control/manage the sorting state in your own state management with the `state.sorting` and `onSortingChange` table options.\n\n```tsx\nconst [sorting, setSorting] = useState<SortingState>([]) // can set initial sorting state here\n//...\n// use sorting state to fetch data from your server or something...\n//...\nconst table = useTable({\n  _features,\n  _rowModels: { sortedRowModel: createSortedRowModel(sortFns) },\n  columns,\n  data,\n  //...\n  state: {\n    sorting,\n  },\n  onSortingChange: setSorting,\n})\n```\n\n#### Initial Sorting State\n\nIf you do not need to control the sorting state in your own state management or scope, but you still want to set an initial sorting state, you can use the `initialState` table option instead of `state`.\n\n```jsx\nconst table = useTable({\n  _features,\n  _rowModels: { sortedRowModel: createSortedRowModel(sortFns) },\n  columns,\n  data,\n  //...\n  initialState: {\n    sorting: [\n      {\n        id: 'name',\n        desc: true, // sort by name in descending order by default\n      },\n    ],\n  },\n})\n```\n\n> **NOTE**: Do not use both `initialState.sorting` and `state.sorting` at the same time, as the initialized state in the `state.sorting` will override the `initialState.sorting`.\n\n### Client-Side vs Server-Side Sorting\n\nWhether or not you should use client-side or server-side sorting depends entirely on whether you are also using client-side or server-side pagination or filtering. Be consistent, because using client-side sorting with server-side pagination or filtering will only sort the data that is currently loaded, and not the entire dataset.\n\n### Manual Server-Side Sorting\n\nIf you plan to just use your own server-side sorting in your back-end logic, you do not need to provide a sorted row model. But if you have provided a sorting row model, but you want to disable it, you can use the `manualSorting` table option.\n\n```jsx\nconst [sorting, setSorting] = useState<SortingState>([])\n//...\nconst table = useTable({\n  _features: tableFeatures({ rowSortingFeature }), // feature needed for sorting state/APIs\n  _rowModels: {}, // no sortedRowModel needed for manual sorting\n  columns,\n  data,\n  manualSorting: true, // use pre-sorted row model instead of sorted row model\n  state: {\n    sorting,\n  },\n  onSortingChange: setSorting,\n})\n```\n\n> **NOTE**: When `manualSorting` is set to `true`, the table will assume that the data that you provide is already sorted, and will not apply any sorting to it.\n\n### Client-Side Sorting\n\nTo implement client-side sorting, add the `rowSortingFeature` to your features and the `sortedRowModel` to your row models. Import `createSortedRowModel` and `sortFns` from TanStack Table:\n\n```jsx\nimport {\n  useTable,\n  tableFeatures,\n  rowSortingFeature,\n  createSortedRowModel,\n  sortFns,\n} from '@tanstack/react-table'\n\nconst _features = tableFeatures({ rowSortingFeature })\n\nconst table = useTable({\n  _features,\n  _rowModels: {\n    sortedRowModel: createSortedRowModel(sortFns),\n  },\n  columns,\n  data,\n})\n```\n\n### Sorting RowModelFns\n\nThe default sorting function for all columns is inferred from the data type of the column. However, it can be useful to define the exact sorting function that you want to use for a specific column, especially if any of your data is nullable or not a standard data type.\n\nYou can determine a custom sorting function on a per-column basis using the `sortFn` column option.\n\nBy default, there are 6 built-in sorting functions to choose from:\n\n- `alphanumeric` - Sorts by mixed alphanumeric values without case-sensitivity. Slower, but more accurate if your strings contain numbers that need to be naturally sorted.\n- `alphanumericCaseSensitive` - Sorts by mixed alphanumeric values with case-sensitivity. Slower, but more accurate if your strings contain numbers that need to be naturally sorted.\n- `text` - Sorts by text/string values without case-sensitivity. Faster, but less accurate if your strings contain numbers that need to be naturally sorted.\n- `textCaseSensitive` - Sorts by text/string values with case-sensitivity. Faster, but less accurate if your strings contain numbers that need to be naturally sorted.\n- `datetime` - Sorts by time, use this if your values are `Date` objects.\n- `basic` - Sorts using a basic/standard `a > b ? 1 : a < b ? -1 : 0` comparison. This is the fastest sorting function, but may not be the most accurate.\n\nYou can also define your own custom sorting functions either as the `sortFn` column option, or as a global sorting function using the `sortFns` table option.\n\n#### Custom Sorting Functions\n\nWhen defining a custom sorting function in either the `sortFns` table option or as a `sortFn` column option, it should have the following signature:\n\n```tsx\n//optionally use the SortFn to infer the parameter types\nconst myCustomSortFn: SortFn<TFeatures, TData> = (rowA: Row<TFeatures, TData>, rowB: Row<TFeatures, TData>, columnId: string) => {\n  return //-1, 0, or 1 - access any row data using rowA.original and rowB.original\n}\n```\n\n> Note: The comparison function does not need to take whether or not the column is in descending or ascending order into account. The row models will take of that logic. `sortFn` functions only need to provide a consistent comparison.\n\nEvery sorting function receives 2 rows and a column ID and are expected to compare the two rows using the column ID to return `-1`, `0`, or `1` in ascending order. Here's a cheat sheet:\n\n| Return | Ascending Order |\n| ------ | --------------- |\n| `-1`   | `a < b`         |\n| `0`    | `a === b`       |\n| `1`    | `a > b`         |\n\n```jsx\nconst columns = [\n  {\n    header: () => 'Name',\n    accessorKey: 'name',\n    sortFn: 'alphanumeric', // use built-in sorting function by name\n  },\n  {\n    header: () => 'Age',\n    accessorKey: 'age',\n    sortFn: 'myCustomSortFn', // use custom global sorting function\n  },\n  {\n    header: () => 'Birthday',\n    accessorKey: 'birthday',\n    sortFn: 'datetime', // recommended for date columns\n  },\n  {\n    header: () => 'Profile',\n    accessorKey: 'profile',\n    // use custom sorting function directly\n    sortFn: (rowA, rowB, columnId) => {\n      return rowA.original.someProperty - rowB.original.someProperty\n    },\n  }\n]\n//...\nconst table = useTable({\n  _features,\n  _rowModels: {\n    sortedRowModel: createSortedRowModel({\n      ...sortFns,\n      myCustomSortFn: (rowA, rowB, columnId) =>\n        rowA.original[columnId] > rowB.original[columnId]\n          ? 1\n          : rowA.original[columnId] < rowB.original[columnId]\n            ? -1\n            : 0,\n    }),\n  },\n  columns,\n  data,\n})\n```\n\n### Customize Sorting\n\nThere are a lot of table and column options that you can use to further customize the sorting UX and behavior.\n\n#### Disable Sorting\n\nYou can disable sorting for either a specific column or the entire table using the `enableSorting` column option or table option.\n\n```jsx\nconst columns = [\n  {\n    header: () => 'ID',\n    accessorKey: 'id',\n    enableSorting: false, // disable sorting for this column\n  },\n  {\n    header: () => 'Name',\n    accessorKey: 'name',\n  },\n  //...\n]\n//...\nconst table = useTable({\n  _features,\n  _rowModels: { sortedRowModel: createSortedRowModel(sortFns) },\n  columns,\n  data,\n  enableSorting: false, // disable sorting for the entire table\n})\n```\n\n#### Sorting Direction\n\nBy default, the first sorting direction when cycling through the sorting for a column using the `toggleSorting` APIs is ascending for string columns and descending for number columns. You can change this behavior with the `sortDescFirst` column option or table option.\n\n```jsx\nconst columns = [\n  {\n    header: () => 'Name',\n    accessorKey: 'name',\n    sortDescFirst: true, //sort by name in descending order first (default is ascending for string columns)\n  },\n  {\n    header: () => 'Age',\n    accessorKey: 'age',\n    sortDescFirst: false, //sort by age in ascending order first (default is descending for number columns)\n  },\n  //...\n]\n//...\nconst table = useTable({\n  _features,\n  _rowModels: { sortedRowModel: createSortedRowModel(sortFns) },\n  columns,\n  data,\n  sortDescFirst: true, //sort by all columns in descending order first (default is ascending for string columns and descending for number columns)\n})\n```\n\n> **NOTE**: You may want to explicitly set the `sortDescFirst` column option on any columns that have nullable values. The table may not be able to properly determine if a column is a number or a string if it contains nullable values.\n\n#### Invert Sorting\n\nInverting sorting is not the same as changing the default sorting direction. If `invertSorting` column option is `true` for a column, then the \"desc/asc\" sorting states will still cycle like normal, but the actual sorting of the rows will be inverted. This is useful for values that have an inverted best/worst scale where lower numbers are better, eg. a ranking (1st, 2nd, 3rd) or golf-like scoring.\n\n```jsx\nconst columns = [\n  {\n    header: () => 'Rank',\n    accessorKey: 'rank',\n    invertSorting: true, // invert the sorting for this column. 1st -> 2nd -> 3rd -> ... even if \"desc\" sorting is applied\n  },\n  //...\n]\n```\n\n#### Sort Undefined Values\n\nAny undefined values will be sorted to the beginning or end of the list based on the `sortUndefined` column option or table option. You can customize this behavior for your specific use-case.\n\nIn not specified, the default value for `sortUndefined` is `1`, and undefined values will be sorted with lower priority (descending), if ascending, undefined will appear on the end of the list.\n\n- `'first'` - Undefined values will be pushed to the beginning of the list\n- `'last'` - Undefined values will be pushed to the end of the list\n- `false` - Undefined values will be considered tied and need to be sorted by the next column filter or original index (whichever applies)\n- `-1` - Undefined values will be sorted with higher priority (ascending) (if ascending, undefined will appear on the beginning of the list)\n- `1` - Undefined values will be sorted with lower priority (descending) (if ascending, undefined will appear on the end of the list)\n\n> NOTE: `'first'` and `'last'` options are available in v9.\n\n```jsx\nconst columns = [\n  {\n    header: () => 'Rank',\n    accessorKey: 'rank',\n    sortUndefined: -1, // 'first' | 'last' | 1 | -1 | false\n  },\n]\n```\n\n#### Sorting Removal\n\nBy default, the ability to remove sorting while cycling through the sorting states for a column is enabled. You can disable this behavior using the `enableSortingRemoval` table option. This behavior is useful if you want to ensure that at least one column is always sorted.\n\nThe default behavior when using either the `getToggleSortingHandler` or `toggleSorting` APIs is to cycle through the sorting states like this:\n\n`'none' -> 'desc' -> 'asc' -> 'none' -> 'desc' -> 'asc' -> ...`\n\nIf you disable sorting removal, the behavior will be like this:\n\n`'none' -> 'desc' -> 'asc' -> 'desc' -> 'asc' -> ...`\n\nOnce a column is sorted and `enableSortingRemoval` is `false`, toggling the sorting on that column will never remove the sorting. However, if the user sorts by another column and it is not a multi-sort event, then the sorting will be removed from the previous column and just applied to the new column.\n\n> Set `enableSortingRemoval` to `false` if you want to ensure that at least one column is always sorted.\n\n```jsx\nconst table = useTable({\n  _features,\n  _rowModels: { sortedRowModel: createSortedRowModel(sortFns) },\n  columns,\n  data,\n  enableSortingRemoval: false, // disable the ability to remove sorting on columns (always none -> asc -> desc -> asc)\n})\n```\n\n#### Multi-Sorting\n\nSorting by multiple columns at once is enabled by default if using the `column.getToggleSortingHandler` API. If the user holds the `Shift` key while clicking on a column header, the table will sort by that column in addition to the columns that are already sorted. If you use the `column.toggleSorting` API, you have to manually pass in whether or not to use multi-sorting. (`column.toggleSorting(desc, multi)`).\n\n##### Disable Multi-Sorting\n\nYou can disable multi-sorting for either a specific column or the entire table using the `enableMultiSort` column option or table option. Disabling multi-sorting for a specific column will replace all existing sorting with the new column's sorting.\n\n```jsx\nconst columns = [\n  {\n    header: () => 'Created At',\n    accessorKey: 'createdAt',\n    enableMultiSort: false, // always sort by just this column if sorting by this column\n  },\n  //...\n]\n//...\nconst table = useTable({\n  _features,\n  _rowModels: { sortedRowModel: createSortedRowModel(sortFns) },\n  columns,\n  data,\n  enableMultiSort: false, // disable multi-sorting for the entire table\n})\n```\n\n##### Customize Multi-Sorting Trigger\n\nBy default, the `Shift` key is used to trigger multi-sorting. You can change this behavior with the `isMultiSortEvent` table option. You can even specify that all sorting events should trigger multi-sorting by returning `true` from the custom function.\n\n```jsx\nconst table = useTable({\n  _features,\n  _rowModels: { sortedRowModel: createSortedRowModel(sortFns) },\n  columns,\n  data,\n  isMultiSortEvent: (e) => true, // normal click triggers multi-sorting\n  //or\n  isMultiSortEvent: (e) => e.ctrlKey || e.shiftKey, // also use the `Ctrl` key to trigger multi-sorting\n})\n```\n\n##### Multi-Sorting Limit\n\nBy default, there is no limit to the number of columns that can be sorted at once. You can set a limit using the `maxMultiSortColCount` table option.\n\n```jsx\nconst table = useTable({\n  _features,\n  _rowModels: { sortedRowModel: createSortedRowModel(sortFns) },\n  columns,\n  data,\n  maxMultiSortColCount: 3, // only allow 3 columns to be sorted at once\n})\n```\n\n##### Multi-Sorting Removal\n\nBy default, the ability to remove multi-sorts is enabled. You can disable this behavior using the `enableMultiRemove` table option.\n\n```jsx\nconst table = useTable({\n  _features,\n  _rowModels: { sortedRowModel: createSortedRowModel(sortFns) },\n  columns,\n  data,\n  enableMultiRemove: false, // disable the ability to remove multi-sorts\n})\n```\n\n### Sorting APIs\n\nThere are a lot of sorting related APIs that you can use to hook up to your UI or other logic. Here is a list of all of the sorting APIs and some of their use-cases.\n\n- `table.setSorting` - Set the sorting state directly.\n- `table.resetSorting` - Reset the sorting state to the initial state or clear it.\n\n- `column.getCanSort` - Useful for enabling/disabling the sorting UI for a column.\n- `column.getIsSorted` - Useful for showing a visual sorting indicator for a column.\n\n- `column.getToggleSortingHandler` - Useful for hooking up the sorting UI for a column. Add to a sort arrow (icon button), menu item, or simply the entire column header cell. This handler will call `column.toggleSorting` with the correct parameters.\n- `column.toggleSorting` - Useful for hooking up the sorting UI for a column. If using instead of `column.getToggleSortingHandler`, you have to manually pass in whether or not to use multi-sorting. (`column.toggleSorting(desc, multi)`)\n- `column.clearSorting` - Useful for a \"clear sorting\" button or menu item for a specific column.\n\n- `column.getNextSortingOrder` - Useful for showing which direction the column will sort by next. (asc/desc/clear in a tooltip/menu item/aria-label or something)\n- `column.getFirstSortDir` - Useful for showing which direction the column will sort by first. (asc/desc in a tooltip/menu item/aria-label or something)\n- `column.getAutoSortDir` - Determines whether the first sorting direction will be ascending or descending for a column.\n- `column.getAutoSortFn` - Used internally to find the default sorting function for a column if none is specified.\n- `column.getSortFn` - Returns the exact sorting function being used for a column.\n\n- `column.getCanMultiSort` - Useful for enabling/disabling the multi-sorting UI for a column.\n- `column.getSortIndex` - Useful for showing a badge or indicator of the column's sort order in a multi-sort scenario. i.e. whether or not it is the first, second, third, etc. column to be sorted.\n"
  },
  {
    "path": "docs/guide/tables.md",
    "content": "---\ntitle: Table Instance Guide\n---\n\n## API\n\n[Table API](../api/core/table)\n\n## Table Instance Guide\n\nTanStack Table is a headless UI library. When we talk about the `table` or \"table instance\", we're not talking about a literal `<table>` element. Instead, we're referring to the core table object that contains the table state and APIs. The `table` instance is created by calling your adapter's `_createTable` function (e.g. `useTable`, `createTable`, or `injectTable`).\n\nThe `table` instance that is returned from the `_createTable` function (from the framework adapter) is the main object that you will interact with to read and mutate the table state. It is the one place where everything happens in TanStack Table. When you get to the point where you are rendering your UI, you will use APIs from this `table` instance.\n\n### Creating a Table Instance\n\nTo create a table instance, 3 `options` are required: `columns`, `data`, and `_features`. The `_features` option declares which table features your table uses (enabling tree-shaking—you only bundle what you use). The core row model is included automatically; add additional row models via `_rowModels` when you need filtering, sorting, pagination, etc. There are dozens of other table options to configure features and behavior.\n\n#### Defining Data\n\nDefine your data as an array of objects with a stable reference. `data` can come from anywhere like an API response or defined statically in your code, but it must have a stable reference to prevent infinite re-renders. If using TypeScript, the type that you give your data will be used as a `TData` generic. See the [Data Guide](./data) for more info.\n\n#### Defining Columns\n\nColumn definitions are covered in detail in the previous section in the [Column Def Guide](./column-defs). We'll note here, however, that when you define the type of your columns, you should use the same `TData` type that you used for your data.\n\n```ts\nconst _features = tableFeatures({}) // Define which features your table uses\nconst columns: ColumnDef<typeof _features, User>[] = [] // Pass User type as TData; use typeof _features for TFeatures\n//or\nconst columnHelper = createColumnHelper<typeof _features, User>() // Pass both TFeatures and TData in v9\n```\n\nThe column definitions are where we will tell TanStack Table how each column should access and/or transform row data with either an `accessorKey` or `accessorFn`. See the [Column Def Guide](./column-defs#creating-accessor-columns) for more info.\n\n#### Defining Features and Row Models\n\nThis is explained in much more detail in the [Row Models Guide](./row-models). In v9, you declare which features your table uses via `_features` (using `tableFeatures()`), and which row models to apply via `_rowModels`. The core row model is always included automatically. For a basic table with no filtering, sorting, or pagination, pass an empty features object and empty row models:\n\n```ts\nimport { tableFeatures } from '@tanstack/[framework]-table'\n\nconst _features = tableFeatures({}) // Core features only; add columnFilteringFeature, rowSortingFeature, etc. as needed\n\nconst table = _createTable({\n  _features,\n  _rowModels: {}, // Core row model is automatic; add filteredRowModel, sortedRowModel, etc. as needed\n  columns,\n  data,\n})\n```\n\n#### Initializing the Table Instance\n\nWith our `_features`, `columns`, `data`, and `_rowModels` defined, we can now create our basic table instance, along side any other table options that we want to pass in.\n\n> **Framework note:** This guide uses React examples. Other frameworks (Angular, Lit, Solid, Svelte, Vue) use `createTable`, `injectTable`, or similar with the same options.\n\n```ts\n//vanilla js\nconst table = _createTable({ _features, _rowModels: {}, columns, data })\n\n//angular\nthis.table = injectTable({ _features, _rowModels: {}, columns: this.columns, data: this.data() })\n\n//lit\nconst table = this.tableController.table({ _features, _rowModels: {}, columns, data })\n\n//react\nconst table = useTable({ _features, _rowModels: {}, columns, data })\n\n//solid\nconst table = createTable({ _features, _rowModels: {}, columns, get data() { return data() } })\n\n//svelte\nconst table = createTable({ _features, _rowModels: {}, columns, data })\n\n//vue\nconst table = useTable({ _features, _rowModels: {}, columns, data })\n```\n\nSo what's in the `table` instance? Let's take a look at what interactions we can have with the table instance.\n\n### Table State\n\nThe table instance contains all of the table state, which can be accessed via the `table.store.state` API. Each table feature registers various states in the table state. For example, the row selection feature registers `rowSelection` state, the pagination feature registers `pagination` state, etc.\n\nEach feature will also have corresponding state setter APIs and state resetter APIs on the table instance. For example, the row selection feature will have a `setRowSelection` API and a `resetRowSelection`.\n\n```ts\ntable.store.state.rowSelection //read the row selection state\ntable.setRowSelection((old) => ({...old})) //set the row selection state\ntable.resetRowSelection() //reset the row selection state\n```\n\nThis is covered in more detail in the [Table State Guides](../framework/react/guide/table-state)\n\n### Table APIs\n\nThere are dozens of table APIs created by each feature to help you either read or mutate the table state in different ways.\n\nAPI reference docs for the core table instance and all other feature APIs can be found throughout the API docs.\n\nFor example, you can find the core table instance API docs here: [Table API](../api/core/table#table-api)\n\n### Table Row Models\n\nThere is a special set of table instance APIs for reading rows out of the table instance called row models. TanStack Table has advanced features where the rows that are generated may be very different than the array of `data` that you originally passed in. To learn more about the different row models that you can pass in as a table option, see the [Row Models Guide](./row-models).\n"
  },
  {
    "path": "docs/guide/virtualization.md",
    "content": "---\ntitle: Virtualization Guide\n---\n\n## Examples\n\nWant to skip to the implementation? Check out these examples:\n\n- [virtualized-columns](../framework/react/examples/virtualized-columns)\n- [virtualized-rows (dynamic row height)](../framework/react/examples/virtualized-rows)\n- [virtualized-rows (fixed row height)](https://tanstack.com/virtual/latest/docs/framework/react/examples/table)\n- [virtualized-infinite-scrolling](../framework/react/examples/virtualized-infinite-scrolling)\n\n## API\n\n[TanStack Virtual Virtualizer API](https://tanstack.com/virtual/latest/docs/api/virtualizer)\n\n## Virtualization Guide\n\nThe TanStack Table packages do not come with any virtualization APIs or features built-in, but TanStack Table can easily work with other virtualization libraries like [react-window](https://www.npmjs.com/package/react-window) or TanStack's own [TanStack Virtual](https://tanstack.com/virtual/v3). This guide will show some strategies for using TanStack Table with TanStack Virtual.\n"
  },
  {
    "path": "docs/installation.md",
    "content": "---\ntitle: Installation\n---\n\nBefore we dig in to the API, let's get you set up!\n\nInstall your table adapter as a dependency using your preferred package manager:\n\n<!-- ::start:tabs variant=\"package-managers\" -->\n\nreact: @tanstack/react-table\nvue: @tanstack/vue-table\nsolid: @tanstack/solid-table\nsvelte: @tanstack/svelte-table\nangular: @tanstack/angular-table\nlit: @tanstack/lit-table\n\n<!-- ::end:tabs -->\n\n<!-- ::start:framework -->\n\n# React\n\nThe `@tanstack/react-table` package works with React 16.8, React 17, React 18, and React 19.\n\n> [!NOTE]\n> Even though the React adapter works with React 19, it may not work with the new React Compiler that's coming out alongside React 19. This may be fixed in future TanStack Table updates.\n\n# Vue\n\nThe `@tanstack/vue-table` package works with Vue 3.\n\n# Solid\n\nThe `@tanstack/solid-table` package works with Solid-JS 1.\n\n# Svelte\n\nThe `@tanstack/svelte-table` package works with Svelte 3 and Svelte 4.\n\n> [!NOTE]\n> There is not a built-in Svelte 5 adapter yet, but you can still use TanStack Table with Svelte 5 by installing the `@tanstack/table-core` package and using a custom adapter from the community. See this [PR](https://github.com/TanStack/table/pull/5403) for inspiration.\n\n# Angular\n\nThe `@tanstack/angular-table` package works with Angular 17. The Angular adapter uses a new Angular Signal implementation.\n\n# Lit\n\nThe `@tanstack/lit-table` package works with Lit 3.\n\n<!-- ::end:framework -->\n\nDon't see your favorite framework (or favorite version of your framework) listed? You can always just use the `@tanstack/table-core` package and build your own adapter in your own codebase. Usually, only a thin wrapper is needed to manage state and rendering for your specific framework. Browse the [source code](https://github.com/TanStack/table/tree/main/packages) of all of the other adapters to see how they work.\n"
  },
  {
    "path": "docs/introduction.md",
    "content": "---\ntitle: Introduction\n---\n\nTanStack Table is a **Headless UI** library for building powerful tables & datagrids for TS/JS, React, Vue, Solid, and Svelte.\n\n## What is \"headless\" UI?\n\n**Headless UI** is a term for libraries and utilities that provide the logic, state, processing and API for UI elements and interactions, but **do not provide markup, styles, or pre-built implementations**. Scratching your head yet? 😉 Headless UI has a few main goals:\n\nThe hardest parts of building complex UIs usually revolve around state, events, side-effects, data computation/management. By removing these concerns from the markup, styles and implementation details, our logic and components can be more modular and reusable.\n\nBuilding UI is a very branded and custom experience, even if that means choosing a design system or adhering to a design spec. To support this custom experience, component-based UI libraries need to support a massive (and seemingly endless) API surface around markup and style customization. Headless UI libraries decouple your logic from your UI\n\nWhen you use a headless UI library, the complex task of **data-processing, state-management, and business logic** are handled for you, leaving you to worry about higher-cardinality decisions that differ across implementations and use cases.\n\n> Want to dive deeper? [Read more about Headless UI](https://www.merrickchristensen.com/articles/headless-user-interface-components/).\n\n## Component-based libraries vs Headless libraries\n\nIn the ecosystem of table/datagrid libraries, there are two main categories:\n\n- Component-based table libraries\n- Headless table libraries\n\n### Which kind of table library should I use?\n\nEach approach has subtle tradeoffs. Understanding these subtleties will help you make the right decision for your application and team.\n\n### Component-based Table Libraries\n\nComponent-based table libraries will typically supply you with a feature-rich drop-in solution and ready-to-use components/markup complete with styles/theming. [AG Grid](https://ag-grid.com/react-data-grid/?utm_source=reacttable&utm_campaign=githubreacttable) is a great example of this type of table library.\n\n**Pros:**\n\n- Ship with ready-to-use markup/styles\n- Little setup required\n- Turn-key experience\n\n**Cons:**\n\n- Less control over markup\n- Custom styles are typically theme-based\n- Larger bundle-sizes\n- Highly coupled to framework adapters and platforms\n\n**If you want a ready-to-use table and design/bundle-size are not hard requirements**, then you should consider using a component-based table library.\n\nThere are a lot of component-based table libraries out there, but we believe [AG Grid](https://ag-grid.com/react-data-grid/?utm_source=reacttable&utm_campaign=githubreacttable) is the gold standard and is by far our favorite grid-sibling (don't tell the others 🤫).\n\n### Headless Table Libraries\n\nHeadless table libraries will typically supply you with functions, state, utilities and event listeners to build your own table markup or attach to existing table markups.\n\n**Pros:**\n\n- Full control over markup and styles\n- Supports all styling patterns (CSS, CSS-in-JS, UI libraries, etc)\n- Smaller bundle-sizes\n- Portable. Run anywhere JS runs!\n\n**Cons:**\n\n- More setup required\n- No markup, styles or themes provided\n\n**If you want a lighter-weight table or full control over the design**, then you should consider using a headless table library.\n\nThere are very few headless table libraries out there and obviously, **TanStack Table** is our favorite!\n"
  },
  {
    "path": "docs/overview.md",
    "content": "---\ntitle: Overview\n---\n\nTanStack Table's core is **framework agnostic**, which means its API is the same regardless of the framework you're using. Adapters are provided to make working with the table core easier depending on your framework. See the Adapters menu for available adapters.\n\n## Typescript\n\nWhile TanStack Table is written in [TypeScript](https://www.typescriptlang.org/), using TypeScript in your application is optional (but recommended as it comes with outstanding benefits to both you and your codebase)\n\nIf you use TypeScript, you will get top-notch type safety and editor autocomplete for all table APIs and state.\n\n## Headless\n\nAs it was mentioned extensively in the [Intro](./introduction) section, TanStack Table is **headless**. This means that it doesn't render any DOM elements, and instead relies on you, the UI/UX developer to provide the table's markup and styles. This is a great way to build a table that can be used in any UI framework, including React, Vue, Solid, Svelte, Angular, and even JS-to-native platforms like React Native!\n\n## Agnostic\n\nSince TanStack Table is headless and runs on a vanilla JavaScript core, it is agnostic in a couple of ways:\n\n1. TanStack Table is **Framework Agnostic**, which means you can use it with any JavaScript framework (or library) that you want. TanStack Table provides ready-to-use adapters for React, Vue, Solid, Svelte out of the box, but you can create your own adapter if you need to.\n2. TanStack Table is **CSS / Component Library Agnostic**, which means that you can use TanStack Table with whatever CSS strategy or component library you want. TanStack Table itself does not render any table markup or styles. You bring your own! Want to use Tailwind or ShadCN? No problem! Want to use Material UI or Bootstrap? No problem! Have your own custom design system? TanStack Table was made for you!\n\n## Core Objects and Types\n\nThe table core uses the following abstractions, commonly exposed by adapters:\n\n- [Data](./guide/data) - The core data array you provide the table\n- [Column Defs](./guide/column-defs): Objects used to configure a column and its data model, display templates, and more\n- [Table Instance](./guide/tables): The core table object containing both state and API\n- [Row Models](./guide/row-models): How the `data` array is transformed into useful rows depending on the features you are using\n- [Rows](./guide/rows): Each row mirrors its respective row data and provides row-specific APIs\n- [Cells](./guide/cells): Each cell mirrors its respective row-column intersection and provides cell-specific APIs\n- [Header Groups](./guide/header-groups):  Header groups are computed slices of nested header levels, each containing a group of headers\n- [Headers](./guide/headers): Each header is either directly associated with or derived from its column def and provides header-specific APIs\n- [Columns](./guide/columns): Each column mirrors its respective column def and also provides column-specific APIs\n\n## Features\n\nTanStack Table will help you build just about any type of table you can imagine. It has built-in state and APIs for the following features:\n\n- [Column Faceting](./guide/column-faceting) - List unique lists of column values or min/max values for a column\n- [Column Filtering](./guide/column-filtering) - Filter rows based on search values for a column\n- [Column Grouping](./guide/grouping) - Group columns together, run aggregations, and more\n- [Column Ordering](./guide/column-ordering) - Dynamically change the order of columns\n- [Column Pinning](./guide/column-pinning) - Pin (Freeze) columns to the left or right of the table\n- [Column Sizing](./guide/column-sizing) - Dynamically change the size of columns (column resizing handles)\n- [Column Visibility](./guide/column-visibility) - Hide/show columns\n- [Global Faceting](./guide/global-faceting) - List unique lists of column values or min/max values for the entire table\n- [Global Filtering](./guide/global-filtering) - Filter rows based on search values for the entire table\n- [Row Expanding](./guide/expanding) - Expand/collapse rows (sub-rows)\n- [Row Pagination](./guide/pagination) - Paginate rows\n- [Row Pinning](./guide/row-pinning) - Pin (Freeze) rows to the top or bottom of the table\n- [Row Selection](./guide/row-selection) - Select/deselect rows (checkboxes)\n- [Row Sorting](./guide/sorting) - Sort rows by column values\n\nThese are just some of the capabilities that you can build with TanStack Table. There are many more features that are possible with TanStack Table that you can add along-side the built-in features.\n\n[Virtualization](./guide/virtualization) is an example of a feature that is not built-in to TanStack Table, but can be achieved by using another library (like [TanStack Virtual](https://tanstack.com/virtual/v3)) and adding it along-side your other table rendering logic.\n\nTanStack Table also supports [Custom Features](./guide/custom-features) (plugins) that you can use to modify the table instance to add your own custom logic to the table in a more integrated way.\n\nAnd of course, you can just write your own state and hooks to add whatever other features you want for your table. The features from the TanStack Table core are just a solid foundation to build on, with a large focus on performance and DX.\n"
  },
  {
    "path": "docs/reference/@tanstack/namespaces/filterFn_arrIncludes/functions/autoRemove.md",
    "content": "---\nid: autoRemove\ntitle: autoRemove\n---\n\n# Function: autoRemove()\n\n```ts\nfunction autoRemove(val): boolean;\n```\n\nDefined in: [fns/filterFns.ts:316](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L316)\n\n## Parameters\n\n### val\n\n`any`\n\n## Returns\n\n`boolean`\n"
  },
  {
    "path": "docs/reference/@tanstack/namespaces/filterFn_arrIncludes/index.md",
    "content": "---\nid: filterFn_arrIncludes\ntitle: filterFn_arrIncludes\n---\n\n# filterFn\\_arrIncludes\n\nFilter function for checking if an array includes a given value.\n\n## Functions\n\n- [autoRemove](functions/autoRemove.md)\n"
  },
  {
    "path": "docs/reference/@tanstack/namespaces/filterFn_arrIncludesAll/functions/autoRemove.md",
    "content": "---\nid: autoRemove\ntitle: autoRemove\n---\n\n# Function: autoRemove()\n\n```ts\nfunction autoRemove(val): boolean;\n```\n\nDefined in: [fns/filterFns.ts:334](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L334)\n\n## Parameters\n\n### val\n\n`any`\n\n## Returns\n\n`boolean`\n"
  },
  {
    "path": "docs/reference/@tanstack/namespaces/filterFn_arrIncludesAll/index.md",
    "content": "---\nid: filterFn_arrIncludesAll\ntitle: filterFn_arrIncludesAll\n---\n\n# filterFn\\_arrIncludesAll\n\nFilter function for checking if an array includes all of the given values.\n\n## Functions\n\n- [autoRemove](functions/autoRemove.md)\n"
  },
  {
    "path": "docs/reference/@tanstack/namespaces/filterFn_arrIncludesSome/functions/autoRemove.md",
    "content": "---\nid: autoRemove\ntitle: autoRemove\n---\n\n# Function: autoRemove()\n\n```ts\nfunction autoRemove(val): boolean;\n```\n\nDefined in: [fns/filterFns.ts:353](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L353)\n\n## Parameters\n\n### val\n\n`any`\n\n## Returns\n\n`boolean`\n"
  },
  {
    "path": "docs/reference/@tanstack/namespaces/filterFn_arrIncludesSome/index.md",
    "content": "---\nid: filterFn_arrIncludesSome\ntitle: filterFn_arrIncludesSome\n---\n\n# filterFn\\_arrIncludesSome\n\nFilter function for checking if an array includes any of the given values.\n\n## Functions\n\n- [autoRemove](functions/autoRemove.md)\n"
  },
  {
    "path": "docs/reference/@tanstack/namespaces/filterFn_equals/functions/autoRemove.md",
    "content": "---\nid: autoRemove\ntitle: autoRemove\n---\n\n# Function: autoRemove()\n\n```ts\nfunction autoRemove(val): boolean;\n```\n\nDefined in: [fns/filterFns.ts:22](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L22)\n\n## Parameters\n\n### val\n\n`any`\n\n## Returns\n\n`boolean`\n"
  },
  {
    "path": "docs/reference/@tanstack/namespaces/filterFn_equals/index.md",
    "content": "---\nid: filterFn_equals\ntitle: filterFn_equals\n---\n\n# filterFn\\_equals\n\nFilter function for checking if a value is exactly equal to a given value. (JS === comparison)\n\n## Functions\n\n- [autoRemove](functions/autoRemove.md)\n"
  },
  {
    "path": "docs/reference/@tanstack/namespaces/filterFn_equalsString/functions/autoRemove.md",
    "content": "---\nid: autoRemove\ntitle: autoRemove\n---\n\n# Function: autoRemove()\n\n```ts\nfunction autoRemove(val): boolean;\n```\n\nDefined in: [fns/filterFns.ts:99](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L99)\n\n## Parameters\n\n### val\n\n`any`\n\n## Returns\n\n`boolean`\n"
  },
  {
    "path": "docs/reference/@tanstack/namespaces/filterFn_equalsString/index.md",
    "content": "---\nid: filterFn_equalsString\ntitle: filterFn_equalsString\n---\n\n# filterFn\\_equalsString\n\nFilter function for checking if a string is exactly equal to a given string. (Non-case-sensitive)\n\n## Functions\n\n- [autoRemove](functions/autoRemove.md)\n"
  },
  {
    "path": "docs/reference/@tanstack/namespaces/filterFn_equalsStringSensitive/functions/autoRemove.md",
    "content": "---\nid: autoRemove\ntitle: autoRemove\n---\n\n# Function: autoRemove()\n\n```ts\nfunction autoRemove(val): boolean;\n```\n\nDefined in: [fns/filterFns.ts:115](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L115)\n\n## Parameters\n\n### val\n\n`any`\n\n## Returns\n\n`boolean`\n"
  },
  {
    "path": "docs/reference/@tanstack/namespaces/filterFn_equalsStringSensitive/index.md",
    "content": "---\nid: filterFn_equalsStringSensitive\ntitle: filterFn_equalsStringSensitive\n---\n\n# filterFn\\_equalsStringSensitive\n\nFilter function for checking if a string is exactly equal to a given string. (Case-sensitive)\n\n## Functions\n\n- [autoRemove](functions/autoRemove.md)\n"
  },
  {
    "path": "docs/reference/@tanstack/namespaces/filterFn_greaterThan/functions/resolveFilterValue.md",
    "content": "---\nid: resolveFilterValue\ntitle: resolveFilterValue\n---\n\n# Function: resolveFilterValue()\n\n```ts\nfunction resolveFilterValue(val): boolean;\n```\n\nDefined in: [fns/filterFns.ts:144](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L144)\n\n## Parameters\n\n### val\n\n`any`\n\n## Returns\n\n`boolean`\n"
  },
  {
    "path": "docs/reference/@tanstack/namespaces/filterFn_greaterThan/index.md",
    "content": "---\nid: filterFn_greaterThan\ntitle: filterFn_greaterThan\n---\n\n# filterFn\\_greaterThan\n\nFilter function for checking if a number is greater than a given number.\n\n## Functions\n\n- [resolveFilterValue](functions/resolveFilterValue.md)\n"
  },
  {
    "path": "docs/reference/@tanstack/namespaces/filterFn_greaterThanOrEqualTo/functions/resolveFilterValue.md",
    "content": "---\nid: resolveFilterValue\ntitle: resolveFilterValue\n---\n\n# Function: resolveFilterValue()\n\n```ts\nfunction resolveFilterValue(val): boolean;\n```\n\nDefined in: [fns/filterFns.ts:163](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L163)\n\n## Parameters\n\n### val\n\n`any`\n\n## Returns\n\n`boolean`\n"
  },
  {
    "path": "docs/reference/@tanstack/namespaces/filterFn_greaterThanOrEqualTo/index.md",
    "content": "---\nid: filterFn_greaterThanOrEqualTo\ntitle: filterFn_greaterThanOrEqualTo\n---\n\n# filterFn\\_greaterThanOrEqualTo\n\nFilter function for checking if a number is greater than or equal to a given number.\n\n## Functions\n\n- [resolveFilterValue](functions/resolveFilterValue.md)\n"
  },
  {
    "path": "docs/reference/@tanstack/namespaces/filterFn_inNumberRange/functions/autoRemove.md",
    "content": "---\nid: autoRemove\ntitle: autoRemove\n---\n\n# Function: autoRemove()\n\n```ts\nfunction autoRemove(val): boolean;\n```\n\nDefined in: [fns/filterFns.ts:279](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L279)\n\n## Parameters\n\n### val\n\n`any`\n\n## Returns\n\n`boolean`\n"
  },
  {
    "path": "docs/reference/@tanstack/namespaces/filterFn_inNumberRange/functions/resolveFilterValue.md",
    "content": "---\nid: resolveFilterValue\ntitle: resolveFilterValue\n---\n\n# Function: resolveFilterValue()\n\n```ts\nfunction resolveFilterValue(val): readonly [number, number];\n```\n\nDefined in: [fns/filterFns.ts:258](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L258)\n\n## Parameters\n\n### val\n\n\\[`any`, `any`\\]\n\n## Returns\n\nreadonly \\[`number`, `number`\\]\n"
  },
  {
    "path": "docs/reference/@tanstack/namespaces/filterFn_inNumberRange/index.md",
    "content": "---\nid: filterFn_inNumberRange\ntitle: filterFn_inNumberRange\n---\n\n# filterFn\\_inNumberRange\n\nFilter function for checking if a number is within a given range.\n\n## Functions\n\n- [autoRemove](functions/autoRemove.md)\n- [resolveFilterValue](functions/resolveFilterValue.md)\n"
  },
  {
    "path": "docs/reference/@tanstack/namespaces/filterFn_includesString/functions/autoRemove.md",
    "content": "---\nid: autoRemove\ntitle: autoRemove\n---\n\n# Function: autoRemove()\n\n```ts\nfunction autoRemove(val): boolean;\n```\n\nDefined in: [fns/filterFns.ts:80](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L80)\n\n## Parameters\n\n### val\n\n`any`\n\n## Returns\n\n`boolean`\n"
  },
  {
    "path": "docs/reference/@tanstack/namespaces/filterFn_includesString/index.md",
    "content": "---\nid: filterFn_includesString\ntitle: filterFn_includesString\n---\n\n# filterFn\\_includesString\n\nFilter function for checking if a string includes a given substring. (Non-case-sensitive)\n\n## Functions\n\n- [autoRemove](functions/autoRemove.md)\n"
  },
  {
    "path": "docs/reference/@tanstack/namespaces/filterFn_includesStringSensitive/functions/autoRemove.md",
    "content": "---\nid: autoRemove\ntitle: autoRemove\n---\n\n# Function: autoRemove()\n\n```ts\nfunction autoRemove(val): boolean;\n```\n\nDefined in: [fns/filterFns.ts:58](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L58)\n\n## Parameters\n\n### val\n\n`any`\n\n## Returns\n\n`boolean`\n"
  },
  {
    "path": "docs/reference/@tanstack/namespaces/filterFn_includesStringSensitive/index.md",
    "content": "---\nid: filterFn_includesStringSensitive\ntitle: filterFn_includesStringSensitive\n---\n\n# filterFn\\_includesStringSensitive\n\nFilter function for checking if a string includes a given substring. (Case-sensitive)\n\n## Functions\n\n- [autoRemove](functions/autoRemove.md)\n"
  },
  {
    "path": "docs/reference/@tanstack/namespaces/filterFn_lessThan/functions/resolveFilterValue.md",
    "content": "---\nid: resolveFilterValue\ntitle: resolveFilterValue\n---\n\n# Function: resolveFilterValue()\n\n```ts\nfunction resolveFilterValue(val): boolean;\n```\n\nDefined in: [fns/filterFns.ts:179](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L179)\n\n## Parameters\n\n### val\n\n`any`\n\n## Returns\n\n`boolean`\n"
  },
  {
    "path": "docs/reference/@tanstack/namespaces/filterFn_lessThan/index.md",
    "content": "---\nid: filterFn_lessThan\ntitle: filterFn_lessThan\n---\n\n# filterFn\\_lessThan\n\nFilter function for checking if a number is less than a given number.\n\n## Functions\n\n- [resolveFilterValue](functions/resolveFilterValue.md)\n"
  },
  {
    "path": "docs/reference/@tanstack/namespaces/filterFn_lessThanOrEqualTo/functions/resolveFilterValue.md",
    "content": "---\nid: resolveFilterValue\ntitle: resolveFilterValue\n---\n\n# Function: resolveFilterValue()\n\n```ts\nfunction resolveFilterValue(val): boolean;\n```\n\nDefined in: [fns/filterFns.ts:195](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L195)\n\n## Parameters\n\n### val\n\n`any`\n\n## Returns\n\n`boolean`\n"
  },
  {
    "path": "docs/reference/@tanstack/namespaces/filterFn_lessThanOrEqualTo/index.md",
    "content": "---\nid: filterFn_lessThanOrEqualTo\ntitle: filterFn_lessThanOrEqualTo\n---\n\n# filterFn\\_lessThanOrEqualTo\n\nFilter function for checking if a number is less than or equal to a given number.\n\n## Functions\n\n- [resolveFilterValue](functions/resolveFilterValue.md)\n"
  },
  {
    "path": "docs/reference/@tanstack/namespaces/filterFn_weakEquals/functions/autoRemove.md",
    "content": "---\nid: autoRemove\ntitle: autoRemove\n---\n\n# Function: autoRemove()\n\n```ts\nfunction autoRemove(val): boolean;\n```\n\nDefined in: [fns/filterFns.ts:38](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L38)\n\n## Parameters\n\n### val\n\n`any`\n\n## Returns\n\n`boolean`\n"
  },
  {
    "path": "docs/reference/@tanstack/namespaces/filterFn_weakEquals/index.md",
    "content": "---\nid: filterFn_weakEquals\ntitle: filterFn_weakEquals\n---\n\n# filterFn\\_weakEquals\n\nFilter function for checking if a value is weakly equal to a given value. (JS == comparison)\n\n## Functions\n\n- [autoRemove](functions/autoRemove.md)\n"
  },
  {
    "path": "docs/reference/functions/assignPrototypeAPIs.md",
    "content": "---\nid: assignPrototypeAPIs\ntitle: assignPrototypeAPIs\n---\n\n# Function: assignPrototypeAPIs()\n\n```ts\nfunction assignPrototypeAPIs<TFeatures, TData, TDeps, TDepArgs>(\n   feature, \n   prototype, \n   table, \n   apis): void;\n```\n\nDefined in: [utils.ts:339](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L339)\n\nAssigns API methods to a prototype object for memory-efficient method sharing.\nAll instances created with this prototype will share the same method references.\n\nFor memoized methods, the memo state is lazily created and stored on each instance.\nThis provides the best of both worlds: shared method code + per-instance caching.\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TDeps\n\n`TDeps` *extends* readonly `any`[]\n\n### TDepArgs\n\n`TDepArgs`\n\n## Parameters\n\n### feature\n\nkeyof `TFeatures` & `string`\n\n### prototype\n\n`Record`\\<`string`, `any`\\>\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n### apis\n\n[`PrototypeAPIObject`](../type-aliases/PrototypeAPIObject.md)\\<`TDeps`, [`NoInfer`](../type-aliases/NoInfer.md)\\<`TDepArgs`\\>\\>\n\n## Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/functions/assignTableAPIs.md",
    "content": "---\nid: assignTableAPIs\ntitle: assignTableAPIs\n---\n\n# Function: assignTableAPIs()\n\n```ts\nfunction assignTableAPIs<TFeatures, TData, TDeps, TDepArgs>(\n   feature, \n   table, \n   apis): void;\n```\n\nDefined in: [utils.ts:297](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L297)\n\nAssigns Table API methods directly to the table instance.\nUnlike row/cell/column/header, the table is a singleton so methods are assigned directly.\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TDeps\n\n`TDeps` *extends* readonly `any`[]\n\n### TDepArgs\n\n`TDepArgs`\n\n## Parameters\n\n### feature\n\nkeyof `TFeatures` & `string`\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n### apis\n\n[`APIObject`](../type-aliases/APIObject.md)\\<`TDeps`, [`NoInfer`](../type-aliases/NoInfer.md)\\<`TDepArgs`\\>\\>\n\n## Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/functions/buildHeaderGroups.md",
    "content": "---\nid: buildHeaderGroups\ntitle: buildHeaderGroups\n---\n\n# Function: buildHeaderGroups()\n\n```ts\nfunction buildHeaderGroups<TFeatures, TData, TValue>(\n   allColumns, \n   columnsToGroup, \n   table, \n   headerFamily?): HeaderGroup<TFeatures, TData>[];\n```\n\nDefined in: [core/headers/buildHeaderGroups.ts:11](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/buildHeaderGroups.ts#L11)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n## Parameters\n\n### allColumns\n\n[`Column`](../type-aliases/Column.md)\\<`TFeatures`, `TData`, `TValue`\\>[]\n\n### columnsToGroup\n\n[`Column`](../type-aliases/Column.md)\\<`TFeatures`, `TData`, `TValue`\\>[]\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n### headerFamily?\n\n`\"left\"` | `\"right\"` | `\"center\"`\n\n## Returns\n\n[`HeaderGroup`](../type-aliases/HeaderGroup.md)\\<`TFeatures`, `TData`\\>[]\n"
  },
  {
    "path": "docs/reference/functions/callMemoOrStaticFn.md",
    "content": "---\nid: callMemoOrStaticFn\ntitle: callMemoOrStaticFn\n---\n\n# Function: callMemoOrStaticFn()\n\n```ts\nfunction callMemoOrStaticFn<TObject, TStaticFn>(\n   obj, \n   fnKey, \n   staticFn, ...\nargs): ReturnType<TStaticFn>;\n```\n\nDefined in: [utils.ts:387](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L387)\n\nLooks to run the memoized function with the builder pattern on the object if it exists, otherwise fallback to the static method passed in.\n\n## Type Parameters\n\n### TObject\n\n`TObject` *extends* `Record`\\<`string`, `any`\\>\n\n### TStaticFn\n\n`TStaticFn` *extends* `AnyFunction`\n\n## Parameters\n\n### obj\n\n`TObject`\n\n### fnKey\n\n`string`\n\n### staticFn\n\n`TStaticFn`\n\n### args\n\n...`Parameters`\\<`TStaticFn`\\> *extends* \\[`any`, `...Rest[]`\\] ? `Rest` : `never`\n\n## Returns\n\n`ReturnType`\\<`TStaticFn`\\>\n"
  },
  {
    "path": "docs/reference/functions/cell_getContext.md",
    "content": "---\nid: cell_getContext\ntitle: cell_getContext\n---\n\n# Function: cell\\_getContext()\n\n```ts\nfunction cell_getContext<TFeatures, TData, TValue>(cell): object;\n```\n\nDefined in: [core/cells/coreCellsFeature.utils.ts:21](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.utils.ts#L21)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n## Parameters\n\n### cell\n\n[`Cell`](../type-aliases/Cell.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n## Returns\n\n`object`\n\n### cell\n\n```ts\ncell: Cell<TFeatures, TData, TValue>;\n```\n\n### column\n\n```ts\ncolumn: Column<TFeatures, TData, TValue> = cell.column;\n```\n\n### getValue()\n\n```ts\ngetValue: () => NoInfer<TValue>;\n```\n\n#### Returns\n\n[`NoInfer`](../type-aliases/NoInfer.md)\\<`TValue`\\>\n\n### renderValue()\n\n```ts\nrenderValue: () => NoInfer<TValue | null>;\n```\n\n#### Returns\n\n[`NoInfer`](../type-aliases/NoInfer.md)\\<`TValue` \\| `null`\\>\n\n### row\n\n```ts\nrow: Row<TFeatures, TData> = cell.row;\n```\n\n### table\n\n```ts\ntable: Table_Internal<TFeatures, TData> = cell.table;\n```\n"
  },
  {
    "path": "docs/reference/functions/cell_getIsAggregated.md",
    "content": "---\nid: cell_getIsAggregated\ntitle: cell_getIsAggregated\n---\n\n# Function: cell\\_getIsAggregated()\n\n```ts\nfunction cell_getIsAggregated<TFeatures, TData, TValue>(cell): boolean;\n```\n\nDefined in: [features/column-grouping/columnGroupingFeature.utils.ts:182](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L182)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n## Parameters\n\n### cell\n\n[`Cell`](../type-aliases/Cell.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n## Returns\n\n`boolean`\n"
  },
  {
    "path": "docs/reference/functions/cell_getIsGrouped.md",
    "content": "---\nid: cell_getIsGrouped\ntitle: cell_getIsGrouped\n---\n\n# Function: cell\\_getIsGrouped()\n\n```ts\nfunction cell_getIsGrouped<TFeatures, TData, TValue>(cell): boolean;\n```\n\nDefined in: [features/column-grouping/columnGroupingFeature.utils.ts:163](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L163)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n## Parameters\n\n### cell\n\n[`Cell`](../type-aliases/Cell.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n## Returns\n\n`boolean`\n"
  },
  {
    "path": "docs/reference/functions/cell_getIsPlaceholder.md",
    "content": "---\nid: cell_getIsPlaceholder\ntitle: cell_getIsPlaceholder\n---\n\n# Function: cell\\_getIsPlaceholder()\n\n```ts\nfunction cell_getIsPlaceholder<TFeatures, TData, TValue>(cell): boolean;\n```\n\nDefined in: [features/column-grouping/columnGroupingFeature.utils.ts:174](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L174)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n## Parameters\n\n### cell\n\n[`Cell`](../type-aliases/Cell.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n## Returns\n\n`boolean`\n"
  },
  {
    "path": "docs/reference/functions/cell_getValue.md",
    "content": "---\nid: cell_getValue\ntitle: cell_getValue\n---\n\n# Function: cell\\_getValue()\n\n```ts\nfunction cell_getValue<TFeatures, TData, TValue>(cell): TValue;\n```\n\nDefined in: [core/cells/coreCellsFeature.utils.ts:5](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.utils.ts#L5)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n## Parameters\n\n### cell\n\n[`Cell`](../type-aliases/Cell.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n## Returns\n\n`TValue`\n"
  },
  {
    "path": "docs/reference/functions/cell_renderValue.md",
    "content": "---\nid: cell_renderValue\ntitle: cell_renderValue\n---\n\n# Function: cell\\_renderValue()\n\n```ts\nfunction cell_renderValue<TFeatures, TData, TValue>(cell): any;\n```\n\nDefined in: [core/cells/coreCellsFeature.utils.ts:13](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.utils.ts#L13)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n## Parameters\n\n### cell\n\n[`Cell`](../type-aliases/Cell.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n## Returns\n\n`any`\n"
  },
  {
    "path": "docs/reference/functions/column_clearSorting.md",
    "content": "---\nid: column_clearSorting\ntitle: column_clearSorting\n---\n\n# Function: column\\_clearSorting()\n\n```ts\nfunction column_clearSorting<TFeatures, TData, TValue>(column): void;\n```\n\nDefined in: [features/row-sorting/rowSortingFeature.utils.ts:290](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L290)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n## Parameters\n\n### column\n\n[`Column_Internal`](../type-aliases/Column_Internal.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n## Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/functions/column_getAfter.md",
    "content": "---\nid: column_getAfter\ntitle: column_getAfter\n---\n\n# Function: column\\_getAfter()\n\n```ts\nfunction column_getAfter<TFeatures, TData, TValue>(column, position): number;\n```\n\nDefined in: [features/column-sizing/columnSizingFeature.utils.ts:66](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts#L66)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n## Parameters\n\n### column\n\n[`Column_Internal`](../type-aliases/Column_Internal.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n### position\n\n[`ColumnPinningPosition`](../type-aliases/ColumnPinningPosition.md) | `\"center\"`\n\n## Returns\n\n`number`\n"
  },
  {
    "path": "docs/reference/functions/column_getAggregationFn.md",
    "content": "---\nid: column_getAggregationFn\ntitle: column_getAggregationFn\n---\n\n# Function: column\\_getAggregationFn()\n\n```ts\nfunction column_getAggregationFn<TFeatures, TData, TValue>(column): \n  | AggregationFn<TFeatures, TData>\n  | undefined;\n```\n\nDefined in: [features/column-grouping/columnGroupingFeature.utils.ts:97](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L97)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n## Parameters\n\n### column\n\n[`Column_Internal`](../type-aliases/Column_Internal.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n## Returns\n\n  \\| [`AggregationFn`](../type-aliases/AggregationFn.md)\\<`TFeatures`, `TData`\\>\n  \\| `undefined`\n"
  },
  {
    "path": "docs/reference/functions/column_getAutoAggregationFn.md",
    "content": "---\nid: column_getAutoAggregationFn\ntitle: column_getAutoAggregationFn\n---\n\n# Function: column\\_getAutoAggregationFn()\n\n```ts\nfunction column_getAutoAggregationFn<TFeatures, TData, TValue>(column): \n  | AggregationFn<TFeatures, TData>\n  | undefined;\n```\n\nDefined in: [features/column-grouping/columnGroupingFeature.utils.ts:75](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L75)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n## Parameters\n\n### column\n\n[`Column_Internal`](../type-aliases/Column_Internal.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n## Returns\n\n  \\| [`AggregationFn`](../type-aliases/AggregationFn.md)\\<`TFeatures`, `TData`\\>\n  \\| `undefined`\n"
  },
  {
    "path": "docs/reference/functions/column_getAutoFilterFn.md",
    "content": "---\nid: column_getAutoFilterFn\ntitle: column_getAutoFilterFn\n---\n\n# Function: column\\_getAutoFilterFn()\n\n```ts\nfunction column_getAutoFilterFn<TFeatures, TData, TValue>(column): \n  | FilterFn<TFeatures, TData>\n  | undefined;\n```\n\nDefined in: [features/column-filtering/columnFilteringFeature.utils.ts:15](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.utils.ts#L15)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n## Parameters\n\n### column\n\n[`Column_Internal`](../type-aliases/Column_Internal.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n## Returns\n\n  \\| [`FilterFn`](../interfaces/FilterFn.md)\\<`TFeatures`, `TData`\\>\n  \\| `undefined`\n"
  },
  {
    "path": "docs/reference/functions/column_getAutoSortDir.md",
    "content": "---\nid: column_getAutoSortDir\ntitle: column_getAutoSortDir\n---\n\n# Function: column\\_getAutoSortDir()\n\n```ts\nfunction column_getAutoSortDir<TFeatures, TData, TValue>(column): \"asc\" | \"desc\";\n```\n\nDefined in: [features/row-sorting/rowSortingFeature.utils.ts:76](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L76)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n## Parameters\n\n### column\n\n[`Column_Internal`](../type-aliases/Column_Internal.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n## Returns\n\n`\"asc\"` \\| `\"desc\"`\n"
  },
  {
    "path": "docs/reference/functions/column_getAutoSortFn.md",
    "content": "---\nid: column_getAutoSortFn\ntitle: column_getAutoSortFn\n---\n\n# Function: column\\_getAutoSortFn()\n\n```ts\nfunction column_getAutoSortFn<TFeatures, TData, TValue>(column): SortFn<TFeatures, TData>;\n```\n\nDefined in: [features/row-sorting/rowSortingFeature.utils.ts:38](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L38)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n## Parameters\n\n### column\n\n[`Column_Internal`](../type-aliases/Column_Internal.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n## Returns\n\n[`SortFn`](../interfaces/SortFn.md)\\<`TFeatures`, `TData`\\>\n"
  },
  {
    "path": "docs/reference/functions/column_getCanFilter.md",
    "content": "---\nid: column_getCanFilter\ntitle: column_getCanFilter\n---\n\n# Function: column\\_getCanFilter()\n\n```ts\nfunction column_getCanFilter<TFeatures, TData, TValue>(column): boolean;\n```\n\nDefined in: [features/column-filtering/columnFilteringFeature.utils.ts:77](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.utils.ts#L77)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n## Parameters\n\n### column\n\n[`Column_Internal`](../type-aliases/Column_Internal.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n## Returns\n\n`boolean`\n"
  },
  {
    "path": "docs/reference/functions/column_getCanGlobalFilter.md",
    "content": "---\nid: column_getCanGlobalFilter\ntitle: column_getCanGlobalFilter\n---\n\n# Function: column\\_getCanGlobalFilter()\n\n```ts\nfunction column_getCanGlobalFilter<TFeatures, TData, TValue>(column): boolean;\n```\n\nDefined in: [features/global-filtering/globalFilteringFeature.utils.ts:9](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.utils.ts#L9)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n## Parameters\n\n### column\n\n[`Column_Internal`](../type-aliases/Column_Internal.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n## Returns\n\n`boolean`\n"
  },
  {
    "path": "docs/reference/functions/column_getCanGroup.md",
    "content": "---\nid: column_getCanGroup\ntitle: column_getCanGroup\n---\n\n# Function: column\\_getCanGroup()\n\n```ts\nfunction column_getCanGroup<TFeatures, TData, TValue>(column): boolean;\n```\n\nDefined in: [features/column-grouping/columnGroupingFeature.utils.ts:34](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L34)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n## Parameters\n\n### column\n\n[`Column_Internal`](../type-aliases/Column_Internal.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n## Returns\n\n`boolean`\n"
  },
  {
    "path": "docs/reference/functions/column_getCanHide.md",
    "content": "---\nid: column_getCanHide\ntitle: column_getCanHide\n---\n\n# Function: column\\_getCanHide()\n\n```ts\nfunction column_getCanHide<TFeatures, TData, TValue>(column): boolean;\n```\n\nDefined in: [features/column-visibility/columnVisibilityFeature.utils.ts:44](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L44)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n## Parameters\n\n### column\n\n[`Column_Internal`](../type-aliases/Column_Internal.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n## Returns\n\n`boolean`\n"
  },
  {
    "path": "docs/reference/functions/column_getCanMultiSort.md",
    "content": "---\nid: column_getCanMultiSort\ntitle: column_getCanMultiSort\n---\n\n# Function: column\\_getCanMultiSort()\n\n```ts\nfunction column_getCanMultiSort<TFeatures, TData, TValue>(column): boolean;\n```\n\nDefined in: [features/row-sorting/rowSortingFeature.utils.ts:257](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L257)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n## Parameters\n\n### column\n\n[`Column_Internal`](../type-aliases/Column_Internal.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n## Returns\n\n`boolean`\n"
  },
  {
    "path": "docs/reference/functions/column_getCanPin.md",
    "content": "---\nid: column_getCanPin\ntitle: column_getCanPin\n---\n\n# Function: column\\_getCanPin()\n\n```ts\nfunction column_getCanPin<TFeatures, TData, TValue>(column): boolean;\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.utils.ts:69](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L69)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n## Parameters\n\n### column\n\n[`Column_Internal`](../type-aliases/Column_Internal.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n## Returns\n\n`boolean`\n"
  },
  {
    "path": "docs/reference/functions/column_getCanResize.md",
    "content": "---\nid: column_getCanResize\ntitle: column_getCanResize\n---\n\n# Function: column\\_getCanResize()\n\n```ts\nfunction column_getCanResize<TFeatures, TData, TValue>(column): boolean;\n```\n\nDefined in: [features/column-resizing/columnResizingFeature.utils.ts:26](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.utils.ts#L26)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n## Parameters\n\n### column\n\n[`Column_Internal`](../type-aliases/Column_Internal.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n## Returns\n\n`boolean`\n"
  },
  {
    "path": "docs/reference/functions/column_getCanSort.md",
    "content": "---\nid: column_getCanSort\ntitle: column_getCanSort\n---\n\n# Function: column\\_getCanSort()\n\n```ts\nfunction column_getCanSort<TFeatures, TData, TValue>(column): boolean;\n```\n\nDefined in: [features/row-sorting/rowSortingFeature.utils.ts:245](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L245)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n## Parameters\n\n### column\n\n[`Column_Internal`](../type-aliases/Column_Internal.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n## Returns\n\n`boolean`\n"
  },
  {
    "path": "docs/reference/functions/column_getFacetedMinMaxValues.md",
    "content": "---\nid: column_getFacetedMinMaxValues\ntitle: column_getFacetedMinMaxValues\n---\n\n# Function: column\\_getFacetedMinMaxValues()\n\n```ts\nfunction column_getFacetedMinMaxValues<TFeatures, TData, TValue>(column, table): [number, number] | undefined;\n```\n\nDefined in: [features/column-faceting/columnFacetingFeature.utils.ts:7](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.utils.ts#L7)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n## Parameters\n\n### column\n\n[`Column_Internal`](../type-aliases/Column_Internal.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n\\[`number`, `number`\\] \\| `undefined`\n"
  },
  {
    "path": "docs/reference/functions/column_getFacetedRowModel.md",
    "content": "---\nid: column_getFacetedRowModel\ntitle: column_getFacetedRowModel\n---\n\n# Function: column\\_getFacetedRowModel()\n\n```ts\nfunction column_getFacetedRowModel<TFeatures, TData, TValue>(column, table): RowModel<TFeatures, TData>;\n```\n\nDefined in: [features/column-faceting/columnFacetingFeature.utils.ts:21](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.utils.ts#L21)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n## Parameters\n\n### column\n\n[`Column_Internal`](../type-aliases/Column_Internal.md)\\<`TFeatures`, `TData`, `TValue`\\> | `undefined`\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n[`RowModel`](../interfaces/RowModel.md)\\<`TFeatures`, `TData`\\>\n"
  },
  {
    "path": "docs/reference/functions/column_getFacetedUniqueValues.md",
    "content": "---\nid: column_getFacetedUniqueValues\ntitle: column_getFacetedUniqueValues\n---\n\n# Function: column\\_getFacetedUniqueValues()\n\n```ts\nfunction column_getFacetedUniqueValues<TFeatures, TData, TValue>(column, table): Map<any, number>;\n```\n\nDefined in: [features/column-faceting/columnFacetingFeature.utils.ts:35](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.utils.ts#L35)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n## Parameters\n\n### column\n\n[`Column_Internal`](../type-aliases/Column_Internal.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n`Map`\\<`any`, `number`\\>\n"
  },
  {
    "path": "docs/reference/functions/column_getFilterFn.md",
    "content": "---\nid: column_getFilterFn\ntitle: column_getFilterFn\n---\n\n# Function: column\\_getFilterFn()\n\n```ts\nfunction column_getFilterFn<TFeatures, TData, TValue>(column): \n  | FilterFn<TFeatures, TData>\n  | undefined;\n```\n\nDefined in: [features/column-filtering/columnFilteringFeature.utils.ts:51](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.utils.ts#L51)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n## Parameters\n\n### column\n\n[`Column_Internal`](../type-aliases/Column_Internal.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n## Returns\n\n  \\| [`FilterFn`](../interfaces/FilterFn.md)\\<`TFeatures`, `TData`\\>\n  \\| `undefined`\n"
  },
  {
    "path": "docs/reference/functions/column_getFilterIndex.md",
    "content": "---\nid: column_getFilterIndex\ntitle: column_getFilterIndex\n---\n\n# Function: column\\_getFilterIndex()\n\n```ts\nfunction column_getFilterIndex<TFeatures, TData, TValue>(column): number;\n```\n\nDefined in: [features/column-filtering/columnFilteringFeature.utils.ts:107](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.utils.ts#L107)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n## Parameters\n\n### column\n\n[`Column_Internal`](../type-aliases/Column_Internal.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n## Returns\n\n`number`\n"
  },
  {
    "path": "docs/reference/functions/column_getFilterValue.md",
    "content": "---\nid: column_getFilterValue\ntitle: column_getFilterValue\n---\n\n# Function: column\\_getFilterValue()\n\n```ts\nfunction column_getFilterValue<TFeatures, TData, TValue>(column): unknown;\n```\n\nDefined in: [features/column-filtering/columnFilteringFeature.utils.ts:98](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.utils.ts#L98)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n## Parameters\n\n### column\n\n[`Column_Internal`](../type-aliases/Column_Internal.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n## Returns\n\n`unknown`\n"
  },
  {
    "path": "docs/reference/functions/column_getFirstSortDir.md",
    "content": "---\nid: column_getFirstSortDir\ntitle: column_getFirstSortDir\n---\n\n# Function: column\\_getFirstSortDir()\n\n```ts\nfunction column_getFirstSortDir<TFeatures, TData, TValue>(column): \"asc\" | \"desc\";\n```\n\nDefined in: [features/row-sorting/rowSortingFeature.utils.ts:211](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L211)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n## Parameters\n\n### column\n\n[`Column_Internal`](../type-aliases/Column_Internal.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n## Returns\n\n`\"asc\"` \\| `\"desc\"`\n"
  },
  {
    "path": "docs/reference/functions/column_getFlatColumns.md",
    "content": "---\nid: column_getFlatColumns\ntitle: column_getFlatColumns\n---\n\n# Function: column\\_getFlatColumns()\n\n```ts\nfunction column_getFlatColumns<TFeatures, TData, TValue>(column): Column<TFeatures, TData, TValue>[];\n```\n\nDefined in: [core/columns/coreColumnsFeature.utils.ts:14](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.utils.ts#L14)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n## Parameters\n\n### column\n\n[`Column`](../type-aliases/Column.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n## Returns\n\n[`Column`](../type-aliases/Column.md)\\<`TFeatures`, `TData`, `TValue`\\>[]\n"
  },
  {
    "path": "docs/reference/functions/column_getGroupedIndex.md",
    "content": "---\nid: column_getGroupedIndex\ntitle: column_getGroupedIndex\n---\n\n# Function: column\\_getGroupedIndex()\n\n```ts\nfunction column_getGroupedIndex<TFeatures, TData, TValue>(column): number;\n```\n\nDefined in: [features/column-grouping/columnGroupingFeature.utils.ts:54](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L54)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n## Parameters\n\n### column\n\n[`Column_Internal`](../type-aliases/Column_Internal.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n## Returns\n\n`number`\n"
  },
  {
    "path": "docs/reference/functions/column_getIndex.md",
    "content": "---\nid: column_getIndex\ntitle: column_getIndex\n---\n\n# Function: column\\_getIndex()\n\n```ts\nfunction column_getIndex<TFeatures, TData, TValue>(column, position?): number;\n```\n\nDefined in: [features/column-ordering/columnOrderingFeature.utils.ts:14](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.utils.ts#L14)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n## Parameters\n\n### column\n\n[`Column_Internal`](../type-aliases/Column_Internal.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n### position?\n\n[`ColumnPinningPosition`](../type-aliases/ColumnPinningPosition.md) | `\"center\"`\n\n## Returns\n\n`number`\n"
  },
  {
    "path": "docs/reference/functions/column_getIsFiltered.md",
    "content": "---\nid: column_getIsFiltered\ntitle: column_getIsFiltered\n---\n\n# Function: column\\_getIsFiltered()\n\n```ts\nfunction column_getIsFiltered<TFeatures, TData, TValue>(column): boolean;\n```\n\nDefined in: [features/column-filtering/columnFilteringFeature.utils.ts:90](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.utils.ts#L90)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n## Parameters\n\n### column\n\n[`Column_Internal`](../type-aliases/Column_Internal.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n## Returns\n\n`boolean`\n"
  },
  {
    "path": "docs/reference/functions/column_getIsFirstColumn.md",
    "content": "---\nid: column_getIsFirstColumn\ntitle: column_getIsFirstColumn\n---\n\n# Function: column\\_getIsFirstColumn()\n\n```ts\nfunction column_getIsFirstColumn<TFeatures, TData, TValue>(column, position?): boolean;\n```\n\nDefined in: [features/column-ordering/columnOrderingFeature.utils.ts:26](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.utils.ts#L26)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n## Parameters\n\n### column\n\n[`Column_Internal`](../type-aliases/Column_Internal.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n### position?\n\n[`ColumnPinningPosition`](../type-aliases/ColumnPinningPosition.md) | `\"center\"`\n\n## Returns\n\n`boolean`\n"
  },
  {
    "path": "docs/reference/functions/column_getIsGrouped.md",
    "content": "---\nid: column_getIsGrouped\ntitle: column_getIsGrouped\n---\n\n# Function: column\\_getIsGrouped()\n\n```ts\nfunction column_getIsGrouped<TFeatures, TData, TValue>(column): boolean;\n```\n\nDefined in: [features/column-grouping/columnGroupingFeature.utils.ts:46](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L46)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n## Parameters\n\n### column\n\n[`Column_Internal`](../type-aliases/Column_Internal.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n## Returns\n\n`boolean`\n"
  },
  {
    "path": "docs/reference/functions/column_getIsLastColumn.md",
    "content": "---\nid: column_getIsLastColumn\ntitle: column_getIsLastColumn\n---\n\n# Function: column\\_getIsLastColumn()\n\n```ts\nfunction column_getIsLastColumn<TFeatures, TData, TValue>(column, position?): boolean;\n```\n\nDefined in: [features/column-ordering/columnOrderingFeature.utils.ts:38](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.utils.ts#L38)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n## Parameters\n\n### column\n\n[`Column_Internal`](../type-aliases/Column_Internal.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n### position?\n\n[`ColumnPinningPosition`](../type-aliases/ColumnPinningPosition.md) | `\"center\"`\n\n## Returns\n\n`boolean`\n"
  },
  {
    "path": "docs/reference/functions/column_getIsPinned.md",
    "content": "---\nid: column_getIsPinned\ntitle: column_getIsPinned\n---\n\n# Function: column\\_getIsPinned()\n\n```ts\nfunction column_getIsPinned<TFeatures, TData, TValue>(column): ColumnPinningPosition;\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.utils.ts:85](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L85)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n## Parameters\n\n### column\n\n[`Column_Internal`](../type-aliases/Column_Internal.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n## Returns\n\n[`ColumnPinningPosition`](../type-aliases/ColumnPinningPosition.md)\n"
  },
  {
    "path": "docs/reference/functions/column_getIsResizing.md",
    "content": "---\nid: column_getIsResizing\ntitle: column_getIsResizing\n---\n\n# Function: column\\_getIsResizing()\n\n```ts\nfunction column_getIsResizing<TFeatures, TData, TValue>(column): boolean;\n```\n\nDefined in: [features/column-resizing/columnResizingFeature.utils.ts:37](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.utils.ts#L37)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n## Parameters\n\n### column\n\n[`Column_Internal`](../type-aliases/Column_Internal.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n## Returns\n\n`boolean`\n"
  },
  {
    "path": "docs/reference/functions/column_getIsSorted.md",
    "content": "---\nid: column_getIsSorted\ntitle: column_getIsSorted\n---\n\n# Function: column\\_getIsSorted()\n\n```ts\nfunction column_getIsSorted<TFeatures, TData, TValue>(column): false | SortDirection;\n```\n\nDefined in: [features/row-sorting/rowSortingFeature.utils.ts:269](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L269)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n## Parameters\n\n### column\n\n[`Column_Internal`](../type-aliases/Column_Internal.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n## Returns\n\n`false` \\| [`SortDirection`](../type-aliases/SortDirection.md)\n"
  },
  {
    "path": "docs/reference/functions/column_getIsVisible.md",
    "content": "---\nid: column_getIsVisible\ntitle: column_getIsVisible\n---\n\n# Function: column\\_getIsVisible()\n\n```ts\nfunction column_getIsVisible<TFeatures, TData, TValue>(column): boolean;\n```\n\nDefined in: [features/column-visibility/columnVisibilityFeature.utils.ts:29](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L29)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n## Parameters\n\n### column\n\n[`Column_Internal`](../type-aliases/Column_Internal.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n## Returns\n\n`boolean`\n"
  },
  {
    "path": "docs/reference/functions/column_getLeafColumns.md",
    "content": "---\nid: column_getLeafColumns\ntitle: column_getLeafColumns\n---\n\n# Function: column\\_getLeafColumns()\n\n```ts\nfunction column_getLeafColumns<TFeatures, TData, TValue>(column): Column<TFeatures, TData, TValue>[];\n```\n\nDefined in: [core/columns/coreColumnsFeature.utils.ts:24](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.utils.ts#L24)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n## Parameters\n\n### column\n\n[`Column`](../type-aliases/Column.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n## Returns\n\n[`Column`](../type-aliases/Column.md)\\<`TFeatures`, `TData`, `TValue`\\>[]\n"
  },
  {
    "path": "docs/reference/functions/column_getNextSortingOrder.md",
    "content": "---\nid: column_getNextSortingOrder\ntitle: column_getNextSortingOrder\n---\n\n# Function: column\\_getNextSortingOrder()\n\n```ts\nfunction column_getNextSortingOrder<TFeatures, TData, TValue>(column, multi?): false | \"asc\" | \"desc\";\n```\n\nDefined in: [features/row-sorting/rowSortingFeature.utils.ts:223](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L223)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n## Parameters\n\n### column\n\n[`Column_Internal`](../type-aliases/Column_Internal.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n### multi?\n\n`boolean`\n\n## Returns\n\n`false` \\| `\"asc\"` \\| `\"desc\"`\n"
  },
  {
    "path": "docs/reference/functions/column_getPinnedIndex.md",
    "content": "---\nid: column_getPinnedIndex\ntitle: column_getPinnedIndex\n---\n\n# Function: column\\_getPinnedIndex()\n\n```ts\nfunction column_getPinnedIndex<TFeatures, TData, TValue>(column): number;\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.utils.ts:103](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L103)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n## Parameters\n\n### column\n\n[`Column_Internal`](../type-aliases/Column_Internal.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n## Returns\n\n`number`\n"
  },
  {
    "path": "docs/reference/functions/column_getSize.md",
    "content": "---\nid: column_getSize\ntitle: column_getSize\n---\n\n# Function: column\\_getSize()\n\n```ts\nfunction column_getSize<TFeatures, TData, TValue>(column): number;\n```\n\nDefined in: [features/column-sizing/columnSizingFeature.utils.ts:29](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts#L29)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n## Parameters\n\n### column\n\n[`Column_Internal`](../type-aliases/Column_Internal.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n## Returns\n\n`number`\n"
  },
  {
    "path": "docs/reference/functions/column_getSortFn.md",
    "content": "---\nid: column_getSortFn\ntitle: column_getSortFn\n---\n\n# Function: column\\_getSortFn()\n\n```ts\nfunction column_getSortFn<TFeatures, TData, TValue>(column): SortFn<TFeatures, TData>;\n```\n\nDefined in: [features/row-sorting/rowSortingFeature.utils.ts:92](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L92)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n## Parameters\n\n### column\n\n[`Column_Internal`](../type-aliases/Column_Internal.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n## Returns\n\n[`SortFn`](../interfaces/SortFn.md)\\<`TFeatures`, `TData`\\>\n"
  },
  {
    "path": "docs/reference/functions/column_getSortIndex.md",
    "content": "---\nid: column_getSortIndex\ntitle: column_getSortIndex\n---\n\n# Function: column\\_getSortIndex()\n\n```ts\nfunction column_getSortIndex<TFeatures, TData, TValue>(column): number;\n```\n\nDefined in: [features/row-sorting/rowSortingFeature.utils.ts:280](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L280)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n## Parameters\n\n### column\n\n[`Column_Internal`](../type-aliases/Column_Internal.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n## Returns\n\n`number`\n"
  },
  {
    "path": "docs/reference/functions/column_getStart.md",
    "content": "---\nid: column_getStart\ntitle: column_getStart\n---\n\n# Function: column\\_getStart()\n\n```ts\nfunction column_getStart<TFeatures, TData, TValue>(column, position): number;\n```\n\nDefined in: [features/column-sizing/columnSizingFeature.utils.ts:46](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts#L46)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n## Parameters\n\n### column\n\n[`Column_Internal`](../type-aliases/Column_Internal.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n### position\n\n[`ColumnPinningPosition`](../type-aliases/ColumnPinningPosition.md) | `\"center\"`\n\n## Returns\n\n`number`\n"
  },
  {
    "path": "docs/reference/functions/column_getToggleGroupingHandler.md",
    "content": "---\nid: column_getToggleGroupingHandler\ntitle: column_getToggleGroupingHandler\n---\n\n# Function: column\\_getToggleGroupingHandler()\n\n```ts\nfunction column_getToggleGroupingHandler<TFeatures, TData, TValue>(column): () => void;\n```\n\nDefined in: [features/column-grouping/columnGroupingFeature.utils.ts:62](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L62)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n## Parameters\n\n### column\n\n[`Column_Internal`](../type-aliases/Column_Internal.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n## Returns\n\n```ts\n(): void;\n```\n\n### Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/functions/column_getToggleSortingHandler.md",
    "content": "---\nid: column_getToggleSortingHandler\ntitle: column_getToggleSortingHandler\n---\n\n# Function: column\\_getToggleSortingHandler()\n\n```ts\nfunction column_getToggleSortingHandler<TFeatures, TData, TValue>(column): (e) => void;\n```\n\nDefined in: [features/row-sorting/rowSortingFeature.utils.ts:301](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L301)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n## Parameters\n\n### column\n\n[`Column_Internal`](../type-aliases/Column_Internal.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n## Returns\n\n```ts\n(e): void;\n```\n\n### Parameters\n\n#### e\n\n`unknown`\n\n### Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/functions/column_getToggleVisibilityHandler.md",
    "content": "---\nid: column_getToggleVisibilityHandler\ntitle: column_getToggleVisibilityHandler\n---\n\n# Function: column\\_getToggleVisibilityHandler()\n\n```ts\nfunction column_getToggleVisibilityHandler<TFeatures, TData, TValue>(column): (e) => void;\n```\n\nDefined in: [features/column-visibility/columnVisibilityFeature.utils.ts:55](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L55)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n## Parameters\n\n### column\n\n[`Column_Internal`](../type-aliases/Column_Internal.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n## Returns\n\n```ts\n(e): void;\n```\n\n### Parameters\n\n#### e\n\n`unknown`\n\n### Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/functions/column_pin.md",
    "content": "---\nid: column_pin\ntitle: column_pin\n---\n\n# Function: column\\_pin()\n\n```ts\nfunction column_pin<TFeatures, TData, TValue>(column, position): void;\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.utils.ts:31](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L31)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n## Parameters\n\n### column\n\n[`Column_Internal`](../type-aliases/Column_Internal.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n### position\n\n[`ColumnPinningPosition`](../type-aliases/ColumnPinningPosition.md)\n\n## Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/functions/column_resetSize.md",
    "content": "---\nid: column_resetSize\ntitle: column_resetSize\n---\n\n# Function: column\\_resetSize()\n\n```ts\nfunction column_resetSize<TFeatures, TData, TValue>(column): void;\n```\n\nDefined in: [features/column-sizing/columnSizingFeature.utils.ts:88](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts#L88)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n## Parameters\n\n### column\n\n[`Column_Internal`](../type-aliases/Column_Internal.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n## Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/functions/column_setFilterValue.md",
    "content": "---\nid: column_setFilterValue\ntitle: column_setFilterValue\n---\n\n# Function: column\\_setFilterValue()\n\n```ts\nfunction column_setFilterValue<TFeatures, TData, TValue>(column, value): void;\n```\n\nDefined in: [features/column-filtering/columnFilteringFeature.utils.ts:119](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.utils.ts#L119)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n## Parameters\n\n### column\n\n[`Column_Internal`](../type-aliases/Column_Internal.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n### value\n\n`any`\n\n## Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/functions/column_toggleGrouping.md",
    "content": "---\nid: column_toggleGrouping\ntitle: column_toggleGrouping\n---\n\n# Function: column\\_toggleGrouping()\n\n```ts\nfunction column_toggleGrouping<TFeatures, TData, TValue>(column): void;\n```\n\nDefined in: [features/column-grouping/columnGroupingFeature.utils.ts:19](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L19)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n## Parameters\n\n### column\n\n[`Column_Internal`](../type-aliases/Column_Internal.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n## Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/functions/column_toggleSorting.md",
    "content": "---\nid: column_toggleSorting\ntitle: column_toggleSorting\n---\n\n# Function: column\\_toggleSorting()\n\n```ts\nfunction column_toggleSorting<TFeatures, TData, TValue>(\n   column, \n   desc?, \n   multi?): void;\n```\n\nDefined in: [features/row-sorting/rowSortingFeature.utils.ts:108](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L108)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n## Parameters\n\n### column\n\n[`Column_Internal`](../type-aliases/Column_Internal.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n### desc?\n\n`boolean`\n\n### multi?\n\n`boolean`\n\n## Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/functions/column_toggleVisibility.md",
    "content": "---\nid: column_toggleVisibility\ntitle: column_toggleVisibility\n---\n\n# Function: column\\_toggleVisibility()\n\n```ts\nfunction column_toggleVisibility<TFeatures, TData, TValue>(column, visible?): void;\n```\n\nDefined in: [features/column-visibility/columnVisibilityFeature.utils.ts:14](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L14)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n## Parameters\n\n### column\n\n[`Column_Internal`](../type-aliases/Column_Internal.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n### visible?\n\n`boolean`\n\n## Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/functions/constructCell.md",
    "content": "---\nid: constructCell\ntitle: constructCell\n---\n\n# Function: constructCell()\n\n```ts\nfunction constructCell<TFeatures, TData, TValue>(\n   column, \n   row, \ntable): Cell<TFeatures, TData, TValue>;\n```\n\nDefined in: [core/cells/constructCell.ts:26](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/constructCell.ts#L26)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n## Parameters\n\n### column\n\n[`Column`](../type-aliases/Column.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n### row\n\n[`Row`](../type-aliases/Row.md)\\<`TFeatures`, `TData`\\>\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n[`Cell`](../type-aliases/Cell.md)\\<`TFeatures`, `TData`, `TValue`\\>\n"
  },
  {
    "path": "docs/reference/functions/constructColumn.md",
    "content": "---\nid: constructColumn\ntitle: constructColumn\n---\n\n# Function: constructColumn()\n\n```ts\nfunction constructColumn<TFeatures, TData, TValue>(\n   table, \n   columnDef, \n   depth, \nparent?): Column<TFeatures, TData, TValue>;\n```\n\nDefined in: [core/columns/constructColumn.ts:30](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/constructColumn.ts#L30)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n### columnDef\n\n[`ColumnDef`](../type-aliases/ColumnDef.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n### depth\n\n`number`\n\n### parent?\n\n[`Column`](../type-aliases/Column.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n## Returns\n\n[`Column`](../type-aliases/Column.md)\\<`TFeatures`, `TData`, `TValue`\\>\n"
  },
  {
    "path": "docs/reference/functions/constructColumnFacetingFeature.md",
    "content": "---\nid: constructColumnFacetingFeature\ntitle: constructColumnFacetingFeature\n---\n\n# Function: constructColumnFacetingFeature()\n\n```ts\nfunction constructColumnFacetingFeature<TFeatures, TData>(): TableFeature<ColumnFacetingFeatureConstructors<TFeatures, TData>>;\n```\n\nDefined in: [features/column-faceting/columnFacetingFeature.ts:32](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.ts#L32)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Returns\n\n[`TableFeature`](../interfaces/TableFeature.md)\\<`ColumnFacetingFeatureConstructors`\\<`TFeatures`, `TData`\\>\\>\n"
  },
  {
    "path": "docs/reference/functions/constructColumnFilteringFeature.md",
    "content": "---\nid: constructColumnFilteringFeature\ntitle: constructColumnFilteringFeature\n---\n\n# Function: constructColumnFilteringFeature()\n\n```ts\nfunction constructColumnFilteringFeature<TFeatures, TData>(): TableFeature<ColumnFilteringFeatureConstructors<TFeatures, TData>>;\n```\n\nDefined in: [features/column-filtering/columnFilteringFeature.ts:47](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.ts#L47)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Returns\n\n[`TableFeature`](../interfaces/TableFeature.md)\\<`ColumnFilteringFeatureConstructors`\\<`TFeatures`, `TData`\\>\\>\n"
  },
  {
    "path": "docs/reference/functions/constructColumnGroupingFeature.md",
    "content": "---\nid: constructColumnGroupingFeature\ntitle: constructColumnGroupingFeature\n---\n\n# Function: constructColumnGroupingFeature()\n\n```ts\nfunction constructColumnGroupingFeature<TFeatures, TData>(): TableFeature<ColumnGroupingFeatureConstructors<TFeatures, TData>>;\n```\n\nDefined in: [features/column-grouping/columnGroupingFeature.ts:54](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.ts#L54)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Returns\n\n[`TableFeature`](../interfaces/TableFeature.md)\\<`ColumnGroupingFeatureConstructors`\\<`TFeatures`, `TData`\\>\\>\n"
  },
  {
    "path": "docs/reference/functions/constructColumnOrderingFeature.md",
    "content": "---\nid: constructColumnOrderingFeature\ntitle: constructColumnOrderingFeature\n---\n\n# Function: constructColumnOrderingFeature()\n\n```ts\nfunction constructColumnOrderingFeature<TFeatures, TData>(): TableFeature<ColumnOrderingFeatureConstructors<TFeatures, TData>>;\n```\n\nDefined in: [features/column-ordering/columnOrderingFeature.ts:34](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.ts#L34)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Returns\n\n[`TableFeature`](../interfaces/TableFeature.md)\\<`ColumnOrderingFeatureConstructors`\\<`TFeatures`, `TData`\\>\\>\n"
  },
  {
    "path": "docs/reference/functions/constructColumnPinningFeature.md",
    "content": "---\nid: constructColumnPinningFeature\ntitle: constructColumnPinningFeature\n---\n\n# Function: constructColumnPinningFeature()\n\n```ts\nfunction constructColumnPinningFeature<TFeatures, TData>(): TableFeature<ColumnPinningFeatureConstructors<TFeatures, TData>>;\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.ts:62](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.ts#L62)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Returns\n\n[`TableFeature`](../interfaces/TableFeature.md)\\<`ColumnPinningFeatureConstructors`\\<`TFeatures`, `TData`\\>\\>\n"
  },
  {
    "path": "docs/reference/functions/constructColumnResizingFeature.md",
    "content": "---\nid: constructColumnResizingFeature\ntitle: constructColumnResizingFeature\n---\n\n# Function: constructColumnResizingFeature()\n\n```ts\nfunction constructColumnResizingFeature<TFeatures, TData>(): TableFeature<ColumnResizingFeatureConstructors<TFeatures, TData>>;\n```\n\nDefined in: [features/column-resizing/columnResizingFeature.ts:35](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.ts#L35)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Returns\n\n[`TableFeature`](../interfaces/TableFeature.md)\\<`ColumnResizingFeatureConstructors`\\<`TFeatures`, `TData`\\>\\>\n"
  },
  {
    "path": "docs/reference/functions/constructColumnSizingFeature.md",
    "content": "---\nid: constructColumnSizingFeature\ntitle: constructColumnSizingFeature\n---\n\n# Function: constructColumnSizingFeature()\n\n```ts\nfunction constructColumnSizingFeature<TFeatures, TData>(): TableFeature<ColumnSizingFeatureConstructors<TFeatures, TData>>;\n```\n\nDefined in: [features/column-sizing/columnSizingFeature.ts:47](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.ts#L47)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Returns\n\n[`TableFeature`](../interfaces/TableFeature.md)\\<`ColumnSizingFeatureConstructors`\\<`TFeatures`, `TData`\\>\\>\n"
  },
  {
    "path": "docs/reference/functions/constructColumnVisibilityFeature.md",
    "content": "---\nid: constructColumnVisibilityFeature\ntitle: constructColumnVisibilityFeature\n---\n\n# Function: constructColumnVisibilityFeature()\n\n```ts\nfunction constructColumnVisibilityFeature<TFeatures, TData>(): TableFeature<ColumnVisibilityFeatureConstructors<TFeatures, TData>>;\n```\n\nDefined in: [features/column-visibility/columnVisibilityFeature.ts:51](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.ts#L51)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Returns\n\n[`TableFeature`](../interfaces/TableFeature.md)\\<`ColumnVisibilityFeatureConstructors`\\<`TFeatures`, `TData`\\>\\>\n"
  },
  {
    "path": "docs/reference/functions/constructCoreCellsFeature.md",
    "content": "---\nid: constructCoreCellsFeature\ntitle: constructCoreCellsFeature\n---\n\n# Function: constructCoreCellsFeature()\n\n```ts\nfunction constructCoreCellsFeature<TFeatures, TData>(): TableFeature<CoreCellsFeatureConstructors<TFeatures, TData>>;\n```\n\nDefined in: [core/cells/coreCellsFeature.ts:19](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.ts#L19)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Returns\n\n[`TableFeature`](../interfaces/TableFeature.md)\\<`CoreCellsFeatureConstructors`\\<`TFeatures`, `TData`\\>\\>\n"
  },
  {
    "path": "docs/reference/functions/constructCoreColumnsFeature.md",
    "content": "---\nid: constructCoreColumnsFeature\ntitle: constructCoreColumnsFeature\n---\n\n# Function: constructCoreColumnsFeature()\n\n```ts\nfunction constructCoreColumnsFeature<TFeatures, TData>(): TableFeature<CoreColumnsFeatureConstructors<TFeatures, TData>>;\n```\n\nDefined in: [core/columns/coreColumnsFeature.ts:29](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.ts#L29)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Returns\n\n[`TableFeature`](../interfaces/TableFeature.md)\\<`CoreColumnsFeatureConstructors`\\<`TFeatures`, `TData`\\>\\>\n"
  },
  {
    "path": "docs/reference/functions/constructCoreHeadersFeature.md",
    "content": "---\nid: constructCoreHeadersFeature\ntitle: constructCoreHeadersFeature\n---\n\n# Function: constructCoreHeadersFeature()\n\n```ts\nfunction constructCoreHeadersFeature<TFeatures, TData>(): TableFeature<CoreHeadersFeatureConstructors<TFeatures, TData>>;\n```\n\nDefined in: [core/headers/coreHeadersFeature.ts:31](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.ts#L31)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Returns\n\n[`TableFeature`](../interfaces/TableFeature.md)\\<`CoreHeadersFeatureConstructors`\\<`TFeatures`, `TData`\\>\\>\n"
  },
  {
    "path": "docs/reference/functions/constructCoreRowModelsFeature.md",
    "content": "---\nid: constructCoreRowModelsFeature\ntitle: constructCoreRowModelsFeature\n---\n\n# Function: constructCoreRowModelsFeature()\n\n```ts\nfunction constructCoreRowModelsFeature<TFeatures, TData>(): TableFeature<CoreRowModelsFeatureConstructors<TFeatures, TData>>;\n```\n\nDefined in: [core/row-models/coreRowModelsFeature.ts:27](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.ts#L27)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Returns\n\n[`TableFeature`](../interfaces/TableFeature.md)\\<`CoreRowModelsFeatureConstructors`\\<`TFeatures`, `TData`\\>\\>\n"
  },
  {
    "path": "docs/reference/functions/constructCoreRowsFeature.md",
    "content": "---\nid: constructCoreRowsFeature\ntitle: constructCoreRowsFeature\n---\n\n# Function: constructCoreRowsFeature()\n\n```ts\nfunction constructCoreRowsFeature<TFeatures, TData>(): TableFeature<CoreRowsFeatureConstructors<TFeatures, TData>>;\n```\n\nDefined in: [core/rows/coreRowsFeature.ts:31](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.ts#L31)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Returns\n\n[`TableFeature`](../interfaces/TableFeature.md)\\<`CoreRowsFeatureConstructors`\\<`TFeatures`, `TData`\\>\\>\n"
  },
  {
    "path": "docs/reference/functions/constructCoreTablesFeature.md",
    "content": "---\nid: constructCoreTablesFeature\ntitle: constructCoreTablesFeature\n---\n\n# Function: constructCoreTablesFeature()\n\n```ts\nfunction constructCoreTablesFeature<TFeatures, TData>(): TableFeature<CoreTablesFeatureConstructors<TFeatures, TData>>;\n```\n\nDefined in: [core/table/coreTablesFeature.ts:15](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.ts#L15)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Returns\n\n[`TableFeature`](../interfaces/TableFeature.md)\\<`CoreTablesFeatureConstructors`\\<`TFeatures`, `TData`\\>\\>\n"
  },
  {
    "path": "docs/reference/functions/constructGlobalFilteringFeature.md",
    "content": "---\nid: constructGlobalFilteringFeature\ntitle: constructGlobalFilteringFeature\n---\n\n# Function: constructGlobalFilteringFeature()\n\n```ts\nfunction constructGlobalFilteringFeature<TFeatures, TData>(): TableFeature<GlobalFilteringFeatureConstructors<TFeatures, TData>>;\n```\n\nDefined in: [features/global-filtering/globalFilteringFeature.ts:34](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.ts#L34)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Returns\n\n[`TableFeature`](../interfaces/TableFeature.md)\\<`GlobalFilteringFeatureConstructors`\\<`TFeatures`, `TData`\\>\\>\n"
  },
  {
    "path": "docs/reference/functions/constructHeader.md",
    "content": "---\nid: constructHeader\ntitle: constructHeader\n---\n\n# Function: constructHeader()\n\n```ts\nfunction constructHeader<TFeatures, TData, TValue>(\n   table, \n   column, \noptions): Header<TFeatures, TData, TValue>;\n```\n\nDefined in: [core/headers/constructHeader.ts:25](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/constructHeader.ts#L25)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n### column\n\n[`Column`](../type-aliases/Column.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n### options\n\n#### depth\n\n`number`\n\n#### id?\n\n`string`\n\n#### index\n\n`number`\n\n#### isPlaceholder?\n\n`boolean`\n\n#### placeholderId?\n\n`string`\n\n## Returns\n\n[`Header`](../type-aliases/Header.md)\\<`TFeatures`, `TData`, `TValue`\\>\n"
  },
  {
    "path": "docs/reference/functions/constructRow.md",
    "content": "---\nid: constructRow\ntitle: constructRow\n---\n\n# Function: constructRow()\n\n```ts\nfunction constructRow<TFeatures, TData>(\n   table, \n   id, \n   original, \n   rowIndex, \n   depth, \n   subRows?, \nparentId?): Row<TFeatures, TData>;\n```\n\nDefined in: [core/rows/constructRow.ts:24](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/constructRow.ts#L24)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n### id\n\n`string`\n\n### original\n\n`TData`\n\n### rowIndex\n\n`number`\n\n### depth\n\n`number`\n\n### subRows?\n\n[`Row`](../type-aliases/Row.md)\\<`TFeatures`, `TData`\\>[]\n\n### parentId?\n\n`string`\n\n## Returns\n\n[`Row`](../type-aliases/Row.md)\\<`TFeatures`, `TData`\\>\n"
  },
  {
    "path": "docs/reference/functions/constructRowExpandingFeature.md",
    "content": "---\nid: constructRowExpandingFeature\ntitle: constructRowExpandingFeature\n---\n\n# Function: constructRowExpandingFeature()\n\n```ts\nfunction constructRowExpandingFeature<TFeatures, TData>(): TableFeature<RowExpandingFeatureConstructors<TFeatures, TData>>;\n```\n\nDefined in: [features/row-expanding/rowExpandingFeature.ts:46](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.ts#L46)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Returns\n\n[`TableFeature`](../interfaces/TableFeature.md)\\<`RowExpandingFeatureConstructors`\\<`TFeatures`, `TData`\\>\\>\n"
  },
  {
    "path": "docs/reference/functions/constructRowPaginationFeature.md",
    "content": "---\nid: constructRowPaginationFeature\ntitle: constructRowPaginationFeature\n---\n\n# Function: constructRowPaginationFeature()\n\n```ts\nfunction constructRowPaginationFeature<TFeatures, TData>(): TableFeature<RowPaginationFeatureConstructors<TFeatures, TData>>;\n```\n\nDefined in: [features/row-pagination/rowPaginationFeature.ts:42](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.ts#L42)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Returns\n\n[`TableFeature`](../interfaces/TableFeature.md)\\<`RowPaginationFeatureConstructors`\\<`TFeatures`, `TData`\\>\\>\n"
  },
  {
    "path": "docs/reference/functions/constructRowPinningFeature.md",
    "content": "---\nid: constructRowPinningFeature\ntitle: constructRowPinningFeature\n---\n\n# Function: constructRowPinningFeature()\n\n```ts\nfunction constructRowPinningFeature<TFeatures, TData>(): TableFeature<RowPinningFeatureConstructors<TFeatures, TData>>;\n```\n\nDefined in: [features/row-pinning/rowPinningFeature.ts:38](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.ts#L38)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Returns\n\n[`TableFeature`](../interfaces/TableFeature.md)\\<`RowPinningFeatureConstructors`\\<`TFeatures`, `TData`\\>\\>\n"
  },
  {
    "path": "docs/reference/functions/constructRowSelectionFeature.md",
    "content": "---\nid: constructRowSelectionFeature\ntitle: constructRowSelectionFeature\n---\n\n# Function: constructRowSelectionFeature()\n\n```ts\nfunction constructRowSelectionFeature<TFeatures, TData>(): TableFeature<RowSelectionFeatureConstructors<TFeatures, TData>>;\n```\n\nDefined in: [features/row-selection/rowSelectionFeature.ts:50](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.ts#L50)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Returns\n\n[`TableFeature`](../interfaces/TableFeature.md)\\<`RowSelectionFeatureConstructors`\\<`TFeatures`, `TData`\\>\\>\n"
  },
  {
    "path": "docs/reference/functions/constructRowSortingFeature.md",
    "content": "---\nid: constructRowSortingFeature\ntitle: constructRowSortingFeature\n---\n\n# Function: constructRowSortingFeature()\n\n```ts\nfunction constructRowSortingFeature<TFeatures, TData>(): TableFeature<RowSortingFeatureConstructors<TFeatures, TData>>;\n```\n\nDefined in: [features/row-sorting/rowSortingFeature.ts:50](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.ts#L50)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Returns\n\n[`TableFeature`](../interfaces/TableFeature.md)\\<`RowSortingFeatureConstructors`\\<`TFeatures`, `TData`\\>\\>\n"
  },
  {
    "path": "docs/reference/functions/constructTable.md",
    "content": "---\nid: constructTable\ntitle: constructTable\n---\n\n# Function: constructTable()\n\n```ts\nfunction constructTable<TFeatures, TData>(tableOptions): Table<TFeatures, TData>;\n```\n\nDefined in: [core/table/constructTable.ts:29](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/constructTable.ts#L29)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### tableOptions\n\n[`TableOptions`](../type-aliases/TableOptions.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n[`Table`](../type-aliases/Table.md)\\<`TFeatures`, `TData`\\>\n"
  },
  {
    "path": "docs/reference/functions/constructTableHelper.md",
    "content": "---\nid: constructTableHelper\ntitle: constructTableHelper\n---\n\n# Function: constructTableHelper()\n\n```ts\nfunction constructTableHelper<TFeatures>(tableCreator, tableHelperOptions): TableHelper_Core<TFeatures>;\n```\n\nDefined in: [helpers/tableHelper.ts:44](https://github.com/TanStack/table/blob/main/packages/table-core/src/helpers/tableHelper.ts#L44)\n\nInternal function to create a table helper that each adapter package will use to create their own table helper\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n## Parameters\n\n### tableCreator\n\n\\<`TData`\\>(`tableOptions`, `selector?`) => [`Table`](../type-aliases/Table.md)\\<`TFeatures`, `TData`\\>\n\n### tableHelperOptions\n\n[`TableHelperOptions`](../type-aliases/TableHelperOptions.md)\\<`TFeatures`\\>\n\n## Returns\n\n[`TableHelper_Core`](../type-aliases/TableHelper_Core.md)\\<`TFeatures`\\>\n"
  },
  {
    "path": "docs/reference/functions/createColumnHelper.md",
    "content": "---\nid: createColumnHelper\ntitle: createColumnHelper\n---\n\n# Function: createColumnHelper()\n\n```ts\nfunction createColumnHelper<TFeatures, TData>(): ColumnHelper<TFeatures, TData>;\n```\n\nDefined in: [helpers/columnHelper.ts:94](https://github.com/TanStack/table/blob/main/packages/table-core/src/helpers/columnHelper.ts#L94)\n\nA helper utility for creating column definitions with slightly better type inference for each individual column.\nThe `TValue` generic is inferred based on the accessor key or function provided.\n**Note:** From a JavaScript perspective, the functions in these helpers do not do anything. They are only used to help TypeScript infer the correct types for the column definitions.\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Returns\n\n[`ColumnHelper`](../type-aliases/ColumnHelper.md)\\<`TFeatures`, `TData`\\>\n\n## Example\n\n```tsx\nconst helper = createColumnHelper<typeof _features, Person>() // _features is the result of `tableFeatures({})` helper\nconst columns = [\n helper.display({ id: 'actions', header: 'Actions' }),\n helper.accessor('firstName', {}),\n helper.accessor((row) => row.lastName, {}\n]\n```\n"
  },
  {
    "path": "docs/reference/functions/createCoreRowModel.md",
    "content": "---\nid: createCoreRowModel\ntitle: createCoreRowModel\n---\n\n# Function: createCoreRowModel()\n\n```ts\nfunction createCoreRowModel<TFeatures, TData>(): (table) => () => RowModel<TFeatures, TData>;\n```\n\nDefined in: [core/row-models/createCoreRowModel.ts:10](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/createCoreRowModel.ts#L10)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Returns\n\n```ts\n(table): () => RowModel<TFeatures, TData>;\n```\n\n### Parameters\n\n#### table\n\n[`Table`](../type-aliases/Table.md)\\<`TFeatures`, `TData`\\>\n\n### Returns\n\n```ts\n(): RowModel<TFeatures, TData>;\n```\n\n#### Returns\n\n[`RowModel`](../interfaces/RowModel.md)\\<`TFeatures`, `TData`\\>\n"
  },
  {
    "path": "docs/reference/functions/createExpandedRowModel.md",
    "content": "---\nid: createExpandedRowModel\ntitle: createExpandedRowModel\n---\n\n# Function: createExpandedRowModel()\n\n```ts\nfunction createExpandedRowModel<TFeatures, TData>(): (table) => () => RowModel<TFeatures, TData>;\n```\n\nDefined in: [features/row-expanding/createExpandedRowModel.ts:9](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/createExpandedRowModel.ts#L9)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md) = `any`\n\n## Returns\n\n```ts\n(table): () => RowModel<TFeatures, TData>;\n```\n\n### Parameters\n\n#### table\n\n[`Table`](../type-aliases/Table.md)\\<`TFeatures`, `TData`\\>\n\n### Returns\n\n```ts\n(): RowModel<TFeatures, TData>;\n```\n\n#### Returns\n\n[`RowModel`](../interfaces/RowModel.md)\\<`TFeatures`, `TData`\\>\n"
  },
  {
    "path": "docs/reference/functions/createFacetedMinMaxValues.md",
    "content": "---\nid: createFacetedMinMaxValues\ntitle: createFacetedMinMaxValues\n---\n\n# Function: createFacetedMinMaxValues()\n\n```ts\nfunction createFacetedMinMaxValues<TFeatures, TData>(): (table, columnId) => () => [number, number] | undefined;\n```\n\nDefined in: [features/column-faceting/createFacetedMinMaxValues.ts:8](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/createFacetedMinMaxValues.ts#L8)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md) = `any`\n\n## Returns\n\n```ts\n(table, columnId): () => [number, number] | undefined;\n```\n\n### Parameters\n\n#### table\n\n[`Table`](../type-aliases/Table.md)\\<`TFeatures`, `TData`\\>\n\n#### columnId\n\n`string`\n\n### Returns\n\n```ts\n(): [number, number] | undefined;\n```\n\n#### Returns\n\n\\[`number`, `number`\\] \\| `undefined`\n"
  },
  {
    "path": "docs/reference/functions/createFacetedRowModel.md",
    "content": "---\nid: createFacetedRowModel\ntitle: createFacetedRowModel\n---\n\n# Function: createFacetedRowModel()\n\n```ts\nfunction createFacetedRowModel<TFeatures, TData>(): (table, columnId) => () => RowModel<TFeatures, TData>;\n```\n\nDefined in: [features/column-faceting/createFacetedRowModel.ts:13](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/createFacetedRowModel.ts#L13)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md) = `any`\n\n## Returns\n\n```ts\n(table, columnId): () => RowModel<TFeatures, TData>;\n```\n\n### Parameters\n\n#### table\n\n[`Table`](../type-aliases/Table.md)\\<`TFeatures`, `TData`\\>\n\n#### columnId\n\n`string`\n\n### Returns\n\n```ts\n(): RowModel<TFeatures, TData>;\n```\n\n#### Returns\n\n[`RowModel`](../interfaces/RowModel.md)\\<`TFeatures`, `TData`\\>\n"
  },
  {
    "path": "docs/reference/functions/createFacetedUniqueValues.md",
    "content": "---\nid: createFacetedUniqueValues\ntitle: createFacetedUniqueValues\n---\n\n# Function: createFacetedUniqueValues()\n\n```ts\nfunction createFacetedUniqueValues<TFeatures, TData>(): (table, columnId) => () => Map<any, number>;\n```\n\nDefined in: [features/column-faceting/createFacetedUniqueValues.ts:8](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/createFacetedUniqueValues.ts#L8)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md) = `any`\n\n## Returns\n\n```ts\n(table, columnId): () => Map<any, number>;\n```\n\n### Parameters\n\n#### table\n\n[`Table`](../type-aliases/Table.md)\\<`TFeatures`, `TData`\\>\n\n#### columnId\n\n`string`\n\n### Returns\n\n```ts\n(): Map<any, number>;\n```\n\n#### Returns\n\n`Map`\\<`any`, `number`\\>\n"
  },
  {
    "path": "docs/reference/functions/createFilteredRowModel.md",
    "content": "---\nid: createFilteredRowModel\ntitle: createFilteredRowModel\n---\n\n# Function: createFilteredRowModel()\n\n```ts\nfunction createFilteredRowModel<TFeatures, TData>(filterFns): (table) => () => RowModel<TFeatures, TData>;\n```\n\nDefined in: [features/column-filtering/createFilteredRowModel.ts:22](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/createFilteredRowModel.ts#L22)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md) = `any`\n\n## Parameters\n\n### filterFns\n\n`Record`\\<keyof [`FilterFns`](../interfaces/FilterFns.md), [`FilterFn`](../interfaces/FilterFn.md)\\<`TFeatures`, `TData`\\>\\>\n\n## Returns\n\n```ts\n(table): () => RowModel<TFeatures, TData>;\n```\n\n### Parameters\n\n#### table\n\n[`Table`](../type-aliases/Table.md)\\<`TFeatures`, `TData`\\>\n\n### Returns\n\n```ts\n(): RowModel<TFeatures, TData>;\n```\n\n#### Returns\n\n[`RowModel`](../interfaces/RowModel.md)\\<`TFeatures`, `TData`\\>\n"
  },
  {
    "path": "docs/reference/functions/createGroupedRowModel.md",
    "content": "---\nid: createGroupedRowModel\ntitle: createGroupedRowModel\n---\n\n# Function: createGroupedRowModel()\n\n```ts\nfunction createGroupedRowModel<TFeatures, TData>(aggregationFns): (table) => () => RowModel<TFeatures, TData>;\n```\n\nDefined in: [features/column-grouping/createGroupedRowModel.ts:22](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/createGroupedRowModel.ts#L22)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md) = `any`\n\n## Parameters\n\n### aggregationFns\n\n`Record`\\<keyof [`AggregationFns`](../interfaces/AggregationFns.md), [`AggregationFn`](../type-aliases/AggregationFn.md)\\<`TFeatures`, `TData`\\>\\>\n\n## Returns\n\n```ts\n(table): () => RowModel<TFeatures, TData>;\n```\n\n### Parameters\n\n#### table\n\n[`Table`](../type-aliases/Table.md)\\<`TFeatures`, `TData`\\>\n\n### Returns\n\n```ts\n(): RowModel<TFeatures, TData>;\n```\n\n#### Returns\n\n[`RowModel`](../interfaces/RowModel.md)\\<`TFeatures`, `TData`\\>\n"
  },
  {
    "path": "docs/reference/functions/createPaginatedRowModel.md",
    "content": "---\nid: createPaginatedRowModel\ntitle: createPaginatedRowModel\n---\n\n# Function: createPaginatedRowModel()\n\n```ts\nfunction createPaginatedRowModel<TFeatures, TData>(): (table) => () => RowModel<TFeatures, TData>;\n```\n\nDefined in: [features/row-pagination/createPaginatedRowModel.ts:10](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/createPaginatedRowModel.ts#L10)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md) = `any`\n\n## Returns\n\n```ts\n(table): () => RowModel<TFeatures, TData>;\n```\n\n### Parameters\n\n#### table\n\n[`Table`](../type-aliases/Table.md)\\<`TFeatures`, `TData`\\>\n\n### Returns\n\n```ts\n(): RowModel<TFeatures, TData>;\n```\n\n#### Returns\n\n[`RowModel`](../interfaces/RowModel.md)\\<`TFeatures`, `TData`\\>\n"
  },
  {
    "path": "docs/reference/functions/createSortedRowModel.md",
    "content": "---\nid: createSortedRowModel\ntitle: createSortedRowModel\n---\n\n# Function: createSortedRowModel()\n\n```ts\nfunction createSortedRowModel<TFeatures, TData>(sortFns): (table) => () => RowModel<TFeatures, TData>;\n```\n\nDefined in: [features/row-sorting/createSortedRowModel.ts:12](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/createSortedRowModel.ts#L12)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### sortFns\n\n`Record`\\<keyof [`SortFns`](../interfaces/SortFns.md), [`SortFn`](../interfaces/SortFn.md)\\<`TFeatures`, `TData`\\>\\>\n\n## Returns\n\n```ts\n(table): () => RowModel<TFeatures, TData>;\n```\n\n### Parameters\n\n#### table\n\n[`Table`](../type-aliases/Table.md)\\<`TFeatures`, `TData`\\>\n\n### Returns\n\n```ts\n(): RowModel<TFeatures, TData>;\n```\n\n#### Returns\n\n[`RowModel`](../interfaces/RowModel.md)\\<`TFeatures`, `TData`\\>\n"
  },
  {
    "path": "docs/reference/functions/createTableStore.md",
    "content": "---\nid: createTableStore\ntitle: createTableStore\n---\n\n# Function: createTableStore()\n\n```ts\nfunction createTableStore<TFeatures>(features, initialState): Store<TableState<TFeatures>>;\n```\n\nDefined in: [core/table/constructTable.ts:22](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/constructTable.ts#L22)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n## Parameters\n\n### features\n\n`TFeatures`\n\n### initialState\n\n`Partial`\\<[`TableState`](../type-aliases/TableState.md)\\<`TFeatures`\\>\\> | `undefined`\n\n## Returns\n\n`Store`\\<[`TableState`](../type-aliases/TableState.md)\\<`TFeatures`\\>\\>\n"
  },
  {
    "path": "docs/reference/functions/expandRows.md",
    "content": "---\nid: expandRows\ntitle: expandRows\n---\n\n# Function: expandRows()\n\n```ts\nfunction expandRows<TFeatures, TData>(rowModel): RowModel<TFeatures, TData>;\n```\n\nDefined in: [features/row-expanding/createExpandedRowModel.ts:51](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/createExpandedRowModel.ts#L51)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md) = `any`\n\n## Parameters\n\n### rowModel\n\n[`RowModel`](../interfaces/RowModel.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n[`RowModel`](../interfaces/RowModel.md)\\<`TFeatures`, `TData`\\>\n"
  },
  {
    "path": "docs/reference/functions/flattenBy.md",
    "content": "---\nid: flattenBy\ntitle: flattenBy\n---\n\n# Function: flattenBy()\n\n```ts\nfunction flattenBy<TNode>(arr, getChildren): TNode[];\n```\n\nDefined in: [utils.ts:40](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L40)\n\n## Type Parameters\n\n### TNode\n\n`TNode`\n\n## Parameters\n\n### arr\n\n`TNode`[]\n\n### getChildren\n\n(`item`) => `TNode`[]\n\n## Returns\n\n`TNode`[]\n"
  },
  {
    "path": "docs/reference/functions/functionalUpdate.md",
    "content": "---\nid: functionalUpdate\ntitle: functionalUpdate\n---\n\n# Function: functionalUpdate()\n\n```ts\nfunction functionalUpdate<T>(updater, input): T;\n```\n\nDefined in: [utils.ts:6](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L6)\n\n## Type Parameters\n\n### T\n\n`T`\n\n## Parameters\n\n### updater\n\n[`Updater`](../type-aliases/Updater.md)\\<`T`\\>\n\n### input\n\n`T`\n\n## Returns\n\n`T`\n"
  },
  {
    "path": "docs/reference/functions/getDefaultColumnFiltersState.md",
    "content": "---\nid: getDefaultColumnFiltersState\ntitle: getDefaultColumnFiltersState\n---\n\n# Function: getDefaultColumnFiltersState()\n\n```ts\nfunction getDefaultColumnFiltersState(): ColumnFiltersState;\n```\n\nDefined in: [features/column-filtering/columnFilteringFeature.utils.ts:11](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.utils.ts#L11)\n\n## Returns\n\n[`ColumnFiltersState`](../type-aliases/ColumnFiltersState.md)\n"
  },
  {
    "path": "docs/reference/functions/getDefaultColumnOrderState.md",
    "content": "---\nid: getDefaultColumnOrderState\ntitle: getDefaultColumnOrderState\n---\n\n# Function: getDefaultColumnOrderState()\n\n```ts\nfunction getDefaultColumnOrderState(): ColumnOrderState;\n```\n\nDefined in: [features/column-ordering/columnOrderingFeature.utils.ts:10](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.utils.ts#L10)\n\n## Returns\n\n[`ColumnOrderState`](../type-aliases/ColumnOrderState.md)\n"
  },
  {
    "path": "docs/reference/functions/getDefaultColumnPinningState.md",
    "content": "---\nid: getDefaultColumnPinningState\ntitle: getDefaultColumnPinningState\n---\n\n# Function: getDefaultColumnPinningState()\n\n```ts\nfunction getDefaultColumnPinningState(): ColumnPinningState;\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.utils.ts:22](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L22)\n\n## Returns\n\n[`ColumnPinningState`](../interfaces/ColumnPinningState.md)\n"
  },
  {
    "path": "docs/reference/functions/getDefaultColumnResizingState.md",
    "content": "---\nid: getDefaultColumnResizingState\ntitle: getDefaultColumnResizingState\n---\n\n# Function: getDefaultColumnResizingState()\n\n```ts\nfunction getDefaultColumnResizingState(): columnResizingState;\n```\n\nDefined in: [features/column-resizing/columnResizingFeature.utils.ts:15](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.utils.ts#L15)\n\n## Returns\n\n[`columnResizingState`](../interfaces/columnResizingState.md)\n"
  },
  {
    "path": "docs/reference/functions/getDefaultColumnSizingColumnDef.md",
    "content": "---\nid: getDefaultColumnSizingColumnDef\ntitle: getDefaultColumnSizingColumnDef\n---\n\n# Function: getDefaultColumnSizingColumnDef()\n\n```ts\nfunction getDefaultColumnSizingColumnDef(): object;\n```\n\nDefined in: [features/column-sizing/columnSizingFeature.utils.ts:21](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts#L21)\n\n## Returns\n\n`object`\n\n### maxSize\n\n```ts\nmaxSize: number = Number.MAX_SAFE_INTEGER;\n```\n\n### minSize\n\n```ts\nminSize: number = 20;\n```\n\n### size\n\n```ts\nsize: number = 150;\n```\n"
  },
  {
    "path": "docs/reference/functions/getDefaultColumnSizingState.md",
    "content": "---\nid: getDefaultColumnSizingState\ntitle: getDefaultColumnSizingState\n---\n\n# Function: getDefaultColumnSizingState()\n\n```ts\nfunction getDefaultColumnSizingState(): ColumnSizingState;\n```\n\nDefined in: [features/column-sizing/columnSizingFeature.utils.ts:17](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts#L17)\n\n## Returns\n\n[`ColumnSizingState`](../type-aliases/ColumnSizingState.md)\n"
  },
  {
    "path": "docs/reference/functions/getDefaultColumnVisibilityState.md",
    "content": "---\nid: getDefaultColumnVisibilityState\ntitle: getDefaultColumnVisibilityState\n---\n\n# Function: getDefaultColumnVisibilityState()\n\n```ts\nfunction getDefaultColumnVisibilityState(): ColumnVisibilityState;\n```\n\nDefined in: [features/column-visibility/columnVisibilityFeature.utils.ts:10](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L10)\n\n## Returns\n\n[`ColumnVisibilityState`](../type-aliases/ColumnVisibilityState.md)\n"
  },
  {
    "path": "docs/reference/functions/getDefaultExpandedState.md",
    "content": "---\nid: getDefaultExpandedState\ntitle: getDefaultExpandedState\n---\n\n# Function: getDefaultExpandedState()\n\n```ts\nfunction getDefaultExpandedState(): ExpandedState;\n```\n\nDefined in: [features/row-expanding/rowExpandingFeature.utils.ts:10](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L10)\n\n## Returns\n\n[`ExpandedState`](../type-aliases/ExpandedState.md)\n"
  },
  {
    "path": "docs/reference/functions/getDefaultGroupingState.md",
    "content": "---\nid: getDefaultGroupingState\ntitle: getDefaultGroupingState\n---\n\n# Function: getDefaultGroupingState()\n\n```ts\nfunction getDefaultGroupingState(): GroupingState;\n```\n\nDefined in: [features/column-grouping/columnGroupingFeature.utils.ts:15](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L15)\n\n## Returns\n\n[`GroupingState`](../type-aliases/GroupingState.md)\n"
  },
  {
    "path": "docs/reference/functions/getDefaultPaginationState.md",
    "content": "---\nid: getDefaultPaginationState\ntitle: getDefaultPaginationState\n---\n\n# Function: getDefaultPaginationState()\n\n```ts\nfunction getDefaultPaginationState(): PaginationState;\n```\n\nDefined in: [features/row-pagination/rowPaginationFeature.utils.ts:10](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L10)\n\n## Returns\n\n[`PaginationState`](../interfaces/PaginationState.md)\n"
  },
  {
    "path": "docs/reference/functions/getDefaultRowPinningState.md",
    "content": "---\nid: getDefaultRowPinningState\ntitle: getDefaultRowPinningState\n---\n\n# Function: getDefaultRowPinningState()\n\n```ts\nfunction getDefaultRowPinningState(): RowPinningState;\n```\n\nDefined in: [features/row-pinning/rowPinningFeature.utils.ts:14](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts#L14)\n\n## Returns\n\n[`RowPinningState`](../interfaces/RowPinningState.md)\n"
  },
  {
    "path": "docs/reference/functions/getDefaultRowSelectionState.md",
    "content": "---\nid: getDefaultRowSelectionState\ntitle: getDefaultRowSelectionState\n---\n\n# Function: getDefaultRowSelectionState()\n\n```ts\nfunction getDefaultRowSelectionState(): RowSelectionState;\n```\n\nDefined in: [features/row-selection/rowSelectionFeature.utils.ts:10](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L10)\n\n## Returns\n\n[`RowSelectionState`](../type-aliases/RowSelectionState.md)\n"
  },
  {
    "path": "docs/reference/functions/getDefaultSortingState.md",
    "content": "---\nid: getDefaultSortingState\ntitle: getDefaultSortingState\n---\n\n# Function: getDefaultSortingState()\n\n```ts\nfunction getDefaultSortingState(): SortingState;\n```\n\nDefined in: [features/row-sorting/rowSortingFeature.utils.ts:15](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L15)\n\n## Returns\n\n[`SortingState`](../type-aliases/SortingState.md)\n"
  },
  {
    "path": "docs/reference/functions/getFunctionNameInfo.md",
    "content": "---\nid: getFunctionNameInfo\ntitle: getFunctionNameInfo\n---\n\n# Function: getFunctionNameInfo()\n\n```ts\nfunction getFunctionNameInfo(staticFnName, splitBy): object;\n```\n\nDefined in: [utils.ts:280](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L280)\n\nAssumes that a function name is in the format of `parentName_fnKey` and returns the `fnKey` and `fnName` in the format of `parentName.fnKey`.\n\n## Parameters\n\n### staticFnName\n\n`string`\n\n### splitBy\n\n`\"_\"` | `\".\"`\n\n## Returns\n\n`object`\n\n### fnKey\n\n```ts\nfnKey: string;\n```\n\n### fnName\n\n```ts\nfnName: string;\n```\n\n### parentName\n\n```ts\nparentName: string;\n```\n"
  },
  {
    "path": "docs/reference/functions/getInitialTableState.md",
    "content": "---\nid: getInitialTableState\ntitle: getInitialTableState\n---\n\n# Function: getInitialTableState()\n\n```ts\nfunction getInitialTableState<TFeatures>(features, initialState): TableState<TFeatures>;\n```\n\nDefined in: [core/table/constructTable.ts:10](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/constructTable.ts#L10)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n## Parameters\n\n### features\n\n`TFeatures`\n\n### initialState\n\n`Partial`\\<[`TableState`](../type-aliases/TableState.md)\\<`TFeatures`\\>\\> | `undefined`\n\n## Returns\n\n[`TableState`](../type-aliases/TableState.md)\\<`TFeatures`\\>\n"
  },
  {
    "path": "docs/reference/functions/getMemoFnMeta.md",
    "content": "---\nid: getMemoFnMeta\ntitle: getMemoFnMeta\n---\n\n# Function: getMemoFnMeta()\n\n```ts\nfunction getMemoFnMeta(fn): MemoFnMeta | null;\n```\n\nDefined in: [utils.ts:74](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L74)\n\n**`Internal`**\n\n## Parameters\n\n### fn\n\n`any`\n\n## Returns\n\n[`MemoFnMeta`](../type-aliases/MemoFnMeta.md) \\| `null`\n"
  },
  {
    "path": "docs/reference/functions/header_getContext.md",
    "content": "---\nid: header_getContext\ntitle: header_getContext\n---\n\n# Function: header\\_getContext()\n\n```ts\nfunction header_getContext<TFeatures, TData, TValue>(header): object;\n```\n\nDefined in: [core/headers/coreHeadersFeature.utils.ts:36](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.utils.ts#L36)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue`\n\n## Parameters\n\n### header\n\n[`Header`](../type-aliases/Header.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n## Returns\n\n`object`\n\n### column\n\n```ts\ncolumn: Column<TFeatures, TData, TValue> = header.column;\n```\n\n### header\n\n```ts\nheader: Header<TFeatures, TData, TValue>;\n```\n\n### table\n\n```ts\ntable: Table_Internal<TFeatures, TData> = header.column.table;\n```\n"
  },
  {
    "path": "docs/reference/functions/header_getLeafHeaders.md",
    "content": "---\nid: header_getLeafHeaders\ntitle: header_getLeafHeaders\n---\n\n# Function: header\\_getLeafHeaders()\n\n```ts\nfunction header_getLeafHeaders<TFeatures, TData, TValue>(header): Header<TFeatures, TData, TValue>[];\n```\n\nDefined in: [core/headers/coreHeadersFeature.utils.ts:17](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.utils.ts#L17)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue`\n\n## Parameters\n\n### header\n\n[`Header`](../type-aliases/Header.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n## Returns\n\n[`Header`](../type-aliases/Header.md)\\<`TFeatures`, `TData`, `TValue`\\>[]\n"
  },
  {
    "path": "docs/reference/functions/header_getResizeHandler.md",
    "content": "---\nid: header_getResizeHandler\ntitle: header_getResizeHandler\n---\n\n# Function: header\\_getResizeHandler()\n\n```ts\nfunction header_getResizeHandler<TFeatures, TData, TValue>(header, _contextDocument?): (event) => void;\n```\n\nDefined in: [features/column-resizing/columnResizingFeature.utils.ts:45](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.utils.ts#L45)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n## Parameters\n\n### header\n\n[`Header`](../type-aliases/Header.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n### \\_contextDocument?\n\n`Document`\n\n## Returns\n\n```ts\n(event): void;\n```\n\n### Parameters\n\n#### event\n\n`unknown`\n\n### Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/functions/header_getSize.md",
    "content": "---\nid: header_getSize\ntitle: header_getSize\n---\n\n# Function: header\\_getSize()\n\n```ts\nfunction header_getSize<TFeatures, TData, TValue>(header): number;\n```\n\nDefined in: [features/column-sizing/columnSizingFeature.utils.ts:98](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts#L98)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n## Parameters\n\n### header\n\n[`Header`](../type-aliases/Header.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n## Returns\n\n`number`\n"
  },
  {
    "path": "docs/reference/functions/header_getStart.md",
    "content": "---\nid: header_getStart\ntitle: header_getStart\n---\n\n# Function: header\\_getStart()\n\n```ts\nfunction header_getStart<TFeatures, TData, TValue>(header): number;\n```\n\nDefined in: [features/column-sizing/columnSizingFeature.utils.ts:118](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts#L118)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n## Parameters\n\n### header\n\n[`Header`](../type-aliases/Header.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n## Returns\n\n`number`\n"
  },
  {
    "path": "docs/reference/functions/isFunction.md",
    "content": "---\nid: isFunction\ntitle: isFunction\n---\n\n# Function: isFunction()\n\n```ts\nfunction isFunction<T>(d): d is T;\n```\n\nDefined in: [utils.ts:32](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L32)\n\n## Type Parameters\n\n### T\n\n`T` *extends* `AnyFunction`\n\n## Parameters\n\n### d\n\n`any`\n\n## Returns\n\n`d is T`\n"
  },
  {
    "path": "docs/reference/functions/isNumberArray.md",
    "content": "---\nid: isNumberArray\ntitle: isNumberArray\n---\n\n# Function: isNumberArray()\n\n```ts\nfunction isNumberArray(d): d is number[];\n```\n\nDefined in: [utils.ts:36](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L36)\n\n## Parameters\n\n### d\n\n`any`\n\n## Returns\n\n`d is number[]`\n"
  },
  {
    "path": "docs/reference/functions/isRowSelected.md",
    "content": "---\nid: isRowSelected\ntitle: isRowSelected\n---\n\n# Function: isRowSelected()\n\n```ts\nfunction isRowSelected<TFeatures, TData>(row): boolean;\n```\n\nDefined in: [features/row-selection/rowSelectionFeature.utils.ts:418](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L418)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### row\n\n[`Row`](../type-aliases/Row.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n`boolean`\n"
  },
  {
    "path": "docs/reference/functions/isSubRowSelected.md",
    "content": "---\nid: isSubRowSelected\ntitle: isSubRowSelected\n---\n\n# Function: isSubRowSelected()\n\n```ts\nfunction isSubRowSelected<TFeatures, TData>(row): boolean | \"some\" | \"all\";\n```\n\nDefined in: [features/row-selection/rowSelectionFeature.utils.ts:425](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L425)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### row\n\n[`Row`](../type-aliases/Row.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n`boolean` \\| `\"some\"` \\| `\"all\"`\n"
  },
  {
    "path": "docs/reference/functions/isTouchStartEvent.md",
    "content": "---\nid: isTouchStartEvent\ntitle: isTouchStartEvent\n---\n\n# Function: isTouchStartEvent()\n\n```ts\nfunction isTouchStartEvent(e): e is TouchEvent;\n```\n\nDefined in: [features/column-resizing/columnResizingFeature.utils.ts:263](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.utils.ts#L263)\n\n## Parameters\n\n### e\n\n`unknown`\n\n## Returns\n\n`e is TouchEvent`\n"
  },
  {
    "path": "docs/reference/functions/makeStateUpdater.md",
    "content": "---\nid: makeStateUpdater\ntitle: makeStateUpdater\n---\n\n# Function: makeStateUpdater()\n\n```ts\nfunction makeStateUpdater<TFeatures, K>(key, instance): (updater) => void;\n```\n\nDefined in: [utils.ts:14](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L14)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### K\n\n`K` *extends* `string` \\| `number` \\| `symbol` \\| `string` & `object`\n\n## Parameters\n\n### key\n\n`K`\n\n### instance\n\n[`Table`](../type-aliases/Table.md)\\<`TFeatures`, `any`\\>\n\n## Returns\n\n```ts\n(updater): void;\n```\n\n### Parameters\n\n#### updater\n\n`any`\n\n### Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/functions/memo.md",
    "content": "---\nid: memo\ntitle: memo\n---\n\n# Function: memo()\n\n```ts\nfunction memo<TDeps, TDepArgs, TResult>(__namedParameters): (depArgs?) => TResult;\n```\n\nDefined in: [utils.ts:87](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L87)\n\n## Type Parameters\n\n### TDeps\n\n`TDeps` *extends* readonly `any`[]\n\n### TDepArgs\n\n`TDepArgs`\n\n### TResult\n\n`TResult`\n\n## Parameters\n\n### \\_\\_namedParameters\n\n`MemoOptions`\\<`TDeps`, `TDepArgs`, `TResult`\\>\n\n## Returns\n\n```ts\n(depArgs?): TResult;\n```\n\n### Parameters\n\n#### depArgs?\n\n`TDepArgs`\n\n### Returns\n\n`TResult`\n"
  },
  {
    "path": "docs/reference/functions/noop.md",
    "content": "---\nid: noop\ntitle: noop\n---\n\n# Function: noop()\n\n```ts\nfunction noop(): void;\n```\n\nDefined in: [utils.ts:12](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L12)\n\n## Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/functions/orderColumns.md",
    "content": "---\nid: orderColumns\ntitle: orderColumns\n---\n\n# Function: orderColumns()\n\n```ts\nfunction orderColumns<TFeatures, TData>(table, leafColumns): Column_Internal<TFeatures, TData, unknown>[];\n```\n\nDefined in: [features/column-ordering/columnOrderingFeature.utils.ts:106](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.utils.ts#L106)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n### leafColumns\n\n[`Column_Internal`](../type-aliases/Column_Internal.md)\\<`TFeatures`, `TData`, `unknown`\\>[]\n\n## Returns\n\n[`Column_Internal`](../type-aliases/Column_Internal.md)\\<`TFeatures`, `TData`, `unknown`\\>[]\n"
  },
  {
    "path": "docs/reference/functions/passiveEventSupported.md",
    "content": "---\nid: passiveEventSupported\ntitle: passiveEventSupported\n---\n\n# Function: passiveEventSupported()\n\n```ts\nfunction passiveEventSupported(): boolean;\n```\n\nDefined in: [features/column-resizing/columnResizingFeature.utils.ts:238](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.utils.ts#L238)\n\n## Returns\n\n`boolean`\n"
  },
  {
    "path": "docs/reference/functions/row_getAllCells.md",
    "content": "---\nid: row_getAllCells\ntitle: row_getAllCells\n---\n\n# Function: row\\_getAllCells()\n\n```ts\nfunction row_getAllCells<TFeatures, TData>(row): Cell<TFeatures, TData, unknown>[];\n```\n\nDefined in: [core/rows/coreRowsFeature.utils.ts:92](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.utils.ts#L92)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### row\n\n[`Row`](../type-aliases/Row.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n[`Cell`](../type-aliases/Cell.md)\\<`TFeatures`, `TData`, `unknown`\\>[]\n"
  },
  {
    "path": "docs/reference/functions/row_getAllCellsByColumnId.md",
    "content": "---\nid: row_getAllCellsByColumnId\ntitle: row_getAllCellsByColumnId\n---\n\n# Function: row\\_getAllCellsByColumnId()\n\n```ts\nfunction row_getAllCellsByColumnId<TFeatures, TData>(row): Record<string, Cell<TFeatures, TData, unknown>>;\n```\n\nDefined in: [core/rows/coreRowsFeature.utils.ts:101](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.utils.ts#L101)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### row\n\n[`Row`](../type-aliases/Row.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n`Record`\\<`string`, [`Cell`](../type-aliases/Cell.md)\\<`TFeatures`, `TData`, `unknown`\\>\\>\n"
  },
  {
    "path": "docs/reference/functions/row_getAllVisibleCells.md",
    "content": "---\nid: row_getAllVisibleCells\ntitle: row_getAllVisibleCells\n---\n\n# Function: row\\_getAllVisibleCells()\n\n```ts\nfunction row_getAllVisibleCells<TFeatures, TData>(row): Cell<TFeatures, TData, unknown>[];\n```\n\nDefined in: [features/column-visibility/columnVisibilityFeature.utils.ts:68](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L68)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### row\n\n[`Row`](../type-aliases/Row.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n[`Cell`](../type-aliases/Cell.md)\\<`TFeatures`, `TData`, `unknown`\\>[]\n"
  },
  {
    "path": "docs/reference/functions/row_getCanExpand.md",
    "content": "---\nid: row_getCanExpand\ntitle: row_getCanExpand\n---\n\n# Function: row\\_getCanExpand()\n\n```ts\nfunction row_getCanExpand<TFeatures, TData>(row): boolean;\n```\n\nDefined in: [features/row-expanding/rowExpandingFeature.utils.ts:172](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L172)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### row\n\n[`Row`](../type-aliases/Row.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n`boolean`\n"
  },
  {
    "path": "docs/reference/functions/row_getCanMultiSelect.md",
    "content": "---\nid: row_getCanMultiSelect\ntitle: row_getCanMultiSelect\n---\n\n# Function: row\\_getCanMultiSelect()\n\n```ts\nfunction row_getCanMultiSelect<TFeatures, TData>(row): boolean;\n```\n\nDefined in: [features/row-selection/rowSelectionFeature.utils.ts:319](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L319)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### row\n\n[`Row`](../type-aliases/Row.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n`boolean`\n"
  },
  {
    "path": "docs/reference/functions/row_getCanPin.md",
    "content": "---\nid: row_getCanPin\ntitle: row_getCanPin\n---\n\n# Function: row\\_getCanPin()\n\n```ts\nfunction row_getCanPin<TFeatures, TData>(row): boolean;\n```\n\nDefined in: [features/row-pinning/rowPinningFeature.utils.ts:119](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts#L119)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### row\n\n[`Row`](../type-aliases/Row.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n`boolean`\n"
  },
  {
    "path": "docs/reference/functions/row_getCanSelect.md",
    "content": "---\nid: row_getCanSelect\ntitle: row_getCanSelect\n---\n\n# Function: row\\_getCanSelect()\n\n```ts\nfunction row_getCanSelect<TFeatures, TData>(row): boolean;\n```\n\nDefined in: [features/row-selection/rowSelectionFeature.utils.ts:295](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L295)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### row\n\n[`Row`](../type-aliases/Row.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n`boolean`\n"
  },
  {
    "path": "docs/reference/functions/row_getCanSelectSubRows.md",
    "content": "---\nid: row_getCanSelectSubRows\ntitle: row_getCanSelectSubRows\n---\n\n# Function: row\\_getCanSelectSubRows()\n\n```ts\nfunction row_getCanSelectSubRows<TFeatures, TData>(row): boolean;\n```\n\nDefined in: [features/row-selection/rowSelectionFeature.utils.ts:307](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L307)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### row\n\n[`Row`](../type-aliases/Row.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n`boolean`\n"
  },
  {
    "path": "docs/reference/functions/row_getCenterVisibleCells.md",
    "content": "---\nid: row_getCenterVisibleCells\ntitle: row_getCenterVisibleCells\n---\n\n# Function: row\\_getCenterVisibleCells()\n\n```ts\nfunction row_getCenterVisibleCells<TFeatures, TData>(row): any[];\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.utils.ts:118](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L118)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### row\n\n[`Row`](../type-aliases/Row.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n`any`[]\n"
  },
  {
    "path": "docs/reference/functions/row_getGroupingValue.md",
    "content": "---\nid: row_getGroupingValue\ntitle: row_getGroupingValue\n---\n\n# Function: row\\_getGroupingValue()\n\n```ts\nfunction row_getGroupingValue<TFeatures, TData>(row, columnId): any;\n```\n\nDefined in: [features/column-grouping/columnGroupingFeature.utils.ts:137](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L137)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### row\n\n[`Row_Core`](../interfaces/Row_Core.md)\\<`TFeatures`, `TData`\\> & [`UnionToIntersection`](../type-aliases/UnionToIntersection.md)\\<\n  \\| `\"columnFilteringFeature\"` *extends* keyof `TFeatures` ? [`Row_ColumnFiltering`](../interfaces/Row_ColumnFiltering.md)\\<`TFeatures`, `TData`\\> : `never`\n  \\| `\"columnGroupingFeature\"` *extends* keyof `TFeatures` ? [`Row_ColumnGrouping`](../interfaces/Row_ColumnGrouping.md) : `never`\n  \\| `\"columnPinningFeature\"` *extends* keyof `TFeatures` ? [`Row_ColumnPinning`](../interfaces/Row_ColumnPinning.md)\\<`TFeatures`, `TData`\\> : `never`\n  \\| `\"columnVisibilityFeature\"` *extends* keyof `TFeatures` ? [`Row_ColumnVisibility`](../interfaces/Row_ColumnVisibility.md)\\<`TFeatures`, `TData`\\> : `never`\n  \\| `\"rowExpandingFeature\"` *extends* keyof `TFeatures` ? [`Row_RowExpanding`](../interfaces/Row_RowExpanding.md) : `never`\n  \\| `\"rowPinningFeature\"` *extends* keyof `TFeatures` ? [`Row_RowPinning`](../interfaces/Row_RowPinning.md) : `never`\n  \\| `\"rowSelectionFeature\"` *extends* keyof `TFeatures` ? [`Row_RowSelection`](../interfaces/Row_RowSelection.md) : `never`\\> & [`UnionToIntersection`](../type-aliases/UnionToIntersection.md)\\<\\{ \\[K in string \\| number \\| symbol\\]: TFeatures\\[K\\] extends TableFeature\\<FeatureConstructorOptions\\> ? \"Row\" extends keyof FeatureConstructorOptions ? FeatureConstructorOptions\\[keyof FeatureConstructorOptions & \"Row\"\\] : never : any \\}\\[keyof `TFeatures`\\]\\> & [`Row_Plugins`](../interfaces/Row_Plugins.md)\\<`TFeatures`, `TData`\\> & `Partial`\\<[`Row_ColumnGrouping`](../interfaces/Row_ColumnGrouping.md)\\>\n\n### columnId\n\n`string`\n\n## Returns\n\n`any`\n"
  },
  {
    "path": "docs/reference/functions/row_getIsAllParentsExpanded.md",
    "content": "---\nid: row_getIsAllParentsExpanded\ntitle: row_getIsAllParentsExpanded\n---\n\n# Function: row\\_getIsAllParentsExpanded()\n\n```ts\nfunction row_getIsAllParentsExpanded<TFeatures, TData>(row): boolean;\n```\n\nDefined in: [features/row-expanding/rowExpandingFeature.utils.ts:182](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L182)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### row\n\n[`Row`](../type-aliases/Row.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n`boolean`\n"
  },
  {
    "path": "docs/reference/functions/row_getIsAllSubRowsSelected.md",
    "content": "---\nid: row_getIsAllSubRowsSelected\ntitle: row_getIsAllSubRowsSelected\n---\n\n# Function: row\\_getIsAllSubRowsSelected()\n\n```ts\nfunction row_getIsAllSubRowsSelected<TFeatures, TData>(row): boolean;\n```\n\nDefined in: [features/row-selection/rowSelectionFeature.utils.ts:288](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L288)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### row\n\n[`Row`](../type-aliases/Row.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n`boolean`\n"
  },
  {
    "path": "docs/reference/functions/row_getIsExpanded.md",
    "content": "---\nid: row_getIsExpanded\ntitle: row_getIsExpanded\n---\n\n# Function: row\\_getIsExpanded()\n\n```ts\nfunction row_getIsExpanded<TFeatures, TData>(row): boolean;\n```\n\nDefined in: [features/row-expanding/rowExpandingFeature.utils.ts:160](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L160)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### row\n\n[`Row`](../type-aliases/Row.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n`boolean`\n"
  },
  {
    "path": "docs/reference/functions/row_getIsGrouped.md",
    "content": "---\nid: row_getIsGrouped\ntitle: row_getIsGrouped\n---\n\n# Function: row\\_getIsGrouped()\n\n```ts\nfunction row_getIsGrouped<TFeatures, TData>(row): boolean;\n```\n\nDefined in: [features/column-grouping/columnGroupingFeature.utils.ts:130](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L130)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### row\n\n[`Row_Core`](../interfaces/Row_Core.md)\\<`TFeatures`, `TData`\\> & [`UnionToIntersection`](../type-aliases/UnionToIntersection.md)\\<\n  \\| `\"columnFilteringFeature\"` *extends* keyof `TFeatures` ? [`Row_ColumnFiltering`](../interfaces/Row_ColumnFiltering.md)\\<`TFeatures`, `TData`\\> : `never`\n  \\| `\"columnGroupingFeature\"` *extends* keyof `TFeatures` ? [`Row_ColumnGrouping`](../interfaces/Row_ColumnGrouping.md) : `never`\n  \\| `\"columnPinningFeature\"` *extends* keyof `TFeatures` ? [`Row_ColumnPinning`](../interfaces/Row_ColumnPinning.md)\\<`TFeatures`, `TData`\\> : `never`\n  \\| `\"columnVisibilityFeature\"` *extends* keyof `TFeatures` ? [`Row_ColumnVisibility`](../interfaces/Row_ColumnVisibility.md)\\<`TFeatures`, `TData`\\> : `never`\n  \\| `\"rowExpandingFeature\"` *extends* keyof `TFeatures` ? [`Row_RowExpanding`](../interfaces/Row_RowExpanding.md) : `never`\n  \\| `\"rowPinningFeature\"` *extends* keyof `TFeatures` ? [`Row_RowPinning`](../interfaces/Row_RowPinning.md) : `never`\n  \\| `\"rowSelectionFeature\"` *extends* keyof `TFeatures` ? [`Row_RowSelection`](../interfaces/Row_RowSelection.md) : `never`\\> & [`UnionToIntersection`](../type-aliases/UnionToIntersection.md)\\<\\{ \\[K in string \\| number \\| symbol\\]: TFeatures\\[K\\] extends TableFeature\\<FeatureConstructorOptions\\> ? \"Row\" extends keyof FeatureConstructorOptions ? FeatureConstructorOptions\\[keyof FeatureConstructorOptions & \"Row\"\\] : never : any \\}\\[keyof `TFeatures`\\]\\> & [`Row_Plugins`](../interfaces/Row_Plugins.md)\\<`TFeatures`, `TData`\\> & `Partial`\\<[`Row_ColumnGrouping`](../interfaces/Row_ColumnGrouping.md)\\>\n\n## Returns\n\n`boolean`\n"
  },
  {
    "path": "docs/reference/functions/row_getIsPinned.md",
    "content": "---\nid: row_getIsPinned\ntitle: row_getIsPinned\n---\n\n# Function: row\\_getIsPinned()\n\n```ts\nfunction row_getIsPinned<TFeatures, TData>(row): RowPinningPosition;\n```\n\nDefined in: [features/row-pinning/rowPinningFeature.utils.ts:130](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts#L130)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### row\n\n[`Row`](../type-aliases/Row.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n[`RowPinningPosition`](../type-aliases/RowPinningPosition.md)\n"
  },
  {
    "path": "docs/reference/functions/row_getIsSelected.md",
    "content": "---\nid: row_getIsSelected\ntitle: row_getIsSelected\n---\n\n# Function: row\\_getIsSelected()\n\n```ts\nfunction row_getIsSelected<TFeatures, TData>(row): boolean;\n```\n\nDefined in: [features/row-selection/rowSelectionFeature.utils.ts:274](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L274)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### row\n\n[`Row`](../type-aliases/Row.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n`boolean`\n"
  },
  {
    "path": "docs/reference/functions/row_getIsSomeSelected.md",
    "content": "---\nid: row_getIsSomeSelected\ntitle: row_getIsSomeSelected\n---\n\n# Function: row\\_getIsSomeSelected()\n\n```ts\nfunction row_getIsSomeSelected<TFeatures, TData>(row): boolean;\n```\n\nDefined in: [features/row-selection/rowSelectionFeature.utils.ts:281](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L281)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### row\n\n[`Row`](../type-aliases/Row.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n`boolean`\n"
  },
  {
    "path": "docs/reference/functions/row_getLeafRows.md",
    "content": "---\nid: row_getLeafRows\ntitle: row_getLeafRows\n---\n\n# Function: row\\_getLeafRows()\n\n```ts\nfunction row_getLeafRows<TFeatures, TData>(row): Row<TFeatures, TData>[];\n```\n\nDefined in: [core/rows/coreRowsFeature.utils.ts:62](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.utils.ts#L62)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### row\n\n[`Row`](../type-aliases/Row.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n[`Row`](../type-aliases/Row.md)\\<`TFeatures`, `TData`\\>[]\n"
  },
  {
    "path": "docs/reference/functions/row_getLeftVisibleCells.md",
    "content": "---\nid: row_getLeftVisibleCells\ntitle: row_getLeftVisibleCells\n---\n\n# Function: row\\_getLeftVisibleCells()\n\n```ts\nfunction row_getLeftVisibleCells<TFeatures, TData>(row): Cell<TFeatures, TData, unknown>[];\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.utils.ts:133](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L133)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### row\n\n[`Row`](../type-aliases/Row.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n[`Cell`](../type-aliases/Cell.md)\\<`TFeatures`, `TData`, `unknown`\\>[]\n"
  },
  {
    "path": "docs/reference/functions/row_getParentRow.md",
    "content": "---\nid: row_getParentRow\ntitle: row_getParentRow\n---\n\n# Function: row\\_getParentRow()\n\n```ts\nfunction row_getParentRow<TFeatures, TData>(row): Row<TFeatures, TData> | undefined;\n```\n\nDefined in: [core/rows/coreRowsFeature.utils.ts:69](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.utils.ts#L69)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### row\n\n[`Row`](../type-aliases/Row.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n[`Row`](../type-aliases/Row.md)\\<`TFeatures`, `TData`\\> \\| `undefined`\n"
  },
  {
    "path": "docs/reference/functions/row_getParentRows.md",
    "content": "---\nid: row_getParentRows\ntitle: row_getParentRows\n---\n\n# Function: row\\_getParentRows()\n\n```ts\nfunction row_getParentRows<TFeatures, TData>(row): Row<TFeatures, TData>[];\n```\n\nDefined in: [core/rows/coreRowsFeature.utils.ts:76](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.utils.ts#L76)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### row\n\n[`Row`](../type-aliases/Row.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n[`Row`](../type-aliases/Row.md)\\<`TFeatures`, `TData`\\>[]\n"
  },
  {
    "path": "docs/reference/functions/row_getPinnedIndex.md",
    "content": "---\nid: row_getPinnedIndex\ntitle: row_getPinnedIndex\n---\n\n# Function: row\\_getPinnedIndex()\n\n```ts\nfunction row_getPinnedIndex<TFeatures, TData>(row): number;\n```\n\nDefined in: [features/row-pinning/rowPinningFeature.utils.ts:144](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts#L144)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### row\n\n[`Row`](../type-aliases/Row.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n`number`\n"
  },
  {
    "path": "docs/reference/functions/row_getRightVisibleCells.md",
    "content": "---\nid: row_getRightVisibleCells\ntitle: row_getRightVisibleCells\n---\n\n# Function: row\\_getRightVisibleCells()\n\n```ts\nfunction row_getRightVisibleCells<TFeatures, TData>(row): any;\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.utils.ts:154](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L154)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### row\n\n[`Row`](../type-aliases/Row.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n`any`\n"
  },
  {
    "path": "docs/reference/functions/row_getToggleExpandedHandler.md",
    "content": "---\nid: row_getToggleExpandedHandler\ntitle: row_getToggleExpandedHandler\n---\n\n# Function: row\\_getToggleExpandedHandler()\n\n```ts\nfunction row_getToggleExpandedHandler<TFeatures, TData>(row): () => void;\n```\n\nDefined in: [features/row-expanding/rowExpandingFeature.utils.ts:197](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L197)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### row\n\n[`Row`](../type-aliases/Row.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n```ts\n(): void;\n```\n\n### Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/functions/row_getToggleSelectedHandler.md",
    "content": "---\nid: row_getToggleSelectedHandler\ntitle: row_getToggleSelectedHandler\n---\n\n# Function: row\\_getToggleSelectedHandler()\n\n```ts\nfunction row_getToggleSelectedHandler<TFeatures, TData>(row): (e) => void;\n```\n\nDefined in: [features/row-selection/rowSelectionFeature.utils.ts:331](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L331)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### row\n\n[`Row`](../type-aliases/Row.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n```ts\n(e): void;\n```\n\n### Parameters\n\n#### e\n\n`unknown`\n\n### Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/functions/row_getUniqueValues.md",
    "content": "---\nid: row_getUniqueValues\ntitle: row_getUniqueValues\n---\n\n# Function: row\\_getUniqueValues()\n\n```ts\nfunction row_getUniqueValues<TFeatures, TData>(row, columnId): unknown;\n```\n\nDefined in: [core/rows/coreRowsFeature.utils.ts:28](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.utils.ts#L28)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### row\n\n[`Row`](../type-aliases/Row.md)\\<`TFeatures`, `TData`\\>\n\n### columnId\n\n`string`\n\n## Returns\n\n`unknown`\n"
  },
  {
    "path": "docs/reference/functions/row_getValue.md",
    "content": "---\nid: row_getValue\ntitle: row_getValue\n---\n\n# Function: row\\_getValue()\n\n```ts\nfunction row_getValue<TFeatures, TData>(row, columnId): unknown;\n```\n\nDefined in: [core/rows/coreRowsFeature.utils.ts:9](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.utils.ts#L9)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### row\n\n[`Row`](../type-aliases/Row.md)\\<`TFeatures`, `TData`\\>\n\n### columnId\n\n`string`\n\n## Returns\n\n`unknown`\n"
  },
  {
    "path": "docs/reference/functions/row_getVisibleCells.md",
    "content": "---\nid: row_getVisibleCells\ntitle: row_getVisibleCells\n---\n\n# Function: row\\_getVisibleCells()\n\n```ts\nfunction row_getVisibleCells<TFeatures, TData>(\n   left, \n   center, \n   right): Cell<TFeatures, TData, unknown>[];\n```\n\nDefined in: [features/column-visibility/columnVisibilityFeature.utils.ts:79](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L79)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### left\n\n[`Cell`](../type-aliases/Cell.md)\\<`TFeatures`, `TData`, `unknown`\\>[]\n\n### center\n\n[`Cell`](../type-aliases/Cell.md)\\<`TFeatures`, `TData`, `unknown`\\>[]\n\n### right\n\n[`Cell`](../type-aliases/Cell.md)\\<`TFeatures`, `TData`, `unknown`\\>[]\n\n## Returns\n\n[`Cell`](../type-aliases/Cell.md)\\<`TFeatures`, `TData`, `unknown`\\>[]\n"
  },
  {
    "path": "docs/reference/functions/row_pin.md",
    "content": "---\nid: row_pin\ntitle: row_pin\n---\n\n# Function: row\\_pin()\n\n```ts\nfunction row_pin<TFeatures, TData>(\n   row, \n   position, \n   includeLeafRows?, \n   includeParentRows?): void;\n```\n\nDefined in: [features/row-pinning/rowPinningFeature.utils.ts:160](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts#L160)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### row\n\n[`Row`](../type-aliases/Row.md)\\<`TFeatures`, `TData`\\>\n\n### position\n\n[`RowPinningPosition`](../type-aliases/RowPinningPosition.md)\n\n### includeLeafRows?\n\n`boolean`\n\n### includeParentRows?\n\n`boolean`\n\n## Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/functions/row_renderValue.md",
    "content": "---\nid: row_renderValue\ntitle: row_renderValue\n---\n\n# Function: row\\_renderValue()\n\n```ts\nfunction row_renderValue<TFeatures, TData>(row, columnId): any;\n```\n\nDefined in: [core/rows/coreRowsFeature.utils.ts:55](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.utils.ts#L55)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### row\n\n[`Row`](../type-aliases/Row.md)\\<`TFeatures`, `TData`\\>\n\n### columnId\n\n`string`\n\n## Returns\n\n`any`\n"
  },
  {
    "path": "docs/reference/functions/row_toggleExpanded.md",
    "content": "---\nid: row_toggleExpanded\ntitle: row_toggleExpanded\n---\n\n# Function: row\\_toggleExpanded()\n\n```ts\nfunction row_toggleExpanded<TFeatures, TData>(row, expanded?): void;\n```\n\nDefined in: [features/row-expanding/rowExpandingFeature.utils.ts:125](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L125)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### row\n\n[`Row`](../type-aliases/Row.md)\\<`TFeatures`, `TData`\\>\n\n### expanded?\n\n`boolean`\n\n## Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/functions/row_toggleSelected.md",
    "content": "---\nid: row_toggleSelected\ntitle: row_toggleSelected\n---\n\n# Function: row\\_toggleSelected()\n\n```ts\nfunction row_toggleSelected<TFeatures, TData>(\n   row, \n   value?, \n   opts?): void;\n```\n\nDefined in: [features/row-selection/rowSelectionFeature.utils.ts:241](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L241)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### row\n\n[`Row`](../type-aliases/Row.md)\\<`TFeatures`, `TData`\\>\n\n### value?\n\n`boolean`\n\n### opts?\n\n#### selectChildren?\n\n`boolean`\n\n## Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/functions/selectRowsFn.md",
    "content": "---\nid: selectRowsFn\ntitle: selectRowsFn\n---\n\n# Function: selectRowsFn()\n\n```ts\nfunction selectRowsFn<TFeatures, TData>(rowModel): RowModel<TFeatures, TData>;\n```\n\nDefined in: [features/row-selection/rowSelectionFeature.utils.ts:376](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L376)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### rowModel\n\n[`RowModel`](../interfaces/RowModel.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n[`RowModel`](../interfaces/RowModel.md)\\<`TFeatures`, `TData`\\>\n"
  },
  {
    "path": "docs/reference/functions/shouldAutoRemoveFilter.md",
    "content": "---\nid: shouldAutoRemoveFilter\ntitle: shouldAutoRemoveFilter\n---\n\n# Function: shouldAutoRemoveFilter()\n\n```ts\nfunction shouldAutoRemoveFilter<TFeatures, TData, TValue>(\n   filterFn?, \n   value?, \n   column?): boolean;\n```\n\nDefined in: [features/column-filtering/columnFilteringFeature.utils.ts:194](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.utils.ts#L194)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n## Parameters\n\n### filterFn?\n\n[`FilterFn`](../interfaces/FilterFn.md)\\<`TFeatures`, `TData`\\>\n\n### value?\n\n`any`\n\n### column?\n\n[`Column_Internal`](../type-aliases/Column_Internal.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n## Returns\n\n`boolean`\n"
  },
  {
    "path": "docs/reference/functions/tableFeatures.md",
    "content": "---\nid: tableFeatures\ntitle: tableFeatures\n---\n\n# Function: tableFeatures()\n\n```ts\nfunction tableFeatures<TFeatures>(features): TFeatures;\n```\n\nDefined in: [helpers/tableFeatures.ts:14](https://github.com/TanStack/table/blob/main/packages/table-core/src/helpers/tableFeatures.ts#L14)\n\nA helper function to help define the features that are to be imported and applied to a table instance.\nUse this utility to make it easier to have the correct type inference for the features that are being imported.\n**Note:** It is recommended to use this utility statically outside of a component.\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n## Parameters\n\n### features\n\n`TFeatures`\n\n## Returns\n\n`TFeatures`\n\n## Example\n\n```\nimport { tableFeatures, columnVisibilityFeature, rowPinningFeature } from '@tanstack/react-table'\nconst _features = tableFeatures({ columnVisibilityFeature, rowPinningFeature });\nconst table = useTable({ _features, rowModels: {}, columns, data });\n```\n"
  },
  {
    "path": "docs/reference/functions/tableMemo.md",
    "content": "---\nid: tableMemo\ntitle: tableMemo\n---\n\n# Function: tableMemo()\n\n```ts\nfunction tableMemo<TFeatures, TDeps, TDepArgs, TResult>(__namedParameters): (depArgs?) => TResult;\n```\n\nDefined in: [utils.ts:148](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L148)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TDeps\n\n`TDeps` *extends* readonly `any`[]\n\n### TDepArgs\n\n`TDepArgs`\n\n### TResult\n\n`TResult`\n\n## Parameters\n\n### \\_\\_namedParameters\n\n`TableMemoOptions`\\<`TFeatures`, `TDeps`, `TDepArgs`, `TResult`\\>\n\n## Returns\n\n```ts\n(depArgs?): TResult;\n```\n\n### Parameters\n\n#### depArgs?\n\n`TDepArgs`\n\n### Returns\n\n`TResult`\n"
  },
  {
    "path": "docs/reference/functions/tableOptions.md",
    "content": "---\nid: tableOptions\ntitle: tableOptions\n---\n\n# Function: tableOptions()\n\n## Call Signature\n\n```ts\nfunction tableOptions<TFeatures, TData>(options): Omit<TableOptions<TFeatures, TData>, \"_features\" | \"columns\"> & object;\n```\n\nDefined in: [helpers/tableOptions.ts:5](https://github.com/TanStack/table/blob/main/packages/table-core/src/helpers/tableOptions.ts#L5)\n\n### Type Parameters\n\n#### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n#### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md) = `any`\n\n### Parameters\n\n#### options\n\n`Omit`\\<[`TableOptions`](../type-aliases/TableOptions.md)\\<`TFeatures`, `TData`\\>, `\"columns\"`\\> & `object`\n\n### Returns\n\n`Omit`\\<[`TableOptions`](../type-aliases/TableOptions.md)\\<`TFeatures`, `TData`\\>, `\"_features\"` \\| `\"columns\"`\\> & `object`\n\n## Call Signature\n\n```ts\nfunction tableOptions<TFeatures, TData>(options): Omit<TableOptions<TFeatures, TData>, \"_features\" | \"data\"> & object;\n```\n\nDefined in: [helpers/tableOptions.ts:16](https://github.com/TanStack/table/blob/main/packages/table-core/src/helpers/tableOptions.ts#L16)\n\n### Type Parameters\n\n#### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n#### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md) = `any`\n\n### Parameters\n\n#### options\n\n`Omit`\\<[`TableOptions`](../type-aliases/TableOptions.md)\\<`TFeatures`, `TData`\\>, `\"data\"`\\> & `object`\n\n### Returns\n\n`Omit`\\<[`TableOptions`](../type-aliases/TableOptions.md)\\<`TFeatures`, `TData`\\>, `\"_features\"` \\| `\"data\"`\\> & `object`\n\n## Call Signature\n\n```ts\nfunction tableOptions<TFeatures, TData>(options): Omit<TableOptions<TFeatures, TData>, \"_features\">;\n```\n\nDefined in: [helpers/tableOptions.ts:27](https://github.com/TanStack/table/blob/main/packages/table-core/src/helpers/tableOptions.ts#L27)\n\n### Type Parameters\n\n#### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n#### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md) = `any`\n\n### Parameters\n\n#### options\n\n`Omit`\\<[`TableOptions`](../type-aliases/TableOptions.md)\\<`TFeatures`, `TData`\\>, `\"_features\"`\\>\n\n### Returns\n\n`Omit`\\<[`TableOptions`](../type-aliases/TableOptions.md)\\<`TFeatures`, `TData`\\>, `\"_features\"`\\>\n\n## Call Signature\n\n```ts\nfunction tableOptions<TFeatures, TData>(options): Omit<TableOptions<TFeatures, TData>, \"_features\" | \"data\" | \"columns\"> & object;\n```\n\nDefined in: [helpers/tableOptions.ts:34](https://github.com/TanStack/table/blob/main/packages/table-core/src/helpers/tableOptions.ts#L34)\n\n### Type Parameters\n\n#### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n#### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md) = `any`\n\n### Parameters\n\n#### options\n\n`Omit`\\<[`TableOptions`](../type-aliases/TableOptions.md)\\<`TFeatures`, `TData`\\>, `\"data\"` \\| `\"columns\"`\\> & `object`\n\n### Returns\n\n`Omit`\\<[`TableOptions`](../type-aliases/TableOptions.md)\\<`TFeatures`, `TData`\\>, `\"_features\"` \\| `\"data\"` \\| `\"columns\"`\\> & `object`\n\n## Call Signature\n\n```ts\nfunction tableOptions<TFeatures, TData>(options): Omit<TableOptions<TFeatures, TData>, \"data\" | \"_features\">;\n```\n\nDefined in: [helpers/tableOptions.ts:45](https://github.com/TanStack/table/blob/main/packages/table-core/src/helpers/tableOptions.ts#L45)\n\n### Type Parameters\n\n#### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n#### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md) = `any`\n\n### Parameters\n\n#### options\n\n`Omit`\\<[`TableOptions`](../type-aliases/TableOptions.md)\\<`TFeatures`, `TData`\\>, `\"data\"` \\| `\"_features\"`\\>\n\n### Returns\n\n`Omit`\\<[`TableOptions`](../type-aliases/TableOptions.md)\\<`TFeatures`, `TData`\\>, `\"data\"` \\| `\"_features\"`\\>\n\n## Call Signature\n\n```ts\nfunction tableOptions<TFeatures, TData>(options): Omit<TableOptions<TFeatures, TData>, \"columns\" | \"_features\">;\n```\n\nDefined in: [helpers/tableOptions.ts:52](https://github.com/TanStack/table/blob/main/packages/table-core/src/helpers/tableOptions.ts#L52)\n\n### Type Parameters\n\n#### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n#### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md) = `any`\n\n### Parameters\n\n#### options\n\n`Omit`\\<[`TableOptions`](../type-aliases/TableOptions.md)\\<`TFeatures`, `TData`\\>, `\"columns\"` \\| `\"_features\"`\\>\n\n### Returns\n\n`Omit`\\<[`TableOptions`](../type-aliases/TableOptions.md)\\<`TFeatures`, `TData`\\>, `\"columns\"` \\| `\"_features\"`\\>\n\n## Call Signature\n\n```ts\nfunction tableOptions<TFeatures, TData>(options): Omit<TableOptions<TFeatures, TData>, \"data\" | \"columns\" | \"_features\">;\n```\n\nDefined in: [helpers/tableOptions.ts:59](https://github.com/TanStack/table/blob/main/packages/table-core/src/helpers/tableOptions.ts#L59)\n\n### Type Parameters\n\n#### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n#### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md) = `any`\n\n### Parameters\n\n#### options\n\n`Omit`\\<[`TableOptions`](../type-aliases/TableOptions.md)\\<`TFeatures`, `TData`\\>, `\"data\"` \\| `\"columns\"` \\| `\"_features\"`\\>\n\n### Returns\n\n`Omit`\\<[`TableOptions`](../type-aliases/TableOptions.md)\\<`TFeatures`, `TData`\\>, `\"data\"` \\| `\"columns\"` \\| `\"_features\"`\\>\n\n## Call Signature\n\n```ts\nfunction tableOptions<TFeatures, TData>(options): TableOptions<TFeatures, TData>;\n```\n\nDefined in: [helpers/tableOptions.ts:69](https://github.com/TanStack/table/blob/main/packages/table-core/src/helpers/tableOptions.ts#L69)\n\n### Type Parameters\n\n#### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n#### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md) = `any`\n\n### Parameters\n\n#### options\n\n[`TableOptions`](../type-aliases/TableOptions.md)\\<`TFeatures`, `TData`\\>\n\n### Returns\n\n[`TableOptions`](../type-aliases/TableOptions.md)\\<`TFeatures`, `TData`\\>\n"
  },
  {
    "path": "docs/reference/functions/table_autoResetExpanded.md",
    "content": "---\nid: table_autoResetExpanded\ntitle: table_autoResetExpanded\n---\n\n# Function: table\\_autoResetExpanded()\n\n```ts\nfunction table_autoResetExpanded<TFeatures, TData>(table): void;\n```\n\nDefined in: [features/row-expanding/rowExpandingFeature.utils.ts:14](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L14)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/functions/table_autoResetPageIndex.md",
    "content": "---\nid: table_autoResetPageIndex\ntitle: table_autoResetPageIndex\n---\n\n# Function: table\\_autoResetPageIndex()\n\n```ts\nfunction table_autoResetPageIndex<TFeatures, TData>(table): void;\n```\n\nDefined in: [features/row-pagination/rowPaginationFeature.utils.ts:17](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L17)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/functions/table_firstPage.md",
    "content": "---\nid: table_firstPage\ntitle: table_firstPage\n---\n\n# Function: table\\_firstPage()\n\n```ts\nfunction table_firstPage<TFeatures, TData>(table): void;\n```\n\nDefined in: [features/row-pagination/rowPaginationFeature.utils.ts:172](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L172)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/functions/table_getAllColumns.md",
    "content": "---\nid: table_getAllColumns\ntitle: table_getAllColumns\n---\n\n# Function: table\\_getAllColumns()\n\n```ts\nfunction table_getAllColumns<TFeatures, TData>(table): Column<TFeatures, TData, unknown>[];\n```\n\nDefined in: [core/columns/coreColumnsFeature.utils.ts:75](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.utils.ts#L75)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n[`Column`](../type-aliases/Column.md)\\<`TFeatures`, `TData`, `unknown`\\>[]\n"
  },
  {
    "path": "docs/reference/functions/table_getAllFlatColumns.md",
    "content": "---\nid: table_getAllFlatColumns\ntitle: table_getAllFlatColumns\n---\n\n# Function: table\\_getAllFlatColumns()\n\n```ts\nfunction table_getAllFlatColumns<TFeatures, TData>(table): Column<TFeatures, TData, unknown>[];\n```\n\nDefined in: [core/columns/coreColumnsFeature.utils.ts:106](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.utils.ts#L106)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n[`Column`](../type-aliases/Column.md)\\<`TFeatures`, `TData`, `unknown`\\>[]\n"
  },
  {
    "path": "docs/reference/functions/table_getAllFlatColumnsById.md",
    "content": "---\nid: table_getAllFlatColumnsById\ntitle: table_getAllFlatColumnsById\n---\n\n# Function: table\\_getAllFlatColumnsById()\n\n```ts\nfunction table_getAllFlatColumnsById<TFeatures, TData>(table): Record<string, Column<TFeatures, TData, unknown>>;\n```\n\nDefined in: [core/columns/coreColumnsFeature.utils.ts:115](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.utils.ts#L115)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n`Record`\\<`string`, [`Column`](../type-aliases/Column.md)\\<`TFeatures`, `TData`, `unknown`\\>\\>\n"
  },
  {
    "path": "docs/reference/functions/table_getAllLeafColumns.md",
    "content": "---\nid: table_getAllLeafColumns\ntitle: table_getAllLeafColumns\n---\n\n# Function: table\\_getAllLeafColumns()\n\n```ts\nfunction table_getAllLeafColumns<TFeatures, TData>(table): Column<TFeatures, TData, unknown>[];\n```\n\nDefined in: [core/columns/coreColumnsFeature.utils.ts:130](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.utils.ts#L130)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n[`Column`](../type-aliases/Column.md)\\<`TFeatures`, `TData`, `unknown`\\>[]\n"
  },
  {
    "path": "docs/reference/functions/table_getBottomRows.md",
    "content": "---\nid: table_getBottomRows\ntitle: table_getBottomRows\n---\n\n# Function: table\\_getBottomRows()\n\n```ts\nfunction table_getBottomRows<TFeatures, TData>(table): Row<TFeatures, TData>[];\n```\n\nDefined in: [features/row-pinning/rowPinningFeature.utils.ts:98](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts#L98)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n[`Row`](../type-aliases/Row.md)\\<`TFeatures`, `TData`\\>[]\n"
  },
  {
    "path": "docs/reference/functions/table_getCanNextPage.md",
    "content": "---\nid: table_getCanNextPage\ntitle: table_getCanNextPage\n---\n\n# Function: table\\_getCanNextPage()\n\n```ts\nfunction table_getCanNextPage<TFeatures, TData>(table): boolean;\n```\n\nDefined in: [features/row-pagination/rowPaginationFeature.utils.ts:137](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L137)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n`boolean`\n"
  },
  {
    "path": "docs/reference/functions/table_getCanPreviousPage.md",
    "content": "---\nid: table_getCanPreviousPage\ntitle: table_getCanPreviousPage\n---\n\n# Function: table\\_getCanPreviousPage()\n\n```ts\nfunction table_getCanPreviousPage<TFeatures, TData>(table): boolean;\n```\n\nDefined in: [features/row-pagination/rowPaginationFeature.utils.ts:130](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L130)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n`boolean`\n"
  },
  {
    "path": "docs/reference/functions/table_getCanSomeRowsExpand.md",
    "content": "---\nid: table_getCanSomeRowsExpand\ntitle: table_getCanSomeRowsExpand\n---\n\n# Function: table\\_getCanSomeRowsExpand()\n\n```ts\nfunction table_getCanSomeRowsExpand<TFeatures, TData>(table): boolean;\n```\n\nDefined in: [features/row-expanding/rowExpandingFeature.utils.ts:55](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L55)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n`boolean`\n"
  },
  {
    "path": "docs/reference/functions/table_getCenterFlatHeaders.md",
    "content": "---\nid: table_getCenterFlatHeaders\ntitle: table_getCenterFlatHeaders\n---\n\n# Function: table\\_getCenterFlatHeaders()\n\n```ts\nfunction table_getCenterFlatHeaders<TFeatures, TData>(table): any[];\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.utils.ts:347](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L347)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n`any`[]\n"
  },
  {
    "path": "docs/reference/functions/table_getCenterFooterGroups.md",
    "content": "---\nid: table_getCenterFooterGroups\ntitle: table_getCenterFooterGroups\n---\n\n# Function: table\\_getCenterFooterGroups()\n\n```ts\nfunction table_getCenterFooterGroups<TFeatures, TData>(table): any[];\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.utils.ts:301](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L301)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n`any`[]\n"
  },
  {
    "path": "docs/reference/functions/table_getCenterHeaderGroups.md",
    "content": "---\nid: table_getCenterHeaderGroups\ntitle: table_getCenterHeaderGroups\n---\n\n# Function: table\\_getCenterHeaderGroups()\n\n```ts\nfunction table_getCenterHeaderGroups<TFeatures, TData>(table): HeaderGroup<TFeatures, TData>[];\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.utils.ts:253](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L253)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n[`HeaderGroup`](../type-aliases/HeaderGroup.md)\\<`TFeatures`, `TData`\\>[]\n"
  },
  {
    "path": "docs/reference/functions/table_getCenterLeafColumns.md",
    "content": "---\nid: table_getCenterLeafColumns\ntitle: table_getCenterLeafColumns\n---\n\n# Function: table\\_getCenterLeafColumns()\n\n```ts\nfunction table_getCenterLeafColumns<TFeatures, TData>(table): Column<TFeatures, TData, unknown>[];\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.utils.ts:428](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L428)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n[`Column`](../type-aliases/Column.md)\\<`TFeatures`, `TData`, `unknown`\\>[]\n"
  },
  {
    "path": "docs/reference/functions/table_getCenterLeafHeaders.md",
    "content": "---\nid: table_getCenterLeafHeaders\ntitle: table_getCenterLeafHeaders\n---\n\n# Function: table\\_getCenterLeafHeaders()\n\n```ts\nfunction table_getCenterLeafHeaders<TFeatures, TData>(table): any[];\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.utils.ts:387](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L387)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n`any`[]\n"
  },
  {
    "path": "docs/reference/functions/table_getCenterRows.md",
    "content": "---\nid: table_getCenterRows\ntitle: table_getCenterRows\n---\n\n# Function: table\\_getCenterRows()\n\n```ts\nfunction table_getCenterRows<TFeatures, TData>(table): Row<TFeatures, TData>[];\n```\n\nDefined in: [features/row-pinning/rowPinningFeature.utils.ts:105](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts#L105)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n[`Row`](../type-aliases/Row.md)\\<`TFeatures`, `TData`\\>[]\n"
  },
  {
    "path": "docs/reference/functions/table_getCenterTotalSize.md",
    "content": "---\nid: table_getCenterTotalSize\ntitle: table_getCenterTotalSize\n---\n\n# Function: table\\_getCenterTotalSize()\n\n```ts\nfunction table_getCenterTotalSize<TFeatures, TData>(table): any;\n```\n\nDefined in: [features/column-sizing/columnSizingFeature.utils.ts:183](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts#L183)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n`any`\n"
  },
  {
    "path": "docs/reference/functions/table_getCenterVisibleLeafColumns.md",
    "content": "---\nid: table_getCenterVisibleLeafColumns\ntitle: table_getCenterVisibleLeafColumns\n---\n\n# Function: table\\_getCenterVisibleLeafColumns()\n\n```ts\nfunction table_getCenterVisibleLeafColumns<TFeatures, TData>(table): any[];\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.utils.ts:494](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L494)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n`any`[]\n"
  },
  {
    "path": "docs/reference/functions/table_getColumn.md",
    "content": "---\nid: table_getColumn\ntitle: table_getColumn\n---\n\n# Function: table\\_getColumn()\n\n```ts\nfunction table_getColumn<TFeatures, TData>(table, columnId): \n  | Column<TFeatures, TData, unknown>\n  | undefined;\n```\n\nDefined in: [core/columns/coreColumnsFeature.utils.ts:146](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.utils.ts#L146)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n### columnId\n\n`string`\n\n## Returns\n\n  \\| [`Column`](../type-aliases/Column.md)\\<`TFeatures`, `TData`, `unknown`\\>\n  \\| `undefined`\n"
  },
  {
    "path": "docs/reference/functions/table_getCoreRowModel.md",
    "content": "---\nid: table_getCoreRowModel\ntitle: table_getCoreRowModel\n---\n\n# Function: table\\_getCoreRowModel()\n\n```ts\nfunction table_getCoreRowModel<TFeatures, TData>(table): RowModel<TFeatures, TData>;\n```\n\nDefined in: [core/row-models/coreRowModelsFeature.utils.ts:7](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.utils.ts#L7)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n[`RowModel`](../interfaces/RowModel.md)\\<`TFeatures`, `TData`\\>\n"
  },
  {
    "path": "docs/reference/functions/table_getDefaultColumnDef.md",
    "content": "---\nid: table_getDefaultColumnDef\ntitle: table_getDefaultColumnDef\n---\n\n# Function: table\\_getDefaultColumnDef()\n\n```ts\nfunction table_getDefaultColumnDef<TFeatures, TData>(table): Partial<ColumnDef<TFeatures, TData, unknown>>;\n```\n\nDefined in: [core/columns/coreColumnsFeature.utils.ts:46](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.utils.ts#L46)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n`Partial`\\<[`ColumnDef`](../type-aliases/ColumnDef.md)\\<`TFeatures`, `TData`, `unknown`\\>\\>\n"
  },
  {
    "path": "docs/reference/functions/table_getExpandedDepth.md",
    "content": "---\nid: table_getExpandedDepth\ntitle: table_getExpandedDepth\n---\n\n# Function: table\\_getExpandedDepth()\n\n```ts\nfunction table_getExpandedDepth<TFeatures, TData>(table): number;\n```\n\nDefined in: [features/row-expanding/rowExpandingFeature.utils.ts:106](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L106)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n`number`\n"
  },
  {
    "path": "docs/reference/functions/table_getExpandedRowModel.md",
    "content": "---\nid: table_getExpandedRowModel\ntitle: table_getExpandedRowModel\n---\n\n# Function: table\\_getExpandedRowModel()\n\n```ts\nfunction table_getExpandedRowModel<TFeatures, TData>(table): RowModel<TFeatures, TData>;\n```\n\nDefined in: [core/row-models/coreRowModelsFeature.utils.ts:96](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.utils.ts#L96)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n[`RowModel`](../interfaces/RowModel.md)\\<`TFeatures`, `TData`\\>\n"
  },
  {
    "path": "docs/reference/functions/table_getFilteredRowModel.md",
    "content": "---\nid: table_getFilteredRowModel\ntitle: table_getFilteredRowModel\n---\n\n# Function: table\\_getFilteredRowModel()\n\n```ts\nfunction table_getFilteredRowModel<TFeatures, TData>(table): RowModel<TFeatures, TData>;\n```\n\nDefined in: [core/row-models/coreRowModelsFeature.utils.ts:27](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.utils.ts#L27)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n[`RowModel`](../interfaces/RowModel.md)\\<`TFeatures`, `TData`\\>\n"
  },
  {
    "path": "docs/reference/functions/table_getFilteredSelectedRowModel.md",
    "content": "---\nid: table_getFilteredSelectedRowModel\ntitle: table_getFilteredSelectedRowModel\n---\n\n# Function: table\\_getFilteredSelectedRowModel()\n\n```ts\nfunction table_getFilteredSelectedRowModel<TFeatures, TData>(table): RowModel<TFeatures, TData>;\n```\n\nDefined in: [features/row-selection/rowSelectionFeature.utils.ts:111](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L111)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n[`RowModel`](../interfaces/RowModel.md)\\<`TFeatures`, `TData`\\>\n"
  },
  {
    "path": "docs/reference/functions/table_getFlatHeaders.md",
    "content": "---\nid: table_getFlatHeaders\ntitle: table_getFlatHeaders\n---\n\n# Function: table\\_getFlatHeaders()\n\n```ts\nfunction table_getFlatHeaders<TFeatures, TData>(table): Header<TFeatures, TData, unknown>[];\n```\n\nDefined in: [core/headers/coreHeadersFeature.utils.ts:90](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.utils.ts#L90)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n[`Header`](../type-aliases/Header.md)\\<`TFeatures`, `TData`, `unknown`\\>[]\n"
  },
  {
    "path": "docs/reference/functions/table_getFooterGroups.md",
    "content": "---\nid: table_getFooterGroups\ntitle: table_getFooterGroups\n---\n\n# Function: table\\_getFooterGroups()\n\n```ts\nfunction table_getFooterGroups<TFeatures, TData>(table): HeaderGroup<TFeatures, TData>[];\n```\n\nDefined in: [core/headers/coreHeadersFeature.utils.ts:82](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.utils.ts#L82)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n[`HeaderGroup`](../type-aliases/HeaderGroup.md)\\<`TFeatures`, `TData`\\>[]\n"
  },
  {
    "path": "docs/reference/functions/table_getGlobalAutoFilterFn.md",
    "content": "---\nid: table_getGlobalAutoFilterFn\ntitle: table_getGlobalAutoFilterFn\n---\n\n# Function: table\\_getGlobalAutoFilterFn()\n\n```ts\nfunction table_getGlobalAutoFilterFn(): FilterFn<any, any>;\n```\n\nDefined in: [features/global-filtering/globalFilteringFeature.utils.ts:23](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.utils.ts#L23)\n\n## Returns\n\n[`FilterFn`](../interfaces/FilterFn.md)\\<`any`, `any`\\>\n"
  },
  {
    "path": "docs/reference/functions/table_getGlobalFacetedMinMaxValues.md",
    "content": "---\nid: table_getGlobalFacetedMinMaxValues\ntitle: table_getGlobalFacetedMinMaxValues\n---\n\n# Function: table\\_getGlobalFacetedMinMaxValues()\n\n```ts\nfunction table_getGlobalFacetedMinMaxValues<TFeatures, TData>(table): [number, number] | undefined;\n```\n\nDefined in: [features/column-faceting/columnFacetingFeature.utils.ts:49](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.utils.ts#L49)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n\\[`number`, `number`\\] \\| `undefined`\n"
  },
  {
    "path": "docs/reference/functions/table_getGlobalFacetedRowModel.md",
    "content": "---\nid: table_getGlobalFacetedRowModel\ntitle: table_getGlobalFacetedRowModel\n---\n\n# Function: table\\_getGlobalFacetedRowModel()\n\n```ts\nfunction table_getGlobalFacetedRowModel<TFeatures, TData>(table): RowModel<TFeatures, TData>;\n```\n\nDefined in: [features/column-faceting/columnFacetingFeature.utils.ts:59](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.utils.ts#L59)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n[`RowModel`](../interfaces/RowModel.md)\\<`TFeatures`, `TData`\\>\n"
  },
  {
    "path": "docs/reference/functions/table_getGlobalFacetedUniqueValues.md",
    "content": "---\nid: table_getGlobalFacetedUniqueValues\ntitle: table_getGlobalFacetedUniqueValues\n---\n\n# Function: table\\_getGlobalFacetedUniqueValues()\n\n```ts\nfunction table_getGlobalFacetedUniqueValues<TFeatures, TData>(table): Map<any, number>;\n```\n\nDefined in: [features/column-faceting/columnFacetingFeature.utils.ts:69](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.utils.ts#L69)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n`Map`\\<`any`, `number`\\>\n"
  },
  {
    "path": "docs/reference/functions/table_getGlobalFilterFn.md",
    "content": "---\nid: table_getGlobalFilterFn\ntitle: table_getGlobalFilterFn\n---\n\n# Function: table\\_getGlobalFilterFn()\n\n```ts\nfunction table_getGlobalFilterFn<TFeatures, TData>(table): \n  | FilterFn<TFeatures, TData>\n  | undefined;\n```\n\nDefined in: [features/global-filtering/globalFilteringFeature.utils.ts:27](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.utils.ts#L27)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n  \\| [`FilterFn`](../interfaces/FilterFn.md)\\<`TFeatures`, `TData`\\>\n  \\| `undefined`\n"
  },
  {
    "path": "docs/reference/functions/table_getGroupedRowModel.md",
    "content": "---\nid: table_getGroupedRowModel\ntitle: table_getGroupedRowModel\n---\n\n# Function: table\\_getGroupedRowModel()\n\n```ts\nfunction table_getGroupedRowModel<TFeatures, TData>(table): RowModel<TFeatures, TData>;\n```\n\nDefined in: [core/row-models/coreRowModelsFeature.utils.ts:50](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.utils.ts#L50)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n[`RowModel`](../interfaces/RowModel.md)\\<`TFeatures`, `TData`\\>\n"
  },
  {
    "path": "docs/reference/functions/table_getGroupedSelectedRowModel.md",
    "content": "---\nid: table_getGroupedSelectedRowModel\ntitle: table_getGroupedSelectedRowModel\n---\n\n# Function: table\\_getGroupedSelectedRowModel()\n\n```ts\nfunction table_getGroupedSelectedRowModel<TFeatures, TData>(table): RowModel<TFeatures, TData>;\n```\n\nDefined in: [features/row-selection/rowSelectionFeature.utils.ts:128](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L128)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n[`RowModel`](../interfaces/RowModel.md)\\<`TFeatures`, `TData`\\>\n"
  },
  {
    "path": "docs/reference/functions/table_getHeaderGroups.md",
    "content": "---\nid: table_getHeaderGroups\ntitle: table_getHeaderGroups\n---\n\n# Function: table\\_getHeaderGroups()\n\n```ts\nfunction table_getHeaderGroups<TFeatures, TData>(table): HeaderGroup<TFeatures, TData>[];\n```\n\nDefined in: [core/headers/coreHeadersFeature.utils.ts:48](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.utils.ts#L48)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n[`HeaderGroup`](../type-aliases/HeaderGroup.md)\\<`TFeatures`, `TData`\\>[]\n"
  },
  {
    "path": "docs/reference/functions/table_getIsAllColumnsVisible.md",
    "content": "---\nid: table_getIsAllColumnsVisible\ntitle: table_getIsAllColumnsVisible\n---\n\n# Function: table\\_getIsAllColumnsVisible()\n\n```ts\nfunction table_getIsAllColumnsVisible<TFeatures, TData>(table): boolean;\n```\n\nDefined in: [features/column-visibility/columnVisibilityFeature.utils.ts:150](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L150)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n`boolean`\n"
  },
  {
    "path": "docs/reference/functions/table_getIsAllPageRowsSelected.md",
    "content": "---\nid: table_getIsAllPageRowsSelected\ntitle: table_getIsAllPageRowsSelected\n---\n\n# Function: table\\_getIsAllPageRowsSelected()\n\n```ts\nfunction table_getIsAllPageRowsSelected<TFeatures, TData>(table): boolean;\n```\n\nDefined in: [features/row-selection/rowSelectionFeature.utils.ts:170](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L170)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n`boolean`\n"
  },
  {
    "path": "docs/reference/functions/table_getIsAllRowsExpanded.md",
    "content": "---\nid: table_getIsAllRowsExpanded\ntitle: table_getIsAllRowsExpanded\n---\n\n# Function: table\\_getIsAllRowsExpanded()\n\n```ts\nfunction table_getIsAllRowsExpanded<TFeatures, TData>(table): boolean;\n```\n\nDefined in: [features/row-expanding/rowExpandingFeature.utils.ts:82](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L82)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n`boolean`\n"
  },
  {
    "path": "docs/reference/functions/table_getIsAllRowsSelected.md",
    "content": "---\nid: table_getIsAllRowsSelected\ntitle: table_getIsAllRowsSelected\n---\n\n# Function: table\\_getIsAllRowsSelected()\n\n```ts\nfunction table_getIsAllRowsSelected<TFeatures, TData>(table): boolean;\n```\n\nDefined in: [features/row-selection/rowSelectionFeature.utils.ts:145](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L145)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n`boolean`\n"
  },
  {
    "path": "docs/reference/functions/table_getIsSomeColumnsPinned.md",
    "content": "---\nid: table_getIsSomeColumnsPinned\ntitle: table_getIsSomeColumnsPinned\n---\n\n# Function: table\\_getIsSomeColumnsPinned()\n\n```ts\nfunction table_getIsSomeColumnsPinned<TFeatures, TData>(table, position?): boolean;\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.utils.ts:199](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L199)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n### position?\n\n[`ColumnPinningPosition`](../type-aliases/ColumnPinningPosition.md)\n\n## Returns\n\n`boolean`\n"
  },
  {
    "path": "docs/reference/functions/table_getIsSomeColumnsVisible.md",
    "content": "---\nid: table_getIsSomeColumnsVisible\ntitle: table_getIsSomeColumnsVisible\n---\n\n# Function: table\\_getIsSomeColumnsVisible()\n\n```ts\nfunction table_getIsSomeColumnsVisible<TFeatures, TData>(table): boolean;\n```\n\nDefined in: [features/column-visibility/columnVisibilityFeature.utils.ts:162](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L162)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n`boolean`\n"
  },
  {
    "path": "docs/reference/functions/table_getIsSomePageRowsSelected.md",
    "content": "---\nid: table_getIsSomePageRowsSelected\ntitle: table_getIsSomePageRowsSelected\n---\n\n# Function: table\\_getIsSomePageRowsSelected()\n\n```ts\nfunction table_getIsSomePageRowsSelected<TFeatures, TData>(table): boolean;\n```\n\nDefined in: [features/row-selection/rowSelectionFeature.utils.ts:203](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L203)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n`boolean`\n"
  },
  {
    "path": "docs/reference/functions/table_getIsSomeRowsExpanded.md",
    "content": "---\nid: table_getIsSomeRowsExpanded\ntitle: table_getIsSomeRowsExpanded\n---\n\n# Function: table\\_getIsSomeRowsExpanded()\n\n```ts\nfunction table_getIsSomeRowsExpanded<TFeatures, TData>(table): boolean;\n```\n\nDefined in: [features/row-expanding/rowExpandingFeature.utils.ts:74](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L74)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n`boolean`\n"
  },
  {
    "path": "docs/reference/functions/table_getIsSomeRowsPinned.md",
    "content": "---\nid: table_getIsSomeRowsPinned\ntitle: table_getIsSomeRowsPinned\n---\n\n# Function: table\\_getIsSomeRowsPinned()\n\n```ts\nfunction table_getIsSomeRowsPinned<TFeatures, TData>(table, position?): boolean;\n```\n\nDefined in: [features/row-pinning/rowPinningFeature.utils.ts:45](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts#L45)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n### position?\n\n[`RowPinningPosition`](../type-aliases/RowPinningPosition.md)\n\n## Returns\n\n`boolean`\n"
  },
  {
    "path": "docs/reference/functions/table_getIsSomeRowsSelected.md",
    "content": "---\nid: table_getIsSomeRowsSelected\ntitle: table_getIsSomeRowsSelected\n---\n\n# Function: table\\_getIsSomeRowsSelected()\n\n```ts\nfunction table_getIsSomeRowsSelected<TFeatures, TData>(table): boolean;\n```\n\nDefined in: [features/row-selection/rowSelectionFeature.utils.ts:192](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L192)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n`boolean`\n"
  },
  {
    "path": "docs/reference/functions/table_getLeafHeaders.md",
    "content": "---\nid: table_getLeafHeaders\ntitle: table_getLeafHeaders\n---\n\n# Function: table\\_getLeafHeaders()\n\n```ts\nfunction table_getLeafHeaders<TFeatures, TData>(table): any[];\n```\n\nDefined in: [core/headers/coreHeadersFeature.utils.ts:102](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.utils.ts#L102)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n`any`[]\n"
  },
  {
    "path": "docs/reference/functions/table_getLeftFlatHeaders.md",
    "content": "---\nid: table_getLeftFlatHeaders\ntitle: table_getLeftFlatHeaders\n---\n\n# Function: table\\_getLeftFlatHeaders()\n\n```ts\nfunction table_getLeftFlatHeaders<TFeatures, TData>(table): any[];\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.utils.ts:315](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L315)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n`any`[]\n"
  },
  {
    "path": "docs/reference/functions/table_getLeftFooterGroups.md",
    "content": "---\nid: table_getLeftFooterGroups\ntitle: table_getLeftFooterGroups\n---\n\n# Function: table\\_getLeftFooterGroups()\n\n```ts\nfunction table_getLeftFooterGroups<TFeatures, TData>(table): any[];\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.utils.ts:277](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L277)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n`any`[]\n"
  },
  {
    "path": "docs/reference/functions/table_getLeftHeaderGroups.md",
    "content": "---\nid: table_getLeftHeaderGroups\ntitle: table_getLeftHeaderGroups\n---\n\n# Function: table\\_getLeftHeaderGroups()\n\n```ts\nfunction table_getLeftHeaderGroups<TFeatures, TData>(table): HeaderGroup<TFeatures, TData>[];\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.utils.ts:213](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L213)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n[`HeaderGroup`](../type-aliases/HeaderGroup.md)\\<`TFeatures`, `TData`\\>[]\n"
  },
  {
    "path": "docs/reference/functions/table_getLeftLeafColumns.md",
    "content": "---\nid: table_getLeftLeafColumns\ntitle: table_getLeftLeafColumns\n---\n\n# Function: table\\_getLeftLeafColumns()\n\n```ts\nfunction table_getLeftLeafColumns<TFeatures, TData>(table): Column<TFeatures, TData, unknown>[];\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.utils.ts:400](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L400)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n[`Column`](../type-aliases/Column.md)\\<`TFeatures`, `TData`, `unknown`\\>[]\n"
  },
  {
    "path": "docs/reference/functions/table_getLeftLeafHeaders.md",
    "content": "---\nid: table_getLeftLeafHeaders\ntitle: table_getLeftLeafHeaders\n---\n\n# Function: table\\_getLeftLeafHeaders()\n\n```ts\nfunction table_getLeftLeafHeaders<TFeatures, TData>(table): any[];\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.utils.ts:365](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L365)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n`any`[]\n"
  },
  {
    "path": "docs/reference/functions/table_getLeftTotalSize.md",
    "content": "---\nid: table_getLeftTotalSize\ntitle: table_getLeftTotalSize\n---\n\n# Function: table\\_getLeftTotalSize()\n\n```ts\nfunction table_getLeftTotalSize<TFeatures, TData>(table): any;\n```\n\nDefined in: [features/column-sizing/columnSizingFeature.utils.ts:168](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts#L168)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n`any`\n"
  },
  {
    "path": "docs/reference/functions/table_getLeftVisibleLeafColumns.md",
    "content": "---\nid: table_getLeftVisibleLeafColumns\ntitle: table_getLeftVisibleLeafColumns\n---\n\n# Function: table\\_getLeftVisibleLeafColumns()\n\n```ts\nfunction table_getLeftVisibleLeafColumns<TFeatures, TData>(table): any[];\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.utils.ts:468](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L468)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n`any`[]\n"
  },
  {
    "path": "docs/reference/functions/table_getOrderColumnsFn.md",
    "content": "---\nid: table_getOrderColumnsFn\ntitle: table_getOrderColumnsFn\n---\n\n# Function: table\\_getOrderColumnsFn()\n\n```ts\nfunction table_getOrderColumnsFn<TFeatures, TData>(table): (columns) => Column_Internal<TFeatures, TData, unknown>[];\n```\n\nDefined in: [features/column-ordering/columnOrderingFeature.utils.ts:67](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.utils.ts#L67)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n```ts\n(columns): Column_Internal<TFeatures, TData, unknown>[];\n```\n\n### Parameters\n\n#### columns\n\n[`Column_Internal`](../type-aliases/Column_Internal.md)\\<`TFeatures`, `TData`, `unknown`\\>[]\n\n### Returns\n\n[`Column_Internal`](../type-aliases/Column_Internal.md)\\<`TFeatures`, `TData`, `unknown`\\>[]\n"
  },
  {
    "path": "docs/reference/functions/table_getPageCount.md",
    "content": "---\nid: table_getPageCount\ntitle: table_getPageCount\n---\n\n# Function: table\\_getPageCount()\n\n```ts\nfunction table_getPageCount<TFeatures, TData>(table): number;\n```\n\nDefined in: [features/row-pagination/rowPaginationFeature.utils.ts:186](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L186)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n`number`\n"
  },
  {
    "path": "docs/reference/functions/table_getPageOptions.md",
    "content": "---\nid: table_getPageOptions\ntitle: table_getPageOptions\n---\n\n# Function: table\\_getPageOptions()\n\n```ts\nfunction table_getPageOptions<TFeatures, TData>(table): number[];\n```\n\nDefined in: [features/row-pagination/rowPaginationFeature.utils.ts:118](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L118)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n`number`[]\n"
  },
  {
    "path": "docs/reference/functions/table_getPaginatedRowModel.md",
    "content": "---\nid: table_getPaginatedRowModel\ntitle: table_getPaginatedRowModel\n---\n\n# Function: table\\_getPaginatedRowModel()\n\n```ts\nfunction table_getPaginatedRowModel<TFeatures, TData>(table): RowModel<TFeatures, TData>;\n```\n\nDefined in: [core/row-models/coreRowModelsFeature.utils.ts:119](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.utils.ts#L119)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n[`RowModel`](../interfaces/RowModel.md)\\<`TFeatures`, `TData`\\>\n"
  },
  {
    "path": "docs/reference/functions/table_getPinnedLeafColumns.md",
    "content": "---\nid: table_getPinnedLeafColumns\ntitle: table_getPinnedLeafColumns\n---\n\n# Function: table\\_getPinnedLeafColumns()\n\n```ts\nfunction table_getPinnedLeafColumns<TFeatures, TData>(table, position): any[];\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.utils.ts:438](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L438)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n### position\n\n[`ColumnPinningPosition`](../type-aliases/ColumnPinningPosition.md) | `\"center\"`\n\n## Returns\n\n`any`[]\n"
  },
  {
    "path": "docs/reference/functions/table_getPinnedVisibleLeafColumns.md",
    "content": "---\nid: table_getPinnedVisibleLeafColumns\ntitle: table_getPinnedVisibleLeafColumns\n---\n\n# Function: table\\_getPinnedVisibleLeafColumns()\n\n```ts\nfunction table_getPinnedVisibleLeafColumns<TFeatures, TData>(table, position?): any[];\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.utils.ts:507](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L507)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n### position?\n\n[`ColumnPinningPosition`](../type-aliases/ColumnPinningPosition.md) | `\"center\"`\n\n## Returns\n\n`any`[]\n"
  },
  {
    "path": "docs/reference/functions/table_getPreExpandedRowModel.md",
    "content": "---\nid: table_getPreExpandedRowModel\ntitle: table_getPreExpandedRowModel\n---\n\n# Function: table\\_getPreExpandedRowModel()\n\n```ts\nfunction table_getPreExpandedRowModel<TFeatures, TData>(table): RowModel<TFeatures, TData>;\n```\n\nDefined in: [core/row-models/coreRowModelsFeature.utils.ts:89](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.utils.ts#L89)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n[`RowModel`](../interfaces/RowModel.md)\\<`TFeatures`, `TData`\\>\n"
  },
  {
    "path": "docs/reference/functions/table_getPreFilteredRowModel.md",
    "content": "---\nid: table_getPreFilteredRowModel\ntitle: table_getPreFilteredRowModel\n---\n\n# Function: table\\_getPreFilteredRowModel()\n\n```ts\nfunction table_getPreFilteredRowModel<TFeatures, TData>(table): RowModel<TFeatures, TData>;\n```\n\nDefined in: [core/row-models/coreRowModelsFeature.utils.ts:20](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.utils.ts#L20)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n[`RowModel`](../interfaces/RowModel.md)\\<`TFeatures`, `TData`\\>\n"
  },
  {
    "path": "docs/reference/functions/table_getPreGroupedRowModel.md",
    "content": "---\nid: table_getPreGroupedRowModel\ntitle: table_getPreGroupedRowModel\n---\n\n# Function: table\\_getPreGroupedRowModel()\n\n```ts\nfunction table_getPreGroupedRowModel<TFeatures, TData>(table): RowModel<TFeatures, TData>;\n```\n\nDefined in: [core/row-models/coreRowModelsFeature.utils.ts:43](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.utils.ts#L43)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n[`RowModel`](../interfaces/RowModel.md)\\<`TFeatures`, `TData`\\>\n"
  },
  {
    "path": "docs/reference/functions/table_getPrePaginatedRowModel.md",
    "content": "---\nid: table_getPrePaginatedRowModel\ntitle: table_getPrePaginatedRowModel\n---\n\n# Function: table\\_getPrePaginatedRowModel()\n\n```ts\nfunction table_getPrePaginatedRowModel<TFeatures, TData>(table): RowModel<TFeatures, TData>;\n```\n\nDefined in: [core/row-models/coreRowModelsFeature.utils.ts:112](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.utils.ts#L112)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n[`RowModel`](../interfaces/RowModel.md)\\<`TFeatures`, `TData`\\>\n"
  },
  {
    "path": "docs/reference/functions/table_getPreSelectedRowModel.md",
    "content": "---\nid: table_getPreSelectedRowModel\ntitle: table_getPreSelectedRowModel\n---\n\n# Function: table\\_getPreSelectedRowModel()\n\n```ts\nfunction table_getPreSelectedRowModel<TFeatures, TData>(table): RowModel<TFeatures, TData>;\n```\n\nDefined in: [features/row-selection/rowSelectionFeature.utils.ts:87](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L87)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n[`RowModel`](../interfaces/RowModel.md)\\<`TFeatures`, `TData`\\>\n"
  },
  {
    "path": "docs/reference/functions/table_getPreSortedRowModel.md",
    "content": "---\nid: table_getPreSortedRowModel\ntitle: table_getPreSortedRowModel\n---\n\n# Function: table\\_getPreSortedRowModel()\n\n```ts\nfunction table_getPreSortedRowModel<TFeatures, TData>(table): RowModel<TFeatures, TData>;\n```\n\nDefined in: [core/row-models/coreRowModelsFeature.utils.ts:66](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.utils.ts#L66)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n[`RowModel`](../interfaces/RowModel.md)\\<`TFeatures`, `TData`\\>\n"
  },
  {
    "path": "docs/reference/functions/table_getRightFlatHeaders.md",
    "content": "---\nid: table_getRightFlatHeaders\ntitle: table_getRightFlatHeaders\n---\n\n# Function: table\\_getRightFlatHeaders()\n\n```ts\nfunction table_getRightFlatHeaders<TFeatures, TData>(table): any[];\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.utils.ts:331](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L331)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n`any`[]\n"
  },
  {
    "path": "docs/reference/functions/table_getRightFooterGroups.md",
    "content": "---\nid: table_getRightFooterGroups\ntitle: table_getRightFooterGroups\n---\n\n# Function: table\\_getRightFooterGroups()\n\n```ts\nfunction table_getRightFooterGroups<TFeatures, TData>(table): any[];\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.utils.ts:289](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L289)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n`any`[]\n"
  },
  {
    "path": "docs/reference/functions/table_getRightHeaderGroups.md",
    "content": "---\nid: table_getRightHeaderGroups\ntitle: table_getRightHeaderGroups\n---\n\n# Function: table\\_getRightHeaderGroups()\n\n```ts\nfunction table_getRightHeaderGroups<TFeatures, TData>(table): HeaderGroup<TFeatures, TData>[];\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.utils.ts:233](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L233)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n[`HeaderGroup`](../type-aliases/HeaderGroup.md)\\<`TFeatures`, `TData`\\>[]\n"
  },
  {
    "path": "docs/reference/functions/table_getRightLeafColumns.md",
    "content": "---\nid: table_getRightLeafColumns\ntitle: table_getRightLeafColumns\n---\n\n# Function: table\\_getRightLeafColumns()\n\n```ts\nfunction table_getRightLeafColumns<TFeatures, TData>(table): Column<TFeatures, TData, unknown>[];\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.utils.ts:414](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L414)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n[`Column`](../type-aliases/Column.md)\\<`TFeatures`, `TData`, `unknown`\\>[]\n"
  },
  {
    "path": "docs/reference/functions/table_getRightLeafHeaders.md",
    "content": "---\nid: table_getRightLeafHeaders\ntitle: table_getRightLeafHeaders\n---\n\n# Function: table\\_getRightLeafHeaders()\n\n```ts\nfunction table_getRightLeafHeaders<TFeatures, TData>(table): any[];\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.utils.ts:376](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L376)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n`any`[]\n"
  },
  {
    "path": "docs/reference/functions/table_getRightTotalSize.md",
    "content": "---\nid: table_getRightTotalSize\ntitle: table_getRightTotalSize\n---\n\n# Function: table\\_getRightTotalSize()\n\n```ts\nfunction table_getRightTotalSize<TFeatures, TData>(table): any;\n```\n\nDefined in: [features/column-sizing/columnSizingFeature.utils.ts:198](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts#L198)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n`any`\n"
  },
  {
    "path": "docs/reference/functions/table_getRightVisibleLeafColumns.md",
    "content": "---\nid: table_getRightVisibleLeafColumns\ntitle: table_getRightVisibleLeafColumns\n---\n\n# Function: table\\_getRightVisibleLeafColumns()\n\n```ts\nfunction table_getRightVisibleLeafColumns<TFeatures, TData>(table): any[];\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.utils.ts:481](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L481)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n`any`[]\n"
  },
  {
    "path": "docs/reference/functions/table_getRow.md",
    "content": "---\nid: table_getRow\ntitle: table_getRow\n---\n\n# Function: table\\_getRow()\n\n```ts\nfunction table_getRow<TFeatures, TData>(\n   table, \n   rowId, \nsearchAll?): Row<TFeatures, TData>;\n```\n\nDefined in: [core/rows/coreRowsFeature.utils.ts:129](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.utils.ts#L129)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n### rowId\n\n`string`\n\n### searchAll?\n\n`boolean`\n\n## Returns\n\n[`Row`](../type-aliases/Row.md)\\<`TFeatures`, `TData`\\>\n"
  },
  {
    "path": "docs/reference/functions/table_getRowCount.md",
    "content": "---\nid: table_getRowCount\ntitle: table_getRowCount\n---\n\n# Function: table\\_getRowCount()\n\n```ts\nfunction table_getRowCount<TFeatures, TData>(table): number;\n```\n\nDefined in: [features/row-pagination/rowPaginationFeature.utils.ts:199](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L199)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n`number`\n"
  },
  {
    "path": "docs/reference/functions/table_getRowId.md",
    "content": "---\nid: table_getRowId\ntitle: table_getRowId\n---\n\n# Function: table\\_getRowId()\n\n```ts\nfunction table_getRowId<TFeatures, TData>(\n   originalRow, \n   table, \n   index, \n   parent?): string;\n```\n\nDefined in: [core/rows/coreRowsFeature.utils.ts:114](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.utils.ts#L114)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### originalRow\n\n`TData`\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n### index\n\n`number`\n\n### parent?\n\n[`Row`](../type-aliases/Row.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n`string`\n"
  },
  {
    "path": "docs/reference/functions/table_getRowModel.md",
    "content": "---\nid: table_getRowModel\ntitle: table_getRowModel\n---\n\n# Function: table\\_getRowModel()\n\n```ts\nfunction table_getRowModel<TFeatures, TData>(table): RowModel<TFeatures, TData>;\n```\n\nDefined in: [core/row-models/coreRowModelsFeature.utils.ts:135](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.utils.ts#L135)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n[`RowModel`](../interfaces/RowModel.md)\\<`TFeatures`, `TData`\\>\n"
  },
  {
    "path": "docs/reference/functions/table_getSelectedRowModel.md",
    "content": "---\nid: table_getSelectedRowModel\ntitle: table_getSelectedRowModel\n---\n\n# Function: table\\_getSelectedRowModel()\n\n```ts\nfunction table_getSelectedRowModel<TFeatures, TData>(table): RowModel<TFeatures, TData>;\n```\n\nDefined in: [features/row-selection/rowSelectionFeature.utils.ts:94](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L94)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n[`RowModel`](../interfaces/RowModel.md)\\<`TFeatures`, `TData`\\>\n"
  },
  {
    "path": "docs/reference/functions/table_getSortedRowModel.md",
    "content": "---\nid: table_getSortedRowModel\ntitle: table_getSortedRowModel\n---\n\n# Function: table\\_getSortedRowModel()\n\n```ts\nfunction table_getSortedRowModel<TFeatures, TData>(table): RowModel<TFeatures, TData>;\n```\n\nDefined in: [core/row-models/coreRowModelsFeature.utils.ts:73](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.utils.ts#L73)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n[`RowModel`](../interfaces/RowModel.md)\\<`TFeatures`, `TData`\\>\n"
  },
  {
    "path": "docs/reference/functions/table_getToggleAllColumnsVisibilityHandler.md",
    "content": "---\nid: table_getToggleAllColumnsVisibilityHandler\ntitle: table_getToggleAllColumnsVisibilityHandler\n---\n\n# Function: table\\_getToggleAllColumnsVisibilityHandler()\n\n```ts\nfunction table_getToggleAllColumnsVisibilityHandler<TFeatures, TData>(table): (e) => void;\n```\n\nDefined in: [features/column-visibility/columnVisibilityFeature.utils.ts:173](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L173)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n```ts\n(e): void;\n```\n\n### Parameters\n\n#### e\n\n`unknown`\n\n### Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/functions/table_getToggleAllPageRowsSelectedHandler.md",
    "content": "---\nid: table_getToggleAllPageRowsSelectedHandler\ntitle: table_getToggleAllPageRowsSelectedHandler\n---\n\n# Function: table\\_getToggleAllPageRowsSelectedHandler()\n\n```ts\nfunction table_getToggleAllPageRowsSelectedHandler<TFeatures, TData>(table): (e) => void;\n```\n\nDefined in: [features/row-selection/rowSelectionFeature.utils.ts:227](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L227)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n```ts\n(e): void;\n```\n\n### Parameters\n\n#### e\n\n`unknown`\n\n### Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/functions/table_getToggleAllRowsExpandedHandler.md",
    "content": "---\nid: table_getToggleAllRowsExpandedHandler\ntitle: table_getToggleAllRowsExpandedHandler\n---\n\n# Function: table\\_getToggleAllRowsExpandedHandler()\n\n```ts\nfunction table_getToggleAllRowsExpandedHandler<TFeatures, TData>(table): (e) => void;\n```\n\nDefined in: [features/row-expanding/rowExpandingFeature.utils.ts:64](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L64)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n```ts\n(e): void;\n```\n\n### Parameters\n\n#### e\n\n`unknown`\n\n### Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/functions/table_getToggleAllRowsSelectedHandler.md",
    "content": "---\nid: table_getToggleAllRowsSelectedHandler\ntitle: table_getToggleAllRowsSelectedHandler\n---\n\n# Function: table\\_getToggleAllRowsSelectedHandler()\n\n```ts\nfunction table_getToggleAllRowsSelectedHandler<TFeatures, TData>(table): (e) => void;\n```\n\nDefined in: [features/row-selection/rowSelectionFeature.utils.ts:215](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L215)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n```ts\n(e): void;\n```\n\n### Parameters\n\n#### e\n\n`unknown`\n\n### Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/functions/table_getTopRows.md",
    "content": "---\nid: table_getTopRows\ntitle: table_getTopRows\n---\n\n# Function: table\\_getTopRows()\n\n```ts\nfunction table_getTopRows<TFeatures, TData>(table): Row<TFeatures, TData>[];\n```\n\nDefined in: [features/row-pinning/rowPinningFeature.utils.ts:91](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts#L91)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n[`Row`](../type-aliases/Row.md)\\<`TFeatures`, `TData`\\>[]\n"
  },
  {
    "path": "docs/reference/functions/table_getTotalSize.md",
    "content": "---\nid: table_getTotalSize\ntitle: table_getTotalSize\n---\n\n# Function: table\\_getTotalSize()\n\n```ts\nfunction table_getTotalSize<TFeatures, TData>(table): number;\n```\n\nDefined in: [features/column-sizing/columnSizingFeature.utils.ts:157](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts#L157)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n`number`\n"
  },
  {
    "path": "docs/reference/functions/table_getVisibleFlatColumns.md",
    "content": "---\nid: table_getVisibleFlatColumns\ntitle: table_getVisibleFlatColumns\n---\n\n# Function: table\\_getVisibleFlatColumns()\n\n```ts\nfunction table_getVisibleFlatColumns<TFeatures, TData>(table): Column<TFeatures, TData, unknown>[];\n```\n\nDefined in: [features/column-visibility/columnVisibilityFeature.utils.ts:90](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L90)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n[`Column`](../type-aliases/Column.md)\\<`TFeatures`, `TData`, `unknown`\\>[]\n"
  },
  {
    "path": "docs/reference/functions/table_getVisibleLeafColumns.md",
    "content": "---\nid: table_getVisibleLeafColumns\ntitle: table_getVisibleLeafColumns\n---\n\n# Function: table\\_getVisibleLeafColumns()\n\n```ts\nfunction table_getVisibleLeafColumns<TFeatures, TData>(table): Column<TFeatures, TData, unknown>[];\n```\n\nDefined in: [features/column-visibility/columnVisibilityFeature.utils.ts:101](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L101)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n[`Column`](../type-aliases/Column.md)\\<`TFeatures`, `TData`, `unknown`\\>[]\n"
  },
  {
    "path": "docs/reference/functions/table_lastPage.md",
    "content": "---\nid: table_lastPage\ntitle: table_lastPage\n---\n\n# Function: table\\_lastPage()\n\n```ts\nfunction table_lastPage<TFeatures, TData>(table): void;\n```\n\nDefined in: [features/row-pagination/rowPaginationFeature.utils.ts:179](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L179)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/functions/table_mergeOptions.md",
    "content": "---\nid: table_mergeOptions\ntitle: table_mergeOptions\n---\n\n# Function: table\\_mergeOptions()\n\n```ts\nfunction table_mergeOptions<TFeatures, TData>(table, newOptions): TableOptions<TFeatures, TData>;\n```\n\nDefined in: [core/table/coreTablesFeature.utils.ts:14](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.utils.ts#L14)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n### newOptions\n\n[`TableOptions`](../type-aliases/TableOptions.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n[`TableOptions`](../type-aliases/TableOptions.md)\\<`TFeatures`, `TData`\\>\n"
  },
  {
    "path": "docs/reference/functions/table_nextPage.md",
    "content": "---\nid: table_nextPage\ntitle: table_nextPage\n---\n\n# Function: table\\_nextPage()\n\n```ts\nfunction table_nextPage<TFeatures, TData>(table): void;\n```\n\nDefined in: [features/row-pagination/rowPaginationFeature.utils.ts:163](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L163)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/functions/table_previousPage.md",
    "content": "---\nid: table_previousPage\ntitle: table_previousPage\n---\n\n# Function: table\\_previousPage()\n\n```ts\nfunction table_previousPage<TFeatures, TData>(table): void;\n```\n\nDefined in: [features/row-pagination/rowPaginationFeature.utils.ts:156](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L156)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/functions/table_reset.md",
    "content": "---\nid: table_reset\ntitle: table_reset\n---\n\n# Function: table\\_reset()\n\n```ts\nfunction table_reset<TFeatures, TData>(table): void;\n```\n\nDefined in: [core/table/coreTablesFeature.utils.ts:7](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.utils.ts#L7)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/functions/table_resetColumnFilters.md",
    "content": "---\nid: table_resetColumnFilters\ntitle: table_resetColumnFilters\n---\n\n# Function: table\\_resetColumnFilters()\n\n```ts\nfunction table_resetColumnFilters<TFeatures, TData>(table, defaultState?): void;\n```\n\nDefined in: [features/column-filtering/columnFilteringFeature.utils.ts:184](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.utils.ts#L184)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n### defaultState?\n\n`boolean`\n\n## Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/functions/table_resetColumnOrder.md",
    "content": "---\nid: table_resetColumnOrder\ntitle: table_resetColumnOrder\n---\n\n# Function: table\\_resetColumnOrder()\n\n```ts\nfunction table_resetColumnOrder<TFeatures, TData>(table, defaultState?): void;\n```\n\nDefined in: [features/column-ordering/columnOrderingFeature.utils.ts:57](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.utils.ts#L57)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n### defaultState?\n\n`boolean`\n\n## Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/functions/table_resetColumnPinning.md",
    "content": "---\nid: table_resetColumnPinning\ntitle: table_resetColumnPinning\n---\n\n# Function: table\\_resetColumnPinning()\n\n```ts\nfunction table_resetColumnPinning<TFeatures, TData>(table, defaultState?): void;\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.utils.ts:187](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L187)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n### defaultState?\n\n`boolean`\n\n## Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/functions/table_resetColumnSizing.md",
    "content": "---\nid: table_resetColumnSizing\ntitle: table_resetColumnSizing\n---\n\n# Function: table\\_resetColumnSizing()\n\n```ts\nfunction table_resetColumnSizing<TFeatures, TData>(table, defaultState?): void;\n```\n\nDefined in: [features/column-sizing/columnSizingFeature.utils.ts:147](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts#L147)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n### defaultState?\n\n`boolean`\n\n## Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/functions/table_resetColumnVisibility.md",
    "content": "---\nid: table_resetColumnVisibility\ntitle: table_resetColumnVisibility\n---\n\n# Function: table\\_resetColumnVisibility()\n\n```ts\nfunction table_resetColumnVisibility<TFeatures, TData>(table, defaultState?): void;\n```\n\nDefined in: [features/column-visibility/columnVisibilityFeature.utils.ts:122](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L122)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n### defaultState?\n\n`boolean`\n\n## Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/functions/table_resetExpanded.md",
    "content": "---\nid: table_resetExpanded\ntitle: table_resetExpanded\n---\n\n# Function: table\\_resetExpanded()\n\n```ts\nfunction table_resetExpanded<TFeatures, TData>(table, defaultState?): void;\n```\n\nDefined in: [features/row-expanding/rowExpandingFeature.utils.ts:45](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L45)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n### defaultState?\n\n`boolean`\n\n## Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/functions/table_resetGlobalFilter.md",
    "content": "---\nid: table_resetGlobalFilter\ntitle: table_resetGlobalFilter\n---\n\n# Function: table\\_resetGlobalFilter()\n\n```ts\nfunction table_resetGlobalFilter<TFeatures, TData>(table, defaultState?): void;\n```\n\nDefined in: [features/global-filtering/globalFilteringFeature.utils.ts:52](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.utils.ts#L52)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n### defaultState?\n\n`boolean`\n\n## Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/functions/table_resetGrouping.md",
    "content": "---\nid: table_resetGrouping\ntitle: table_resetGrouping\n---\n\n# Function: table\\_resetGrouping()\n\n```ts\nfunction table_resetGrouping<TFeatures, TData>(table, defaultState?): void;\n```\n\nDefined in: [features/column-grouping/columnGroupingFeature.utils.ts:120](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L120)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n### defaultState?\n\n`boolean`\n\n## Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/functions/table_resetHeaderSizeInfo.md",
    "content": "---\nid: table_resetHeaderSizeInfo\ntitle: table_resetHeaderSizeInfo\n---\n\n# Function: table\\_resetHeaderSizeInfo()\n\n```ts\nfunction table_resetHeaderSizeInfo<TFeatures, TData>(table, defaultState?): void;\n```\n\nDefined in: [features/column-resizing/columnResizingFeature.utils.ts:226](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.utils.ts#L226)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n### defaultState?\n\n`boolean`\n\n## Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/functions/table_resetPageIndex.md",
    "content": "---\nid: table_resetPageIndex\ntitle: table_resetPageIndex\n---\n\n# Function: table\\_resetPageIndex()\n\n```ts\nfunction table_resetPageIndex<TFeatures, TData>(table, defaultState?): void;\n```\n\nDefined in: [features/row-pagination/rowPaginationFeature.utils.ts:77](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L77)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n### defaultState?\n\n`boolean`\n\n## Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/functions/table_resetPageSize.md",
    "content": "---\nid: table_resetPageSize\ntitle: table_resetPageSize\n---\n\n# Function: table\\_resetPageSize()\n\n```ts\nfunction table_resetPageSize<TFeatures, TData>(table, defaultState?): void;\n```\n\nDefined in: [features/row-pagination/rowPaginationFeature.utils.ts:89](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L89)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n### defaultState?\n\n`boolean`\n\n## Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/functions/table_resetPagination.md",
    "content": "---\nid: table_resetPagination\ntitle: table_resetPagination\n---\n\n# Function: table\\_resetPagination()\n\n```ts\nfunction table_resetPagination<TFeatures, TData>(table, defaultState?): void;\n```\n\nDefined in: [features/row-pagination/rowPaginationFeature.utils.ts:43](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L43)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n### defaultState?\n\n`boolean`\n\n## Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/functions/table_resetRowPinning.md",
    "content": "---\nid: table_resetRowPinning\ntitle: table_resetRowPinning\n---\n\n# Function: table\\_resetRowPinning()\n\n```ts\nfunction table_resetRowPinning<TFeatures, TData>(table, defaultState?): void;\n```\n\nDefined in: [features/row-pinning/rowPinningFeature.utils.ts:31](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts#L31)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n### defaultState?\n\n`boolean`\n\n## Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/functions/table_resetRowSelection.md",
    "content": "---\nid: table_resetRowSelection\ntitle: table_resetRowSelection\n---\n\n# Function: table\\_resetRowSelection()\n\n```ts\nfunction table_resetRowSelection<TFeatures, TData>(table, defaultState?): void;\n```\n\nDefined in: [features/row-selection/rowSelectionFeature.utils.ts:24](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L24)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n### defaultState?\n\n`boolean`\n\n## Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/functions/table_resetSorting.md",
    "content": "---\nid: table_resetSorting\ntitle: table_resetSorting\n---\n\n# Function: table\\_resetSorting()\n\n```ts\nfunction table_resetSorting<TFeatures, TData>(table, defaultState?): void;\n```\n\nDefined in: [features/row-sorting/rowSortingFeature.utils.ts:26](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L26)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n### defaultState?\n\n`boolean`\n\n## Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/functions/table_setColumnFilters.md",
    "content": "---\nid: table_setColumnFilters\ntitle: table_setColumnFilters\n---\n\n# Function: table\\_setColumnFilters()\n\n```ts\nfunction table_setColumnFilters<TFeatures, TData>(table, updater): void;\n```\n\nDefined in: [features/column-filtering/columnFilteringFeature.utils.ts:156](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.utils.ts#L156)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n### updater\n\n[`Updater`](../type-aliases/Updater.md)\\<[`ColumnFiltersState`](../type-aliases/ColumnFiltersState.md)\\>\n\n## Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/functions/table_setColumnOrder.md",
    "content": "---\nid: table_setColumnOrder\ntitle: table_setColumnOrder\n---\n\n# Function: table\\_setColumnOrder()\n\n```ts\nfunction table_setColumnOrder<TFeatures, TData>(table, updater): void;\n```\n\nDefined in: [features/column-ordering/columnOrderingFeature.utils.ts:50](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.utils.ts#L50)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n### updater\n\n[`Updater`](../type-aliases/Updater.md)\\<[`ColumnOrderState`](../type-aliases/ColumnOrderState.md)\\>\n\n## Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/functions/table_setColumnPinning.md",
    "content": "---\nid: table_setColumnPinning\ntitle: table_setColumnPinning\n---\n\n# Function: table\\_setColumnPinning()\n\n```ts\nfunction table_setColumnPinning<TFeatures, TData>(table, updater): void;\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.utils.ts:177](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L177)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n### updater\n\n[`Updater`](../type-aliases/Updater.md)\\<[`ColumnPinningState`](../interfaces/ColumnPinningState.md)\\>\n\n## Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/functions/table_setColumnResizing.md",
    "content": "---\nid: table_setColumnResizing\ntitle: table_setColumnResizing\n---\n\n# Function: table\\_setColumnResizing()\n\n```ts\nfunction table_setColumnResizing<TFeatures, TData>(table, updater): void;\n```\n\nDefined in: [features/column-resizing/columnResizingFeature.utils.ts:216](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.utils.ts#L216)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n### updater\n\n[`Updater`](../type-aliases/Updater.md)\\<[`columnResizingState`](../interfaces/columnResizingState.md)\\>\n\n## Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/functions/table_setColumnSizing.md",
    "content": "---\nid: table_setColumnSizing\ntitle: table_setColumnSizing\n---\n\n# Function: table\\_setColumnSizing()\n\n```ts\nfunction table_setColumnSizing<TFeatures, TData>(table, updater): void;\n```\n\nDefined in: [features/column-sizing/columnSizingFeature.utils.ts:137](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts#L137)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n### updater\n\n[`Updater`](../type-aliases/Updater.md)\\<[`ColumnSizingState`](../type-aliases/ColumnSizingState.md)\\>\n\n## Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/functions/table_setColumnVisibility.md",
    "content": "---\nid: table_setColumnVisibility\ntitle: table_setColumnVisibility\n---\n\n# Function: table\\_setColumnVisibility()\n\n```ts\nfunction table_setColumnVisibility<TFeatures, TData>(table, updater): void;\n```\n\nDefined in: [features/column-visibility/columnVisibilityFeature.utils.ts:112](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L112)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n### updater\n\n[`Updater`](../type-aliases/Updater.md)\\<[`ColumnVisibilityState`](../type-aliases/ColumnVisibilityState.md)\\>\n\n## Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/functions/table_setExpanded.md",
    "content": "---\nid: table_setExpanded\ntitle: table_setExpanded\n---\n\n# Function: table\\_setExpanded()\n\n```ts\nfunction table_setExpanded<TFeatures, TData>(table, updater): void;\n```\n\nDefined in: [features/row-expanding/rowExpandingFeature.utils.ts:27](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L27)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n### updater\n\n[`Updater`](../type-aliases/Updater.md)\\<[`ExpandedState`](../type-aliases/ExpandedState.md)\\>\n\n## Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/functions/table_setGlobalFilter.md",
    "content": "---\nid: table_setGlobalFilter\ntitle: table_setGlobalFilter\n---\n\n# Function: table\\_setGlobalFilter()\n\n```ts\nfunction table_setGlobalFilter<TFeatures, TData>(table, updater): void;\n```\n\nDefined in: [features/global-filtering/globalFilteringFeature.utils.ts:45](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.utils.ts#L45)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n### updater\n\n`any`\n\n## Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/functions/table_setGrouping.md",
    "content": "---\nid: table_setGrouping\ntitle: table_setGrouping\n---\n\n# Function: table\\_setGrouping()\n\n```ts\nfunction table_setGrouping<TFeatures, TData>(table, updater): void;\n```\n\nDefined in: [features/column-grouping/columnGroupingFeature.utils.ts:113](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L113)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n### updater\n\n[`Updater`](../type-aliases/Updater.md)\\<[`GroupingState`](../type-aliases/GroupingState.md)\\>\n\n## Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/functions/table_setOptions.md",
    "content": "---\nid: table_setOptions\ntitle: table_setOptions\n---\n\n# Function: table\\_setOptions()\n\n```ts\nfunction table_setOptions<TFeatures, TData>(table, updater): void;\n```\n\nDefined in: [core/table/coreTablesFeature.utils.ts:31](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.utils.ts#L31)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n### updater\n\n[`Updater`](../type-aliases/Updater.md)\\<[`TableOptions`](../type-aliases/TableOptions.md)\\<`TFeatures`, `TData`\\>\\>\n\n## Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/functions/table_setPageIndex.md",
    "content": "---\nid: table_setPageIndex\ntitle: table_setPageIndex\n---\n\n# Function: table\\_setPageIndex()\n\n```ts\nfunction table_setPageIndex<TFeatures, TData>(table, updater): void;\n```\n\nDefined in: [features/row-pagination/rowPaginationFeature.utils.ts:55](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L55)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n### updater\n\n[`Updater`](../type-aliases/Updater.md)\\<`number`\\>\n\n## Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/functions/table_setPageSize.md",
    "content": "---\nid: table_setPageSize\ntitle: table_setPageSize\n---\n\n# Function: table\\_setPageSize()\n\n```ts\nfunction table_setPageSize<TFeatures, TData>(table, updater): void;\n```\n\nDefined in: [features/row-pagination/rowPaginationFeature.utils.ts:101](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L101)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n### updater\n\n[`Updater`](../type-aliases/Updater.md)\\<`number`\\>\n\n## Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/functions/table_setPagination.md",
    "content": "---\nid: table_setPagination\ntitle: table_setPagination\n---\n\n# Function: table\\_setPagination()\n\n```ts\nfunction table_setPagination<TFeatures, TData>(table, updater): void | undefined;\n```\n\nDefined in: [features/row-pagination/rowPaginationFeature.utils.ts:30](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L30)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n### updater\n\n[`Updater`](../type-aliases/Updater.md)\\<[`PaginationState`](../interfaces/PaginationState.md)\\>\n\n## Returns\n\n`void` \\| `undefined`\n"
  },
  {
    "path": "docs/reference/functions/table_setRowPinning.md",
    "content": "---\nid: table_setRowPinning\ntitle: table_setRowPinning\n---\n\n# Function: table\\_setRowPinning()\n\n```ts\nfunction table_setRowPinning<TFeatures, TData>(table, updater): void;\n```\n\nDefined in: [features/row-pinning/rowPinningFeature.utils.ts:21](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts#L21)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n### updater\n\n[`Updater`](../type-aliases/Updater.md)\\<[`RowPinningState`](../interfaces/RowPinningState.md)\\>\n\n## Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/functions/table_setRowSelection.md",
    "content": "---\nid: table_setRowSelection\ntitle: table_setRowSelection\n---\n\n# Function: table\\_setRowSelection()\n\n```ts\nfunction table_setRowSelection<TFeatures, TData>(table, updater): void;\n```\n\nDefined in: [features/row-selection/rowSelectionFeature.utils.ts:14](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L14)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n### updater\n\n[`Updater`](../type-aliases/Updater.md)\\<[`RowSelectionState`](../type-aliases/RowSelectionState.md)\\>\n\n## Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/functions/table_setSorting.md",
    "content": "---\nid: table_setSorting\ntitle: table_setSorting\n---\n\n# Function: table\\_setSorting()\n\n```ts\nfunction table_setSorting<TFeatures, TData>(table, updater): void;\n```\n\nDefined in: [features/row-sorting/rowSortingFeature.utils.ts:19](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L19)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n### updater\n\n[`Updater`](../type-aliases/Updater.md)\\<[`SortingState`](../type-aliases/SortingState.md)\\>\n\n## Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/functions/table_toggleAllColumnsVisible.md",
    "content": "---\nid: table_toggleAllColumnsVisible\ntitle: table_toggleAllColumnsVisible\n---\n\n# Function: table\\_toggleAllColumnsVisible()\n\n```ts\nfunction table_toggleAllColumnsVisible<TFeatures, TData>(table, value?): void;\n```\n\nDefined in: [features/column-visibility/columnVisibilityFeature.utils.ts:132](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L132)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n### value?\n\n`boolean`\n\n## Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/functions/table_toggleAllPageRowsSelected.md",
    "content": "---\nid: table_toggleAllPageRowsSelected\ntitle: table_toggleAllPageRowsSelected\n---\n\n# Function: table\\_toggleAllPageRowsSelected()\n\n```ts\nfunction table_toggleAllPageRowsSelected<TFeatures, TData>(table, value?): void;\n```\n\nDefined in: [features/row-selection/rowSelectionFeature.utils.ts:67](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L67)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n### value?\n\n`boolean`\n\n## Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/functions/table_toggleAllRowsExpanded.md",
    "content": "---\nid: table_toggleAllRowsExpanded\ntitle: table_toggleAllRowsExpanded\n---\n\n# Function: table\\_toggleAllRowsExpanded()\n\n```ts\nfunction table_toggleAllRowsExpanded<TFeatures, TData>(table, expanded?): void;\n```\n\nDefined in: [features/row-expanding/rowExpandingFeature.utils.ts:34](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L34)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n### expanded?\n\n`boolean`\n\n## Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/functions/table_toggleAllRowsSelected.md",
    "content": "---\nid: table_toggleAllRowsSelected\ntitle: table_toggleAllRowsSelected\n---\n\n# Function: table\\_toggleAllRowsSelected()\n\n```ts\nfunction table_toggleAllRowsSelected<TFeatures, TData>(table, value?): void;\n```\n\nDefined in: [features/row-selection/rowSelectionFeature.utils.ts:36](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L36)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](../type-aliases/Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n### value?\n\n`boolean`\n\n## Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/index.md",
    "content": "---\nid: \"@tanstack/table-core\"\ntitle: \"@tanstack/table-core\"\n---\n\n# @tanstack/table-core\n\n## Namespaces\n\n- [filterFn\\_arrIncludes](@tanstack/namespaces/filterFn_arrIncludes/index.md)\n- [filterFn\\_arrIncludesAll](@tanstack/namespaces/filterFn_arrIncludesAll/index.md)\n- [filterFn\\_arrIncludesSome](@tanstack/namespaces/filterFn_arrIncludesSome/index.md)\n- [filterFn\\_equals](@tanstack/namespaces/filterFn_equals/index.md)\n- [filterFn\\_equalsString](@tanstack/namespaces/filterFn_equalsString/index.md)\n- [filterFn\\_equalsStringSensitive](@tanstack/namespaces/filterFn_equalsStringSensitive/index.md)\n- [filterFn\\_greaterThan](@tanstack/namespaces/filterFn_greaterThan/index.md)\n- [filterFn\\_greaterThanOrEqualTo](@tanstack/namespaces/filterFn_greaterThanOrEqualTo/index.md)\n- [filterFn\\_includesString](@tanstack/namespaces/filterFn_includesString/index.md)\n- [filterFn\\_includesStringSensitive](@tanstack/namespaces/filterFn_includesStringSensitive/index.md)\n- [filterFn\\_inNumberRange](@tanstack/namespaces/filterFn_inNumberRange/index.md)\n- [filterFn\\_lessThan](@tanstack/namespaces/filterFn_lessThan/index.md)\n- [filterFn\\_lessThanOrEqualTo](@tanstack/namespaces/filterFn_lessThanOrEqualTo/index.md)\n- [filterFn\\_weakEquals](@tanstack/namespaces/filterFn_weakEquals/index.md)\n\n## Interfaces\n\n- [AggregationFns](interfaces/AggregationFns.md)\n- [API](interfaces/API.md)\n- [CachedRowModel\\_Core](interfaces/CachedRowModel_Core.md)\n- [CachedRowModel\\_Expanded](interfaces/CachedRowModel_Expanded.md)\n- [CachedRowModel\\_Faceted](interfaces/CachedRowModel_Faceted.md)\n- [CachedRowModel\\_Filtered](interfaces/CachedRowModel_Filtered.md)\n- [CachedRowModel\\_Grouped](interfaces/CachedRowModel_Grouped.md)\n- [CachedRowModel\\_Paginated](interfaces/CachedRowModel_Paginated.md)\n- [CachedRowModel\\_Plugins](interfaces/CachedRowModel_Plugins.md)\n- [CachedRowModel\\_Sorted](interfaces/CachedRowModel_Sorted.md)\n- [CachedRowModels\\_Plugins](interfaces/CachedRowModels_Plugins.md)\n- [Cell\\_Cell](interfaces/Cell_Cell.md)\n- [Cell\\_ColumnGrouping](interfaces/Cell_ColumnGrouping.md)\n- [Cell\\_Core](interfaces/Cell_Core.md)\n- [Cell\\_CoreProperties](interfaces/Cell_CoreProperties.md)\n- [Cell\\_Plugins](interfaces/Cell_Plugins.md)\n- [CellContext](interfaces/CellContext.md)\n- [Column\\_Column](interfaces/Column_Column.md)\n- [Column\\_ColumnFaceting](interfaces/Column_ColumnFaceting.md)\n- [Column\\_ColumnFiltering](interfaces/Column_ColumnFiltering.md)\n- [Column\\_ColumnGrouping](interfaces/Column_ColumnGrouping.md)\n- [Column\\_ColumnOrdering](interfaces/Column_ColumnOrdering.md)\n- [Column\\_ColumnPinning](interfaces/Column_ColumnPinning.md)\n- [Column\\_ColumnResizing](interfaces/Column_ColumnResizing.md)\n- [Column\\_ColumnSizing](interfaces/Column_ColumnSizing.md)\n- [Column\\_ColumnVisibility](interfaces/Column_ColumnVisibility.md)\n- [Column\\_Core](interfaces/Column_Core.md)\n- [Column\\_CoreProperties](interfaces/Column_CoreProperties.md)\n- [Column\\_GlobalFiltering](interfaces/Column_GlobalFiltering.md)\n- [Column\\_Plugins](interfaces/Column_Plugins.md)\n- [Column\\_RowSorting](interfaces/Column_RowSorting.md)\n- [ColumnDef\\_ColumnFiltering](interfaces/ColumnDef_ColumnFiltering.md)\n- [ColumnDef\\_ColumnGrouping](interfaces/ColumnDef_ColumnGrouping.md)\n- [ColumnDef\\_ColumnPinning](interfaces/ColumnDef_ColumnPinning.md)\n- [ColumnDef\\_ColumnResizing](interfaces/ColumnDef_ColumnResizing.md)\n- [ColumnDef\\_ColumnSizing](interfaces/ColumnDef_ColumnSizing.md)\n- [ColumnDef\\_ColumnVisibility](interfaces/ColumnDef_ColumnVisibility.md)\n- [ColumnDef\\_GlobalFiltering](interfaces/ColumnDef_GlobalFiltering.md)\n- [ColumnDef\\_Plugins](interfaces/ColumnDef_Plugins.md)\n- [ColumnDef\\_RowSorting](interfaces/ColumnDef_RowSorting.md)\n- [ColumnDefaultOptions](interfaces/ColumnDefaultOptions.md)\n- [ColumnFilter](interfaces/ColumnFilter.md)\n- [ColumnMeta](interfaces/ColumnMeta.md)\n- [ColumnOrderDefaultOptions](interfaces/ColumnOrderDefaultOptions.md)\n- [ColumnPinningDefaultOptions](interfaces/ColumnPinningDefaultOptions.md)\n- [ColumnPinningState](interfaces/ColumnPinningState.md)\n- [columnResizingState](interfaces/columnResizingState.md)\n- [ColumnSort](interfaces/ColumnSort.md)\n- [CoreFeatures](interfaces/CoreFeatures.md)\n- [CreateRowModel\\_Core](interfaces/CreateRowModel_Core.md)\n- [CreateRowModel\\_Expanded](interfaces/CreateRowModel_Expanded.md)\n- [CreateRowModel\\_Faceted](interfaces/CreateRowModel_Faceted.md)\n- [CreateRowModel\\_Filtered](interfaces/CreateRowModel_Filtered.md)\n- [CreateRowModel\\_Grouped](interfaces/CreateRowModel_Grouped.md)\n- [CreateRowModel\\_Paginated](interfaces/CreateRowModel_Paginated.md)\n- [CreateRowModel\\_Plugins](interfaces/CreateRowModel_Plugins.md)\n- [CreateRowModel\\_Sorted](interfaces/CreateRowModel_Sorted.md)\n- [CreateRowModels\\_Plugins](interfaces/CreateRowModels_Plugins.md)\n- [FilterFn](interfaces/FilterFn.md)\n- [FilterFns](interfaces/FilterFns.md)\n- [FilterMeta](interfaces/FilterMeta.md)\n- [Header\\_ColumnResizing](interfaces/Header_ColumnResizing.md)\n- [Header\\_ColumnSizing](interfaces/Header_ColumnSizing.md)\n- [Header\\_Core](interfaces/Header_Core.md)\n- [Header\\_CoreProperties](interfaces/Header_CoreProperties.md)\n- [Header\\_Header](interfaces/Header_Header.md)\n- [Header\\_Plugins](interfaces/Header_Plugins.md)\n- [HeaderContext](interfaces/HeaderContext.md)\n- [HeaderGroup\\_Core](interfaces/HeaderGroup_Core.md)\n- [HeaderGroup\\_Header](interfaces/HeaderGroup_Header.md)\n- [HeaderGroup\\_Plugins](interfaces/HeaderGroup_Plugins.md)\n- [IdIdentifier](interfaces/IdIdentifier.md)\n- [PaginationDefaultOptions](interfaces/PaginationDefaultOptions.md)\n- [PaginationState](interfaces/PaginationState.md)\n- [Plugins](interfaces/Plugins.md)\n- [PrototypeAPI](interfaces/PrototypeAPI.md)\n- [ResolvedColumnFilter](interfaces/ResolvedColumnFilter.md)\n- [Row\\_ColumnFiltering](interfaces/Row_ColumnFiltering.md)\n- [Row\\_ColumnGrouping](interfaces/Row_ColumnGrouping.md)\n- [Row\\_ColumnPinning](interfaces/Row_ColumnPinning.md)\n- [Row\\_ColumnVisibility](interfaces/Row_ColumnVisibility.md)\n- [Row\\_Core](interfaces/Row_Core.md)\n- [Row\\_CoreProperties](interfaces/Row_CoreProperties.md)\n- [Row\\_Plugins](interfaces/Row_Plugins.md)\n- [Row\\_Row](interfaces/Row_Row.md)\n- [Row\\_RowExpanding](interfaces/Row_RowExpanding.md)\n- [Row\\_RowPinning](interfaces/Row_RowPinning.md)\n- [Row\\_RowSelection](interfaces/Row_RowSelection.md)\n- [RowModel](interfaces/RowModel.md)\n- [RowModelFns\\_ColumnFiltering](interfaces/RowModelFns_ColumnFiltering.md)\n- [RowModelFns\\_ColumnGrouping](interfaces/RowModelFns_ColumnGrouping.md)\n- [RowModelFns\\_Core](interfaces/RowModelFns_Core.md)\n- [RowModelFns\\_Plugins](interfaces/RowModelFns_Plugins.md)\n- [RowModelFns\\_RowSorting](interfaces/RowModelFns_RowSorting.md)\n- [RowPinningDefaultOptions](interfaces/RowPinningDefaultOptions.md)\n- [RowPinningState](interfaces/RowPinningState.md)\n- [SortFn](interfaces/SortFn.md)\n- [SortFns](interfaces/SortFns.md)\n- [StockFeatures](interfaces/StockFeatures.md)\n- [StringHeaderIdentifier](interfaces/StringHeaderIdentifier.md)\n- [Table\\_ColumnFaceting](interfaces/Table_ColumnFaceting.md)\n- [Table\\_ColumnFiltering](interfaces/Table_ColumnFiltering.md)\n- [Table\\_ColumnGrouping](interfaces/Table_ColumnGrouping.md)\n- [Table\\_ColumnOrdering](interfaces/Table_ColumnOrdering.md)\n- [Table\\_ColumnPinning](interfaces/Table_ColumnPinning.md)\n- [Table\\_ColumnResizing](interfaces/Table_ColumnResizing.md)\n- [Table\\_Columns](interfaces/Table_Columns.md)\n- [Table\\_ColumnSizing](interfaces/Table_ColumnSizing.md)\n- [Table\\_ColumnVisibility](interfaces/Table_ColumnVisibility.md)\n- [Table\\_CoreProperties](interfaces/Table_CoreProperties.md)\n- [Table\\_GlobalFiltering](interfaces/Table_GlobalFiltering.md)\n- [Table\\_Headers](interfaces/Table_Headers.md)\n- [Table\\_Plugins](interfaces/Table_Plugins.md)\n- [Table\\_RowExpanding](interfaces/Table_RowExpanding.md)\n- [Table\\_RowModels\\_Core](interfaces/Table_RowModels_Core.md)\n- [Table\\_RowModels\\_Expanded](interfaces/Table_RowModels_Expanded.md)\n- [Table\\_RowModels\\_Faceted](interfaces/Table_RowModels_Faceted.md)\n- [Table\\_RowModels\\_Filtered](interfaces/Table_RowModels_Filtered.md)\n- [Table\\_RowModels\\_Grouped](interfaces/Table_RowModels_Grouped.md)\n- [Table\\_RowModels\\_Paginated](interfaces/Table_RowModels_Paginated.md)\n- [Table\\_RowModels\\_Sorted](interfaces/Table_RowModels_Sorted.md)\n- [Table\\_RowPagination](interfaces/Table_RowPagination.md)\n- [Table\\_RowPinning](interfaces/Table_RowPinning.md)\n- [Table\\_Rows](interfaces/Table_Rows.md)\n- [Table\\_RowSelection](interfaces/Table_RowSelection.md)\n- [Table\\_RowSorting](interfaces/Table_RowSorting.md)\n- [Table\\_Table](interfaces/Table_Table.md)\n- [TableFeature](interfaces/TableFeature.md)\n- [TableFeatures](interfaces/TableFeatures.md)\n- [TableMeta](interfaces/TableMeta.md)\n- [TableOptions\\_Cell](interfaces/TableOptions_Cell.md)\n- [TableOptions\\_ColumnFiltering](interfaces/TableOptions_ColumnFiltering.md)\n- [TableOptions\\_ColumnGrouping](interfaces/TableOptions_ColumnGrouping.md)\n- [TableOptions\\_ColumnOrdering](interfaces/TableOptions_ColumnOrdering.md)\n- [TableOptions\\_ColumnPinning](interfaces/TableOptions_ColumnPinning.md)\n- [TableOptions\\_ColumnResizing](interfaces/TableOptions_ColumnResizing.md)\n- [TableOptions\\_Columns](interfaces/TableOptions_Columns.md)\n- [TableOptions\\_ColumnSizing](interfaces/TableOptions_ColumnSizing.md)\n- [TableOptions\\_ColumnVisibility](interfaces/TableOptions_ColumnVisibility.md)\n- [TableOptions\\_Core](interfaces/TableOptions_Core.md)\n- [TableOptions\\_GlobalFiltering](interfaces/TableOptions_GlobalFiltering.md)\n- [TableOptions\\_Plugins](interfaces/TableOptions_Plugins.md)\n- [TableOptions\\_RowExpanding](interfaces/TableOptions_RowExpanding.md)\n- [TableOptions\\_RowPagination](interfaces/TableOptions_RowPagination.md)\n- [TableOptions\\_RowPinning](interfaces/TableOptions_RowPinning.md)\n- [TableOptions\\_Rows](interfaces/TableOptions_Rows.md)\n- [TableOptions\\_RowSelection](interfaces/TableOptions_RowSelection.md)\n- [TableOptions\\_RowSorting](interfaces/TableOptions_RowSorting.md)\n- [TableOptions\\_Table](interfaces/TableOptions_Table.md)\n- [TableState\\_ColumnFiltering](interfaces/TableState_ColumnFiltering.md)\n- [TableState\\_ColumnGrouping](interfaces/TableState_ColumnGrouping.md)\n- [TableState\\_ColumnOrdering](interfaces/TableState_ColumnOrdering.md)\n- [TableState\\_ColumnPinning](interfaces/TableState_ColumnPinning.md)\n- [TableState\\_ColumnResizing](interfaces/TableState_ColumnResizing.md)\n- [TableState\\_ColumnSizing](interfaces/TableState_ColumnSizing.md)\n- [TableState\\_ColumnVisibility](interfaces/TableState_ColumnVisibility.md)\n- [TableState\\_GlobalFiltering](interfaces/TableState_GlobalFiltering.md)\n- [TableState\\_Plugins](interfaces/TableState_Plugins.md)\n- [TableState\\_RowExpanding](interfaces/TableState_RowExpanding.md)\n- [TableState\\_RowPagination](interfaces/TableState_RowPagination.md)\n- [TableState\\_RowPinning](interfaces/TableState_RowPinning.md)\n- [TableState\\_RowSelection](interfaces/TableState_RowSelection.md)\n- [TableState\\_RowSorting](interfaces/TableState_RowSorting.md)\n\n## Type Aliases\n\n- [AccessorColumnDef](type-aliases/AccessorColumnDef.md)\n- [AccessorFn](type-aliases/AccessorFn.md)\n- [AccessorFnColumnDef](type-aliases/AccessorFnColumnDef.md)\n- [AccessorFnColumnDefBase](type-aliases/AccessorFnColumnDefBase.md)\n- [AccessorKeyColumnDef](type-aliases/AccessorKeyColumnDef.md)\n- [AccessorKeyColumnDefBase](type-aliases/AccessorKeyColumnDefBase.md)\n- [AggregationFn](type-aliases/AggregationFn.md)\n- [AggregationFnOption](type-aliases/AggregationFnOption.md)\n- [APIObject](type-aliases/APIObject.md)\n- [AssignCellPrototype](type-aliases/AssignCellPrototype.md)\n- [AssignColumnPrototype](type-aliases/AssignColumnPrototype.md)\n- [AssignHeaderPrototype](type-aliases/AssignHeaderPrototype.md)\n- [AssignRowPrototype](type-aliases/AssignRowPrototype.md)\n- [BuiltInAggregationFn](type-aliases/BuiltInAggregationFn.md)\n- [BuiltInFilterFn](type-aliases/BuiltInFilterFn.md)\n- [BuiltInSortFn](type-aliases/BuiltInSortFn.md)\n- [CachedRowModel\\_All](type-aliases/CachedRowModel_All.md)\n- [CachedRowModels](type-aliases/CachedRowModels.md)\n- [Cell](type-aliases/Cell.md)\n- [CellData](type-aliases/CellData.md)\n- [Column](type-aliases/Column.md)\n- [Column\\_Internal](type-aliases/Column_Internal.md)\n- [ColumnDef](type-aliases/ColumnDef.md)\n- [ColumnDefBase](type-aliases/ColumnDefBase.md)\n- [ColumnDefBase\\_All](type-aliases/ColumnDefBase_All.md)\n- [ColumnDefResolved](type-aliases/ColumnDefResolved.md)\n- [ColumnDefTemplate](type-aliases/ColumnDefTemplate.md)\n- [ColumnFilterAutoRemoveTestFn](type-aliases/ColumnFilterAutoRemoveTestFn.md)\n- [ColumnFiltersState](type-aliases/ColumnFiltersState.md)\n- [ColumnHelper](type-aliases/ColumnHelper.md)\n- [ColumnOrderState](type-aliases/ColumnOrderState.md)\n- [ColumnPinningPosition](type-aliases/ColumnPinningPosition.md)\n- [ColumnResizeDirection](type-aliases/ColumnResizeDirection.md)\n- [ColumnResizeMode](type-aliases/ColumnResizeMode.md)\n- [ColumnResizingDefaultOptions](type-aliases/ColumnResizingDefaultOptions.md)\n- [ColumnSizingDefaultOptions](type-aliases/ColumnSizingDefaultOptions.md)\n- [ColumnSizingState](type-aliases/ColumnSizingState.md)\n- [ColumnVisibilityState](type-aliases/ColumnVisibilityState.md)\n- [ConstructTableAPIs](type-aliases/ConstructTableAPIs.md)\n- [CreateRowModels](type-aliases/CreateRowModels.md)\n- [CreateRowModels\\_All](type-aliases/CreateRowModels_All.md)\n- [CustomAggregationFns](type-aliases/CustomAggregationFns.md)\n- [CustomFilterFns](type-aliases/CustomFilterFns.md)\n- [CustomSortFns](type-aliases/CustomSortFns.md)\n- [DebugOptions](type-aliases/DebugOptions.md)\n- [DeepKeys](type-aliases/DeepKeys.md)\n- [DeepValue](type-aliases/DeepValue.md)\n- [DisplayColumnDef](type-aliases/DisplayColumnDef.md)\n- [ExpandedState](type-aliases/ExpandedState.md)\n- [ExpandedStateList](type-aliases/ExpandedStateList.md)\n- [ExtractFeatureTypes](type-aliases/ExtractFeatureTypes.md)\n- [FilterFnOption](type-aliases/FilterFnOption.md)\n- [GetDefaultColumnDef](type-aliases/GetDefaultColumnDef.md)\n- [GetDefaultStateSelector](type-aliases/GetDefaultStateSelector.md)\n- [GetDefaultTableOptions](type-aliases/GetDefaultTableOptions.md)\n- [GetInitialState](type-aliases/GetInitialState.md)\n- [Getter](type-aliases/Getter.md)\n- [GroupColumnDef](type-aliases/GroupColumnDef.md)\n- [GroupingColumnMode](type-aliases/GroupingColumnMode.md)\n- [GroupingState](type-aliases/GroupingState.md)\n- [Header](type-aliases/Header.md)\n- [HeaderGroup](type-aliases/HeaderGroup.md)\n- [IdentifiedColumnDef](type-aliases/IdentifiedColumnDef.md)\n- [InitRowInstanceData](type-aliases/InitRowInstanceData.md)\n- [MemoFnMeta](type-aliases/MemoFnMeta.md)\n- [NoInfer](type-aliases/NoInfer.md)\n- [OnChangeFn](type-aliases/OnChangeFn.md)\n- [PartialKeys](type-aliases/PartialKeys.md)\n- [Prettify](type-aliases/Prettify.md)\n- [PrototypeAPIObject](type-aliases/PrototypeAPIObject.md)\n- [RequiredKeys](type-aliases/RequiredKeys.md)\n- [Row](type-aliases/Row.md)\n- [RowData](type-aliases/RowData.md)\n- [RowModelFns](type-aliases/RowModelFns.md)\n- [RowModelFns\\_All](type-aliases/RowModelFns_All.md)\n- [RowPinningPosition](type-aliases/RowPinningPosition.md)\n- [RowSelectionState](type-aliases/RowSelectionState.md)\n- [SortDirection](type-aliases/SortDirection.md)\n- [SortFnOption](type-aliases/SortFnOption.md)\n- [SortingState](type-aliases/SortingState.md)\n- [StringOrTemplateHeader](type-aliases/StringOrTemplateHeader.md)\n- [Table](type-aliases/Table.md)\n- [Table\\_Core](type-aliases/Table_Core.md)\n- [Table\\_Internal](type-aliases/Table_Internal.md)\n- [Table\\_RowModels](type-aliases/Table_RowModels.md)\n- [TableHelper\\_Core](type-aliases/TableHelper_Core.md)\n- [TableHelperOptions](type-aliases/TableHelperOptions.md)\n- [TableOptions](type-aliases/TableOptions.md)\n- [TableOptions\\_All](type-aliases/TableOptions_All.md)\n- [TableState](type-aliases/TableState.md)\n- [TableState\\_All](type-aliases/TableState_All.md)\n- [TransformFilterValueFn](type-aliases/TransformFilterValueFn.md)\n- [UnionToIntersection](type-aliases/UnionToIntersection.md)\n- [Updater](type-aliases/Updater.md)\n- [VisibilityDefaultOptions](type-aliases/VisibilityDefaultOptions.md)\n\n## Variables\n\n- [$internalMemoFnMeta](variables/$internalMemoFnMeta.md)\n- [aggregationFn\\_count](variables/aggregationFn_count.md)\n- [aggregationFn\\_extent](variables/aggregationFn_extent.md)\n- [aggregationFn\\_max](variables/aggregationFn_max.md)\n- [aggregationFn\\_mean](variables/aggregationFn_mean.md)\n- [aggregationFn\\_median](variables/aggregationFn_median.md)\n- [aggregationFn\\_min](variables/aggregationFn_min.md)\n- [aggregationFn\\_sum](variables/aggregationFn_sum.md)\n- [aggregationFn\\_unique](variables/aggregationFn_unique.md)\n- [aggregationFn\\_uniqueCount](variables/aggregationFn_uniqueCount.md)\n- [aggregationFns](variables/aggregationFns.md)\n- [columnFacetingFeature](variables/columnFacetingFeature.md)\n- [columnFilteringFeature](variables/columnFilteringFeature.md)\n- [columnGroupingFeature](variables/columnGroupingFeature.md)\n- [columnOrderingFeature](variables/columnOrderingFeature.md)\n- [columnPinningFeature](variables/columnPinningFeature.md)\n- [columnResizingFeature](variables/columnResizingFeature.md)\n- [columnSizingFeature](variables/columnSizingFeature.md)\n- [columnVisibilityFeature](variables/columnVisibilityFeature.md)\n- [coreCellsFeature](variables/coreCellsFeature.md)\n- [coreColumnsFeature](variables/coreColumnsFeature.md)\n- [coreFeatures](variables/coreFeatures.md)\n- [coreHeadersFeature](variables/coreHeadersFeature.md)\n- [coreRowModelsFeature](variables/coreRowModelsFeature.md)\n- [coreRowsFeature](variables/coreRowsFeature.md)\n- [coreTablesFeature](variables/coreTablesFeature.md)\n- [filterFn\\_arrHas](variables/filterFn_arrHas.md)\n- [filterFn\\_arrIncludes](variables/filterFn_arrIncludes.md)\n- [filterFn\\_arrIncludesAll](variables/filterFn_arrIncludesAll.md)\n- [filterFn\\_arrIncludesSome](variables/filterFn_arrIncludesSome.md)\n- [filterFn\\_equals](variables/filterFn_equals.md)\n- [filterFn\\_equalsString](variables/filterFn_equalsString.md)\n- [filterFn\\_equalsStringSensitive](variables/filterFn_equalsStringSensitive.md)\n- [filterFn\\_greaterThan](variables/filterFn_greaterThan.md)\n- [filterFn\\_greaterThanOrEqualTo](variables/filterFn_greaterThanOrEqualTo.md)\n- [filterFn\\_includesString](variables/filterFn_includesString.md)\n- [filterFn\\_includesStringSensitive](variables/filterFn_includesStringSensitive.md)\n- [filterFn\\_inNumberRange](variables/filterFn_inNumberRange.md)\n- [filterFn\\_lessThan](variables/filterFn_lessThan.md)\n- [filterFn\\_lessThanOrEqualTo](variables/filterFn_lessThanOrEqualTo.md)\n- [filterFn\\_weakEquals](variables/filterFn_weakEquals.md)\n- [filterFns](variables/filterFns.md)\n- [globalFilteringFeature](variables/globalFilteringFeature.md)\n- [reSplitAlphaNumeric](variables/reSplitAlphaNumeric.md)\n- [rowExpandingFeature](variables/rowExpandingFeature.md)\n- [rowPaginationFeature](variables/rowPaginationFeature.md)\n- [rowPinningFeature](variables/rowPinningFeature.md)\n- [rowSelectionFeature](variables/rowSelectionFeature.md)\n- [rowSortingFeature](variables/rowSortingFeature.md)\n- [sortFn\\_alphanumeric](variables/sortFn_alphanumeric.md)\n- [sortFn\\_alphanumericCaseSensitive](variables/sortFn_alphanumericCaseSensitive.md)\n- [sortFn\\_basic](variables/sortFn_basic.md)\n- [sortFn\\_datetime](variables/sortFn_datetime.md)\n- [sortFn\\_text](variables/sortFn_text.md)\n- [sortFn\\_textCaseSensitive](variables/sortFn_textCaseSensitive.md)\n- [sortFns](variables/sortFns.md)\n- [stockFeatures](variables/stockFeatures.md)\n\n## Functions\n\n- [assignPrototypeAPIs](functions/assignPrototypeAPIs.md)\n- [assignTableAPIs](functions/assignTableAPIs.md)\n- [buildHeaderGroups](functions/buildHeaderGroups.md)\n- [callMemoOrStaticFn](functions/callMemoOrStaticFn.md)\n- [cell\\_getContext](functions/cell_getContext.md)\n- [cell\\_getIsAggregated](functions/cell_getIsAggregated.md)\n- [cell\\_getIsGrouped](functions/cell_getIsGrouped.md)\n- [cell\\_getIsPlaceholder](functions/cell_getIsPlaceholder.md)\n- [cell\\_getValue](functions/cell_getValue.md)\n- [cell\\_renderValue](functions/cell_renderValue.md)\n- [column\\_clearSorting](functions/column_clearSorting.md)\n- [column\\_getAfter](functions/column_getAfter.md)\n- [column\\_getAggregationFn](functions/column_getAggregationFn.md)\n- [column\\_getAutoAggregationFn](functions/column_getAutoAggregationFn.md)\n- [column\\_getAutoFilterFn](functions/column_getAutoFilterFn.md)\n- [column\\_getAutoSortDir](functions/column_getAutoSortDir.md)\n- [column\\_getAutoSortFn](functions/column_getAutoSortFn.md)\n- [column\\_getCanFilter](functions/column_getCanFilter.md)\n- [column\\_getCanGlobalFilter](functions/column_getCanGlobalFilter.md)\n- [column\\_getCanGroup](functions/column_getCanGroup.md)\n- [column\\_getCanHide](functions/column_getCanHide.md)\n- [column\\_getCanMultiSort](functions/column_getCanMultiSort.md)\n- [column\\_getCanPin](functions/column_getCanPin.md)\n- [column\\_getCanResize](functions/column_getCanResize.md)\n- [column\\_getCanSort](functions/column_getCanSort.md)\n- [column\\_getFacetedMinMaxValues](functions/column_getFacetedMinMaxValues.md)\n- [column\\_getFacetedRowModel](functions/column_getFacetedRowModel.md)\n- [column\\_getFacetedUniqueValues](functions/column_getFacetedUniqueValues.md)\n- [column\\_getFilterFn](functions/column_getFilterFn.md)\n- [column\\_getFilterIndex](functions/column_getFilterIndex.md)\n- [column\\_getFilterValue](functions/column_getFilterValue.md)\n- [column\\_getFirstSortDir](functions/column_getFirstSortDir.md)\n- [column\\_getFlatColumns](functions/column_getFlatColumns.md)\n- [column\\_getGroupedIndex](functions/column_getGroupedIndex.md)\n- [column\\_getIndex](functions/column_getIndex.md)\n- [column\\_getIsFiltered](functions/column_getIsFiltered.md)\n- [column\\_getIsFirstColumn](functions/column_getIsFirstColumn.md)\n- [column\\_getIsGrouped](functions/column_getIsGrouped.md)\n- [column\\_getIsLastColumn](functions/column_getIsLastColumn.md)\n- [column\\_getIsPinned](functions/column_getIsPinned.md)\n- [column\\_getIsResizing](functions/column_getIsResizing.md)\n- [column\\_getIsSorted](functions/column_getIsSorted.md)\n- [column\\_getIsVisible](functions/column_getIsVisible.md)\n- [column\\_getLeafColumns](functions/column_getLeafColumns.md)\n- [column\\_getNextSortingOrder](functions/column_getNextSortingOrder.md)\n- [column\\_getPinnedIndex](functions/column_getPinnedIndex.md)\n- [column\\_getSize](functions/column_getSize.md)\n- [column\\_getSortFn](functions/column_getSortFn.md)\n- [column\\_getSortIndex](functions/column_getSortIndex.md)\n- [column\\_getStart](functions/column_getStart.md)\n- [column\\_getToggleGroupingHandler](functions/column_getToggleGroupingHandler.md)\n- [column\\_getToggleSortingHandler](functions/column_getToggleSortingHandler.md)\n- [column\\_getToggleVisibilityHandler](functions/column_getToggleVisibilityHandler.md)\n- [column\\_pin](functions/column_pin.md)\n- [column\\_resetSize](functions/column_resetSize.md)\n- [column\\_setFilterValue](functions/column_setFilterValue.md)\n- [column\\_toggleGrouping](functions/column_toggleGrouping.md)\n- [column\\_toggleSorting](functions/column_toggleSorting.md)\n- [column\\_toggleVisibility](functions/column_toggleVisibility.md)\n- [constructCell](functions/constructCell.md)\n- [constructColumn](functions/constructColumn.md)\n- [constructColumnFacetingFeature](functions/constructColumnFacetingFeature.md)\n- [constructColumnFilteringFeature](functions/constructColumnFilteringFeature.md)\n- [constructColumnGroupingFeature](functions/constructColumnGroupingFeature.md)\n- [constructColumnOrderingFeature](functions/constructColumnOrderingFeature.md)\n- [constructColumnPinningFeature](functions/constructColumnPinningFeature.md)\n- [constructColumnResizingFeature](functions/constructColumnResizingFeature.md)\n- [constructColumnSizingFeature](functions/constructColumnSizingFeature.md)\n- [constructColumnVisibilityFeature](functions/constructColumnVisibilityFeature.md)\n- [constructCoreCellsFeature](functions/constructCoreCellsFeature.md)\n- [constructCoreColumnsFeature](functions/constructCoreColumnsFeature.md)\n- [constructCoreHeadersFeature](functions/constructCoreHeadersFeature.md)\n- [constructCoreRowModelsFeature](functions/constructCoreRowModelsFeature.md)\n- [constructCoreRowsFeature](functions/constructCoreRowsFeature.md)\n- [constructCoreTablesFeature](functions/constructCoreTablesFeature.md)\n- [constructGlobalFilteringFeature](functions/constructGlobalFilteringFeature.md)\n- [constructHeader](functions/constructHeader.md)\n- [constructRow](functions/constructRow.md)\n- [constructRowExpandingFeature](functions/constructRowExpandingFeature.md)\n- [constructRowPaginationFeature](functions/constructRowPaginationFeature.md)\n- [constructRowPinningFeature](functions/constructRowPinningFeature.md)\n- [constructRowSelectionFeature](functions/constructRowSelectionFeature.md)\n- [constructRowSortingFeature](functions/constructRowSortingFeature.md)\n- [constructTable](functions/constructTable.md)\n- [constructTableHelper](functions/constructTableHelper.md)\n- [createColumnHelper](functions/createColumnHelper.md)\n- [createCoreRowModel](functions/createCoreRowModel.md)\n- [createExpandedRowModel](functions/createExpandedRowModel.md)\n- [createFacetedMinMaxValues](functions/createFacetedMinMaxValues.md)\n- [createFacetedRowModel](functions/createFacetedRowModel.md)\n- [createFacetedUniqueValues](functions/createFacetedUniqueValues.md)\n- [createFilteredRowModel](functions/createFilteredRowModel.md)\n- [createGroupedRowModel](functions/createGroupedRowModel.md)\n- [createPaginatedRowModel](functions/createPaginatedRowModel.md)\n- [createSortedRowModel](functions/createSortedRowModel.md)\n- [createTableStore](functions/createTableStore.md)\n- [expandRows](functions/expandRows.md)\n- [flattenBy](functions/flattenBy.md)\n- [functionalUpdate](functions/functionalUpdate.md)\n- [getDefaultColumnFiltersState](functions/getDefaultColumnFiltersState.md)\n- [getDefaultColumnOrderState](functions/getDefaultColumnOrderState.md)\n- [getDefaultColumnPinningState](functions/getDefaultColumnPinningState.md)\n- [getDefaultColumnResizingState](functions/getDefaultColumnResizingState.md)\n- [getDefaultColumnSizingColumnDef](functions/getDefaultColumnSizingColumnDef.md)\n- [getDefaultColumnSizingState](functions/getDefaultColumnSizingState.md)\n- [getDefaultColumnVisibilityState](functions/getDefaultColumnVisibilityState.md)\n- [getDefaultExpandedState](functions/getDefaultExpandedState.md)\n- [getDefaultGroupingState](functions/getDefaultGroupingState.md)\n- [getDefaultPaginationState](functions/getDefaultPaginationState.md)\n- [getDefaultRowPinningState](functions/getDefaultRowPinningState.md)\n- [getDefaultRowSelectionState](functions/getDefaultRowSelectionState.md)\n- [getDefaultSortingState](functions/getDefaultSortingState.md)\n- [getFunctionNameInfo](functions/getFunctionNameInfo.md)\n- [getInitialTableState](functions/getInitialTableState.md)\n- [getMemoFnMeta](functions/getMemoFnMeta.md)\n- [header\\_getContext](functions/header_getContext.md)\n- [header\\_getLeafHeaders](functions/header_getLeafHeaders.md)\n- [header\\_getResizeHandler](functions/header_getResizeHandler.md)\n- [header\\_getSize](functions/header_getSize.md)\n- [header\\_getStart](functions/header_getStart.md)\n- [isFunction](functions/isFunction.md)\n- [isNumberArray](functions/isNumberArray.md)\n- [isRowSelected](functions/isRowSelected.md)\n- [isSubRowSelected](functions/isSubRowSelected.md)\n- [isTouchStartEvent](functions/isTouchStartEvent.md)\n- [makeStateUpdater](functions/makeStateUpdater.md)\n- [memo](functions/memo.md)\n- [noop](functions/noop.md)\n- [orderColumns](functions/orderColumns.md)\n- [passiveEventSupported](functions/passiveEventSupported.md)\n- [row\\_getAllCells](functions/row_getAllCells.md)\n- [row\\_getAllCellsByColumnId](functions/row_getAllCellsByColumnId.md)\n- [row\\_getAllVisibleCells](functions/row_getAllVisibleCells.md)\n- [row\\_getCanExpand](functions/row_getCanExpand.md)\n- [row\\_getCanMultiSelect](functions/row_getCanMultiSelect.md)\n- [row\\_getCanPin](functions/row_getCanPin.md)\n- [row\\_getCanSelect](functions/row_getCanSelect.md)\n- [row\\_getCanSelectSubRows](functions/row_getCanSelectSubRows.md)\n- [row\\_getCenterVisibleCells](functions/row_getCenterVisibleCells.md)\n- [row\\_getGroupingValue](functions/row_getGroupingValue.md)\n- [row\\_getIsAllParentsExpanded](functions/row_getIsAllParentsExpanded.md)\n- [row\\_getIsAllSubRowsSelected](functions/row_getIsAllSubRowsSelected.md)\n- [row\\_getIsExpanded](functions/row_getIsExpanded.md)\n- [row\\_getIsGrouped](functions/row_getIsGrouped.md)\n- [row\\_getIsPinned](functions/row_getIsPinned.md)\n- [row\\_getIsSelected](functions/row_getIsSelected.md)\n- [row\\_getIsSomeSelected](functions/row_getIsSomeSelected.md)\n- [row\\_getLeafRows](functions/row_getLeafRows.md)\n- [row\\_getLeftVisibleCells](functions/row_getLeftVisibleCells.md)\n- [row\\_getParentRow](functions/row_getParentRow.md)\n- [row\\_getParentRows](functions/row_getParentRows.md)\n- [row\\_getPinnedIndex](functions/row_getPinnedIndex.md)\n- [row\\_getRightVisibleCells](functions/row_getRightVisibleCells.md)\n- [row\\_getToggleExpandedHandler](functions/row_getToggleExpandedHandler.md)\n- [row\\_getToggleSelectedHandler](functions/row_getToggleSelectedHandler.md)\n- [row\\_getUniqueValues](functions/row_getUniqueValues.md)\n- [row\\_getValue](functions/row_getValue.md)\n- [row\\_getVisibleCells](functions/row_getVisibleCells.md)\n- [row\\_pin](functions/row_pin.md)\n- [row\\_renderValue](functions/row_renderValue.md)\n- [row\\_toggleExpanded](functions/row_toggleExpanded.md)\n- [row\\_toggleSelected](functions/row_toggleSelected.md)\n- [selectRowsFn](functions/selectRowsFn.md)\n- [shouldAutoRemoveFilter](functions/shouldAutoRemoveFilter.md)\n- [table\\_autoResetExpanded](functions/table_autoResetExpanded.md)\n- [table\\_autoResetPageIndex](functions/table_autoResetPageIndex.md)\n- [table\\_firstPage](functions/table_firstPage.md)\n- [table\\_getAllColumns](functions/table_getAllColumns.md)\n- [table\\_getAllFlatColumns](functions/table_getAllFlatColumns.md)\n- [table\\_getAllFlatColumnsById](functions/table_getAllFlatColumnsById.md)\n- [table\\_getAllLeafColumns](functions/table_getAllLeafColumns.md)\n- [table\\_getBottomRows](functions/table_getBottomRows.md)\n- [table\\_getCanNextPage](functions/table_getCanNextPage.md)\n- [table\\_getCanPreviousPage](functions/table_getCanPreviousPage.md)\n- [table\\_getCanSomeRowsExpand](functions/table_getCanSomeRowsExpand.md)\n- [table\\_getCenterFlatHeaders](functions/table_getCenterFlatHeaders.md)\n- [table\\_getCenterFooterGroups](functions/table_getCenterFooterGroups.md)\n- [table\\_getCenterHeaderGroups](functions/table_getCenterHeaderGroups.md)\n- [table\\_getCenterLeafColumns](functions/table_getCenterLeafColumns.md)\n- [table\\_getCenterLeafHeaders](functions/table_getCenterLeafHeaders.md)\n- [table\\_getCenterRows](functions/table_getCenterRows.md)\n- [table\\_getCenterTotalSize](functions/table_getCenterTotalSize.md)\n- [table\\_getCenterVisibleLeafColumns](functions/table_getCenterVisibleLeafColumns.md)\n- [table\\_getColumn](functions/table_getColumn.md)\n- [table\\_getCoreRowModel](functions/table_getCoreRowModel.md)\n- [table\\_getDefaultColumnDef](functions/table_getDefaultColumnDef.md)\n- [table\\_getExpandedDepth](functions/table_getExpandedDepth.md)\n- [table\\_getExpandedRowModel](functions/table_getExpandedRowModel.md)\n- [table\\_getFilteredRowModel](functions/table_getFilteredRowModel.md)\n- [table\\_getFilteredSelectedRowModel](functions/table_getFilteredSelectedRowModel.md)\n- [table\\_getFlatHeaders](functions/table_getFlatHeaders.md)\n- [table\\_getFooterGroups](functions/table_getFooterGroups.md)\n- [table\\_getGlobalAutoFilterFn](functions/table_getGlobalAutoFilterFn.md)\n- [table\\_getGlobalFacetedMinMaxValues](functions/table_getGlobalFacetedMinMaxValues.md)\n- [table\\_getGlobalFacetedRowModel](functions/table_getGlobalFacetedRowModel.md)\n- [table\\_getGlobalFacetedUniqueValues](functions/table_getGlobalFacetedUniqueValues.md)\n- [table\\_getGlobalFilterFn](functions/table_getGlobalFilterFn.md)\n- [table\\_getGroupedRowModel](functions/table_getGroupedRowModel.md)\n- [table\\_getGroupedSelectedRowModel](functions/table_getGroupedSelectedRowModel.md)\n- [table\\_getHeaderGroups](functions/table_getHeaderGroups.md)\n- [table\\_getIsAllColumnsVisible](functions/table_getIsAllColumnsVisible.md)\n- [table\\_getIsAllPageRowsSelected](functions/table_getIsAllPageRowsSelected.md)\n- [table\\_getIsAllRowsExpanded](functions/table_getIsAllRowsExpanded.md)\n- [table\\_getIsAllRowsSelected](functions/table_getIsAllRowsSelected.md)\n- [table\\_getIsSomeColumnsPinned](functions/table_getIsSomeColumnsPinned.md)\n- [table\\_getIsSomeColumnsVisible](functions/table_getIsSomeColumnsVisible.md)\n- [table\\_getIsSomePageRowsSelected](functions/table_getIsSomePageRowsSelected.md)\n- [table\\_getIsSomeRowsExpanded](functions/table_getIsSomeRowsExpanded.md)\n- [table\\_getIsSomeRowsPinned](functions/table_getIsSomeRowsPinned.md)\n- [table\\_getIsSomeRowsSelected](functions/table_getIsSomeRowsSelected.md)\n- [table\\_getLeafHeaders](functions/table_getLeafHeaders.md)\n- [table\\_getLeftFlatHeaders](functions/table_getLeftFlatHeaders.md)\n- [table\\_getLeftFooterGroups](functions/table_getLeftFooterGroups.md)\n- [table\\_getLeftHeaderGroups](functions/table_getLeftHeaderGroups.md)\n- [table\\_getLeftLeafColumns](functions/table_getLeftLeafColumns.md)\n- [table\\_getLeftLeafHeaders](functions/table_getLeftLeafHeaders.md)\n- [table\\_getLeftTotalSize](functions/table_getLeftTotalSize.md)\n- [table\\_getLeftVisibleLeafColumns](functions/table_getLeftVisibleLeafColumns.md)\n- [table\\_getOrderColumnsFn](functions/table_getOrderColumnsFn.md)\n- [table\\_getPageCount](functions/table_getPageCount.md)\n- [table\\_getPageOptions](functions/table_getPageOptions.md)\n- [table\\_getPaginatedRowModel](functions/table_getPaginatedRowModel.md)\n- [table\\_getPinnedLeafColumns](functions/table_getPinnedLeafColumns.md)\n- [table\\_getPinnedVisibleLeafColumns](functions/table_getPinnedVisibleLeafColumns.md)\n- [table\\_getPreExpandedRowModel](functions/table_getPreExpandedRowModel.md)\n- [table\\_getPreFilteredRowModel](functions/table_getPreFilteredRowModel.md)\n- [table\\_getPreGroupedRowModel](functions/table_getPreGroupedRowModel.md)\n- [table\\_getPrePaginatedRowModel](functions/table_getPrePaginatedRowModel.md)\n- [table\\_getPreSelectedRowModel](functions/table_getPreSelectedRowModel.md)\n- [table\\_getPreSortedRowModel](functions/table_getPreSortedRowModel.md)\n- [table\\_getRightFlatHeaders](functions/table_getRightFlatHeaders.md)\n- [table\\_getRightFooterGroups](functions/table_getRightFooterGroups.md)\n- [table\\_getRightHeaderGroups](functions/table_getRightHeaderGroups.md)\n- [table\\_getRightLeafColumns](functions/table_getRightLeafColumns.md)\n- [table\\_getRightLeafHeaders](functions/table_getRightLeafHeaders.md)\n- [table\\_getRightTotalSize](functions/table_getRightTotalSize.md)\n- [table\\_getRightVisibleLeafColumns](functions/table_getRightVisibleLeafColumns.md)\n- [table\\_getRow](functions/table_getRow.md)\n- [table\\_getRowCount](functions/table_getRowCount.md)\n- [table\\_getRowId](functions/table_getRowId.md)\n- [table\\_getRowModel](functions/table_getRowModel.md)\n- [table\\_getSelectedRowModel](functions/table_getSelectedRowModel.md)\n- [table\\_getSortedRowModel](functions/table_getSortedRowModel.md)\n- [table\\_getToggleAllColumnsVisibilityHandler](functions/table_getToggleAllColumnsVisibilityHandler.md)\n- [table\\_getToggleAllPageRowsSelectedHandler](functions/table_getToggleAllPageRowsSelectedHandler.md)\n- [table\\_getToggleAllRowsExpandedHandler](functions/table_getToggleAllRowsExpandedHandler.md)\n- [table\\_getToggleAllRowsSelectedHandler](functions/table_getToggleAllRowsSelectedHandler.md)\n- [table\\_getTopRows](functions/table_getTopRows.md)\n- [table\\_getTotalSize](functions/table_getTotalSize.md)\n- [table\\_getVisibleFlatColumns](functions/table_getVisibleFlatColumns.md)\n- [table\\_getVisibleLeafColumns](functions/table_getVisibleLeafColumns.md)\n- [table\\_lastPage](functions/table_lastPage.md)\n- [table\\_mergeOptions](functions/table_mergeOptions.md)\n- [table\\_nextPage](functions/table_nextPage.md)\n- [table\\_previousPage](functions/table_previousPage.md)\n- [table\\_reset](functions/table_reset.md)\n- [table\\_resetColumnFilters](functions/table_resetColumnFilters.md)\n- [table\\_resetColumnOrder](functions/table_resetColumnOrder.md)\n- [table\\_resetColumnPinning](functions/table_resetColumnPinning.md)\n- [table\\_resetColumnSizing](functions/table_resetColumnSizing.md)\n- [table\\_resetColumnVisibility](functions/table_resetColumnVisibility.md)\n- [table\\_resetExpanded](functions/table_resetExpanded.md)\n- [table\\_resetGlobalFilter](functions/table_resetGlobalFilter.md)\n- [table\\_resetGrouping](functions/table_resetGrouping.md)\n- [table\\_resetHeaderSizeInfo](functions/table_resetHeaderSizeInfo.md)\n- [table\\_resetPageIndex](functions/table_resetPageIndex.md)\n- [table\\_resetPageSize](functions/table_resetPageSize.md)\n- [table\\_resetPagination](functions/table_resetPagination.md)\n- [table\\_resetRowPinning](functions/table_resetRowPinning.md)\n- [table\\_resetRowSelection](functions/table_resetRowSelection.md)\n- [table\\_resetSorting](functions/table_resetSorting.md)\n- [table\\_setColumnFilters](functions/table_setColumnFilters.md)\n- [table\\_setColumnOrder](functions/table_setColumnOrder.md)\n- [table\\_setColumnPinning](functions/table_setColumnPinning.md)\n- [table\\_setColumnResizing](functions/table_setColumnResizing.md)\n- [table\\_setColumnSizing](functions/table_setColumnSizing.md)\n- [table\\_setColumnVisibility](functions/table_setColumnVisibility.md)\n- [table\\_setExpanded](functions/table_setExpanded.md)\n- [table\\_setGlobalFilter](functions/table_setGlobalFilter.md)\n- [table\\_setGrouping](functions/table_setGrouping.md)\n- [table\\_setOptions](functions/table_setOptions.md)\n- [table\\_setPageIndex](functions/table_setPageIndex.md)\n- [table\\_setPageSize](functions/table_setPageSize.md)\n- [table\\_setPagination](functions/table_setPagination.md)\n- [table\\_setRowPinning](functions/table_setRowPinning.md)\n- [table\\_setRowSelection](functions/table_setRowSelection.md)\n- [table\\_setSorting](functions/table_setSorting.md)\n- [table\\_toggleAllColumnsVisible](functions/table_toggleAllColumnsVisible.md)\n- [table\\_toggleAllPageRowsSelected](functions/table_toggleAllPageRowsSelected.md)\n- [table\\_toggleAllRowsExpanded](functions/table_toggleAllRowsExpanded.md)\n- [table\\_toggleAllRowsSelected](functions/table_toggleAllRowsSelected.md)\n- [tableFeatures](functions/tableFeatures.md)\n- [tableMemo](functions/tableMemo.md)\n- [tableOptions](functions/tableOptions.md)\n"
  },
  {
    "path": "docs/reference/interfaces/API.md",
    "content": "---\nid: API\ntitle: API\n---\n\n# Interface: API\\<TDeps, TDepArgs\\>\n\nDefined in: [utils.ts:267](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L267)\n\n## Type Parameters\n\n### TDeps\n\n`TDeps` *extends* `ReadonlyArray`\\<`any`\\>\n\n### TDepArgs\n\n`TDepArgs`\n\n## Properties\n\n### fn()\n\n```ts\nfn: (...args) => any;\n```\n\nDefined in: [utils.ts:268](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L268)\n\n#### Parameters\n\n##### args\n\n...`any`\n\n#### Returns\n\n`any`\n\n***\n\n### memoDeps()?\n\n```ts\noptional memoDeps: (depArgs?) => any[] | undefined;\n```\n\nDefined in: [utils.ts:269](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L269)\n\n#### Parameters\n\n##### depArgs?\n\n`any`\n\n#### Returns\n\n`any`[] \\| `undefined`\n"
  },
  {
    "path": "docs/reference/interfaces/AggregationFns.md",
    "content": "---\nid: AggregationFns\ntitle: AggregationFns\n---\n\n# Interface: AggregationFns\n\nDefined in: [features/column-grouping/columnGroupingFeature.types.ts:28](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L28)\n"
  },
  {
    "path": "docs/reference/interfaces/CachedRowModel_Core.md",
    "content": "---\nid: CachedRowModel_Core\ntitle: CachedRowModel_Core\n---\n\n# Interface: CachedRowModel\\_Core\\<TFeatures, TData\\>\n\nDefined in: [core/row-models/coreRowModelsFeature.types.ts:37](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.types.ts#L37)\n\n## Extends\n\n- [`CachedRowModel_Plugins`](CachedRowModel_Plugins.md)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Properties\n\n### coreRowModel()\n\n```ts\ncoreRowModel: () => RowModel<TFeatures, TData>;\n```\n\nDefined in: [core/row-models/coreRowModelsFeature.types.ts:41](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.types.ts#L41)\n\n#### Returns\n\n[`RowModel`](RowModel.md)\\<`TFeatures`, `TData`\\>\n"
  },
  {
    "path": "docs/reference/interfaces/CachedRowModel_Expanded.md",
    "content": "---\nid: CachedRowModel_Expanded\ntitle: CachedRowModel_Expanded\n---\n\n# Interface: CachedRowModel\\_Expanded\\<TFeatures, TData\\>\n\nDefined in: [features/row-expanding/rowExpandingFeature.types.ts:136](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L136)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Properties\n\n### expandedRowModel()\n\n```ts\nexpandedRowModel: () => RowModel<TFeatures, TData>;\n```\n\nDefined in: [features/row-expanding/rowExpandingFeature.types.ts:140](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L140)\n\n#### Returns\n\n[`RowModel`](RowModel.md)\\<`TFeatures`, `TData`\\>\n"
  },
  {
    "path": "docs/reference/interfaces/CachedRowModel_Faceted.md",
    "content": "---\nid: CachedRowModel_Faceted\ntitle: CachedRowModel_Faceted\n---\n\n# Interface: CachedRowModel\\_Faceted\\<TFeatures, TData\\>\n\nDefined in: [features/column-faceting/columnFacetingFeature.types.ts:72](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L72)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Properties\n\n### facetedMinMaxValues()?\n\n```ts\noptional facetedMinMaxValues: (columnId) => [number, number];\n```\n\nDefined in: [features/column-faceting/columnFacetingFeature.types.ts:77](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L77)\n\n#### Parameters\n\n##### columnId\n\n`string`\n\n#### Returns\n\n\\[`number`, `number`\\]\n\n***\n\n### facetedRowModel()?\n\n```ts\noptional facetedRowModel: (columnId) => () => RowModel<TFeatures, TData>;\n```\n\nDefined in: [features/column-faceting/columnFacetingFeature.types.ts:76](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L76)\n\n#### Parameters\n\n##### columnId\n\n`string`\n\n#### Returns\n\n```ts\n(): RowModel<TFeatures, TData>;\n```\n\n##### Returns\n\n[`RowModel`](RowModel.md)\\<`TFeatures`, `TData`\\>\n\n***\n\n### facetedUniqueValues()?\n\n```ts\noptional facetedUniqueValues: (columnId) => Map<any, number>;\n```\n\nDefined in: [features/column-faceting/columnFacetingFeature.types.ts:78](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L78)\n\n#### Parameters\n\n##### columnId\n\n`string`\n\n#### Returns\n\n`Map`\\<`any`, `number`\\>\n"
  },
  {
    "path": "docs/reference/interfaces/CachedRowModel_Filtered.md",
    "content": "---\nid: CachedRowModel_Filtered\ntitle: CachedRowModel_Filtered\n---\n\n# Interface: CachedRowModel\\_Filtered\\<TFeatures, TData\\>\n\nDefined in: [features/column-filtering/columnFilteringFeature.types.ts:214](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L214)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Properties\n\n### filteredRowModel()\n\n```ts\nfilteredRowModel: () => RowModel<TFeatures, TData>;\n```\n\nDefined in: [features/column-filtering/columnFilteringFeature.types.ts:218](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L218)\n\n#### Returns\n\n[`RowModel`](RowModel.md)\\<`TFeatures`, `TData`\\>\n"
  },
  {
    "path": "docs/reference/interfaces/CachedRowModel_Grouped.md",
    "content": "---\nid: CachedRowModel_Grouped\ntitle: CachedRowModel_Grouped\n---\n\n# Interface: CachedRowModel\\_Grouped\\<TFeatures, TData\\>\n\nDefined in: [features/column-grouping/columnGroupingFeature.types.ts:213](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L213)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Properties\n\n### groupedRowModel()\n\n```ts\ngroupedRowModel: () => RowModel<TFeatures, TData>;\n```\n\nDefined in: [features/column-grouping/columnGroupingFeature.types.ts:217](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L217)\n\n#### Returns\n\n[`RowModel`](RowModel.md)\\<`TFeatures`, `TData`\\>\n"
  },
  {
    "path": "docs/reference/interfaces/CachedRowModel_Paginated.md",
    "content": "---\nid: CachedRowModel_Paginated\ntitle: CachedRowModel_Paginated\n---\n\n# Interface: CachedRowModel\\_Paginated\\<TFeatures, TData\\>\n\nDefined in: [features/row-pagination/rowPaginationFeature.types.ts:136](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L136)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Properties\n\n### paginatedRowModel()\n\n```ts\npaginatedRowModel: () => RowModel<TFeatures, TData>;\n```\n\nDefined in: [features/row-pagination/rowPaginationFeature.types.ts:140](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L140)\n\n#### Returns\n\n[`RowModel`](RowModel.md)\\<`TFeatures`, `TData`\\>\n"
  },
  {
    "path": "docs/reference/interfaces/CachedRowModel_Plugins.md",
    "content": "---\nid: CachedRowModel_Plugins\ntitle: CachedRowModel_Plugins\n---\n\n# Interface: CachedRowModel\\_Plugins\n\nDefined in: [core/row-models/coreRowModelsFeature.types.ts:35](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.types.ts#L35)\n\n## Extended by\n\n- [`CachedRowModel_Core`](CachedRowModel_Core.md)\n"
  },
  {
    "path": "docs/reference/interfaces/CachedRowModel_Sorted.md",
    "content": "---\nid: CachedRowModel_Sorted\ntitle: CachedRowModel_Sorted\n---\n\n# Interface: CachedRowModel\\_Sorted\\<TFeatures, TData\\>\n\nDefined in: [features/row-sorting/rowSortingFeature.types.ts:224](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L224)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Properties\n\n### sortedRowModel()\n\n```ts\nsortedRowModel: () => RowModel<TFeatures, TData>;\n```\n\nDefined in: [features/row-sorting/rowSortingFeature.types.ts:228](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L228)\n\n#### Returns\n\n[`RowModel`](RowModel.md)\\<`TFeatures`, `TData`\\>\n"
  },
  {
    "path": "docs/reference/interfaces/CachedRowModels_Plugins.md",
    "content": "---\nid: CachedRowModels_Plugins\ntitle: CachedRowModels_Plugins\n---\n\n# Interface: CachedRowModels\\_Plugins\\<TFeatures, TData\\>\n\nDefined in: [types/RowModel.ts:87](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/RowModel.ts#L87)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n"
  },
  {
    "path": "docs/reference/interfaces/CellContext.md",
    "content": "---\nid: CellContext\ntitle: CellContext\n---\n\n# Interface: CellContext\\<TFeatures, TData, TValue\\>\n\nDefined in: [core/cells/coreCellsFeature.types.ts:8](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.types.ts#L8)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* [`CellData`](../type-aliases/CellData.md) = [`CellData`](../type-aliases/CellData.md)\n\n## Properties\n\n### cell\n\n```ts\ncell: Cell<TFeatures, TData, TValue>;\n```\n\nDefined in: [core/cells/coreCellsFeature.types.ts:13](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.types.ts#L13)\n\n***\n\n### column\n\n```ts\ncolumn: Column<TFeatures, TData, TValue>;\n```\n\nDefined in: [core/cells/coreCellsFeature.types.ts:14](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.types.ts#L14)\n\n***\n\n### getValue\n\n```ts\ngetValue: Getter<TValue>;\n```\n\nDefined in: [core/cells/coreCellsFeature.types.ts:15](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.types.ts#L15)\n\n***\n\n### renderValue\n\n```ts\nrenderValue: Getter<TValue | null>;\n```\n\nDefined in: [core/cells/coreCellsFeature.types.ts:16](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.types.ts#L16)\n\n***\n\n### row\n\n```ts\nrow: Row<TFeatures, TData>;\n```\n\nDefined in: [core/cells/coreCellsFeature.types.ts:17](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.types.ts#L17)\n\n***\n\n### table\n\n```ts\ntable: Table<TFeatures, TData>;\n```\n\nDefined in: [core/cells/coreCellsFeature.types.ts:18](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.types.ts#L18)\n"
  },
  {
    "path": "docs/reference/interfaces/Cell_Cell.md",
    "content": "---\nid: Cell_Cell\ntitle: Cell_Cell\n---\n\n# Interface: Cell\\_Cell\\<TFeatures, TData, TValue\\>\n\nDefined in: [core/cells/coreCellsFeature.types.ts:44](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.types.ts#L44)\n\n## Extends\n\n- [`Cell_CoreProperties`](Cell_CoreProperties.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n## Extended by\n\n- [`Cell_Core`](Cell_Core.md)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* [`CellData`](../type-aliases/CellData.md) = [`CellData`](../type-aliases/CellData.md)\n\n## Properties\n\n### column\n\n```ts\ncolumn: Column<TFeatures, TData, TValue>;\n```\n\nDefined in: [core/cells/coreCellsFeature.types.ts:29](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.types.ts#L29)\n\nThe associated Column object for the cell.\n\n#### Inherited from\n\n[`Cell_CoreProperties`](Cell_CoreProperties.md).[`column`](Cell_CoreProperties.md#column)\n\n***\n\n### getContext()\n\n```ts\ngetContext: () => CellContext<TFeatures, TData, TValue>;\n```\n\nDefined in: [core/cells/coreCellsFeature.types.ts:52](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.types.ts#L52)\n\nReturns the rendering context (or props) for cell-based components like cells and aggregated cells. Use these props with your framework's `flexRender` utility to render these using the template of your choice:\n\n#### Returns\n\n[`CellContext`](CellContext.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n***\n\n### getValue\n\n```ts\ngetValue: Getter<TValue>;\n```\n\nDefined in: [core/cells/coreCellsFeature.types.ts:56](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.types.ts#L56)\n\nReturns the value for the cell, accessed via the associated column's accessor key or accessor function.\n\n***\n\n### id\n\n```ts\nid: string;\n```\n\nDefined in: [core/cells/coreCellsFeature.types.ts:33](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.types.ts#L33)\n\nThe unique ID for the cell across the entire table.\n\n#### Inherited from\n\n[`Cell_CoreProperties`](Cell_CoreProperties.md).[`id`](Cell_CoreProperties.md#id)\n\n***\n\n### renderValue\n\n```ts\nrenderValue: Getter<TValue | null>;\n```\n\nDefined in: [core/cells/coreCellsFeature.types.ts:60](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.types.ts#L60)\n\nRenders the value for a cell the same as `getValue`, but will return the `renderFallbackValue` if no value is found.\n\n***\n\n### row\n\n```ts\nrow: Row<TFeatures, TData>;\n```\n\nDefined in: [core/cells/coreCellsFeature.types.ts:37](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.types.ts#L37)\n\nThe associated Row object for the cell.\n\n#### Inherited from\n\n[`Cell_CoreProperties`](Cell_CoreProperties.md).[`row`](Cell_CoreProperties.md#row)\n\n***\n\n### table\n\n```ts\ntable: Table_Internal<TFeatures, TData>;\n```\n\nDefined in: [core/cells/coreCellsFeature.types.ts:41](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.types.ts#L41)\n\nReference to the parent table instance.\n\n#### Inherited from\n\n[`Cell_CoreProperties`](Cell_CoreProperties.md).[`table`](Cell_CoreProperties.md#table)\n"
  },
  {
    "path": "docs/reference/interfaces/Cell_ColumnGrouping.md",
    "content": "---\nid: Cell_ColumnGrouping\ntitle: Cell_ColumnGrouping\n---\n\n# Interface: Cell\\_ColumnGrouping\n\nDefined in: [features/column-grouping/columnGroupingFeature.types.ts:132](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L132)\n\n## Properties\n\n### getIsAggregated()\n\n```ts\ngetIsAggregated: () => boolean;\n```\n\nDefined in: [features/column-grouping/columnGroupingFeature.types.ts:136](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L136)\n\nReturns whether or not the cell is currently aggregated.\n\n#### Returns\n\n`boolean`\n\n***\n\n### getIsGrouped()\n\n```ts\ngetIsGrouped: () => boolean;\n```\n\nDefined in: [features/column-grouping/columnGroupingFeature.types.ts:140](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L140)\n\nReturns whether or not the cell is currently grouped.\n\n#### Returns\n\n`boolean`\n\n***\n\n### getIsPlaceholder()\n\n```ts\ngetIsPlaceholder: () => boolean;\n```\n\nDefined in: [features/column-grouping/columnGroupingFeature.types.ts:144](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L144)\n\nReturns whether or not the cell is currently a placeholder cell.\n\n#### Returns\n\n`boolean`\n"
  },
  {
    "path": "docs/reference/interfaces/Cell_Core.md",
    "content": "---\nid: Cell_Core\ntitle: Cell_Core\n---\n\n# Interface: Cell\\_Core\\<TFeatures, TData, TValue\\>\n\nDefined in: [types/Cell.ts:16](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/Cell.ts#L16)\n\n## Extends\n\n- [`Cell_Cell`](Cell_Cell.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* [`CellData`](../type-aliases/CellData.md) = [`CellData`](../type-aliases/CellData.md)\n\n## Properties\n\n### column\n\n```ts\ncolumn: Column<TFeatures, TData, TValue>;\n```\n\nDefined in: [core/cells/coreCellsFeature.types.ts:29](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.types.ts#L29)\n\nThe associated Column object for the cell.\n\n#### Inherited from\n\n[`Cell_Cell`](Cell_Cell.md).[`column`](Cell_Cell.md#column)\n\n***\n\n### getContext()\n\n```ts\ngetContext: () => CellContext<TFeatures, TData, TValue>;\n```\n\nDefined in: [core/cells/coreCellsFeature.types.ts:52](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.types.ts#L52)\n\nReturns the rendering context (or props) for cell-based components like cells and aggregated cells. Use these props with your framework's `flexRender` utility to render these using the template of your choice:\n\n#### Returns\n\n[`CellContext`](CellContext.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n#### Inherited from\n\n[`Cell_Cell`](Cell_Cell.md).[`getContext`](Cell_Cell.md#getcontext)\n\n***\n\n### getValue\n\n```ts\ngetValue: Getter<TValue>;\n```\n\nDefined in: [core/cells/coreCellsFeature.types.ts:56](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.types.ts#L56)\n\nReturns the value for the cell, accessed via the associated column's accessor key or accessor function.\n\n#### Inherited from\n\n[`Cell_Cell`](Cell_Cell.md).[`getValue`](Cell_Cell.md#getvalue)\n\n***\n\n### id\n\n```ts\nid: string;\n```\n\nDefined in: [core/cells/coreCellsFeature.types.ts:33](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.types.ts#L33)\n\nThe unique ID for the cell across the entire table.\n\n#### Inherited from\n\n[`Cell_Cell`](Cell_Cell.md).[`id`](Cell_Cell.md#id)\n\n***\n\n### renderValue\n\n```ts\nrenderValue: Getter<TValue | null>;\n```\n\nDefined in: [core/cells/coreCellsFeature.types.ts:60](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.types.ts#L60)\n\nRenders the value for a cell the same as `getValue`, but will return the `renderFallbackValue` if no value is found.\n\n#### Inherited from\n\n[`Cell_Cell`](Cell_Cell.md).[`renderValue`](Cell_Cell.md#rendervalue)\n\n***\n\n### row\n\n```ts\nrow: Row<TFeatures, TData>;\n```\n\nDefined in: [core/cells/coreCellsFeature.types.ts:37](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.types.ts#L37)\n\nThe associated Row object for the cell.\n\n#### Inherited from\n\n[`Cell_Cell`](Cell_Cell.md).[`row`](Cell_Cell.md#row)\n\n***\n\n### table\n\n```ts\ntable: Table_Internal<TFeatures, TData>;\n```\n\nDefined in: [core/cells/coreCellsFeature.types.ts:41](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.types.ts#L41)\n\nReference to the parent table instance.\n\n#### Inherited from\n\n[`Cell_Cell`](Cell_Cell.md).[`table`](Cell_Cell.md#table)\n"
  },
  {
    "path": "docs/reference/interfaces/Cell_CoreProperties.md",
    "content": "---\nid: Cell_CoreProperties\ntitle: Cell_CoreProperties\n---\n\n# Interface: Cell\\_CoreProperties\\<TFeatures, TData, TValue\\>\n\nDefined in: [core/cells/coreCellsFeature.types.ts:21](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.types.ts#L21)\n\n## Extended by\n\n- [`Cell_Cell`](Cell_Cell.md)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* [`CellData`](../type-aliases/CellData.md) = [`CellData`](../type-aliases/CellData.md)\n\n## Properties\n\n### column\n\n```ts\ncolumn: Column<TFeatures, TData, TValue>;\n```\n\nDefined in: [core/cells/coreCellsFeature.types.ts:29](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.types.ts#L29)\n\nThe associated Column object for the cell.\n\n***\n\n### id\n\n```ts\nid: string;\n```\n\nDefined in: [core/cells/coreCellsFeature.types.ts:33](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.types.ts#L33)\n\nThe unique ID for the cell across the entire table.\n\n***\n\n### row\n\n```ts\nrow: Row<TFeatures, TData>;\n```\n\nDefined in: [core/cells/coreCellsFeature.types.ts:37](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.types.ts#L37)\n\nThe associated Row object for the cell.\n\n***\n\n### table\n\n```ts\ntable: Table_Internal<TFeatures, TData>;\n```\n\nDefined in: [core/cells/coreCellsFeature.types.ts:41](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.types.ts#L41)\n\nReference to the parent table instance.\n"
  },
  {
    "path": "docs/reference/interfaces/Cell_Plugins.md",
    "content": "---\nid: Cell_Plugins\ntitle: Cell_Plugins\n---\n\n# Interface: Cell\\_Plugins\\<TFeatures, TData, TValue\\>\n\nDefined in: [types/Cell.ts:10](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/Cell.ts#L10)\n\nUse this interface as a target for declaration merging to add your own plugin properties.\nNote: This will affect the types of all tables in your project.\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* [`CellData`](../type-aliases/CellData.md) = [`CellData`](../type-aliases/CellData.md)\n"
  },
  {
    "path": "docs/reference/interfaces/ColumnDef_ColumnFiltering.md",
    "content": "---\nid: ColumnDef_ColumnFiltering\ntitle: ColumnDef_ColumnFiltering\n---\n\n# Interface: ColumnDef\\_ColumnFiltering\\<TFeatures, TData\\>\n\nDefined in: [features/column-filtering/columnFilteringFeature.types.ts:81](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L81)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Properties\n\n### enableColumnFilter?\n\n```ts\noptional enableColumnFilter: boolean;\n```\n\nDefined in: [features/column-filtering/columnFilteringFeature.types.ts:88](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L88)\n\nEnables/disables the **column** filter for this column.\n\n***\n\n### filterFn?\n\n```ts\noptional filterFn: FilterFnOption<TFeatures, TData>;\n```\n\nDefined in: [features/column-filtering/columnFilteringFeature.types.ts:92](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L92)\n\nThe filter function to use with this column. Can be the name of a built-in filter function or a custom filter function.\n"
  },
  {
    "path": "docs/reference/interfaces/ColumnDef_ColumnGrouping.md",
    "content": "---\nid: ColumnDef_ColumnGrouping\ntitle: ColumnDef_ColumnGrouping\n---\n\n# Interface: ColumnDef\\_ColumnGrouping\\<TFeatures, TData, TValue\\>\n\nDefined in: [features/column-grouping/columnGroupingFeature.types.ts:53](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L53)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* [`CellData`](../type-aliases/CellData.md) = [`CellData`](../type-aliases/CellData.md)\n\n## Properties\n\n### aggregatedCell?\n\n```ts\noptional aggregatedCell: ColumnDefTemplate<ReturnType<Cell<TFeatures, TData, TValue>[\"getContext\"]>>;\n```\n\nDefined in: [features/column-grouping/columnGroupingFeature.types.ts:61](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L61)\n\nThe cell to display each row for the column if the cell is an aggregate. If a function is passed, it will be passed a props object with the context of the cell and should return the property type for your adapter (the exact type depends on the adapter being used).\n\n***\n\n### aggregationFn?\n\n```ts\noptional aggregationFn: AggregationFnOption<TFeatures, TData>;\n```\n\nDefined in: [features/column-grouping/columnGroupingFeature.types.ts:67](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L67)\n\nThe resolved aggregation function for the column.\n\n***\n\n### enableGrouping?\n\n```ts\noptional enableGrouping: boolean;\n```\n\nDefined in: [features/column-grouping/columnGroupingFeature.types.ts:71](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L71)\n\nEnables/disables grouping for this column.\n\n***\n\n### getGroupingValue()?\n\n```ts\noptional getGroupingValue: (row) => any;\n```\n\nDefined in: [features/column-grouping/columnGroupingFeature.types.ts:75](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L75)\n\nSpecify a value to be used for grouping rows on this column. If this option is not specified, the value derived from `accessorKey` / `accessorFn` will be used instead.\n\n#### Parameters\n\n##### row\n\n`TData`\n\n#### Returns\n\n`any`\n"
  },
  {
    "path": "docs/reference/interfaces/ColumnDef_ColumnPinning.md",
    "content": "---\nid: ColumnDef_ColumnPinning\ntitle: ColumnDef_ColumnPinning\n---\n\n# Interface: ColumnDef\\_ColumnPinning\n\nDefined in: [features/column-pinning/columnPinningFeature.types.ts:34](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L34)\n\n## Properties\n\n### enablePinning?\n\n```ts\noptional enablePinning: boolean;\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.types.ts:38](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L38)\n\nEnables/disables column pinning for this column. Defaults to `true`.\n"
  },
  {
    "path": "docs/reference/interfaces/ColumnDef_ColumnResizing.md",
    "content": "---\nid: ColumnDef_ColumnResizing\ntitle: ColumnDef_ColumnResizing\n---\n\n# Interface: ColumnDef\\_ColumnResizing\n\nDefined in: [features/column-resizing/columnResizingFeature.types.ts:55](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L55)\n\n## Properties\n\n### enableResizing?\n\n```ts\noptional enableResizing: boolean;\n```\n\nDefined in: [features/column-resizing/columnResizingFeature.types.ts:59](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L59)\n\nEnables or disables column resizing for the column.\n"
  },
  {
    "path": "docs/reference/interfaces/ColumnDef_ColumnSizing.md",
    "content": "---\nid: ColumnDef_ColumnSizing\ntitle: ColumnDef_ColumnSizing\n---\n\n# Interface: ColumnDef\\_ColumnSizing\n\nDefined in: [features/column-sizing/columnSizingFeature.types.ts:49](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L49)\n\n## Properties\n\n### maxSize?\n\n```ts\noptional maxSize: number;\n```\n\nDefined in: [features/column-sizing/columnSizingFeature.types.ts:53](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L53)\n\nThe maximum allowed size for the column\n\n***\n\n### minSize?\n\n```ts\noptional minSize: number;\n```\n\nDefined in: [features/column-sizing/columnSizingFeature.types.ts:57](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L57)\n\nThe minimum allowed size for the column\n\n***\n\n### size?\n\n```ts\noptional size: number;\n```\n\nDefined in: [features/column-sizing/columnSizingFeature.types.ts:61](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L61)\n\nThe desired size for the column\n"
  },
  {
    "path": "docs/reference/interfaces/ColumnDef_ColumnVisibility.md",
    "content": "---\nid: ColumnDef_ColumnVisibility\ntitle: ColumnDef_ColumnVisibility\n---\n\n# Interface: ColumnDef\\_ColumnVisibility\n\nDefined in: [features/column-visibility/columnVisibilityFeature.types.ts:66](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L66)\n\n## Properties\n\n### enableHiding?\n\n```ts\noptional enableHiding: boolean;\n```\n\nDefined in: [features/column-visibility/columnVisibilityFeature.types.ts:70](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L70)\n\nEnables/disables column hiding for this column. Defaults to `true`.\n"
  },
  {
    "path": "docs/reference/interfaces/ColumnDef_GlobalFiltering.md",
    "content": "---\nid: ColumnDef_GlobalFiltering\ntitle: ColumnDef_GlobalFiltering\n---\n\n# Interface: ColumnDef\\_GlobalFiltering\n\nDefined in: [features/global-filtering/globalFilteringFeature.types.ts:18](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.types.ts#L18)\n\n## Properties\n\n### enableGlobalFilter?\n\n```ts\noptional enableGlobalFilter: boolean;\n```\n\nDefined in: [features/global-filtering/globalFilteringFeature.types.ts:22](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.types.ts#L22)\n\nEnables/disables the **global** filter for this column.\n"
  },
  {
    "path": "docs/reference/interfaces/ColumnDef_Plugins.md",
    "content": "---\nid: ColumnDef_Plugins\ntitle: ColumnDef_Plugins\n---\n\n# Interface: ColumnDef\\_Plugins\\<TFeatures, TData, TValue\\>\n\nDefined in: [types/ColumnDef.ts:18](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L18)\n\nUse this interface as a target for declaration merging to add your own plugin properties.\nNote: This will affect the types of all tables in your project.\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* [`CellData`](../type-aliases/CellData.md) = [`CellData`](../type-aliases/CellData.md)\n"
  },
  {
    "path": "docs/reference/interfaces/ColumnDef_RowSorting.md",
    "content": "---\nid: ColumnDef_RowSorting\ntitle: ColumnDef_RowSorting\n---\n\n# Interface: ColumnDef\\_RowSorting\\<TFeatures, TData\\>\n\nDefined in: [features/row-sorting/rowSortingFeature.types.ts:51](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L51)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Properties\n\n### enableMultiSort?\n\n```ts\noptional enableMultiSort: boolean;\n```\n\nDefined in: [features/row-sorting/rowSortingFeature.types.ts:58](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L58)\n\nEnables/Disables multi-sorting for this column.\n\n***\n\n### enableSorting?\n\n```ts\noptional enableSorting: boolean;\n```\n\nDefined in: [features/row-sorting/rowSortingFeature.types.ts:62](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L62)\n\nEnables/Disables sorting for this column.\n\n***\n\n### invertSorting?\n\n```ts\noptional invertSorting: boolean;\n```\n\nDefined in: [features/row-sorting/rowSortingFeature.types.ts:66](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L66)\n\nInverts the order of the sorting for this column. This is useful for values that have an inverted best/worst scale where lower numbers are better, eg. a ranking (1st, 2nd, 3rd) or golf-like scoring\n\n***\n\n### sortDescFirst?\n\n```ts\noptional sortDescFirst: boolean;\n```\n\nDefined in: [features/row-sorting/rowSortingFeature.types.ts:70](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L70)\n\nSet to `true` for sorting toggles on this column to start in the descending direction.\n\n***\n\n### sortFn?\n\n```ts\noptional sortFn: SortFnOption<TFeatures, TData>;\n```\n\nDefined in: [features/row-sorting/rowSortingFeature.types.ts:76](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L76)\n\nThe sorting function to use with this column.\n- A `string` referencing a built-in sorting function\n- A custom sorting function\n\n***\n\n### sortUndefined?\n\n```ts\noptional sortUndefined: false | 1 | -1 | \"first\" | \"last\";\n```\n\nDefined in: [features/row-sorting/rowSortingFeature.types.ts:86](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L86)\n\nThe priority of undefined values when sorting this column.\n- `false`\n  - Undefined values will be considered tied and need to be sorted by the next column filter or original index (whichever applies)\n- `-1`\n  - Undefined values will be sorted with higher priority (ascending) (if ascending, undefined will appear on the beginning of the list)\n- `1`\n  - Undefined values will be sorted with lower priority (descending) (if ascending, undefined will appear on the end of the list)\n"
  },
  {
    "path": "docs/reference/interfaces/ColumnDefaultOptions.md",
    "content": "---\nid: ColumnDefaultOptions\ntitle: ColumnDefaultOptions\n---\n\n# Interface: ColumnDefaultOptions\n\nDefined in: [features/column-grouping/columnGroupingFeature.types.ts:147](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L147)\n\n## Properties\n\n### enableGrouping\n\n```ts\nenableGrouping: boolean;\n```\n\nDefined in: [features/column-grouping/columnGroupingFeature.types.ts:148](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L148)\n\n***\n\n### onGroupingChange\n\n```ts\nonGroupingChange: OnChangeFn<GroupingState>;\n```\n\nDefined in: [features/column-grouping/columnGroupingFeature.types.ts:149](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L149)\n"
  },
  {
    "path": "docs/reference/interfaces/ColumnFilter.md",
    "content": "---\nid: ColumnFilter\ntitle: ColumnFilter\n---\n\n# Interface: ColumnFilter\n\nDefined in: [features/column-filtering/columnFilteringFeature.types.ts:24](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L24)\n\n## Properties\n\n### id\n\n```ts\nid: string;\n```\n\nDefined in: [features/column-filtering/columnFilteringFeature.types.ts:25](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L25)\n\n***\n\n### value\n\n```ts\nvalue: unknown;\n```\n\nDefined in: [features/column-filtering/columnFilteringFeature.types.ts:26](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L26)\n"
  },
  {
    "path": "docs/reference/interfaces/ColumnMeta.md",
    "content": "---\nid: ColumnMeta\ntitle: ColumnMeta\n---\n\n# Interface: ColumnMeta\\<TFeatures, TData, TValue\\>\n\nDefined in: [types/ColumnDef.ts:24](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L24)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* [`CellData`](../type-aliases/CellData.md) = [`CellData`](../type-aliases/CellData.md)\n"
  },
  {
    "path": "docs/reference/interfaces/ColumnOrderDefaultOptions.md",
    "content": "---\nid: ColumnOrderDefaultOptions\ntitle: ColumnOrderDefaultOptions\n---\n\n# Interface: ColumnOrderDefaultOptions\n\nDefined in: [features/column-ordering/columnOrderingFeature.types.ts:33](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.types.ts#L33)\n\n## Properties\n\n### onColumnOrderChange\n\n```ts\nonColumnOrderChange: OnChangeFn<ColumnOrderState>;\n```\n\nDefined in: [features/column-ordering/columnOrderingFeature.types.ts:34](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.types.ts#L34)\n"
  },
  {
    "path": "docs/reference/interfaces/ColumnPinningDefaultOptions.md",
    "content": "---\nid: ColumnPinningDefaultOptions\ntitle: ColumnPinningDefaultOptions\n---\n\n# Interface: ColumnPinningDefaultOptions\n\nDefined in: [features/column-pinning/columnPinningFeature.types.ts:30](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L30)\n\n## Properties\n\n### onColumnPinningChange\n\n```ts\nonColumnPinningChange: OnChangeFn<ColumnPinningState>;\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.types.ts:31](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L31)\n"
  },
  {
    "path": "docs/reference/interfaces/ColumnPinningState.md",
    "content": "---\nid: ColumnPinningState\ntitle: ColumnPinningState\n---\n\n# Interface: ColumnPinningState\n\nDefined in: [features/column-pinning/columnPinningFeature.types.ts:10](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L10)\n\n## Properties\n\n### left\n\n```ts\nleft: string[];\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.types.ts:11](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L11)\n\n***\n\n### right\n\n```ts\nright: string[];\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.types.ts:12](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L12)\n"
  },
  {
    "path": "docs/reference/interfaces/ColumnSort.md",
    "content": "---\nid: ColumnSort\ntitle: ColumnSort\n---\n\n# Interface: ColumnSort\n\nDefined in: [features/row-sorting/rowSortingFeature.types.ts:10](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L10)\n\n## Properties\n\n### desc\n\n```ts\ndesc: boolean;\n```\n\nDefined in: [features/row-sorting/rowSortingFeature.types.ts:11](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L11)\n\n***\n\n### id\n\n```ts\nid: string;\n```\n\nDefined in: [features/row-sorting/rowSortingFeature.types.ts:12](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L12)\n"
  },
  {
    "path": "docs/reference/interfaces/Column_Column.md",
    "content": "---\nid: Column_Column\ntitle: Column_Column\n---\n\n# Interface: Column\\_Column\\<TFeatures, TData, TValue\\>\n\nDefined in: [core/columns/coreColumnsFeature.types.ts:45](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L45)\n\n## Extends\n\n- [`Column_CoreProperties`](Column_CoreProperties.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n## Extended by\n\n- [`Column_Core`](Column_Core.md)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* [`CellData`](../type-aliases/CellData.md) = [`CellData`](../type-aliases/CellData.md)\n\n## Properties\n\n### accessorFn?\n\n```ts\noptional accessorFn: AccessorFn<TData, TValue>;\n```\n\nDefined in: [core/columns/coreColumnsFeature.types.ts:15](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L15)\n\nThe resolved accessor function to use when extracting the value for the column from each row. Will only be defined if the column def has a valid accessor key or function defined.\n\n#### Inherited from\n\n[`Column_CoreProperties`](Column_CoreProperties.md).[`accessorFn`](Column_CoreProperties.md#accessorfn)\n\n***\n\n### columnDef\n\n```ts\ncolumnDef: ColumnDef<TFeatures, TData, TValue>;\n```\n\nDefined in: [core/columns/coreColumnsFeature.types.ts:19](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L19)\n\nThe original column def used to create the column.\n\n#### Inherited from\n\n[`Column_CoreProperties`](Column_CoreProperties.md).[`columnDef`](Column_CoreProperties.md#columndef)\n\n***\n\n### columns\n\n```ts\ncolumns: Column<TFeatures, TData, TValue>[];\n```\n\nDefined in: [core/columns/coreColumnsFeature.types.ts:23](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L23)\n\nThe child column (if the column is a group column). Will be an empty array if the column is not a group column.\n\n#### Inherited from\n\n[`Column_CoreProperties`](Column_CoreProperties.md).[`columns`](Column_CoreProperties.md#columns)\n\n***\n\n### depth\n\n```ts\ndepth: number;\n```\n\nDefined in: [core/columns/coreColumnsFeature.types.ts:27](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L27)\n\nThe depth of the column (if grouped) relative to the root column def array.\n\n#### Inherited from\n\n[`Column_CoreProperties`](Column_CoreProperties.md).[`depth`](Column_CoreProperties.md#depth)\n\n***\n\n### getFlatColumns()\n\n```ts\ngetFlatColumns: () => Column<TFeatures, TData, TValue>[];\n```\n\nDefined in: [core/columns/coreColumnsFeature.types.ts:53](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L53)\n\nReturns the flattened array of this column and all child/grand-child columns for this column.\n\n#### Returns\n\n[`Column`](../type-aliases/Column.md)\\<`TFeatures`, `TData`, `TValue`\\>[]\n\n***\n\n### getLeafColumns()\n\n```ts\ngetLeafColumns: () => Column<TFeatures, TData, TValue>[];\n```\n\nDefined in: [core/columns/coreColumnsFeature.types.ts:57](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L57)\n\nReturns an array of all leaf-node columns for this column. If a column has no children, it is considered the only leaf-node column.\n\n#### Returns\n\n[`Column`](../type-aliases/Column.md)\\<`TFeatures`, `TData`, `TValue`\\>[]\n\n***\n\n### id\n\n```ts\nid: string;\n```\n\nDefined in: [core/columns/coreColumnsFeature.types.ts:34](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L34)\n\nThe resolved unique identifier for the column resolved in this priority:\n   - A manual `id` property from the column def\n   - The accessor key from the column def\n   - The header string from the column def\n\n#### Inherited from\n\n[`Column_CoreProperties`](Column_CoreProperties.md).[`id`](Column_CoreProperties.md#id)\n\n***\n\n### parent?\n\n```ts\noptional parent: Column<TFeatures, TData, TValue>;\n```\n\nDefined in: [core/columns/coreColumnsFeature.types.ts:38](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L38)\n\nThe parent column for this column. Will be undefined if this is a root column.\n\n#### Inherited from\n\n[`Column_CoreProperties`](Column_CoreProperties.md).[`parent`](Column_CoreProperties.md#parent)\n\n***\n\n### table\n\n```ts\ntable: Table_Internal<TFeatures, TData>;\n```\n\nDefined in: [core/columns/coreColumnsFeature.types.ts:42](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L42)\n\nReference to the parent table instance.\n\n#### Inherited from\n\n[`Column_CoreProperties`](Column_CoreProperties.md).[`table`](Column_CoreProperties.md#table)\n"
  },
  {
    "path": "docs/reference/interfaces/Column_ColumnFaceting.md",
    "content": "---\nid: Column_ColumnFaceting\ntitle: Column_ColumnFaceting\n---\n\n# Interface: Column\\_ColumnFaceting\\<TFeatures, TData\\>\n\nDefined in: [features/column-faceting/columnFacetingFeature.types.ts:6](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L6)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Properties\n\n### getFacetedMinMaxValues()\n\n```ts\ngetFacetedMinMaxValues: () => [number, number] | undefined;\n```\n\nDefined in: [features/column-faceting/columnFacetingFeature.types.ts:13](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L13)\n\nA function that **computes and returns** a min/max tuple derived from `column.getFacetedRowModel`. Useful for displaying faceted result values.\n\n#### Returns\n\n\\[`number`, `number`\\] \\| `undefined`\n\n***\n\n### getFacetedRowModel()\n\n```ts\ngetFacetedRowModel: () => RowModel<TFeatures, TData>;\n```\n\nDefined in: [features/column-faceting/columnFacetingFeature.types.ts:17](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L17)\n\nA function that **computes and returns** a row model with all other column filters applied, excluding its own filter. Useful for displaying faceted result counts.\n\n#### Returns\n\n[`RowModel`](RowModel.md)\\<`TFeatures`, `TData`\\>\n\n***\n\n### getFacetedUniqueValues()\n\n```ts\ngetFacetedUniqueValues: () => Map<any, number>;\n```\n\nDefined in: [features/column-faceting/columnFacetingFeature.types.ts:21](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L21)\n\nReturns a `Map` of unique values and their occurrences derived from `column.getFacetedRowModel`. Useful for displaying faceted result values.\n\n#### Returns\n\n`Map`\\<`any`, `number`\\>\n"
  },
  {
    "path": "docs/reference/interfaces/Column_ColumnFiltering.md",
    "content": "---\nid: Column_ColumnFiltering\ntitle: Column_ColumnFiltering\n---\n\n# Interface: Column\\_ColumnFiltering\\<TFeatures, TData\\>\n\nDefined in: [features/column-filtering/columnFilteringFeature.types.ts:95](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L95)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Properties\n\n### getAutoFilterFn()\n\n```ts\ngetAutoFilterFn: () => FilterFn<TFeatures, TData>;\n```\n\nDefined in: [features/column-filtering/columnFilteringFeature.types.ts:102](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L102)\n\nReturns an automatically calculated filter function for the column based off of the columns first known value.\n\n#### Returns\n\n[`FilterFn`](FilterFn.md)\\<`TFeatures`, `TData`\\>\n\n***\n\n### getCanFilter()\n\n```ts\ngetCanFilter: () => boolean;\n```\n\nDefined in: [features/column-filtering/columnFilteringFeature.types.ts:106](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L106)\n\nReturns whether or not the column can be **column** filtered.\n\n#### Returns\n\n`boolean`\n\n***\n\n### getFilterFn()\n\n```ts\ngetFilterFn: () => FilterFn<TFeatures, TData>;\n```\n\nDefined in: [features/column-filtering/columnFilteringFeature.types.ts:110](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L110)\n\nReturns the filter function (either user-defined or automatic, depending on configuration) for the columnId specified.\n\n#### Returns\n\n[`FilterFn`](FilterFn.md)\\<`TFeatures`, `TData`\\>\n\n***\n\n### getFilterIndex()\n\n```ts\ngetFilterIndex: () => number;\n```\n\nDefined in: [features/column-filtering/columnFilteringFeature.types.ts:114](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L114)\n\nReturns the index (including `-1`) of the column filter in the table's `state.columnFilters` array.\n\n#### Returns\n\n`number`\n\n***\n\n### getFilterValue()\n\n```ts\ngetFilterValue: () => unknown;\n```\n\nDefined in: [features/column-filtering/columnFilteringFeature.types.ts:118](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L118)\n\nReturns the current filter value for the column.\n\n#### Returns\n\n`unknown`\n\n***\n\n### getIsFiltered()\n\n```ts\ngetIsFiltered: () => boolean;\n```\n\nDefined in: [features/column-filtering/columnFilteringFeature.types.ts:122](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L122)\n\nReturns whether or not the column is currently filtered.\n\n#### Returns\n\n`boolean`\n\n***\n\n### setFilterValue()\n\n```ts\nsetFilterValue: (updater) => void;\n```\n\nDefined in: [features/column-filtering/columnFilteringFeature.types.ts:126](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L126)\n\nA function that sets the current filter value for the column. You can pass it a value or an updater function for immutability-safe operations on existing values.\n\n#### Parameters\n\n##### updater\n\n`any`\n\n#### Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/interfaces/Column_ColumnGrouping.md",
    "content": "---\nid: Column_ColumnGrouping\ntitle: Column_ColumnGrouping\n---\n\n# Interface: Column\\_ColumnGrouping\\<TFeatures, TData\\>\n\nDefined in: [features/column-grouping/columnGroupingFeature.types.ts:78](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L78)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Properties\n\n### getAggregationFn()\n\n```ts\ngetAggregationFn: () => \n  | AggregationFn<TFeatures, TData>\n  | undefined;\n```\n\nDefined in: [features/column-grouping/columnGroupingFeature.types.ts:85](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L85)\n\nReturns the aggregation function for the column.\n\n#### Returns\n\n  \\| [`AggregationFn`](../type-aliases/AggregationFn.md)\\<`TFeatures`, `TData`\\>\n  \\| `undefined`\n\n***\n\n### getAutoAggregationFn()\n\n```ts\ngetAutoAggregationFn: () => \n  | AggregationFn<TFeatures, TData>\n  | undefined;\n```\n\nDefined in: [features/column-grouping/columnGroupingFeature.types.ts:89](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L89)\n\nReturns the automatically inferred aggregation function for the column.\n\n#### Returns\n\n  \\| [`AggregationFn`](../type-aliases/AggregationFn.md)\\<`TFeatures`, `TData`\\>\n  \\| `undefined`\n\n***\n\n### getCanGroup()\n\n```ts\ngetCanGroup: () => boolean;\n```\n\nDefined in: [features/column-grouping/columnGroupingFeature.types.ts:93](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L93)\n\nReturns whether or not the column can be grouped.\n\n#### Returns\n\n`boolean`\n\n***\n\n### getGroupedIndex()\n\n```ts\ngetGroupedIndex: () => number;\n```\n\nDefined in: [features/column-grouping/columnGroupingFeature.types.ts:97](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L97)\n\nReturns the index of the column in the grouping state.\n\n#### Returns\n\n`number`\n\n***\n\n### getIsGrouped()\n\n```ts\ngetIsGrouped: () => boolean;\n```\n\nDefined in: [features/column-grouping/columnGroupingFeature.types.ts:101](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L101)\n\nReturns whether or not the column is currently grouped.\n\n#### Returns\n\n`boolean`\n\n***\n\n### getToggleGroupingHandler()\n\n```ts\ngetToggleGroupingHandler: () => () => void;\n```\n\nDefined in: [features/column-grouping/columnGroupingFeature.types.ts:105](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L105)\n\nReturns a function that toggles the grouping state of the column. This is useful for passing to the `onClick` prop of a button.\n\n#### Returns\n\n```ts\n(): void;\n```\n\n##### Returns\n\n`void`\n\n***\n\n### toggleGrouping()\n\n```ts\ntoggleGrouping: () => void;\n```\n\nDefined in: [features/column-grouping/columnGroupingFeature.types.ts:109](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L109)\n\nToggles the grouping state of the column.\n\n#### Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/interfaces/Column_ColumnOrdering.md",
    "content": "---\nid: Column_ColumnOrdering\ntitle: Column_ColumnOrdering\n---\n\n# Interface: Column\\_ColumnOrdering\n\nDefined in: [features/column-ordering/columnOrderingFeature.types.ts:18](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.types.ts#L18)\n\n## Properties\n\n### getIndex()\n\n```ts\ngetIndex: (position?) => number;\n```\n\nDefined in: [features/column-ordering/columnOrderingFeature.types.ts:22](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.types.ts#L22)\n\nReturns the index of the column in the order of the visible columns. Optionally pass a `position` parameter to get the index of the column in a sub-section of the table\n\n#### Parameters\n\n##### position?\n\n[`ColumnPinningPosition`](../type-aliases/ColumnPinningPosition.md) | `\"center\"`\n\n#### Returns\n\n`number`\n\n***\n\n### getIsFirstColumn()\n\n```ts\ngetIsFirstColumn: (position?) => boolean;\n```\n\nDefined in: [features/column-ordering/columnOrderingFeature.types.ts:26](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.types.ts#L26)\n\nReturns `true` if the column is the first column in the order of the visible columns. Optionally pass a `position` parameter to check if the column is the first in a sub-section of the table.\n\n#### Parameters\n\n##### position?\n\n[`ColumnPinningPosition`](../type-aliases/ColumnPinningPosition.md) | `\"center\"`\n\n#### Returns\n\n`boolean`\n\n***\n\n### getIsLastColumn()\n\n```ts\ngetIsLastColumn: (position?) => boolean;\n```\n\nDefined in: [features/column-ordering/columnOrderingFeature.types.ts:30](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.types.ts#L30)\n\nReturns `true` if the column is the last column in the order of the visible columns. Optionally pass a `position` parameter to check if the column is the last in a sub-section of the table.\n\n#### Parameters\n\n##### position?\n\n[`ColumnPinningPosition`](../type-aliases/ColumnPinningPosition.md) | `\"center\"`\n\n#### Returns\n\n`boolean`\n"
  },
  {
    "path": "docs/reference/interfaces/Column_ColumnPinning.md",
    "content": "---\nid: Column_ColumnPinning\ntitle: Column_ColumnPinning\n---\n\n# Interface: Column\\_ColumnPinning\n\nDefined in: [features/column-pinning/columnPinningFeature.types.ts:41](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L41)\n\n## Properties\n\n### getCanPin()\n\n```ts\ngetCanPin: () => boolean;\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.types.ts:45](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L45)\n\nReturns whether or not the column can be pinned.\n\n#### Returns\n\n`boolean`\n\n***\n\n### getIsPinned()\n\n```ts\ngetIsPinned: () => ColumnPinningPosition;\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.types.ts:49](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L49)\n\nReturns the pinned position of the column. (`'left'`, `'right'` or `false`)\n\n#### Returns\n\n[`ColumnPinningPosition`](../type-aliases/ColumnPinningPosition.md)\n\n***\n\n### getPinnedIndex()\n\n```ts\ngetPinnedIndex: () => number;\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.types.ts:53](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L53)\n\nReturns the numeric pinned index of the column within a pinned column group.\n\n#### Returns\n\n`number`\n\n***\n\n### pin()\n\n```ts\npin: (position) => void;\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.types.ts:57](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L57)\n\nPins a column to the `'left'` or `'right'`, or unpins the column to the center if `false` is passed.\n\n#### Parameters\n\n##### position\n\n[`ColumnPinningPosition`](../type-aliases/ColumnPinningPosition.md)\n\n#### Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/interfaces/Column_ColumnResizing.md",
    "content": "---\nid: Column_ColumnResizing\ntitle: Column_ColumnResizing\n---\n\n# Interface: Column\\_ColumnResizing\n\nDefined in: [features/column-resizing/columnResizingFeature.types.ts:62](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L62)\n\n## Properties\n\n### getCanResize()\n\n```ts\ngetCanResize: () => boolean;\n```\n\nDefined in: [features/column-resizing/columnResizingFeature.types.ts:66](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L66)\n\nReturns `true` if the column can be resized.\n\n#### Returns\n\n`boolean`\n\n***\n\n### getIsResizing()\n\n```ts\ngetIsResizing: () => boolean;\n```\n\nDefined in: [features/column-resizing/columnResizingFeature.types.ts:70](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L70)\n\nReturns `true` if the column is currently being resized.\n\n#### Returns\n\n`boolean`\n"
  },
  {
    "path": "docs/reference/interfaces/Column_ColumnSizing.md",
    "content": "---\nid: Column_ColumnSizing\ntitle: Column_ColumnSizing\n---\n\n# Interface: Column\\_ColumnSizing\n\nDefined in: [features/column-sizing/columnSizingFeature.types.ts:64](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L64)\n\n## Properties\n\n### getAfter()\n\n```ts\ngetAfter: (position?) => number;\n```\n\nDefined in: [features/column-sizing/columnSizingFeature.types.ts:68](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L68)\n\nReturns the offset measurement along the row-axis (usually the x-axis for standard tables) for the header. This is effectively a sum of the offset measurements of all succeeding (right) headers in relation to the current column.\n\n#### Parameters\n\n##### position?\n\n[`ColumnPinningPosition`](../type-aliases/ColumnPinningPosition.md) | `\"center\"`\n\n#### Returns\n\n`number`\n\n***\n\n### getSize()\n\n```ts\ngetSize: () => number;\n```\n\nDefined in: [features/column-sizing/columnSizingFeature.types.ts:72](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L72)\n\nReturns the current size of the column.\n\n#### Returns\n\n`number`\n\n***\n\n### getStart()\n\n```ts\ngetStart: (position?) => number;\n```\n\nDefined in: [features/column-sizing/columnSizingFeature.types.ts:76](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L76)\n\nReturns the offset measurement along the row-axis (usually the x-axis for standard tables) for the header. This is effectively a sum of the offset measurements of all preceding (left) headers in relation to the current column.\n\n#### Parameters\n\n##### position?\n\n[`ColumnPinningPosition`](../type-aliases/ColumnPinningPosition.md) | `\"center\"`\n\n#### Returns\n\n`number`\n\n***\n\n### resetSize()\n\n```ts\nresetSize: () => void;\n```\n\nDefined in: [features/column-sizing/columnSizingFeature.types.ts:80](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L80)\n\nResets the column to its initial size.\n\n#### Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/interfaces/Column_ColumnVisibility.md",
    "content": "---\nid: Column_ColumnVisibility\ntitle: Column_ColumnVisibility\n---\n\n# Interface: Column\\_ColumnVisibility\n\nDefined in: [features/column-visibility/columnVisibilityFeature.types.ts:84](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L84)\n\n## Properties\n\n### getCanHide()\n\n```ts\ngetCanHide: () => boolean;\n```\n\nDefined in: [features/column-visibility/columnVisibilityFeature.types.ts:88](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L88)\n\nReturns whether the column can be hidden\n\n#### Returns\n\n`boolean`\n\n***\n\n### getIsVisible()\n\n```ts\ngetIsVisible: () => boolean;\n```\n\nDefined in: [features/column-visibility/columnVisibilityFeature.types.ts:92](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L92)\n\nReturns whether the column is visible\n\n#### Returns\n\n`boolean`\n\n***\n\n### getToggleVisibilityHandler()\n\n```ts\ngetToggleVisibilityHandler: () => (event) => void;\n```\n\nDefined in: [features/column-visibility/columnVisibilityFeature.types.ts:96](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L96)\n\nReturns a function that can be used to toggle the column visibility. This function can be used to bind to an event handler to a checkbox.\n\n#### Returns\n\n```ts\n(event): void;\n```\n\n##### Parameters\n\n###### event\n\n`unknown`\n\n##### Returns\n\n`void`\n\n***\n\n### toggleVisibility()\n\n```ts\ntoggleVisibility: (value?) => void;\n```\n\nDefined in: [features/column-visibility/columnVisibilityFeature.types.ts:100](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L100)\n\nToggles the visibility of the column.\n\n#### Parameters\n\n##### value?\n\n`boolean`\n\n#### Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/interfaces/Column_Core.md",
    "content": "---\nid: Column_Core\ntitle: Column_Core\n---\n\n# Interface: Column\\_Core\\<TFeatures, TData, TValue\\>\n\nDefined in: [types/Column.ts:26](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/Column.ts#L26)\n\n## Extends\n\n- [`Column_Column`](Column_Column.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` = `unknown`\n\n## Properties\n\n### accessorFn?\n\n```ts\noptional accessorFn: AccessorFn<TData, TValue>;\n```\n\nDefined in: [core/columns/coreColumnsFeature.types.ts:15](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L15)\n\nThe resolved accessor function to use when extracting the value for the column from each row. Will only be defined if the column def has a valid accessor key or function defined.\n\n#### Inherited from\n\n[`Column_Column`](Column_Column.md).[`accessorFn`](Column_Column.md#accessorfn)\n\n***\n\n### columnDef\n\n```ts\ncolumnDef: ColumnDef<TFeatures, TData, TValue>;\n```\n\nDefined in: [core/columns/coreColumnsFeature.types.ts:19](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L19)\n\nThe original column def used to create the column.\n\n#### Inherited from\n\n[`Column_Column`](Column_Column.md).[`columnDef`](Column_Column.md#columndef)\n\n***\n\n### columns\n\n```ts\ncolumns: Column<TFeatures, TData, TValue>[];\n```\n\nDefined in: [core/columns/coreColumnsFeature.types.ts:23](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L23)\n\nThe child column (if the column is a group column). Will be an empty array if the column is not a group column.\n\n#### Inherited from\n\n[`Column_Column`](Column_Column.md).[`columns`](Column_Column.md#columns)\n\n***\n\n### depth\n\n```ts\ndepth: number;\n```\n\nDefined in: [core/columns/coreColumnsFeature.types.ts:27](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L27)\n\nThe depth of the column (if grouped) relative to the root column def array.\n\n#### Inherited from\n\n[`Column_Column`](Column_Column.md).[`depth`](Column_Column.md#depth)\n\n***\n\n### getFlatColumns()\n\n```ts\ngetFlatColumns: () => Column<TFeatures, TData, TValue>[];\n```\n\nDefined in: [core/columns/coreColumnsFeature.types.ts:53](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L53)\n\nReturns the flattened array of this column and all child/grand-child columns for this column.\n\n#### Returns\n\n[`Column`](../type-aliases/Column.md)\\<`TFeatures`, `TData`, `TValue`\\>[]\n\n#### Inherited from\n\n[`Column_Column`](Column_Column.md).[`getFlatColumns`](Column_Column.md#getflatcolumns)\n\n***\n\n### getLeafColumns()\n\n```ts\ngetLeafColumns: () => Column<TFeatures, TData, TValue>[];\n```\n\nDefined in: [core/columns/coreColumnsFeature.types.ts:57](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L57)\n\nReturns an array of all leaf-node columns for this column. If a column has no children, it is considered the only leaf-node column.\n\n#### Returns\n\n[`Column`](../type-aliases/Column.md)\\<`TFeatures`, `TData`, `TValue`\\>[]\n\n#### Inherited from\n\n[`Column_Column`](Column_Column.md).[`getLeafColumns`](Column_Column.md#getleafcolumns)\n\n***\n\n### id\n\n```ts\nid: string;\n```\n\nDefined in: [core/columns/coreColumnsFeature.types.ts:34](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L34)\n\nThe resolved unique identifier for the column resolved in this priority:\n   - A manual `id` property from the column def\n   - The accessor key from the column def\n   - The header string from the column def\n\n#### Inherited from\n\n[`Column_Column`](Column_Column.md).[`id`](Column_Column.md#id)\n\n***\n\n### parent?\n\n```ts\noptional parent: Column<TFeatures, TData, TValue>;\n```\n\nDefined in: [core/columns/coreColumnsFeature.types.ts:38](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L38)\n\nThe parent column for this column. Will be undefined if this is a root column.\n\n#### Inherited from\n\n[`Column_Column`](Column_Column.md).[`parent`](Column_Column.md#parent)\n\n***\n\n### table\n\n```ts\ntable: Table_Internal<TFeatures, TData>;\n```\n\nDefined in: [core/columns/coreColumnsFeature.types.ts:42](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L42)\n\nReference to the parent table instance.\n\n#### Inherited from\n\n[`Column_Column`](Column_Column.md).[`table`](Column_Column.md#table)\n"
  },
  {
    "path": "docs/reference/interfaces/Column_CoreProperties.md",
    "content": "---\nid: Column_CoreProperties\ntitle: Column_CoreProperties\n---\n\n# Interface: Column\\_CoreProperties\\<TFeatures, TData, TValue\\>\n\nDefined in: [core/columns/coreColumnsFeature.types.ts:7](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L7)\n\n## Extended by\n\n- [`Column_Column`](Column_Column.md)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* [`CellData`](../type-aliases/CellData.md) = [`CellData`](../type-aliases/CellData.md)\n\n## Properties\n\n### accessorFn?\n\n```ts\noptional accessorFn: AccessorFn<TData, TValue>;\n```\n\nDefined in: [core/columns/coreColumnsFeature.types.ts:15](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L15)\n\nThe resolved accessor function to use when extracting the value for the column from each row. Will only be defined if the column def has a valid accessor key or function defined.\n\n***\n\n### columnDef\n\n```ts\ncolumnDef: ColumnDef<TFeatures, TData, TValue>;\n```\n\nDefined in: [core/columns/coreColumnsFeature.types.ts:19](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L19)\n\nThe original column def used to create the column.\n\n***\n\n### columns\n\n```ts\ncolumns: Column<TFeatures, TData, TValue>[];\n```\n\nDefined in: [core/columns/coreColumnsFeature.types.ts:23](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L23)\n\nThe child column (if the column is a group column). Will be an empty array if the column is not a group column.\n\n***\n\n### depth\n\n```ts\ndepth: number;\n```\n\nDefined in: [core/columns/coreColumnsFeature.types.ts:27](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L27)\n\nThe depth of the column (if grouped) relative to the root column def array.\n\n***\n\n### id\n\n```ts\nid: string;\n```\n\nDefined in: [core/columns/coreColumnsFeature.types.ts:34](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L34)\n\nThe resolved unique identifier for the column resolved in this priority:\n   - A manual `id` property from the column def\n   - The accessor key from the column def\n   - The header string from the column def\n\n***\n\n### parent?\n\n```ts\noptional parent: Column<TFeatures, TData, TValue>;\n```\n\nDefined in: [core/columns/coreColumnsFeature.types.ts:38](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L38)\n\nThe parent column for this column. Will be undefined if this is a root column.\n\n***\n\n### table\n\n```ts\ntable: Table_Internal<TFeatures, TData>;\n```\n\nDefined in: [core/columns/coreColumnsFeature.types.ts:42](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L42)\n\nReference to the parent table instance.\n"
  },
  {
    "path": "docs/reference/interfaces/Column_GlobalFiltering.md",
    "content": "---\nid: Column_GlobalFiltering\ntitle: Column_GlobalFiltering\n---\n\n# Interface: Column\\_GlobalFiltering\n\nDefined in: [features/global-filtering/globalFilteringFeature.types.ts:25](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.types.ts#L25)\n\n## Properties\n\n### getCanGlobalFilter()\n\n```ts\ngetCanGlobalFilter: () => boolean;\n```\n\nDefined in: [features/global-filtering/globalFilteringFeature.types.ts:29](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.types.ts#L29)\n\nReturns whether or not the column can be **globally** filtered. Set to `false` to disable a column from being scanned during global filtering.\n\n#### Returns\n\n`boolean`\n"
  },
  {
    "path": "docs/reference/interfaces/Column_Plugins.md",
    "content": "---\nid: Column_Plugins\ntitle: Column_Plugins\n---\n\n# Interface: Column\\_Plugins\\<TFeatures, TData, TValue\\>\n\nDefined in: [types/Column.ts:20](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/Column.ts#L20)\n\nUse this interface as a target for declaration merging to add your own plugin properties.\nNote: This will affect the types of all tables in your project.\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` = `unknown`\n"
  },
  {
    "path": "docs/reference/interfaces/Column_RowSorting.md",
    "content": "---\nid: Column_RowSorting\ntitle: Column_RowSorting\n---\n\n# Interface: Column\\_RowSorting\\<TFeatures, TData\\>\n\nDefined in: [features/row-sorting/rowSortingFeature.types.ts:89](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L89)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Properties\n\n### clearSorting()\n\n```ts\nclearSorting: () => void;\n```\n\nDefined in: [features/row-sorting/rowSortingFeature.types.ts:96](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L96)\n\nRemoves this column from the table's sorting state\n\n#### Returns\n\n`void`\n\n***\n\n### getAutoSortDir()\n\n```ts\ngetAutoSortDir: () => SortDirection;\n```\n\nDefined in: [features/row-sorting/rowSortingFeature.types.ts:100](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L100)\n\nReturns a sort direction automatically inferred based on the columns values.\n\n#### Returns\n\n[`SortDirection`](../type-aliases/SortDirection.md)\n\n***\n\n### getAutoSortFn()\n\n```ts\ngetAutoSortFn: () => SortFn<TFeatures, TData>;\n```\n\nDefined in: [features/row-sorting/rowSortingFeature.types.ts:104](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L104)\n\nReturns a sorting function automatically inferred based on the columns values.\n\n#### Returns\n\n[`SortFn`](SortFn.md)\\<`TFeatures`, `TData`\\>\n\n***\n\n### getCanMultiSort()\n\n```ts\ngetCanMultiSort: () => boolean;\n```\n\nDefined in: [features/row-sorting/rowSortingFeature.types.ts:108](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L108)\n\nReturns whether this column can be multi-sorted.\n\n#### Returns\n\n`boolean`\n\n***\n\n### getCanSort()\n\n```ts\ngetCanSort: () => boolean;\n```\n\nDefined in: [features/row-sorting/rowSortingFeature.types.ts:112](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L112)\n\nReturns whether this column can be sorted.\n\n#### Returns\n\n`boolean`\n\n***\n\n### getFirstSortDir()\n\n```ts\ngetFirstSortDir: () => SortDirection;\n```\n\nDefined in: [features/row-sorting/rowSortingFeature.types.ts:116](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L116)\n\nReturns the first direction that should be used when sorting this column.\n\n#### Returns\n\n[`SortDirection`](../type-aliases/SortDirection.md)\n\n***\n\n### getIsSorted()\n\n```ts\ngetIsSorted: () => false | SortDirection;\n```\n\nDefined in: [features/row-sorting/rowSortingFeature.types.ts:120](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L120)\n\nReturns the current sort direction of this column.\n\n#### Returns\n\n`false` \\| [`SortDirection`](../type-aliases/SortDirection.md)\n\n***\n\n### getNextSortingOrder()\n\n```ts\ngetNextSortingOrder: () => false | SortDirection;\n```\n\nDefined in: [features/row-sorting/rowSortingFeature.types.ts:124](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L124)\n\nReturns the next sorting order.\n\n#### Returns\n\n`false` \\| [`SortDirection`](../type-aliases/SortDirection.md)\n\n***\n\n### getSortFn()\n\n```ts\ngetSortFn: () => SortFn<TFeatures, TData>;\n```\n\nDefined in: [features/row-sorting/rowSortingFeature.types.ts:132](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L132)\n\nReturns the resolved sorting function to be used for this column\n\n#### Returns\n\n[`SortFn`](SortFn.md)\\<`TFeatures`, `TData`\\>\n\n***\n\n### getSortIndex()\n\n```ts\ngetSortIndex: () => number;\n```\n\nDefined in: [features/row-sorting/rowSortingFeature.types.ts:128](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L128)\n\nReturns the index position of this column's sorting within the sorting state\n\n#### Returns\n\n`number`\n\n***\n\n### getToggleSortingHandler()\n\n```ts\ngetToggleSortingHandler: () => (event) => void | undefined;\n```\n\nDefined in: [features/row-sorting/rowSortingFeature.types.ts:136](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L136)\n\nReturns a function that can be used to toggle this column's sorting state. This is useful for attaching a click handler to the column header.\n\n#### Returns\n\n(`event`) => `void` \\| `undefined`\n\n***\n\n### toggleSorting()\n\n```ts\ntoggleSorting: (desc?, isMulti?) => void;\n```\n\nDefined in: [features/row-sorting/rowSortingFeature.types.ts:140](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L140)\n\nToggles this columns sorting state. If `desc` is provided, it will force the sort direction to that value. If `isMulti` is provided, it will additivity multi-sort the column (or toggle it if it is already sorted).\n\n#### Parameters\n\n##### desc?\n\n`boolean`\n\n##### isMulti?\n\n`boolean`\n\n#### Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/interfaces/CoreFeatures.md",
    "content": "---\nid: CoreFeatures\ntitle: CoreFeatures\n---\n\n# Interface: CoreFeatures\n\nDefined in: [core/coreFeatures.ts:8](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/coreFeatures.ts#L8)\n\n## Properties\n\n### coreCellsFeature\n\n```ts\ncoreCellsFeature: TableFeature<CoreCellsFeatureConstructors<TableFeatures, RowData>>;\n```\n\nDefined in: [core/coreFeatures.ts:9](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/coreFeatures.ts#L9)\n\n***\n\n### coreColumnsFeature\n\n```ts\ncoreColumnsFeature: TableFeature<CoreColumnsFeatureConstructors<TableFeatures, RowData>>;\n```\n\nDefined in: [core/coreFeatures.ts:10](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/coreFeatures.ts#L10)\n\n***\n\n### coreHeadersFeature\n\n```ts\ncoreHeadersFeature: TableFeature<CoreHeadersFeatureConstructors<TableFeatures, RowData>>;\n```\n\nDefined in: [core/coreFeatures.ts:11](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/coreFeatures.ts#L11)\n\n***\n\n### coreRowModelsFeature\n\n```ts\ncoreRowModelsFeature: TableFeature<CoreRowModelsFeatureConstructors<TableFeatures, RowData>>;\n```\n\nDefined in: [core/coreFeatures.ts:12](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/coreFeatures.ts#L12)\n\n***\n\n### coreRowsFeature\n\n```ts\ncoreRowsFeature: TableFeature<CoreRowsFeatureConstructors<TableFeatures, RowData>>;\n```\n\nDefined in: [core/coreFeatures.ts:13](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/coreFeatures.ts#L13)\n\n***\n\n### coreTablesFeature\n\n```ts\ncoreTablesFeature: TableFeature<CoreTablesFeatureConstructors<TableFeatures, RowData>>;\n```\n\nDefined in: [core/coreFeatures.ts:14](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/coreFeatures.ts#L14)\n"
  },
  {
    "path": "docs/reference/interfaces/CreateRowModel_Core.md",
    "content": "---\nid: CreateRowModel_Core\ntitle: CreateRowModel_Core\n---\n\n# Interface: CreateRowModel\\_Core\\<TFeatures, TData\\>\n\nDefined in: [core/row-models/coreRowModelsFeature.types.ts:23](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.types.ts#L23)\n\n## Extends\n\n- [`CreateRowModel_Plugins`](CreateRowModel_Plugins.md)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Properties\n\n### coreRowModel()?\n\n```ts\noptional coreRowModel: (table) => () => RowModel<TFeatures, TData>;\n```\n\nDefined in: [core/row-models/coreRowModelsFeature.types.ts:30](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.types.ts#L30)\n\nThis required option is a factory for a function that computes and returns the core row model for the table.\n\n#### Parameters\n\n##### table\n\n[`Table`](../type-aliases/Table.md)\\<`TFeatures`, `TData`\\>\n\n#### Returns\n\n```ts\n(): RowModel<TFeatures, TData>;\n```\n\n##### Returns\n\n[`RowModel`](RowModel.md)\\<`TFeatures`, `TData`\\>\n"
  },
  {
    "path": "docs/reference/interfaces/CreateRowModel_Expanded.md",
    "content": "---\nid: CreateRowModel_Expanded\ntitle: CreateRowModel_Expanded\n---\n\n# Interface: CreateRowModel\\_Expanded\\<TFeatures, TData\\>\n\nDefined in: [features/row-expanding/rowExpandingFeature.types.ts:124](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L124)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Properties\n\n### expandedRowModel()?\n\n```ts\noptional expandedRowModel: (table) => () => RowModel<TFeatures, TData>;\n```\n\nDefined in: [features/row-expanding/rowExpandingFeature.types.ts:131](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L131)\n\nThis function is responsible for returning the expanded row model. If this function is not provided, the table will not expand rows. You can use the default exported `getExpandedRowModel` function to get the expanded row model or implement your own.\n\n#### Parameters\n\n##### table\n\n[`Table`](../type-aliases/Table.md)\\<`TFeatures`, `TData`\\>\n\n#### Returns\n\n```ts\n(): RowModel<TFeatures, TData>;\n```\n\n##### Returns\n\n[`RowModel`](RowModel.md)\\<`TFeatures`, `TData`\\>\n"
  },
  {
    "path": "docs/reference/interfaces/CreateRowModel_Faceted.md",
    "content": "---\nid: CreateRowModel_Faceted\ntitle: CreateRowModel_Faceted\n---\n\n# Interface: CreateRowModel\\_Faceted\\<TFeatures, TData\\>\n\nDefined in: [features/column-faceting/columnFacetingFeature.types.ts:45](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L45)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Properties\n\n### facetedMinMaxValues()?\n\n```ts\noptional facetedMinMaxValues: (table, columnId) => () => [number, number] | undefined;\n```\n\nDefined in: [features/column-faceting/columnFacetingFeature.types.ts:52](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L52)\n\nThis function is used to retrieve the faceted min/max values. If using server-side faceting, this function is not required. To use client-side faceting, pass the exported `getFacetedMinMaxValues()` from your adapter to your table or implement your own.\n\n#### Parameters\n\n##### table\n\n[`Table`](../type-aliases/Table.md)\\<`TFeatures`, `TData`\\>\n\n##### columnId\n\n`string`\n\n#### Returns\n\n```ts\n(): [number, number] | undefined;\n```\n\n##### Returns\n\n\\[`number`, `number`\\] \\| `undefined`\n\n***\n\n### facetedRowModel()?\n\n```ts\noptional facetedRowModel: (table, columnId) => () => RowModel<TFeatures, TData>;\n```\n\nDefined in: [features/column-faceting/columnFacetingFeature.types.ts:59](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L59)\n\nThis function is used to retrieve the faceted row model. If using server-side faceting, this function is not required. To use client-side faceting, pass the exported `getFacetedRowModel()` from your adapter to your table or implement your own.\n\n#### Parameters\n\n##### table\n\n[`Table`](../type-aliases/Table.md)\\<`TFeatures`, `TData`\\>\n\n##### columnId\n\n`string`\n\n#### Returns\n\n```ts\n(): RowModel<TFeatures, TData>;\n```\n\n##### Returns\n\n[`RowModel`](RowModel.md)\\<`TFeatures`, `TData`\\>\n\n***\n\n### facetedUniqueValues()?\n\n```ts\noptional facetedUniqueValues: (table, columnId) => () => Map<any, number>;\n```\n\nDefined in: [features/column-faceting/columnFacetingFeature.types.ts:66](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L66)\n\nThis function is used to retrieve the faceted unique values. If using server-side faceting, this function is not required. To use client-side faceting, pass the exported `getFacetedUniqueValues()` from your adapter to your table or implement your own.\n\n#### Parameters\n\n##### table\n\n[`Table`](../type-aliases/Table.md)\\<`TFeatures`, `TData`\\>\n\n##### columnId\n\n`string`\n\n#### Returns\n\n```ts\n(): Map<any, number>;\n```\n\n##### Returns\n\n`Map`\\<`any`, `number`\\>\n"
  },
  {
    "path": "docs/reference/interfaces/CreateRowModel_Filtered.md",
    "content": "---\nid: CreateRowModel_Filtered\ntitle: CreateRowModel_Filtered\n---\n\n# Interface: CreateRowModel\\_Filtered\\<TFeatures, TData\\>\n\nDefined in: [features/column-filtering/columnFilteringFeature.types.ts:200](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L200)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Properties\n\n### filteredRowModel()?\n\n```ts\noptional filteredRowModel: (table) => () => RowModel<TFeatures, TData>;\n```\n\nDefined in: [features/column-filtering/columnFilteringFeature.types.ts:209](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L209)\n\nIf provided, this function is called **once** per table and should return a **new function** which will calculate and return the row model for the table when it's filtered.\n- For server-side filtering, this function is unnecessary and can be ignored since the server should already return the filtered row model.\n- For client-side filtering, this function is required. A default implementation is provided via any table adapter's `{ getFilteredRowModel }` export.\n\n#### Parameters\n\n##### table\n\n[`Table`](../type-aliases/Table.md)\\<`TFeatures`, `TData`\\>\n\n#### Returns\n\n```ts\n(): RowModel<TFeatures, TData>;\n```\n\n##### Returns\n\n[`RowModel`](RowModel.md)\\<`TFeatures`, `TData`\\>\n"
  },
  {
    "path": "docs/reference/interfaces/CreateRowModel_Grouped.md",
    "content": "---\nid: CreateRowModel_Grouped\ntitle: CreateRowModel_Grouped\n---\n\n# Interface: CreateRowModel\\_Grouped\\<TFeatures, TData\\>\n\nDefined in: [features/column-grouping/columnGroupingFeature.types.ts:201](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L201)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Properties\n\n### groupedRowModel()?\n\n```ts\noptional groupedRowModel: (table) => () => RowModel<TFeatures, TData>;\n```\n\nDefined in: [features/column-grouping/columnGroupingFeature.types.ts:208](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L208)\n\nReturns the row model after grouping has taken place, but no further.\n\n#### Parameters\n\n##### table\n\n[`Table`](../type-aliases/Table.md)\\<`TFeatures`, `TData`\\>\n\n#### Returns\n\n```ts\n(): RowModel<TFeatures, TData>;\n```\n\n##### Returns\n\n[`RowModel`](RowModel.md)\\<`TFeatures`, `TData`\\>\n"
  },
  {
    "path": "docs/reference/interfaces/CreateRowModel_Paginated.md",
    "content": "---\nid: CreateRowModel_Paginated\ntitle: CreateRowModel_Paginated\n---\n\n# Interface: CreateRowModel\\_Paginated\\<TFeatures, TData\\>\n\nDefined in: [features/row-pagination/rowPaginationFeature.types.ts:123](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L123)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Properties\n\n### paginatedRowModel()?\n\n```ts\noptional paginatedRowModel: (table) => () => RowModel<TFeatures, TData>;\n```\n\nDefined in: [features/row-pagination/rowPaginationFeature.types.ts:131](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L131)\n\nReturns the row model after pagination has taken place, but no further.\nPagination columns are automatically reordered by default to the start of the columns list. If you would rather remove them or leave them as-is, set the appropriate mode here.\n\n#### Parameters\n\n##### table\n\n[`Table`](../type-aliases/Table.md)\\<`TFeatures`, `TData`\\>\n\n#### Returns\n\n```ts\n(): RowModel<TFeatures, TData>;\n```\n\n##### Returns\n\n[`RowModel`](RowModel.md)\\<`TFeatures`, `TData`\\>\n"
  },
  {
    "path": "docs/reference/interfaces/CreateRowModel_Plugins.md",
    "content": "---\nid: CreateRowModel_Plugins\ntitle: CreateRowModel_Plugins\n---\n\n# Interface: CreateRowModel\\_Plugins\n\nDefined in: [core/row-models/coreRowModelsFeature.types.ts:21](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.types.ts#L21)\n\n## Extended by\n\n- [`CreateRowModel_Core`](CreateRowModel_Core.md)\n"
  },
  {
    "path": "docs/reference/interfaces/CreateRowModel_Sorted.md",
    "content": "---\nid: CreateRowModel_Sorted\ntitle: CreateRowModel_Sorted\n---\n\n# Interface: CreateRowModel\\_Sorted\\<TFeatures, TData\\>\n\nDefined in: [features/row-sorting/rowSortingFeature.types.ts:212](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L212)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Properties\n\n### sortedRowModel()?\n\n```ts\noptional sortedRowModel: (table) => () => RowModel<TFeatures, TData>;\n```\n\nDefined in: [features/row-sorting/rowSortingFeature.types.ts:219](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L219)\n\nThis function is used to retrieve the sorted row model. If using server-side sorting, this function is not required. To use client-side sorting, pass the exported `getSortedRowModel()` from your adapter to your table or implement your own.\n\n#### Parameters\n\n##### table\n\n[`Table`](../type-aliases/Table.md)\\<`TFeatures`, `TData`\\>\n\n#### Returns\n\n```ts\n(): RowModel<TFeatures, TData>;\n```\n\n##### Returns\n\n[`RowModel`](RowModel.md)\\<`TFeatures`, `TData`\\>\n"
  },
  {
    "path": "docs/reference/interfaces/CreateRowModels_Plugins.md",
    "content": "---\nid: CreateRowModels_Plugins\ntitle: CreateRowModels_Plugins\n---\n\n# Interface: CreateRowModels\\_Plugins\\<TFeatures, TData\\>\n\nDefined in: [types/RowModel.ts:37](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/RowModel.ts#L37)\n\nUse this interface as a target for declaration merging to add your own plugin properties.\nNote: This will affect the types of all tables in your project.\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n"
  },
  {
    "path": "docs/reference/interfaces/FilterFn.md",
    "content": "---\nid: FilterFn\ntitle: FilterFn\n---\n\n# Interface: FilterFn()\\<TFeatures, TData\\>\n\nDefined in: [features/column-filtering/columnFilteringFeature.types.ts:45](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L45)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n```ts\nFilterFn(\n   row, \n   columnId, \n   filterValue, \n   addMeta?): boolean;\n```\n\nDefined in: [features/column-filtering/columnFilteringFeature.types.ts:49](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L49)\n\n## Parameters\n\n### row\n\n[`Row`](../type-aliases/Row.md)\\<`TFeatures`, `TData`\\>\n\n### columnId\n\n`string`\n\n### filterValue\n\n`any`\n\n### addMeta?\n\n(`meta`) => `void`\n\n## Returns\n\n`boolean`\n\n## Properties\n\n### autoRemove?\n\n```ts\noptional autoRemove: ColumnFilterAutoRemoveTestFn<TFeatures, TData, unknown>;\n```\n\nDefined in: [features/column-filtering/columnFilteringFeature.types.ts:55](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L55)\n\n***\n\n### resolveFilterValue?\n\n```ts\noptional resolveFilterValue: TransformFilterValueFn<TFeatures, TData, unknown>;\n```\n\nDefined in: [features/column-filtering/columnFilteringFeature.types.ts:56](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L56)\n"
  },
  {
    "path": "docs/reference/interfaces/FilterFns.md",
    "content": "---\nid: FilterFns\ntitle: FilterFns\n---\n\n# Interface: FilterFns\n\nDefined in: [features/column-filtering/columnFilteringFeature.types.ts:16](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L16)\n"
  },
  {
    "path": "docs/reference/interfaces/FilterMeta.md",
    "content": "---\nid: FilterMeta\ntitle: FilterMeta\n---\n\n# Interface: FilterMeta\n\nDefined in: [features/column-filtering/columnFilteringFeature.types.ts:14](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L14)\n"
  },
  {
    "path": "docs/reference/interfaces/HeaderContext.md",
    "content": "---\nid: HeaderContext\ntitle: HeaderContext\n---\n\n# Interface: HeaderContext\\<TFeatures, TData, TValue\\>\n\nDefined in: [core/headers/coreHeadersFeature.types.ts:30](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L30)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* [`CellData`](../type-aliases/CellData.md) = [`CellData`](../type-aliases/CellData.md)\n\n## Properties\n\n### column\n\n```ts\ncolumn: Column<TFeatures, TData, TValue>;\n```\n\nDefined in: [core/headers/coreHeadersFeature.types.ts:38](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L38)\n\nAn instance of a column.\n\n***\n\n### header\n\n```ts\nheader: Header<TFeatures, TData, TValue>;\n```\n\nDefined in: [core/headers/coreHeadersFeature.types.ts:42](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L42)\n\nAn instance of a header.\n\n***\n\n### table\n\n```ts\ntable: Table<TFeatures, TData>;\n```\n\nDefined in: [core/headers/coreHeadersFeature.types.ts:46](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L46)\n\nThe table instance.\n"
  },
  {
    "path": "docs/reference/interfaces/HeaderGroup_Core.md",
    "content": "---\nid: HeaderGroup_Core\ntitle: HeaderGroup_Core\n---\n\n# Interface: HeaderGroup\\_Core\\<TFeatures, TData\\>\n\nDefined in: [types/HeaderGroup.ts:14](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/HeaderGroup.ts#L14)\n\n## Extends\n\n- [`HeaderGroup_Header`](HeaderGroup_Header.md)\\<`TFeatures`, `TData`\\>\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Properties\n\n### depth\n\n```ts\ndepth: number;\n```\n\nDefined in: [core/headers/coreHeadersFeature.types.ts:120](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L120)\n\n#### Inherited from\n\n[`HeaderGroup_Header`](HeaderGroup_Header.md).[`depth`](HeaderGroup_Header.md#depth)\n\n***\n\n### headers\n\n```ts\nheaders: Header<TFeatures, TData, unknown>[];\n```\n\nDefined in: [core/headers/coreHeadersFeature.types.ts:121](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L121)\n\n#### Inherited from\n\n[`HeaderGroup_Header`](HeaderGroup_Header.md).[`headers`](HeaderGroup_Header.md#headers)\n\n***\n\n### id\n\n```ts\nid: string;\n```\n\nDefined in: [core/headers/coreHeadersFeature.types.ts:122](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L122)\n\n#### Inherited from\n\n[`HeaderGroup_Header`](HeaderGroup_Header.md).[`id`](HeaderGroup_Header.md#id)\n"
  },
  {
    "path": "docs/reference/interfaces/HeaderGroup_Header.md",
    "content": "---\nid: HeaderGroup_Header\ntitle: HeaderGroup_Header\n---\n\n# Interface: HeaderGroup\\_Header\\<TFeatures, TData, TValue\\>\n\nDefined in: [core/headers/coreHeadersFeature.types.ts:115](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L115)\n\n## Extended by\n\n- [`HeaderGroup_Core`](HeaderGroup_Core.md)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* [`CellData`](../type-aliases/CellData.md) = [`CellData`](../type-aliases/CellData.md)\n\n## Properties\n\n### depth\n\n```ts\ndepth: number;\n```\n\nDefined in: [core/headers/coreHeadersFeature.types.ts:120](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L120)\n\n***\n\n### headers\n\n```ts\nheaders: Header<TFeatures, TData, TValue>[];\n```\n\nDefined in: [core/headers/coreHeadersFeature.types.ts:121](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L121)\n\n***\n\n### id\n\n```ts\nid: string;\n```\n\nDefined in: [core/headers/coreHeadersFeature.types.ts:122](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L122)\n"
  },
  {
    "path": "docs/reference/interfaces/HeaderGroup_Plugins.md",
    "content": "---\nid: HeaderGroup_Plugins\ntitle: HeaderGroup_Plugins\n---\n\n# Interface: HeaderGroup\\_Plugins\\<TFeatures, TData\\>\n\nDefined in: [types/HeaderGroup.ts:9](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/HeaderGroup.ts#L9)\n\nUse this interface as a target for declaration merging to add your own plugin properties.\nNote: This will affect the types of all tables in your project.\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n"
  },
  {
    "path": "docs/reference/interfaces/Header_ColumnResizing.md",
    "content": "---\nid: Header_ColumnResizing\ntitle: Header_ColumnResizing\n---\n\n# Interface: Header\\_ColumnResizing\n\nDefined in: [features/column-resizing/columnResizingFeature.types.ts:73](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L73)\n\n## Properties\n\n### getResizeHandler()\n\n```ts\ngetResizeHandler: (context?) => (event) => void;\n```\n\nDefined in: [features/column-resizing/columnResizingFeature.types.ts:80](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L80)\n\nReturns an event handler function that can be used to resize the header. It can be used as an:\n- `onMouseDown` handler\n- `onTouchStart` handler\nThe dragging and release events are automatically handled for you.\n\n#### Parameters\n\n##### context?\n\n`Document`\n\n#### Returns\n\n```ts\n(event): void;\n```\n\n##### Parameters\n\n###### event\n\n`unknown`\n\n##### Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/interfaces/Header_ColumnSizing.md",
    "content": "---\nid: Header_ColumnSizing\ntitle: Header_ColumnSizing\n---\n\n# Interface: Header\\_ColumnSizing\n\nDefined in: [features/column-sizing/columnSizingFeature.types.ts:83](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L83)\n\n## Properties\n\n### getSize()\n\n```ts\ngetSize: () => number;\n```\n\nDefined in: [features/column-sizing/columnSizingFeature.types.ts:87](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L87)\n\nReturns the current size of the header.\n\n#### Returns\n\n`number`\n\n***\n\n### getStart()\n\n```ts\ngetStart: (position?) => number;\n```\n\nDefined in: [features/column-sizing/columnSizingFeature.types.ts:91](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L91)\n\nReturns the offset measurement along the row-axis (usually the x-axis for standard tables) for the header. This is effectively a sum of the offset measurements of all preceding headers.\n\n#### Parameters\n\n##### position?\n\n[`ColumnPinningPosition`](../type-aliases/ColumnPinningPosition.md)\n\n#### Returns\n\n`number`\n"
  },
  {
    "path": "docs/reference/interfaces/Header_Core.md",
    "content": "---\nid: Header_Core\ntitle: Header_Core\n---\n\n# Interface: Header\\_Core\\<TFeatures, TData, TValue\\>\n\nDefined in: [types/Header.ts:17](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/Header.ts#L17)\n\n## Extends\n\n- [`Header_Header`](Header_Header.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* [`CellData`](../type-aliases/CellData.md) = [`CellData`](../type-aliases/CellData.md)\n\n## Properties\n\n### colSpan\n\n```ts\ncolSpan: number;\n```\n\nDefined in: [core/headers/coreHeadersFeature.types.ts:57](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L57)\n\nThe col-span for the header.\n\n#### Inherited from\n\n[`Header_Header`](Header_Header.md).[`colSpan`](Header_Header.md#colspan)\n\n***\n\n### column\n\n```ts\ncolumn: Column<TFeatures, TData, TValue>;\n```\n\nDefined in: [core/headers/coreHeadersFeature.types.ts:61](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L61)\n\nThe header's associated column object.\n\n#### Inherited from\n\n[`Header_Header`](Header_Header.md).[`column`](Header_Header.md#column)\n\n***\n\n### depth\n\n```ts\ndepth: number;\n```\n\nDefined in: [core/headers/coreHeadersFeature.types.ts:65](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L65)\n\nThe depth of the header, zero-indexed based.\n\n#### Inherited from\n\n[`Header_Header`](Header_Header.md).[`depth`](Header_Header.md#depth)\n\n***\n\n### getContext()\n\n```ts\ngetContext: () => HeaderContext<TFeatures, TData, TValue>;\n```\n\nDefined in: [core/headers/coreHeadersFeature.types.ts:108](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L108)\n\nReturns the rendering context (or props) for column-based components like headers, footers and filters.\n\n#### Returns\n\n[`HeaderContext`](HeaderContext.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n#### Inherited from\n\n[`Header_Header`](Header_Header.md).[`getContext`](Header_Header.md#getcontext)\n\n***\n\n### getLeafHeaders()\n\n```ts\ngetLeafHeaders: () => Header<TFeatures, TData, TValue>[];\n```\n\nDefined in: [core/headers/coreHeadersFeature.types.ts:112](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L112)\n\nReturns the leaf headers hierarchically nested under this header.\n\n#### Returns\n\n[`Header`](../type-aliases/Header.md)\\<`TFeatures`, `TData`, `TValue`\\>[]\n\n#### Inherited from\n\n[`Header_Header`](Header_Header.md).[`getLeafHeaders`](Header_Header.md#getleafheaders)\n\n***\n\n### headerGroup\n\n```ts\nheaderGroup: \n  | HeaderGroup<TFeatures, TData>\n  | null;\n```\n\nDefined in: [core/headers/coreHeadersFeature.types.ts:69](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L69)\n\nThe header's associated header group object.\n\n#### Inherited from\n\n[`Header_Header`](Header_Header.md).[`headerGroup`](Header_Header.md#headergroup)\n\n***\n\n### id\n\n```ts\nid: string;\n```\n\nDefined in: [core/headers/coreHeadersFeature.types.ts:73](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L73)\n\nThe unique identifier for the header.\n\n#### Inherited from\n\n[`Header_Header`](Header_Header.md).[`id`](Header_Header.md#id)\n\n***\n\n### index\n\n```ts\nindex: number;\n```\n\nDefined in: [core/headers/coreHeadersFeature.types.ts:77](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L77)\n\nThe index for the header within the header group.\n\n#### Inherited from\n\n[`Header_Header`](Header_Header.md).[`index`](Header_Header.md#index)\n\n***\n\n### isPlaceholder\n\n```ts\nisPlaceholder: boolean;\n```\n\nDefined in: [core/headers/coreHeadersFeature.types.ts:81](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L81)\n\nA boolean denoting if the header is a placeholder header.\n\n#### Inherited from\n\n[`Header_Header`](Header_Header.md).[`isPlaceholder`](Header_Header.md#isplaceholder)\n\n***\n\n### placeholderId?\n\n```ts\noptional placeholderId: string;\n```\n\nDefined in: [core/headers/coreHeadersFeature.types.ts:85](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L85)\n\nIf the header is a placeholder header, this will be a unique header ID that does not conflict with any other headers across the table.\n\n#### Inherited from\n\n[`Header_Header`](Header_Header.md).[`placeholderId`](Header_Header.md#placeholderid)\n\n***\n\n### rowSpan\n\n```ts\nrowSpan: number;\n```\n\nDefined in: [core/headers/coreHeadersFeature.types.ts:89](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L89)\n\nThe row-span for the header.\n\n#### Inherited from\n\n[`Header_Header`](Header_Header.md).[`rowSpan`](Header_Header.md#rowspan)\n\n***\n\n### subHeaders\n\n```ts\nsubHeaders: Header<TFeatures, TData, TValue>[];\n```\n\nDefined in: [core/headers/coreHeadersFeature.types.ts:93](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L93)\n\nThe header's hierarchical sub/child headers. Will be empty if the header's associated column is a leaf-column.\n\n#### Inherited from\n\n[`Header_Header`](Header_Header.md).[`subHeaders`](Header_Header.md#subheaders)\n\n***\n\n### table\n\n```ts\ntable: Table<TFeatures, TData>;\n```\n\nDefined in: [core/headers/coreHeadersFeature.types.ts:97](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L97)\n\nReference to the parent table instance.\n\n#### Inherited from\n\n[`Header_Header`](Header_Header.md).[`table`](Header_Header.md#table)\n"
  },
  {
    "path": "docs/reference/interfaces/Header_CoreProperties.md",
    "content": "---\nid: Header_CoreProperties\ntitle: Header_CoreProperties\n---\n\n# Interface: Header\\_CoreProperties\\<TFeatures, TData, TValue\\>\n\nDefined in: [core/headers/coreHeadersFeature.types.ts:49](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L49)\n\n## Extended by\n\n- [`Header_Header`](Header_Header.md)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* [`CellData`](../type-aliases/CellData.md) = [`CellData`](../type-aliases/CellData.md)\n\n## Properties\n\n### colSpan\n\n```ts\ncolSpan: number;\n```\n\nDefined in: [core/headers/coreHeadersFeature.types.ts:57](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L57)\n\nThe col-span for the header.\n\n***\n\n### column\n\n```ts\ncolumn: Column<TFeatures, TData, TValue>;\n```\n\nDefined in: [core/headers/coreHeadersFeature.types.ts:61](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L61)\n\nThe header's associated column object.\n\n***\n\n### depth\n\n```ts\ndepth: number;\n```\n\nDefined in: [core/headers/coreHeadersFeature.types.ts:65](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L65)\n\nThe depth of the header, zero-indexed based.\n\n***\n\n### headerGroup\n\n```ts\nheaderGroup: \n  | HeaderGroup<TFeatures, TData>\n  | null;\n```\n\nDefined in: [core/headers/coreHeadersFeature.types.ts:69](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L69)\n\nThe header's associated header group object.\n\n***\n\n### id\n\n```ts\nid: string;\n```\n\nDefined in: [core/headers/coreHeadersFeature.types.ts:73](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L73)\n\nThe unique identifier for the header.\n\n***\n\n### index\n\n```ts\nindex: number;\n```\n\nDefined in: [core/headers/coreHeadersFeature.types.ts:77](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L77)\n\nThe index for the header within the header group.\n\n***\n\n### isPlaceholder\n\n```ts\nisPlaceholder: boolean;\n```\n\nDefined in: [core/headers/coreHeadersFeature.types.ts:81](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L81)\n\nA boolean denoting if the header is a placeholder header.\n\n***\n\n### placeholderId?\n\n```ts\noptional placeholderId: string;\n```\n\nDefined in: [core/headers/coreHeadersFeature.types.ts:85](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L85)\n\nIf the header is a placeholder header, this will be a unique header ID that does not conflict with any other headers across the table.\n\n***\n\n### rowSpan\n\n```ts\nrowSpan: number;\n```\n\nDefined in: [core/headers/coreHeadersFeature.types.ts:89](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L89)\n\nThe row-span for the header.\n\n***\n\n### subHeaders\n\n```ts\nsubHeaders: Header<TFeatures, TData, TValue>[];\n```\n\nDefined in: [core/headers/coreHeadersFeature.types.ts:93](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L93)\n\nThe header's hierarchical sub/child headers. Will be empty if the header's associated column is a leaf-column.\n\n***\n\n### table\n\n```ts\ntable: Table<TFeatures, TData>;\n```\n\nDefined in: [core/headers/coreHeadersFeature.types.ts:97](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L97)\n\nReference to the parent table instance.\n"
  },
  {
    "path": "docs/reference/interfaces/Header_Header.md",
    "content": "---\nid: Header_Header\ntitle: Header_Header\n---\n\n# Interface: Header\\_Header\\<TFeatures, TData, TValue\\>\n\nDefined in: [core/headers/coreHeadersFeature.types.ts:100](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L100)\n\n## Extends\n\n- [`Header_CoreProperties`](Header_CoreProperties.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n## Extended by\n\n- [`Header_Core`](Header_Core.md)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* [`CellData`](../type-aliases/CellData.md) = [`CellData`](../type-aliases/CellData.md)\n\n## Properties\n\n### colSpan\n\n```ts\ncolSpan: number;\n```\n\nDefined in: [core/headers/coreHeadersFeature.types.ts:57](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L57)\n\nThe col-span for the header.\n\n#### Inherited from\n\n[`Header_CoreProperties`](Header_CoreProperties.md).[`colSpan`](Header_CoreProperties.md#colspan)\n\n***\n\n### column\n\n```ts\ncolumn: Column<TFeatures, TData, TValue>;\n```\n\nDefined in: [core/headers/coreHeadersFeature.types.ts:61](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L61)\n\nThe header's associated column object.\n\n#### Inherited from\n\n[`Header_CoreProperties`](Header_CoreProperties.md).[`column`](Header_CoreProperties.md#column)\n\n***\n\n### depth\n\n```ts\ndepth: number;\n```\n\nDefined in: [core/headers/coreHeadersFeature.types.ts:65](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L65)\n\nThe depth of the header, zero-indexed based.\n\n#### Inherited from\n\n[`Header_CoreProperties`](Header_CoreProperties.md).[`depth`](Header_CoreProperties.md#depth)\n\n***\n\n### getContext()\n\n```ts\ngetContext: () => HeaderContext<TFeatures, TData, TValue>;\n```\n\nDefined in: [core/headers/coreHeadersFeature.types.ts:108](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L108)\n\nReturns the rendering context (or props) for column-based components like headers, footers and filters.\n\n#### Returns\n\n[`HeaderContext`](HeaderContext.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n***\n\n### getLeafHeaders()\n\n```ts\ngetLeafHeaders: () => Header<TFeatures, TData, TValue>[];\n```\n\nDefined in: [core/headers/coreHeadersFeature.types.ts:112](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L112)\n\nReturns the leaf headers hierarchically nested under this header.\n\n#### Returns\n\n[`Header`](../type-aliases/Header.md)\\<`TFeatures`, `TData`, `TValue`\\>[]\n\n***\n\n### headerGroup\n\n```ts\nheaderGroup: \n  | HeaderGroup<TFeatures, TData>\n  | null;\n```\n\nDefined in: [core/headers/coreHeadersFeature.types.ts:69](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L69)\n\nThe header's associated header group object.\n\n#### Inherited from\n\n[`Header_CoreProperties`](Header_CoreProperties.md).[`headerGroup`](Header_CoreProperties.md#headergroup)\n\n***\n\n### id\n\n```ts\nid: string;\n```\n\nDefined in: [core/headers/coreHeadersFeature.types.ts:73](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L73)\n\nThe unique identifier for the header.\n\n#### Inherited from\n\n[`Header_CoreProperties`](Header_CoreProperties.md).[`id`](Header_CoreProperties.md#id)\n\n***\n\n### index\n\n```ts\nindex: number;\n```\n\nDefined in: [core/headers/coreHeadersFeature.types.ts:77](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L77)\n\nThe index for the header within the header group.\n\n#### Inherited from\n\n[`Header_CoreProperties`](Header_CoreProperties.md).[`index`](Header_CoreProperties.md#index)\n\n***\n\n### isPlaceholder\n\n```ts\nisPlaceholder: boolean;\n```\n\nDefined in: [core/headers/coreHeadersFeature.types.ts:81](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L81)\n\nA boolean denoting if the header is a placeholder header.\n\n#### Inherited from\n\n[`Header_CoreProperties`](Header_CoreProperties.md).[`isPlaceholder`](Header_CoreProperties.md#isplaceholder)\n\n***\n\n### placeholderId?\n\n```ts\noptional placeholderId: string;\n```\n\nDefined in: [core/headers/coreHeadersFeature.types.ts:85](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L85)\n\nIf the header is a placeholder header, this will be a unique header ID that does not conflict with any other headers across the table.\n\n#### Inherited from\n\n[`Header_CoreProperties`](Header_CoreProperties.md).[`placeholderId`](Header_CoreProperties.md#placeholderid)\n\n***\n\n### rowSpan\n\n```ts\nrowSpan: number;\n```\n\nDefined in: [core/headers/coreHeadersFeature.types.ts:89](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L89)\n\nThe row-span for the header.\n\n#### Inherited from\n\n[`Header_CoreProperties`](Header_CoreProperties.md).[`rowSpan`](Header_CoreProperties.md#rowspan)\n\n***\n\n### subHeaders\n\n```ts\nsubHeaders: Header<TFeatures, TData, TValue>[];\n```\n\nDefined in: [core/headers/coreHeadersFeature.types.ts:93](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L93)\n\nThe header's hierarchical sub/child headers. Will be empty if the header's associated column is a leaf-column.\n\n#### Inherited from\n\n[`Header_CoreProperties`](Header_CoreProperties.md).[`subHeaders`](Header_CoreProperties.md#subheaders)\n\n***\n\n### table\n\n```ts\ntable: Table<TFeatures, TData>;\n```\n\nDefined in: [core/headers/coreHeadersFeature.types.ts:97](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L97)\n\nReference to the parent table instance.\n\n#### Inherited from\n\n[`Header_CoreProperties`](Header_CoreProperties.md).[`table`](Header_CoreProperties.md#table)\n"
  },
  {
    "path": "docs/reference/interfaces/Header_Plugins.md",
    "content": "---\nid: Header_Plugins\ntitle: Header_Plugins\n---\n\n# Interface: Header\\_Plugins\\<TFeatures, TData, TValue\\>\n\nDefined in: [types/Header.ts:11](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/Header.ts#L11)\n\nUse this interface as a target for declaration merging to add your own plugin properties.\nNote: This will affect the types of all tables in your project.\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* [`CellData`](../type-aliases/CellData.md) = [`CellData`](../type-aliases/CellData.md)\n"
  },
  {
    "path": "docs/reference/interfaces/IdIdentifier.md",
    "content": "---\nid: IdIdentifier\ntitle: IdIdentifier\n---\n\n# Interface: IdIdentifier\\<TFeatures, TData, TValue\\>\n\nDefined in: [types/ColumnDef.ts:50](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L50)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* [`CellData`](../type-aliases/CellData.md) = [`CellData`](../type-aliases/CellData.md)\n\n## Properties\n\n### header?\n\n```ts\noptional header: ColumnDefTemplate<HeaderContext<TFeatures, TData, TValue>>;\n```\n\nDefined in: [types/ColumnDef.ts:56](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L56)\n\n***\n\n### id\n\n```ts\nid: string;\n```\n\nDefined in: [types/ColumnDef.ts:55](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L55)\n"
  },
  {
    "path": "docs/reference/interfaces/PaginationDefaultOptions.md",
    "content": "---\nid: PaginationDefaultOptions\ntitle: PaginationDefaultOptions\n---\n\n# Interface: PaginationDefaultOptions\n\nDefined in: [features/row-pagination/rowPaginationFeature.types.ts:38](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L38)\n\n## Properties\n\n### onPaginationChange\n\n```ts\nonPaginationChange: OnChangeFn<PaginationState>;\n```\n\nDefined in: [features/row-pagination/rowPaginationFeature.types.ts:39](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L39)\n"
  },
  {
    "path": "docs/reference/interfaces/PaginationState.md",
    "content": "---\nid: PaginationState\ntitle: PaginationState\n---\n\n# Interface: PaginationState\n\nDefined in: [features/row-pagination/rowPaginationFeature.types.ts:6](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L6)\n\n## Properties\n\n### pageIndex\n\n```ts\npageIndex: number;\n```\n\nDefined in: [features/row-pagination/rowPaginationFeature.types.ts:7](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L7)\n\n***\n\n### pageSize\n\n```ts\npageSize: number;\n```\n\nDefined in: [features/row-pagination/rowPaginationFeature.types.ts:8](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L8)\n"
  },
  {
    "path": "docs/reference/interfaces/Plugins.md",
    "content": "---\nid: Plugins\ntitle: Plugins\n---\n\n# Interface: Plugins\n\nDefined in: [types/TableFeatures.ts:40](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableFeatures.ts#L40)\n"
  },
  {
    "path": "docs/reference/interfaces/PrototypeAPI.md",
    "content": "---\nid: PrototypeAPI\ntitle: PrototypeAPI\n---\n\n# Interface: PrototypeAPI\\<TDeps, TDepArgs\\>\n\nDefined in: [utils.ts:322](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L322)\n\n## Type Parameters\n\n### TDeps\n\n`TDeps` *extends* `ReadonlyArray`\\<`any`\\>\n\n### TDepArgs\n\n`TDepArgs`\n\n## Properties\n\n### fn()\n\n```ts\nfn: (self, ...args) => any;\n```\n\nDefined in: [utils.ts:323](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L323)\n\n#### Parameters\n\n##### self\n\n`any`\n\n##### args\n\n...`any`\n\n#### Returns\n\n`any`\n\n***\n\n### memoDeps()?\n\n```ts\noptional memoDeps: (self, depArgs?) => any[] | undefined;\n```\n\nDefined in: [utils.ts:324](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L324)\n\n#### Parameters\n\n##### self\n\n`any`\n\n##### depArgs?\n\n`any`\n\n#### Returns\n\n`any`[] \\| `undefined`\n"
  },
  {
    "path": "docs/reference/interfaces/ResolvedColumnFilter.md",
    "content": "---\nid: ResolvedColumnFilter\ntitle: ResolvedColumnFilter\n---\n\n# Interface: ResolvedColumnFilter\\<TFeatures, TData\\>\n\nDefined in: [features/column-filtering/columnFilteringFeature.types.ts:29](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L29)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Properties\n\n### filterFn\n\n```ts\nfilterFn: FilterFn<TFeatures, TData>;\n```\n\nDefined in: [features/column-filtering/columnFilteringFeature.types.ts:33](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L33)\n\n***\n\n### id\n\n```ts\nid: string;\n```\n\nDefined in: [features/column-filtering/columnFilteringFeature.types.ts:34](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L34)\n\n***\n\n### resolvedValue\n\n```ts\nresolvedValue: unknown;\n```\n\nDefined in: [features/column-filtering/columnFilteringFeature.types.ts:35](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L35)\n"
  },
  {
    "path": "docs/reference/interfaces/RowModel.md",
    "content": "---\nid: RowModel\ntitle: RowModel\n---\n\n# Interface: RowModel\\<TFeatures, TData\\>\n\nDefined in: [core/row-models/coreRowModelsFeature.types.ts:12](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.types.ts#L12)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Properties\n\n### flatRows\n\n```ts\nflatRows: Row<TFeatures, TData>[];\n```\n\nDefined in: [core/row-models/coreRowModelsFeature.types.ts:17](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.types.ts#L17)\n\n***\n\n### rows\n\n```ts\nrows: Row<TFeatures, TData>[];\n```\n\nDefined in: [core/row-models/coreRowModelsFeature.types.ts:16](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.types.ts#L16)\n\n***\n\n### rowsById\n\n```ts\nrowsById: Record<string, Row<TFeatures, TData>>;\n```\n\nDefined in: [core/row-models/coreRowModelsFeature.types.ts:18](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.types.ts#L18)\n"
  },
  {
    "path": "docs/reference/interfaces/RowModelFns_ColumnFiltering.md",
    "content": "---\nid: RowModelFns_ColumnFiltering\ntitle: RowModelFns_ColumnFiltering\n---\n\n# Interface: RowModelFns\\_ColumnFiltering\\<TFeatures, TData\\>\n\nDefined in: [features/column-filtering/columnFilteringFeature.types.ts:38](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L38)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Properties\n\n### filterFns\n\n```ts\nfilterFns: Record<keyof FilterFns, FilterFn<TFeatures, TData>>;\n```\n\nDefined in: [features/column-filtering/columnFilteringFeature.types.ts:42](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L42)\n"
  },
  {
    "path": "docs/reference/interfaces/RowModelFns_ColumnGrouping.md",
    "content": "---\nid: RowModelFns_ColumnGrouping\ntitle: RowModelFns_ColumnGrouping\n---\n\n# Interface: RowModelFns\\_ColumnGrouping\\<TFeatures, TData\\>\n\nDefined in: [features/column-grouping/columnGroupingFeature.types.ts:21](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L21)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Properties\n\n### aggregationFns\n\n```ts\naggregationFns: Record<keyof AggregationFns, AggregationFn<TFeatures, TData>>;\n```\n\nDefined in: [features/column-grouping/columnGroupingFeature.types.ts:25](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L25)\n"
  },
  {
    "path": "docs/reference/interfaces/RowModelFns_Core.md",
    "content": "---\nid: RowModelFns_Core\ntitle: RowModelFns_Core\n---\n\n# Interface: RowModelFns\\_Core\n\nDefined in: [types/RowModelFns.ts:16](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/RowModelFns.ts#L16)\n"
  },
  {
    "path": "docs/reference/interfaces/RowModelFns_Plugins.md",
    "content": "---\nid: RowModelFns_Plugins\ntitle: RowModelFns_Plugins\n---\n\n# Interface: RowModelFns\\_Plugins\\<TFeatures, TData\\>\n\nDefined in: [types/RowModelFns.ts:11](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/RowModelFns.ts#L11)\n\nUse this interface as a target for declaration merging to add your own plugin properties.\nNote: This will affect the types of all tables in your project.\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n"
  },
  {
    "path": "docs/reference/interfaces/RowModelFns_RowSorting.md",
    "content": "---\nid: RowModelFns_RowSorting\ntitle: RowModelFns_RowSorting\n---\n\n# Interface: RowModelFns\\_RowSorting\\<TFeatures, TData\\>\n\nDefined in: [features/row-sorting/rowSortingFeature.types.ts:21](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L21)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Properties\n\n### sortFns\n\n```ts\nsortFns: Record<keyof SortFns, SortFn<TFeatures, TData>>;\n```\n\nDefined in: [features/row-sorting/rowSortingFeature.types.ts:25](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L25)\n"
  },
  {
    "path": "docs/reference/interfaces/RowPinningDefaultOptions.md",
    "content": "---\nid: RowPinningDefaultOptions\ntitle: RowPinningDefaultOptions\n---\n\n# Interface: RowPinningDefaultOptions\n\nDefined in: [features/row-pinning/rowPinningFeature.types.ts:34](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L34)\n\n## Properties\n\n### onRowPinningChange\n\n```ts\nonRowPinningChange: OnChangeFn<RowPinningState>;\n```\n\nDefined in: [features/row-pinning/rowPinningFeature.types.ts:35](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L35)\n"
  },
  {
    "path": "docs/reference/interfaces/RowPinningState.md",
    "content": "---\nid: RowPinningState\ntitle: RowPinningState\n---\n\n# Interface: RowPinningState\n\nDefined in: [features/row-pinning/rowPinningFeature.types.ts:7](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L7)\n\n## Properties\n\n### bottom\n\n```ts\nbottom: string[];\n```\n\nDefined in: [features/row-pinning/rowPinningFeature.types.ts:8](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L8)\n\n***\n\n### top\n\n```ts\ntop: string[];\n```\n\nDefined in: [features/row-pinning/rowPinningFeature.types.ts:9](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L9)\n"
  },
  {
    "path": "docs/reference/interfaces/Row_ColumnFiltering.md",
    "content": "---\nid: Row_ColumnFiltering\ntitle: Row_ColumnFiltering\n---\n\n# Interface: Row\\_ColumnFiltering\\<TFeatures, TData\\>\n\nDefined in: [features/column-filtering/columnFilteringFeature.types.ts:129](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L129)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Properties\n\n### columnFilters\n\n```ts\ncolumnFilters: Record<string, boolean>;\n```\n\nDefined in: [features/column-filtering/columnFilteringFeature.types.ts:136](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L136)\n\nThe column filters map for the row. This object tracks whether a row is passing/failing specific filters by their column ID.\n\n***\n\n### columnFiltersMeta\n\n```ts\ncolumnFiltersMeta: Record<string, FilterMeta>;\n```\n\nDefined in: [features/column-filtering/columnFilteringFeature.types.ts:140](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L140)\n\nThe column filters meta map for the row. This object tracks any filter meta for a row as optionally provided during the filtering process.\n"
  },
  {
    "path": "docs/reference/interfaces/Row_ColumnGrouping.md",
    "content": "---\nid: Row_ColumnGrouping\ntitle: Row_ColumnGrouping\n---\n\n# Interface: Row\\_ColumnGrouping\n\nDefined in: [features/column-grouping/columnGroupingFeature.types.ts:112](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L112)\n\n## Properties\n\n### \\_groupingValuesCache\n\n```ts\n_groupingValuesCache: Record<string, any>;\n```\n\nDefined in: [features/column-grouping/columnGroupingFeature.types.ts:113](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L113)\n\n***\n\n### getGroupingValue()\n\n```ts\ngetGroupingValue: (columnId) => unknown;\n```\n\nDefined in: [features/column-grouping/columnGroupingFeature.types.ts:117](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L117)\n\nReturns the grouping value for any row and column (including leaf rows).\n\n#### Parameters\n\n##### columnId\n\n`string`\n\n#### Returns\n\n`unknown`\n\n***\n\n### getIsGrouped()\n\n```ts\ngetIsGrouped: () => boolean;\n```\n\nDefined in: [features/column-grouping/columnGroupingFeature.types.ts:121](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L121)\n\nReturns whether or not the row is currently grouped.\n\n#### Returns\n\n`boolean`\n\n***\n\n### groupingColumnId?\n\n```ts\noptional groupingColumnId: string;\n```\n\nDefined in: [features/column-grouping/columnGroupingFeature.types.ts:125](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L125)\n\nIf this row is grouped, this is the id of the column that this row is grouped by.\n\n***\n\n### groupingValue?\n\n```ts\noptional groupingValue: unknown;\n```\n\nDefined in: [features/column-grouping/columnGroupingFeature.types.ts:129](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L129)\n\nIf this row is grouped, this is the unique/shared value for the `groupingColumnId` for all of the rows in this group.\n"
  },
  {
    "path": "docs/reference/interfaces/Row_ColumnPinning.md",
    "content": "---\nid: Row_ColumnPinning\ntitle: Row_ColumnPinning\n---\n\n# Interface: Row\\_ColumnPinning\\<TFeatures, TData\\>\n\nDefined in: [features/column-pinning/columnPinningFeature.types.ts:60](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L60)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Properties\n\n### getCenterVisibleCells()\n\n```ts\ngetCenterVisibleCells: () => Cell<TFeatures, TData, unknown>[];\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.types.ts:67](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L67)\n\nReturns all center pinned (unpinned) leaf cells in the row.\n\n#### Returns\n\n[`Cell`](../type-aliases/Cell.md)\\<`TFeatures`, `TData`, `unknown`\\>[]\n\n***\n\n### getLeftVisibleCells()\n\n```ts\ngetLeftVisibleCells: () => Cell<TFeatures, TData, unknown>[];\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.types.ts:71](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L71)\n\nReturns all left pinned leaf cells in the row.\n\n#### Returns\n\n[`Cell`](../type-aliases/Cell.md)\\<`TFeatures`, `TData`, `unknown`\\>[]\n\n***\n\n### getRightVisibleCells()\n\n```ts\ngetRightVisibleCells: () => Cell<TFeatures, TData, unknown>[];\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.types.ts:75](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L75)\n\nReturns all right pinned leaf cells in the row.\n\n#### Returns\n\n[`Cell`](../type-aliases/Cell.md)\\<`TFeatures`, `TData`, `unknown`\\>[]\n"
  },
  {
    "path": "docs/reference/interfaces/Row_ColumnVisibility.md",
    "content": "---\nid: Row_ColumnVisibility\ntitle: Row_ColumnVisibility\n---\n\n# Interface: Row\\_ColumnVisibility\\<TFeatures, TData\\>\n\nDefined in: [features/column-visibility/columnVisibilityFeature.types.ts:73](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L73)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Properties\n\n### getAllVisibleCells()\n\n```ts\ngetAllVisibleCells: () => Cell<TFeatures, TData, unknown>[];\n```\n\nDefined in: [features/column-visibility/columnVisibilityFeature.types.ts:77](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L77)\n\n#### Returns\n\n[`Cell`](../type-aliases/Cell.md)\\<`TFeatures`, `TData`, `unknown`\\>[]\n\n***\n\n### getVisibleCells()\n\n```ts\ngetVisibleCells: () => Cell<TFeatures, TData, unknown>[];\n```\n\nDefined in: [features/column-visibility/columnVisibilityFeature.types.ts:81](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L81)\n\nReturns an array of cells that account for column visibility for the row.\n\n#### Returns\n\n[`Cell`](../type-aliases/Cell.md)\\<`TFeatures`, `TData`, `unknown`\\>[]\n"
  },
  {
    "path": "docs/reference/interfaces/Row_Core.md",
    "content": "---\nid: Row_Core\ntitle: Row_Core\n---\n\n# Interface: Row\\_Core\\<TFeatures, TData\\>\n\nDefined in: [types/Row.ts:21](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/Row.ts#L21)\n\n## Extends\n\n- [`Row_Row`](Row_Row.md)\\<`TFeatures`, `TData`\\>\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Properties\n\n### \\_uniqueValuesCache\n\n```ts\n_uniqueValuesCache: Record<string, unknown>;\n```\n\nDefined in: [core/rows/coreRowsFeature.types.ts:11](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L11)\n\n#### Inherited from\n\n[`Row_Row`](Row_Row.md).[`_uniqueValuesCache`](Row_Row.md#_uniquevaluescache)\n\n***\n\n### \\_valuesCache\n\n```ts\n_valuesCache: Record<string, unknown>;\n```\n\nDefined in: [core/rows/coreRowsFeature.types.ts:12](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L12)\n\n#### Inherited from\n\n[`Row_Row`](Row_Row.md).[`_valuesCache`](Row_Row.md#_valuescache)\n\n***\n\n### depth\n\n```ts\ndepth: number;\n```\n\nDefined in: [core/rows/coreRowsFeature.types.ts:16](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L16)\n\nThe depth of the row (if nested or grouped) relative to the root row array.\n\n#### Inherited from\n\n[`Row_Row`](Row_Row.md).[`depth`](Row_Row.md#depth)\n\n***\n\n### getAllCells()\n\n```ts\ngetAllCells: () => Cell<TFeatures, TData, unknown>[];\n```\n\nDefined in: [core/rows/coreRowsFeature.types.ts:55](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L55)\n\nReturns all of the cells for the row.\n\n#### Returns\n\n[`Cell`](../type-aliases/Cell.md)\\<`TFeatures`, `TData`, `unknown`\\>[]\n\n#### Inherited from\n\n[`Row_Row`](Row_Row.md).[`getAllCells`](Row_Row.md#getallcells)\n\n***\n\n### getAllCellsByColumnId()\n\n```ts\ngetAllCellsByColumnId: () => Record<string, Cell<TFeatures, TData, unknown>>;\n```\n\nDefined in: [core/rows/coreRowsFeature.types.ts:51](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L51)\n\n#### Returns\n\n`Record`\\<`string`, [`Cell`](../type-aliases/Cell.md)\\<`TFeatures`, `TData`, `unknown`\\>\\>\n\n#### Inherited from\n\n[`Row_Row`](Row_Row.md).[`getAllCellsByColumnId`](Row_Row.md#getallcellsbycolumnid)\n\n***\n\n### getLeafRows()\n\n```ts\ngetLeafRows: () => Row<TFeatures, TData>[];\n```\n\nDefined in: [core/rows/coreRowsFeature.types.ts:59](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L59)\n\nReturns the leaf rows for the row, not including any parent rows.\n\n#### Returns\n\n[`Row`](../type-aliases/Row.md)\\<`TFeatures`, `TData`\\>[]\n\n#### Inherited from\n\n[`Row_Row`](Row_Row.md).[`getLeafRows`](Row_Row.md#getleafrows)\n\n***\n\n### getParentRow()\n\n```ts\ngetParentRow: () => Row<TFeatures, TData> | undefined;\n```\n\nDefined in: [core/rows/coreRowsFeature.types.ts:63](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L63)\n\nReturns the parent row for the row, if it exists.\n\n#### Returns\n\n[`Row`](../type-aliases/Row.md)\\<`TFeatures`, `TData`\\> \\| `undefined`\n\n#### Inherited from\n\n[`Row_Row`](Row_Row.md).[`getParentRow`](Row_Row.md#getparentrow)\n\n***\n\n### getParentRows()\n\n```ts\ngetParentRows: () => Row<TFeatures, TData>[];\n```\n\nDefined in: [core/rows/coreRowsFeature.types.ts:67](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L67)\n\nReturns the parent rows for the row, all the way up to a root row.\n\n#### Returns\n\n[`Row`](../type-aliases/Row.md)\\<`TFeatures`, `TData`\\>[]\n\n#### Inherited from\n\n[`Row_Row`](Row_Row.md).[`getParentRows`](Row_Row.md#getparentrows)\n\n***\n\n### getUniqueValues()\n\n```ts\ngetUniqueValues: <TValue>(columnId) => TValue[];\n```\n\nDefined in: [core/rows/coreRowsFeature.types.ts:71](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L71)\n\nReturns a unique array of values from the row for a given columnId.\n\n#### Type Parameters\n\n##### TValue\n\n`TValue`\n\n#### Parameters\n\n##### columnId\n\n`string`\n\n#### Returns\n\n`TValue`[]\n\n#### Inherited from\n\n[`Row_Row`](Row_Row.md).[`getUniqueValues`](Row_Row.md#getuniquevalues)\n\n***\n\n### getValue()\n\n```ts\ngetValue: <TValue>(columnId) => TValue;\n```\n\nDefined in: [core/rows/coreRowsFeature.types.ts:75](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L75)\n\nReturns the value from the row for a given columnId.\n\n#### Type Parameters\n\n##### TValue\n\n`TValue`\n\n#### Parameters\n\n##### columnId\n\n`string`\n\n#### Returns\n\n`TValue`\n\n#### Inherited from\n\n[`Row_Row`](Row_Row.md).[`getValue`](Row_Row.md#getvalue)\n\n***\n\n### id\n\n```ts\nid: string;\n```\n\nDefined in: [core/rows/coreRowsFeature.types.ts:20](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L20)\n\nThe resolved unique identifier for the row resolved via the `options.getRowId` option. Defaults to the row's index (or relative index if it is a subRow).\n\n#### Inherited from\n\n[`Row_Row`](Row_Row.md).[`id`](Row_Row.md#id)\n\n***\n\n### index\n\n```ts\nindex: number;\n```\n\nDefined in: [core/rows/coreRowsFeature.types.ts:24](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L24)\n\nThe index of the row within its parent array (or the root data array).\n\n#### Inherited from\n\n[`Row_Row`](Row_Row.md).[`index`](Row_Row.md#index)\n\n***\n\n### original\n\n```ts\noriginal: TData;\n```\n\nDefined in: [core/rows/coreRowsFeature.types.ts:28](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L28)\n\nThe original row object provided to the table. If the row is a grouped row, the original row object will be the first original in the group.\n\n#### Inherited from\n\n[`Row_Row`](Row_Row.md).[`original`](Row_Row.md#original)\n\n***\n\n### originalSubRows?\n\n```ts\noptional originalSubRows: readonly TData[];\n```\n\nDefined in: [core/rows/coreRowsFeature.types.ts:32](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L32)\n\nAn array of the original subRows as returned by the `options.getSubRows` option.\n\n#### Inherited from\n\n[`Row_Row`](Row_Row.md).[`originalSubRows`](Row_Row.md#originalsubrows)\n\n***\n\n### parentId?\n\n```ts\noptional parentId: string;\n```\n\nDefined in: [core/rows/coreRowsFeature.types.ts:36](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L36)\n\nIf nested, this row's parent row id.\n\n#### Inherited from\n\n[`Row_Row`](Row_Row.md).[`parentId`](Row_Row.md#parentid)\n\n***\n\n### renderValue()\n\n```ts\nrenderValue: <TValue>(columnId) => TValue;\n```\n\nDefined in: [core/rows/coreRowsFeature.types.ts:79](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L79)\n\nRenders the value for the row in a given columnId the same as `getValue`, but will return the `renderFallbackValue` if no value is found.\n\n#### Type Parameters\n\n##### TValue\n\n`TValue`\n\n#### Parameters\n\n##### columnId\n\n`string`\n\n#### Returns\n\n`TValue`\n\n#### Inherited from\n\n[`Row_Row`](Row_Row.md).[`renderValue`](Row_Row.md#rendervalue)\n\n***\n\n### subRows\n\n```ts\nsubRows: Row<TFeatures, TData>[];\n```\n\nDefined in: [core/rows/coreRowsFeature.types.ts:40](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L40)\n\nAn array of subRows for the row as returned and created by the `options.getSubRows` option.\n\n#### Inherited from\n\n[`Row_Row`](Row_Row.md).[`subRows`](Row_Row.md#subrows)\n\n***\n\n### table\n\n```ts\ntable: Table_Internal<TFeatures, TData>;\n```\n\nDefined in: [core/rows/coreRowsFeature.types.ts:44](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L44)\n\nReference to the parent table instance.\n\n#### Inherited from\n\n[`Row_Row`](Row_Row.md).[`table`](Row_Row.md#table)\n"
  },
  {
    "path": "docs/reference/interfaces/Row_CoreProperties.md",
    "content": "---\nid: Row_CoreProperties\ntitle: Row_CoreProperties\n---\n\n# Interface: Row\\_CoreProperties\\<TFeatures, TData\\>\n\nDefined in: [core/rows/coreRowsFeature.types.ts:7](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L7)\n\n## Extended by\n\n- [`Row_Row`](Row_Row.md)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Properties\n\n### \\_uniqueValuesCache\n\n```ts\n_uniqueValuesCache: Record<string, unknown>;\n```\n\nDefined in: [core/rows/coreRowsFeature.types.ts:11](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L11)\n\n***\n\n### \\_valuesCache\n\n```ts\n_valuesCache: Record<string, unknown>;\n```\n\nDefined in: [core/rows/coreRowsFeature.types.ts:12](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L12)\n\n***\n\n### depth\n\n```ts\ndepth: number;\n```\n\nDefined in: [core/rows/coreRowsFeature.types.ts:16](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L16)\n\nThe depth of the row (if nested or grouped) relative to the root row array.\n\n***\n\n### id\n\n```ts\nid: string;\n```\n\nDefined in: [core/rows/coreRowsFeature.types.ts:20](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L20)\n\nThe resolved unique identifier for the row resolved via the `options.getRowId` option. Defaults to the row's index (or relative index if it is a subRow).\n\n***\n\n### index\n\n```ts\nindex: number;\n```\n\nDefined in: [core/rows/coreRowsFeature.types.ts:24](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L24)\n\nThe index of the row within its parent array (or the root data array).\n\n***\n\n### original\n\n```ts\noriginal: TData;\n```\n\nDefined in: [core/rows/coreRowsFeature.types.ts:28](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L28)\n\nThe original row object provided to the table. If the row is a grouped row, the original row object will be the first original in the group.\n\n***\n\n### originalSubRows?\n\n```ts\noptional originalSubRows: readonly TData[];\n```\n\nDefined in: [core/rows/coreRowsFeature.types.ts:32](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L32)\n\nAn array of the original subRows as returned by the `options.getSubRows` option.\n\n***\n\n### parentId?\n\n```ts\noptional parentId: string;\n```\n\nDefined in: [core/rows/coreRowsFeature.types.ts:36](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L36)\n\nIf nested, this row's parent row id.\n\n***\n\n### subRows\n\n```ts\nsubRows: Row<TFeatures, TData>[];\n```\n\nDefined in: [core/rows/coreRowsFeature.types.ts:40](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L40)\n\nAn array of subRows for the row as returned and created by the `options.getSubRows` option.\n\n***\n\n### table\n\n```ts\ntable: Table_Internal<TFeatures, TData>;\n```\n\nDefined in: [core/rows/coreRowsFeature.types.ts:44](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L44)\n\nReference to the parent table instance.\n"
  },
  {
    "path": "docs/reference/interfaces/Row_Plugins.md",
    "content": "---\nid: Row_Plugins\ntitle: Row_Plugins\n---\n\n# Interface: Row\\_Plugins\\<TFeatures, TData\\>\n\nDefined in: [types/Row.ts:16](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/Row.ts#L16)\n\nUse this interface as a target for declaration merging to add your own plugin properties.\nNote: This will affect the types of all tables in your project.\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n"
  },
  {
    "path": "docs/reference/interfaces/Row_Row.md",
    "content": "---\nid: Row_Row\ntitle: Row_Row\n---\n\n# Interface: Row\\_Row\\<TFeatures, TData\\>\n\nDefined in: [core/rows/coreRowsFeature.types.ts:47](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L47)\n\n## Extends\n\n- [`Row_CoreProperties`](Row_CoreProperties.md)\\<`TFeatures`, `TData`\\>\n\n## Extended by\n\n- [`Row_Core`](Row_Core.md)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Properties\n\n### \\_uniqueValuesCache\n\n```ts\n_uniqueValuesCache: Record<string, unknown>;\n```\n\nDefined in: [core/rows/coreRowsFeature.types.ts:11](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L11)\n\n#### Inherited from\n\n[`Row_CoreProperties`](Row_CoreProperties.md).[`_uniqueValuesCache`](Row_CoreProperties.md#_uniquevaluescache)\n\n***\n\n### \\_valuesCache\n\n```ts\n_valuesCache: Record<string, unknown>;\n```\n\nDefined in: [core/rows/coreRowsFeature.types.ts:12](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L12)\n\n#### Inherited from\n\n[`Row_CoreProperties`](Row_CoreProperties.md).[`_valuesCache`](Row_CoreProperties.md#_valuescache)\n\n***\n\n### depth\n\n```ts\ndepth: number;\n```\n\nDefined in: [core/rows/coreRowsFeature.types.ts:16](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L16)\n\nThe depth of the row (if nested or grouped) relative to the root row array.\n\n#### Inherited from\n\n[`Row_CoreProperties`](Row_CoreProperties.md).[`depth`](Row_CoreProperties.md#depth)\n\n***\n\n### getAllCells()\n\n```ts\ngetAllCells: () => Cell<TFeatures, TData, unknown>[];\n```\n\nDefined in: [core/rows/coreRowsFeature.types.ts:55](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L55)\n\nReturns all of the cells for the row.\n\n#### Returns\n\n[`Cell`](../type-aliases/Cell.md)\\<`TFeatures`, `TData`, `unknown`\\>[]\n\n***\n\n### getAllCellsByColumnId()\n\n```ts\ngetAllCellsByColumnId: () => Record<string, Cell<TFeatures, TData, unknown>>;\n```\n\nDefined in: [core/rows/coreRowsFeature.types.ts:51](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L51)\n\n#### Returns\n\n`Record`\\<`string`, [`Cell`](../type-aliases/Cell.md)\\<`TFeatures`, `TData`, `unknown`\\>\\>\n\n***\n\n### getLeafRows()\n\n```ts\ngetLeafRows: () => Row<TFeatures, TData>[];\n```\n\nDefined in: [core/rows/coreRowsFeature.types.ts:59](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L59)\n\nReturns the leaf rows for the row, not including any parent rows.\n\n#### Returns\n\n[`Row`](../type-aliases/Row.md)\\<`TFeatures`, `TData`\\>[]\n\n***\n\n### getParentRow()\n\n```ts\ngetParentRow: () => Row<TFeatures, TData> | undefined;\n```\n\nDefined in: [core/rows/coreRowsFeature.types.ts:63](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L63)\n\nReturns the parent row for the row, if it exists.\n\n#### Returns\n\n[`Row`](../type-aliases/Row.md)\\<`TFeatures`, `TData`\\> \\| `undefined`\n\n***\n\n### getParentRows()\n\n```ts\ngetParentRows: () => Row<TFeatures, TData>[];\n```\n\nDefined in: [core/rows/coreRowsFeature.types.ts:67](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L67)\n\nReturns the parent rows for the row, all the way up to a root row.\n\n#### Returns\n\n[`Row`](../type-aliases/Row.md)\\<`TFeatures`, `TData`\\>[]\n\n***\n\n### getUniqueValues()\n\n```ts\ngetUniqueValues: <TValue>(columnId) => TValue[];\n```\n\nDefined in: [core/rows/coreRowsFeature.types.ts:71](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L71)\n\nReturns a unique array of values from the row for a given columnId.\n\n#### Type Parameters\n\n##### TValue\n\n`TValue`\n\n#### Parameters\n\n##### columnId\n\n`string`\n\n#### Returns\n\n`TValue`[]\n\n***\n\n### getValue()\n\n```ts\ngetValue: <TValue>(columnId) => TValue;\n```\n\nDefined in: [core/rows/coreRowsFeature.types.ts:75](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L75)\n\nReturns the value from the row for a given columnId.\n\n#### Type Parameters\n\n##### TValue\n\n`TValue`\n\n#### Parameters\n\n##### columnId\n\n`string`\n\n#### Returns\n\n`TValue`\n\n***\n\n### id\n\n```ts\nid: string;\n```\n\nDefined in: [core/rows/coreRowsFeature.types.ts:20](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L20)\n\nThe resolved unique identifier for the row resolved via the `options.getRowId` option. Defaults to the row's index (or relative index if it is a subRow).\n\n#### Inherited from\n\n[`Row_CoreProperties`](Row_CoreProperties.md).[`id`](Row_CoreProperties.md#id)\n\n***\n\n### index\n\n```ts\nindex: number;\n```\n\nDefined in: [core/rows/coreRowsFeature.types.ts:24](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L24)\n\nThe index of the row within its parent array (or the root data array).\n\n#### Inherited from\n\n[`Row_CoreProperties`](Row_CoreProperties.md).[`index`](Row_CoreProperties.md#index)\n\n***\n\n### original\n\n```ts\noriginal: TData;\n```\n\nDefined in: [core/rows/coreRowsFeature.types.ts:28](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L28)\n\nThe original row object provided to the table. If the row is a grouped row, the original row object will be the first original in the group.\n\n#### Inherited from\n\n[`Row_CoreProperties`](Row_CoreProperties.md).[`original`](Row_CoreProperties.md#original)\n\n***\n\n### originalSubRows?\n\n```ts\noptional originalSubRows: readonly TData[];\n```\n\nDefined in: [core/rows/coreRowsFeature.types.ts:32](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L32)\n\nAn array of the original subRows as returned by the `options.getSubRows` option.\n\n#### Inherited from\n\n[`Row_CoreProperties`](Row_CoreProperties.md).[`originalSubRows`](Row_CoreProperties.md#originalsubrows)\n\n***\n\n### parentId?\n\n```ts\noptional parentId: string;\n```\n\nDefined in: [core/rows/coreRowsFeature.types.ts:36](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L36)\n\nIf nested, this row's parent row id.\n\n#### Inherited from\n\n[`Row_CoreProperties`](Row_CoreProperties.md).[`parentId`](Row_CoreProperties.md#parentid)\n\n***\n\n### renderValue()\n\n```ts\nrenderValue: <TValue>(columnId) => TValue;\n```\n\nDefined in: [core/rows/coreRowsFeature.types.ts:79](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L79)\n\nRenders the value for the row in a given columnId the same as `getValue`, but will return the `renderFallbackValue` if no value is found.\n\n#### Type Parameters\n\n##### TValue\n\n`TValue`\n\n#### Parameters\n\n##### columnId\n\n`string`\n\n#### Returns\n\n`TValue`\n\n***\n\n### subRows\n\n```ts\nsubRows: Row<TFeatures, TData>[];\n```\n\nDefined in: [core/rows/coreRowsFeature.types.ts:40](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L40)\n\nAn array of subRows for the row as returned and created by the `options.getSubRows` option.\n\n#### Inherited from\n\n[`Row_CoreProperties`](Row_CoreProperties.md).[`subRows`](Row_CoreProperties.md#subrows)\n\n***\n\n### table\n\n```ts\ntable: Table_Internal<TFeatures, TData>;\n```\n\nDefined in: [core/rows/coreRowsFeature.types.ts:44](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L44)\n\nReference to the parent table instance.\n\n#### Inherited from\n\n[`Row_CoreProperties`](Row_CoreProperties.md).[`table`](Row_CoreProperties.md#table)\n"
  },
  {
    "path": "docs/reference/interfaces/Row_RowExpanding.md",
    "content": "---\nid: Row_RowExpanding\ntitle: Row_RowExpanding\n---\n\n# Interface: Row\\_RowExpanding\n\nDefined in: [features/row-expanding/rowExpandingFeature.types.ts:14](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L14)\n\n## Properties\n\n### getCanExpand()\n\n```ts\ngetCanExpand: () => boolean;\n```\n\nDefined in: [features/row-expanding/rowExpandingFeature.types.ts:18](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L18)\n\nReturns whether the row can be expanded.\n\n#### Returns\n\n`boolean`\n\n***\n\n### getIsAllParentsExpanded()\n\n```ts\ngetIsAllParentsExpanded: () => boolean;\n```\n\nDefined in: [features/row-expanding/rowExpandingFeature.types.ts:22](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L22)\n\nReturns whether all parent rows of the row are expanded.\n\n#### Returns\n\n`boolean`\n\n***\n\n### getIsExpanded()\n\n```ts\ngetIsExpanded: () => boolean;\n```\n\nDefined in: [features/row-expanding/rowExpandingFeature.types.ts:26](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L26)\n\nReturns whether the row is expanded.\n\n#### Returns\n\n`boolean`\n\n***\n\n### getToggleExpandedHandler()\n\n```ts\ngetToggleExpandedHandler: () => () => void;\n```\n\nDefined in: [features/row-expanding/rowExpandingFeature.types.ts:30](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L30)\n\nReturns a function that can be used to toggle the expanded state of the row. This function can be used to bind to an event handler to a button.\n\n#### Returns\n\n```ts\n(): void;\n```\n\n##### Returns\n\n`void`\n\n***\n\n### toggleExpanded()\n\n```ts\ntoggleExpanded: (expanded?) => void;\n```\n\nDefined in: [features/row-expanding/rowExpandingFeature.types.ts:34](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L34)\n\nToggles the expanded state (or sets it if `expanded` is provided) for the row.\n\n#### Parameters\n\n##### expanded?\n\n`boolean`\n\n#### Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/interfaces/Row_RowPinning.md",
    "content": "---\nid: Row_RowPinning\ntitle: Row_RowPinning\n---\n\n# Interface: Row\\_RowPinning\n\nDefined in: [features/row-pinning/rowPinningFeature.types.ts:38](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L38)\n\n## Properties\n\n### getCanPin()\n\n```ts\ngetCanPin: () => boolean;\n```\n\nDefined in: [features/row-pinning/rowPinningFeature.types.ts:42](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L42)\n\nReturns whether or not the row can be pinned.\n\n#### Returns\n\n`boolean`\n\n***\n\n### getIsPinned()\n\n```ts\ngetIsPinned: () => RowPinningPosition;\n```\n\nDefined in: [features/row-pinning/rowPinningFeature.types.ts:46](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L46)\n\nReturns the pinned position of the row. (`'top'`, `'bottom'` or `false`)\n\n#### Returns\n\n[`RowPinningPosition`](../type-aliases/RowPinningPosition.md)\n\n***\n\n### getPinnedIndex()\n\n```ts\ngetPinnedIndex: () => number;\n```\n\nDefined in: [features/row-pinning/rowPinningFeature.types.ts:50](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L50)\n\nReturns the numeric pinned index of the row within a pinned row group.\n\n#### Returns\n\n`number`\n\n***\n\n### pin()\n\n```ts\npin: (position, includeLeafRows?, includeParentRows?) => void;\n```\n\nDefined in: [features/row-pinning/rowPinningFeature.types.ts:54](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L54)\n\nPins a row to the `'top'` or `'bottom'`, or unpins the row to the center if `false` is passed.\n\n#### Parameters\n\n##### position\n\n[`RowPinningPosition`](../type-aliases/RowPinningPosition.md)\n\n##### includeLeafRows?\n\n`boolean`\n\n##### includeParentRows?\n\n`boolean`\n\n#### Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/interfaces/Row_RowSelection.md",
    "content": "---\nid: Row_RowSelection\ntitle: Row_RowSelection\n---\n\n# Interface: Row\\_RowSelection\n\nDefined in: [features/row-selection/rowSelectionFeature.types.ts:48](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L48)\n\n## Properties\n\n### getCanMultiSelect()\n\n```ts\ngetCanMultiSelect: () => boolean;\n```\n\nDefined in: [features/row-selection/rowSelectionFeature.types.ts:52](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L52)\n\nReturns whether or not the row can multi-select.\n\n#### Returns\n\n`boolean`\n\n***\n\n### getCanSelect()\n\n```ts\ngetCanSelect: () => boolean;\n```\n\nDefined in: [features/row-selection/rowSelectionFeature.types.ts:56](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L56)\n\nReturns whether or not the row can be selected.\n\n#### Returns\n\n`boolean`\n\n***\n\n### getCanSelectSubRows()\n\n```ts\ngetCanSelectSubRows: () => boolean;\n```\n\nDefined in: [features/row-selection/rowSelectionFeature.types.ts:60](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L60)\n\nReturns whether or not the row can select sub rows automatically when the parent row is selected.\n\n#### Returns\n\n`boolean`\n\n***\n\n### getIsAllSubRowsSelected()\n\n```ts\ngetIsAllSubRowsSelected: () => boolean;\n```\n\nDefined in: [features/row-selection/rowSelectionFeature.types.ts:64](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L64)\n\nReturns whether or not all of the row's sub rows are selected.\n\n#### Returns\n\n`boolean`\n\n***\n\n### getIsSelected()\n\n```ts\ngetIsSelected: () => boolean;\n```\n\nDefined in: [features/row-selection/rowSelectionFeature.types.ts:68](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L68)\n\nReturns whether or not the row is selected.\n\n#### Returns\n\n`boolean`\n\n***\n\n### getIsSomeSelected()\n\n```ts\ngetIsSomeSelected: () => boolean;\n```\n\nDefined in: [features/row-selection/rowSelectionFeature.types.ts:72](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L72)\n\nReturns whether or not some of the row's sub rows are selected.\n\n#### Returns\n\n`boolean`\n\n***\n\n### getToggleSelectedHandler()\n\n```ts\ngetToggleSelectedHandler: () => (event) => void;\n```\n\nDefined in: [features/row-selection/rowSelectionFeature.types.ts:76](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L76)\n\nReturns a handler that can be used to toggle the row.\n\n#### Returns\n\n```ts\n(event): void;\n```\n\n##### Parameters\n\n###### event\n\n`unknown`\n\n##### Returns\n\n`void`\n\n***\n\n### toggleSelected()\n\n```ts\ntoggleSelected: (value?, opts?) => void;\n```\n\nDefined in: [features/row-selection/rowSelectionFeature.types.ts:80](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L80)\n\nSelects/deselects the row.\n\n#### Parameters\n\n##### value?\n\n`boolean`\n\n##### opts?\n\n###### selectChildren?\n\n`boolean`\n\n#### Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/interfaces/SortFn.md",
    "content": "---\nid: SortFn\ntitle: SortFn\n---\n\n# Interface: SortFn()\\<TFeatures, TData\\>\n\nDefined in: [features/row-sorting/rowSortingFeature.types.ts:30](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L30)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n```ts\nSortFn(\n   rowA, \n   rowB, \n   columnId): number;\n```\n\nDefined in: [features/row-sorting/rowSortingFeature.types.ts:34](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L34)\n\n## Parameters\n\n### rowA\n\n[`Row`](../type-aliases/Row.md)\\<`TFeatures`, `TData`\\>\n\n### rowB\n\n[`Row`](../type-aliases/Row.md)\\<`TFeatures`, `TData`\\>\n\n### columnId\n\n`string`\n\n## Returns\n\n`number`\n"
  },
  {
    "path": "docs/reference/interfaces/SortFns.md",
    "content": "---\nid: SortFns\ntitle: SortFns\n---\n\n# Interface: SortFns\n\nDefined in: [features/row-sorting/rowSortingFeature.types.ts:28](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L28)\n"
  },
  {
    "path": "docs/reference/interfaces/StockFeatures.md",
    "content": "---\nid: StockFeatures\ntitle: StockFeatures\n---\n\n# Interface: StockFeatures\n\nDefined in: [features/stockFeatures.ts:16](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/stockFeatures.ts#L16)\n\n## Properties\n\n### columnFacetingFeature\n\n```ts\ncolumnFacetingFeature: TableFeature<ColumnFacetingFeatureConstructors<TableFeatures, RowData>>;\n```\n\nDefined in: [features/stockFeatures.ts:17](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/stockFeatures.ts#L17)\n\n***\n\n### columnFilteringFeature\n\n```ts\ncolumnFilteringFeature: TableFeature<ColumnFilteringFeatureConstructors<TableFeatures, RowData>>;\n```\n\nDefined in: [features/stockFeatures.ts:18](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/stockFeatures.ts#L18)\n\n***\n\n### columnGroupingFeature\n\n```ts\ncolumnGroupingFeature: TableFeature<ColumnGroupingFeatureConstructors<TableFeatures, RowData>>;\n```\n\nDefined in: [features/stockFeatures.ts:19](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/stockFeatures.ts#L19)\n\n***\n\n### columnOrderingFeature\n\n```ts\ncolumnOrderingFeature: TableFeature<ColumnOrderingFeatureConstructors<TableFeatures, RowData>>;\n```\n\nDefined in: [features/stockFeatures.ts:20](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/stockFeatures.ts#L20)\n\n***\n\n### columnPinningFeature\n\n```ts\ncolumnPinningFeature: TableFeature<ColumnPinningFeatureConstructors<TableFeatures, RowData>>;\n```\n\nDefined in: [features/stockFeatures.ts:21](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/stockFeatures.ts#L21)\n\n***\n\n### columnResizingFeature\n\n```ts\ncolumnResizingFeature: TableFeature<ColumnResizingFeatureConstructors<TableFeatures, RowData>>;\n```\n\nDefined in: [features/stockFeatures.ts:22](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/stockFeatures.ts#L22)\n\n***\n\n### columnSizingFeature\n\n```ts\ncolumnSizingFeature: TableFeature<ColumnSizingFeatureConstructors<TableFeatures, RowData>>;\n```\n\nDefined in: [features/stockFeatures.ts:23](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/stockFeatures.ts#L23)\n\n***\n\n### columnVisibilityFeature\n\n```ts\ncolumnVisibilityFeature: TableFeature<ColumnVisibilityFeatureConstructors<TableFeatures, RowData>>;\n```\n\nDefined in: [features/stockFeatures.ts:24](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/stockFeatures.ts#L24)\n\n***\n\n### globalFilteringFeature\n\n```ts\nglobalFilteringFeature: TableFeature<GlobalFilteringFeatureConstructors<TableFeatures, RowData>>;\n```\n\nDefined in: [features/stockFeatures.ts:25](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/stockFeatures.ts#L25)\n\n***\n\n### rowExpandingFeature\n\n```ts\nrowExpandingFeature: TableFeature<RowExpandingFeatureConstructors<TableFeatures, RowData>>;\n```\n\nDefined in: [features/stockFeatures.ts:26](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/stockFeatures.ts#L26)\n\n***\n\n### rowPaginationFeature\n\n```ts\nrowPaginationFeature: TableFeature<RowPaginationFeatureConstructors<TableFeatures, RowData>>;\n```\n\nDefined in: [features/stockFeatures.ts:27](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/stockFeatures.ts#L27)\n\n***\n\n### rowPinningFeature\n\n```ts\nrowPinningFeature: TableFeature<RowPinningFeatureConstructors<TableFeatures, RowData>>;\n```\n\nDefined in: [features/stockFeatures.ts:28](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/stockFeatures.ts#L28)\n\n***\n\n### rowSelectionFeature\n\n```ts\nrowSelectionFeature: TableFeature<RowSelectionFeatureConstructors<TableFeatures, RowData>>;\n```\n\nDefined in: [features/stockFeatures.ts:29](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/stockFeatures.ts#L29)\n\n***\n\n### rowSortingFeature\n\n```ts\nrowSortingFeature: TableFeature<RowSortingFeatureConstructors<TableFeatures, RowData>>;\n```\n\nDefined in: [features/stockFeatures.ts:30](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/stockFeatures.ts#L30)\n"
  },
  {
    "path": "docs/reference/interfaces/StringHeaderIdentifier.md",
    "content": "---\nid: StringHeaderIdentifier\ntitle: StringHeaderIdentifier\n---\n\n# Interface: StringHeaderIdentifier\n\nDefined in: [types/ColumnDef.ts:45](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L45)\n\n## Properties\n\n### header\n\n```ts\nheader: string;\n```\n\nDefined in: [types/ColumnDef.ts:46](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L46)\n\n***\n\n### id?\n\n```ts\noptional id: string;\n```\n\nDefined in: [types/ColumnDef.ts:47](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L47)\n"
  },
  {
    "path": "docs/reference/interfaces/TableFeature.md",
    "content": "---\nid: TableFeature\ntitle: TableFeature\n---\n\n# Interface: TableFeature\\<TConstructors\\>\n\nDefined in: [types/TableFeatures.ts:116](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableFeatures.ts#L116)\n\n## Type Parameters\n\n### TConstructors\n\n`TConstructors` *extends* `FeatureConstructors`\n\n## Properties\n\n### assignCellPrototype?\n\n```ts\noptional assignCellPrototype: AssignCellPrototype<TConstructors>;\n```\n\nDefined in: [types/TableFeatures.ts:121](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableFeatures.ts#L121)\n\nAssigns Cell APIs to the cell prototype for memory-efficient method sharing.\nThis is called once per table to build a shared prototype for all cells.\n\n***\n\n### assignColumnPrototype?\n\n```ts\noptional assignColumnPrototype: AssignColumnPrototype<TConstructors>;\n```\n\nDefined in: [types/TableFeatures.ts:126](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableFeatures.ts#L126)\n\nAssigns Column APIs to the column prototype for memory-efficient method sharing.\nThis is called once per table to build a shared prototype for all columns.\n\n***\n\n### assignHeaderPrototype?\n\n```ts\noptional assignHeaderPrototype: AssignHeaderPrototype<TConstructors>;\n```\n\nDefined in: [types/TableFeatures.ts:131](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableFeatures.ts#L131)\n\nAssigns Header APIs to the header prototype for memory-efficient method sharing.\nThis is called once per table to build a shared prototype for all headers.\n\n***\n\n### assignRowPrototype?\n\n```ts\noptional assignRowPrototype: AssignRowPrototype<TConstructors>;\n```\n\nDefined in: [types/TableFeatures.ts:136](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableFeatures.ts#L136)\n\nAssigns Row APIs to the row prototype for memory-efficient method sharing.\nThis is called once per table to build a shared prototype for all rows.\n\n***\n\n### constructTableAPIs?\n\n```ts\noptional constructTableAPIs: ConstructTableAPIs<TConstructors>;\n```\n\nDefined in: [types/TableFeatures.ts:141](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableFeatures.ts#L141)\n\nAssigns Table APIs to the table instance.\nUnlike row/cell/column/header, the table is a singleton so methods are assigned directly.\n\n***\n\n### getDefaultColumnDef?\n\n```ts\noptional getDefaultColumnDef: GetDefaultColumnDef<TConstructors>;\n```\n\nDefined in: [types/TableFeatures.ts:142](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableFeatures.ts#L142)\n\n***\n\n### getDefaultTableOptions?\n\n```ts\noptional getDefaultTableOptions: GetDefaultTableOptions<TConstructors>;\n```\n\nDefined in: [types/TableFeatures.ts:143](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableFeatures.ts#L143)\n\n***\n\n### getInitialState?\n\n```ts\noptional getInitialState: GetInitialState<TConstructors>;\n```\n\nDefined in: [types/TableFeatures.ts:144](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableFeatures.ts#L144)\n\n***\n\n### initRowInstanceData?\n\n```ts\noptional initRowInstanceData: InitRowInstanceData<TConstructors>;\n```\n\nDefined in: [types/TableFeatures.ts:149](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableFeatures.ts#L149)\n\nInitializes instance-specific data on each row (e.g., caches).\nMethods should be assigned via assignRowPrototype instead.\n"
  },
  {
    "path": "docs/reference/interfaces/TableFeatures.md",
    "content": "---\nid: TableFeatures\ntitle: TableFeatures\n---\n\n# Interface: TableFeatures\n\nDefined in: [types/TableFeatures.ts:42](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableFeatures.ts#L42)\n\n## Extends\n\n- `Partial`\\<[`CoreFeatures`](CoreFeatures.md)\\>.`Partial`\\<[`StockFeatures`](StockFeatures.md)\\>.`Partial`\\<[`Plugins`](Plugins.md)\\>\n\n## Properties\n\n### columnFacetingFeature?\n\n```ts\noptional columnFacetingFeature: TableFeature<ColumnFacetingFeatureConstructors<TableFeatures, RowData>>;\n```\n\nDefined in: [features/stockFeatures.ts:17](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/stockFeatures.ts#L17)\n\n#### Inherited from\n\n[`StockFeatures`](StockFeatures.md).[`columnFacetingFeature`](StockFeatures.md#columnfacetingfeature)\n\n***\n\n### columnFilteringFeature?\n\n```ts\noptional columnFilteringFeature: TableFeature<ColumnFilteringFeatureConstructors<TableFeatures, RowData>>;\n```\n\nDefined in: [features/stockFeatures.ts:18](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/stockFeatures.ts#L18)\n\n#### Inherited from\n\n[`StockFeatures`](StockFeatures.md).[`columnFilteringFeature`](StockFeatures.md#columnfilteringfeature)\n\n***\n\n### columnGroupingFeature?\n\n```ts\noptional columnGroupingFeature: TableFeature<ColumnGroupingFeatureConstructors<TableFeatures, RowData>>;\n```\n\nDefined in: [features/stockFeatures.ts:19](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/stockFeatures.ts#L19)\n\n#### Inherited from\n\n[`StockFeatures`](StockFeatures.md).[`columnGroupingFeature`](StockFeatures.md#columngroupingfeature)\n\n***\n\n### columnOrderingFeature?\n\n```ts\noptional columnOrderingFeature: TableFeature<ColumnOrderingFeatureConstructors<TableFeatures, RowData>>;\n```\n\nDefined in: [features/stockFeatures.ts:20](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/stockFeatures.ts#L20)\n\n#### Inherited from\n\n[`StockFeatures`](StockFeatures.md).[`columnOrderingFeature`](StockFeatures.md#columnorderingfeature)\n\n***\n\n### columnPinningFeature?\n\n```ts\noptional columnPinningFeature: TableFeature<ColumnPinningFeatureConstructors<TableFeatures, RowData>>;\n```\n\nDefined in: [features/stockFeatures.ts:21](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/stockFeatures.ts#L21)\n\n#### Inherited from\n\n[`StockFeatures`](StockFeatures.md).[`columnPinningFeature`](StockFeatures.md#columnpinningfeature)\n\n***\n\n### columnResizingFeature?\n\n```ts\noptional columnResizingFeature: TableFeature<ColumnResizingFeatureConstructors<TableFeatures, RowData>>;\n```\n\nDefined in: [features/stockFeatures.ts:22](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/stockFeatures.ts#L22)\n\n#### Inherited from\n\n[`StockFeatures`](StockFeatures.md).[`columnResizingFeature`](StockFeatures.md#columnresizingfeature)\n\n***\n\n### columnSizingFeature?\n\n```ts\noptional columnSizingFeature: TableFeature<ColumnSizingFeatureConstructors<TableFeatures, RowData>>;\n```\n\nDefined in: [features/stockFeatures.ts:23](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/stockFeatures.ts#L23)\n\n#### Inherited from\n\n[`StockFeatures`](StockFeatures.md).[`columnSizingFeature`](StockFeatures.md#columnsizingfeature)\n\n***\n\n### columnVisibilityFeature?\n\n```ts\noptional columnVisibilityFeature: TableFeature<ColumnVisibilityFeatureConstructors<TableFeatures, RowData>>;\n```\n\nDefined in: [features/stockFeatures.ts:24](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/stockFeatures.ts#L24)\n\n#### Inherited from\n\n[`StockFeatures`](StockFeatures.md).[`columnVisibilityFeature`](StockFeatures.md#columnvisibilityfeature)\n\n***\n\n### coreCellsFeature?\n\n```ts\noptional coreCellsFeature: TableFeature<CoreCellsFeatureConstructors<TableFeatures, RowData>>;\n```\n\nDefined in: [core/coreFeatures.ts:9](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/coreFeatures.ts#L9)\n\n#### Inherited from\n\n[`CoreFeatures`](CoreFeatures.md).[`coreCellsFeature`](CoreFeatures.md#corecellsfeature)\n\n***\n\n### coreColumnsFeature?\n\n```ts\noptional coreColumnsFeature: TableFeature<CoreColumnsFeatureConstructors<TableFeatures, RowData>>;\n```\n\nDefined in: [core/coreFeatures.ts:10](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/coreFeatures.ts#L10)\n\n#### Inherited from\n\n[`CoreFeatures`](CoreFeatures.md).[`coreColumnsFeature`](CoreFeatures.md#corecolumnsfeature)\n\n***\n\n### coreHeadersFeature?\n\n```ts\noptional coreHeadersFeature: TableFeature<CoreHeadersFeatureConstructors<TableFeatures, RowData>>;\n```\n\nDefined in: [core/coreFeatures.ts:11](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/coreFeatures.ts#L11)\n\n#### Inherited from\n\n[`CoreFeatures`](CoreFeatures.md).[`coreHeadersFeature`](CoreFeatures.md#coreheadersfeature)\n\n***\n\n### coreRowModelsFeature?\n\n```ts\noptional coreRowModelsFeature: TableFeature<CoreRowModelsFeatureConstructors<TableFeatures, RowData>>;\n```\n\nDefined in: [core/coreFeatures.ts:12](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/coreFeatures.ts#L12)\n\n#### Inherited from\n\n[`CoreFeatures`](CoreFeatures.md).[`coreRowModelsFeature`](CoreFeatures.md#corerowmodelsfeature)\n\n***\n\n### coreRowsFeature?\n\n```ts\noptional coreRowsFeature: TableFeature<CoreRowsFeatureConstructors<TableFeatures, RowData>>;\n```\n\nDefined in: [core/coreFeatures.ts:13](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/coreFeatures.ts#L13)\n\n#### Inherited from\n\n[`CoreFeatures`](CoreFeatures.md).[`coreRowsFeature`](CoreFeatures.md#corerowsfeature)\n\n***\n\n### coreTablesFeature?\n\n```ts\noptional coreTablesFeature: TableFeature<CoreTablesFeatureConstructors<TableFeatures, RowData>>;\n```\n\nDefined in: [core/coreFeatures.ts:14](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/coreFeatures.ts#L14)\n\n#### Inherited from\n\n[`CoreFeatures`](CoreFeatures.md).[`coreTablesFeature`](CoreFeatures.md#coretablesfeature)\n\n***\n\n### globalFilteringFeature?\n\n```ts\noptional globalFilteringFeature: TableFeature<GlobalFilteringFeatureConstructors<TableFeatures, RowData>>;\n```\n\nDefined in: [features/stockFeatures.ts:25](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/stockFeatures.ts#L25)\n\n#### Inherited from\n\n[`StockFeatures`](StockFeatures.md).[`globalFilteringFeature`](StockFeatures.md#globalfilteringfeature)\n\n***\n\n### rowExpandingFeature?\n\n```ts\noptional rowExpandingFeature: TableFeature<RowExpandingFeatureConstructors<TableFeatures, RowData>>;\n```\n\nDefined in: [features/stockFeatures.ts:26](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/stockFeatures.ts#L26)\n\n#### Inherited from\n\n[`StockFeatures`](StockFeatures.md).[`rowExpandingFeature`](StockFeatures.md#rowexpandingfeature)\n\n***\n\n### rowPaginationFeature?\n\n```ts\noptional rowPaginationFeature: TableFeature<RowPaginationFeatureConstructors<TableFeatures, RowData>>;\n```\n\nDefined in: [features/stockFeatures.ts:27](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/stockFeatures.ts#L27)\n\n#### Inherited from\n\n[`StockFeatures`](StockFeatures.md).[`rowPaginationFeature`](StockFeatures.md#rowpaginationfeature)\n\n***\n\n### rowPinningFeature?\n\n```ts\noptional rowPinningFeature: TableFeature<RowPinningFeatureConstructors<TableFeatures, RowData>>;\n```\n\nDefined in: [features/stockFeatures.ts:28](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/stockFeatures.ts#L28)\n\n#### Inherited from\n\n[`StockFeatures`](StockFeatures.md).[`rowPinningFeature`](StockFeatures.md#rowpinningfeature)\n\n***\n\n### rowSelectionFeature?\n\n```ts\noptional rowSelectionFeature: TableFeature<RowSelectionFeatureConstructors<TableFeatures, RowData>>;\n```\n\nDefined in: [features/stockFeatures.ts:29](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/stockFeatures.ts#L29)\n\n#### Inherited from\n\n[`StockFeatures`](StockFeatures.md).[`rowSelectionFeature`](StockFeatures.md#rowselectionfeature)\n\n***\n\n### rowSortingFeature?\n\n```ts\noptional rowSortingFeature: TableFeature<RowSortingFeatureConstructors<TableFeatures, RowData>>;\n```\n\nDefined in: [features/stockFeatures.ts:30](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/stockFeatures.ts#L30)\n\n#### Inherited from\n\n[`StockFeatures`](StockFeatures.md).[`rowSortingFeature`](StockFeatures.md#rowsortingfeature)\n"
  },
  {
    "path": "docs/reference/interfaces/TableMeta.md",
    "content": "---\nid: TableMeta\ntitle: TableMeta\n---\n\n# Interface: TableMeta\\<TFeatures, TData\\>\n\nDefined in: [core/table/coreTablesFeature.types.ts:10](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L10)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n"
  },
  {
    "path": "docs/reference/interfaces/TableOptions_Cell.md",
    "content": "---\nid: TableOptions_Cell\ntitle: TableOptions_Cell\n---\n\n# Interface: TableOptions\\_Cell\n\nDefined in: [core/cells/coreCellsFeature.types.ts:63](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.types.ts#L63)\n\n## Extended by\n\n- [`TableOptions_Core`](TableOptions_Core.md)\n\n## Properties\n\n### renderFallbackValue?\n\n```ts\noptional renderFallbackValue: any;\n```\n\nDefined in: [core/cells/coreCellsFeature.types.ts:67](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.types.ts#L67)\n\nValue used when the desired value is not found in the data.\n"
  },
  {
    "path": "docs/reference/interfaces/TableOptions_ColumnFiltering.md",
    "content": "---\nid: TableOptions_ColumnFiltering\ntitle: TableOptions_ColumnFiltering\n---\n\n# Interface: TableOptions\\_ColumnFiltering\\<TFeatures, TData\\>\n\nDefined in: [features/column-filtering/columnFilteringFeature.types.ts:143](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L143)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Properties\n\n### enableColumnFilters?\n\n```ts\noptional enableColumnFilters: boolean;\n```\n\nDefined in: [features/column-filtering/columnFilteringFeature.types.ts:150](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L150)\n\nEnables/disables **column** filtering for all columns.\n\n***\n\n### enableFilters?\n\n```ts\noptional enableFilters: boolean;\n```\n\nDefined in: [features/column-filtering/columnFilteringFeature.types.ts:154](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L154)\n\nEnables/disables all filtering for the table.\n\n***\n\n### filterFromLeafRows?\n\n```ts\noptional filterFromLeafRows: boolean;\n```\n\nDefined in: [features/column-filtering/columnFilteringFeature.types.ts:158](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L158)\n\nBy default, filtering is done from parent rows down (so if a parent row is filtered out, all of its children will be filtered out as well). Setting this option to `true` will cause filtering to be done from leaf rows up (which means parent rows will be included so long as one of their child or grand-child rows is also included).\n\n***\n\n### manualFiltering?\n\n```ts\noptional manualFiltering: boolean;\n```\n\nDefined in: [features/column-filtering/columnFilteringFeature.types.ts:162](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L162)\n\nDisables the `getFilteredRowModel` from being used to filter data. This may be useful if your table needs to dynamically support both client-side and server-side filtering.\n\n***\n\n### maxLeafRowFilterDepth?\n\n```ts\noptional maxLeafRowFilterDepth: number;\n```\n\nDefined in: [features/column-filtering/columnFilteringFeature.types.ts:168](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L168)\n\nBy default, filtering is done for all rows (max depth of 100), no matter if they are root level parent rows or the child leaf rows of a parent row. Setting this option to `0` will cause filtering to only be applied to the root level parent rows, with all sub-rows remaining unfiltered. Similarly, setting this option to `1` will cause filtering to only be applied to child leaf rows 1 level deep, and so on.\n\nThis is useful for situations where you want a row's entire child hierarchy to be visible regardless of the applied filter.\n\n***\n\n### onColumnFiltersChange?\n\n```ts\noptional onColumnFiltersChange: OnChangeFn<ColumnFiltersState>;\n```\n\nDefined in: [features/column-filtering/columnFilteringFeature.types.ts:172](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L172)\n\nIf provided, this function will be called with an `updaterFn` when `state.columnFilters` changes. This overrides the default internal state management, so you will need to persist the state change either fully or partially outside of the table.\n"
  },
  {
    "path": "docs/reference/interfaces/TableOptions_ColumnGrouping.md",
    "content": "---\nid: TableOptions_ColumnGrouping\ntitle: TableOptions_ColumnGrouping\n---\n\n# Interface: TableOptions\\_ColumnGrouping\n\nDefined in: [features/column-grouping/columnGroupingFeature.types.ts:152](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L152)\n\n## Properties\n\n### enableGrouping?\n\n```ts\noptional enableGrouping: boolean;\n```\n\nDefined in: [features/column-grouping/columnGroupingFeature.types.ts:156](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L156)\n\nEnables/disables grouping for the table.\n\n***\n\n### groupedColumnMode?\n\n```ts\noptional groupedColumnMode: false | \"reorder\" | \"remove\";\n```\n\nDefined in: [features/column-grouping/columnGroupingFeature.types.ts:160](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L160)\n\nGrouping columns are automatically reordered by default to the start of the columns list. If you would rather remove them or leave them as-is, set the appropriate mode here.\n\n***\n\n### manualGrouping?\n\n```ts\noptional manualGrouping: boolean;\n```\n\nDefined in: [features/column-grouping/columnGroupingFeature.types.ts:164](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L164)\n\nEnables manual grouping. If this option is set to `true`, the table will not automatically group rows using `getGroupedRowModel()` and instead will expect you to manually group the rows before passing them to the table. This is useful if you are doing server-side grouping and aggregation.\n\n***\n\n### onGroupingChange?\n\n```ts\noptional onGroupingChange: OnChangeFn<GroupingState>;\n```\n\nDefined in: [features/column-grouping/columnGroupingFeature.types.ts:168](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L168)\n\nIf this function is provided, it will be called when the grouping state changes and you will be expected to manage the state yourself. You can pass the managed state back to the table via the `tableOptions.state.grouping` option.\n"
  },
  {
    "path": "docs/reference/interfaces/TableOptions_ColumnOrdering.md",
    "content": "---\nid: TableOptions_ColumnOrdering\ntitle: TableOptions_ColumnOrdering\n---\n\n# Interface: TableOptions\\_ColumnOrdering\n\nDefined in: [features/column-ordering/columnOrderingFeature.types.ts:11](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.types.ts#L11)\n\n## Properties\n\n### onColumnOrderChange?\n\n```ts\noptional onColumnOrderChange: OnChangeFn<ColumnOrderState>;\n```\n\nDefined in: [features/column-ordering/columnOrderingFeature.types.ts:15](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.types.ts#L15)\n\nIf provided, this function will be called with an `updaterFn` when `state.columnOrder` changes. This overrides the default internal state management, so you will need to persist the state change either fully or partially outside of the table.\n"
  },
  {
    "path": "docs/reference/interfaces/TableOptions_ColumnPinning.md",
    "content": "---\nid: TableOptions_ColumnPinning\ntitle: TableOptions_ColumnPinning\n---\n\n# Interface: TableOptions\\_ColumnPinning\n\nDefined in: [features/column-pinning/columnPinningFeature.types.ts:19](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L19)\n\n## Properties\n\n### enableColumnPinning?\n\n```ts\noptional enableColumnPinning: boolean;\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.types.ts:23](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L23)\n\nEnables/disables column pinning for the table. Defaults to `true`.\n\n***\n\n### onColumnPinningChange?\n\n```ts\noptional onColumnPinningChange: OnChangeFn<ColumnPinningState>;\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.types.ts:27](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L27)\n\nIf provided, this function will be called with an `updaterFn` when `state.columnPinning` changes. This overrides the default internal state management, so you will also need to supply `state.columnPinning` from your own managed state.\n"
  },
  {
    "path": "docs/reference/interfaces/TableOptions_ColumnResizing.md",
    "content": "---\nid: TableOptions_ColumnResizing\ntitle: TableOptions_ColumnResizing\n---\n\n# Interface: TableOptions\\_ColumnResizing\n\nDefined in: [features/column-resizing/columnResizingFeature.types.ts:20](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L20)\n\n## Properties\n\n### columnResizeDirection?\n\n```ts\noptional columnResizeDirection: ColumnResizeDirection;\n```\n\nDefined in: [features/column-resizing/columnResizingFeature.types.ts:32](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L32)\n\nEnables or disables right-to-left support for resizing the column. defaults to 'ltr'.\n\n***\n\n### columnResizeMode?\n\n```ts\noptional columnResizeMode: ColumnResizeMode;\n```\n\nDefined in: [features/column-resizing/columnResizingFeature.types.ts:24](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L24)\n\nDetermines when the columnSizing state is updated. `onChange` updates the state when the user is dragging the resize handle. `onEnd` updates the state when the user releases the resize handle.\n\n***\n\n### enableColumnResizing?\n\n```ts\noptional enableColumnResizing: boolean;\n```\n\nDefined in: [features/column-resizing/columnResizingFeature.types.ts:28](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L28)\n\nEnables or disables column resizing for the column.\n\n***\n\n### onColumnResizingChange?\n\n```ts\noptional onColumnResizingChange: OnChangeFn<columnResizingState>;\n```\n\nDefined in: [features/column-resizing/columnResizingFeature.types.ts:36](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L36)\n\nIf provided, this function will be called with an `updaterFn` when `state.columnResizing` changes. This overrides the default internal state management, so you will also need to supply `state.columnResizing` from your own managed state.\n"
  },
  {
    "path": "docs/reference/interfaces/TableOptions_ColumnSizing.md",
    "content": "---\nid: TableOptions_ColumnSizing\ntitle: TableOptions_ColumnSizing\n---\n\n# Interface: TableOptions\\_ColumnSizing\n\nDefined in: [features/column-sizing/columnSizingFeature.types.ts:10](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L10)\n\n## Properties\n\n### onColumnSizingChange?\n\n```ts\noptional onColumnSizingChange: OnChangeFn<ColumnSizingState>;\n```\n\nDefined in: [features/column-sizing/columnSizingFeature.types.ts:14](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L14)\n\nIf provided, this function will be called with an `updaterFn` when `state.columnSizing` changes. This overrides the default internal state management, so you will also need to supply `state.columnSizing` from your own managed state.\n"
  },
  {
    "path": "docs/reference/interfaces/TableOptions_ColumnVisibility.md",
    "content": "---\nid: TableOptions_ColumnVisibility\ntitle: TableOptions_ColumnVisibility\n---\n\n# Interface: TableOptions\\_ColumnVisibility\n\nDefined in: [features/column-visibility/columnVisibilityFeature.types.ts:12](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L12)\n\n## Properties\n\n### enableHiding?\n\n```ts\noptional enableHiding: boolean;\n```\n\nDefined in: [features/column-visibility/columnVisibilityFeature.types.ts:16](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L16)\n\nWhether to enable column hiding. Defaults to `true`.\n\n***\n\n### onColumnVisibilityChange?\n\n```ts\noptional onColumnVisibilityChange: OnChangeFn<ColumnVisibilityState>;\n```\n\nDefined in: [features/column-visibility/columnVisibilityFeature.types.ts:20](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L20)\n\nIf provided, this function will be called with an `updaterFn` when `state.columnVisibility` changes. This overrides the default internal state management, so you will need to persist the state change either fully or partially outside of the table.\n"
  },
  {
    "path": "docs/reference/interfaces/TableOptions_Columns.md",
    "content": "---\nid: TableOptions_Columns\ntitle: TableOptions_Columns\n---\n\n# Interface: TableOptions\\_Columns\\<TFeatures, TData, TValue\\>\n\nDefined in: [core/columns/coreColumnsFeature.types.ts:60](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L60)\n\n## Extended by\n\n- [`TableOptions_Core`](TableOptions_Core.md)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n### TValue\n\n`TValue` *extends* [`CellData`](../type-aliases/CellData.md) = [`CellData`](../type-aliases/CellData.md)\n\n## Properties\n\n### columns\n\n```ts\ncolumns: readonly ColumnDef<TFeatures, TData, TValue>[];\n```\n\nDefined in: [core/columns/coreColumnsFeature.types.ts:68](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L68)\n\nThe array of column defs to use for the table.\n\n***\n\n### defaultColumn?\n\n```ts\noptional defaultColumn: Partial<ColumnDef<TFeatures, TData, TValue>>;\n```\n\nDefined in: [core/columns/coreColumnsFeature.types.ts:72](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L72)\n\nDefault column options to use for all column defs supplied to the table.\n"
  },
  {
    "path": "docs/reference/interfaces/TableOptions_Core.md",
    "content": "---\nid: TableOptions_Core\ntitle: TableOptions_Core\n---\n\n# Interface: TableOptions\\_Core\\<TFeatures, TData\\>\n\nDefined in: [types/TableOptions.ts:27](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableOptions.ts#L27)\n\n## Extends\n\n- [`TableOptions_Table`](TableOptions_Table.md)\\<`TFeatures`, `TData`\\>.[`TableOptions_Cell`](TableOptions_Cell.md).[`TableOptions_Columns`](TableOptions_Columns.md)\\<`TFeatures`, `TData`\\>.[`TableOptions_Rows`](TableOptions_Rows.md)\\<`TFeatures`, `TData`\\>\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Properties\n\n### \\_features\n\n```ts\n_features: TFeatures;\n```\n\nDefined in: [core/table/coreTablesFeature.types.ts:22](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L22)\n\nThe features that you want to enable for the table.\n\n#### Inherited from\n\n[`TableOptions_Table`](TableOptions_Table.md).[`_features`](TableOptions_Table.md#_features)\n\n***\n\n### \\_rowModels?\n\n```ts\noptional _rowModels: CreateRowModels_All<TFeatures, TData>;\n```\n\nDefined in: [core/table/coreTablesFeature.types.ts:26](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L26)\n\nThe row model options that you want to enable for the table.\n\n#### Inherited from\n\n[`TableOptions_Table`](TableOptions_Table.md).[`_rowModels`](TableOptions_Table.md#_rowmodels)\n\n***\n\n### autoResetAll?\n\n```ts\noptional autoResetAll: boolean;\n```\n\nDefined in: [core/table/coreTablesFeature.types.ts:30](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L30)\n\nSet this option to override any of the `autoReset...` feature options.\n\n#### Inherited from\n\n[`TableOptions_Table`](TableOptions_Table.md).[`autoResetAll`](TableOptions_Table.md#autoresetall)\n\n***\n\n### columns\n\n```ts\ncolumns: readonly ColumnDef<TFeatures, TData, unknown>[];\n```\n\nDefined in: [core/columns/coreColumnsFeature.types.ts:68](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L68)\n\nThe array of column defs to use for the table.\n\n#### Inherited from\n\n[`TableOptions_Columns`](TableOptions_Columns.md).[`columns`](TableOptions_Columns.md#columns)\n\n***\n\n### data\n\n```ts\ndata: readonly TData[];\n```\n\nDefined in: [core/table/coreTablesFeature.types.ts:34](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L34)\n\nThe data for the table to display. When the `data` option changes reference, the table will reprocess the data.\n\n#### Inherited from\n\n[`TableOptions_Table`](TableOptions_Table.md).[`data`](TableOptions_Table.md#data)\n\n***\n\n### defaultColumn?\n\n```ts\noptional defaultColumn: Partial<ColumnDef<TFeatures, TData, unknown>>;\n```\n\nDefined in: [core/columns/coreColumnsFeature.types.ts:72](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L72)\n\nDefault column options to use for all column defs supplied to the table.\n\n#### Inherited from\n\n[`TableOptions_Columns`](TableOptions_Columns.md).[`defaultColumn`](TableOptions_Columns.md#defaultcolumn)\n\n***\n\n### getRowId()?\n\n```ts\noptional getRowId: (originalRow, index, parent?) => string;\n```\n\nDefined in: [core/rows/coreRowsFeature.types.ts:90](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L90)\n\nThis optional function is used to derive a unique ID for any given row. If not provided the rows index is used (nested rows join together with `.` using their grandparents' index eg. `index.index.index`). If you need to identify individual rows that are originating from any server-side operations, it's suggested you use this function to return an ID that makes sense regardless of network IO/ambiguity eg. a userId, taskId, database ID field, etc.\n\n#### Parameters\n\n##### originalRow\n\n`TData`\n\n##### index\n\n`number`\n\n##### parent?\n\n[`Row`](../type-aliases/Row.md)\\<`TFeatures`, `TData`\\>\n\n#### Returns\n\n`string`\n\n#### Example\n\n```ts\ngetRowId: row => row.userId\n```\n\n#### Inherited from\n\n[`TableOptions_Rows`](TableOptions_Rows.md).[`getRowId`](TableOptions_Rows.md#getrowid)\n\n***\n\n### getSubRows()?\n\n```ts\noptional getSubRows: (originalRow, index) => readonly TData[] | undefined;\n```\n\nDefined in: [core/rows/coreRowsFeature.types.ts:99](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L99)\n\nThis optional function is used to access the sub rows for any given row. If you are using nested rows, you will need to use this function to return the sub rows object (or undefined) from the row.\n\n#### Parameters\n\n##### originalRow\n\n`TData`\n\n##### index\n\n`number`\n\n#### Returns\n\nreadonly `TData`[] \\| `undefined`\n\n#### Example\n\n```ts\ngetSubRows: row => row.subRows\n```\n\n#### Inherited from\n\n[`TableOptions_Rows`](TableOptions_Rows.md).[`getSubRows`](TableOptions_Rows.md#getsubrows)\n\n***\n\n### initialState?\n\n```ts\noptional initialState: Partial<TableState<TFeatures>>;\n```\n\nDefined in: [core/table/coreTablesFeature.types.ts:39](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L39)\n\nUse this option to optionally pass initial state to the table. This state will be used when resetting various table states either automatically by the table (eg. `options.autoResetPageIndex`) or via functions like `table.resetRowSelection()`. Most reset function allow you optionally pass a flag to reset to a blank/default state instead of the initial state.\nTable state will not be reset when this object changes, which also means that the initial state object does not need to be stable.\n\n#### Inherited from\n\n[`TableOptions_Table`](TableOptions_Table.md).[`initialState`](TableOptions_Table.md#initialstate)\n\n***\n\n### mergeOptions()?\n\n```ts\noptional mergeOptions: (defaultOptions, options) => TableOptions<TFeatures, TData>;\n```\n\nDefined in: [core/table/coreTablesFeature.types.ts:43](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L43)\n\nThis option is used to optionally implement the merging of table options.\n\n#### Parameters\n\n##### defaultOptions\n\n[`TableOptions`](../type-aliases/TableOptions.md)\\<`TFeatures`, `TData`\\>\n\n##### options\n\n`Partial`\\<[`TableOptions`](../type-aliases/TableOptions.md)\\<`TFeatures`, `TData`\\>\\>\n\n#### Returns\n\n[`TableOptions`](../type-aliases/TableOptions.md)\\<`TFeatures`, `TData`\\>\n\n#### Inherited from\n\n[`TableOptions_Table`](TableOptions_Table.md).[`mergeOptions`](TableOptions_Table.md#mergeoptions)\n\n***\n\n### meta?\n\n```ts\noptional meta: TableMeta<TFeatures, TData>;\n```\n\nDefined in: [core/table/coreTablesFeature.types.ts:50](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L50)\n\nYou can pass any object to `options.meta` and access it anywhere the `table` is available via `table.options.meta`.\n\n#### Inherited from\n\n[`TableOptions_Table`](TableOptions_Table.md).[`meta`](TableOptions_Table.md#meta)\n\n***\n\n### renderFallbackValue?\n\n```ts\noptional renderFallbackValue: any;\n```\n\nDefined in: [core/cells/coreCellsFeature.types.ts:67](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.types.ts#L67)\n\nValue used when the desired value is not found in the data.\n\n#### Inherited from\n\n[`TableOptions_Cell`](TableOptions_Cell.md).[`renderFallbackValue`](TableOptions_Cell.md#renderfallbackvalue)\n\n***\n\n### state?\n\n```ts\noptional state: Partial<TableState<TFeatures>>;\n```\n\nDefined in: [core/table/coreTablesFeature.types.ts:54](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L54)\n\nPass in individual self-managed state to the table.\n\n#### Inherited from\n\n[`TableOptions_Table`](TableOptions_Table.md).[`state`](TableOptions_Table.md#state)\n\n***\n\n### store?\n\n```ts\noptional store: Store<TableState<TFeatures>>;\n```\n\nDefined in: [core/table/coreTablesFeature.types.ts:58](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L58)\n\nOptionally, provide your own external TanStack Store instance if you want to manage the table state externally.\n\n#### Inherited from\n\n[`TableOptions_Table`](TableOptions_Table.md).[`store`](TableOptions_Table.md#store)\n"
  },
  {
    "path": "docs/reference/interfaces/TableOptions_GlobalFiltering.md",
    "content": "---\nid: TableOptions_GlobalFiltering\ntitle: TableOptions_GlobalFiltering\n---\n\n# Interface: TableOptions\\_GlobalFiltering\\<TFeatures, TData\\>\n\nDefined in: [features/global-filtering/globalFilteringFeature.types.ts:32](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.types.ts#L32)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Properties\n\n### enableGlobalFilter?\n\n```ts\noptional enableGlobalFilter: boolean;\n```\n\nDefined in: [features/global-filtering/globalFilteringFeature.types.ts:39](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.types.ts#L39)\n\nEnables/disables **global** filtering for all columns.\n\n***\n\n### getColumnCanGlobalFilter()?\n\n```ts\noptional getColumnCanGlobalFilter: <TFeatures, TData, TValue>(column) => boolean;\n```\n\nDefined in: [features/global-filtering/globalFilteringFeature.types.ts:44](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.types.ts#L44)\n\nIf provided, this function will be called with the column and should return `true` or `false` to indicate whether this column should be used for global filtering.\nThis is useful if the column can contain data that is not `string` or `number` (i.e. `undefined`).\n\n#### Type Parameters\n\n##### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n##### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n##### TValue\n\n`TValue` *extends* `unknown` = `unknown`\n\n#### Parameters\n\n##### column\n\n[`Column`](../type-aliases/Column.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n#### Returns\n\n`boolean`\n\n***\n\n### globalFilterFn?\n\n```ts\noptional globalFilterFn: FilterFnOption<TFeatures, TData>;\n```\n\nDefined in: [features/global-filtering/globalFilteringFeature.types.ts:57](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.types.ts#L57)\n\nThe filter function to use for global filtering.\n- A `string` referencing a built-in filter function\n- A `string` that references a custom filter functions provided via the `tableOptions.filterFns` option\n- A custom filter function\n\n***\n\n### onGlobalFilterChange?\n\n```ts\noptional onGlobalFilterChange: OnChangeFn<any>;\n```\n\nDefined in: [features/global-filtering/globalFilteringFeature.types.ts:61](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.types.ts#L61)\n\nIf provided, this function will be called with an `updaterFn` when `state.globalFilter` changes. This overrides the default internal state management, so you will need to persist the state change either fully or partially outside of the table.\n"
  },
  {
    "path": "docs/reference/interfaces/TableOptions_Plugins.md",
    "content": "---\nid: TableOptions_Plugins\ntitle: TableOptions_Plugins\n---\n\n# Interface: TableOptions\\_Plugins\\<TFeatures, TData\\>\n\nDefined in: [types/TableOptions.ts:22](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableOptions.ts#L22)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n"
  },
  {
    "path": "docs/reference/interfaces/TableOptions_RowExpanding.md",
    "content": "---\nid: TableOptions_RowExpanding\ntitle: TableOptions_RowExpanding\n---\n\n# Interface: TableOptions\\_RowExpanding\\<TFeatures, TData\\>\n\nDefined in: [features/row-expanding/rowExpandingFeature.types.ts:37](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L37)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Properties\n\n### autoResetExpanded?\n\n```ts\noptional autoResetExpanded: boolean;\n```\n\nDefined in: [features/row-expanding/rowExpandingFeature.types.ts:44](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L44)\n\nEnable this setting to automatically reset the expanded state of the table when expanding state changes.\n\n***\n\n### enableExpanding?\n\n```ts\noptional enableExpanding: boolean;\n```\n\nDefined in: [features/row-expanding/rowExpandingFeature.types.ts:48](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L48)\n\nEnable/disable expanding for all rows.\n\n***\n\n### getIsRowExpanded()?\n\n```ts\noptional getIsRowExpanded: (row) => boolean;\n```\n\nDefined in: [features/row-expanding/rowExpandingFeature.types.ts:52](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L52)\n\nIf provided, allows you to override the default behavior of determining whether a row is currently expanded.\n\n#### Parameters\n\n##### row\n\n[`Row`](../type-aliases/Row.md)\\<`TFeatures`, `TData`\\>\n\n#### Returns\n\n`boolean`\n\n***\n\n### getRowCanExpand()?\n\n```ts\noptional getRowCanExpand: (row) => boolean;\n```\n\nDefined in: [features/row-expanding/rowExpandingFeature.types.ts:56](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L56)\n\nIf provided, allows you to override the default behavior of determining whether a row can be expanded.\n\n#### Parameters\n\n##### row\n\n[`Row`](../type-aliases/Row.md)\\<`TFeatures`, `TData`\\>\n\n#### Returns\n\n`boolean`\n\n***\n\n### manualExpanding?\n\n```ts\noptional manualExpanding: boolean;\n```\n\nDefined in: [features/row-expanding/rowExpandingFeature.types.ts:60](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L60)\n\nEnables manual row expansion. If this is set to `true`, `getExpandedRowModel` will not be used to expand rows and you would be expected to perform the expansion in your own data model. This is useful if you are doing server-side expansion.\n\n***\n\n### onExpandedChange?\n\n```ts\noptional onExpandedChange: OnChangeFn<ExpandedState>;\n```\n\nDefined in: [features/row-expanding/rowExpandingFeature.types.ts:64](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L64)\n\nThis function is called when the `expanded` table state changes. If a function is provided, you will be responsible for managing this state on your own. To pass the managed state back to the table, use the `tableOptions.state.expanded` option.\n\n***\n\n### paginateExpandedRows?\n\n```ts\noptional paginateExpandedRows: boolean;\n```\n\nDefined in: [features/row-expanding/rowExpandingFeature.types.ts:68](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L68)\n\nIf `true` expanded rows will be paginated along with the rest of the table (which means expanded rows may span multiple pages). If `false` expanded rows will not be considered for pagination (which means expanded rows will always render on their parents page. This also means more rows will be rendered than the set page size)\n"
  },
  {
    "path": "docs/reference/interfaces/TableOptions_RowPagination.md",
    "content": "---\nid: TableOptions_RowPagination\ntitle: TableOptions_RowPagination\n---\n\n# Interface: TableOptions\\_RowPagination\n\nDefined in: [features/row-pagination/rowPaginationFeature.types.ts:15](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L15)\n\n## Properties\n\n### autoResetPageIndex?\n\n```ts\noptional autoResetPageIndex: boolean;\n```\n\nDefined in: [features/row-pagination/rowPaginationFeature.types.ts:19](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L19)\n\nIf set to `true`, pagination will be reset to the first page when page-altering state changes eg. `data` is updated, filters change, grouping changes, etc.\n\n***\n\n### manualPagination?\n\n```ts\noptional manualPagination: boolean;\n```\n\nDefined in: [features/row-pagination/rowPaginationFeature.types.ts:23](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L23)\n\nEnables manual pagination. If this option is set to `true`, the table will not automatically paginate rows using `getPaginatedRowModel()` and instead will expect you to manually paginate the rows before passing them to the table. This is useful if you are doing server-side pagination and aggregation.\n\n***\n\n### onPaginationChange?\n\n```ts\noptional onPaginationChange: OnChangeFn<PaginationState>;\n```\n\nDefined in: [features/row-pagination/rowPaginationFeature.types.ts:27](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L27)\n\nIf this function is provided, it will be called when the pagination state changes and you will be expected to manage the state yourself. You can pass the managed state back to the table via the `tableOptions.state.pagination` option.\n\n***\n\n### pageCount?\n\n```ts\noptional pageCount: number;\n```\n\nDefined in: [features/row-pagination/rowPaginationFeature.types.ts:31](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L31)\n\nWhen manually controlling pagination, you can supply a total `pageCount` value to the table if you know it (Or supply a `rowCount` and `pageCount` will be calculated). If you do not know how many pages there are, you can set this to `-1`.\n\n***\n\n### rowCount?\n\n```ts\noptional rowCount: number;\n```\n\nDefined in: [features/row-pagination/rowPaginationFeature.types.ts:35](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L35)\n\nWhen manually controlling pagination, you can supply a total `rowCount` value to the table if you know it. The `pageCount` can be calculated from this value and the `pageSize`.\n"
  },
  {
    "path": "docs/reference/interfaces/TableOptions_RowPinning.md",
    "content": "---\nid: TableOptions_RowPinning\ntitle: TableOptions_RowPinning\n---\n\n# Interface: TableOptions\\_RowPinning\\<TFeatures, TData\\>\n\nDefined in: [features/row-pinning/rowPinningFeature.types.ts:16](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L16)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Properties\n\n### enableRowPinning?\n\n```ts\noptional enableRowPinning: boolean | (row) => boolean;\n```\n\nDefined in: [features/row-pinning/rowPinningFeature.types.ts:23](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L23)\n\nEnables/disables row pinning for the table. Defaults to `true`.\n\n***\n\n### keepPinnedRows?\n\n```ts\noptional keepPinnedRows: boolean;\n```\n\nDefined in: [features/row-pinning/rowPinningFeature.types.ts:27](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L27)\n\nWhen `false`, pinned rows will not be visible if they are filtered or paginated out of the table. When `true`, pinned rows will always be visible regardless of filtering or pagination. Defaults to `true`.\n\n***\n\n### onRowPinningChange?\n\n```ts\noptional onRowPinningChange: OnChangeFn<RowPinningState>;\n```\n\nDefined in: [features/row-pinning/rowPinningFeature.types.ts:31](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L31)\n\nIf provided, this function will be called with an `updaterFn` when `state.rowPinning` changes. This overrides the default internal state management, so you will also need to supply `state.rowPinning` from your own managed state.\n"
  },
  {
    "path": "docs/reference/interfaces/TableOptions_RowSelection.md",
    "content": "---\nid: TableOptions_RowSelection\ntitle: TableOptions_RowSelection\n---\n\n# Interface: TableOptions\\_RowSelection\\<TFeatures, TData\\>\n\nDefined in: [features/row-selection/rowSelectionFeature.types.ts:12](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L12)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Properties\n\n### enableMultiRowSelection?\n\n```ts\noptional enableMultiRowSelection: boolean | (row) => boolean;\n```\n\nDefined in: [features/row-selection/rowSelectionFeature.types.ts:20](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L20)\n\n- Enables/disables multiple row selection for all rows in the table OR\n- A function that given a row, returns whether to enable/disable multiple row selection for that row's children/grandchildren\n\n***\n\n### enableRowSelection?\n\n```ts\noptional enableRowSelection: boolean | (row) => boolean;\n```\n\nDefined in: [features/row-selection/rowSelectionFeature.types.ts:25](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L25)\n\n- Enables/disables row selection for all rows in the table OR\n- A function that given a row, returns whether to enable/disable row selection for that row\n\n***\n\n### enableSubRowSelection?\n\n```ts\noptional enableSubRowSelection: boolean | (row) => boolean;\n```\n\nDefined in: [features/row-selection/rowSelectionFeature.types.ts:30](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L30)\n\nEnables/disables automatic sub-row selection when a parent row is selected, or a function that enables/disables automatic sub-row selection for each row.\n(Use in combination with expanding or grouping features)\n\n***\n\n### onRowSelectionChange?\n\n```ts\noptional onRowSelectionChange: OnChangeFn<RowSelectionState>;\n```\n\nDefined in: [features/row-selection/rowSelectionFeature.types.ts:34](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L34)\n\nIf provided, this function will be called with an `updaterFn` when `state.rowSelection` changes. This overrides the default internal state management, so you will need to persist the state change either fully or partially outside of the table.\n"
  },
  {
    "path": "docs/reference/interfaces/TableOptions_RowSorting.md",
    "content": "---\nid: TableOptions_RowSorting\ntitle: TableOptions_RowSorting\n---\n\n# Interface: TableOptions\\_RowSorting\n\nDefined in: [features/row-sorting/rowSortingFeature.types.ts:143](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L143)\n\n## Properties\n\n### enableMultiRemove?\n\n```ts\noptional enableMultiRemove: boolean;\n```\n\nDefined in: [features/row-sorting/rowSortingFeature.types.ts:147](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L147)\n\nEnables/disables the ability to remove multi-sorts\n\n***\n\n### enableMultiSort?\n\n```ts\noptional enableMultiSort: boolean;\n```\n\nDefined in: [features/row-sorting/rowSortingFeature.types.ts:151](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L151)\n\nEnables/Disables multi-sorting for the table.\n\n***\n\n### enableSorting?\n\n```ts\noptional enableSorting: boolean;\n```\n\nDefined in: [features/row-sorting/rowSortingFeature.types.ts:155](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L155)\n\nEnables/Disables sorting for the table.\n\n***\n\n### enableSortingRemoval?\n\n```ts\noptional enableSortingRemoval: boolean;\n```\n\nDefined in: [features/row-sorting/rowSortingFeature.types.ts:161](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L161)\n\nEnables/Disables the ability to remove sorting for the table.\n- If `true` then changing sort order will circle like: 'none' -> 'desc' -> 'asc' -> 'none' -> ...\n- If `false` then changing sort order will circle like: 'none' -> 'desc' -> 'asc' -> 'desc' -> 'asc' -> ...\n\n***\n\n### isMultiSortEvent()?\n\n```ts\noptional isMultiSortEvent: (e) => boolean;\n```\n\nDefined in: [features/row-sorting/rowSortingFeature.types.ts:165](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L165)\n\nPass a custom function that will be used to determine if a multi-sort event should be triggered. It is passed the event from the sort toggle handler and should return `true` if the event should trigger a multi-sort.\n\n#### Parameters\n\n##### e\n\n`unknown`\n\n#### Returns\n\n`boolean`\n\n***\n\n### manualSorting?\n\n```ts\noptional manualSorting: boolean;\n```\n\nDefined in: [features/row-sorting/rowSortingFeature.types.ts:169](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L169)\n\nEnables manual sorting for the table. If this is `true`, you will be expected to sort your data before it is passed to the table. This is useful if you are doing server-side sorting.\n\n***\n\n### maxMultiSortColCount?\n\n```ts\noptional maxMultiSortColCount: number;\n```\n\nDefined in: [features/row-sorting/rowSortingFeature.types.ts:173](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L173)\n\nSet a maximum number of columns that can be multi-sorted.\n\n***\n\n### onSortingChange?\n\n```ts\noptional onSortingChange: OnChangeFn<SortingState>;\n```\n\nDefined in: [features/row-sorting/rowSortingFeature.types.ts:177](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L177)\n\nIf provided, this function will be called with an `updaterFn` when `state.sorting` changes. This overrides the default internal state management, so you will need to persist the state change either fully or partially outside of the table.\n\n***\n\n### sortDescFirst?\n\n```ts\noptional sortDescFirst: boolean;\n```\n\nDefined in: [features/row-sorting/rowSortingFeature.types.ts:181](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L181)\n\nIf `true`, all sorts will default to descending as their first toggle state.\n"
  },
  {
    "path": "docs/reference/interfaces/TableOptions_Rows.md",
    "content": "---\nid: TableOptions_Rows\ntitle: TableOptions_Rows\n---\n\n# Interface: TableOptions\\_Rows\\<TFeatures, TData\\>\n\nDefined in: [core/rows/coreRowsFeature.types.ts:82](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L82)\n\n## Extended by\n\n- [`TableOptions_Core`](TableOptions_Core.md)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Properties\n\n### getRowId()?\n\n```ts\noptional getRowId: (originalRow, index, parent?) => string;\n```\n\nDefined in: [core/rows/coreRowsFeature.types.ts:90](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L90)\n\nThis optional function is used to derive a unique ID for any given row. If not provided the rows index is used (nested rows join together with `.` using their grandparents' index eg. `index.index.index`). If you need to identify individual rows that are originating from any server-side operations, it's suggested you use this function to return an ID that makes sense regardless of network IO/ambiguity eg. a userId, taskId, database ID field, etc.\n\n#### Parameters\n\n##### originalRow\n\n`TData`\n\n##### index\n\n`number`\n\n##### parent?\n\n[`Row`](../type-aliases/Row.md)\\<`TFeatures`, `TData`\\>\n\n#### Returns\n\n`string`\n\n#### Example\n\n```ts\ngetRowId: row => row.userId\n```\n\n***\n\n### getSubRows()?\n\n```ts\noptional getSubRows: (originalRow, index) => readonly TData[] | undefined;\n```\n\nDefined in: [core/rows/coreRowsFeature.types.ts:99](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L99)\n\nThis optional function is used to access the sub rows for any given row. If you are using nested rows, you will need to use this function to return the sub rows object (or undefined) from the row.\n\n#### Parameters\n\n##### originalRow\n\n`TData`\n\n##### index\n\n`number`\n\n#### Returns\n\nreadonly `TData`[] \\| `undefined`\n\n#### Example\n\n```ts\ngetSubRows: row => row.subRows\n```\n"
  },
  {
    "path": "docs/reference/interfaces/TableOptions_Table.md",
    "content": "---\nid: TableOptions_Table\ntitle: TableOptions_Table\n---\n\n# Interface: TableOptions\\_Table\\<TFeatures, TData\\>\n\nDefined in: [core/table/coreTablesFeature.types.ts:15](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L15)\n\n## Extended by\n\n- [`TableOptions_Core`](TableOptions_Core.md)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Properties\n\n### \\_features\n\n```ts\n_features: TFeatures;\n```\n\nDefined in: [core/table/coreTablesFeature.types.ts:22](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L22)\n\nThe features that you want to enable for the table.\n\n***\n\n### \\_rowModels?\n\n```ts\noptional _rowModels: CreateRowModels_All<TFeatures, TData>;\n```\n\nDefined in: [core/table/coreTablesFeature.types.ts:26](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L26)\n\nThe row model options that you want to enable for the table.\n\n***\n\n### autoResetAll?\n\n```ts\noptional autoResetAll: boolean;\n```\n\nDefined in: [core/table/coreTablesFeature.types.ts:30](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L30)\n\nSet this option to override any of the `autoReset...` feature options.\n\n***\n\n### data\n\n```ts\ndata: readonly TData[];\n```\n\nDefined in: [core/table/coreTablesFeature.types.ts:34](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L34)\n\nThe data for the table to display. When the `data` option changes reference, the table will reprocess the data.\n\n***\n\n### initialState?\n\n```ts\noptional initialState: Partial<TableState<TFeatures>>;\n```\n\nDefined in: [core/table/coreTablesFeature.types.ts:39](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L39)\n\nUse this option to optionally pass initial state to the table. This state will be used when resetting various table states either automatically by the table (eg. `options.autoResetPageIndex`) or via functions like `table.resetRowSelection()`. Most reset function allow you optionally pass a flag to reset to a blank/default state instead of the initial state.\nTable state will not be reset when this object changes, which also means that the initial state object does not need to be stable.\n\n***\n\n### mergeOptions()?\n\n```ts\noptional mergeOptions: (defaultOptions, options) => TableOptions<TFeatures, TData>;\n```\n\nDefined in: [core/table/coreTablesFeature.types.ts:43](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L43)\n\nThis option is used to optionally implement the merging of table options.\n\n#### Parameters\n\n##### defaultOptions\n\n[`TableOptions`](../type-aliases/TableOptions.md)\\<`TFeatures`, `TData`\\>\n\n##### options\n\n`Partial`\\<[`TableOptions`](../type-aliases/TableOptions.md)\\<`TFeatures`, `TData`\\>\\>\n\n#### Returns\n\n[`TableOptions`](../type-aliases/TableOptions.md)\\<`TFeatures`, `TData`\\>\n\n***\n\n### meta?\n\n```ts\noptional meta: TableMeta<TFeatures, TData>;\n```\n\nDefined in: [core/table/coreTablesFeature.types.ts:50](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L50)\n\nYou can pass any object to `options.meta` and access it anywhere the `table` is available via `table.options.meta`.\n\n***\n\n### state?\n\n```ts\noptional state: Partial<TableState<TFeatures>>;\n```\n\nDefined in: [core/table/coreTablesFeature.types.ts:54](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L54)\n\nPass in individual self-managed state to the table.\n\n***\n\n### store?\n\n```ts\noptional store: Store<TableState<TFeatures>>;\n```\n\nDefined in: [core/table/coreTablesFeature.types.ts:58](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L58)\n\nOptionally, provide your own external TanStack Store instance if you want to manage the table state externally.\n"
  },
  {
    "path": "docs/reference/interfaces/TableState_ColumnFiltering.md",
    "content": "---\nid: TableState_ColumnFiltering\ntitle: TableState_ColumnFiltering\n---\n\n# Interface: TableState\\_ColumnFiltering\n\nDefined in: [features/column-filtering/columnFilteringFeature.types.ts:18](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L18)\n\n## Properties\n\n### columnFilters\n\n```ts\ncolumnFilters: ColumnFiltersState;\n```\n\nDefined in: [features/column-filtering/columnFilteringFeature.types.ts:19](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L19)\n"
  },
  {
    "path": "docs/reference/interfaces/TableState_ColumnGrouping.md",
    "content": "---\nid: TableState_ColumnGrouping\ntitle: TableState_ColumnGrouping\n---\n\n# Interface: TableState\\_ColumnGrouping\n\nDefined in: [features/column-grouping/columnGroupingFeature.types.ts:17](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L17)\n\n## Properties\n\n### grouping\n\n```ts\ngrouping: GroupingState;\n```\n\nDefined in: [features/column-grouping/columnGroupingFeature.types.ts:18](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L18)\n"
  },
  {
    "path": "docs/reference/interfaces/TableState_ColumnOrdering.md",
    "content": "---\nid: TableState_ColumnOrdering\ntitle: TableState_ColumnOrdering\n---\n\n# Interface: TableState\\_ColumnOrdering\n\nDefined in: [features/column-ordering/columnOrderingFeature.types.ts:7](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.types.ts#L7)\n\n## Properties\n\n### columnOrder\n\n```ts\ncolumnOrder: ColumnOrderState;\n```\n\nDefined in: [features/column-ordering/columnOrderingFeature.types.ts:8](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.types.ts#L8)\n"
  },
  {
    "path": "docs/reference/interfaces/TableState_ColumnPinning.md",
    "content": "---\nid: TableState_ColumnPinning\ntitle: TableState_ColumnPinning\n---\n\n# Interface: TableState\\_ColumnPinning\n\nDefined in: [features/column-pinning/columnPinningFeature.types.ts:15](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L15)\n\n## Properties\n\n### columnPinning\n\n```ts\ncolumnPinning: ColumnPinningState;\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.types.ts:16](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L16)\n"
  },
  {
    "path": "docs/reference/interfaces/TableState_ColumnResizing.md",
    "content": "---\nid: TableState_ColumnResizing\ntitle: TableState_ColumnResizing\n---\n\n# Interface: TableState\\_ColumnResizing\n\nDefined in: [features/column-resizing/columnResizingFeature.types.ts:3](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L3)\n\n## Properties\n\n### columnResizing\n\n```ts\ncolumnResizing: columnResizingState;\n```\n\nDefined in: [features/column-resizing/columnResizingFeature.types.ts:4](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L4)\n"
  },
  {
    "path": "docs/reference/interfaces/TableState_ColumnSizing.md",
    "content": "---\nid: TableState_ColumnSizing\ntitle: TableState_ColumnSizing\n---\n\n# Interface: TableState\\_ColumnSizing\n\nDefined in: [features/column-sizing/columnSizingFeature.types.ts:4](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L4)\n\n## Properties\n\n### columnSizing\n\n```ts\ncolumnSizing: ColumnSizingState;\n```\n\nDefined in: [features/column-sizing/columnSizingFeature.types.ts:5](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L5)\n"
  },
  {
    "path": "docs/reference/interfaces/TableState_ColumnVisibility.md",
    "content": "---\nid: TableState_ColumnVisibility\ntitle: TableState_ColumnVisibility\n---\n\n# Interface: TableState\\_ColumnVisibility\n\nDefined in: [features/column-visibility/columnVisibilityFeature.types.ts:8](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L8)\n\n## Properties\n\n### columnVisibility\n\n```ts\ncolumnVisibility: ColumnVisibilityState;\n```\n\nDefined in: [features/column-visibility/columnVisibilityFeature.types.ts:9](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L9)\n"
  },
  {
    "path": "docs/reference/interfaces/TableState_GlobalFiltering.md",
    "content": "---\nid: TableState_GlobalFiltering\ntitle: TableState_GlobalFiltering\n---\n\n# Interface: TableState\\_GlobalFiltering\n\nDefined in: [features/global-filtering/globalFilteringFeature.types.ts:14](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.types.ts#L14)\n\n## Properties\n\n### globalFilter\n\n```ts\nglobalFilter: any;\n```\n\nDefined in: [features/global-filtering/globalFilteringFeature.types.ts:15](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.types.ts#L15)\n"
  },
  {
    "path": "docs/reference/interfaces/TableState_Plugins.md",
    "content": "---\nid: TableState_Plugins\ntitle: TableState_Plugins\n---\n\n# Interface: TableState\\_Plugins\\<TFeatures\\>\n\nDefined in: [types/TableState.ts:21](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableState.ts#L21)\n\nUse this interface as a target for declaration merging to add your own state properties.\nNote: This will affect the types of all tables in your project.\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n"
  },
  {
    "path": "docs/reference/interfaces/TableState_RowExpanding.md",
    "content": "---\nid: TableState_RowExpanding\ntitle: TableState_RowExpanding\n---\n\n# Interface: TableState\\_RowExpanding\n\nDefined in: [features/row-expanding/rowExpandingFeature.types.ts:10](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L10)\n\n## Properties\n\n### expanded\n\n```ts\nexpanded: ExpandedState;\n```\n\nDefined in: [features/row-expanding/rowExpandingFeature.types.ts:11](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L11)\n"
  },
  {
    "path": "docs/reference/interfaces/TableState_RowPagination.md",
    "content": "---\nid: TableState_RowPagination\ntitle: TableState_RowPagination\n---\n\n# Interface: TableState\\_RowPagination\n\nDefined in: [features/row-pagination/rowPaginationFeature.types.ts:11](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L11)\n\n## Properties\n\n### pagination\n\n```ts\npagination: PaginationState;\n```\n\nDefined in: [features/row-pagination/rowPaginationFeature.types.ts:12](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L12)\n"
  },
  {
    "path": "docs/reference/interfaces/TableState_RowPinning.md",
    "content": "---\nid: TableState_RowPinning\ntitle: TableState_RowPinning\n---\n\n# Interface: TableState\\_RowPinning\n\nDefined in: [features/row-pinning/rowPinningFeature.types.ts:12](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L12)\n\n## Properties\n\n### rowPinning\n\n```ts\nrowPinning: RowPinningState;\n```\n\nDefined in: [features/row-pinning/rowPinningFeature.types.ts:13](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L13)\n"
  },
  {
    "path": "docs/reference/interfaces/TableState_RowSelection.md",
    "content": "---\nid: TableState_RowSelection\ntitle: TableState_RowSelection\n---\n\n# Interface: TableState\\_RowSelection\n\nDefined in: [features/row-selection/rowSelectionFeature.types.ts:8](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L8)\n\n## Properties\n\n### rowSelection\n\n```ts\nrowSelection: RowSelectionState;\n```\n\nDefined in: [features/row-selection/rowSelectionFeature.types.ts:9](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L9)\n"
  },
  {
    "path": "docs/reference/interfaces/TableState_RowSorting.md",
    "content": "---\nid: TableState_RowSorting\ntitle: TableState_RowSorting\n---\n\n# Interface: TableState\\_RowSorting\n\nDefined in: [features/row-sorting/rowSortingFeature.types.ts:17](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L17)\n\n## Properties\n\n### sorting\n\n```ts\nsorting: SortingState;\n```\n\nDefined in: [features/row-sorting/rowSortingFeature.types.ts:18](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L18)\n"
  },
  {
    "path": "docs/reference/interfaces/Table_ColumnFaceting.md",
    "content": "---\nid: Table_ColumnFaceting\ntitle: Table_ColumnFaceting\n---\n\n# Interface: Table\\_ColumnFaceting\\<TFeatures, TData\\>\n\nDefined in: [features/column-faceting/columnFacetingFeature.types.ts:81](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L81)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Properties\n\n### getGlobalFacetedMinMaxValues()\n\n```ts\ngetGlobalFacetedMinMaxValues: () => [number, number] | undefined;\n```\n\nDefined in: [features/column-faceting/columnFacetingFeature.types.ts:88](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L88)\n\nReturns the min and max values for the global filter.\n\n#### Returns\n\n\\[`number`, `number`\\] \\| `undefined`\n\n***\n\n### getGlobalFacetedRowModel()\n\n```ts\ngetGlobalFacetedRowModel: () => RowModel<TFeatures, TData>;\n```\n\nDefined in: [features/column-faceting/columnFacetingFeature.types.ts:92](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L92)\n\nReturns the row model for the table after **global** filtering has been applied.\n\n#### Returns\n\n[`RowModel`](RowModel.md)\\<`TFeatures`, `TData`\\>\n\n***\n\n### getGlobalFacetedUniqueValues()\n\n```ts\ngetGlobalFacetedUniqueValues: () => Map<any, number>;\n```\n\nDefined in: [features/column-faceting/columnFacetingFeature.types.ts:96](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L96)\n\nReturns the faceted unique values for the global filter.\n\n#### Returns\n\n`Map`\\<`any`, `number`\\>\n"
  },
  {
    "path": "docs/reference/interfaces/Table_ColumnFiltering.md",
    "content": "---\nid: Table_ColumnFiltering\ntitle: Table_ColumnFiltering\n---\n\n# Interface: Table\\_ColumnFiltering\n\nDefined in: [features/column-filtering/columnFilteringFeature.types.ts:175](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L175)\n\n## Properties\n\n### resetColumnFilters()\n\n```ts\nresetColumnFilters: (defaultState?) => void;\n```\n\nDefined in: [features/column-filtering/columnFilteringFeature.types.ts:179](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L179)\n\nResets the **columnFilters** state to `initialState.columnFilters`, or `true` can be passed to force a default blank state reset to `[]`.\n\n#### Parameters\n\n##### defaultState?\n\n`boolean`\n\n#### Returns\n\n`void`\n\n***\n\n### setColumnFilters()\n\n```ts\nsetColumnFilters: (updater) => void;\n```\n\nDefined in: [features/column-filtering/columnFilteringFeature.types.ts:183](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L183)\n\nSets or updates the `state.columnFilters` state.\n\n#### Parameters\n\n##### updater\n\n[`Updater`](../type-aliases/Updater.md)\\<[`ColumnFiltersState`](../type-aliases/ColumnFiltersState.md)\\>\n\n#### Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/interfaces/Table_ColumnGrouping.md",
    "content": "---\nid: Table_ColumnGrouping\ntitle: Table_ColumnGrouping\n---\n\n# Interface: Table\\_ColumnGrouping\\<TFeatures, TData\\>\n\nDefined in: [features/column-grouping/columnGroupingFeature.types.ts:173](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L173)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Properties\n\n### resetGrouping()\n\n```ts\nresetGrouping: (defaultState?) => void;\n```\n\nDefined in: [features/column-grouping/columnGroupingFeature.types.ts:180](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L180)\n\nResets the **grouping** state to `initialState.grouping`, or `true` can be passed to force a default blank state reset to `[]`.\n\n#### Parameters\n\n##### defaultState?\n\n`boolean`\n\n#### Returns\n\n`void`\n\n***\n\n### setGrouping()\n\n```ts\nsetGrouping: (updater) => void;\n```\n\nDefined in: [features/column-grouping/columnGroupingFeature.types.ts:184](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L184)\n\nUpdates the grouping state of the table via an update function or value.\n\n#### Parameters\n\n##### updater\n\n[`Updater`](../type-aliases/Updater.md)\\<[`GroupingState`](../type-aliases/GroupingState.md)\\>\n\n#### Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/interfaces/Table_ColumnOrdering.md",
    "content": "---\nid: Table_ColumnOrdering\ntitle: Table_ColumnOrdering\n---\n\n# Interface: Table\\_ColumnOrdering\\<TFeatures, TData\\>\n\nDefined in: [features/column-ordering/columnOrderingFeature.types.ts:37](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.types.ts#L37)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Properties\n\n### resetColumnOrder()\n\n```ts\nresetColumnOrder: (defaultState?) => void;\n```\n\nDefined in: [features/column-ordering/columnOrderingFeature.types.ts:44](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.types.ts#L44)\n\nResets the **columnOrder** state to `initialState.columnOrder`, or `true` can be passed to force a default blank state reset to `[]`.\n\n#### Parameters\n\n##### defaultState?\n\n`boolean`\n\n#### Returns\n\n`void`\n\n***\n\n### setColumnOrder()\n\n```ts\nsetColumnOrder: (updater) => void;\n```\n\nDefined in: [features/column-ordering/columnOrderingFeature.types.ts:48](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.types.ts#L48)\n\nSets or updates the `state.columnOrder` state.\n\n#### Parameters\n\n##### updater\n\n[`Updater`](../type-aliases/Updater.md)\\<[`ColumnOrderState`](../type-aliases/ColumnOrderState.md)\\>\n\n#### Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/interfaces/Table_ColumnPinning.md",
    "content": "---\nid: Table_ColumnPinning\ntitle: Table_ColumnPinning\n---\n\n# Interface: Table\\_ColumnPinning\\<TFeatures, TData\\>\n\nDefined in: [features/column-pinning/columnPinningFeature.types.ts:78](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L78)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Properties\n\n### getCenterFlatHeaders()\n\n```ts\ngetCenterFlatHeaders: () => Header<TFeatures, TData, unknown>[];\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.types.ts:85](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L85)\n\nIf pinning, returns headers for all columns that are not pinned, including parent headers.\n\n#### Returns\n\n[`Header`](../type-aliases/Header.md)\\<`TFeatures`, `TData`, `unknown`\\>[]\n\n***\n\n### getCenterFooterGroups()\n\n```ts\ngetCenterFooterGroups: () => HeaderGroup<TFeatures, TData>[];\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.types.ts:89](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L89)\n\nIf pinning, returns the footer groups for columns that are not pinned.\n\n#### Returns\n\n[`HeaderGroup`](../type-aliases/HeaderGroup.md)\\<`TFeatures`, `TData`\\>[]\n\n***\n\n### getCenterHeaderGroups()\n\n```ts\ngetCenterHeaderGroups: () => HeaderGroup<TFeatures, TData>[];\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.types.ts:93](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L93)\n\nIf pinning, returns the header groups for columns that are not pinned.\n\n#### Returns\n\n[`HeaderGroup`](../type-aliases/HeaderGroup.md)\\<`TFeatures`, `TData`\\>[]\n\n***\n\n### getCenterLeafColumns()\n\n```ts\ngetCenterLeafColumns: () => Column<TFeatures, TData, unknown>[];\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.types.ts:97](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L97)\n\nReturns all center pinned (unpinned) leaf columns.\n\n#### Returns\n\n[`Column`](../type-aliases/Column.md)\\<`TFeatures`, `TData`, `unknown`\\>[]\n\n***\n\n### getCenterLeafHeaders()\n\n```ts\ngetCenterLeafHeaders: () => Header<TFeatures, TData, unknown>[];\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.types.ts:101](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L101)\n\nIf pinning, returns headers for all columns that are not pinned, (not including parent headers).\n\n#### Returns\n\n[`Header`](../type-aliases/Header.md)\\<`TFeatures`, `TData`, `unknown`\\>[]\n\n***\n\n### getCenterVisibleLeafColumns()\n\n```ts\ngetCenterVisibleLeafColumns: () => Column<TFeatures, TData, unknown>[];\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.types.ts:105](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L105)\n\nIf column pinning, returns a flat array of leaf-node columns that are visible in the unpinned/center portion of the table.\n\n#### Returns\n\n[`Column`](../type-aliases/Column.md)\\<`TFeatures`, `TData`, `unknown`\\>[]\n\n***\n\n### getIsSomeColumnsPinned()\n\n```ts\ngetIsSomeColumnsPinned: (position?) => boolean;\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.types.ts:109](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L109)\n\nReturns whether or not any columns are pinned. Optionally specify to only check for pinned columns in either the `left` or `right` position.\n\n#### Parameters\n\n##### position?\n\n[`ColumnPinningPosition`](../type-aliases/ColumnPinningPosition.md)\n\n#### Returns\n\n`boolean`\n\n***\n\n### getLeftFlatHeaders()\n\n```ts\ngetLeftFlatHeaders: () => Header<TFeatures, TData, unknown>[];\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.types.ts:113](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L113)\n\nIf pinning, returns headers for all left pinned columns in the table, including parent headers.\n\n#### Returns\n\n[`Header`](../type-aliases/Header.md)\\<`TFeatures`, `TData`, `unknown`\\>[]\n\n***\n\n### getLeftFooterGroups()\n\n```ts\ngetLeftFooterGroups: () => HeaderGroup<TFeatures, TData>[];\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.types.ts:117](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L117)\n\nIf pinning, returns the footer groups for the left pinned columns.\n\n#### Returns\n\n[`HeaderGroup`](../type-aliases/HeaderGroup.md)\\<`TFeatures`, `TData`\\>[]\n\n***\n\n### getLeftHeaderGroups()\n\n```ts\ngetLeftHeaderGroups: () => HeaderGroup<TFeatures, TData>[];\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.types.ts:121](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L121)\n\nIf pinning, returns the header groups for the left pinned columns.\n\n#### Returns\n\n[`HeaderGroup`](../type-aliases/HeaderGroup.md)\\<`TFeatures`, `TData`\\>[]\n\n***\n\n### getLeftLeafColumns()\n\n```ts\ngetLeftLeafColumns: () => Column<TFeatures, TData, unknown>[];\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.types.ts:125](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L125)\n\nReturns all left pinned leaf columns.\n\n#### Returns\n\n[`Column`](../type-aliases/Column.md)\\<`TFeatures`, `TData`, `unknown`\\>[]\n\n***\n\n### getLeftLeafHeaders()\n\n```ts\ngetLeftLeafHeaders: () => Header<TFeatures, TData, unknown>[];\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.types.ts:129](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L129)\n\nIf pinning, returns headers for all left pinned leaf columns in the table, (not including parent headers).\n\n#### Returns\n\n[`Header`](../type-aliases/Header.md)\\<`TFeatures`, `TData`, `unknown`\\>[]\n\n***\n\n### getLeftVisibleLeafColumns()\n\n```ts\ngetLeftVisibleLeafColumns: () => Column<TFeatures, TData, unknown>[];\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.types.ts:133](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L133)\n\nIf column pinning, returns a flat array of leaf-node columns that are visible in the left portion of the table.\n\n#### Returns\n\n[`Column`](../type-aliases/Column.md)\\<`TFeatures`, `TData`, `unknown`\\>[]\n\n***\n\n### getPinnedLeafColumns()\n\n```ts\ngetPinnedLeafColumns: (position) => Column<TFeatures, TData, unknown>[];\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.types.ts:168](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L168)\n\n#### Parameters\n\n##### position\n\n[`ColumnPinningPosition`](../type-aliases/ColumnPinningPosition.md) | `\"center\"`\n\n#### Returns\n\n[`Column`](../type-aliases/Column.md)\\<`TFeatures`, `TData`, `unknown`\\>[]\n\n***\n\n### getPinnedVisibleLeafColumns()\n\n```ts\ngetPinnedVisibleLeafColumns: (position) => Column<TFeatures, TData, unknown>[];\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.types.ts:173](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L173)\n\n#### Parameters\n\n##### position\n\n[`ColumnPinningPosition`](../type-aliases/ColumnPinningPosition.md) | `\"center\"`\n\n#### Returns\n\n[`Column`](../type-aliases/Column.md)\\<`TFeatures`, `TData`, `unknown`\\>[]\n\n***\n\n### getRightFlatHeaders()\n\n```ts\ngetRightFlatHeaders: () => Header<TFeatures, TData, unknown>[];\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.types.ts:137](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L137)\n\nIf pinning, returns headers for all right pinned columns in the table, including parent headers.\n\n#### Returns\n\n[`Header`](../type-aliases/Header.md)\\<`TFeatures`, `TData`, `unknown`\\>[]\n\n***\n\n### getRightFooterGroups()\n\n```ts\ngetRightFooterGroups: () => HeaderGroup<TFeatures, TData>[];\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.types.ts:141](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L141)\n\nIf pinning, returns the footer groups for the right pinned columns.\n\n#### Returns\n\n[`HeaderGroup`](../type-aliases/HeaderGroup.md)\\<`TFeatures`, `TData`\\>[]\n\n***\n\n### getRightHeaderGroups()\n\n```ts\ngetRightHeaderGroups: () => HeaderGroup<TFeatures, TData>[];\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.types.ts:145](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L145)\n\nIf pinning, returns the header groups for the right pinned columns.\n\n#### Returns\n\n[`HeaderGroup`](../type-aliases/HeaderGroup.md)\\<`TFeatures`, `TData`\\>[]\n\n***\n\n### getRightLeafColumns()\n\n```ts\ngetRightLeafColumns: () => Column<TFeatures, TData, unknown>[];\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.types.ts:149](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L149)\n\nReturns all right pinned leaf columns.\n\n#### Returns\n\n[`Column`](../type-aliases/Column.md)\\<`TFeatures`, `TData`, `unknown`\\>[]\n\n***\n\n### getRightLeafHeaders()\n\n```ts\ngetRightLeafHeaders: () => Header<TFeatures, TData, unknown>[];\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.types.ts:153](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L153)\n\nIf pinning, returns headers for all right pinned leaf columns in the table, (not including parent headers).\n\n#### Returns\n\n[`Header`](../type-aliases/Header.md)\\<`TFeatures`, `TData`, `unknown`\\>[]\n\n***\n\n### getRightVisibleLeafColumns()\n\n```ts\ngetRightVisibleLeafColumns: () => Column<TFeatures, TData, unknown>[];\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.types.ts:157](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L157)\n\nIf column pinning, returns a flat array of leaf-node columns that are visible in the right portion of the table.\n\n#### Returns\n\n[`Column`](../type-aliases/Column.md)\\<`TFeatures`, `TData`, `unknown`\\>[]\n\n***\n\n### resetColumnPinning()\n\n```ts\nresetColumnPinning: (defaultState?) => void;\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.types.ts:161](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L161)\n\nResets the **columnPinning** state to `initialState.columnPinning`, or `true` can be passed to force a default blank state reset to `{ left: [], right: [], }`.\n\n#### Parameters\n\n##### defaultState?\n\n`boolean`\n\n#### Returns\n\n`void`\n\n***\n\n### setColumnPinning()\n\n```ts\nsetColumnPinning: (updater) => void;\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.types.ts:165](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L165)\n\nSets or updates the `state.columnPinning` state.\n\n#### Parameters\n\n##### updater\n\n[`Updater`](../type-aliases/Updater.md)\\<[`ColumnPinningState`](ColumnPinningState.md)\\>\n\n#### Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/interfaces/Table_ColumnResizing.md",
    "content": "---\nid: Table_ColumnResizing\ntitle: Table_ColumnResizing\n---\n\n# Interface: Table\\_ColumnResizing\n\nDefined in: [features/column-resizing/columnResizingFeature.types.ts:44](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L44)\n\n## Properties\n\n### resetHeaderSizeInfo()\n\n```ts\nresetHeaderSizeInfo: (defaultState?) => void;\n```\n\nDefined in: [features/column-resizing/columnResizingFeature.types.ts:48](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L48)\n\nResets column sizing info to its initial state. If `defaultState` is `true`, the default state for the table will be used instead of the initialValue provided to the table.\n\n#### Parameters\n\n##### defaultState?\n\n`boolean`\n\n#### Returns\n\n`void`\n\n***\n\n### setcolumnResizing()\n\n```ts\nsetcolumnResizing: (updater) => void;\n```\n\nDefined in: [features/column-resizing/columnResizingFeature.types.ts:52](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L52)\n\nSets the column sizing info state using an updater function or a value. This will trigger the underlying `oncolumnResizingChange` function if one is passed to the table options, otherwise the state will be managed automatically by the table.\n\n#### Parameters\n\n##### updater\n\n[`Updater`](../type-aliases/Updater.md)\\<[`columnResizingState`](columnResizingState.md)\\>\n\n#### Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/interfaces/Table_ColumnSizing.md",
    "content": "---\nid: Table_ColumnSizing\ntitle: Table_ColumnSizing\n---\n\n# Interface: Table\\_ColumnSizing\n\nDefined in: [features/column-sizing/columnSizingFeature.types.ts:22](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L22)\n\n## Properties\n\n### getCenterTotalSize()\n\n```ts\ngetCenterTotalSize: () => number;\n```\n\nDefined in: [features/column-sizing/columnSizingFeature.types.ts:26](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L26)\n\nIf pinning, returns the total size of the center portion of the table by calculating the sum of the sizes of all unpinned/center leaf-columns.\n\n#### Returns\n\n`number`\n\n***\n\n### getLeftTotalSize()\n\n```ts\ngetLeftTotalSize: () => number;\n```\n\nDefined in: [features/column-sizing/columnSizingFeature.types.ts:30](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L30)\n\nReturns the total size of the left portion of the table by calculating the sum of the sizes of all left leaf-columns.\n\n#### Returns\n\n`number`\n\n***\n\n### getRightTotalSize()\n\n```ts\ngetRightTotalSize: () => number;\n```\n\nDefined in: [features/column-sizing/columnSizingFeature.types.ts:34](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L34)\n\nReturns the total size of the right portion of the table by calculating the sum of the sizes of all right leaf-columns.\n\n#### Returns\n\n`number`\n\n***\n\n### getTotalSize()\n\n```ts\ngetTotalSize: () => number;\n```\n\nDefined in: [features/column-sizing/columnSizingFeature.types.ts:38](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L38)\n\nReturns the total size of the table by calculating the sum of the sizes of all leaf-columns.\n\n#### Returns\n\n`number`\n\n***\n\n### resetColumnSizing()\n\n```ts\nresetColumnSizing: (defaultState?) => void;\n```\n\nDefined in: [features/column-sizing/columnSizingFeature.types.ts:42](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L42)\n\nResets column sizing to its initial state. If `defaultState` is `true`, the default state for the table will be used instead of the initialValue provided to the table.\n\n#### Parameters\n\n##### defaultState?\n\n`boolean`\n\n#### Returns\n\n`void`\n\n***\n\n### setColumnSizing()\n\n```ts\nsetColumnSizing: (updater) => void;\n```\n\nDefined in: [features/column-sizing/columnSizingFeature.types.ts:46](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L46)\n\nSets the column sizing state using an updater function or a value. This will trigger the underlying `onColumnSizingChange` function if one is passed to the table options, otherwise the state will be managed automatically by the table.\n\n#### Parameters\n\n##### updater\n\n[`Updater`](../type-aliases/Updater.md)\\<[`ColumnSizingState`](../type-aliases/ColumnSizingState.md)\\>\n\n#### Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/interfaces/Table_ColumnVisibility.md",
    "content": "---\nid: Table_ColumnVisibility\ntitle: Table_ColumnVisibility\n---\n\n# Interface: Table\\_ColumnVisibility\\<TFeatures, TData\\>\n\nDefined in: [features/column-visibility/columnVisibilityFeature.types.ts:28](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L28)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Properties\n\n### getIsAllColumnsVisible()\n\n```ts\ngetIsAllColumnsVisible: () => boolean;\n```\n\nDefined in: [features/column-visibility/columnVisibilityFeature.types.ts:35](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L35)\n\nReturns whether all columns are visible\n\n#### Returns\n\n`boolean`\n\n***\n\n### getIsSomeColumnsVisible()\n\n```ts\ngetIsSomeColumnsVisible: () => boolean;\n```\n\nDefined in: [features/column-visibility/columnVisibilityFeature.types.ts:39](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L39)\n\nReturns whether any columns are visible\n\n#### Returns\n\n`boolean`\n\n***\n\n### getToggleAllColumnsVisibilityHandler()\n\n```ts\ngetToggleAllColumnsVisibilityHandler: () => (event) => void;\n```\n\nDefined in: [features/column-visibility/columnVisibilityFeature.types.ts:43](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L43)\n\nReturns a handler for toggling the visibility of all columns, meant to be bound to a `input[type=checkbox]` element.\n\n#### Returns\n\n```ts\n(event): void;\n```\n\n##### Parameters\n\n###### event\n\n`unknown`\n\n##### Returns\n\n`void`\n\n***\n\n### getVisibleFlatColumns()\n\n```ts\ngetVisibleFlatColumns: () => Column<TFeatures, TData, unknown>[];\n```\n\nDefined in: [features/column-visibility/columnVisibilityFeature.types.ts:47](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L47)\n\nReturns a flat array of columns that are visible, including parent columns.\n\n#### Returns\n\n[`Column`](../type-aliases/Column.md)\\<`TFeatures`, `TData`, `unknown`\\>[]\n\n***\n\n### getVisibleLeafColumns()\n\n```ts\ngetVisibleLeafColumns: () => Column<TFeatures, TData, unknown>[];\n```\n\nDefined in: [features/column-visibility/columnVisibilityFeature.types.ts:51](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L51)\n\nReturns a flat array of leaf-node columns that are visible.\n\n#### Returns\n\n[`Column`](../type-aliases/Column.md)\\<`TFeatures`, `TData`, `unknown`\\>[]\n\n***\n\n### resetColumnVisibility()\n\n```ts\nresetColumnVisibility: (defaultState?) => void;\n```\n\nDefined in: [features/column-visibility/columnVisibilityFeature.types.ts:55](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L55)\n\nResets the column visibility state to the initial state. If `defaultState` is provided, the state will be reset to `{}`\n\n#### Parameters\n\n##### defaultState?\n\n`boolean`\n\n#### Returns\n\n`void`\n\n***\n\n### setColumnVisibility()\n\n```ts\nsetColumnVisibility: (updater) => void;\n```\n\nDefined in: [features/column-visibility/columnVisibilityFeature.types.ts:59](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L59)\n\nSets or updates the `state.columnVisibility` state.\n\n#### Parameters\n\n##### updater\n\n[`Updater`](../type-aliases/Updater.md)\\<[`ColumnVisibilityState`](../type-aliases/ColumnVisibilityState.md)\\>\n\n#### Returns\n\n`void`\n\n***\n\n### toggleAllColumnsVisible()\n\n```ts\ntoggleAllColumnsVisible: (value?) => void;\n```\n\nDefined in: [features/column-visibility/columnVisibilityFeature.types.ts:63](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L63)\n\nToggles the visibility of all columns.\n\n#### Parameters\n\n##### value?\n\n`boolean`\n\n#### Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/interfaces/Table_Columns.md",
    "content": "---\nid: Table_Columns\ntitle: Table_Columns\n---\n\n# Interface: Table\\_Columns\\<TFeatures, TData\\>\n\nDefined in: [core/columns/coreColumnsFeature.types.ts:75](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L75)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Properties\n\n### getAllColumns()\n\n```ts\ngetAllColumns: () => Column<TFeatures, TData, unknown>[];\n```\n\nDefined in: [core/columns/coreColumnsFeature.types.ts:90](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L90)\n\nReturns all columns in the table in their normalized and nested hierarchy.\n\n#### Returns\n\n[`Column`](../type-aliases/Column.md)\\<`TFeatures`, `TData`, `unknown`\\>[]\n\n***\n\n### getAllFlatColumns()\n\n```ts\ngetAllFlatColumns: () => Column<TFeatures, TData, unknown>[];\n```\n\nDefined in: [core/columns/coreColumnsFeature.types.ts:94](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L94)\n\nReturns all columns in the table flattened to a single level.\n\n#### Returns\n\n[`Column`](../type-aliases/Column.md)\\<`TFeatures`, `TData`, `unknown`\\>[]\n\n***\n\n### getAllFlatColumnsById()\n\n```ts\ngetAllFlatColumnsById: () => Record<string, Column<TFeatures, TData, unknown>>;\n```\n\nDefined in: [core/columns/coreColumnsFeature.types.ts:82](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L82)\n\nReturns a map of all flat columns by their ID.\n\n#### Returns\n\n`Record`\\<`string`, [`Column`](../type-aliases/Column.md)\\<`TFeatures`, `TData`, `unknown`\\>\\>\n\n***\n\n### getAllLeafColumns()\n\n```ts\ngetAllLeafColumns: () => Column<TFeatures, TData, unknown>[];\n```\n\nDefined in: [core/columns/coreColumnsFeature.types.ts:98](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L98)\n\nReturns all leaf-node columns in the table flattened to a single level. This does not include parent columns.\n\n#### Returns\n\n[`Column`](../type-aliases/Column.md)\\<`TFeatures`, `TData`, `unknown`\\>[]\n\n***\n\n### getColumn()\n\n```ts\ngetColumn: (columnId) => \n  | Column<TFeatures, TData, unknown>\n  | undefined;\n```\n\nDefined in: [core/columns/coreColumnsFeature.types.ts:102](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L102)\n\nReturns a single column by its ID.\n\n#### Parameters\n\n##### columnId\n\n`string`\n\n#### Returns\n\n  \\| [`Column`](../type-aliases/Column.md)\\<`TFeatures`, `TData`, `unknown`\\>\n  \\| `undefined`\n\n***\n\n### getDefaultColumnDef()\n\n```ts\ngetDefaultColumnDef: () => Partial<ColumnDef<TFeatures, TData, unknown>>;\n```\n\nDefined in: [core/columns/coreColumnsFeature.types.ts:86](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L86)\n\nReturns the default column options to use for all column defs supplied to the table.\n\n#### Returns\n\n`Partial`\\<[`ColumnDef`](../type-aliases/ColumnDef.md)\\<`TFeatures`, `TData`, `unknown`\\>\\>\n"
  },
  {
    "path": "docs/reference/interfaces/Table_CoreProperties.md",
    "content": "---\nid: Table_CoreProperties\ntitle: Table_CoreProperties\n---\n\n# Interface: Table\\_CoreProperties\\<TFeatures, TData\\>\n\nDefined in: [core/table/coreTablesFeature.types.ts:61](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L61)\n\n## Extended by\n\n- [`Table_Table`](Table_Table.md)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Properties\n\n### \\_cellPrototype?\n\n```ts\noptional _cellPrototype: object;\n```\n\nDefined in: [core/table/coreTablesFeature.types.ts:72](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L72)\n\nPrototype cache for Cell objects - shared by all cells in this table\n\n***\n\n### \\_columnPrototype?\n\n```ts\noptional _columnPrototype: object;\n```\n\nDefined in: [core/table/coreTablesFeature.types.ts:76](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L76)\n\nPrototype cache for Column objects - shared by all columns in this table\n\n***\n\n### \\_features\n\n```ts\n_features: Partial<CoreFeatures> & TFeatures;\n```\n\nDefined in: [core/table/coreTablesFeature.types.ts:68](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L68)\n\nThe features that are enabled for the table.\n\n***\n\n### \\_headerPrototype?\n\n```ts\noptional _headerPrototype: object;\n```\n\nDefined in: [core/table/coreTablesFeature.types.ts:80](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L80)\n\nPrototype cache for Header objects - shared by all headers in this table\n\n***\n\n### \\_rowModelFns\n\n```ts\n_rowModelFns: RowModelFns<TFeatures, TData>;\n```\n\nDefined in: [core/table/coreTablesFeature.types.ts:84](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L84)\n\nThe row model processing functions that are used to process the data by features.\n\n***\n\n### \\_rowModels\n\n```ts\n_rowModels: CachedRowModels<TFeatures, TData>;\n```\n\nDefined in: [core/table/coreTablesFeature.types.ts:88](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L88)\n\nThe row models that are enabled for the table.\n\n***\n\n### \\_rowPrototype?\n\n```ts\noptional _rowPrototype: object;\n```\n\nDefined in: [core/table/coreTablesFeature.types.ts:92](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L92)\n\nPrototype cache for Row objects - shared by all rows in this table\n\n***\n\n### baseStore\n\n```ts\nbaseStore: Store<TableState<TFeatures>>;\n```\n\nDefined in: [core/table/coreTablesFeature.types.ts:96](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L96)\n\nThe base store for the table. This can be used to write to the table state.\n\n***\n\n### initialState\n\n```ts\ninitialState: TableState<TFeatures>;\n```\n\nDefined in: [core/table/coreTablesFeature.types.ts:100](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L100)\n\nThis is the resolved initial state of the table.\n\n***\n\n### options\n\n```ts\noptions: TableOptions<TFeatures, TData>;\n```\n\nDefined in: [core/table/coreTablesFeature.types.ts:104](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L104)\n\nA read-only reference to the table's current options.\n\n***\n\n### store\n\n```ts\nstore: ReadonlyStore<TableState<TFeatures>>;\n```\n\nDefined in: [core/table/coreTablesFeature.types.ts:108](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L108)\n\nWhere the table state is stored.\n"
  },
  {
    "path": "docs/reference/interfaces/Table_GlobalFiltering.md",
    "content": "---\nid: Table_GlobalFiltering\ntitle: Table_GlobalFiltering\n---\n\n# Interface: Table\\_GlobalFiltering\\<TFeatures, TData\\>\n\nDefined in: [features/global-filtering/globalFilteringFeature.types.ts:64](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.types.ts#L64)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Properties\n\n### getGlobalAutoFilterFn()\n\n```ts\ngetGlobalAutoFilterFn: () => FilterFn<TFeatures, TData> | undefined;\n```\n\nDefined in: [features/global-filtering/globalFilteringFeature.types.ts:71](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.types.ts#L71)\n\nCurrently, this function returns the built-in `includesString` filter function. In future releases, it may return more dynamic filter functions based on the nature of the data provided.\n\n#### Returns\n\n[`FilterFn`](FilterFn.md)\\<`TFeatures`, `TData`\\> \\| `undefined`\n\n***\n\n### getGlobalFilterFn()\n\n```ts\ngetGlobalFilterFn: () => FilterFn<TFeatures, TData> | undefined;\n```\n\nDefined in: [features/global-filtering/globalFilteringFeature.types.ts:75](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.types.ts#L75)\n\nReturns the filter function (either user-defined or automatic, depending on configuration) for the global filter.\n\n#### Returns\n\n[`FilterFn`](FilterFn.md)\\<`TFeatures`, `TData`\\> \\| `undefined`\n\n***\n\n### resetGlobalFilter()\n\n```ts\nresetGlobalFilter: (defaultState?) => void;\n```\n\nDefined in: [features/global-filtering/globalFilteringFeature.types.ts:79](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.types.ts#L79)\n\nResets the **globalFilter** state to `initialState.globalFilter`, or `true` can be passed to force a default blank state reset to `undefined`.\n\n#### Parameters\n\n##### defaultState?\n\n`boolean`\n\n#### Returns\n\n`void`\n\n***\n\n### setGlobalFilter()\n\n```ts\nsetGlobalFilter: (updater) => void;\n```\n\nDefined in: [features/global-filtering/globalFilteringFeature.types.ts:83](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.types.ts#L83)\n\nSets or updates the `state.globalFilter` state.\n\n#### Parameters\n\n##### updater\n\n`any`\n\n#### Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/interfaces/Table_Headers.md",
    "content": "---\nid: Table_Headers\ntitle: Table_Headers\n---\n\n# Interface: Table\\_Headers\\<TFeatures, TData\\>\n\nDefined in: [core/headers/coreHeadersFeature.types.ts:8](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L8)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Properties\n\n### getFlatHeaders()\n\n```ts\ngetFlatHeaders: () => Header<TFeatures, TData, unknown>[];\n```\n\nDefined in: [core/headers/coreHeadersFeature.types.ts:23](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L23)\n\nReturns headers for all columns in the table, including parent headers.\n\n#### Returns\n\n[`Header`](../type-aliases/Header.md)\\<`TFeatures`, `TData`, `unknown`\\>[]\n\n***\n\n### getFooterGroups()\n\n```ts\ngetFooterGroups: () => HeaderGroup<TFeatures, TData>[];\n```\n\nDefined in: [core/headers/coreHeadersFeature.types.ts:19](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L19)\n\nReturns the footer groups for the table.\n\n#### Returns\n\n[`HeaderGroup`](../type-aliases/HeaderGroup.md)\\<`TFeatures`, `TData`\\>[]\n\n***\n\n### getHeaderGroups()\n\n```ts\ngetHeaderGroups: () => HeaderGroup<TFeatures, TData>[];\n```\n\nDefined in: [core/headers/coreHeadersFeature.types.ts:15](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L15)\n\nReturns all header groups for the table.\n\n#### Returns\n\n[`HeaderGroup`](../type-aliases/HeaderGroup.md)\\<`TFeatures`, `TData`\\>[]\n\n***\n\n### getLeafHeaders()\n\n```ts\ngetLeafHeaders: () => Header<TFeatures, TData, unknown>[];\n```\n\nDefined in: [core/headers/coreHeadersFeature.types.ts:27](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L27)\n\nReturns headers for all leaf columns in the table, (not including parent headers).\n\n#### Returns\n\n[`Header`](../type-aliases/Header.md)\\<`TFeatures`, `TData`, `unknown`\\>[]\n"
  },
  {
    "path": "docs/reference/interfaces/Table_Plugins.md",
    "content": "---\nid: Table_Plugins\ntitle: Table_Plugins\n---\n\n# Interface: Table\\_Plugins\\<TFeatures, TData\\>\n\nDefined in: [types/Table.ts:32](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/Table.ts#L32)\n\nUse this interface as a target for declaration merging to add your own plugin properties.\nNote: This will affect the types of all tables in your project.\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n"
  },
  {
    "path": "docs/reference/interfaces/Table_RowExpanding.md",
    "content": "---\nid: Table_RowExpanding\ntitle: Table_RowExpanding\n---\n\n# Interface: Table\\_RowExpanding\\<TFeatures, TData\\>\n\nDefined in: [features/row-expanding/rowExpandingFeature.types.ts:71](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L71)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Properties\n\n### autoResetExpanded()\n\n```ts\nautoResetExpanded: () => void;\n```\n\nDefined in: [features/row-expanding/rowExpandingFeature.types.ts:75](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L75)\n\n#### Returns\n\n`void`\n\n***\n\n### getCanSomeRowsExpand()\n\n```ts\ngetCanSomeRowsExpand: () => boolean;\n```\n\nDefined in: [features/row-expanding/rowExpandingFeature.types.ts:79](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L79)\n\nReturns whether there are any rows that can be expanded.\n\n#### Returns\n\n`boolean`\n\n***\n\n### getExpandedDepth()\n\n```ts\ngetExpandedDepth: () => number;\n```\n\nDefined in: [features/row-expanding/rowExpandingFeature.types.ts:83](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L83)\n\nReturns the maximum depth of the expanded rows.\n\n#### Returns\n\n`number`\n\n***\n\n### getIsAllRowsExpanded()\n\n```ts\ngetIsAllRowsExpanded: () => boolean;\n```\n\nDefined in: [features/row-expanding/rowExpandingFeature.types.ts:87](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L87)\n\nReturns whether all rows are currently expanded.\n\n#### Returns\n\n`boolean`\n\n***\n\n### getIsSomeRowsExpanded()\n\n```ts\ngetIsSomeRowsExpanded: () => boolean;\n```\n\nDefined in: [features/row-expanding/rowExpandingFeature.types.ts:91](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L91)\n\nReturns whether there are any rows that are currently expanded.\n\n#### Returns\n\n`boolean`\n\n***\n\n### getToggleAllRowsExpandedHandler()\n\n```ts\ngetToggleAllRowsExpandedHandler: () => (event) => void;\n```\n\nDefined in: [features/row-expanding/rowExpandingFeature.types.ts:95](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L95)\n\nReturns a handler that can be used to toggle the expanded state of all rows. This handler is meant to be used with an `input[type=checkbox]` element.\n\n#### Returns\n\n```ts\n(event): void;\n```\n\n##### Parameters\n\n###### event\n\n`unknown`\n\n##### Returns\n\n`void`\n\n***\n\n### resetExpanded()\n\n```ts\nresetExpanded: (defaultState?) => void;\n```\n\nDefined in: [features/row-expanding/rowExpandingFeature.types.ts:99](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L99)\n\nResets the expanded state of the table to the initial state.\n\n#### Parameters\n\n##### defaultState?\n\n`boolean`\n\n#### Returns\n\n`void`\n\n***\n\n### setExpanded()\n\n```ts\nsetExpanded: (updater) => void;\n```\n\nDefined in: [features/row-expanding/rowExpandingFeature.types.ts:103](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L103)\n\nUpdates the expanded state of the table via an update function or value.\n\n#### Parameters\n\n##### updater\n\n[`Updater`](../type-aliases/Updater.md)\\<[`ExpandedState`](../type-aliases/ExpandedState.md)\\>\n\n#### Returns\n\n`void`\n\n***\n\n### toggleAllRowsExpanded()\n\n```ts\ntoggleAllRowsExpanded: (expanded?) => void;\n```\n\nDefined in: [features/row-expanding/rowExpandingFeature.types.ts:107](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L107)\n\nToggles the expanded state for all rows.\n\n#### Parameters\n\n##### expanded?\n\n`boolean`\n\n#### Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/interfaces/Table_RowModels_Core.md",
    "content": "---\nid: Table_RowModels_Core\ntitle: Table_RowModels_Core\n---\n\n# Interface: Table\\_RowModels\\_Core\\<TFeatures, TData\\>\n\nDefined in: [core/row-models/coreRowModelsFeature.types.ts:44](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.types.ts#L44)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Properties\n\n### getCoreRowModel()\n\n```ts\ngetCoreRowModel: () => RowModel<TFeatures, TData>;\n```\n\nDefined in: [core/row-models/coreRowModelsFeature.types.ts:51](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.types.ts#L51)\n\nReturns the core row model before any processing has been applied.\n\n#### Returns\n\n[`RowModel`](RowModel.md)\\<`TFeatures`, `TData`\\>\n\n***\n\n### getRowModel()\n\n```ts\ngetRowModel: () => RowModel<TFeatures, TData>;\n```\n\nDefined in: [core/row-models/coreRowModelsFeature.types.ts:55](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.types.ts#L55)\n\nReturns the final model after all processing from other used features has been applied. This is the row model that is most commonly used for rendering.\n\n#### Returns\n\n[`RowModel`](RowModel.md)\\<`TFeatures`, `TData`\\>\n"
  },
  {
    "path": "docs/reference/interfaces/Table_RowModels_Expanded.md",
    "content": "---\nid: Table_RowModels_Expanded\ntitle: Table_RowModels_Expanded\n---\n\n# Interface: Table\\_RowModels\\_Expanded\\<TFeatures, TData\\>\n\nDefined in: [features/row-expanding/rowExpandingFeature.types.ts:110](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L110)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Properties\n\n### getExpandedRowModel()\n\n```ts\ngetExpandedRowModel: () => RowModel<TFeatures, TData>;\n```\n\nDefined in: [features/row-expanding/rowExpandingFeature.types.ts:117](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L117)\n\nReturns the row model after expansion has been applied.\n\n#### Returns\n\n[`RowModel`](RowModel.md)\\<`TFeatures`, `TData`\\>\n\n***\n\n### getPreExpandedRowModel()\n\n```ts\ngetPreExpandedRowModel: () => RowModel<TFeatures, TData>;\n```\n\nDefined in: [features/row-expanding/rowExpandingFeature.types.ts:121](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L121)\n\nReturns the row model before expansion has been applied.\n\n#### Returns\n\n[`RowModel`](RowModel.md)\\<`TFeatures`, `TData`\\>\n"
  },
  {
    "path": "docs/reference/interfaces/Table_RowModels_Faceted.md",
    "content": "---\nid: Table_RowModels_Faceted\ntitle: Table_RowModels_Faceted\n---\n\n# Interface: Table\\_RowModels\\_Faceted\\<TFeatures, TData\\>\n\nDefined in: [features/column-faceting/columnFacetingFeature.types.ts:24](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L24)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Properties\n\n### getFacetedMinMaxValues()\n\n```ts\ngetFacetedMinMaxValues: () => [number, number] | undefined;\n```\n\nDefined in: [features/column-faceting/columnFacetingFeature.types.ts:32](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L32)\n\nA function that **computes and returns** a min/max tuple derived from `column.getFacetedRowModel`. Useful for displaying faceted result values.\n> ⚠️ Requires that you pass a valid `getFacetedMinMaxValues` function to `options.getFacetedMinMaxValues`. A default implementation is provided via the exported `getFacetedMinMaxValues` function.\n\n#### Returns\n\n\\[`number`, `number`\\] \\| `undefined`\n\n***\n\n### getFacetedRowModel()\n\n```ts\ngetFacetedRowModel: () => RowModel<TFeatures, TData>;\n```\n\nDefined in: [features/column-faceting/columnFacetingFeature.types.ts:37](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L37)\n\nReturns the row model with all other column filters applied, excluding its own filter. Useful for displaying faceted result counts.\n> ⚠️ Requires that you pass a valid `getFacetedRowModel` function to `options.facetedRowModel`. A default implementation is provided via the exported `getFacetedRowModel` function.\n\n#### Returns\n\n[`RowModel`](RowModel.md)\\<`TFeatures`, `TData`\\>\n\n***\n\n### getFacetedUniqueValues()\n\n```ts\ngetFacetedUniqueValues: () => Map<any, number>;\n```\n\nDefined in: [features/column-faceting/columnFacetingFeature.types.ts:42](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L42)\n\nA function that **computes and returns** a `Map` of unique values and their occurrences derived from `column.getFacetedRowModel`. Useful for displaying faceted result values.\n> ⚠️ Requires that you pass a valid `getFacetedUniqueValues` function to `options.getFacetedUniqueValues`. A default implementation is provided via the exported `getFacetedUniqueValues` function.\n\n#### Returns\n\n`Map`\\<`any`, `number`\\>\n"
  },
  {
    "path": "docs/reference/interfaces/Table_RowModels_Filtered.md",
    "content": "---\nid: Table_RowModels_Filtered\ntitle: Table_RowModels_Filtered\n---\n\n# Interface: Table\\_RowModels\\_Filtered\\<TFeatures, TData\\>\n\nDefined in: [features/column-filtering/columnFilteringFeature.types.ts:186](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L186)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Properties\n\n### getFilteredRowModel()\n\n```ts\ngetFilteredRowModel: () => RowModel<TFeatures, TData>;\n```\n\nDefined in: [features/column-filtering/columnFilteringFeature.types.ts:193](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L193)\n\nReturns the row model for the table after **column** filtering has been applied.\n\n#### Returns\n\n[`RowModel`](RowModel.md)\\<`TFeatures`, `TData`\\>\n\n***\n\n### getPreFilteredRowModel()\n\n```ts\ngetPreFilteredRowModel: () => RowModel<TFeatures, TData>;\n```\n\nDefined in: [features/column-filtering/columnFilteringFeature.types.ts:197](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L197)\n\nReturns the row model for the table before any **column** filtering has been applied.\n\n#### Returns\n\n[`RowModel`](RowModel.md)\\<`TFeatures`, `TData`\\>\n"
  },
  {
    "path": "docs/reference/interfaces/Table_RowModels_Grouped.md",
    "content": "---\nid: Table_RowModels_Grouped\ntitle: Table_RowModels_Grouped\n---\n\n# Interface: Table\\_RowModels\\_Grouped\\<TFeatures, TData\\>\n\nDefined in: [features/column-grouping/columnGroupingFeature.types.ts:187](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L187)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Properties\n\n### getGroupedRowModel()\n\n```ts\ngetGroupedRowModel: () => RowModel<TFeatures, TData>;\n```\n\nDefined in: [features/column-grouping/columnGroupingFeature.types.ts:194](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L194)\n\nReturns the row model for the table after grouping has been applied.\n\n#### Returns\n\n[`RowModel`](RowModel.md)\\<`TFeatures`, `TData`\\>\n\n***\n\n### getPreGroupedRowModel()\n\n```ts\ngetPreGroupedRowModel: () => RowModel<TFeatures, TData>;\n```\n\nDefined in: [features/column-grouping/columnGroupingFeature.types.ts:198](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L198)\n\nReturns the row model for the table before any grouping has been applied.\n\n#### Returns\n\n[`RowModel`](RowModel.md)\\<`TFeatures`, `TData`\\>\n"
  },
  {
    "path": "docs/reference/interfaces/Table_RowModels_Paginated.md",
    "content": "---\nid: Table_RowModels_Paginated\ntitle: Table_RowModels_Paginated\n---\n\n# Interface: Table\\_RowModels\\_Paginated\\<TFeatures, TData\\>\n\nDefined in: [features/row-pagination/rowPaginationFeature.types.ts:109](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L109)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Properties\n\n### getPaginatedRowModel()\n\n```ts\ngetPaginatedRowModel: () => RowModel<TFeatures, TData>;\n```\n\nDefined in: [features/row-pagination/rowPaginationFeature.types.ts:116](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L116)\n\nReturns the row model for the table after pagination has been applied.\n\n#### Returns\n\n[`RowModel`](RowModel.md)\\<`TFeatures`, `TData`\\>\n\n***\n\n### getPrePaginatedRowModel()\n\n```ts\ngetPrePaginatedRowModel: () => RowModel<TFeatures, TData>;\n```\n\nDefined in: [features/row-pagination/rowPaginationFeature.types.ts:120](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L120)\n\nReturns the row model for the table before any pagination has been applied.\n\n#### Returns\n\n[`RowModel`](RowModel.md)\\<`TFeatures`, `TData`\\>\n"
  },
  {
    "path": "docs/reference/interfaces/Table_RowModels_Sorted.md",
    "content": "---\nid: Table_RowModels_Sorted\ntitle: Table_RowModels_Sorted\n---\n\n# Interface: Table\\_RowModels\\_Sorted\\<TFeatures, TData\\>\n\nDefined in: [features/row-sorting/rowSortingFeature.types.ts:198](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L198)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Properties\n\n### getPreSortedRowModel()\n\n```ts\ngetPreSortedRowModel: () => RowModel<TFeatures, TData>;\n```\n\nDefined in: [features/row-sorting/rowSortingFeature.types.ts:205](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L205)\n\nReturns the row model for the table before any sorting has been applied.\n\n#### Returns\n\n[`RowModel`](RowModel.md)\\<`TFeatures`, `TData`\\>\n\n***\n\n### getSortedRowModel()\n\n```ts\ngetSortedRowModel: () => RowModel<TFeatures, TData>;\n```\n\nDefined in: [features/row-sorting/rowSortingFeature.types.ts:209](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L209)\n\nReturns the row model for the table after sorting has been applied.\n\n#### Returns\n\n[`RowModel`](RowModel.md)\\<`TFeatures`, `TData`\\>\n"
  },
  {
    "path": "docs/reference/interfaces/Table_RowPagination.md",
    "content": "---\nid: Table_RowPagination\ntitle: Table_RowPagination\n---\n\n# Interface: Table\\_RowPagination\\<TFeatures, TData\\>\n\nDefined in: [features/row-pagination/rowPaginationFeature.types.ts:42](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L42)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Properties\n\n### \\_autoResetPageIndex()\n\n```ts\n_autoResetPageIndex: () => void;\n```\n\nDefined in: [features/row-pagination/rowPaginationFeature.types.ts:46](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L46)\n\n#### Returns\n\n`void`\n\n***\n\n### firstPage()\n\n```ts\nfirstPage: () => void;\n```\n\nDefined in: [features/row-pagination/rowPaginationFeature.types.ts:78](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L78)\n\nSets the page index to `0`.\n\n#### Returns\n\n`void`\n\n***\n\n### getCanNextPage()\n\n```ts\ngetCanNextPage: () => boolean;\n```\n\nDefined in: [features/row-pagination/rowPaginationFeature.types.ts:50](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L50)\n\nReturns whether the table can go to the next page.\n\n#### Returns\n\n`boolean`\n\n***\n\n### getCanPreviousPage()\n\n```ts\ngetCanPreviousPage: () => boolean;\n```\n\nDefined in: [features/row-pagination/rowPaginationFeature.types.ts:54](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L54)\n\nReturns whether the table can go to the previous page.\n\n#### Returns\n\n`boolean`\n\n***\n\n### getPageCount()\n\n```ts\ngetPageCount: () => number;\n```\n\nDefined in: [features/row-pagination/rowPaginationFeature.types.ts:58](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L58)\n\nReturns the page count. If manually paginating or controlling the pagination state, this will come directly from the `options.pageCount` table option, otherwise it will be calculated from the table data using the total row count and current page size.\n\n#### Returns\n\n`number`\n\n***\n\n### getPageOptions()\n\n```ts\ngetPageOptions: () => number[];\n```\n\nDefined in: [features/row-pagination/rowPaginationFeature.types.ts:66](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L66)\n\nReturns an array of page options (zero-index-based) for the current page size.\n\n#### Returns\n\n`number`[]\n\n***\n\n### getRowCount()\n\n```ts\ngetRowCount: () => number;\n```\n\nDefined in: [features/row-pagination/rowPaginationFeature.types.ts:62](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L62)\n\nReturns the row count. If manually paginating or controlling the pagination state, this will come directly from the `options.rowCount` table option, otherwise it will be calculated from the table data.\n\n#### Returns\n\n`number`\n\n***\n\n### lastPage()\n\n```ts\nlastPage: () => void;\n```\n\nDefined in: [features/row-pagination/rowPaginationFeature.types.ts:82](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L82)\n\nSets the page index to the last page.\n\n#### Returns\n\n`void`\n\n***\n\n### nextPage()\n\n```ts\nnextPage: () => void;\n```\n\nDefined in: [features/row-pagination/rowPaginationFeature.types.ts:70](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L70)\n\nIncrements the page index by one, if possible.\n\n#### Returns\n\n`void`\n\n***\n\n### previousPage()\n\n```ts\npreviousPage: () => void;\n```\n\nDefined in: [features/row-pagination/rowPaginationFeature.types.ts:74](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L74)\n\nDecrements the page index by one, if possible.\n\n#### Returns\n\n`void`\n\n***\n\n### resetPageIndex()\n\n```ts\nresetPageIndex: (defaultState?) => void;\n```\n\nDefined in: [features/row-pagination/rowPaginationFeature.types.ts:86](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L86)\n\nResets the page index to its initial state. If `defaultState` is `true`, the page index will be reset to `0` regardless of initial state.\n\n#### Parameters\n\n##### defaultState?\n\n`boolean`\n\n#### Returns\n\n`void`\n\n***\n\n### resetPageSize()\n\n```ts\nresetPageSize: (defaultState?) => void;\n```\n\nDefined in: [features/row-pagination/rowPaginationFeature.types.ts:90](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L90)\n\nResets the page size to its initial state. If `defaultState` is `true`, the page size will be reset to `10` regardless of initial state.\n\n#### Parameters\n\n##### defaultState?\n\n`boolean`\n\n#### Returns\n\n`void`\n\n***\n\n### resetPagination()\n\n```ts\nresetPagination: (defaultState?) => void;\n```\n\nDefined in: [features/row-pagination/rowPaginationFeature.types.ts:94](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L94)\n\nResets the **pagination** state to `initialState.pagination`, or `true` can be passed to force a default blank state reset to `[]`.\n\n#### Parameters\n\n##### defaultState?\n\n`boolean`\n\n#### Returns\n\n`void`\n\n***\n\n### setPageIndex()\n\n```ts\nsetPageIndex: (updater) => void;\n```\n\nDefined in: [features/row-pagination/rowPaginationFeature.types.ts:98](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L98)\n\nUpdates the page index using the provided function or value in the `state.pagination.pageIndex` state.\n\n#### Parameters\n\n##### updater\n\n[`Updater`](../type-aliases/Updater.md)\\<`number`\\>\n\n#### Returns\n\n`void`\n\n***\n\n### setPageSize()\n\n```ts\nsetPageSize: (updater) => void;\n```\n\nDefined in: [features/row-pagination/rowPaginationFeature.types.ts:102](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L102)\n\nUpdates the page size using the provided function or value in the `state.pagination.pageSize` state.\n\n#### Parameters\n\n##### updater\n\n[`Updater`](../type-aliases/Updater.md)\\<`number`\\>\n\n#### Returns\n\n`void`\n\n***\n\n### setPagination()\n\n```ts\nsetPagination: (updater) => void;\n```\n\nDefined in: [features/row-pagination/rowPaginationFeature.types.ts:106](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L106)\n\nSets or updates the `state.pagination` state.\n\n#### Parameters\n\n##### updater\n\n[`Updater`](../type-aliases/Updater.md)\\<[`PaginationState`](PaginationState.md)\\>\n\n#### Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/interfaces/Table_RowPinning.md",
    "content": "---\nid: Table_RowPinning\ntitle: Table_RowPinning\n---\n\n# Interface: Table\\_RowPinning\\<TFeatures, TData\\>\n\nDefined in: [features/row-pinning/rowPinningFeature.types.ts:61](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L61)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Properties\n\n### getBottomRows()\n\n```ts\ngetBottomRows: () => Row<TFeatures, TData>[];\n```\n\nDefined in: [features/row-pinning/rowPinningFeature.types.ts:68](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L68)\n\nReturns all bottom pinned rows.\n\n#### Returns\n\n[`Row`](../type-aliases/Row.md)\\<`TFeatures`, `TData`\\>[]\n\n***\n\n### getCenterRows()\n\n```ts\ngetCenterRows: () => Row<TFeatures, TData>[];\n```\n\nDefined in: [features/row-pinning/rowPinningFeature.types.ts:72](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L72)\n\nReturns all rows that are not pinned to the top or bottom.\n\n#### Returns\n\n[`Row`](../type-aliases/Row.md)\\<`TFeatures`, `TData`\\>[]\n\n***\n\n### getIsSomeRowsPinned()\n\n```ts\ngetIsSomeRowsPinned: (position?) => boolean;\n```\n\nDefined in: [features/row-pinning/rowPinningFeature.types.ts:76](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L76)\n\nReturns whether or not any rows are pinned. Optionally specify to only check for pinned rows in either the `top` or `bottom` position.\n\n#### Parameters\n\n##### position?\n\n[`RowPinningPosition`](../type-aliases/RowPinningPosition.md)\n\n#### Returns\n\n`boolean`\n\n***\n\n### getTopRows()\n\n```ts\ngetTopRows: () => Row<TFeatures, TData>[];\n```\n\nDefined in: [features/row-pinning/rowPinningFeature.types.ts:80](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L80)\n\nReturns all top pinned rows.\n\n#### Returns\n\n[`Row`](../type-aliases/Row.md)\\<`TFeatures`, `TData`\\>[]\n\n***\n\n### resetRowPinning()\n\n```ts\nresetRowPinning: (defaultState?) => void;\n```\n\nDefined in: [features/row-pinning/rowPinningFeature.types.ts:84](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L84)\n\nResets the **rowPinning** state to `initialState.rowPinning`, or `true` can be passed to force a default blank state reset to `{ top: [], bottom: [], }`.\n\n#### Parameters\n\n##### defaultState?\n\n`boolean`\n\n#### Returns\n\n`void`\n\n***\n\n### setRowPinning()\n\n```ts\nsetRowPinning: (updater) => void;\n```\n\nDefined in: [features/row-pinning/rowPinningFeature.types.ts:88](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L88)\n\nSets or updates the `state.rowPinning` state.\n\n#### Parameters\n\n##### updater\n\n[`Updater`](../type-aliases/Updater.md)\\<[`RowPinningState`](RowPinningState.md)\\>\n\n#### Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/interfaces/Table_RowSelection.md",
    "content": "---\nid: Table_RowSelection\ntitle: Table_RowSelection\n---\n\n# Interface: Table\\_RowSelection\\<TFeatures, TData\\>\n\nDefined in: [features/row-selection/rowSelectionFeature.types.ts:83](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L83)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Properties\n\n### getFilteredSelectedRowModel()\n\n```ts\ngetFilteredSelectedRowModel: () => RowModel<TFeatures, TData>;\n```\n\nDefined in: [features/row-selection/rowSelectionFeature.types.ts:90](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L90)\n\nReturns the row model of all rows that are selected after filtering has been applied.\n\n#### Returns\n\n[`RowModel`](RowModel.md)\\<`TFeatures`, `TData`\\>\n\n***\n\n### getGroupedSelectedRowModel()\n\n```ts\ngetGroupedSelectedRowModel: () => RowModel<TFeatures, TData>;\n```\n\nDefined in: [features/row-selection/rowSelectionFeature.types.ts:94](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L94)\n\nReturns the row model of all rows that are selected after grouping has been applied.\n\n#### Returns\n\n[`RowModel`](RowModel.md)\\<`TFeatures`, `TData`\\>\n\n***\n\n### getIsAllPageRowsSelected()\n\n```ts\ngetIsAllPageRowsSelected: () => boolean;\n```\n\nDefined in: [features/row-selection/rowSelectionFeature.types.ts:98](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L98)\n\nReturns whether or not all rows on the current page are selected.\n\n#### Returns\n\n`boolean`\n\n***\n\n### getIsAllRowsSelected()\n\n```ts\ngetIsAllRowsSelected: () => boolean;\n```\n\nDefined in: [features/row-selection/rowSelectionFeature.types.ts:102](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L102)\n\nReturns whether or not all rows in the table are selected.\n\n#### Returns\n\n`boolean`\n\n***\n\n### getIsSomePageRowsSelected()\n\n```ts\ngetIsSomePageRowsSelected: () => boolean;\n```\n\nDefined in: [features/row-selection/rowSelectionFeature.types.ts:106](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L106)\n\nReturns whether or not any rows on the current page are selected.\n\n#### Returns\n\n`boolean`\n\n***\n\n### getIsSomeRowsSelected()\n\n```ts\ngetIsSomeRowsSelected: () => boolean;\n```\n\nDefined in: [features/row-selection/rowSelectionFeature.types.ts:110](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L110)\n\nReturns whether or not any rows in the table are selected.\n\n#### Returns\n\n`boolean`\n\n***\n\n### getPreSelectedRowModel()\n\n```ts\ngetPreSelectedRowModel: () => RowModel<TFeatures, TData>;\n```\n\nDefined in: [features/row-selection/rowSelectionFeature.types.ts:114](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L114)\n\nReturns the core row model of all rows before row selection has been applied.\n\n#### Returns\n\n[`RowModel`](RowModel.md)\\<`TFeatures`, `TData`\\>\n\n***\n\n### getSelectedRowModel()\n\n```ts\ngetSelectedRowModel: () => RowModel<TFeatures, TData>;\n```\n\nDefined in: [features/row-selection/rowSelectionFeature.types.ts:118](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L118)\n\nReturns the row model of all rows that are selected.\n\n#### Returns\n\n[`RowModel`](RowModel.md)\\<`TFeatures`, `TData`\\>\n\n***\n\n### getToggleAllPageRowsSelectedHandler()\n\n```ts\ngetToggleAllPageRowsSelectedHandler: () => (event) => void;\n```\n\nDefined in: [features/row-selection/rowSelectionFeature.types.ts:122](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L122)\n\nReturns a handler that can be used to toggle all rows on the current page.\n\n#### Returns\n\n```ts\n(event): void;\n```\n\n##### Parameters\n\n###### event\n\n`unknown`\n\n##### Returns\n\n`void`\n\n***\n\n### getToggleAllRowsSelectedHandler()\n\n```ts\ngetToggleAllRowsSelectedHandler: () => (event) => void;\n```\n\nDefined in: [features/row-selection/rowSelectionFeature.types.ts:126](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L126)\n\nReturns a handler that can be used to toggle all rows in the table.\n\n#### Returns\n\n```ts\n(event): void;\n```\n\n##### Parameters\n\n###### event\n\n`unknown`\n\n##### Returns\n\n`void`\n\n***\n\n### resetRowSelection()\n\n```ts\nresetRowSelection: (defaultState?) => void;\n```\n\nDefined in: [features/row-selection/rowSelectionFeature.types.ts:130](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L130)\n\nResets the **rowSelection** state to the `initialState.rowSelection`, or `true` can be passed to force a default blank state reset to `{}`.\n\n#### Parameters\n\n##### defaultState?\n\n`boolean`\n\n#### Returns\n\n`void`\n\n***\n\n### setRowSelection()\n\n```ts\nsetRowSelection: (updater) => void;\n```\n\nDefined in: [features/row-selection/rowSelectionFeature.types.ts:134](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L134)\n\nSets or updates the `state.rowSelection` state.\n\n#### Parameters\n\n##### updater\n\n[`Updater`](../type-aliases/Updater.md)\\<[`RowSelectionState`](../type-aliases/RowSelectionState.md)\\>\n\n#### Returns\n\n`void`\n\n***\n\n### toggleAllPageRowsSelected()\n\n```ts\ntoggleAllPageRowsSelected: (value?) => void;\n```\n\nDefined in: [features/row-selection/rowSelectionFeature.types.ts:138](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L138)\n\nSelects/deselects all rows on the current page.\n\n#### Parameters\n\n##### value?\n\n`boolean`\n\n#### Returns\n\n`void`\n\n***\n\n### toggleAllRowsSelected()\n\n```ts\ntoggleAllRowsSelected: (value?) => void;\n```\n\nDefined in: [features/row-selection/rowSelectionFeature.types.ts:142](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L142)\n\nSelects/deselects all rows in the table.\n\n#### Parameters\n\n##### value?\n\n`boolean`\n\n#### Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/interfaces/Table_RowSorting.md",
    "content": "---\nid: Table_RowSorting\ntitle: Table_RowSorting\n---\n\n# Interface: Table\\_RowSorting\\<TFeatures, TData\\>\n\nDefined in: [features/row-sorting/rowSortingFeature.types.ts:184](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L184)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Properties\n\n### resetSorting()\n\n```ts\nresetSorting: (defaultState?) => void;\n```\n\nDefined in: [features/row-sorting/rowSortingFeature.types.ts:191](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L191)\n\nResets the **sorting** state to `initialState.sorting`, or `true` can be passed to force a default blank state reset to `[]`.\n\n#### Parameters\n\n##### defaultState?\n\n`boolean`\n\n#### Returns\n\n`void`\n\n***\n\n### setSorting()\n\n```ts\nsetSorting: (updater) => void;\n```\n\nDefined in: [features/row-sorting/rowSortingFeature.types.ts:195](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L195)\n\nSets or updates the `state.sorting` state.\n\n#### Parameters\n\n##### updater\n\n[`Updater`](../type-aliases/Updater.md)\\<[`SortingState`](../type-aliases/SortingState.md)\\>\n\n#### Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/interfaces/Table_Rows.md",
    "content": "---\nid: Table_Rows\ntitle: Table_Rows\n---\n\n# Interface: Table\\_Rows\\<TFeatures, TData\\>\n\nDefined in: [core/rows/coreRowsFeature.types.ts:105](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L105)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Properties\n\n### getRow()\n\n```ts\ngetRow: (id, searchAll?) => Row<TFeatures, TData>;\n```\n\nDefined in: [core/rows/coreRowsFeature.types.ts:113](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L113)\n\nReturns the row with the given ID.\n\n#### Parameters\n\n##### id\n\n`string`\n\n##### searchAll?\n\n`boolean`\n\n#### Returns\n\n[`Row`](../type-aliases/Row.md)\\<`TFeatures`, `TData`\\>\n\n***\n\n### getRowId()\n\n```ts\ngetRowId: (_, index, parent?) => string;\n```\n\nDefined in: [core/rows/coreRowsFeature.types.ts:109](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L109)\n\n#### Parameters\n\n##### \\_\n\n`TData`\n\n##### index\n\n`number`\n\n##### parent?\n\n[`Row`](../type-aliases/Row.md)\\<`TFeatures`, `TData`\\>\n\n#### Returns\n\n`string`\n"
  },
  {
    "path": "docs/reference/interfaces/Table_Table.md",
    "content": "---\nid: Table_Table\ntitle: Table_Table\n---\n\n# Interface: Table\\_Table\\<TFeatures, TData\\>\n\nDefined in: [core/table/coreTablesFeature.types.ts:111](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L111)\n\n## Extends\n\n- [`Table_CoreProperties`](Table_CoreProperties.md)\\<`TFeatures`, `TData`\\>\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](../type-aliases/RowData.md)\n\n## Properties\n\n### \\_cellPrototype?\n\n```ts\noptional _cellPrototype: object;\n```\n\nDefined in: [core/table/coreTablesFeature.types.ts:72](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L72)\n\nPrototype cache for Cell objects - shared by all cells in this table\n\n#### Inherited from\n\n[`Table_CoreProperties`](Table_CoreProperties.md).[`_cellPrototype`](Table_CoreProperties.md#_cellprototype)\n\n***\n\n### \\_columnPrototype?\n\n```ts\noptional _columnPrototype: object;\n```\n\nDefined in: [core/table/coreTablesFeature.types.ts:76](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L76)\n\nPrototype cache for Column objects - shared by all columns in this table\n\n#### Inherited from\n\n[`Table_CoreProperties`](Table_CoreProperties.md).[`_columnPrototype`](Table_CoreProperties.md#_columnprototype)\n\n***\n\n### \\_features\n\n```ts\n_features: Partial<CoreFeatures> & TFeatures;\n```\n\nDefined in: [core/table/coreTablesFeature.types.ts:68](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L68)\n\nThe features that are enabled for the table.\n\n#### Inherited from\n\n[`Table_CoreProperties`](Table_CoreProperties.md).[`_features`](Table_CoreProperties.md#_features)\n\n***\n\n### \\_headerPrototype?\n\n```ts\noptional _headerPrototype: object;\n```\n\nDefined in: [core/table/coreTablesFeature.types.ts:80](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L80)\n\nPrototype cache for Header objects - shared by all headers in this table\n\n#### Inherited from\n\n[`Table_CoreProperties`](Table_CoreProperties.md).[`_headerPrototype`](Table_CoreProperties.md#_headerprototype)\n\n***\n\n### \\_rowModelFns\n\n```ts\n_rowModelFns: RowModelFns<TFeatures, TData>;\n```\n\nDefined in: [core/table/coreTablesFeature.types.ts:84](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L84)\n\nThe row model processing functions that are used to process the data by features.\n\n#### Inherited from\n\n[`Table_CoreProperties`](Table_CoreProperties.md).[`_rowModelFns`](Table_CoreProperties.md#_rowmodelfns)\n\n***\n\n### \\_rowModels\n\n```ts\n_rowModels: CachedRowModels<TFeatures, TData>;\n```\n\nDefined in: [core/table/coreTablesFeature.types.ts:88](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L88)\n\nThe row models that are enabled for the table.\n\n#### Inherited from\n\n[`Table_CoreProperties`](Table_CoreProperties.md).[`_rowModels`](Table_CoreProperties.md#_rowmodels)\n\n***\n\n### \\_rowPrototype?\n\n```ts\noptional _rowPrototype: object;\n```\n\nDefined in: [core/table/coreTablesFeature.types.ts:92](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L92)\n\nPrototype cache for Row objects - shared by all rows in this table\n\n#### Inherited from\n\n[`Table_CoreProperties`](Table_CoreProperties.md).[`_rowPrototype`](Table_CoreProperties.md#_rowprototype)\n\n***\n\n### baseStore\n\n```ts\nbaseStore: Store<TableState<TFeatures>>;\n```\n\nDefined in: [core/table/coreTablesFeature.types.ts:96](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L96)\n\nThe base store for the table. This can be used to write to the table state.\n\n#### Inherited from\n\n[`Table_CoreProperties`](Table_CoreProperties.md).[`baseStore`](Table_CoreProperties.md#basestore)\n\n***\n\n### initialState\n\n```ts\ninitialState: TableState<TFeatures>;\n```\n\nDefined in: [core/table/coreTablesFeature.types.ts:100](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L100)\n\nThis is the resolved initial state of the table.\n\n#### Inherited from\n\n[`Table_CoreProperties`](Table_CoreProperties.md).[`initialState`](Table_CoreProperties.md#initialstate)\n\n***\n\n### options\n\n```ts\noptions: TableOptions<TFeatures, TData>;\n```\n\nDefined in: [core/table/coreTablesFeature.types.ts:104](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L104)\n\nA read-only reference to the table's current options.\n\n#### Inherited from\n\n[`Table_CoreProperties`](Table_CoreProperties.md).[`options`](Table_CoreProperties.md#options)\n\n***\n\n### reset()\n\n```ts\nreset: () => void;\n```\n\nDefined in: [core/table/coreTablesFeature.types.ts:118](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L118)\n\nCall this function to reset the table state to the initial state.\n\n#### Returns\n\n`void`\n\n***\n\n### setOptions()\n\n```ts\nsetOptions: (newOptions) => void;\n```\n\nDefined in: [core/table/coreTablesFeature.types.ts:122](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L122)\n\nThis function can be used to update the table options.\n\n#### Parameters\n\n##### newOptions\n\n[`Updater`](../type-aliases/Updater.md)\\<[`TableOptions`](../type-aliases/TableOptions.md)\\<`TFeatures`, `TData`\\>\\>\n\n#### Returns\n\n`void`\n\n***\n\n### store\n\n```ts\nstore: ReadonlyStore<TableState<TFeatures>>;\n```\n\nDefined in: [core/table/coreTablesFeature.types.ts:108](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L108)\n\nWhere the table state is stored.\n\n#### Inherited from\n\n[`Table_CoreProperties`](Table_CoreProperties.md).[`store`](Table_CoreProperties.md#store)\n"
  },
  {
    "path": "docs/reference/interfaces/columnResizingState.md",
    "content": "---\nid: columnResizingState\ntitle: columnResizingState\n---\n\n# Interface: columnResizingState\n\nDefined in: [features/column-resizing/columnResizingFeature.types.ts:7](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L7)\n\n## Properties\n\n### columnSizingStart\n\n```ts\ncolumnSizingStart: [string, number][];\n```\n\nDefined in: [features/column-resizing/columnResizingFeature.types.ts:8](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L8)\n\n***\n\n### deltaOffset\n\n```ts\ndeltaOffset: number | null;\n```\n\nDefined in: [features/column-resizing/columnResizingFeature.types.ts:9](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L9)\n\n***\n\n### deltaPercentage\n\n```ts\ndeltaPercentage: number | null;\n```\n\nDefined in: [features/column-resizing/columnResizingFeature.types.ts:10](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L10)\n\n***\n\n### isResizingColumn\n\n```ts\nisResizingColumn: string | false;\n```\n\nDefined in: [features/column-resizing/columnResizingFeature.types.ts:11](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L11)\n\n***\n\n### startOffset\n\n```ts\nstartOffset: number | null;\n```\n\nDefined in: [features/column-resizing/columnResizingFeature.types.ts:12](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L12)\n\n***\n\n### startSize\n\n```ts\nstartSize: number | null;\n```\n\nDefined in: [features/column-resizing/columnResizingFeature.types.ts:13](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L13)\n"
  },
  {
    "path": "docs/reference/type-aliases/APIObject.md",
    "content": "---\nid: APIObject\ntitle: APIObject\n---\n\n# Type Alias: APIObject\\<TDeps, TDepArgs\\>\n\n```ts\ntype APIObject<TDeps, TDepArgs> = Record<string, API<TDeps, TDepArgs>>;\n```\n\nDefined in: [utils.ts:272](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L272)\n\n## Type Parameters\n\n### TDeps\n\n`TDeps` *extends* `ReadonlyArray`\\<`any`\\>\n\n### TDepArgs\n\n`TDepArgs`\n"
  },
  {
    "path": "docs/reference/type-aliases/AccessorColumnDef.md",
    "content": "---\nid: AccessorColumnDef\ntitle: AccessorColumnDef\n---\n\n# Type Alias: AccessorColumnDef\\<TFeatures, TData, TValue\\>\n\n```ts\ntype AccessorColumnDef<TFeatures, TData, TValue> = \n  | AccessorKeyColumnDef<TFeatures, TData, TValue>\n| AccessorFnColumnDef<TFeatures, TData, TValue>;\n```\n\nDefined in: [types/ColumnDef.ts:194](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L194)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](RowData.md)\n\n### TValue\n\n`TValue` *extends* [`CellData`](CellData.md) = [`CellData`](CellData.md)\n"
  },
  {
    "path": "docs/reference/type-aliases/AccessorFn.md",
    "content": "---\nid: AccessorFn\ntitle: AccessorFn\n---\n\n# Type Alias: AccessorFn()\\<TData, TValue\\>\n\n```ts\ntype AccessorFn<TData, TValue> = (originalRow, index) => TValue;\n```\n\nDefined in: [types/ColumnDef.ts:30](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L30)\n\n## Type Parameters\n\n### TData\n\n`TData` *extends* [`RowData`](RowData.md)\n\n### TValue\n\n`TValue` *extends* [`CellData`](CellData.md) = [`CellData`](CellData.md)\n\n## Parameters\n\n### originalRow\n\n`TData`\n\n### index\n\n`number`\n\n## Returns\n\n`TValue`\n"
  },
  {
    "path": "docs/reference/type-aliases/AccessorFnColumnDef.md",
    "content": "---\nid: AccessorFnColumnDef\ntitle: AccessorFnColumnDef\n---\n\n# Type Alias: AccessorFnColumnDef\\<TFeatures, TData, TValue\\>\n\n```ts\ntype AccessorFnColumnDef<TFeatures, TData, TValue> = AccessorFnColumnDefBase<TFeatures, TData, TValue> & ColumnIdentifiers<TFeatures, TData, TValue>;\n```\n\nDefined in: [types/ColumnDef.ts:171](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L171)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](RowData.md)\n\n### TValue\n\n`TValue` *extends* [`CellData`](CellData.md) = [`CellData`](CellData.md)\n"
  },
  {
    "path": "docs/reference/type-aliases/AccessorFnColumnDefBase.md",
    "content": "---\nid: AccessorFnColumnDefBase\ntitle: AccessorFnColumnDefBase\n---\n\n# Type Alias: AccessorFnColumnDefBase\\<TFeatures, TData, TValue\\>\n\n```ts\ntype AccessorFnColumnDefBase<TFeatures, TData, TValue> = ColumnDefBase<TFeatures, TData, TValue> & object;\n```\n\nDefined in: [types/ColumnDef.ts:163](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L163)\n\n## Type Declaration\n\n### accessorFn\n\n```ts\naccessorFn: AccessorFn<TData, TValue>;\n```\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](RowData.md)\n\n### TValue\n\n`TValue` *extends* [`CellData`](CellData.md) = [`CellData`](CellData.md)\n"
  },
  {
    "path": "docs/reference/type-aliases/AccessorKeyColumnDef.md",
    "content": "---\nid: AccessorKeyColumnDef\ntitle: AccessorKeyColumnDef\n---\n\n# Type Alias: AccessorKeyColumnDef\\<TFeatures, TData, TValue\\>\n\n```ts\ntype AccessorKeyColumnDef<TFeatures, TData, TValue> = AccessorKeyColumnDefBase<TFeatures, TData, TValue> & Partial<ColumnIdentifiers<TFeatures, TData, TValue>>;\n```\n\nDefined in: [types/ColumnDef.ts:187](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L187)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](RowData.md)\n\n### TValue\n\n`TValue` *extends* [`CellData`](CellData.md) = [`CellData`](CellData.md)\n"
  },
  {
    "path": "docs/reference/type-aliases/AccessorKeyColumnDefBase.md",
    "content": "---\nid: AccessorKeyColumnDefBase\ntitle: AccessorKeyColumnDefBase\n---\n\n# Type Alias: AccessorKeyColumnDefBase\\<TFeatures, TData, TValue\\>\n\n```ts\ntype AccessorKeyColumnDefBase<TFeatures, TData, TValue> = ColumnDefBase<TFeatures, TData, TValue> & object;\n```\n\nDefined in: [types/ColumnDef.ts:178](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L178)\n\n## Type Declaration\n\n### accessorKey\n\n```ts\naccessorKey: string & object | keyof TData;\n```\n\n### id?\n\n```ts\noptional id: string;\n```\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](RowData.md)\n\n### TValue\n\n`TValue` *extends* [`CellData`](CellData.md) = [`CellData`](CellData.md)\n"
  },
  {
    "path": "docs/reference/type-aliases/AggregationFn.md",
    "content": "---\nid: AggregationFn\ntitle: AggregationFn\n---\n\n# Type Alias: AggregationFn()\\<TFeatures, TData\\>\n\n```ts\ntype AggregationFn<TFeatures, TData> = (columnId, leafRows, childRows) => any;\n```\n\nDefined in: [features/column-grouping/columnGroupingFeature.types.ts:30](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L30)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](RowData.md)\n\n## Parameters\n\n### columnId\n\n`string`\n\n### leafRows\n\n[`Row`](Row.md)\\<`TFeatures`, `TData`\\>[]\n\n### childRows\n\n[`Row`](Row.md)\\<`TFeatures`, `TData`\\>[]\n\n## Returns\n\n`any`\n"
  },
  {
    "path": "docs/reference/type-aliases/AggregationFnOption.md",
    "content": "---\nid: AggregationFnOption\ntitle: AggregationFnOption\n---\n\n# Type Alias: AggregationFnOption\\<TFeatures, TData\\>\n\n```ts\ntype AggregationFnOption<TFeatures, TData> = \n  | \"auto\"\n  | keyof AggregationFns\n  | BuiltInAggregationFn\n| AggregationFn<TFeatures, TData>;\n```\n\nDefined in: [features/column-grouping/columnGroupingFeature.types.ts:44](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L44)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](RowData.md)\n"
  },
  {
    "path": "docs/reference/type-aliases/AssignCellPrototype.md",
    "content": "---\nid: AssignCellPrototype\ntitle: AssignCellPrototype\n---\n\n# Type Alias: AssignCellPrototype()\\<TConstructors\\>\n\n```ts\ntype AssignCellPrototype<TConstructors> = <TFeatures, TData>(prototype, table) => void;\n```\n\nDefined in: [types/TableFeatures.ts:77](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableFeatures.ts#L77)\n\n## Type Parameters\n\n### TConstructors\n\n`TConstructors` *extends* `FeatureConstructors`\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](RowData.md)\n\n## Parameters\n\n### prototype\n\n`Record`\\<`string`, `any`\\>\n\n### table\n\n[`Table_Internal`](Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/type-aliases/AssignColumnPrototype.md",
    "content": "---\nid: AssignColumnPrototype\ntitle: AssignColumnPrototype\n---\n\n# Type Alias: AssignColumnPrototype()\\<TConstructors\\>\n\n```ts\ntype AssignColumnPrototype<TConstructors> = <TFeatures, TData>(prototype, table) => void;\n```\n\nDefined in: [types/TableFeatures.ts:85](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableFeatures.ts#L85)\n\n## Type Parameters\n\n### TConstructors\n\n`TConstructors` *extends* `FeatureConstructors`\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](RowData.md)\n\n## Parameters\n\n### prototype\n\n`Record`\\<`string`, `any`\\>\n\n### table\n\n[`Table_Internal`](Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/type-aliases/AssignHeaderPrototype.md",
    "content": "---\nid: AssignHeaderPrototype\ntitle: AssignHeaderPrototype\n---\n\n# Type Alias: AssignHeaderPrototype()\\<TConstructors\\>\n\n```ts\ntype AssignHeaderPrototype<TConstructors> = <TFeatures, TData>(prototype, table) => void;\n```\n\nDefined in: [types/TableFeatures.ts:93](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableFeatures.ts#L93)\n\n## Type Parameters\n\n### TConstructors\n\n`TConstructors` *extends* `FeatureConstructors`\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](RowData.md)\n\n## Parameters\n\n### prototype\n\n`Record`\\<`string`, `any`\\>\n\n### table\n\n[`Table_Internal`](Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/type-aliases/AssignRowPrototype.md",
    "content": "---\nid: AssignRowPrototype\ntitle: AssignRowPrototype\n---\n\n# Type Alias: AssignRowPrototype()\\<TConstructors\\>\n\n```ts\ntype AssignRowPrototype<TConstructors> = <TFeatures, TData>(prototype, table) => void;\n```\n\nDefined in: [types/TableFeatures.ts:101](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableFeatures.ts#L101)\n\n## Type Parameters\n\n### TConstructors\n\n`TConstructors` *extends* `FeatureConstructors`\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](RowData.md)\n\n## Parameters\n\n### prototype\n\n`Record`\\<`string`, `any`\\>\n\n### table\n\n[`Table_Internal`](Table_Internal.md)\\<`TFeatures`, `TData`\\>\n\n## Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/type-aliases/BuiltInAggregationFn.md",
    "content": "---\nid: BuiltInAggregationFn\ntitle: BuiltInAggregationFn\n---\n\n# Type Alias: BuiltInAggregationFn\n\n```ts\ntype BuiltInAggregationFn = keyof typeof aggregationFns;\n```\n\nDefined in: [fns/aggregationFns.ts:220](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/aggregationFns.ts#L220)\n"
  },
  {
    "path": "docs/reference/type-aliases/BuiltInFilterFn.md",
    "content": "---\nid: BuiltInFilterFn\ntitle: BuiltInFilterFn\n---\n\n# Type Alias: BuiltInFilterFn\n\n```ts\ntype BuiltInFilterFn = keyof typeof filterFns;\n```\n\nDefined in: [fns/filterFns.ts:373](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L373)\n"
  },
  {
    "path": "docs/reference/type-aliases/BuiltInSortFn.md",
    "content": "---\nid: BuiltInSortFn\ntitle: BuiltInSortFn\n---\n\n# Type Alias: BuiltInSortFn\n\n```ts\ntype BuiltInSortFn = keyof typeof sortFns;\n```\n\nDefined in: [fns/sortFns.ts:173](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/sortFns.ts#L173)\n"
  },
  {
    "path": "docs/reference/type-aliases/CachedRowModel_All.md",
    "content": "---\nid: CachedRowModel_All\ntitle: CachedRowModel_All\n---\n\n# Type Alias: CachedRowModel\\_All\\<TFeatures, TData\\>\n\n```ts\ntype CachedRowModel_All<TFeatures, TData> = Partial<CachedRowModel_Core<TFeatures, TData> & CachedRowModel_Expanded<TFeatures, TData> & CachedRowModel_Faceted<TFeatures, TData> & CachedRowModel_Filtered<TFeatures, TData> & CachedRowModel_Grouped<TFeatures, TData> & CachedRowModel_Paginated<TFeatures, TData> & CachedRowModel_Sorted<TFeatures, TData>>;\n```\n\nDefined in: [types/RowModel.ts:126](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/RowModel.ts#L126)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](RowData.md) = `any`\n"
  },
  {
    "path": "docs/reference/type-aliases/CachedRowModels.md",
    "content": "---\nid: CachedRowModels\ntitle: CachedRowModels\n---\n\n# Type Alias: CachedRowModels\\<TFeatures, TData\\>\n\n```ts\ntype CachedRowModels<TFeatures, TData> = object & UnionToIntersection<\n  | \"columnFacetingFeature\" extends keyof TFeatures ? CachedRowModel_Faceted<TFeatures, TData> : never\n  | \"columnFilteringFeature\" extends keyof TFeatures ? CachedRowModel_Filtered<TFeatures, TData> : never\n  | \"rowExpandingFeature\" extends keyof TFeatures ? CachedRowModel_Expanded<TFeatures, TData> : never\n  | \"columnGroupingFeature\" extends keyof TFeatures ? CachedRowModel_Grouped<TFeatures, TData> : never\n  | \"rowPaginationFeature\" extends keyof TFeatures ? CachedRowModel_Paginated<TFeatures, TData> : never\n| \"rowSortingFeature\" extends keyof TFeatures ? CachedRowModel_Sorted<TFeatures, TData> : never> & ExtractFeatureTypes<\"CachedRowModel\", TFeatures> & CachedRowModels_Plugins<TFeatures, TData>;\n```\n\nDefined in: [types/RowModel.ts:92](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/RowModel.ts#L92)\n\n## Type Declaration\n\n### CachedRowModel\\_Core()\n\n```ts\nCachedRowModel_Core: () => RowModel<TFeatures, TData>;\n```\n\n#### Returns\n\n[`RowModel`](../interfaces/RowModel.md)\\<`TFeatures`, `TData`\\>\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](RowData.md)\n"
  },
  {
    "path": "docs/reference/type-aliases/Cell.md",
    "content": "---\nid: Cell\ntitle: Cell\n---\n\n# Type Alias: Cell\\<TFeatures, TData, TValue\\>\n\n```ts\ntype Cell<TFeatures, TData, TValue> = Cell_Cell<TFeatures, TData, TValue> & UnionToIntersection<\"columnGroupingFeature\" extends keyof TFeatures ? Cell_ColumnGrouping : never> & ExtractFeatureTypes<\"Cell\", TFeatures> & Cell_Plugins<TFeatures, TData, TValue>;\n```\n\nDefined in: [types/Cell.ts:22](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/Cell.ts#L22)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](RowData.md)\n\n### TValue\n\n`TValue` *extends* [`CellData`](CellData.md) = [`CellData`](CellData.md)\n"
  },
  {
    "path": "docs/reference/type-aliases/CellData.md",
    "content": "---\nid: CellData\ntitle: CellData\n---\n\n# Type Alias: CellData\n\n```ts\ntype CellData = unknown;\n```\n\nDefined in: [types/type-utils.ts:7](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/type-utils.ts#L7)\n"
  },
  {
    "path": "docs/reference/type-aliases/Column.md",
    "content": "---\nid: Column\ntitle: Column\n---\n\n# Type Alias: Column\\<TFeatures, TData, TValue\\>\n\n```ts\ntype Column<TFeatures, TData, TValue> = Column_Core<TFeatures, TData, TValue> & UnionToIntersection<\n  | \"columnFacetingFeature\" extends keyof TFeatures ? Column_ColumnFaceting<TFeatures, TData> : never\n  | \"columnFilteringFeature\" extends keyof TFeatures ? Column_ColumnFiltering<TFeatures, TData> : never\n  | \"columnGroupingFeature\" extends keyof TFeatures ? Column_ColumnGrouping<TFeatures, TData> : never\n  | \"columnOrderingFeature\" extends keyof TFeatures ? Column_ColumnOrdering : never\n  | \"columnPinningFeature\" extends keyof TFeatures ? Column_ColumnPinning : never\n  | \"columnResizingFeature\" extends keyof TFeatures ? Column_ColumnResizing : never\n  | \"columnSizingFeature\" extends keyof TFeatures ? Column_ColumnSizing : never\n  | \"columnVisibilityFeature\" extends keyof TFeatures ? Column_ColumnVisibility : never\n  | \"globalFilteringFeature\" extends keyof TFeatures ? Column_GlobalFiltering : never\n| \"rowSortingFeature\" extends keyof TFeatures ? Column_RowSorting<TFeatures, TData> : never> & ExtractFeatureTypes<\"Column\", TFeatures> & Column_Plugins<TFeatures, TData, TValue>;\n```\n\nDefined in: [types/Column.ts:32](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/Column.ts#L32)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](RowData.md)\n\n### TValue\n\n`TValue` = `unknown`\n"
  },
  {
    "path": "docs/reference/type-aliases/ColumnDef.md",
    "content": "---\nid: ColumnDef\ntitle: ColumnDef\n---\n\n# Type Alias: ColumnDef\\<TFeatures, TData, TValue\\>\n\n```ts\ntype ColumnDef<TFeatures, TData, TValue> = \n  | DisplayColumnDef<TFeatures, TData, TValue>\n  | GroupColumnDef<TFeatures, TData, TValue>\n| AccessorColumnDef<TFeatures, TData, TValue>;\n```\n\nDefined in: [types/ColumnDef.ts:202](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L202)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](RowData.md)\n\n### TValue\n\n`TValue` *extends* [`CellData`](CellData.md) = [`CellData`](CellData.md)\n"
  },
  {
    "path": "docs/reference/type-aliases/ColumnDefBase.md",
    "content": "---\nid: ColumnDefBase\ntitle: ColumnDefBase\n---\n\n# Type Alias: ColumnDefBase\\<TFeatures, TData, TValue\\>\n\n```ts\ntype ColumnDefBase<TFeatures, TData, TValue> = ColumnDefBase_Core<TFeatures, TData, TValue> & UnionToIntersection<\n  | \"columnVisibilityFeature\" extends keyof TFeatures ? ColumnDef_ColumnVisibility : never\n  | \"columnPinningFeature\" extends keyof TFeatures ? ColumnDef_ColumnPinning : never\n  | \"columnFilteringFeature\" extends keyof TFeatures ? ColumnDef_ColumnFiltering<TFeatures, TData> : never\n  | \"globalFilteringFeature\" extends keyof TFeatures ? ColumnDef_GlobalFiltering : never\n  | \"rowSortingFeature\" extends keyof TFeatures ? ColumnDef_RowSorting<TFeatures, TData> : never\n  | \"columnGroupingFeature\" extends keyof TFeatures ? ColumnDef_ColumnGrouping<TFeatures, TData, TValue> : never\n  | \"columnSizingFeature\" extends keyof TFeatures ? ColumnDef_ColumnSizing : never\n| \"columnResizingFeature\" extends keyof TFeatures ? ColumnDef_ColumnResizing : never> & ExtractFeatureTypes<\"ColumnDef\", TFeatures> & ColumnDef_Plugins<TFeatures, TData, TValue>;\n```\n\nDefined in: [types/ColumnDef.ts:75](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L75)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](RowData.md)\n\n### TValue\n\n`TValue` *extends* [`CellData`](CellData.md) = [`CellData`](CellData.md)\n"
  },
  {
    "path": "docs/reference/type-aliases/ColumnDefBase_All.md",
    "content": "---\nid: ColumnDefBase_All\ntitle: ColumnDefBase_All\n---\n\n# Type Alias: ColumnDefBase\\_All\\<TFeatures, TData, TValue\\>\n\n```ts\ntype ColumnDefBase_All<TFeatures, TData, TValue> = ColumnDefBase_Core<TFeatures, TData, TValue> & Partial<ColumnDef_ColumnVisibility & ColumnDef_ColumnPinning & ColumnDef_ColumnFiltering<TFeatures, TData> & ColumnDef_GlobalFiltering & ColumnDef_RowSorting<TFeatures, TData> & ColumnDef_ColumnGrouping<TFeatures, TData, TValue> & ColumnDef_ColumnSizing & ColumnDef_ColumnResizing>;\n```\n\nDefined in: [types/ColumnDef.ts:117](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L117)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](RowData.md)\n\n### TValue\n\n`TValue` *extends* [`CellData`](CellData.md) = [`CellData`](CellData.md)\n"
  },
  {
    "path": "docs/reference/type-aliases/ColumnDefResolved.md",
    "content": "---\nid: ColumnDefResolved\ntitle: ColumnDefResolved\n---\n\n# Type Alias: ColumnDefResolved\\<TFeatures, TData, TValue\\>\n\n```ts\ntype ColumnDefResolved<TFeatures, TData, TValue> = Partial<UnionToIntersection<ColumnDef<TFeatures, TData, TValue>>> & object;\n```\n\nDefined in: [types/ColumnDef.ts:211](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L211)\n\n## Type Declaration\n\n### accessorKey?\n\n```ts\noptional accessorKey: string;\n```\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](RowData.md)\n\n### TValue\n\n`TValue` *extends* [`CellData`](CellData.md) = [`CellData`](CellData.md)\n"
  },
  {
    "path": "docs/reference/type-aliases/ColumnDefTemplate.md",
    "content": "---\nid: ColumnDefTemplate\ntitle: ColumnDefTemplate\n---\n\n# Type Alias: ColumnDefTemplate\\<TProps\\>\n\n```ts\ntype ColumnDefTemplate<TProps> = string | (props) => any;\n```\n\nDefined in: [types/ColumnDef.ts:35](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L35)\n\n## Type Parameters\n\n### TProps\n\n`TProps` *extends* `object`\n"
  },
  {
    "path": "docs/reference/type-aliases/ColumnFilterAutoRemoveTestFn.md",
    "content": "---\nid: ColumnFilterAutoRemoveTestFn\ntitle: ColumnFilterAutoRemoveTestFn\n---\n\n# Type Alias: ColumnFilterAutoRemoveTestFn()\\<TFeatures, TData, TValue\\>\n\n```ts\ntype ColumnFilterAutoRemoveTestFn<TFeatures, TData, TValue> = (value, column?) => boolean;\n```\n\nDefined in: [features/column-filtering/columnFilteringFeature.types.ts:65](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L65)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](RowData.md)\n\n### TValue\n\n`TValue` *extends* [`CellData`](CellData.md) = [`CellData`](CellData.md)\n\n## Parameters\n\n### value\n\n`any`\n\n### column?\n\n[`Column`](Column.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n## Returns\n\n`boolean`\n"
  },
  {
    "path": "docs/reference/type-aliases/ColumnFiltersState.md",
    "content": "---\nid: ColumnFiltersState\ntitle: ColumnFiltersState\n---\n\n# Type Alias: ColumnFiltersState\n\n```ts\ntype ColumnFiltersState = ColumnFilter[];\n```\n\nDefined in: [features/column-filtering/columnFilteringFeature.types.ts:22](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L22)\n"
  },
  {
    "path": "docs/reference/type-aliases/ColumnHelper.md",
    "content": "---\nid: ColumnHelper\ntitle: ColumnHelper\n---\n\n# Type Alias: ColumnHelper\\<TFeatures, TData\\>\n\n```ts\ntype ColumnHelper<TFeatures, TData> = object;\n```\n\nDefined in: [helpers/columnHelper.ts:13](https://github.com/TanStack/table/blob/main/packages/table-core/src/helpers/columnHelper.ts#L13)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](RowData.md)\n\n## Properties\n\n### accessor()\n\n```ts\naccessor: <TAccessor, TValue>(accessor, column) => TAccessor extends AccessorFn<TData> ? AccessorFnColumnDef<TFeatures, TData, TValue> : AccessorKeyColumnDef<TFeatures, TData, TValue>;\n```\n\nDefined in: [helpers/columnHelper.ts:25](https://github.com/TanStack/table/blob/main/packages/table-core/src/helpers/columnHelper.ts#L25)\n\nCreates a data column definition with an accessor key or function to extract the cell value.\n\n#### Type Parameters\n\n##### TAccessor\n\n`TAccessor` *extends* \n  \\| [`AccessorFn`](AccessorFn.md)\\<`TData`\\>\n  \\| [`DeepKeys`](DeepKeys.md)\\<`TData`\\>\n\n##### TValue\n\n`TValue` *extends* `TAccessor` *extends* [`AccessorFn`](AccessorFn.md)\\<`TData`, infer TReturn\\> ? `TReturn` : `TAccessor` *extends* [`DeepKeys`](DeepKeys.md)\\<`TData`\\> ? [`DeepValue`](DeepValue.md)\\<`TData`, `TAccessor`\\> : `never`\n\n#### Parameters\n\n##### accessor\n\n`TAccessor`\n\n##### column\n\n`TAccessor` *extends* [`AccessorFn`](AccessorFn.md)\\<`TData`\\> ? [`DisplayColumnDef`](DisplayColumnDef.md)\\<`TFeatures`, `TData`, `TValue`\\> : [`IdentifiedColumnDef`](IdentifiedColumnDef.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n#### Returns\n\n`TAccessor` *extends* [`AccessorFn`](AccessorFn.md)\\<`TData`\\> ? [`AccessorFnColumnDef`](AccessorFnColumnDef.md)\\<`TFeatures`, `TData`, `TValue`\\> : [`AccessorKeyColumnDef`](AccessorKeyColumnDef.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n#### Example\n\n```ts\nhelper.accessor('firstName', { cell: (info) => info.getValue() })\nhelper.accessor((row) => row.lastName, { id: 'lastName' })\n```\n\n***\n\n### columns()\n\n```ts\ncolumns: <TColumns>(columns) => ColumnDef<TFeatures, TData, any>[] & [...TColumns];\n```\n\nDefined in: [helpers/columnHelper.ts:48](https://github.com/TanStack/table/blob/main/packages/table-core/src/helpers/columnHelper.ts#L48)\n\nWraps an array of column definitions to preserve each column's individual TValue type.\nUses variadic tuple types to infer element types before checking constraints, preventing type widening.\n\n#### Type Parameters\n\n##### TColumns\n\n`TColumns` *extends* `ReadonlyArray`\\<[`ColumnDef`](ColumnDef.md)\\<`TFeatures`, `TData`, `any`\\>\\>\n\n#### Parameters\n\n##### columns\n\n\\[`...TColumns`\\]\n\n#### Returns\n\n[`ColumnDef`](ColumnDef.md)\\<`TFeatures`, `TData`, `any`\\>[] & \\[`...TColumns`\\]\n\n#### Example\n\n```ts\nhelper.columns([helper.accessor('firstName', {}), helper.accessor('age', {})])\n```\n\n***\n\n### display()\n\n```ts\ndisplay: (column) => DisplayColumnDef<TFeatures, TData, unknown>;\n```\n\nDefined in: [helpers/columnHelper.ts:58](https://github.com/TanStack/table/blob/main/packages/table-core/src/helpers/columnHelper.ts#L58)\n\nCreates a display column definition for non-data columns like actions or row selection.\n\n#### Parameters\n\n##### column\n\n[`DisplayColumnDef`](DisplayColumnDef.md)\\<`TFeatures`, `TData`\\>\n\n#### Returns\n\n[`DisplayColumnDef`](DisplayColumnDef.md)\\<`TFeatures`, `TData`, `unknown`\\>\n\n#### Example\n\n```ts\nhelper.display({ id: 'actions', header: 'Actions', cell: () => <button>Edit</button> })\n```\n\n***\n\n### group()\n\n```ts\ngroup: (column) => GroupColumnDef<TFeatures, TData, unknown>;\n```\n\nDefined in: [helpers/columnHelper.ts:75](https://github.com/TanStack/table/blob/main/packages/table-core/src/helpers/columnHelper.ts#L75)\n\nCreates a group column definition that contains nested child columns.\n\n#### Parameters\n\n##### column\n\n[`GroupColumnDef`](GroupColumnDef.md)\\<`TFeatures`, `TData`, `unknown`\\>\n\n#### Returns\n\n[`GroupColumnDef`](GroupColumnDef.md)\\<`TFeatures`, `TData`, `unknown`\\>\n\n#### Example\n\n```ts\nhelper.group({\n  id: 'name',\n  header: 'Name',\n  columns: helper.columns([\n    helper.accessor('firstName', {}),\n    helper.accessor('lastName', { id: 'lastName' }),\n  ]),\n})\n```\n"
  },
  {
    "path": "docs/reference/type-aliases/ColumnOrderState.md",
    "content": "---\nid: ColumnOrderState\ntitle: ColumnOrderState\n---\n\n# Type Alias: ColumnOrderState\n\n```ts\ntype ColumnOrderState = string[];\n```\n\nDefined in: [features/column-ordering/columnOrderingFeature.types.ts:5](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.types.ts#L5)\n"
  },
  {
    "path": "docs/reference/type-aliases/ColumnPinningPosition.md",
    "content": "---\nid: ColumnPinningPosition\ntitle: ColumnPinningPosition\n---\n\n# Type Alias: ColumnPinningPosition\n\n```ts\ntype ColumnPinningPosition = false | \"left\" | \"right\";\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.types.ts:8](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L8)\n"
  },
  {
    "path": "docs/reference/type-aliases/ColumnResizeDirection.md",
    "content": "---\nid: ColumnResizeDirection\ntitle: ColumnResizeDirection\n---\n\n# Type Alias: ColumnResizeDirection\n\n```ts\ntype ColumnResizeDirection = \"ltr\" | \"rtl\";\n```\n\nDefined in: [features/column-resizing/columnResizingFeature.types.ts:18](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L18)\n"
  },
  {
    "path": "docs/reference/type-aliases/ColumnResizeMode.md",
    "content": "---\nid: ColumnResizeMode\ntitle: ColumnResizeMode\n---\n\n# Type Alias: ColumnResizeMode\n\n```ts\ntype ColumnResizeMode = \"onChange\" | \"onEnd\";\n```\n\nDefined in: [features/column-resizing/columnResizingFeature.types.ts:16](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L16)\n"
  },
  {
    "path": "docs/reference/type-aliases/ColumnResizingDefaultOptions.md",
    "content": "---\nid: ColumnResizingDefaultOptions\ntitle: ColumnResizingDefaultOptions\n---\n\n# Type Alias: ColumnResizingDefaultOptions\n\n```ts\ntype ColumnResizingDefaultOptions = Pick<TableOptions_ColumnResizing, \n  | \"columnResizeMode\"\n  | \"onColumnResizingChange\"\n| \"columnResizeDirection\">;\n```\n\nDefined in: [features/column-resizing/columnResizingFeature.types.ts:39](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L39)\n"
  },
  {
    "path": "docs/reference/type-aliases/ColumnSizingDefaultOptions.md",
    "content": "---\nid: ColumnSizingDefaultOptions\ntitle: ColumnSizingDefaultOptions\n---\n\n# Type Alias: ColumnSizingDefaultOptions\n\n```ts\ntype ColumnSizingDefaultOptions = Pick<TableOptions_ColumnSizing, \"onColumnSizingChange\">;\n```\n\nDefined in: [features/column-sizing/columnSizingFeature.types.ts:17](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L17)\n"
  },
  {
    "path": "docs/reference/type-aliases/ColumnSizingState.md",
    "content": "---\nid: ColumnSizingState\ntitle: ColumnSizingState\n---\n\n# Type Alias: ColumnSizingState\n\n```ts\ntype ColumnSizingState = Record<string, number>;\n```\n\nDefined in: [features/column-sizing/columnSizingFeature.types.ts:8](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L8)\n"
  },
  {
    "path": "docs/reference/type-aliases/ColumnVisibilityState.md",
    "content": "---\nid: ColumnVisibilityState\ntitle: ColumnVisibilityState\n---\n\n# Type Alias: ColumnVisibilityState\n\n```ts\ntype ColumnVisibilityState = Record<string, boolean>;\n```\n\nDefined in: [features/column-visibility/columnVisibilityFeature.types.ts:6](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L6)\n"
  },
  {
    "path": "docs/reference/type-aliases/Column_Internal.md",
    "content": "---\nid: Column_Internal\ntitle: Column_Internal\n---\n\n# Type Alias: Column\\_Internal\\<TFeatures, TData, TValue\\>\n\n```ts\ntype Column_Internal<TFeatures, TData, TValue> = Column<TFeatures, TData, TValue> & object;\n```\n\nDefined in: [types/Column.ts:80](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/Column.ts#L80)\n\n## Type Declaration\n\n### columnDef\n\n```ts\ncolumnDef: ColumnDefBase_All<TFeatures, TData, TValue>;\n```\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](RowData.md)\n\n### TValue\n\n`TValue` = `unknown`\n"
  },
  {
    "path": "docs/reference/type-aliases/ConstructTableAPIs.md",
    "content": "---\nid: ConstructTableAPIs\ntitle: ConstructTableAPIs\n---\n\n# Type Alias: ConstructTableAPIs()\\<TConstructors\\>\n\n```ts\ntype ConstructTableAPIs<TConstructors> = <TFeatures, TData>(table) => void;\n```\n\nDefined in: [types/TableFeatures.ts:45](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableFeatures.ts#L45)\n\n## Type Parameters\n\n### TConstructors\n\n`TConstructors` *extends* `FeatureConstructors`\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](Table_Internal.md)\\<`TFeatures`, `TData`\\> & `Partial`\\<`TConstructors`\\[`\"Table\"`\\]\\> & `object`\n\n## Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/type-aliases/CreateRowModels.md",
    "content": "---\nid: CreateRowModels\ntitle: CreateRowModels\n---\n\n# Type Alias: CreateRowModels\\<TFeatures, TData\\>\n\n```ts\ntype CreateRowModels<TFeatures, TData> = CreateRowModel_Core<TFeatures, TData> & UnionToIntersection<\n  | \"columnFacetingFeature\" extends keyof TFeatures ? CreateRowModel_Faceted<TFeatures, TData> : never\n  | \"columnFilteringFeature\" extends keyof TFeatures ? CreateRowModel_Filtered<TFeatures, TData> : never\n  | \"rowExpandingFeature\" extends keyof TFeatures ? CreateRowModel_Expanded<TFeatures, TData> : never\n  | \"columnGroupingFeature\" extends keyof TFeatures ? CreateRowModel_Grouped<TFeatures, TData> : never\n  | \"rowPaginationFeature\" extends keyof TFeatures ? CreateRowModel_Paginated<TFeatures, TData> : never\n| \"rowSortingFeature\" extends keyof TFeatures ? CreateRowModel_Sorted<TFeatures, TData> : never> & ExtractFeatureTypes<\"CreateRowModels\", TFeatures> & CreateRowModels_Plugins<TFeatures, TData>;\n```\n\nDefined in: [types/RowModel.ts:42](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/RowModel.ts#L42)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](RowData.md)\n"
  },
  {
    "path": "docs/reference/type-aliases/CreateRowModels_All.md",
    "content": "---\nid: CreateRowModels_All\ntitle: CreateRowModels_All\n---\n\n# Type Alias: CreateRowModels\\_All\\<TFeatures, TData\\>\n\n```ts\ntype CreateRowModels_All<TFeatures, TData> = CreateRowModel_Core<TFeatures, TData> & CreateRowModel_Expanded<TFeatures, TData> & CreateRowModel_Faceted<TFeatures, TData> & CreateRowModel_Filtered<TFeatures, TData> & CreateRowModel_Grouped<TFeatures, TData> & CreateRowModel_Paginated<TFeatures, TData> & CreateRowModel_Sorted<TFeatures, TData>;\n```\n\nDefined in: [types/RowModel.ts:76](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/RowModel.ts#L76)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](RowData.md)\n"
  },
  {
    "path": "docs/reference/type-aliases/CustomAggregationFns.md",
    "content": "---\nid: CustomAggregationFns\ntitle: CustomAggregationFns\n---\n\n# Type Alias: CustomAggregationFns\\<TFeatures, TData\\>\n\n```ts\ntype CustomAggregationFns<TFeatures, TData> = Record<string, AggregationFn<TFeatures, TData>>;\n```\n\nDefined in: [features/column-grouping/columnGroupingFeature.types.ts:39](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L39)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](RowData.md)\n"
  },
  {
    "path": "docs/reference/type-aliases/CustomFilterFns.md",
    "content": "---\nid: CustomFilterFns\ntitle: CustomFilterFns\n---\n\n# Type Alias: CustomFilterFns\\<TFeatures, TData\\>\n\n```ts\ntype CustomFilterFns<TFeatures, TData> = Record<string, FilterFn<TFeatures, TData>>;\n```\n\nDefined in: [features/column-filtering/columnFilteringFeature.types.ts:71](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L71)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](RowData.md)\n"
  },
  {
    "path": "docs/reference/type-aliases/CustomSortFns.md",
    "content": "---\nid: CustomSortFns\ntitle: CustomSortFns\n---\n\n# Type Alias: CustomSortFns\\<TFeatures, TData\\>\n\n```ts\ntype CustomSortFns<TFeatures, TData> = Record<string, SortFn<TFeatures, TData>>;\n```\n\nDefined in: [features/row-sorting/rowSortingFeature.types.ts:41](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L41)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](RowData.md)\n"
  },
  {
    "path": "docs/reference/type-aliases/DebugOptions.md",
    "content": "---\nid: DebugOptions\ntitle: DebugOptions\n---\n\n# Type Alias: DebugOptions\\<TFeatures\\>\n\n```ts\ntype DebugOptions<TFeatures> = object & DebugKeysFor<CoreFeatures & TFeatures>;\n```\n\nDefined in: [types/TableOptions.ts:41](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableOptions.ts#L41)\n\n## Type Declaration\n\n### debugAll?\n\n```ts\noptional debugAll: boolean;\n```\n\n### debugCache?\n\n```ts\noptional debugCache: boolean;\n```\n\n### debugCells?\n\n```ts\noptional debugCells: boolean;\n```\n\n### debugColumns?\n\n```ts\noptional debugColumns: boolean;\n```\n\n### debugHeaders?\n\n```ts\noptional debugHeaders: boolean;\n```\n\n### debugRows?\n\n```ts\noptional debugRows: boolean;\n```\n\n### debugTable?\n\n```ts\noptional debugTable: boolean;\n```\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n"
  },
  {
    "path": "docs/reference/type-aliases/DeepKeys.md",
    "content": "---\nid: DeepKeys\ntitle: DeepKeys\n---\n\n# Type Alias: DeepKeys\\<T, TDepth\\>\n\n```ts\ntype DeepKeys<T, TDepth> = TDepth[\"length\"] extends 5 ? never : unknown extends T ? string : T extends ReadonlyArray<any> & IsTuple<T> ? \n  | AllowedIndexes<T>\n  | DeepKeysPrefix<T, AllowedIndexes<T>, TDepth> : T extends any[] ? DeepKeys<T[number], [...TDepth, any]> : T extends Date ? never : T extends object ? keyof T & string | DeepKeysPrefix<T, keyof T, TDepth> : never;\n```\n\nDefined in: [types/type-utils.ts:46](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/type-utils.ts#L46)\n\n## Type Parameters\n\n### T\n\n`T`\n\n### TDepth\n\n`TDepth` *extends* `any`[] = \\[\\]\n"
  },
  {
    "path": "docs/reference/type-aliases/DeepValue.md",
    "content": "---\nid: DeepValue\ntitle: DeepValue\n---\n\n# Type Alias: DeepValue\\<T, TProp\\>\n\n```ts\ntype DeepValue<T, TProp> = T extends Record<string | number, any> ? TProp extends `${infer TBranch}.${infer TDeepProp}` ? DeepValue<T[TBranch], TDeepProp> : T[TProp & string] : never;\n```\n\nDefined in: [types/type-utils.ts:71](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/type-utils.ts#L71)\n\n## Type Parameters\n\n### T\n\n`T`\n\n### TProp\n\n`TProp`\n"
  },
  {
    "path": "docs/reference/type-aliases/DisplayColumnDef.md",
    "content": "---\nid: DisplayColumnDef\ntitle: DisplayColumnDef\n---\n\n# Type Alias: DisplayColumnDef\\<TFeatures, TData, TValue\\>\n\n```ts\ntype DisplayColumnDef<TFeatures, TData, TValue> = ColumnDefBase<TFeatures, TData, TValue> & ColumnIdentifiers<TFeatures, TData, TValue>;\n```\n\nDefined in: [types/ColumnDef.ts:142](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L142)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](RowData.md)\n\n### TValue\n\n`TValue` *extends* [`CellData`](CellData.md) = [`CellData`](CellData.md)\n"
  },
  {
    "path": "docs/reference/type-aliases/ExpandedState.md",
    "content": "---\nid: ExpandedState\ntitle: ExpandedState\n---\n\n# Type Alias: ExpandedState\n\n```ts\ntype ExpandedState = true | Record<string, boolean>;\n```\n\nDefined in: [features/row-expanding/rowExpandingFeature.types.ts:8](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L8)\n"
  },
  {
    "path": "docs/reference/type-aliases/ExpandedStateList.md",
    "content": "---\nid: ExpandedStateList\ntitle: ExpandedStateList\n---\n\n# Type Alias: ExpandedStateList\n\n```ts\ntype ExpandedStateList = Record<string, boolean>;\n```\n\nDefined in: [features/row-expanding/rowExpandingFeature.types.ts:7](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L7)\n"
  },
  {
    "path": "docs/reference/type-aliases/ExtractFeatureTypes.md",
    "content": "---\nid: ExtractFeatureTypes\ntitle: ExtractFeatureTypes\n---\n\n# Type Alias: ExtractFeatureTypes\\<TKey, TFeatures\\>\n\n```ts\ntype ExtractFeatureTypes<TKey, TFeatures> = UnionToIntersection<{ [K in keyof TFeatures]: TFeatures[K] extends TableFeature<infer FeatureConstructorOptions> ? TKey extends keyof FeatureConstructorOptions ? FeatureConstructorOptions[TKey] : never : any }[keyof TFeatures]>;\n```\n\nDefined in: [types/TableFeatures.ts:10](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableFeatures.ts#L10)\n\n## Type Parameters\n\n### TKey\n\n`TKey` *extends* keyof `FeatureConstructors`\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n"
  },
  {
    "path": "docs/reference/type-aliases/FilterFnOption.md",
    "content": "---\nid: FilterFnOption\ntitle: FilterFnOption\n---\n\n# Type Alias: FilterFnOption\\<TFeatures, TData\\>\n\n```ts\ntype FilterFnOption<TFeatures, TData> = \n  | \"auto\"\n  | BuiltInFilterFn\n  | keyof FilterFns\n| FilterFn<TFeatures, TData>;\n```\n\nDefined in: [features/column-filtering/columnFilteringFeature.types.ts:76](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L76)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](RowData.md)\n"
  },
  {
    "path": "docs/reference/type-aliases/GetDefaultColumnDef.md",
    "content": "---\nid: GetDefaultColumnDef\ntitle: GetDefaultColumnDef\n---\n\n# Type Alias: GetDefaultColumnDef()\\<TConstructors\\>\n\n```ts\ntype GetDefaultColumnDef<TConstructors> = <TFeatures, TData, TValue>() => ColumnDefBase_All<TFeatures, TData, TValue> & Partial<TConstructors[\"ColumnDef\"]>;\n```\n\nDefined in: [types/TableFeatures.ts:55](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableFeatures.ts#L55)\n\n## Type Parameters\n\n### TConstructors\n\n`TConstructors` *extends* `FeatureConstructors`\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](RowData.md)\n\n### TValue\n\n`TValue` *extends* [`CellData`](CellData.md) = [`CellData`](CellData.md)\n\n## Returns\n\n[`ColumnDefBase_All`](ColumnDefBase_All.md)\\<`TFeatures`, `TData`, `TValue`\\> & `Partial`\\<`TConstructors`\\[`\"ColumnDef\"`\\]\\>\n"
  },
  {
    "path": "docs/reference/type-aliases/GetDefaultStateSelector.md",
    "content": "---\nid: GetDefaultStateSelector\ntitle: GetDefaultStateSelector\n---\n\n# Type Alias: GetDefaultStateSelector()\\<TConstructors\\>\n\n```ts\ntype GetDefaultStateSelector<TConstructors> = (state) => Partial<TableState_All> & Partial<TConstructors[\"TableState\"]>;\n```\n\nDefined in: [types/TableFeatures.ts:72](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableFeatures.ts#L72)\n\n## Type Parameters\n\n### TConstructors\n\n`TConstructors` *extends* `FeatureConstructors`\n\n## Parameters\n\n### state\n\n[`TableState_All`](TableState_All.md)\n\n## Returns\n\n`Partial`\\<[`TableState_All`](TableState_All.md)\\> & `Partial`\\<`TConstructors`\\[`\"TableState\"`\\]\\>\n"
  },
  {
    "path": "docs/reference/type-aliases/GetDefaultTableOptions.md",
    "content": "---\nid: GetDefaultTableOptions\ntitle: GetDefaultTableOptions\n---\n\n# Type Alias: GetDefaultTableOptions()\\<TConstructors\\>\n\n```ts\ntype GetDefaultTableOptions<TConstructors> = <TFeatures, TData>(table) => Partial<TableOptions_All<TFeatures, TData>> & Partial<TConstructors[\"TableOptions\"]>;\n```\n\nDefined in: [types/TableFeatures.ts:62](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableFeatures.ts#L62)\n\n## Type Parameters\n\n### TConstructors\n\n`TConstructors` *extends* `FeatureConstructors`\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](RowData.md)\n\n## Parameters\n\n### table\n\n[`Table_Internal`](Table_Internal.md)\\<`TFeatures`, `TData`\\> & `Partial`\\<`TConstructors`\\[`\"Table\"`\\]\\>\n\n## Returns\n\n`Partial`\\<[`TableOptions_All`](TableOptions_All.md)\\<`TFeatures`, `TData`\\>\\> & `Partial`\\<`TConstructors`\\[`\"TableOptions\"`\\]\\>\n"
  },
  {
    "path": "docs/reference/type-aliases/GetInitialState.md",
    "content": "---\nid: GetInitialState\ntitle: GetInitialState\n---\n\n# Type Alias: GetInitialState()\\<TConstructors\\>\n\n```ts\ntype GetInitialState<TConstructors> = (initialState) => TableState_All & Partial<TConstructors[\"TableState\"]>;\n```\n\nDefined in: [types/TableFeatures.ts:68](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableFeatures.ts#L68)\n\n## Type Parameters\n\n### TConstructors\n\n`TConstructors` *extends* `FeatureConstructors`\n\n## Parameters\n\n### initialState\n\n`Partial`\\<[`TableState_All`](TableState_All.md)\\> & `Partial`\\<`TConstructors`\\[`\"TableState\"`\\]\\>\n\n## Returns\n\n[`TableState_All`](TableState_All.md) & `Partial`\\<`TConstructors`\\[`\"TableState\"`\\]\\>\n"
  },
  {
    "path": "docs/reference/type-aliases/Getter.md",
    "content": "---\nid: Getter\ntitle: Getter\n---\n\n# Type Alias: Getter()\\<TValue\\>\n\n```ts\ntype Getter<TValue> = <TTValue>() => NoInfer<TTValue>;\n```\n\nDefined in: [types/type-utils.ts:80](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/type-utils.ts#L80)\n\n## Type Parameters\n\n### TValue\n\n`TValue`\n\n## Type Parameters\n\n### TTValue\n\n`TTValue` = `TValue`\n\n## Returns\n\n[`NoInfer`](NoInfer.md)\\<`TTValue`\\>\n"
  },
  {
    "path": "docs/reference/type-aliases/GroupColumnDef.md",
    "content": "---\nid: GroupColumnDef\ntitle: GroupColumnDef\n---\n\n# Type Alias: GroupColumnDef\\<TFeatures, TData, TValue\\>\n\n```ts\ntype GroupColumnDef<TFeatures, TData, TValue> = GroupColumnDefBase<TFeatures, TData, TValue> & ColumnIdentifiers<TFeatures, TData, TValue>;\n```\n\nDefined in: [types/ColumnDef.ts:156](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L156)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](RowData.md)\n\n### TValue\n\n`TValue` *extends* [`CellData`](CellData.md) = [`CellData`](CellData.md)\n"
  },
  {
    "path": "docs/reference/type-aliases/GroupingColumnMode.md",
    "content": "---\nid: GroupingColumnMode\ntitle: GroupingColumnMode\n---\n\n# Type Alias: GroupingColumnMode\n\n```ts\ntype GroupingColumnMode = false | \"reorder\" | \"remove\";\n```\n\nDefined in: [features/column-grouping/columnGroupingFeature.types.ts:171](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L171)\n"
  },
  {
    "path": "docs/reference/type-aliases/GroupingState.md",
    "content": "---\nid: GroupingState\ntitle: GroupingState\n---\n\n# Type Alias: GroupingState\n\n```ts\ntype GroupingState = string[];\n```\n\nDefined in: [features/column-grouping/columnGroupingFeature.types.ts:15](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L15)\n"
  },
  {
    "path": "docs/reference/type-aliases/Header.md",
    "content": "---\nid: Header\ntitle: Header\n---\n\n# Type Alias: Header\\<TFeatures, TData, TValue\\>\n\n```ts\ntype Header<TFeatures, TData, TValue> = Header_Core<TFeatures, TData, TValue> & UnionToIntersection<\n  | \"columnSizingFeature\" extends keyof TFeatures ? Header_ColumnSizing : never\n| \"columnResizingFeature\" extends keyof TFeatures ? Header_ColumnResizing : never> & ExtractFeatureTypes<\"Header\", TFeatures> & Header_Plugins<TFeatures, TData, TValue>;\n```\n\nDefined in: [types/Header.ts:23](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/Header.ts#L23)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](RowData.md)\n\n### TValue\n\n`TValue` *extends* [`CellData`](CellData.md) = [`CellData`](CellData.md)\n"
  },
  {
    "path": "docs/reference/type-aliases/HeaderGroup.md",
    "content": "---\nid: HeaderGroup\ntitle: HeaderGroup\n---\n\n# Type Alias: HeaderGroup\\<TFeatures, TData\\>\n\n```ts\ntype HeaderGroup<TFeatures, TData> = HeaderGroup_Core<TFeatures, TData> & ExtractFeatureTypes<\"HeaderGroup\", TFeatures> & HeaderGroup_Plugins<TFeatures, TData>;\n```\n\nDefined in: [types/HeaderGroup.ts:19](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/HeaderGroup.ts#L19)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](RowData.md)\n"
  },
  {
    "path": "docs/reference/type-aliases/IdentifiedColumnDef.md",
    "content": "---\nid: IdentifiedColumnDef\ntitle: IdentifiedColumnDef\n---\n\n# Type Alias: IdentifiedColumnDef\\<TFeatures, TData, TValue\\>\n\n```ts\ntype IdentifiedColumnDef<TFeatures, TData, TValue> = ColumnDefBase<TFeatures, TData, TValue> & object;\n```\n\nDefined in: [types/ColumnDef.ts:133](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L133)\n\n## Type Declaration\n\n### header?\n\n```ts\noptional header: StringOrTemplateHeader<TFeatures, TData, TValue>;\n```\n\n### id?\n\n```ts\noptional id: string;\n```\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](RowData.md)\n\n### TValue\n\n`TValue` *extends* [`CellData`](CellData.md) = [`CellData`](CellData.md)\n"
  },
  {
    "path": "docs/reference/type-aliases/InitRowInstanceData.md",
    "content": "---\nid: InitRowInstanceData\ntitle: InitRowInstanceData\n---\n\n# Type Alias: InitRowInstanceData()\\<TConstructors\\>\n\n```ts\ntype InitRowInstanceData<TConstructors> = <TFeatures, TData>(row) => void;\n```\n\nDefined in: [types/TableFeatures.ts:109](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableFeatures.ts#L109)\n\n## Type Parameters\n\n### TConstructors\n\n`TConstructors` *extends* `FeatureConstructors`\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](RowData.md)\n\n## Parameters\n\n### row\n\n[`Row`](Row.md)\\<`TFeatures`, `TData`\\> & `Partial`\\<`TConstructors`\\[`\"Row\"`\\]\\>\n\n## Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/type-aliases/MemoFnMeta.md",
    "content": "---\nid: MemoFnMeta\ntitle: MemoFnMeta\n---\n\n# Type Alias: MemoFnMeta\n\n```ts\ntype MemoFnMeta = object;\n```\n\nDefined in: [utils.ts:62](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L62)\n\n## Properties\n\n### originalArgsLength?\n\n```ts\noptional originalArgsLength: number;\n```\n\nDefined in: [utils.ts:62](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L62)\n"
  },
  {
    "path": "docs/reference/type-aliases/NoInfer.md",
    "content": "---\nid: NoInfer\ntitle: NoInfer\n---\n\n# Type Alias: NoInfer\\<T\\>\n\n```ts\ntype NoInfer<T> = [T][T extends any ? 0 : never];\n```\n\nDefined in: [types/type-utils.ts:78](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/type-utils.ts#L78)\n\n## Type Parameters\n\n### T\n\n`T`\n"
  },
  {
    "path": "docs/reference/type-aliases/OnChangeFn.md",
    "content": "---\nid: OnChangeFn\ntitle: OnChangeFn\n---\n\n# Type Alias: OnChangeFn()\\<T\\>\n\n```ts\ntype OnChangeFn<T> = (updaterOrValue) => void;\n```\n\nDefined in: [types/type-utils.ts:3](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/type-utils.ts#L3)\n\n## Type Parameters\n\n### T\n\n`T`\n\n## Parameters\n\n### updaterOrValue\n\n[`Updater`](Updater.md)\\<`T`\\>\n\n## Returns\n\n`void`\n"
  },
  {
    "path": "docs/reference/type-aliases/PartialKeys.md",
    "content": "---\nid: PartialKeys\ntitle: PartialKeys\n---\n\n# Type Alias: PartialKeys\\<T, K\\>\n\n```ts\ntype PartialKeys<T, K> = Omit<T, K> & Partial<Pick<T, K>>;\n```\n\nDefined in: [types/type-utils.ts:9](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/type-utils.ts#L9)\n\n## Type Parameters\n\n### T\n\n`T`\n\n### K\n\n`K` *extends* keyof `T`\n"
  },
  {
    "path": "docs/reference/type-aliases/Prettify.md",
    "content": "---\nid: Prettify\ntitle: Prettify\n---\n\n# Type Alias: Prettify\\<T\\>\n\n```ts\ntype Prettify<T> = { [K in keyof T]: T[K] } & unknown;\n```\n\nDefined in: [types/type-utils.ts:82](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/type-utils.ts#L82)\n\n## Type Parameters\n\n### T\n\n`T`\n"
  },
  {
    "path": "docs/reference/type-aliases/PrototypeAPIObject.md",
    "content": "---\nid: PrototypeAPIObject\ntitle: PrototypeAPIObject\n---\n\n# Type Alias: PrototypeAPIObject\\<TDeps, TDepArgs\\>\n\n```ts\ntype PrototypeAPIObject<TDeps, TDepArgs> = Record<string, PrototypeAPI<TDeps, TDepArgs>>;\n```\n\nDefined in: [utils.ts:327](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L327)\n\n## Type Parameters\n\n### TDeps\n\n`TDeps` *extends* `ReadonlyArray`\\<`any`\\>\n\n### TDepArgs\n\n`TDepArgs`\n"
  },
  {
    "path": "docs/reference/type-aliases/RequiredKeys.md",
    "content": "---\nid: RequiredKeys\ntitle: RequiredKeys\n---\n\n# Type Alias: RequiredKeys\\<T, K\\>\n\n```ts\ntype RequiredKeys<T, K> = Omit<T, K> & Required<Pick<T, K>>;\n```\n\nDefined in: [types/type-utils.ts:11](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/type-utils.ts#L11)\n\n## Type Parameters\n\n### T\n\n`T`\n\n### K\n\n`K` *extends* keyof `T`\n"
  },
  {
    "path": "docs/reference/type-aliases/Row.md",
    "content": "---\nid: Row\ntitle: Row\n---\n\n# Type Alias: Row\\<TFeatures, TData\\>\n\n```ts\ntype Row<TFeatures, TData> = Row_Core<TFeatures, TData> & UnionToIntersection<\n  | \"columnFilteringFeature\" extends keyof TFeatures ? Row_ColumnFiltering<TFeatures, TData> : never\n  | \"columnGroupingFeature\" extends keyof TFeatures ? Row_ColumnGrouping : never\n  | \"columnPinningFeature\" extends keyof TFeatures ? Row_ColumnPinning<TFeatures, TData> : never\n  | \"columnVisibilityFeature\" extends keyof TFeatures ? Row_ColumnVisibility<TFeatures, TData> : never\n  | \"rowExpandingFeature\" extends keyof TFeatures ? Row_RowExpanding : never\n  | \"rowPinningFeature\" extends keyof TFeatures ? Row_RowPinning : never\n| \"rowSelectionFeature\" extends keyof TFeatures ? Row_RowSelection : never> & ExtractFeatureTypes<\"Row\", TFeatures> & Row_Plugins<TFeatures, TData>;\n```\n\nDefined in: [types/Row.ts:26](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/Row.ts#L26)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](RowData.md)\n"
  },
  {
    "path": "docs/reference/type-aliases/RowData.md",
    "content": "---\nid: RowData\ntitle: RowData\n---\n\n# Type Alias: RowData\n\n```ts\ntype RowData = Record<string, any> | any[];\n```\n\nDefined in: [types/type-utils.ts:5](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/type-utils.ts#L5)\n"
  },
  {
    "path": "docs/reference/type-aliases/RowModelFns.md",
    "content": "---\nid: RowModelFns\ntitle: RowModelFns\n---\n\n# Type Alias: RowModelFns\\<TFeatures, TData\\>\n\n```ts\ntype RowModelFns<TFeatures, TData> = Partial<UnionToIntersection<\n  | \"columnFilteringFeature\" extends keyof TFeatures ? RowModelFns_ColumnFiltering<TFeatures, TData> : never\n  | \"columnGroupingFeature\" extends keyof TFeatures ? RowModelFns_ColumnGrouping<TFeatures, TData> : never\n| \"rowSortingFeature\" extends keyof TFeatures ? RowModelFns_RowSorting<TFeatures, TData> : never> & ExtractFeatureTypes<\"RowModelFns\", TFeatures> & RowModelFns_Plugins<TFeatures, TData>>;\n```\n\nDefined in: [types/RowModelFns.ts:18](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/RowModelFns.ts#L18)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](RowData.md)\n"
  },
  {
    "path": "docs/reference/type-aliases/RowModelFns_All.md",
    "content": "---\nid: RowModelFns_All\ntitle: RowModelFns_All\n---\n\n# Type Alias: RowModelFns\\_All\\<TFeatures, TData\\>\n\n```ts\ntype RowModelFns_All<TFeatures, TData> = Partial<RowModelFns_ColumnFiltering<TFeatures, TData> & RowModelFns_ColumnGrouping<TFeatures, TData> & RowModelFns_RowSorting<TFeatures, TData>>;\n```\n\nDefined in: [types/RowModelFns.ts:44](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/RowModelFns.ts#L44)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](RowData.md)\n"
  },
  {
    "path": "docs/reference/type-aliases/RowPinningPosition.md",
    "content": "---\nid: RowPinningPosition\ntitle: RowPinningPosition\n---\n\n# Type Alias: RowPinningPosition\n\n```ts\ntype RowPinningPosition = false | \"top\" | \"bottom\";\n```\n\nDefined in: [features/row-pinning/rowPinningFeature.types.ts:5](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L5)\n"
  },
  {
    "path": "docs/reference/type-aliases/RowSelectionState.md",
    "content": "---\nid: RowSelectionState\ntitle: RowSelectionState\n---\n\n# Type Alias: RowSelectionState\n\n```ts\ntype RowSelectionState = Record<string, boolean>;\n```\n\nDefined in: [features/row-selection/rowSelectionFeature.types.ts:6](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L6)\n"
  },
  {
    "path": "docs/reference/type-aliases/SortDirection.md",
    "content": "---\nid: SortDirection\ntitle: SortDirection\n---\n\n# Type Alias: SortDirection\n\n```ts\ntype SortDirection = \"asc\" | \"desc\";\n```\n\nDefined in: [features/row-sorting/rowSortingFeature.types.ts:8](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L8)\n"
  },
  {
    "path": "docs/reference/type-aliases/SortFnOption.md",
    "content": "---\nid: SortFnOption\ntitle: SortFnOption\n---\n\n# Type Alias: SortFnOption\\<TFeatures, TData\\>\n\n```ts\ntype SortFnOption<TFeatures, TData> = \n  | \"auto\"\n  | keyof SortFns\n  | BuiltInSortFn\n| SortFn<TFeatures, TData>;\n```\n\nDefined in: [features/row-sorting/rowSortingFeature.types.ts:46](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L46)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](RowData.md)\n"
  },
  {
    "path": "docs/reference/type-aliases/SortingState.md",
    "content": "---\nid: SortingState\ntitle: SortingState\n---\n\n# Type Alias: SortingState\n\n```ts\ntype SortingState = ColumnSort[];\n```\n\nDefined in: [features/row-sorting/rowSortingFeature.types.ts:15](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L15)\n"
  },
  {
    "path": "docs/reference/type-aliases/StringOrTemplateHeader.md",
    "content": "---\nid: StringOrTemplateHeader\ntitle: StringOrTemplateHeader\n---\n\n# Type Alias: StringOrTemplateHeader\\<TFeatures, TData, TValue\\>\n\n```ts\ntype StringOrTemplateHeader<TFeatures, TData, TValue> = \n  | string\n| ColumnDefTemplate<HeaderContext<TFeatures, TData, TValue>>;\n```\n\nDefined in: [types/ColumnDef.ts:39](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L39)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](RowData.md)\n\n### TValue\n\n`TValue` *extends* [`CellData`](CellData.md) = [`CellData`](CellData.md)\n"
  },
  {
    "path": "docs/reference/type-aliases/Table.md",
    "content": "---\nid: Table\ntitle: Table\n---\n\n# Type Alias: Table\\<TFeatures, TData\\>\n\n```ts\ntype Table<TFeatures, TData> = Table_Core<TFeatures, TData> & UnionToIntersection<\n  | \"columnFilteringFeature\" extends keyof TFeatures ? Table_ColumnFiltering : never\n  | \"columnGroupingFeature\" extends keyof TFeatures ? Table_ColumnGrouping<TFeatures, TData> : never\n  | \"columnOrderingFeature\" extends keyof TFeatures ? Table_ColumnOrdering<TFeatures, TData> : never\n  | \"columnPinningFeature\" extends keyof TFeatures ? Table_ColumnPinning<TFeatures, TData> : never\n  | \"columnResizingFeature\" extends keyof TFeatures ? Table_ColumnResizing : never\n  | \"columnSizingFeature\" extends keyof TFeatures ? Table_ColumnSizing : never\n  | \"columnVisibilityFeature\" extends keyof TFeatures ? Table_ColumnVisibility<TFeatures, TData> : never\n  | \"columnFacetingFeature\" extends keyof TFeatures ? Table_ColumnFaceting<TFeatures, TData> : never\n  | \"globalFilteringFeature\" extends keyof TFeatures ? Table_GlobalFiltering<TFeatures, TData> : never\n  | \"rowExpandingFeature\" extends keyof TFeatures ? Table_RowExpanding<TFeatures, TData> : never\n  | \"rowPaginationFeature\" extends keyof TFeatures ? Table_RowPagination<TFeatures, TData> : never\n  | \"rowPinningFeature\" extends keyof TFeatures ? Table_RowPinning<TFeatures, TData> : never\n  | \"rowSelectionFeature\" extends keyof TFeatures ? Table_RowSelection<TFeatures, TData> : never\n| \"rowSortingFeature\" extends keyof TFeatures ? Table_RowSorting<TFeatures, TData> : never> & ExtractFeatureTypes<\"Table\", TFeatures> & Table_Plugins<TFeatures, TData>;\n```\n\nDefined in: [types/Table.ts:53](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/Table.ts#L53)\n\nThe table object that includes both the core table functionality and the features that are enabled via the `_features` table option.\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](RowData.md)\n"
  },
  {
    "path": "docs/reference/type-aliases/TableHelperOptions.md",
    "content": "---\nid: TableHelperOptions\ntitle: TableHelperOptions\n---\n\n# Type Alias: TableHelperOptions\\<TFeatures\\>\n\n```ts\ntype TableHelperOptions<TFeatures> = Omit<TableOptions<TFeatures, any>, \"columns\" | \"data\" | \"store\" | \"state\" | \"initialState\"> & object;\n```\n\nDefined in: [helpers/tableHelper.ts:12](https://github.com/TanStack/table/blob/main/packages/table-core/src/helpers/tableHelper.ts#L12)\n\nOptions for creating a table helper to share common options across multiple tables\ncoreColumnsFeature, data, and state are excluded from this type and reserved for only the `useTable`/`createTable` functions\n\n## Type Declaration\n\n### \\_features\n\n```ts\n_features: TFeatures;\n```\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n"
  },
  {
    "path": "docs/reference/type-aliases/TableHelper_Core.md",
    "content": "---\nid: TableHelper_Core\ntitle: TableHelper_Core\n---\n\n# Type Alias: TableHelper\\_Core\\<TFeatures\\>\n\n```ts\ntype TableHelper_Core<TFeatures> = object;\n```\n\nDefined in: [helpers/tableHelper.ts:22](https://github.com/TanStack/table/blob/main/packages/table-core/src/helpers/tableHelper.ts#L22)\n\nInternal type that each adapter package will build off of to create a table helper\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n## Properties\n\n### createColumnHelper()\n\n```ts\ncreateColumnHelper: <TData>() => ColumnHelper<TFeatures, TData>;\n```\n\nDefined in: [helpers/tableHelper.ts:23](https://github.com/TanStack/table/blob/main/packages/table-core/src/helpers/tableHelper.ts#L23)\n\n#### Type Parameters\n\n##### TData\n\n`TData` *extends* [`RowData`](RowData.md)\n\n#### Returns\n\n[`ColumnHelper`](ColumnHelper.md)\\<`TFeatures`, `TData`\\>\n\n***\n\n### features\n\n```ts\nfeatures: TFeatures;\n```\n\nDefined in: [helpers/tableHelper.ts:27](https://github.com/TanStack/table/blob/main/packages/table-core/src/helpers/tableHelper.ts#L27)\n\n***\n\n### options\n\n```ts\noptions: Omit<TableOptions<TFeatures, any>, \"columns\" | \"data\" | \"store\" | \"state\" | \"initialState\">;\n```\n\nDefined in: [helpers/tableHelper.ts:28](https://github.com/TanStack/table/blob/main/packages/table-core/src/helpers/tableHelper.ts#L28)\n\n***\n\n### tableCreator()\n\n```ts\ntableCreator: <TData>(tableOptions, selector?) => Table<TFeatures, TData>;\n```\n\nDefined in: [helpers/tableHelper.ts:32](https://github.com/TanStack/table/blob/main/packages/table-core/src/helpers/tableHelper.ts#L32)\n\n#### Type Parameters\n\n##### TData\n\n`TData` *extends* [`RowData`](RowData.md)\n\n#### Parameters\n\n##### tableOptions\n\n`Omit`\\<[`TableOptions`](TableOptions.md)\\<`TFeatures`, `TData`\\>, `\"_features\"` \\| `\"_rowModels\"`\\>\n\n##### selector?\n\n`any`\n\n#### Returns\n\n[`Table`](Table.md)\\<`TFeatures`, `TData`\\>\n"
  },
  {
    "path": "docs/reference/type-aliases/TableOptions.md",
    "content": "---\nid: TableOptions\ntitle: TableOptions\n---\n\n# Type Alias: TableOptions\\<TFeatures, TData\\>\n\n```ts\ntype TableOptions<TFeatures, TData> = TableOptions_Core<TFeatures, TData> & UnionToIntersection<\n  | \"columnFilteringFeature\" extends keyof TFeatures ? TableOptions_ColumnFiltering<TFeatures, TData> : never\n  | \"columnGroupingFeature\" extends keyof TFeatures ? TableOptions_ColumnGrouping : never\n  | \"columnOrderingFeature\" extends keyof TFeatures ? TableOptions_ColumnOrdering : never\n  | \"columnPinningFeature\" extends keyof TFeatures ? TableOptions_ColumnPinning : never\n  | \"columnResizingFeature\" extends keyof TFeatures ? TableOptions_ColumnResizing : never\n  | \"columnSizingFeature\" extends keyof TFeatures ? TableOptions_ColumnSizing : never\n  | \"columnVisibilityFeature\" extends keyof TFeatures ? TableOptions_ColumnVisibility : never\n  | \"globalFilteringFeature\" extends keyof TFeatures ? TableOptions_GlobalFiltering<TFeatures, TData> : never\n  | \"rowExpandingFeature\" extends keyof TFeatures ? TableOptions_RowExpanding<TFeatures, TData> : never\n  | \"rowPaginationFeature\" extends keyof TFeatures ? TableOptions_RowPagination : never\n  | \"rowPinningFeature\" extends keyof TFeatures ? TableOptions_RowPinning<TFeatures, TData> : never\n  | \"rowSelectionFeature\" extends keyof TFeatures ? TableOptions_RowSelection<TFeatures, TData> : never\n| \"rowSortingFeature\" extends keyof TFeatures ? TableOptions_RowSorting : never> & ExtractFeatureTypes<\"TableOptions\", TFeatures> & TableOptions_Plugins<TFeatures, TData> & DebugOptions<TFeatures>;\n```\n\nDefined in: [types/TableOptions.ts:51](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableOptions.ts#L51)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](RowData.md)\n"
  },
  {
    "path": "docs/reference/type-aliases/TableOptions_All.md",
    "content": "---\nid: TableOptions_All\ntitle: TableOptions_All\n---\n\n# Type Alias: TableOptions\\_All\\<TFeatures, TData\\>\n\n```ts\ntype TableOptions_All<TFeatures, TData> = TableOptions_Core<TFeatures, TData> & Partial<TableOptions_ColumnFiltering<TFeatures, TData> & TableOptions_ColumnGrouping & TableOptions_ColumnOrdering & TableOptions_ColumnPinning & TableOptions_ColumnResizing & TableOptions_ColumnSizing & TableOptions_ColumnVisibility & TableOptions_GlobalFiltering<TFeatures, TData> & TableOptions_RowExpanding<TFeatures, TData> & TableOptions_RowPagination & TableOptions_RowPinning<TFeatures, TData> & TableOptions_RowSelection<TFeatures, TData> & TableOptions_RowSorting>;\n```\n\nDefined in: [types/TableOptions.ts:107](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableOptions.ts#L107)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](RowData.md)\n"
  },
  {
    "path": "docs/reference/type-aliases/TableState.md",
    "content": "---\nid: TableState\ntitle: TableState\n---\n\n# Type Alias: TableState\\<TFeatures\\>\n\n```ts\ntype TableState<TFeatures> = UnionToIntersection<\n  | \"columnFilteringFeature\" extends keyof TFeatures ? TableState_ColumnFiltering : never\n  | \"columnGroupingFeature\" extends keyof TFeatures ? TableState_ColumnGrouping : never\n  | \"columnOrderingFeature\" extends keyof TFeatures ? TableState_ColumnOrdering : never\n  | \"columnPinningFeature\" extends keyof TFeatures ? TableState_ColumnPinning : never\n  | \"columnResizingFeature\" extends keyof TFeatures ? TableState_ColumnResizing : never\n  | \"columnSizingFeature\" extends keyof TFeatures ? TableState_ColumnSizing : never\n  | \"columnVisibilityFeature\" extends keyof TFeatures ? TableState_ColumnVisibility : never\n  | \"globalFilteringFeature\" extends keyof TFeatures ? TableState_GlobalFiltering : never\n  | \"rowExpandingFeature\" extends keyof TFeatures ? TableState_RowExpanding : never\n  | \"rowPaginationFeature\" extends keyof TFeatures ? TableState_RowPagination : never\n  | \"rowPinningFeature\" extends keyof TFeatures ? TableState_RowPinning : never\n  | \"rowSelectionFeature\" extends keyof TFeatures ? TableState_RowSelection : never\n| \"rowSortingFeature\" extends keyof TFeatures ? TableState_RowSorting : never> & ExtractFeatureTypes<\"TableState\", TFeatures> & TableState_Plugins<TFeatures>;\n```\n\nDefined in: [types/TableState.ts:23](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableState.ts#L23)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n"
  },
  {
    "path": "docs/reference/type-aliases/TableState_All.md",
    "content": "---\nid: TableState_All\ntitle: TableState_All\n---\n\n# Type Alias: TableState\\_All\n\n```ts\ntype TableState_All = Partial<TableState_ColumnFiltering & TableState_ColumnGrouping & TableState_ColumnOrdering & TableState_ColumnPinning & TableState_ColumnResizing & TableState_ColumnSizing & TableState_ColumnVisibility & TableState_GlobalFiltering & TableState_RowExpanding & TableState_RowPagination & TableState_RowPinning & TableState_RowSelection & TableState_RowSorting>;\n```\n\nDefined in: [types/TableState.ts:74](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableState.ts#L74)\n"
  },
  {
    "path": "docs/reference/type-aliases/Table_Core.md",
    "content": "---\nid: Table_Core\ntitle: Table_Core\n---\n\n# Type Alias: Table\\_Core\\<TFeatures, TData\\>\n\n```ts\ntype Table_Core<TFeatures, TData> = Table_Table<TFeatures, TData> & Table_Columns<TFeatures, TData> & Table_Rows<TFeatures, TData> & Table_RowModels<TFeatures, TData> & Table_Headers<TFeatures, TData>;\n```\n\nDefined in: [types/Table.ts:41](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/Table.ts#L41)\n\nThe core table object that only includes the core table functionality such as column, header, row, and table APIS.\nNo features are included.\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](RowData.md)\n"
  },
  {
    "path": "docs/reference/type-aliases/Table_Internal.md",
    "content": "---\nid: Table_Internal\ntitle: Table_Internal\n---\n\n# Type Alias: Table\\_Internal\\<TFeatures, TData\\>\n\n```ts\ntype Table_Internal<TFeatures, TData> = Table<TFeatures, TData> & object;\n```\n\nDefined in: [types/Table.ts:111](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/Table.ts#L111)\n\n## Type Declaration\n\n### \\_rowModelFns\n\n```ts\n_rowModelFns: RowModelFns_All<TFeatures, TData>;\n```\n\n### \\_rowModels\n\n```ts\n_rowModels: CachedRowModel_All<TFeatures, TData>;\n```\n\n### baseStore\n\n```ts\nbaseStore: Store<TableState_All>;\n```\n\n### initialState\n\n```ts\ninitialState: TableState_All;\n```\n\n### options\n\n```ts\noptions: TableOptions_All<TFeatures, TData> & object;\n```\n\n#### Type Declaration\n\n##### \\_rowModels?\n\n```ts\noptional _rowModels: CreateRowModels_All<TFeatures, TData>;\n```\n\n##### initialState?\n\n```ts\noptional initialState: TableState_All;\n```\n\n##### state?\n\n```ts\noptional state: TableState_All;\n```\n\n### store\n\n```ts\nstore: ReadonlyStore<TableState_All>;\n```\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](RowData.md) = `any`\n"
  },
  {
    "path": "docs/reference/type-aliases/Table_RowModels.md",
    "content": "---\nid: Table_RowModels\ntitle: Table_RowModels\n---\n\n# Type Alias: Table\\_RowModels\\<TFeatures, TData\\>\n\n```ts\ntype Table_RowModels<TFeatures, TData> = Table_RowModels_Core<TFeatures, TData> & Table_RowModels_Faceted<TFeatures, TData> & Table_RowModels_Filtered<TFeatures, TData> & Table_RowModels_Grouped<TFeatures, TData> & Table_RowModels_Expanded<TFeatures, TData> & Table_RowModels_Paginated<TFeatures, TData> & Table_RowModels_Sorted<TFeatures, TData>;\n```\n\nDefined in: [core/row-models/coreRowModelsFeature.types.ts:58](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.types.ts#L58)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](RowData.md)\n"
  },
  {
    "path": "docs/reference/type-aliases/TransformFilterValueFn.md",
    "content": "---\nid: TransformFilterValueFn\ntitle: TransformFilterValueFn\n---\n\n# Type Alias: TransformFilterValueFn()\\<TFeatures, TData, TValue\\>\n\n```ts\ntype TransformFilterValueFn<TFeatures, TData, TValue> = (value, column?) => TValue;\n```\n\nDefined in: [features/column-filtering/columnFilteringFeature.types.ts:59](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L59)\n\n## Type Parameters\n\n### TFeatures\n\n`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md)\n\n### TData\n\n`TData` *extends* [`RowData`](RowData.md)\n\n### TValue\n\n`TValue` *extends* [`CellData`](CellData.md) = [`CellData`](CellData.md)\n\n## Parameters\n\n### value\n\n`any`\n\n### column?\n\n[`Column`](Column.md)\\<`TFeatures`, `TData`, `TValue`\\>\n\n## Returns\n\n`TValue`\n"
  },
  {
    "path": "docs/reference/type-aliases/UnionToIntersection.md",
    "content": "---\nid: UnionToIntersection\ntitle: UnionToIntersection\n---\n\n# Type Alias: UnionToIntersection\\<T\\>\n\n```ts\ntype UnionToIntersection<T> = T extends any ? (x) => any : never extends (x) => any ? R : never;\n```\n\nDefined in: [types/type-utils.ts:14](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/type-utils.ts#L14)\n\n## Type Parameters\n\n### T\n\n`T`\n"
  },
  {
    "path": "docs/reference/type-aliases/Updater.md",
    "content": "---\nid: Updater\ntitle: Updater\n---\n\n# Type Alias: Updater\\<T\\>\n\n```ts\ntype Updater<T> = T | (old) => T;\n```\n\nDefined in: [types/type-utils.ts:1](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/type-utils.ts#L1)\n\n## Type Parameters\n\n### T\n\n`T`\n"
  },
  {
    "path": "docs/reference/type-aliases/VisibilityDefaultOptions.md",
    "content": "---\nid: VisibilityDefaultOptions\ntitle: VisibilityDefaultOptions\n---\n\n# Type Alias: VisibilityDefaultOptions\n\n```ts\ntype VisibilityDefaultOptions = Pick<TableOptions_ColumnVisibility, \"onColumnVisibilityChange\">;\n```\n\nDefined in: [features/column-visibility/columnVisibilityFeature.types.ts:23](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L23)\n"
  },
  {
    "path": "docs/reference/variables/$internalMemoFnMeta.md",
    "content": "---\nid: $internalMemoFnMeta\ntitle: $internalMemoFnMeta\n---\n\n# Variable: $internalMemoFnMeta\n\n```ts\nconst $internalMemoFnMeta: typeof $internalMemoFnMeta;\n```\n\nDefined in: [utils.ts:61](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L61)\n"
  },
  {
    "path": "docs/reference/variables/aggregationFn_count.md",
    "content": "---\nid: aggregationFn_count\ntitle: aggregationFn_count\n---\n\n# Variable: aggregationFn\\_count\n\n```ts\nconst aggregationFn_count: AggregationFn<any, any>;\n```\n\nDefined in: [fns/aggregationFns.ts:198](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/aggregationFns.ts#L198)\n\nAggregation function for counting the number of rows in a column.\n"
  },
  {
    "path": "docs/reference/variables/aggregationFn_extent.md",
    "content": "---\nid: aggregationFn_extent\ntitle: aggregationFn_extent\n---\n\n# Variable: aggregationFn\\_extent\n\n```ts\nconst aggregationFn_extent: AggregationFn<any, any>;\n```\n\nDefined in: [fns/aggregationFns.ts:84](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/aggregationFns.ts#L84)\n\nAggregation function for finding the extent (min and max) of a column.\n"
  },
  {
    "path": "docs/reference/variables/aggregationFn_max.md",
    "content": "---\nid: aggregationFn_max\ntitle: aggregationFn_max\n---\n\n# Variable: aggregationFn\\_max\n\n```ts\nconst aggregationFn_max: AggregationFn<any, any>;\n```\n\nDefined in: [fns/aggregationFns.ts:57](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/aggregationFns.ts#L57)\n\nAggregation function for finding the maximum value of a column.\n"
  },
  {
    "path": "docs/reference/variables/aggregationFn_mean.md",
    "content": "---\nid: aggregationFn_mean\ntitle: aggregationFn_mean\n---\n\n# Variable: aggregationFn\\_mean\n\n```ts\nconst aggregationFn_mean: AggregationFn<any, any>;\n```\n\nDefined in: [fns/aggregationFns.ts:113](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/aggregationFns.ts#L113)\n\nAggregation function for finding the mean (average) of a column.\n"
  },
  {
    "path": "docs/reference/variables/aggregationFn_median.md",
    "content": "---\nid: aggregationFn_median\ntitle: aggregationFn_median\n---\n\n# Variable: aggregationFn\\_median\n\n```ts\nconst aggregationFn_median: AggregationFn<any, any>;\n```\n\nDefined in: [fns/aggregationFns.ts:145](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/aggregationFns.ts#L145)\n\nAggregation function for finding the median value of a column.\n"
  },
  {
    "path": "docs/reference/variables/aggregationFn_min.md",
    "content": "---\nid: aggregationFn_min\ntitle: aggregationFn_min\n---\n\n# Variable: aggregationFn\\_min\n\n```ts\nconst aggregationFn_min: AggregationFn<any, any>;\n```\n\nDefined in: [fns/aggregationFns.ts:29](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/aggregationFns.ts#L29)\n\nAggregation function for finding the minimum value of a column.\n"
  },
  {
    "path": "docs/reference/variables/aggregationFn_sum.md",
    "content": "---\nid: aggregationFn_sum\ntitle: aggregationFn_sum\n---\n\n# Variable: aggregationFn\\_sum\n\n```ts\nconst aggregationFn_sum: AggregationFn<any, any>;\n```\n\nDefined in: [fns/aggregationFns.ts:10](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/aggregationFns.ts#L10)\n\nAggregation function for summing up the values of a column.\n"
  },
  {
    "path": "docs/reference/variables/aggregationFn_unique.md",
    "content": "---\nid: aggregationFn_unique\ntitle: aggregationFn_unique\n---\n\n# Variable: aggregationFn\\_unique\n\n```ts\nconst aggregationFn_unique: AggregationFn<any, any>;\n```\n\nDefined in: [fns/aggregationFns.ts:172](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/aggregationFns.ts#L172)\n\nAggregation function for finding the unique values of a column.\n"
  },
  {
    "path": "docs/reference/variables/aggregationFn_uniqueCount.md",
    "content": "---\nid: aggregationFn_uniqueCount\ntitle: aggregationFn_uniqueCount\n---\n\n# Variable: aggregationFn\\_uniqueCount\n\n```ts\nconst aggregationFn_uniqueCount: AggregationFn<any, any>;\n```\n\nDefined in: [fns/aggregationFns.ts:185](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/aggregationFns.ts#L185)\n\nAggregation function for finding the count of unique values of a column.\n"
  },
  {
    "path": "docs/reference/variables/aggregationFns.md",
    "content": "---\nid: aggregationFns\ntitle: aggregationFns\n---\n\n# Variable: aggregationFns\n\n```ts\nconst aggregationFns: object;\n```\n\nDefined in: [fns/aggregationFns.ts:208](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/aggregationFns.ts#L208)\n\n## Type Declaration\n\n### count\n\n```ts\ncount: AggregationFn<any, any> = aggregationFn_count;\n```\n\n### extent\n\n```ts\nextent: AggregationFn<any, any> = aggregationFn_extent;\n```\n\n### max\n\n```ts\nmax: AggregationFn<any, any> = aggregationFn_max;\n```\n\n### mean\n\n```ts\nmean: AggregationFn<any, any> = aggregationFn_mean;\n```\n\n### median\n\n```ts\nmedian: AggregationFn<any, any> = aggregationFn_median;\n```\n\n### min\n\n```ts\nmin: AggregationFn<any, any> = aggregationFn_min;\n```\n\n### sum\n\n```ts\nsum: AggregationFn<any, any> = aggregationFn_sum;\n```\n\n### unique\n\n```ts\nunique: AggregationFn<any, any> = aggregationFn_unique;\n```\n\n### uniqueCount\n\n```ts\nuniqueCount: AggregationFn<any, any> = aggregationFn_uniqueCount;\n```\n"
  },
  {
    "path": "docs/reference/variables/columnFacetingFeature.md",
    "content": "---\nid: columnFacetingFeature\ntitle: columnFacetingFeature\n---\n\n# Variable: columnFacetingFeature\n\n```ts\nconst columnFacetingFeature: TableFeature<ColumnFacetingFeatureConstructors<TableFeatures, RowData>>;\n```\n\nDefined in: [features/column-faceting/columnFacetingFeature.ts:112](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.ts#L112)\n\nThe Column Faceting feature adds column faceting APIs to the column objects.\n"
  },
  {
    "path": "docs/reference/variables/columnFilteringFeature.md",
    "content": "---\nid: columnFilteringFeature\ntitle: columnFilteringFeature\n---\n\n# Variable: columnFilteringFeature\n\n```ts\nconst columnFilteringFeature: TableFeature<ColumnFilteringFeatureConstructors<TableFeatures, RowData>>;\n```\n\nDefined in: [features/column-filtering/columnFilteringFeature.ts:121](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.ts#L121)\n\nThe Column Filtering feature adds column filtering state and APIs to the table, row, and column objects.\n**Note:** This does not include Global Filtering. The globalFilteringFeature feature has been split out into its own standalone feature.\n"
  },
  {
    "path": "docs/reference/variables/columnGroupingFeature.md",
    "content": "---\nid: columnGroupingFeature\ntitle: columnGroupingFeature\n---\n\n# Variable: columnGroupingFeature\n\n```ts\nconst columnGroupingFeature: TableFeature<ColumnGroupingFeatureConstructors<TableFeatures, RowData>>;\n```\n\nDefined in: [features/column-grouping/columnGroupingFeature.ts:151](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.ts#L151)\n\nThe (Column) Grouping feature adds column grouping state and APIs to the table, row, column, and cell objects.\n"
  },
  {
    "path": "docs/reference/variables/columnOrderingFeature.md",
    "content": "---\nid: columnOrderingFeature\ntitle: columnOrderingFeature\n---\n\n# Variable: columnOrderingFeature\n\n```ts\nconst columnOrderingFeature: TableFeature<ColumnOrderingFeatureConstructors<TableFeatures, RowData>>;\n```\n\nDefined in: [features/column-ordering/columnOrderingFeature.ts:96](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.ts#L96)\n\nThe Column Ordering feature adds column ordering state and APIs to the table and column objects.\n"
  },
  {
    "path": "docs/reference/variables/columnPinningFeature.md",
    "content": "---\nid: columnPinningFeature\ntitle: columnPinningFeature\n---\n\n# Variable: columnPinningFeature\n\n```ts\nconst columnPinningFeature: TableFeature<ColumnPinningFeatureConstructors<TableFeatures, RowData>>;\n```\n\nDefined in: [features/column-pinning/columnPinningFeature.ts:324](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.ts#L324)\n\nThe Column Pinning feature adds column pinning state and APIs to the table, row, and column objects.\n"
  },
  {
    "path": "docs/reference/variables/columnResizingFeature.md",
    "content": "---\nid: columnResizingFeature\ntitle: columnResizingFeature\n---\n\n# Variable: columnResizingFeature\n\n```ts\nconst columnResizingFeature: TableFeature<ColumnResizingFeatureConstructors<TableFeatures, RowData>>;\n```\n\nDefined in: [features/column-resizing/columnResizingFeature.ts:92](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.ts#L92)\n\nThe Column Resizing feature adds column resizing state and APIs to the table and column objects.\n**Note:** This is dependent on the Column Sizing feature.\n"
  },
  {
    "path": "docs/reference/variables/columnSizingFeature.md",
    "content": "---\nid: columnSizingFeature\ntitle: columnSizingFeature\n---\n\n# Variable: columnSizingFeature\n\n```ts\nconst columnSizingFeature: TableFeature<ColumnSizingFeatureConstructors<TableFeatures, RowData>>;\n```\n\nDefined in: [features/column-sizing/columnSizingFeature.ts:146](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.ts#L146)\n\nThe Column Sizing feature adds column sizing state and APIs to the table, header, and column objects.\n**Note:** This does not include column resizing. The columnResizingFeature feature has been split out into its own standalone feature.\n"
  },
  {
    "path": "docs/reference/variables/columnVisibilityFeature.md",
    "content": "---\nid: columnVisibilityFeature\ntitle: columnVisibilityFeature\n---\n\n# Variable: columnVisibilityFeature\n\n```ts\nconst columnVisibilityFeature: TableFeature<ColumnVisibilityFeatureConstructors<TableFeatures, RowData>>;\n```\n\nDefined in: [features/column-visibility/columnVisibilityFeature.ts:155](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.ts#L155)\n\nThe Column Visibility feature adds column visibility state and APIs to the table, row, and column objects.\n"
  },
  {
    "path": "docs/reference/variables/coreCellsFeature.md",
    "content": "---\nid: coreCellsFeature\ntitle: coreCellsFeature\n---\n\n# Variable: coreCellsFeature\n\n```ts\nconst coreCellsFeature: TableFeature<CoreCellsFeatureConstructors<TableFeatures, RowData>>;\n```\n\nDefined in: [core/cells/coreCellsFeature.ts:44](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.ts#L44)\n\nThe Core Cells feature provides the core cell functionality.\n"
  },
  {
    "path": "docs/reference/variables/coreColumnsFeature.md",
    "content": "---\nid: coreColumnsFeature\ntitle: coreColumnsFeature\n---\n\n# Variable: coreColumnsFeature\n\n```ts\nconst coreColumnsFeature: TableFeature<CoreColumnsFeatureConstructors<TableFeatures, RowData>>;\n```\n\nDefined in: [core/columns/coreColumnsFeature.ts:90](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.ts#L90)\n\nThe Core Columns feature provides the core column functionality.\n"
  },
  {
    "path": "docs/reference/variables/coreFeatures.md",
    "content": "---\nid: coreFeatures\ntitle: coreFeatures\n---\n\n# Variable: coreFeatures\n\n```ts\nconst coreFeatures: CoreFeatures;\n```\n\nDefined in: [core/coreFeatures.ts:17](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/coreFeatures.ts#L17)\n"
  },
  {
    "path": "docs/reference/variables/coreHeadersFeature.md",
    "content": "---\nid: coreHeadersFeature\ntitle: coreHeadersFeature\n---\n\n# Variable: coreHeadersFeature\n\n```ts\nconst coreHeadersFeature: TableFeature<CoreHeadersFeatureConstructors<TableFeatures, RowData>>;\n```\n\nDefined in: [core/headers/coreHeadersFeature.ts:98](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.ts#L98)\n\nThe Core Headers feature provides the core header functionality.\n"
  },
  {
    "path": "docs/reference/variables/coreRowModelsFeature.md",
    "content": "---\nid: coreRowModelsFeature\ntitle: coreRowModelsFeature\n---\n\n# Variable: coreRowModelsFeature\n\n```ts\nconst coreRowModelsFeature: TableFeature<CoreRowModelsFeatureConstructors<TableFeatures, RowData>>;\n```\n\nDefined in: [core/row-models/coreRowModelsFeature.ts:78](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.ts#L78)\n\nThe Core Row Models feature provides the core row model functionality.\n"
  },
  {
    "path": "docs/reference/variables/coreRowsFeature.md",
    "content": "---\nid: coreRowsFeature\ntitle: coreRowsFeature\n---\n\n# Variable: coreRowsFeature\n\n```ts\nconst coreRowsFeature: TableFeature<CoreRowsFeatureConstructors<TableFeatures, RowData>>;\n```\n\nDefined in: [core/rows/coreRowsFeature.ts:84](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.ts#L84)\n\nThe Core Rows feature provides the core row functionality.\n"
  },
  {
    "path": "docs/reference/variables/coreTablesFeature.md",
    "content": "---\nid: coreTablesFeature\ntitle: coreTablesFeature\n---\n\n# Variable: coreTablesFeature\n\n```ts\nconst coreTablesFeature: TableFeature<CoreTablesFeatureConstructors<TableFeatures, RowData>>;\n```\n\nDefined in: [core/table/coreTablesFeature.ts:36](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.ts#L36)\n\nThe Core Tables feature provides the core table functionality for handling state and options.\n"
  },
  {
    "path": "docs/reference/variables/filterFn_arrHas.md",
    "content": "---\nid: filterFn_arrHas\ntitle: filterFn_arrHas\n---\n\n# Variable: filterFn\\_arrHas\n\n```ts\nconst filterFn_arrHas: FilterFn<any, any>;\n```\n\nDefined in: [fns/filterFns.ts:287](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L287)\n\nFilter function for checking if an array has a given value.\n"
  },
  {
    "path": "docs/reference/variables/filterFn_arrIncludes.md",
    "content": "---\nid: filterFn_arrIncludes\ntitle: filterFn_arrIncludes\n---\n\n# Variable: filterFn\\_arrIncludes\n\n```ts\nconst filterFn_arrIncludes: FilterFn<any, any>;\n```\n\nDefined in: [fns/filterFns.ts:301](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L301)\n\nFilter function for checking if an array includes a given value.\n"
  },
  {
    "path": "docs/reference/variables/filterFn_arrIncludesAll.md",
    "content": "---\nid: filterFn_arrIncludesAll\ntitle: filterFn_arrIncludesAll\n---\n\n# Variable: filterFn\\_arrIncludesAll\n\n```ts\nconst filterFn_arrIncludesAll: FilterFn<any, any>;\n```\n\nDefined in: [fns/filterFns.ts:321](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L321)\n\nFilter function for checking if an array includes all of the given values.\n"
  },
  {
    "path": "docs/reference/variables/filterFn_arrIncludesSome.md",
    "content": "---\nid: filterFn_arrIncludesSome\ntitle: filterFn_arrIncludesSome\n---\n\n# Variable: filterFn\\_arrIncludesSome\n\n```ts\nconst filterFn_arrIncludesSome: FilterFn<any, any>;\n```\n\nDefined in: [fns/filterFns.ts:340](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L340)\n\nFilter function for checking if an array includes any of the given values.\n"
  },
  {
    "path": "docs/reference/variables/filterFn_equals.md",
    "content": "---\nid: filterFn_equals\ntitle: filterFn_equals\n---\n\n# Variable: filterFn\\_equals\n\n```ts\nconst filterFn_equals: FilterFn<any, any>;\n```\n\nDefined in: [fns/filterFns.ts:11](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L11)\n\nFilter function for checking if a value is exactly equal to a given value. (JS === comparison)\n"
  },
  {
    "path": "docs/reference/variables/filterFn_equalsString.md",
    "content": "---\nid: filterFn_equalsString\ntitle: filterFn_equalsString\n---\n\n# Variable: filterFn\\_equalsString\n\n```ts\nconst filterFn_equalsString: FilterFn<any, any>;\n```\n\nDefined in: [fns/filterFns.ts:85](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L85)\n\nFilter function for checking if a string is exactly equal to a given string. (Non-case-sensitive)\n"
  },
  {
    "path": "docs/reference/variables/filterFn_equalsStringSensitive.md",
    "content": "---\nid: filterFn_equalsStringSensitive\ntitle: filterFn_equalsStringSensitive\n---\n\n# Variable: filterFn\\_equalsStringSensitive\n\n```ts\nconst filterFn_equalsStringSensitive: FilterFn<any, any>;\n```\n\nDefined in: [fns/filterFns.ts:104](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L104)\n\nFilter function for checking if a string is exactly equal to a given string. (Case-sensitive)\n"
  },
  {
    "path": "docs/reference/variables/filterFn_greaterThan.md",
    "content": "---\nid: filterFn_greaterThan\ntitle: filterFn_greaterThan\n---\n\n# Variable: filterFn\\_greaterThan\n\n```ts\nconst filterFn_greaterThan: FilterFn<any, any>;\n```\n\nDefined in: [fns/filterFns.ts:122](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L122)\n\nFilter function for checking if a number is greater than a given number.\n"
  },
  {
    "path": "docs/reference/variables/filterFn_greaterThanOrEqualTo.md",
    "content": "---\nid: filterFn_greaterThanOrEqualTo\ntitle: filterFn_greaterThanOrEqualTo\n---\n\n# Variable: filterFn\\_greaterThanOrEqualTo\n\n```ts\nconst filterFn_greaterThanOrEqualTo: FilterFn<any, any>;\n```\n\nDefined in: [fns/filterFns.ts:149](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L149)\n\nFilter function for checking if a number is greater than or equal to a given number.\n"
  },
  {
    "path": "docs/reference/variables/filterFn_inNumberRange.md",
    "content": "---\nid: filterFn_inNumberRange\ntitle: filterFn_inNumberRange\n---\n\n# Variable: filterFn\\_inNumberRange\n\n```ts\nconst filterFn_inNumberRange: FilterFn<any, any>;\n```\n\nDefined in: [fns/filterFns.ts:244](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L244)\n\nFilter function for checking if a number is within a given range.\n"
  },
  {
    "path": "docs/reference/variables/filterFn_includesString.md",
    "content": "---\nid: filterFn_includesString\ntitle: filterFn_includesString\n---\n\n# Variable: filterFn\\_includesString\n\n```ts\nconst filterFn_includesString: FilterFn<any, any>;\n```\n\nDefined in: [fns/filterFns.ts:63](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L63)\n\nFilter function for checking if a string includes a given substring. (Non-case-sensitive)\n"
  },
  {
    "path": "docs/reference/variables/filterFn_includesStringSensitive.md",
    "content": "---\nid: filterFn_includesStringSensitive\ntitle: filterFn_includesStringSensitive\n---\n\n# Variable: filterFn\\_includesStringSensitive\n\n```ts\nconst filterFn_includesStringSensitive: FilterFn<any, any>;\n```\n\nDefined in: [fns/filterFns.ts:45](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L45)\n\nFilter function for checking if a string includes a given substring. (Case-sensitive)\n"
  },
  {
    "path": "docs/reference/variables/filterFn_lessThan.md",
    "content": "---\nid: filterFn_lessThan\ntitle: filterFn_lessThan\n---\n\n# Variable: filterFn\\_lessThan\n\n```ts\nconst filterFn_lessThan: FilterFn<any, any>;\n```\n\nDefined in: [fns/filterFns.ts:168](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L168)\n\nFilter function for checking if a number is less than a given number.\n"
  },
  {
    "path": "docs/reference/variables/filterFn_lessThanOrEqualTo.md",
    "content": "---\nid: filterFn_lessThanOrEqualTo\ntitle: filterFn_lessThanOrEqualTo\n---\n\n# Variable: filterFn\\_lessThanOrEqualTo\n\n```ts\nconst filterFn_lessThanOrEqualTo: FilterFn<any, any>;\n```\n\nDefined in: [fns/filterFns.ts:184](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L184)\n\nFilter function for checking if a number is less than or equal to a given number.\n"
  },
  {
    "path": "docs/reference/variables/filterFn_weakEquals.md",
    "content": "---\nid: filterFn_weakEquals\ntitle: filterFn_weakEquals\n---\n\n# Variable: filterFn\\_weakEquals\n\n```ts\nconst filterFn_weakEquals: FilterFn<any, any>;\n```\n\nDefined in: [fns/filterFns.ts:27](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L27)\n\nFilter function for checking if a value is weakly equal to a given value. (JS == comparison)\n"
  },
  {
    "path": "docs/reference/variables/filterFns.md",
    "content": "---\nid: filterFns\ntitle: filterFns\n---\n\n# Variable: filterFns\n\n```ts\nconst filterFns: object;\n```\n\nDefined in: [fns/filterFns.ts:358](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L358)\n\n## Type Declaration\n\n### arrHas\n\n```ts\narrHas: FilterFn<any, any> = filterFn_arrHas;\n```\n\n### arrIncludes\n\n```ts\narrIncludes: FilterFn<any, any> = filterFn_arrIncludes;\n```\n\n### arrIncludesAll\n\n```ts\narrIncludesAll: FilterFn<any, any> = filterFn_arrIncludesAll;\n```\n\n### arrIncludesSome\n\n```ts\narrIncludesSome: FilterFn<any, any> = filterFn_arrIncludesSome;\n```\n\n### between\n\n```ts\nbetween: FilterFn<any, any> = filterFn_between;\n```\n\n### betweenInclusive\n\n```ts\nbetweenInclusive: FilterFn<any, any> = filterFn_betweenInclusive;\n```\n\n### equals\n\n```ts\nequals: FilterFn<any, any> = filterFn_equals;\n```\n\n### equalsString\n\n```ts\nequalsString: FilterFn<any, any> = filterFn_equalsString;\n```\n\n### includesString\n\n```ts\nincludesString: FilterFn<any, any> = filterFn_includesString;\n```\n\n### includesStringSensitive\n\n```ts\nincludesStringSensitive: FilterFn<any, any> = filterFn_includesStringSensitive;\n```\n\n### inNumberRange\n\n```ts\ninNumberRange: FilterFn<any, any> = filterFn_inNumberRange;\n```\n\n### weakEquals\n\n```ts\nweakEquals: FilterFn<any, any> = filterFn_weakEquals;\n```\n"
  },
  {
    "path": "docs/reference/variables/globalFilteringFeature.md",
    "content": "---\nid: globalFilteringFeature\ntitle: globalFilteringFeature\n---\n\n# Variable: globalFilteringFeature\n\n```ts\nconst globalFilteringFeature: TableFeature<GlobalFilteringFeatureConstructors<TableFeatures, RowData>>;\n```\n\nDefined in: [features/global-filtering/globalFilteringFeature.ts:92](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.ts#L92)\n\nThe Global Filtering feature adds global filtering state and APIs to the table and column objects.\n**Note:** This is dependent on the columnFilteringFeature feature.\n"
  },
  {
    "path": "docs/reference/variables/reSplitAlphaNumeric.md",
    "content": "---\nid: reSplitAlphaNumeric\ntitle: reSplitAlphaNumeric\n---\n\n# Variable: reSplitAlphaNumeric\n\n```ts\nconst reSplitAlphaNumeric: RegExp;\n```\n\nDefined in: [fns/sortFns.ts:6](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/sortFns.ts#L6)\n"
  },
  {
    "path": "docs/reference/variables/rowExpandingFeature.md",
    "content": "---\nid: rowExpandingFeature\ntitle: rowExpandingFeature\n---\n\n# Variable: rowExpandingFeature\n\n```ts\nconst rowExpandingFeature: TableFeature<RowExpandingFeatureConstructors<TableFeatures, RowData>>;\n```\n\nDefined in: [features/row-expanding/rowExpandingFeature.ts:122](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.ts#L122)\n\nThe Row Expanding feature adds row expanding state and APIs to the table and row objects.\n"
  },
  {
    "path": "docs/reference/variables/rowPaginationFeature.md",
    "content": "---\nid: rowPaginationFeature\ntitle: rowPaginationFeature\n---\n\n# Variable: rowPaginationFeature\n\n```ts\nconst rowPaginationFeature: TableFeature<RowPaginationFeatureConstructors<TableFeatures, RowData>>;\n```\n\nDefined in: [features/row-pagination/rowPaginationFeature.ts:121](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.ts#L121)\n\nThe (Row) Pagination feature adds pagination state and APIs to the table object.\n"
  },
  {
    "path": "docs/reference/variables/rowPinningFeature.md",
    "content": "---\nid: rowPinningFeature\ntitle: rowPinningFeature\n---\n\n# Variable: rowPinningFeature\n\n```ts\nconst rowPinningFeature: TableFeature<RowPinningFeatureConstructors<TableFeatures, RowData>>;\n```\n\nDefined in: [features/row-pinning/rowPinningFeature.ts:121](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.ts#L121)\n\nThe Row Pinning feature adds row pinning state and APIs to the table and row objects.\n"
  },
  {
    "path": "docs/reference/variables/rowSelectionFeature.md",
    "content": "---\nid: rowSelectionFeature\ntitle: rowSelectionFeature\n---\n\n# Variable: rowSelectionFeature\n\n```ts\nconst rowSelectionFeature: TableFeature<RowSelectionFeatureConstructors<TableFeatures, RowData>>;\n```\n\nDefined in: [features/row-selection/rowSelectionFeature.ts:164](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.ts#L164)\n\nThe Row Selection feature adds row selection state and APIs to the table and row objects.\n"
  },
  {
    "path": "docs/reference/variables/rowSortingFeature.md",
    "content": "---\nid: rowSortingFeature\ntitle: rowSortingFeature\n---\n\n# Variable: rowSortingFeature\n\n```ts\nconst rowSortingFeature: TableFeature<RowSortingFeatureConstructors<TableFeatures, RowData>>;\n```\n\nDefined in: [features/row-sorting/rowSortingFeature.ts:136](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.ts#L136)\n\nThe (Row) Sorting feature adds sorting state and APIs to the table and column objects.\n"
  },
  {
    "path": "docs/reference/variables/sortFn_alphanumeric.md",
    "content": "---\nid: sortFn_alphanumeric\ntitle: sortFn_alphanumeric\n---\n\n# Variable: sortFn\\_alphanumeric\n\n```ts\nconst sortFn_alphanumeric: SortFn<any, any>;\n```\n\nDefined in: [fns/sortFns.ts:8](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/sortFns.ts#L8)\n"
  },
  {
    "path": "docs/reference/variables/sortFn_alphanumericCaseSensitive.md",
    "content": "---\nid: sortFn_alphanumericCaseSensitive\ntitle: sortFn_alphanumericCaseSensitive\n---\n\n# Variable: sortFn\\_alphanumericCaseSensitive\n\n```ts\nconst sortFn_alphanumericCaseSensitive: SortFn<any, any>;\n```\n\nDefined in: [fns/sortFns.ts:22](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/sortFns.ts#L22)\n"
  },
  {
    "path": "docs/reference/variables/sortFn_basic.md",
    "content": "---\nid: sortFn_basic\ntitle: sortFn_basic\n---\n\n# Variable: sortFn\\_basic\n\n```ts\nconst sortFn_basic: SortFn<any, any>;\n```\n\nDefined in: [fns/sortFns.ts:85](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/sortFns.ts#L85)\n"
  },
  {
    "path": "docs/reference/variables/sortFn_datetime.md",
    "content": "---\nid: sortFn_datetime\ntitle: sortFn_datetime\n---\n\n# Variable: sortFn\\_datetime\n\n```ts\nconst sortFn_datetime: SortFn<any, any>;\n```\n\nDefined in: [fns/sortFns.ts:68](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/sortFns.ts#L68)\n"
  },
  {
    "path": "docs/reference/variables/sortFn_text.md",
    "content": "---\nid: sortFn_text\ntitle: sortFn_text\n---\n\n# Variable: sortFn\\_text\n\n```ts\nconst sortFn_text: SortFn<any, any>;\n```\n\nDefined in: [fns/sortFns.ts:38](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/sortFns.ts#L38)\n"
  },
  {
    "path": "docs/reference/variables/sortFn_textCaseSensitive.md",
    "content": "---\nid: sortFn_textCaseSensitive\ntitle: sortFn_textCaseSensitive\n---\n\n# Variable: sortFn\\_textCaseSensitive\n\n```ts\nconst sortFn_textCaseSensitive: SortFn<any, any>;\n```\n\nDefined in: [fns/sortFns.ts:54](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/sortFns.ts#L54)\n"
  },
  {
    "path": "docs/reference/variables/sortFns.md",
    "content": "---\nid: sortFns\ntitle: sortFns\n---\n\n# Variable: sortFns\n\n```ts\nconst sortFns: object;\n```\n\nDefined in: [fns/sortFns.ts:164](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/sortFns.ts#L164)\n\n## Type Declaration\n\n### alphanumeric\n\n```ts\nalphanumeric: SortFn<any, any> = sortFn_alphanumeric;\n```\n\n### alphanumericCaseSensitive\n\n```ts\nalphanumericCaseSensitive: SortFn<any, any> = sortFn_alphanumericCaseSensitive;\n```\n\n### basic\n\n```ts\nbasic: SortFn<any, any> = sortFn_basic;\n```\n\n### datetime\n\n```ts\ndatetime: SortFn<any, any> = sortFn_datetime;\n```\n\n### text\n\n```ts\ntext: SortFn<any, any> = sortFn_text;\n```\n\n### textCaseSensitive\n\n```ts\ntextCaseSensitive: SortFn<any, any> = sortFn_textCaseSensitive;\n```\n"
  },
  {
    "path": "docs/reference/variables/stockFeatures.md",
    "content": "---\nid: stockFeatures\ntitle: stockFeatures\n---\n\n# Variable: stockFeatures\n\n```ts\nconst stockFeatures: StockFeatures;\n```\n\nDefined in: [features/stockFeatures.ts:33](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/stockFeatures.ts#L33)\n"
  },
  {
    "path": "docs/vanilla.md",
    "content": "---\ntitle: Vanilla TS/JS\n---\n\nThe `@tanstack/table-core` library contains the core logic for TanStack Table. If you are using a non-standard framework or don't have access to a framework, you can use the core library directly via TypeScript or JavaScript.\n\n## `_createTable`\n\nTakes an `options` object and returns a table.\n\n```tsx\nimport { _createTable } from '@tanstack/table-core'\n\nconst table = _createTable(options)\n```\n"
  },
  {
    "path": "eslint.config.js",
    "content": "// @ts-check\n\n// @ts-ignore Needed due to moduleResolution Node vs Bundler\nimport { tanstackConfig } from '@tanstack/eslint-config'\n\n/** @type {any} */\nconst config = [\n  ...tanstackConfig,\n  {\n    name: 'tanstack/temp',\n    rules: {\n      'no-case-declarations': 'off',\n      'no-shadow': 'off',\n      '@typescript-eslint/naming-convention': 'off',\n      '@typescript-eslint/no-empty-function': 'off',\n      '@typescript-eslint/no-unnecessary-condition': 'warn',\n      '@typescript-eslint/no-unsafe-function-type': 'off',\n    },\n  },\n]\n\nexport default config\n"
  },
  {
    "path": "examples/angular/basic/.gitignore",
    "content": "# See https://docs.github.com/get-started/getting-started-with-git/ignoring-files for more about ignoring files.\n\n# Compiled output\n/dist\n/tmp\n/out-tsc\n/bazel-out\n\n# Node\n/node_modules\nnpm-debug.log\nyarn-error.log\n\n# IDEs and editors\n.idea/\n.project\n.classpath\n.c9/\n*.launch\n.settings/\n*.sublime-workspace\n\n# Visual Studio Code\n.vscode/*\n!.vscode/settings.json\n!.vscode/tasks.json\n!.vscode/launch.json\n!.vscode/extensions.json\n!.vscode/mcp.json\n.history/*\n\n# Miscellaneous\n/.angular/cache\n.sass-cache/\n/connect.lock\n/coverage\n/libpeerconnection.log\ntestem.log\n/typings\n__screenshots__/\n\n# System files\n.DS_Store\nThumbs.db\n"
  },
  {
    "path": "examples/angular/basic/README.md",
    "content": "# CustomPlugin\n\nThis project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 21.1.0.\n\n## Development server\n\nTo start a local development server, run:\n\n```bash\nng serve\n```\n\nOnce the server is running, open your browser and navigate to `http://localhost:4200/`. The application will automatically reload whenever you modify any of the source files.\n\n## Code scaffolding\n\nAngular CLI includes powerful code scaffolding tools. To generate a new component, run:\n\n```bash\nng generate component component-name\n```\n\nFor a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:\n\n```bash\nng generate --help\n```\n\n## Building\n\nTo build the project run:\n\n```bash\nng build\n```\n\nThis will compile your project and store the build artifacts in the `dist/` directory. By default, the production build optimizes your application for performance and speed.\n\n## Running unit tests\n\nTo execute unit tests with the [Vitest](https://vitest.dev/) test runner, use the following command:\n\n```bash\nng test\n```\n\n## Running end-to-end tests\n\nFor end-to-end (e2e) testing, run:\n\n```bash\nng e2e\n```\n\nAngular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.\n\n## Additional Resources\n\nFor more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.\n"
  },
  {
    "path": "examples/angular/basic/angular.json",
    "content": "{\n  \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\n  \"version\": 1,\n  \"cli\": {\n    \"packageManager\": \"pnpm\",\n    \"analytics\": false,\n    \"cache\": {\n      \"enabled\": false\n    }\n  },\n  \"newProjectRoot\": \"projects\",\n  \"projects\": {\n    \"basic\": {\n      \"projectType\": \"application\",\n      \"schematics\": {\n        \"@schematics/angular:component\": {\n          \"inlineTemplate\": true,\n          \"inlineStyle\": true,\n          \"skipTests\": true\n        },\n        \"@schematics/angular:class\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:directive\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:guard\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:interceptor\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:pipe\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:resolver\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:service\": {\n          \"skipTests\": true\n        }\n      },\n      \"root\": \"\",\n      \"sourceRoot\": \"src\",\n      \"prefix\": \"app\",\n      \"architect\": {\n        \"build\": {\n          \"builder\": \"@angular/build:application\",\n          \"options\": {\n            \"browser\": \"src/main.ts\",\n            \"tsConfig\": \"tsconfig.app.json\",\n            \"assets\": [\n              {\n                \"glob\": \"**/*\",\n                \"input\": \"public\"\n              }\n            ],\n            \"styles\": [\"src/styles.css\"]\n          },\n          \"configurations\": {\n            \"production\": {\n              \"budgets\": [\n                {\n                  \"type\": \"initial\",\n                  \"maximumWarning\": \"500kB\",\n                  \"maximumError\": \"1MB\"\n                },\n                {\n                  \"type\": \"anyComponentStyle\",\n                  \"maximumWarning\": \"4kB\",\n                  \"maximumError\": \"8kB\"\n                }\n              ],\n              \"outputHashing\": \"all\"\n            },\n            \"development\": {\n              \"optimization\": false,\n              \"extractLicenses\": false,\n              \"sourceMap\": true\n            }\n          },\n          \"defaultConfiguration\": \"production\"\n        },\n        \"serve\": {\n          \"builder\": \"@angular/build:dev-server\",\n          \"configurations\": {\n            \"production\": {\n              \"buildTarget\": \"basic:build:production\"\n            },\n            \"development\": {\n              \"buildTarget\": \"basic:build:development\"\n            }\n          },\n          \"defaultConfiguration\": \"development\"\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "examples/angular/basic/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-angular-basic\",\n  \"version\": \"0.0.0\",\n  \"scripts\": {\n    \"ng\": \"ng\",\n    \"start\": \"ng serve\",\n    \"build\": \"ng build\",\n    \"watch\": \"ng build --watch --configuration development\",\n    \"lint\": \"eslint ./src\"\n  },\n  \"private\": true,\n  \"packageManager\": \"pnpm@10.28.2\",\n  \"dependencies\": {\n    \"@angular/common\": \"^21.1.1\",\n    \"@angular/compiler\": \"^21.1.1\",\n    \"@angular/core\": \"^21.1.1\",\n    \"@angular/forms\": \"^21.1.1\",\n    \"@angular/platform-browser\": \"^21.1.1\",\n    \"@angular/router\": \"^21.1.1\",\n    \"@tanstack/angular-table\": \"^9.0.0-alpha.17\",\n    \"rxjs\": \"~7.8.2\",\n    \"tslib\": \"^2.8.1\"\n  },\n  \"devDependencies\": {\n    \"@angular/build\": \"^21.1.2\",\n    \"@angular/cli\": \"^21.1.2\",\n    \"@angular/compiler-cli\": \"^21.1.1\",\n    \"typescript\": \"5.9.3\"\n  }\n}\n"
  },
  {
    "path": "examples/angular/basic/src/app/app.config.ts",
    "content": "import { provideRouter } from '@angular/router'\nimport { provideBrowserGlobalErrorListeners } from '@angular/core'\nimport { routes } from './app.routes'\nimport type { ApplicationConfig } from '@angular/core'\n\nexport const appConfig: ApplicationConfig = {\n  providers: [provideBrowserGlobalErrorListeners(), provideRouter(routes)],\n}\n"
  },
  {
    "path": "examples/angular/basic/src/app/app.html",
    "content": "<div class=\"p-2\">\n  <table>\n    <thead>\n      @for (headerGroup of table.getHeaderGroups(); track headerGroup.id) {\n        <tr>\n          @for (header of headerGroup.headers; track header.id) {\n            @if (!header.isPlaceholder) {\n              <th *flexRenderHeader=\"header; let header\">\n                <div [innerHTML]=\"header\"></div>\n              </th>\n            }\n          }\n        </tr>\n      }\n    </thead>\n    <tbody>\n      @for (row of table.getRowModel().rows; track row.id) {\n        <tr>\n          @for (cell of row.getAllCells(); track cell.id) {\n            <td *flexRenderCell=\"cell; let cell\">\n              <div [innerHTML]=\"cell\"></div>\n            </td>\n          }\n        </tr>\n      }\n    </tbody>\n    <tfoot>\n      @for (footerGroup of table.getFooterGroups(); track footerGroup.id) {\n        <tr>\n          @for (footer of footerGroup.headers; track footer.id) {\n            <th *flexRenderFooter=\"footer; let footer\">\n              {{ footer }}\n            </th>\n          }\n        </tr>\n      }\n    </tfoot>\n  </table>\n\n  <div class=\"h-4\"></div>\n  <button (click)=\"rerender()\" class=\"border p-2\">Rerender</button>\n</div>\n"
  },
  {
    "path": "examples/angular/basic/src/app/app.routes.ts",
    "content": "import type { Routes } from '@angular/router'\n\nexport const routes: Routes = []\n"
  },
  {
    "path": "examples/angular/basic/src/app/app.ts",
    "content": "import { ChangeDetectionStrategy, Component, signal } from '@angular/core'\nimport { FlexRender, injectTable, tableFeatures } from '@tanstack/angular-table'\nimport type { ColumnDef } from '@tanstack/angular-table'\n\n// This example uses the classic standalone `injectTable` hook to create a table without the new `createTableHook` util.\n\n// 1. Define what the shape of your data will be for each row\ntype Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  status: string\n  progress: number\n}\n\n// 2. Create some dummy data\nconst defaultData: Array<Person> = [\n  {\n    firstName: 'tanner',\n    lastName: 'linsley',\n    age: 24,\n    visits: 100,\n    status: 'In Relationship',\n    progress: 50,\n  },\n  {\n    firstName: 'tandy',\n    lastName: 'miller',\n    age: 40,\n    visits: 40,\n    status: 'Single',\n    progress: 80,\n  },\n  {\n    firstName: 'joe',\n    lastName: 'dirte',\n    age: 45,\n    visits: 20,\n    status: 'Complicated',\n    progress: 10,\n  },\n]\n\n// 3. New in V9! Tell the table which features and row models we want to use.\n// In this case, this will be a basic table with no additional features\nconst _features = tableFeatures({}) // util method to create sharable TFeatures object/type\n\n// 4. Define the columns for your table. This uses the new `ColumnDef` type to define columns.\n// Alternatively, check out the createAppTable/createColumnHelper util for an even more type-safe way to define columns.\nconst defaultColumns: Array<ColumnDef<typeof _features, Person>> = [\n  {\n    accessorKey: 'firstName',\n    cell: (info) => info.getValue(),\n    footer: (info) => info.column.id,\n  },\n  {\n    accessorFn: (row) => row.lastName,\n    id: 'lastName',\n    cell: (info) => `<i>${info.getValue<string>()}</i>`,\n    header: () => `<span>Last Name</span>`,\n    footer: (info) => info.column.id,\n  },\n  {\n    accessorKey: 'age',\n    header: () => 'Age',\n    footer: (info) => info.column.id,\n  },\n  {\n    accessorKey: 'visits',\n    header: () => `<span>Visits</span>`,\n    footer: (info) => info.column.id,\n  },\n  {\n    accessorKey: 'status',\n    header: 'Status',\n    footer: (info) => info.column.id,\n  },\n  {\n    accessorKey: 'progress',\n    header: 'Profile Progress',\n    footer: (info) => info.column.id,\n  },\n]\n\n@Component({\n  selector: 'app-root',\n  imports: [FlexRender],\n  templateUrl: './app.html',\n  changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class App {\n  readonly data = signal<Array<Person>>(defaultData)\n\n  // 5. Create the table instance with required _features, columns, and data\n  table = injectTable(() => ({\n    _features, // new required option in V9. Tell the table which features you are importing and using (better tree-shaking)\n    _rowModels: {}, // `Core` row model is now included by default, but you can still override it here\n    data: this.data(),\n    columns: defaultColumns,\n    // ...other options here\n  }))\n\n  rerender() {\n    this.data.set([...defaultData.sort(() => -1)])\n  }\n}\n"
  },
  {
    "path": "examples/angular/basic/src/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"utf-8\" />\n    <title>Basic</title>\n    <base href=\"/\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n    <link rel=\"icon\" type=\"image/x-icon\" href=\"favicon.ico\" />\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n  </head>\n  <body>\n    <app-root></app-root>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/angular/basic/src/main.ts",
    "content": "import { bootstrapApplication } from '@angular/platform-browser'\nimport { appConfig } from './app/app.config'\nimport { App } from './app/app'\n\nbootstrapApplication(App, appConfig).catch((err) => console.error(err))\n"
  },
  {
    "path": "examples/angular/basic/src/styles.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n\n.pagination-actions {\n  margin: 10px;\n  display: flex;\n  gap: 10px;\n}\n"
  },
  {
    "path": "examples/angular/basic/tsconfig.app.json",
    "content": "/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */\n/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */\n{\n  \"extends\": \"./tsconfig.json\",\n  \"compilerOptions\": {\n    \"outDir\": \"./out-tsc/app\",\n    \"types\": []\n  },\n  \"include\": [\"src/**/*.ts\"],\n  \"exclude\": [\"src/**/*.spec.ts\"]\n}\n"
  },
  {
    "path": "examples/angular/basic/tsconfig.json",
    "content": "/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */\n/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */\n{\n  \"compileOnSave\": false,\n  \"compilerOptions\": {\n    \"strict\": true,\n    \"noImplicitOverride\": true,\n    \"noPropertyAccessFromIndexSignature\": true,\n    \"noImplicitReturns\": true,\n    \"noFallthroughCasesInSwitch\": true,\n    \"skipLibCheck\": true,\n    \"isolatedModules\": true,\n    \"experimentalDecorators\": true,\n    \"importHelpers\": true,\n    \"target\": \"ES2022\",\n    \"module\": \"preserve\"\n  },\n  \"angularCompilerOptions\": {\n    \"enableI18nLegacyMessageIdFormat\": false,\n    \"strictInjectionParameters\": true,\n    \"strictInputAccessModifiers\": true,\n    \"strictTemplates\": true\n  }\n}\n"
  },
  {
    "path": "examples/angular/basic-app-table/.gitignore",
    "content": "# See https://docs.github.com/get-started/getting-started-with-git/ignoring-files for more about ignoring files.\n\n# Compiled output\n/dist\n/tmp\n/out-tsc\n/bazel-out\n\n# Node\n/node_modules\nnpm-debug.log\nyarn-error.log\n\n# IDEs and editors\n.idea/\n.project\n.classpath\n.c9/\n*.launch\n.settings/\n*.sublime-workspace\n\n# Visual Studio Code\n.vscode/*\n!.vscode/settings.json\n!.vscode/tasks.json\n!.vscode/launch.json\n!.vscode/extensions.json\n!.vscode/mcp.json\n.history/*\n\n# Miscellaneous\n/.angular/cache\n.sass-cache/\n/connect.lock\n/coverage\n/libpeerconnection.log\ntestem.log\n/typings\n__screenshots__/\n\n# System files\n.DS_Store\nThumbs.db\n"
  },
  {
    "path": "examples/angular/basic-app-table/README.md",
    "content": "# CustomPlugin\n\nThis project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 21.1.0.\n\n## Development server\n\nTo start a local development server, run:\n\n```bash\nng serve\n```\n\nOnce the server is running, open your browser and navigate to `http://localhost:4200/`. The application will automatically reload whenever you modify any of the source files.\n\n## Code scaffolding\n\nAngular CLI includes powerful code scaffolding tools. To generate a new component, run:\n\n```bash\nng generate component component-name\n```\n\nFor a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:\n\n```bash\nng generate --help\n```\n\n## Building\n\nTo build the project run:\n\n```bash\nng build\n```\n\nThis will compile your project and store the build artifacts in the `dist/` directory. By default, the production build optimizes your application for performance and speed.\n\n## Running unit tests\n\nTo execute unit tests with the [Vitest](https://vitest.dev/) test runner, use the following command:\n\n```bash\nng test\n```\n\n## Running end-to-end tests\n\nFor end-to-end (e2e) testing, run:\n\n```bash\nng e2e\n```\n\nAngular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.\n\n## Additional Resources\n\nFor more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.\n"
  },
  {
    "path": "examples/angular/basic-app-table/angular.json",
    "content": "{\n  \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\n  \"version\": 1,\n  \"cli\": {\n    \"packageManager\": \"pnpm\",\n    \"analytics\": false,\n    \"cache\": {\n      \"enabled\": false\n    }\n  },\n  \"newProjectRoot\": \"projects\",\n  \"projects\": {\n    \"basic-app-table\": {\n      \"projectType\": \"application\",\n      \"schematics\": {\n        \"@schematics/angular:component\": {\n          \"inlineTemplate\": true,\n          \"inlineStyle\": true,\n          \"skipTests\": true\n        },\n        \"@schematics/angular:class\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:directive\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:guard\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:interceptor\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:pipe\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:resolver\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:service\": {\n          \"skipTests\": true\n        }\n      },\n      \"root\": \"\",\n      \"sourceRoot\": \"src\",\n      \"prefix\": \"app\",\n      \"architect\": {\n        \"build\": {\n          \"builder\": \"@angular/build:application\",\n          \"options\": {\n            \"browser\": \"src/main.ts\",\n            \"tsConfig\": \"tsconfig.app.json\",\n            \"assets\": [\n              {\n                \"glob\": \"**/*\",\n                \"input\": \"public\"\n              }\n            ],\n            \"styles\": [\"src/styles.css\"]\n          },\n          \"configurations\": {\n            \"production\": {\n              \"budgets\": [\n                {\n                  \"type\": \"initial\",\n                  \"maximumWarning\": \"500kB\",\n                  \"maximumError\": \"1MB\"\n                },\n                {\n                  \"type\": \"anyComponentStyle\",\n                  \"maximumWarning\": \"4kB\",\n                  \"maximumError\": \"8kB\"\n                }\n              ],\n              \"outputHashing\": \"all\"\n            },\n            \"development\": {\n              \"optimization\": false,\n              \"extractLicenses\": false,\n              \"sourceMap\": true\n            }\n          },\n          \"defaultConfiguration\": \"production\"\n        },\n        \"serve\": {\n          \"builder\": \"@angular/build:dev-server\",\n          \"configurations\": {\n            \"production\": {\n              \"buildTarget\": \"basic-app-table:build:production\"\n            },\n            \"development\": {\n              \"buildTarget\": \"basic-app-table:build:development\"\n            }\n          },\n          \"defaultConfiguration\": \"development\"\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "examples/angular/basic-app-table/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-angular-basic-app-table\",\n  \"version\": \"0.0.0\",\n  \"scripts\": {\n    \"ng\": \"ng\",\n    \"start\": \"ng serve\",\n    \"build\": \"ng build\",\n    \"lint\": \"eslint ./src\",\n    \"watch\": \"ng build --watch --configuration development\"\n  },\n  \"private\": true,\n  \"packageManager\": \"pnpm@10.28.2\",\n  \"dependencies\": {\n    \"@angular/common\": \"^21.1.1\",\n    \"@angular/compiler\": \"^21.1.1\",\n    \"@angular/core\": \"^21.1.1\",\n    \"@angular/forms\": \"^21.1.1\",\n    \"@angular/platform-browser\": \"^21.1.1\",\n    \"@tanstack/angular-table\": \"^9.0.0-alpha.17\",\n    \"rxjs\": \"~7.8.2\",\n    \"tslib\": \"^2.8.1\"\n  },\n  \"devDependencies\": {\n    \"@angular/build\": \"^21.1.2\",\n    \"@angular/cli\": \"^21.1.2\",\n    \"@angular/compiler-cli\": \"^21.1.1\",\n    \"typescript\": \"5.9.3\"\n  }\n}\n"
  },
  {
    "path": "examples/angular/basic-app-table/src/app/app.config.ts",
    "content": "import { provideBrowserGlobalErrorListeners } from '@angular/core'\nimport type { ApplicationConfig } from '@angular/core'\n\nexport const appConfig: ApplicationConfig = {\n  providers: [provideBrowserGlobalErrorListeners()],\n}\n"
  },
  {
    "path": "examples/angular/basic-app-table/src/app/app.html",
    "content": "<div class=\"p-2\">\n  <table>\n    <thead>\n      @for (headerGroup of table.getHeaderGroups(); track headerGroup.id) {\n        <tr>\n          @for (header of headerGroup.headers; track header.id) {\n            @if (!header.isPlaceholder) {\n              <th *flexRenderHeader=\"header; let header\">\n                <div [innerHTML]=\"header\"></div>\n              </th>\n            }\n          }\n        </tr>\n      }\n    </thead>\n    <tbody>\n      @for (row of table.getRowModel().rows; track row.id) {\n        <tr>\n          @for (cell of row.getAllCells(); track cell.id) {\n            <td *flexRenderCell=\"cell; let cell\">\n              <div [innerHTML]=\"cell\"></div>\n            </td>\n          }\n        </tr>\n      }\n    </tbody>\n    <tfoot>\n      @for (footerGroup of table.getFooterGroups(); track footerGroup.id) {\n        <tr>\n          @for (footer of footerGroup.headers; track footer.id) {\n            <th *flexRenderFooter=\"footer; let footer\">\n              {{ footer }}\n            </th>\n          }\n        </tr>\n      }\n    </tfoot>\n  </table>\n\n  <div class=\"h-4\"></div>\n  <button (click)=\"rerender()\" class=\"border p-2\">Rerender</button>\n</div>\n"
  },
  {
    "path": "examples/angular/basic-app-table/src/app/app.ts",
    "content": "import { ChangeDetectionStrategy, Component, signal } from '@angular/core'\nimport { FlexRender, createTableHook } from '@tanstack/angular-table'\n\n// This example uses the new `createTableHook` method to create a re-usable table hook factory instead of independently\n// using the standalone `useTable` hook and `createColumnHelper` method. You can choose to use either way.\n\n// 1. Define what the shape of your data will be for each row\ntype Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  status: string\n  progress: number\n}\n\n// 2. Create some dummy data with a stable reference (this could be an API response stored in useState or similar)\nconst defaultData: Array<Person> = [\n  {\n    firstName: 'tanner',\n    lastName: 'linsley',\n    age: 24,\n    visits: 100,\n    status: 'In Relationship',\n    progress: 50,\n  },\n  {\n    firstName: 'tandy',\n    lastName: 'miller',\n    age: 40,\n    visits: 40,\n    status: 'Single',\n    progress: 80,\n  },\n  {\n    firstName: 'joe',\n    lastName: 'dirte',\n    age: 45,\n    visits: 20,\n    status: 'Complicated',\n    progress: 10,\n  },\n  {\n    firstName: 'kevin',\n    lastName: 'vandy',\n    age: 28,\n    visits: 100,\n    status: 'Single',\n    progress: 70,\n  },\n]\n\n// 3. New in V9! Tell the table which features and row models we want to use.\n// In this case, this will be a basic table with no additional features\nconst { injectAppTable, createAppColumnHelper } = createTableHook({\n  _features: {},\n  _rowModels: {}, // client-side row models. `Core` row model is now included by default, but you can still override it here\n  debugTable: true,\n})\n\n// 4. Create a helper object to help define our columns\nconst columnHelper = createAppColumnHelper<Person>()\n\n// 5. Define the columns for your table with a stable reference (in this case, defined statically outside of a react component)\nconst columns = columnHelper.columns([\n  // accessorKey method (most common for simple use-cases)\n  columnHelper.accessor('firstName', {\n    cell: (info) => info.getValue(),\n    footer: (info) => info.column.id,\n  }),\n  // accessorFn used (alternative) along with a custom id\n  columnHelper.accessor((row) => row.lastName, {\n    id: 'lastName',\n    cell: (info) => `<i>${info.getValue()}</i>`,\n    header: () => `<span>Last Name</span>`,\n    footer: (info) => info.column.id,\n  }),\n  // accessorFn used to transform the data\n  columnHelper.accessor((row) => Number(row.age), {\n    id: 'age',\n    header: () => 'Age',\n    cell: (info) => info.renderValue(),\n    footer: (info) => info.column.id,\n  }),\n  columnHelper.accessor('visits', {\n    header: () => `<span>Visits</span>`,\n    footer: (info) => info.column.id,\n  }),\n  columnHelper.accessor('status', {\n    header: 'Status',\n    footer: (info) => info.column.id,\n  }),\n  columnHelper.accessor('progress', {\n    header: 'Profile Progress',\n    footer: (info) => info.column.id,\n  }),\n])\n\n@Component({\n  selector: 'app-root',\n  imports: [FlexRender],\n  templateUrl: './app.html',\n  changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class App {\n  readonly data = signal<Array<Person>>(defaultData)\n\n  // 6. Create the table instance with the required columns and data.\n  // Features and row models are already defined in the createTableHook call above\n  readonly table = injectAppTable(() => ({\n    columns,\n    data: this.data(),\n    // add additional table options here or in the createTableHook call above\n  }))\n\n  rerender() {\n    this.data.set([...defaultData.sort(() => -1)])\n  }\n}\n"
  },
  {
    "path": "examples/angular/basic-app-table/src/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"utf-8\" />\n    <title>Basic App Table</title>\n    <base href=\"/\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n    <link rel=\"icon\" type=\"image/x-icon\" href=\"favicon.ico\" />\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n  </head>\n  <body>\n    <app-root></app-root>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/angular/basic-app-table/src/main.ts",
    "content": "import { bootstrapApplication } from '@angular/platform-browser'\nimport { appConfig } from './app/app.config'\nimport { App } from './app/app'\n\nbootstrapApplication(App, appConfig).catch((err) => console.error(err))\n"
  },
  {
    "path": "examples/angular/basic-app-table/src/styles.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n\n.pagination-actions {\n  margin: 10px;\n  display: flex;\n  gap: 10px;\n}\n"
  },
  {
    "path": "examples/angular/basic-app-table/tsconfig.app.json",
    "content": "/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */\n/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */\n{\n  \"extends\": \"./tsconfig.json\",\n  \"compilerOptions\": {\n    \"outDir\": \"./out-tsc/app\",\n    \"types\": []\n  },\n  \"include\": [\"src/**/*.ts\"],\n  \"exclude\": [\"src/**/*.spec.ts\"]\n}\n"
  },
  {
    "path": "examples/angular/basic-app-table/tsconfig.json",
    "content": "/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */\n/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */\n{\n  \"compileOnSave\": false,\n  \"compilerOptions\": {\n    \"strict\": true,\n    \"noImplicitOverride\": true,\n    \"noPropertyAccessFromIndexSignature\": true,\n    \"noImplicitReturns\": true,\n    \"noFallthroughCasesInSwitch\": true,\n    \"skipLibCheck\": true,\n    \"isolatedModules\": true,\n    \"experimentalDecorators\": true,\n    \"importHelpers\": true,\n    \"target\": \"ES2022\",\n    \"module\": \"preserve\"\n  },\n  \"angularCompilerOptions\": {\n    \"enableI18nLegacyMessageIdFormat\": false,\n    \"strictInjectionParameters\": true,\n    \"strictInputAccessModifiers\": true,\n    \"strictTemplates\": true\n  }\n}\n"
  },
  {
    "path": "examples/angular/column-ordering/.gitignore",
    "content": "# See https://docs.github.com/get-started/getting-started-with-git/ignoring-files for more about ignoring files.\n\n# Compiled output\n/dist\n/tmp\n/out-tsc\n/bazel-out\n\n# Node\n/node_modules\nnpm-debug.log\nyarn-error.log\n\n# IDEs and editors\n.idea/\n.project\n.classpath\n.c9/\n*.launch\n.settings/\n*.sublime-workspace\n\n# Visual Studio Code\n.vscode/*\n!.vscode/settings.json\n!.vscode/tasks.json\n!.vscode/launch.json\n!.vscode/extensions.json\n!.vscode/mcp.json\n.history/*\n\n# Miscellaneous\n/.angular/cache\n.sass-cache/\n/connect.lock\n/coverage\n/libpeerconnection.log\ntestem.log\n/typings\n__screenshots__/\n\n# System files\n.DS_Store\nThumbs.db\n"
  },
  {
    "path": "examples/angular/column-ordering/README.md",
    "content": "# CustomPlugin\n\nThis project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 21.1.0.\n\n## Development server\n\nTo start a local development server, run:\n\n```bash\nng serve\n```\n\nOnce the server is running, open your browser and navigate to `http://localhost:4200/`. The application will automatically reload whenever you modify any of the source files.\n\n## Code scaffolding\n\nAngular CLI includes powerful code scaffolding tools. To generate a new component, run:\n\n```bash\nng generate component component-name\n```\n\nFor a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:\n\n```bash\nng generate --help\n```\n\n## Building\n\nTo build the project run:\n\n```bash\nng build\n```\n\nThis will compile your project and store the build artifacts in the `dist/` directory. By default, the production build optimizes your application for performance and speed.\n\n## Running unit tests\n\nTo execute unit tests with the [Vitest](https://vitest.dev/) test runner, use the following command:\n\n```bash\nng test\n```\n\n## Running end-to-end tests\n\nFor end-to-end (e2e) testing, run:\n\n```bash\nng e2e\n```\n\nAngular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.\n\n## Additional Resources\n\nFor more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.\n"
  },
  {
    "path": "examples/angular/column-ordering/angular.json",
    "content": "{\n  \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\n  \"version\": 1,\n  \"cli\": {\n    \"packageManager\": \"pnpm\",\n    \"analytics\": false,\n    \"cache\": {\n      \"enabled\": false\n    }\n  },\n  \"newProjectRoot\": \"projects\",\n  \"projects\": {\n    \"column-ordering\": {\n      \"projectType\": \"application\",\n      \"schematics\": {\n        \"@schematics/angular:component\": {\n          \"inlineTemplate\": true,\n          \"inlineStyle\": true,\n          \"skipTests\": true\n        },\n        \"@schematics/angular:class\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:directive\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:guard\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:interceptor\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:pipe\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:resolver\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:service\": {\n          \"skipTests\": true\n        }\n      },\n      \"root\": \"\",\n      \"sourceRoot\": \"src\",\n      \"prefix\": \"app\",\n      \"architect\": {\n        \"build\": {\n          \"builder\": \"@angular/build:application\",\n          \"options\": {\n            \"browser\": \"src/main.ts\",\n            \"tsConfig\": \"tsconfig.app.json\",\n            \"assets\": [\n              {\n                \"glob\": \"**/*\",\n                \"input\": \"public\"\n              }\n            ],\n            \"styles\": [\"src/styles.css\"]\n          },\n          \"configurations\": {\n            \"production\": {\n              \"budgets\": [\n                {\n                  \"type\": \"initial\",\n                  \"maximumWarning\": \"500kB\",\n                  \"maximumError\": \"1MB\"\n                },\n                {\n                  \"type\": \"anyComponentStyle\",\n                  \"maximumWarning\": \"4kB\",\n                  \"maximumError\": \"8kB\"\n                }\n              ],\n              \"outputHashing\": \"all\"\n            },\n            \"development\": {\n              \"optimization\": false,\n              \"extractLicenses\": false,\n              \"sourceMap\": true\n            }\n          },\n          \"defaultConfiguration\": \"production\"\n        },\n        \"serve\": {\n          \"builder\": \"@angular/build:dev-server\",\n          \"configurations\": {\n            \"production\": {\n              \"buildTarget\": \"column-ordering:build:production\"\n            },\n            \"development\": {\n              \"buildTarget\": \"column-ordering:build:development\"\n            }\n          },\n          \"defaultConfiguration\": \"development\"\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "examples/angular/column-ordering/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-angular-column-ordering\",\n  \"version\": \"0.0.0\",\n  \"scripts\": {\n    \"ng\": \"ng\",\n    \"start\": \"ng serve\",\n    \"build\": \"ng build\",\n    \"lint\": \"eslint ./src\",\n    \"watch\": \"ng build --watch --configuration development\"\n  },\n  \"private\": true,\n  \"packageManager\": \"pnpm@10.28.2\",\n  \"dependencies\": {\n    \"@angular/common\": \"^21.1.1\",\n    \"@angular/compiler\": \"^21.1.1\",\n    \"@angular/core\": \"^21.1.1\",\n    \"@angular/forms\": \"^21.1.1\",\n    \"@angular/platform-browser\": \"^21.1.1\",\n    \"@angular/router\": \"^21.1.1\",\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"@tanstack/angular-table\": \"^9.0.0-alpha.17\",\n    \"rxjs\": \"~7.8.2\",\n    \"tslib\": \"^2.8.1\"\n  },\n  \"devDependencies\": {\n    \"@angular/build\": \"^21.1.2\",\n    \"@angular/cli\": \"^21.1.2\",\n    \"@angular/compiler-cli\": \"^21.1.1\",\n    \"typescript\": \"5.9.3\"\n  }\n}\n"
  },
  {
    "path": "examples/angular/column-ordering/src/app/app.config.ts",
    "content": "import { provideBrowserGlobalErrorListeners } from '@angular/core'\nimport type { ApplicationConfig } from '@angular/core'\n\nexport const appConfig: ApplicationConfig = {\n  providers: [provideBrowserGlobalErrorListeners()],\n}\n"
  },
  {
    "path": "examples/angular/column-ordering/src/app/app.html",
    "content": "<div class=\"p-2\">\n  <div class=\"inline-block border border-black shadow rounded\">\n    <div class=\"px-1 border-b border-black\">\n      <label>\n        <input\n          type=\"checkbox\"\n          [checked]=\"table.getIsAllColumnsVisible()\"\n          (change)=\"table.getToggleAllColumnsVisibilityHandler()($event)\"\n        />\n        Toggle All\n      </label>\n    </div>\n\n    @for (column of table.getAllLeafColumns(); track column.id) {\n      <div class=\"px-1\">\n        <label>\n          <input\n            type=\"checkbox\"\n            [checked]=\"column.getIsVisible()\"\n            (change)=\"column.getToggleVisibilityHandler()($event)\"\n          />\n          {{ column.id }}\n        </label>\n      </div>\n    }\n  </div>\n\n  <div class=\"h-4\"></div>\n  <div class=\"flex flex-wrap gap-2\">\n    <button (click)=\"rerender()\" class=\"border p-1\">Regenerate</button>\n    <button (click)=\"randomizeColumns()\" class=\"border p-1\">Shuffle Columns</button>\n  </div>\n\n  <table>\n    <thead>\n      @for (headerGroup of table.getHeaderGroups(); track headerGroup.id) {\n        <tr>\n          @for (header of headerGroup.headers; track header.id) {\n            <th [attr.colSpan]=\"header.colSpan\">\n              @if (!header.isPlaceholder) {\n                <ng-container\n                  *flexRender=\"\n                    header.column.columnDef.header;\n                    props: header.getContext();\n                    let header\n                  \"\n                >\n                  {{ header }}\n                </ng-container>\n              }\n            </th>\n          }\n        </tr>\n      }\n    </thead>\n    <tbody>\n      @for (row of table.getRowModel().rows; track row.id) {\n        <tr>\n          @for (cell of row.getVisibleCells(); track cell.id) {\n            <td>\n              <ng-container\n                *flexRender=\"cell.column.columnDef.cell; props: cell.getContext(); let cell\"\n              >\n                {{ cell }}\n              </ng-container>\n            </td>\n          }\n        </tr>\n      }\n    </tbody>\n    <tfoot>\n      @for (footerGroup of table.getFooterGroups(); track footerGroup.id) {\n        <tr>\n          @for (header of footerGroup.headers; track header.id) {\n            <th [attr.colSpan]=\"header.colSpan\">\n              @if (!header.isPlaceholder) {\n                <ng-container\n                  *flexRender=\"\n                    header.column.columnDef.footer;\n                    props: header.getContext();\n                    let header\n                  \"\n                >\n                  {{ header }}\n                </ng-container>\n              }\n            </th>\n          }\n        </tr>\n      }\n    </tfoot>\n  </table>\n\n  <div class=\"h-4\"></div>\n  <pre>{{ stringifiedColumnOrdering() }}</pre>\n</div>\n"
  },
  {
    "path": "examples/angular/column-ordering/src/app/app.ts",
    "content": "import {\n  ChangeDetectionStrategy,\n  Component,\n  computed,\n  signal,\n} from '@angular/core'\nimport {\n  FlexRender,\n  columnOrderingFeature,\n  columnVisibilityFeature,\n  createColumnHelper,\n  injectTable,\n  tableFeatures,\n} from '@tanstack/angular-table'\nimport { faker } from '@faker-js/faker'\nimport { makeData } from './makeData'\nimport type { Person } from './makeData'\nimport type {\n  ColumnOrderState,\n  ColumnVisibilityState,\n} from '@tanstack/angular-table'\n\nconst _features = tableFeatures({\n  columnVisibilityFeature,\n  columnOrderingFeature,\n})\n\nconst columnHelper = createColumnHelper<typeof _features, Person>()\n\nconst defaultColumns = columnHelper.columns([\n  columnHelper.group({\n    header: 'Name',\n    footer: (props) => props.column.id,\n    columns: columnHelper.columns([\n      columnHelper.accessor('firstName', {\n        cell: (info) => info.getValue(),\n        footer: (props) => props.column.id,\n      }),\n      columnHelper.accessor('lastName', {\n        cell: (info) => info.getValue(),\n        header: () => 'Last Name',\n        footer: (props) => props.column.id,\n      }),\n    ]),\n  }),\n  columnHelper.group({\n    header: 'Info',\n    footer: (props) => props.column.id,\n    columns: columnHelper.columns([\n      columnHelper.accessor('age', {\n        header: () => 'Age',\n        footer: (props) => props.column.id,\n      }),\n      columnHelper.group({\n        header: 'More Info',\n        columns: columnHelper.columns([\n          columnHelper.accessor('visits', {\n            header: () => 'Visits',\n            footer: (props) => props.column.id,\n          }),\n          columnHelper.accessor('status', {\n            header: 'Status',\n            footer: (props) => props.column.id,\n          }),\n          columnHelper.accessor('progress', {\n            header: 'Profile Progress',\n            footer: (props) => props.column.id,\n          }),\n        ]),\n      }),\n    ]),\n  }),\n])\n\n@Component({\n  selector: 'app-root',\n  imports: [FlexRender],\n  templateUrl: './app.html',\n  changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class App {\n  readonly data = signal<Array<Person>>(makeData(20))\n  readonly columnVisibility = signal<ColumnVisibilityState>({})\n  readonly columnOrder = signal<ColumnOrderState>([])\n\n  readonly table = injectTable(() => ({\n    _features,\n    data: this.data(),\n    columns: defaultColumns,\n    state: {\n      columnOrder: this.columnOrder(),\n      columnVisibility: this.columnVisibility(),\n    },\n    onColumnVisibilityChange: (updaterOrValue) => {\n      typeof updaterOrValue === 'function'\n        ? this.columnVisibility.update(updaterOrValue)\n        : this.columnVisibility.set(updaterOrValue)\n    },\n    onColumnOrderChange: (updaterOrValue) => {\n      typeof updaterOrValue === 'function'\n        ? this.columnOrder.update(updaterOrValue)\n        : this.columnOrder.set(updaterOrValue)\n    },\n    debugTable: true,\n    debugHeaders: true,\n    debugColumns: true,\n  }))\n\n  readonly stringifiedColumnOrdering = computed(() => {\n    return JSON.stringify(this.table.state().columnOrder)\n  })\n\n  randomizeColumns() {\n    this.table.setColumnOrder(\n      faker.helpers.shuffle(this.table.getAllLeafColumns().map((d) => d.id)),\n    )\n  }\n\n  rerender() {\n    this.data.set([...makeData(20)])\n  }\n}\n"
  },
  {
    "path": "examples/angular/column-ordering/src/app/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  subRows?: Array<Person>\n}\n\nconst range = (len: number) => {\n  const arr: Array<number> = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (): Person => {\n  return {\n    firstName: faker.person.firstName(),\n    lastName: faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: faker.number.int(1000),\n    progress: faker.number.int(100),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0],\n  }\n}\n\nexport function makeData(...lens: Array<number>) {\n  const makeDataLevel = (depth = 0): Array<Person> => {\n    const len = lens[depth]\n    return range(len).map((d): Person => {\n      return {\n        ...newPerson(),\n        subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined,\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n"
  },
  {
    "path": "examples/angular/column-ordering/src/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"utf-8\" />\n    <title>Basic</title>\n    <base href=\"/\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n    <link rel=\"icon\" type=\"image/x-icon\" href=\"favicon.ico\" />\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n  </head>\n  <body>\n    <app-root></app-root>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/angular/column-ordering/src/main.ts",
    "content": "import { bootstrapApplication } from '@angular/platform-browser'\nimport { appConfig } from './app/app.config'\nimport { App } from './app/app'\n\nbootstrapApplication(App, appConfig).catch((err) => console.error(err))\n"
  },
  {
    "path": "examples/angular/column-ordering/src/styles.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntd {\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntd:last-child {\n  border-right: 0;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n"
  },
  {
    "path": "examples/angular/column-ordering/tsconfig.app.json",
    "content": "/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */\n/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */\n{\n  \"extends\": \"./tsconfig.json\",\n  \"compilerOptions\": {\n    \"outDir\": \"./out-tsc/app\",\n    \"types\": []\n  },\n  \"include\": [\"src/**/*.ts\"],\n  \"exclude\": [\"src/**/*.spec.ts\"]\n}\n"
  },
  {
    "path": "examples/angular/column-ordering/tsconfig.json",
    "content": "/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */\n/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */\n{\n  \"compileOnSave\": false,\n  \"compilerOptions\": {\n    \"strict\": true,\n    \"noImplicitOverride\": true,\n    \"noPropertyAccessFromIndexSignature\": true,\n    \"noImplicitReturns\": true,\n    \"noFallthroughCasesInSwitch\": true,\n    \"skipLibCheck\": true,\n    \"isolatedModules\": true,\n    \"experimentalDecorators\": true,\n    \"importHelpers\": true,\n    \"target\": \"ES2022\",\n    \"module\": \"preserve\"\n  },\n  \"angularCompilerOptions\": {\n    \"enableI18nLegacyMessageIdFormat\": false,\n    \"strictInjectionParameters\": true,\n    \"strictInputAccessModifiers\": true,\n    \"strictTemplates\": true\n  }\n}\n"
  },
  {
    "path": "examples/angular/column-pinning/.gitignore",
    "content": "# See https://docs.github.com/get-started/getting-started-with-git/ignoring-files for more about ignoring files.\n\n# Compiled output\n/dist\n/tmp\n/out-tsc\n/bazel-out\n\n# Node\n/node_modules\nnpm-debug.log\nyarn-error.log\n\n# IDEs and editors\n.idea/\n.project\n.classpath\n.c9/\n*.launch\n.settings/\n*.sublime-workspace\n\n# Visual Studio Code\n.vscode/*\n!.vscode/settings.json\n!.vscode/tasks.json\n!.vscode/launch.json\n!.vscode/extensions.json\n!.vscode/mcp.json\n.history/*\n\n# Miscellaneous\n/.angular/cache\n.sass-cache/\n/connect.lock\n/coverage\n/libpeerconnection.log\ntestem.log\n/typings\n__screenshots__/\n\n# System files\n.DS_Store\nThumbs.db\n"
  },
  {
    "path": "examples/angular/column-pinning/README.md",
    "content": "# Column Pinning\n\nThis project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 21.1.0.\n\n## Development server\n\nTo start a local development server, run:\n\n```bash\nng serve\n```\n\nOnce the server is running, open your browser and navigate to `http://localhost:4200/`. The application will automatically reload whenever you modify any of the source files.\n\n## Code scaffolding\n\nAngular CLI includes powerful code scaffolding tools. To generate a new component, run:\n\n```bash\nng generate component component-name\n```\n\nFor a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:\n\n```bash\nng generate --help\n```\n\n## Building\n\nTo build the project run:\n\n```bash\nng build\n```\n\nThis will compile your project and store the build artifacts in the `dist/` directory. By default, the production build optimizes your application for performance and speed.\n\n## Running unit tests\n\nTo execute unit tests with the [Vitest](https://vitest.dev/) test runner, use the following command:\n\n```bash\nng test\n```\n\n## Running end-to-end tests\n\nFor end-to-end (e2e) testing, run:\n\n```bash\nng e2e\n```\n\nAngular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.\n\n## Additional Resources\n\nFor more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.\n"
  },
  {
    "path": "examples/angular/column-pinning/angular.json",
    "content": "{\n  \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\n  \"version\": 1,\n  \"cli\": {\n    \"packageManager\": \"pnpm\",\n    \"analytics\": false,\n    \"cache\": {\n      \"enabled\": false\n    }\n  },\n  \"newProjectRoot\": \"projects\",\n  \"projects\": {\n    \"column-pinning\": {\n      \"projectType\": \"application\",\n      \"schematics\": {\n        \"@schematics/angular:component\": {\n          \"inlineTemplate\": true,\n          \"inlineStyle\": true,\n          \"skipTests\": true\n        },\n        \"@schematics/angular:class\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:directive\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:guard\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:interceptor\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:pipe\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:resolver\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:service\": {\n          \"skipTests\": true\n        }\n      },\n      \"root\": \"\",\n      \"sourceRoot\": \"src\",\n      \"prefix\": \"app\",\n      \"architect\": {\n        \"build\": {\n          \"builder\": \"@angular/build:application\",\n          \"options\": {\n            \"browser\": \"src/main.ts\",\n            \"tsConfig\": \"tsconfig.app.json\",\n            \"assets\": [\n              {\n                \"glob\": \"**/*\",\n                \"input\": \"public\"\n              }\n            ],\n            \"styles\": [\"src/styles.css\"]\n          },\n          \"configurations\": {\n            \"production\": {\n              \"budgets\": [\n                {\n                  \"type\": \"initial\",\n                  \"maximumWarning\": \"500kB\",\n                  \"maximumError\": \"1MB\"\n                },\n                {\n                  \"type\": \"anyComponentStyle\",\n                  \"maximumWarning\": \"4kB\",\n                  \"maximumError\": \"8kB\"\n                }\n              ],\n              \"outputHashing\": \"all\"\n            },\n            \"development\": {\n              \"optimization\": false,\n              \"extractLicenses\": false,\n              \"sourceMap\": true\n            }\n          },\n          \"defaultConfiguration\": \"production\"\n        },\n        \"serve\": {\n          \"builder\": \"@angular/build:dev-server\",\n          \"configurations\": {\n            \"production\": {\n              \"buildTarget\": \"column-pinning:build:production\"\n            },\n            \"development\": {\n              \"buildTarget\": \"column-pinning:build:development\"\n            }\n          },\n          \"defaultConfiguration\": \"development\"\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "examples/angular/column-pinning/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-angular-column-pinning\",\n  \"version\": \"0.0.0\",\n  \"scripts\": {\n    \"ng\": \"ng\",\n    \"start\": \"ng serve\",\n    \"build\": \"ng build\",\n    \"lint\": \"eslint ./src\",\n    \"watch\": \"ng build --watch --configuration development\"\n  },\n  \"private\": true,\n  \"packageManager\": \"pnpm@10.28.2\",\n  \"dependencies\": {\n    \"@angular/common\": \"^21.1.1\",\n    \"@angular/compiler\": \"^21.1.1\",\n    \"@angular/core\": \"^21.1.1\",\n    \"@angular/forms\": \"^21.1.1\",\n    \"@angular/platform-browser\": \"^21.1.1\",\n    \"@angular/router\": \"^21.1.1\",\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"@tanstack/angular-table\": \"^9.0.0-alpha.17\",\n    \"rxjs\": \"~7.8.2\",\n    \"tslib\": \"^2.8.1\"\n  },\n  \"devDependencies\": {\n    \"@angular/build\": \"^21.1.2\",\n    \"@angular/cli\": \"^21.1.2\",\n    \"@angular/compiler-cli\": \"^21.1.1\",\n    \"typescript\": \"5.9.3\"\n  }\n}\n"
  },
  {
    "path": "examples/angular/column-pinning/src/app/app.config.ts",
    "content": "import { provideBrowserGlobalErrorListeners } from '@angular/core'\nimport type { ApplicationConfig } from '@angular/core'\n\nexport const appConfig: ApplicationConfig = {\n  providers: [provideBrowserGlobalErrorListeners()],\n}\n"
  },
  {
    "path": "examples/angular/column-pinning/src/app/app.html",
    "content": "<div class=\"p-2\">\n  <div class=\"inline-block border border-black shadow rounded\">\n    <div class=\"px-1 border-b border-black\">\n      <label>\n        <input\n          type=\"checkbox\"\n          [checked]=\"table.getIsAllColumnsVisible()\"\n          (change)=\"table.getToggleAllColumnsVisibilityHandler()($event)\"\n        />\n        Toggle All\n      </label>\n    </div>\n\n    @for (column of table.getAllLeafColumns(); track column.id) {\n      <div class=\"px-1\">\n        <label>\n          <input\n            type=\"checkbox\"\n            [checked]=\"column.getIsVisible()\"\n            (change)=\"column.getToggleVisibilityHandler()($event)\"\n          />\n          {{ column.id }}\n        </label>\n      </div>\n    }\n  </div>\n\n  <div class=\"h-4\"></div>\n\n  <div class=\"flex flex-wrap gap-2\">\n    <button (click)=\"rerender()\" class=\"border p-1\">Regenerate</button>\n    <button (click)=\"randomizeColumns()\" class=\"border p-1\">Shuffle Columns</button>\n  </div>\n  <div class=\"h-4\"></div>\n  <div>\n    <label>\n      <input type=\"checkbox\" #input [checked]=\"split()\" (change)=\"split.set(input.checked)\" />\n      Split mode\n    </label>\n  </div>\n\n  <div class=\"flex\" [class.gap-4]=\"split()\">\n    <!-- Left Side -->\n    @if (split()) {\n      <table class=\"border-2 border-black\">\n        <thead>\n          @for (headerGroup of table.getLeftHeaderGroups(); track headerGroup.id) {\n            <tr>\n              @for (header of headerGroup.headers; track header.id) {\n                <th [attr.colSpan]=\"header.colSpan\">\n                  <div class=\"whitespace-nowrap\">\n                    @if (!header.isPlaceholder) {\n                      <ng-container\n                        *flexRender=\"\n                          header.column.columnDef.header;\n                          props: header.getContext();\n                          let headerValue\n                        \"\n                      >\n                        {{ headerValue }}\n                      </ng-container>\n                    }\n                  </div>\n\n                  <ng-container\n                    *ngTemplateOutlet=\"headerContentTpl; context: { $implicit: header }\"\n                  />\n                </th>\n              }\n            </tr>\n          }\n        </thead>\n\n        <tbody>\n          @for (row of table.getRowModel().rows | slice: 0 : 20; track row.id) {\n            <tr>\n              @for (cell of row.getLeftVisibleCells(); track cell.id) {\n                <td>\n                  <ng-container\n                    *flexRender=\"\n                      cell.column.columnDef.cell;\n                      props: cell.getContext();\n                      let cellValue\n                    \"\n                  >\n                    {{ cellValue }}\n                  </ng-container>\n                </td>\n              }\n            </tr>\n          }\n        </tbody>\n      </table>\n    }\n\n    <!-- Center Side -->\n    <table class=\"border-2 border-black\">\n      <thead>\n        @if (split() ? table.getCenterHeaderGroups() : table.getHeaderGroups(); as headerGroups) {\n          @for (headerGroup of headerGroups; track headerGroup.id) {\n            <tr>\n              @for (header of headerGroup.headers; track header.id) {\n                <th [attr.colSpan]=\"header.colSpan\">\n                  <div class=\"whitespace-nowrap\">\n                    @if (!header.isPlaceholder) {\n                      <ng-container\n                        *flexRender=\"\n                          header.column.columnDef.header;\n                          props: header.getContext();\n                          let headerValue\n                        \"\n                      >\n                        {{ headerValue }}\n                      </ng-container>\n                    }\n\n                    <ng-container\n                      *ngTemplateOutlet=\"headerContentTpl; context: { $implicit: header }\"\n                    />\n                  </div>\n                </th>\n              }\n            </tr>\n          }\n        }\n      </thead>\n      <tbody>\n        @for (row of table.getRowModel().rows | slice: 0 : 20; track row.id) {\n          @if (split() ? row.getCenterVisibleCells() : row.getVisibleCells(); as cells) {\n            <tr>\n              @for (cell of cells; track cell.id) {\n                <td>\n                  <ng-container\n                    *flexRender=\"\n                      cell.column.columnDef.cell;\n                      props: cell.getContext();\n                      let cellValue\n                    \"\n                  >\n                    {{ cellValue }}\n                  </ng-container>\n                </td>\n              }\n            </tr>\n          }\n        }\n      </tbody>\n    </table>\n\n    <!-- Right side -->\n    @if (split()) {\n      <table class=\"border-2 border-black\">\n        <thead>\n          @for (headerGroup of table.getRightHeaderGroups(); track headerGroup.id) {\n            <tr>\n              @for (header of headerGroup.headers; track header.id) {\n                <th [attr.colSpan]=\"header.colSpan\">\n                  <div class=\"whitespace-nowrap\">\n                    @if (!header.isPlaceholder) {\n                      <ng-container\n                        *flexRender=\"\n                          header.column.columnDef.header;\n                          props: header.getContext();\n                          let headerValue\n                        \"\n                      >\n                        {{ headerValue }}\n                      </ng-container>\n                    }\n                  </div>\n\n                  <ng-container\n                    *ngTemplateOutlet=\"headerContentTpl; context: { $implicit: header }\"\n                  />\n                </th>\n              }\n            </tr>\n          }\n        </thead>\n\n        <tbody>\n          @for (row of table.getRowModel().rows | slice: 0 : 20; track row.id) {\n            <tr>\n              @for (cell of row.getRightVisibleCells(); track cell.id) {\n                <td>\n                  <ng-container\n                    *flexRender=\"\n                      cell.column.columnDef.cell;\n                      props: cell.getContext();\n                      let cellValue\n                    \"\n                  >\n                    {{ cellValue }}\n                  </ng-container>\n                </td>\n              }\n            </tr>\n          }\n        </tbody>\n      </table>\n    }\n  </div>\n\n  <div class=\"h-4\"></div>\n  <pre>{{ stringifiedColumnPinning() }}</pre>\n</div>\n\n<ng-template #headerContentTpl let-header>\n  @if (!header.isPlaceholder && header.column.getCanPin()) {\n    <div class=\"flex gap-1 justify-center\">\n      @if (header.column.getIsPinned() !== 'left') {\n        <button class=\"border rounded px-2\" (click)=\"header.column.pin('left')\"><=</button>\n      }\n\n      @if (header.column.getIsPinned()) {\n        <button class=\"border rounded px-2\" (click)=\"header.column.pin(false)\">X</button>\n      }\n\n      @if (header.column.getIsPinned() !== 'right') {\n        <button class=\"border rounded px-2\" (click)=\"header.column.pin('right')\">=></button>\n      }\n    </div>\n  }\n</ng-template>\n"
  },
  {
    "path": "examples/angular/column-pinning/src/app/app.ts",
    "content": "import {\n  ChangeDetectionStrategy,\n  Component,\n  computed,\n  signal,\n} from '@angular/core'\nimport {\n  FlexRenderDirective,\n  columnOrderingFeature,\n  columnPinningFeature,\n  columnVisibilityFeature,\n  injectTable,\n  tableFeatures,\n} from '@tanstack/angular-table'\nimport { faker } from '@faker-js/faker'\nimport { NgTemplateOutlet, SlicePipe } from '@angular/common'\nimport { makeData } from './makeData'\nimport type { Person } from './makeData'\nimport type {\n  ColumnDef,\n  ColumnOrderState,\n  ColumnPinningState,\n  ColumnVisibilityState,\n} from '@tanstack/angular-table'\n\nconst _features = tableFeatures({\n  columnPinningFeature,\n  columnOrderingFeature,\n  columnVisibilityFeature,\n})\n\nconst defaultColumns: Array<ColumnDef<typeof _features, Person>> = [\n  {\n    header: 'Name',\n    footer: (props) => props.column.id,\n    columns: [\n      {\n        accessorKey: 'firstName',\n        cell: (info) => info.getValue(),\n        footer: (props) => props.column.id,\n      },\n      {\n        accessorFn: (row) => row.lastName,\n        id: 'lastName',\n        cell: (info) => info.getValue(),\n        header: () => 'Last Name',\n        footer: (props) => props.column.id,\n      },\n    ],\n  },\n  {\n    header: 'Info',\n    footer: (props) => props.column.id,\n    columns: [\n      {\n        accessorKey: 'age',\n        header: () => 'Age',\n        footer: (props) => props.column.id,\n      },\n      {\n        header: 'More Info',\n        columns: [\n          {\n            accessorKey: 'visits',\n            header: () => 'Visits',\n            footer: (props) => props.column.id,\n          },\n          {\n            accessorKey: 'status',\n            header: 'Status',\n            footer: (props) => props.column.id,\n          },\n          {\n            accessorKey: 'progress',\n            header: 'Profile Progress',\n            footer: (props) => props.column.id,\n          },\n        ],\n      },\n    ],\n  },\n]\n\n@Component({\n  selector: 'app-root',\n  imports: [FlexRenderDirective, SlicePipe, NgTemplateOutlet],\n  templateUrl: './app.html',\n  changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class App {\n  readonly data = signal<Array<Person>>(makeData(5000))\n  readonly columnVisibility = signal<ColumnVisibilityState>({})\n  readonly columnOrder = signal<ColumnOrderState>([])\n  readonly columnPinning = signal<ColumnPinningState>({\n    left: [],\n    right: [],\n  })\n  readonly split = signal(false)\n\n  table = injectTable(() => ({\n    _features,\n    columns: defaultColumns,\n    data: this.data(),\n    state: {\n      columnVisibility: this.columnVisibility(),\n      columnOrder: this.columnOrder(),\n      columnPinning: this.columnPinning(),\n    },\n    onColumnVisibilityChange: (updaterOrValue) => {\n      typeof updaterOrValue === 'function'\n        ? this.columnVisibility.update(updaterOrValue)\n        : this.columnVisibility.set(updaterOrValue)\n    },\n    onColumnOrderChange: (updaterOrValue) => {\n      typeof updaterOrValue === 'function'\n        ? this.columnOrder.update(updaterOrValue)\n        : this.columnOrder.set(updaterOrValue)\n    },\n    onColumnPinningChange: (updaterOrValue) => {\n      typeof updaterOrValue === 'function'\n        ? this.columnPinning.update(updaterOrValue)\n        : this.columnPinning.set(updaterOrValue)\n    },\n    debugTable: true,\n    debugHeaders: true,\n    debugColumns: true,\n  }))\n\n  stringifiedColumnPinning = computed(() => {\n    return JSON.stringify(this.table.state().columnPinning)\n  })\n\n  randomizeColumns() {\n    this.table.setColumnOrder(\n      faker.helpers.shuffle(this.table.getAllLeafColumns().map((d) => d.id)),\n    )\n  }\n\n  rerender() {\n    this.data.set(makeData(5000))\n  }\n}\n"
  },
  {
    "path": "examples/angular/column-pinning/src/app/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  subRows?: Array<Person>\n}\n\nconst range = (len: number) => {\n  const arr: Array<number> = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (): Person => {\n  return {\n    firstName: faker.person.firstName(),\n    lastName: faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: faker.number.int(1000),\n    progress: faker.number.int(100),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0],\n  }\n}\n\nexport function makeData(...lens: Array<number>) {\n  const makeDataLevel = (depth = 0): Array<Person> => {\n    const len = lens[depth]\n    return range(len).map((d): Person => {\n      return {\n        ...newPerson(),\n        subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined,\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n"
  },
  {
    "path": "examples/angular/column-pinning/src/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"utf-8\" />\n    <title>Basic</title>\n    <base href=\"/\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n    <link rel=\"icon\" type=\"image/x-icon\" href=\"favicon.ico\" />\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n  </head>\n  <body>\n    <app-root></app-root>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/angular/column-pinning/src/main.ts",
    "content": "import { bootstrapApplication } from '@angular/platform-browser'\nimport { appConfig } from './app/app.config'\nimport { App } from './app/app'\n\nbootstrapApplication(App, appConfig).catch((err) => console.error(err))\n"
  },
  {
    "path": "examples/angular/column-pinning/src/styles.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntd {\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntd:last-child {\n  border-right: 0;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n"
  },
  {
    "path": "examples/angular/column-pinning/tsconfig.app.json",
    "content": "/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */\n/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */\n{\n  \"extends\": \"./tsconfig.json\",\n  \"compilerOptions\": {\n    \"outDir\": \"./out-tsc/app\",\n    \"types\": []\n  },\n  \"include\": [\"src/**/*.ts\"],\n  \"exclude\": [\"src/**/*.spec.ts\"]\n}\n"
  },
  {
    "path": "examples/angular/column-pinning/tsconfig.json",
    "content": "/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */\n/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */\n{\n  \"compileOnSave\": false,\n  \"compilerOptions\": {\n    \"strict\": true,\n    \"noImplicitOverride\": true,\n    \"noPropertyAccessFromIndexSignature\": true,\n    \"noImplicitReturns\": true,\n    \"noFallthroughCasesInSwitch\": true,\n    \"skipLibCheck\": true,\n    \"isolatedModules\": true,\n    \"experimentalDecorators\": true,\n    \"importHelpers\": true,\n    \"target\": \"ES2022\",\n    \"module\": \"preserve\"\n  },\n  \"angularCompilerOptions\": {\n    \"enableI18nLegacyMessageIdFormat\": false,\n    \"strictInjectionParameters\": true,\n    \"strictInputAccessModifiers\": true,\n    \"strictTemplates\": true\n  }\n}\n"
  },
  {
    "path": "examples/angular/column-pinning-sticky/.gitignore",
    "content": "# See https://docs.github.com/get-started/getting-started-with-git/ignoring-files for more about ignoring files.\n\n# Compiled output\n/dist\n/tmp\n/out-tsc\n/bazel-out\n\n# Node\n/node_modules\nnpm-debug.log\nyarn-error.log\n\n# IDEs and editors\n.idea/\n.project\n.classpath\n.c9/\n*.launch\n.settings/\n*.sublime-workspace\n\n# Visual Studio Code\n.vscode/*\n!.vscode/settings.json\n!.vscode/tasks.json\n!.vscode/launch.json\n!.vscode/extensions.json\n!.vscode/mcp.json\n.history/*\n\n# Miscellaneous\n/.angular/cache\n.sass-cache/\n/connect.lock\n/coverage\n/libpeerconnection.log\ntestem.log\n/typings\n__screenshots__/\n\n# System files\n.DS_Store\nThumbs.db\n"
  },
  {
    "path": "examples/angular/column-pinning-sticky/README.md",
    "content": "# Column Pinning Sticky\n\nThis project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 21.1.0.\n\n## Development server\n\nTo start a local development server, run:\n\n```bash\nng serve\n```\n\nOnce the server is running, open your browser and navigate to `http://localhost:4200/`. The application will automatically reload whenever you modify any of the source files.\n\n## Code scaffolding\n\nAngular CLI includes powerful code scaffolding tools. To generate a new component, run:\n\n```bash\nng generate component component-name\n```\n\nFor a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:\n\n```bash\nng generate --help\n```\n\n## Building\n\nTo build the project run:\n\n```bash\nng build\n```\n\nThis will compile your project and store the build artifacts in the `dist/` directory. By default, the production build optimizes your application for performance and speed.\n\n## Running unit tests\n\nTo execute unit tests with the [Vitest](https://vitest.dev/) test runner, use the following command:\n\n```bash\nng test\n```\n\n## Running end-to-end tests\n\nFor end-to-end (e2e) testing, run:\n\n```bash\nng e2e\n```\n\nAngular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.\n\n## Additional Resources\n\nFor more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.\n"
  },
  {
    "path": "examples/angular/column-pinning-sticky/angular.json",
    "content": "{\n  \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\n  \"version\": 1,\n  \"cli\": {\n    \"packageManager\": \"pnpm\",\n    \"analytics\": false,\n    \"cache\": {\n      \"enabled\": false\n    }\n  },\n  \"newProjectRoot\": \"projects\",\n  \"projects\": {\n    \"column-pinning-sticky\": {\n      \"projectType\": \"application\",\n      \"schematics\": {\n        \"@schematics/angular:component\": {\n          \"inlineTemplate\": true,\n          \"inlineStyle\": true,\n          \"skipTests\": true\n        },\n        \"@schematics/angular:class\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:directive\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:guard\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:interceptor\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:pipe\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:resolver\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:service\": {\n          \"skipTests\": true\n        }\n      },\n      \"root\": \"\",\n      \"sourceRoot\": \"src\",\n      \"prefix\": \"app\",\n      \"architect\": {\n        \"build\": {\n          \"builder\": \"@angular/build:application\",\n          \"options\": {\n            \"browser\": \"src/main.ts\",\n            \"tsConfig\": \"tsconfig.app.json\",\n            \"assets\": [\n              {\n                \"glob\": \"**/*\",\n                \"input\": \"public\"\n              }\n            ],\n            \"styles\": [\"src/styles.css\"]\n          },\n          \"configurations\": {\n            \"production\": {\n              \"budgets\": [\n                {\n                  \"type\": \"initial\",\n                  \"maximumWarning\": \"500kB\",\n                  \"maximumError\": \"1MB\"\n                },\n                {\n                  \"type\": \"anyComponentStyle\",\n                  \"maximumWarning\": \"4kB\",\n                  \"maximumError\": \"8kB\"\n                }\n              ],\n              \"outputHashing\": \"all\"\n            },\n            \"development\": {\n              \"optimization\": false,\n              \"extractLicenses\": false,\n              \"sourceMap\": true\n            }\n          },\n          \"defaultConfiguration\": \"production\"\n        },\n        \"serve\": {\n          \"builder\": \"@angular/build:dev-server\",\n          \"configurations\": {\n            \"production\": {\n              \"buildTarget\": \"column-pinning-sticky:build:production\"\n            },\n            \"development\": {\n              \"buildTarget\": \"column-pinning-sticky:build:development\"\n            }\n          },\n          \"defaultConfiguration\": \"development\"\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "examples/angular/column-pinning-sticky/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-angular-column-pinning-sticky\",\n  \"version\": \"0.0.0\",\n  \"scripts\": {\n    \"ng\": \"ng\",\n    \"start\": \"ng serve\",\n    \"build\": \"ng build\",\n    \"lint\": \"eslint ./src\",\n    \"watch\": \"ng build --watch --configuration development\"\n  },\n  \"private\": true,\n  \"packageManager\": \"pnpm@10.28.2\",\n  \"dependencies\": {\n    \"@angular/common\": \"^21.1.1\",\n    \"@angular/compiler\": \"^21.1.1\",\n    \"@angular/core\": \"^21.1.1\",\n    \"@angular/forms\": \"^21.1.1\",\n    \"@angular/platform-browser\": \"^21.1.1\",\n    \"@angular/router\": \"^21.1.1\",\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"@tanstack/angular-table\": \"^9.0.0-alpha.17\",\n    \"rxjs\": \"~7.8.2\",\n    \"tslib\": \"^2.8.1\"\n  },\n  \"devDependencies\": {\n    \"@angular/build\": \"^21.1.2\",\n    \"@angular/cli\": \"^21.1.2\",\n    \"@angular/compiler-cli\": \"^21.1.1\",\n    \"typescript\": \"5.9.3\"\n  }\n}\n"
  },
  {
    "path": "examples/angular/column-pinning-sticky/src/app/app.config.ts",
    "content": "import { provideBrowserGlobalErrorListeners } from '@angular/core'\nimport type { ApplicationConfig } from '@angular/core'\n\nexport const appConfig: ApplicationConfig = {\n  providers: [provideBrowserGlobalErrorListeners()],\n}\n"
  },
  {
    "path": "examples/angular/column-pinning-sticky/src/app/app.html",
    "content": "<div class=\"p-2\">\n  <div class=\"inline-block border border-black shadow rounded\">\n    <div class=\"px-1 border-b border-black\">\n      <label>\n        <input\n          type=\"checkbox\"\n          [checked]=\"table.getIsAllColumnsVisible()\"\n          (change)=\"table.getToggleAllColumnsVisibilityHandler()($event)\"\n        />\n        Toggle All\n      </label>\n    </div>\n\n    @for (column of table.getAllLeafColumns(); track column.id) {\n      <div class=\"px-1\">\n        <label>\n          <input\n            type=\"checkbox\"\n            [checked]=\"column.getIsVisible()\"\n            (change)=\"column.getToggleVisibilityHandler()($event)\"\n          />\n          {{ column.id }}\n        </label>\n      </div>\n    }\n  </div>\n\n  <div class=\"h-4\"></div>\n\n  <div class=\"flex flex-wrap gap-2\">\n    <button (click)=\"rerender()\" class=\"border p-1\">Regenerate</button>\n    <button (click)=\"randomizeColumns()\" class=\"border p-1\">Shuffle Columns</button>\n  </div>\n  <div class=\"h-4\"></div>\n\n  <div class=\"table-container\">\n    <table [style.width.px]=\"table.getTotalSize()\">\n      <thead>\n        @for (headerGroup of table.getHeaderGroups(); track headerGroup.id) {\n          <tr>\n            @for (header of headerGroup.headers; track header.id) {\n              <!-- IMPORTANT: This is where the magic happens! -->\n              <th [attr.colSpan]=\"header.colSpan\" [style]=\"getCommonPinningStyles(header.column)\">\n                <div class=\"whitespace-nowrap\">\n                  @if (!header.isPlaceholder) {\n                    <ng-container\n                      *flexRender=\"\n                        header.column.columnDef.header;\n                        props: header.getContext();\n                        let headerValue\n                      \"\n                    >\n                      {{ headerValue }}\n                    </ng-container>\n                  }\n                  <!-- Demo getIndex behavior -->\n                  {{ header.column.getIndex(header.column.getIsPinned() || 'center') }}\n                </div>\n\n                @if (!header.isPlaceholder && header.column.getCanPin()) {\n                  <div class=\"flex gap-1 justify-center\">\n                    @if (header.column.getIsPinned() !== 'left') {\n                      <button class=\"border rounded px-2\" (click)=\"header.column.pin('left')\">\n                        <=\n                      </button>\n                    }\n\n                    @if (header.column.getIsPinned()) {\n                      <button class=\"border rounded px-2\" (click)=\"header.column.pin(false)\">\n                        X\n                      </button>\n                    }\n\n                    @if (header.column.getIsPinned() !== 'right') {\n                      <button class=\"border rounded px-2\" (click)=\"header.column.pin('right')\">\n                        =>\n                      </button>\n                    }\n                  </div>\n                }\n\n                <!-- Resize column -->\n                <div\n                  class=\"resizer\"\n                  [class.isResizing]=\"header.column.getIsResizing()\"\n                  (dblclick)=\"header.column.resetSize()\"\n                  (mousedown)=\"header.getResizeHandler()($event)\"\n                  (touchstart)=\"header.getResizeHandler()($event)\"\n                ></div>\n              </th>\n            }\n          </tr>\n        }\n      </thead>\n      <tbody>\n        @for (row of table.getRowModel().rows; track row.id) {\n          <tr>\n            @for (cell of row.getVisibleCells(); track cell.id) {\n              <td [style]=\"getCommonPinningStyles(cell.column)\">\n                <ng-container\n                  *flexRender=\"cell.column.columnDef.cell; props: cell.getContext(); let cellValue\"\n                >\n                  {{ cellValue }}\n                </ng-container>\n              </td>\n            }\n          </tr>\n        }\n      </tbody>\n    </table>\n  </div>\n</div>\n\n<div class=\"h-4\"></div>\n<pre>{{ stringifiedColumnPinning() }}</pre>\n"
  },
  {
    "path": "examples/angular/column-pinning-sticky/src/app/app.ts",
    "content": "import { Component, computed, signal } from '@angular/core'\nimport {\n  FlexRender,\n  columnOrderingFeature,\n  columnPinningFeature,\n  columnResizingFeature,\n  columnSizingFeature,\n  columnVisibilityFeature,\n  createColumnHelper,\n  injectTable,\n  tableFeatures,\n} from '@tanstack/angular-table'\nimport { faker } from '@faker-js/faker'\nimport { makeData } from './makeData'\nimport type { Person } from './makeData'\nimport type {\n  Column,\n  ColumnOrderState,\n  ColumnPinningState,\n  ColumnVisibilityState,\n} from '@tanstack/angular-table'\n\nconst _features = tableFeatures({\n  columnOrderingFeature,\n  columnPinningFeature,\n  columnResizingFeature,\n  columnSizingFeature,\n  columnVisibilityFeature,\n})\n\nconst columnHelper = createColumnHelper<typeof _features, Person>()\n\nconst defaultColumns = columnHelper.columns([\n  columnHelper.accessor('firstName', {\n    id: 'firstName',\n    header: 'First Name',\n    cell: (info) => info.getValue(),\n    footer: (props) => props.column.id,\n    size: 180,\n  }),\n  columnHelper.accessor('lastName', {\n    id: 'lastName',\n    cell: (info) => info.getValue(),\n    header: () => 'Last Name',\n    footer: (props) => props.column.id,\n    size: 180,\n  }),\n  columnHelper.accessor('age', {\n    id: 'age',\n    header: 'Age',\n    footer: (props) => props.column.id,\n    size: 180,\n  }),\n  columnHelper.accessor('visits', {\n    id: 'visits',\n    header: 'Visits',\n    footer: (props) => props.column.id,\n    size: 180,\n  }),\n  columnHelper.accessor('status', {\n    id: 'status',\n    header: 'Status',\n    footer: (props) => props.column.id,\n    size: 180,\n  }),\n  columnHelper.accessor('progress', {\n    id: 'progress',\n    header: 'Profile Progress',\n    footer: (props) => props.column.id,\n    size: 180,\n  }),\n])\n\n@Component({\n  selector: 'app-root',\n  imports: [FlexRender],\n  templateUrl: './app.html',\n})\nexport class App {\n  readonly columns = signal([...defaultColumns])\n  readonly data = signal<Array<Person>>(makeData(30))\n  readonly columnVisibility = signal<ColumnVisibilityState>({})\n  readonly columnOrder = signal<ColumnOrderState>([])\n  readonly columnPinning = signal<ColumnPinningState>({\n    left: [],\n    right: [],\n  })\n  readonly split = signal(false)\n\n  table = injectTable(() => ({\n    _features,\n    columns: this.columns(),\n    data: this.data(),\n    debugTable: true,\n    debugHeaders: true,\n    debugColumns: true,\n    columnResizeMode: 'onChange' as const,\n  }))\n\n  stringifiedColumnPinning = computed(() => {\n    return JSON.stringify(this.table.state().columnPinning)\n  })\n\n  readonly getCommonPinningStyles = (\n    column: Column<any, Person>,\n  ): Record<string, any> => {\n    const isPinned = column.getIsPinned()\n    const isLastLeftPinnedColumn =\n      isPinned === 'left' && column.getIsLastColumn('left')\n    const isFirstRightPinnedColumn =\n      isPinned === 'right' && column.getIsFirstColumn('right')\n\n    return {\n      boxShadow: isLastLeftPinnedColumn\n        ? '-4px 0 4px -4px gray inset'\n        : isFirstRightPinnedColumn\n          ? '4px 0 4px -4px gray inset'\n          : undefined,\n      left: isPinned === 'left' ? `${column.getStart('left')}px` : undefined,\n      right: isPinned === 'right' ? `${column.getAfter('right')}px` : undefined,\n      opacity: isPinned ? 0.95 : 1,\n      position: isPinned ? 'sticky' : 'relative',\n      width: `${column.getSize()}px`,\n      zIndex: isPinned ? 1 : 0,\n    }\n  }\n\n  randomizeColumns() {\n    this.table.setColumnOrder(\n      faker.helpers.shuffle(this.table.getAllLeafColumns().map((d) => d.id)),\n    )\n  }\n\n  rerender() {\n    this.data.set(makeData(30))\n  }\n}\n"
  },
  {
    "path": "examples/angular/column-pinning-sticky/src/app/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  subRows?: Array<Person>\n}\n\nconst range = (len: number) => {\n  const arr: Array<number> = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (): Person => {\n  return {\n    firstName: faker.person.firstName(),\n    lastName: faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: faker.number.int(1000),\n    progress: faker.number.int(100),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0],\n  }\n}\n\nexport function makeData(...lens: Array<number>) {\n  const makeDataLevel = (depth = 0): Array<Person> => {\n    const len = lens[depth]\n    return range(len).map((d): Person => {\n      return {\n        ...newPerson(),\n        subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined,\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n"
  },
  {
    "path": "examples/angular/column-pinning-sticky/src/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"utf-8\" />\n    <title>Column Pinning Sticky</title>\n    <base href=\"/\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n    <link rel=\"icon\" type=\"image/x-icon\" href=\"favicon.ico\" />\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n  </head>\n  <body>\n    <app-root></app-root>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/angular/column-pinning-sticky/src/main.ts",
    "content": "import { bootstrapApplication } from '@angular/platform-browser'\nimport { appConfig } from './app/app.config'\nimport { App } from './app/app'\n\nbootstrapApplication(App, appConfig).catch((err) => console.error(err))\n"
  },
  {
    "path": "examples/angular/column-pinning-sticky/src/styles.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\n.table-container {\n  border: 1px solid lightgray;\n  overflow-x: scroll;\n  width: 100%;\n  max-width: 960px;\n  position: relative;\n}\n\ntable {\n  /* box-shadow and borders will not work with position: sticky otherwise */\n  border-collapse: separate !important;\n  border-spacing: 0;\n}\n\nth {\n  background-color: lightgray;\n  border-bottom: 1px solid lightgray;\n  font-weight: bold;\n  height: 30px;\n  padding: 2px 4px;\n  position: relative;\n  text-align: center;\n}\n\ntd {\n  background-color: white;\n  padding: 2px 4px;\n}\n\n.resizer {\n  background: rgba(0, 0, 0, 0.5);\n  cursor: col-resize;\n  height: 100%;\n  position: absolute;\n  right: 0;\n  top: 0;\n  touch-action: none;\n  user-select: none;\n  width: 5px;\n}\n\n.resizer.isResizing {\n  background: blue;\n  opacity: 1;\n}\n"
  },
  {
    "path": "examples/angular/column-pinning-sticky/tsconfig.app.json",
    "content": "/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */\n/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */\n{\n  \"extends\": \"./tsconfig.json\",\n  \"compilerOptions\": {\n    \"outDir\": \"./out-tsc/app\",\n    \"types\": []\n  },\n  \"include\": [\"src/**/*.ts\"],\n  \"exclude\": [\"src/**/*.spec.ts\"]\n}\n"
  },
  {
    "path": "examples/angular/column-pinning-sticky/tsconfig.json",
    "content": "/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */\n/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */\n{\n  \"compileOnSave\": false,\n  \"compilerOptions\": {\n    \"strict\": true,\n    \"noImplicitOverride\": true,\n    \"noPropertyAccessFromIndexSignature\": true,\n    \"noImplicitReturns\": true,\n    \"noFallthroughCasesInSwitch\": true,\n    \"skipLibCheck\": true,\n    \"isolatedModules\": true,\n    \"experimentalDecorators\": true,\n    \"importHelpers\": true,\n    \"target\": \"ES2022\",\n    \"module\": \"preserve\"\n  },\n  \"angularCompilerOptions\": {\n    \"enableI18nLegacyMessageIdFormat\": false,\n    \"strictInjectionParameters\": true,\n    \"strictInputAccessModifiers\": true,\n    \"strictTemplates\": true\n  }\n}\n"
  },
  {
    "path": "examples/angular/column-resizing-performant/.gitignore",
    "content": "# See https://docs.github.com/get-started/getting-started-with-git/ignoring-files for more about ignoring files.\n\n# Compiled output\n/dist\n/tmp\n/out-tsc\n/bazel-out\n\n# Node\n/node_modules\nnpm-debug.log\nyarn-error.log\n\n# IDEs and editors\n.idea/\n.project\n.classpath\n.c9/\n*.launch\n.settings/\n*.sublime-workspace\n\n# Visual Studio Code\n.vscode/*\n!.vscode/settings.json\n!.vscode/tasks.json\n!.vscode/launch.json\n!.vscode/extensions.json\n!.vscode/mcp.json\n.history/*\n\n# Miscellaneous\n/.angular/cache\n.sass-cache/\n/connect.lock\n/coverage\n/libpeerconnection.log\ntestem.log\n/typings\n__screenshots__/\n\n# System files\n.DS_Store\nThumbs.db\n"
  },
  {
    "path": "examples/angular/column-resizing-performant/README.md",
    "content": "# Column Resizing Performant\n\nThis project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 21.1.0.\n\n## Development server\n\nTo start a local development server, run:\n\n```bash\nng serve\n```\n\nOnce the server is running, open your browser and navigate to `http://localhost:4200/`. The application will automatically reload whenever you modify any of the source files.\n\n## Code scaffolding\n\nAngular CLI includes powerful code scaffolding tools. To generate a new component, run:\n\n```bash\nng generate component component-name\n```\n\nFor a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:\n\n```bash\nng generate --help\n```\n\n## Building\n\nTo build the project run:\n\n```bash\nng build\n```\n\nThis will compile your project and store the build artifacts in the `dist/` directory. By default, the production build optimizes your application for performance and speed.\n\n## Running unit tests\n\nTo execute unit tests with the [Vitest](https://vitest.dev/) test runner, use the following command:\n\n```bash\nng test\n```\n\n## Running end-to-end tests\n\nFor end-to-end (e2e) testing, run:\n\n```bash\nng e2e\n```\n\nAngular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.\n\n## Additional Resources\n\nFor more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.\n"
  },
  {
    "path": "examples/angular/column-resizing-performant/angular.json",
    "content": "{\n  \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\n  \"version\": 1,\n  \"cli\": {\n    \"packageManager\": \"pnpm\",\n    \"analytics\": false,\n    \"cache\": {\n      \"enabled\": false\n    }\n  },\n  \"newProjectRoot\": \"projects\",\n  \"projects\": {\n    \"column-pinning-sticky\": {\n      \"projectType\": \"application\",\n      \"schematics\": {\n        \"@schematics/angular:component\": {\n          \"inlineTemplate\": true,\n          \"inlineStyle\": true,\n          \"skipTests\": true\n        },\n        \"@schematics/angular:class\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:directive\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:guard\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:interceptor\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:pipe\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:resolver\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:service\": {\n          \"skipTests\": true\n        }\n      },\n      \"root\": \"\",\n      \"sourceRoot\": \"src\",\n      \"prefix\": \"app\",\n      \"architect\": {\n        \"build\": {\n          \"builder\": \"@angular/build:application\",\n          \"options\": {\n            \"browser\": \"src/main.ts\",\n            \"tsConfig\": \"tsconfig.app.json\",\n            \"assets\": [\n              {\n                \"glob\": \"**/*\",\n                \"input\": \"public\"\n              }\n            ],\n            \"styles\": [\"src/styles.css\"]\n          },\n          \"configurations\": {\n            \"production\": {\n              \"budgets\": [\n                {\n                  \"type\": \"initial\",\n                  \"maximumWarning\": \"500kB\",\n                  \"maximumError\": \"1MB\"\n                },\n                {\n                  \"type\": \"anyComponentStyle\",\n                  \"maximumWarning\": \"4kB\",\n                  \"maximumError\": \"8kB\"\n                }\n              ],\n              \"outputHashing\": \"all\"\n            },\n            \"development\": {\n              \"optimization\": false,\n              \"extractLicenses\": false,\n              \"sourceMap\": true\n            }\n          },\n          \"defaultConfiguration\": \"production\"\n        },\n        \"serve\": {\n          \"builder\": \"@angular/build:dev-server\",\n          \"configurations\": {\n            \"production\": {\n              \"buildTarget\": \"column-pinning-sticky:build:production\"\n            },\n            \"development\": {\n              \"buildTarget\": \"column-pinning-sticky:build:development\"\n            }\n          },\n          \"defaultConfiguration\": \"development\"\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "examples/angular/column-resizing-performant/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-angular-column-resizing-performant\",\n  \"version\": \"0.0.0\",\n  \"scripts\": {\n    \"ng\": \"ng\",\n    \"start\": \"ng serve\",\n    \"build\": \"ng build\",\n    \"lint\": \"eslint ./src\",\n    \"watch\": \"ng build --watch --configuration development\"\n  },\n  \"private\": true,\n  \"packageManager\": \"pnpm@10.28.2\",\n  \"dependencies\": {\n    \"@angular/common\": \"^21.1.1\",\n    \"@angular/compiler\": \"^21.1.1\",\n    \"@angular/core\": \"^21.1.1\",\n    \"@angular/forms\": \"^21.1.1\",\n    \"@angular/platform-browser\": \"^21.1.1\",\n    \"@angular/router\": \"^21.1.1\",\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"@tanstack/angular-table\": \"^9.0.0-alpha.17\",\n    \"rxjs\": \"~7.8.2\",\n    \"tslib\": \"^2.8.1\"\n  },\n  \"devDependencies\": {\n    \"@angular/build\": \"^21.1.2\",\n    \"@angular/cli\": \"^21.1.2\",\n    \"@angular/compiler-cli\": \"^21.1.1\",\n    \"typescript\": \"5.9.3\"\n  }\n}\n"
  },
  {
    "path": "examples/angular/column-resizing-performant/src/app/app.config.ts",
    "content": "import { provideBrowserGlobalErrorListeners } from '@angular/core'\nimport type { ApplicationConfig } from '@angular/core'\n\nexport const appConfig: ApplicationConfig = {\n  providers: [provideBrowserGlobalErrorListeners()],\n}\n"
  },
  {
    "path": "examples/angular/column-resizing-performant/src/app/app.html",
    "content": "<div class=\"p-2\">\n  <div class=\"h-4\"></div>\n  <pre [style.min-height]=\"'10rem'\">\n    {{ columnSizingDebugInfo() }}\n  </pre>\n  <div class=\"h-4\"></div>\n\n  ({{ data().length }} rows)\n\n  <div class=\"overflow-x-auto\">\n    <div class=\"divTable\" [style]=\"columnSizeVars()\" [style.width.px]=\"table.getTotalSize()\">\n      <div class=\"thead\">\n        @for (headerGroup of table.getHeaderGroups(); track headerGroup.id) {\n          <div class=\"tr\">\n            @for (header of headerGroup.headers; track header.id) {\n              <div class=\"th\" [tableResizableHeader]=\"header.id\">\n                @if (!header.isPlaceholder) {\n                  <ng-container *flexRenderHeader=\"header; let header\">\n                    <div [innerHTML]=\"header\"></div>\n                  </ng-container>\n                }\n\n                <div\n                  class=\"resizer\"\n                  [class.isResizing]=\"header.column.getIsResizing()\"\n                  (dblclick)=\"header.column.resetSize()\"\n                  (mousedown)=\"header.getResizeHandler()($event)\"\n                  (touchstart)=\"header.getResizeHandler()($event)\"\n                ></div>\n              </div>\n            }\n          </div>\n        }\n      </div>\n      <div class=\"tbody\">\n        @for (row of table.getRowModel().rows; track row.id) {\n          <div class=\"tr\">\n            @for (cell of row.getAllCells(); track cell.id) {\n              <div class=\"td\" [tableResizableCell]=\"cell.column.id\">\n                <ng-container *flexRenderCell=\"cell; let cell\">\n                  <div [innerHTML]=\"cell\"></div>\n                </ng-container>\n              </div>\n            }\n          </div>\n        }\n      </div>\n    </div>\n  </div>\n</div>\n"
  },
  {
    "path": "examples/angular/column-resizing-performant/src/app/app.ts",
    "content": "import {\n  ChangeDetectionStrategy,\n  Component,\n  computed,\n  signal,\n  untracked,\n} from '@angular/core'\nimport {\n  FlexRender,\n  columnResizingFeature,\n  columnSizingFeature,\n  injectTable,\n  tableFeatures,\n} from '@tanstack/angular-table'\nimport { makeData } from './makeData'\nimport { TableResizableCells } from './resizable-cell/resizable-cell'\nimport type { Person } from './makeData'\nimport type { ColumnDef, ColumnResizeMode } from '@tanstack/angular-table'\n\nconst _features = tableFeatures({\n  columnSizingFeature,\n  columnResizingFeature,\n})\n\nconst defaultColumns: Array<ColumnDef<typeof _features, Person>> = [\n  {\n    header: 'Name',\n    footer: (props) => props.column.id,\n    columns: [\n      {\n        accessorKey: 'firstName',\n        cell: (info) => info.getValue(),\n        footer: (props) => props.column.id,\n      },\n      {\n        accessorFn: (row) => row.lastName,\n        id: 'lastName',\n        cell: (info) => info.getValue(),\n        header: () => 'Last Name',\n        footer: (props) => props.column.id,\n      },\n    ],\n  },\n  {\n    header: 'Info',\n    footer: (props) => props.column.id,\n    columns: [\n      {\n        accessorKey: 'age',\n        header: () => 'Age',\n        footer: (props) => props.column.id,\n      },\n      {\n        accessorKey: 'visits',\n        header: () => 'Visits',\n        footer: (props) => props.column.id,\n      },\n      {\n        accessorKey: 'status',\n        header: 'Status',\n        footer: (props) => props.column.id,\n      },\n      {\n        accessorKey: 'progress',\n        header: 'Profile Progress',\n        footer: (props) => props.column.id,\n      },\n    ],\n  },\n]\n\n@Component({\n  selector: 'app-root',\n  imports: [FlexRender, TableResizableCells],\n  templateUrl: './app.html',\n  changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class App {\n  readonly data = signal<Array<Person>>(makeData(200))\n\n  readonly table = injectTable(() => ({\n    data: this.data(),\n    _features,\n    columns: defaultColumns,\n    columnResizeMode: 'onChange' as ColumnResizeMode,\n    defaultColumn: {\n      minSize: 60,\n      maxSize: 800,\n    },\n    debugTable: true,\n    debugHeaders: true,\n    debugColumns: true,\n  }))\n\n  readonly columnSizing = this.table.computed({\n    selector: (state) => state.columnSizing,\n  })\n\n  /**\n   * Instead of calling `column.getSize()` on every render for every header\n   * and especially every data cell (very expensive),\n   * we will calculate all column sizes at once at the root table level in a useMemo\n   * and pass the column sizes down as CSS variables to the <table> element.\n   */\n  readonly columnSizeVars = computed(() => {\n    void this.columnSizing()\n    const headers = untracked(() => this.table.getFlatHeaders())\n    const colSizes: { [key: string]: number } = {}\n    let i = headers.length\n    while (--i >= 0) {\n      const header = headers[i]\n      colSizes[`--header-${header.id}-size`] = header.getSize()\n      colSizes[`--col-${header.column.id}-size`] = header.column.getSize()\n    }\n    return colSizes\n  })\n\n  readonly columnSizingDebugInfo = computed(() =>\n    JSON.stringify(\n      {\n        columnSizing: this.columnSizing(),\n      },\n      null,\n      2,\n    ),\n  )\n}\n"
  },
  {
    "path": "examples/angular/column-resizing-performant/src/app/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  subRows?: Array<Person>\n}\n\nconst range = (len: number) => {\n  const arr: Array<number> = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (): Person => {\n  return {\n    firstName: faker.person.firstName(),\n    lastName: faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: faker.number.int(1000),\n    progress: faker.number.int(100),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0],\n  }\n}\n\nexport function makeData(...lens: Array<number>) {\n  const makeDataLevel = (depth = 0): Array<Person> => {\n    const len = lens[depth]\n    return range(len).map((d): Person => {\n      return {\n        ...newPerson(),\n        subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined,\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n"
  },
  {
    "path": "examples/angular/column-resizing-performant/src/app/resizable-cell/resizable-cell.ts",
    "content": "import { Directive, computed, input } from '@angular/core'\n\n@Directive({\n  selector: '[tableResizableHeader]',\n  host: {\n    '[style.width]': 'width()',\n  },\n  standalone: true,\n})\nexport class TableResizableHeader {\n  readonly cellId = input.required<string>({\n    alias: 'tableResizableHeader',\n  })\n\n  readonly width = computed(\n    () => `calc(var(--header-${this.cellId()}-size) * 1px)`,\n  )\n}\n\n@Directive({\n  selector: '[tableResizableCell]',\n  host: {\n    '[style.width]': 'width()',\n  },\n  standalone: true,\n})\nexport class TableResizableCell {\n  readonly cellId = input.required<string>({\n    alias: 'tableResizableCell',\n  })\n\n  readonly width = computed(\n    () => `calc(var(--col-${this.cellId()}-size) * 1px)`,\n  )\n}\n\nexport const TableResizableCells = [\n  TableResizableCell,\n  TableResizableHeader,\n] as const\n"
  },
  {
    "path": "examples/angular/column-resizing-performant/src/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"utf-8\" />\n    <title>Performant Column Resizing</title>\n    <base href=\"/\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n    <link rel=\"icon\" type=\"image/x-icon\" href=\"favicon.ico\" />\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n  </head>\n  <body>\n    <app-root></app-root>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/angular/column-resizing-performant/src/main.ts",
    "content": "import { bootstrapApplication } from '@angular/platform-browser'\nimport { appConfig } from './app/app.config'\nimport { App } from './app/app'\n\nbootstrapApplication(App, appConfig).catch((err) => console.error(err))\n"
  },
  {
    "path": "examples/angular/column-resizing-performant/src/styles.css",
    "content": "* {\n  box-sizing: border-box;\n}\n\nhtml {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable,\n.divTable {\n  display: block;\n  border: 1px solid lightgray;\n  width: fit-content;\n}\n\n.tr {\n  display: flex;\n}\n\ntr,\n.tr {\n  width: fit-content;\n  height: 30px;\n}\n\nth,\n.th,\ntd,\n.td {\n  box-shadow: inset 0 0 0 1px lightgray;\n  padding: 0.25rem;\n}\n\nth,\n.th {\n  padding: 2px 4px;\n  position: relative;\n  font-weight: bold;\n  text-align: center;\n  height: 30px;\n}\n\ntd,\n.td {\n  height: 30px;\n}\n\n.resizer {\n  position: absolute;\n  top: 0;\n  height: 100%;\n  right: 0;\n  width: 5px;\n  background: rgba(0, 0, 0, 0.5);\n  cursor: col-resize;\n  user-select: none;\n  touch-action: none;\n}\n\n.resizer.isResizing {\n  background: blue;\n  opacity: 1;\n}\n\n@media (hover: hover) {\n  .resizer {\n    opacity: 0;\n  }\n\n  *:hover > .resizer {\n    opacity: 1;\n  }\n}\n"
  },
  {
    "path": "examples/angular/column-resizing-performant/tsconfig.app.json",
    "content": "/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */\n/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */\n{\n  \"extends\": \"./tsconfig.json\",\n  \"compilerOptions\": {\n    \"outDir\": \"./out-tsc/app\",\n    \"types\": []\n  },\n  \"include\": [\"src/**/*.ts\"],\n  \"exclude\": [\"src/**/*.spec.ts\"]\n}\n"
  },
  {
    "path": "examples/angular/column-resizing-performant/tsconfig.json",
    "content": "/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */\n/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */\n{\n  \"compileOnSave\": false,\n  \"compilerOptions\": {\n    \"strict\": true,\n    \"noImplicitOverride\": true,\n    \"noPropertyAccessFromIndexSignature\": true,\n    \"noImplicitReturns\": true,\n    \"noFallthroughCasesInSwitch\": true,\n    \"skipLibCheck\": true,\n    \"isolatedModules\": true,\n    \"experimentalDecorators\": true,\n    \"importHelpers\": true,\n    \"target\": \"ES2022\",\n    \"module\": \"preserve\"\n  },\n  \"angularCompilerOptions\": {\n    \"enableI18nLegacyMessageIdFormat\": false,\n    \"strictInjectionParameters\": true,\n    \"strictInputAccessModifiers\": true,\n    \"strictTemplates\": true\n  }\n}\n"
  },
  {
    "path": "examples/angular/column-visibility/.gitignore",
    "content": "# See https://docs.github.com/get-started/getting-started-with-git/ignoring-files for more about ignoring files.\n\n# Compiled output\n/dist\n/tmp\n/out-tsc\n/bazel-out\n\n# Node\n/node_modules\nnpm-debug.log\nyarn-error.log\n\n# IDEs and editors\n.idea/\n.project\n.classpath\n.c9/\n*.launch\n.settings/\n*.sublime-workspace\n\n# Visual Studio Code\n.vscode/*\n!.vscode/settings.json\n!.vscode/tasks.json\n!.vscode/launch.json\n!.vscode/extensions.json\n!.vscode/mcp.json\n.history/*\n\n# Miscellaneous\n/.angular/cache\n.sass-cache/\n/connect.lock\n/coverage\n/libpeerconnection.log\ntestem.log\n/typings\n__screenshots__/\n\n# System files\n.DS_Store\nThumbs.db\n"
  },
  {
    "path": "examples/angular/column-visibility/README.md",
    "content": "# Column Visibility\n\nThis project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 21.1.0.\n\n## Development server\n\nTo start a local development server, run:\n\n```bash\nng serve\n```\n\nOnce the server is running, open your browser and navigate to `http://localhost:4200/`. The application will automatically reload whenever you modify any of the source files.\n\n## Code scaffolding\n\nAngular CLI includes powerful code scaffolding tools. To generate a new component, run:\n\n```bash\nng generate component component-name\n```\n\nFor a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:\n\n```bash\nng generate --help\n```\n\n## Building\n\nTo build the project run:\n\n```bash\nng build\n```\n\nThis will compile your project and store the build artifacts in the `dist/` directory. By default, the production build optimizes your application for performance and speed.\n\n## Running unit tests\n\nTo execute unit tests with the [Vitest](https://vitest.dev/) test runner, use the following command:\n\n```bash\nng test\n```\n\n## Running end-to-end tests\n\nFor end-to-end (e2e) testing, run:\n\n```bash\nng e2e\n```\n\nAngular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.\n\n## Additional Resources\n\nFor more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.\n"
  },
  {
    "path": "examples/angular/column-visibility/angular.json",
    "content": "{\n  \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\n  \"version\": 1,\n  \"cli\": {\n    \"packageManager\": \"pnpm\",\n    \"analytics\": false,\n    \"cache\": {\n      \"enabled\": false\n    }\n  },\n  \"newProjectRoot\": \"projects\",\n  \"projects\": {\n    \"column-visibility\": {\n      \"projectType\": \"application\",\n      \"schematics\": {\n        \"@schematics/angular:component\": {\n          \"inlineTemplate\": true,\n          \"inlineStyle\": true,\n          \"skipTests\": true\n        },\n        \"@schematics/angular:class\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:directive\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:guard\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:interceptor\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:pipe\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:resolver\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:service\": {\n          \"skipTests\": true\n        }\n      },\n      \"root\": \"\",\n      \"sourceRoot\": \"src\",\n      \"prefix\": \"app\",\n      \"architect\": {\n        \"build\": {\n          \"builder\": \"@angular/build:application\",\n          \"options\": {\n            \"browser\": \"src/main.ts\",\n            \"tsConfig\": \"tsconfig.app.json\",\n            \"assets\": [\n              {\n                \"glob\": \"**/*\",\n                \"input\": \"public\"\n              }\n            ],\n            \"styles\": [\"src/styles.css\"]\n          },\n          \"configurations\": {\n            \"production\": {\n              \"budgets\": [\n                {\n                  \"type\": \"initial\",\n                  \"maximumWarning\": \"500kB\",\n                  \"maximumError\": \"1MB\"\n                },\n                {\n                  \"type\": \"anyComponentStyle\",\n                  \"maximumWarning\": \"4kB\",\n                  \"maximumError\": \"8kB\"\n                }\n              ],\n              \"outputHashing\": \"all\"\n            },\n            \"development\": {\n              \"optimization\": false,\n              \"extractLicenses\": false,\n              \"sourceMap\": true\n            }\n          },\n          \"defaultConfiguration\": \"production\"\n        },\n        \"serve\": {\n          \"builder\": \"@angular/build:dev-server\",\n          \"configurations\": {\n            \"production\": {\n              \"buildTarget\": \"column-visibility:build:production\"\n            },\n            \"development\": {\n              \"buildTarget\": \"column-visibility:build:development\"\n            }\n          },\n          \"defaultConfiguration\": \"development\"\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "examples/angular/column-visibility/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-angular-column-visibility\",\n  \"version\": \"0.0.0\",\n  \"scripts\": {\n    \"ng\": \"ng\",\n    \"start\": \"ng serve\",\n    \"build\": \"ng build\",\n    \"lint\": \"eslint ./src\",\n    \"watch\": \"ng build --watch --configuration development\"\n  },\n  \"private\": true,\n  \"packageManager\": \"pnpm@10.28.2\",\n  \"dependencies\": {\n    \"@angular/common\": \"^21.1.1\",\n    \"@angular/compiler\": \"^21.1.1\",\n    \"@angular/core\": \"^21.1.1\",\n    \"@angular/forms\": \"^21.1.1\",\n    \"@angular/platform-browser\": \"^21.1.1\",\n    \"@angular/router\": \"^21.1.1\",\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"@tanstack/angular-table\": \"^9.0.0-alpha.17\",\n    \"rxjs\": \"~7.8.2\",\n    \"tslib\": \"^2.8.1\"\n  },\n  \"devDependencies\": {\n    \"@angular/build\": \"^21.1.2\",\n    \"@angular/cli\": \"^21.1.2\",\n    \"@angular/compiler-cli\": \"^21.1.1\",\n    \"typescript\": \"5.9.3\"\n  }\n}\n"
  },
  {
    "path": "examples/angular/column-visibility/src/app/app.config.ts",
    "content": "import { provideBrowserGlobalErrorListeners } from '@angular/core'\nimport type { ApplicationConfig } from '@angular/core'\n\nexport const appConfig: ApplicationConfig = {\n  providers: [provideBrowserGlobalErrorListeners()],\n}\n"
  },
  {
    "path": "examples/angular/column-visibility/src/app/app.html",
    "content": "<div class=\"p-2\">\n  <div class=\"inline-block border border-black shadow rounded\">\n    <div class=\"px-1 border-b border-black\">\n      <label>\n        <input\n          type=\"checkbox\"\n          [checked]=\"table.getIsAllColumnsVisible()\"\n          (change)=\"table.getToggleAllColumnsVisibilityHandler()($event)\"\n        />\n        Toggle All\n      </label>\n    </div>\n\n    @for (column of table.getAllLeafColumns(); track column.id) {\n      <div class=\"px-1\">\n        <label>\n          <input\n            type=\"checkbox\"\n            [checked]=\"column.getIsVisible()\"\n            (change)=\"column.getToggleVisibilityHandler()($event)\"\n          />\n          {{ column.id }}\n        </label>\n      </div>\n    }\n  </div>\n\n  <div class=\"h-4\"></div>\n\n  <table>\n    <thead>\n      @for (headerGroup of table.getHeaderGroups(); track headerGroup.id) {\n        <tr>\n          @for (header of headerGroup.headers; track header.id) {\n            <th [attr.colSpan]=\"header.colSpan\">\n              @if (!header.isPlaceholder) {\n                <ng-container *flexRenderHeader=\"header; let header\">\n                  {{ header }}\n                </ng-container>\n              }\n            </th>\n          }\n        </tr>\n      }\n    </thead>\n    <tbody>\n      @for (row of table.getRowModel().rows; track row.id) {\n        <tr>\n          @for (cell of row.getVisibleCells(); track cell.id) {\n            <td>\n              <ng-container *flexRenderCell=\"cell; let cell\">\n                {{ cell }}\n              </ng-container>\n            </td>\n          }\n        </tr>\n      }\n    </tbody>\n    <tfoot>\n      @for (footerGroup of table.getFooterGroups(); track footerGroup.id) {\n        <tr>\n          @for (header of footerGroup.headers; track header.id) {\n            <th [attr.colSpan]=\"header.colSpan\">\n              @if (!header.isPlaceholder) {\n                <ng-container *flexRenderFooter=\"header; let header\">\n                  {{ header }}\n                </ng-container>\n              }\n            </th>\n          }\n        </tr>\n      }\n    </tfoot>\n  </table>\n\n  <div class=\"h-4\"></div>\n  <button (click)=\"rerender()\" class=\"border p-2\">Rerender</button>\n\n  <div class=\"h-4\"></div>\n  <pre>{{ stringifiedColumnVisibility() }}</pre>\n</div>\n"
  },
  {
    "path": "examples/angular/column-visibility/src/app/app.ts",
    "content": "import {\n  ChangeDetectionStrategy,\n  Component,\n  computed,\n  signal,\n} from '@angular/core'\nimport {\n  FlexRender,\n  columnVisibilityFeature,\n  injectTable,\n  isFunction,\n  tableFeatures,\n} from '@tanstack/angular-table'\nimport type { ColumnDef, ColumnVisibilityState } from '@tanstack/angular-table'\n\ntype Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  status: string\n  progress: number\n}\n\nconst _features = tableFeatures({\n  columnVisibilityFeature,\n})\n\nconst defaultData: Array<Person> = [\n  {\n    firstName: 'tanner',\n    lastName: 'linsley',\n    age: 24,\n    visits: 100,\n    status: 'In Relationship',\n    progress: 50,\n  },\n  {\n    firstName: 'tandy',\n    lastName: 'miller',\n    age: 40,\n    visits: 40,\n    status: 'Single',\n    progress: 80,\n  },\n  {\n    firstName: 'joe',\n    lastName: 'dirte',\n    age: 45,\n    visits: 20,\n    status: 'Complicated',\n    progress: 10,\n  },\n]\n\nconst defaultColumns: Array<ColumnDef<typeof _features, Person>> = [\n  {\n    header: 'Name',\n    footer: (props) => props.column.id,\n    columns: [\n      {\n        accessorKey: 'firstName',\n        cell: (info) => info.getValue(),\n        footer: (props) => props.column.id,\n      },\n      {\n        accessorFn: (row) => row.lastName,\n        id: 'lastName',\n        cell: (info) => info.getValue(),\n        header: () => 'Last Name',\n        footer: (props) => props.column.id,\n      },\n    ],\n  },\n  {\n    header: 'Info',\n    footer: (props) => props.column.id,\n    columns: [\n      {\n        accessorKey: 'age',\n        header: () => 'Age',\n        footer: (props) => props.column.id,\n      },\n      {\n        header: 'More Info',\n        columns: [\n          {\n            accessorKey: 'visits',\n            header: () => 'Visits',\n            footer: (props) => props.column.id,\n          },\n          {\n            accessorKey: 'status',\n            header: 'Status',\n            footer: (props) => props.column.id,\n          },\n          {\n            accessorKey: 'progress',\n            header: 'Profile Progress',\n            footer: (props) => props.column.id,\n          },\n        ],\n      },\n    ],\n  },\n]\n\n@Component({\n  selector: 'app-root',\n  imports: [FlexRender],\n  templateUrl: './app.html',\n  changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class App {\n  readonly data = signal<Array<Person>>(defaultData)\n  readonly columnVisibility = signal<ColumnVisibilityState>({})\n\n  readonly table = injectTable(() => ({\n    _features,\n    columns: defaultColumns,\n    data: this.data(),\n    state: {\n      columnVisibility: this.columnVisibility(),\n    },\n    onColumnVisibilityChange: (updaterOrValue) => {\n      const visibilityState = isFunction(updaterOrValue)\n        ? updaterOrValue(this.columnVisibility())\n        : updaterOrValue\n      this.columnVisibility.set(visibilityState)\n    },\n    debugTable: true,\n    debugHeaders: true,\n    debugColumns: true,\n  }))\n\n  readonly stringifiedColumnVisibility = computed(() => {\n    return JSON.stringify(this.table.state().columnVisibility)\n  })\n\n  rerender() {\n    this.data.update((data) => [...data.reverse()])\n  }\n}\n"
  },
  {
    "path": "examples/angular/column-visibility/src/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"utf-8\" />\n    <title>Column Visibility</title>\n    <base href=\"/\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n    <link rel=\"icon\" type=\"image/x-icon\" href=\"favicon.ico\" />\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n  </head>\n  <body>\n    <app-root></app-root>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/angular/column-visibility/src/main.ts",
    "content": "import { bootstrapApplication } from '@angular/platform-browser'\nimport { appConfig } from './app/app.config'\nimport { App } from './app/app'\n\nbootstrapApplication(App, appConfig).catch((err) => console.error(err))\n"
  },
  {
    "path": "examples/angular/column-visibility/src/styles.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n\n.pagination-actions {\n  margin: 10px;\n  display: flex;\n  gap: 10px;\n}\n"
  },
  {
    "path": "examples/angular/column-visibility/tsconfig.app.json",
    "content": "/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */\n/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */\n{\n  \"extends\": \"./tsconfig.json\",\n  \"compilerOptions\": {\n    \"outDir\": \"./out-tsc/app\",\n    \"types\": []\n  },\n  \"include\": [\"src/**/*.ts\"],\n  \"exclude\": [\"src/**/*.spec.ts\"]\n}\n"
  },
  {
    "path": "examples/angular/column-visibility/tsconfig.json",
    "content": "/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */\n/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */\n{\n  \"compileOnSave\": false,\n  \"compilerOptions\": {\n    \"strict\": true,\n    \"noImplicitOverride\": true,\n    \"noPropertyAccessFromIndexSignature\": true,\n    \"noImplicitReturns\": true,\n    \"noFallthroughCasesInSwitch\": true,\n    \"skipLibCheck\": true,\n    \"isolatedModules\": true,\n    \"experimentalDecorators\": true,\n    \"importHelpers\": true,\n    \"target\": \"ES2022\",\n    \"module\": \"preserve\"\n  },\n  \"angularCompilerOptions\": {\n    \"enableI18nLegacyMessageIdFormat\": false,\n    \"strictInjectionParameters\": true,\n    \"strictInputAccessModifiers\": true,\n    \"strictTemplates\": true\n  }\n}\n"
  },
  {
    "path": "examples/angular/composable-tables/.gitignore",
    "content": "# See https://docs.github.com/get-started/getting-started-with-git/ignoring-files for more about ignoring files.\n\n# Compiled output\n/dist\n/tmp\n/out-tsc\n/bazel-out\n\n# Node\n/node_modules\nnpm-debug.log\nyarn-error.log\n\n# IDEs and editors\n.idea/\n.project\n.classpath\n.c9/\n*.launch\n.settings/\n*.sublime-workspace\n\n# Visual Studio Code\n.vscode/*\n!.vscode/settings.json\n!.vscode/tasks.json\n!.vscode/launch.json\n!.vscode/extensions.json\n!.vscode/mcp.json\n.history/*\n\n# Miscellaneous\n/.angular/cache\n.sass-cache/\n/connect.lock\n/coverage\n/libpeerconnection.log\ntestem.log\n/typings\n__screenshots__/\n\n# System files\n.DS_Store\nThumbs.db\n"
  },
  {
    "path": "examples/angular/composable-tables/README.md",
    "content": "# Composable Tables\n\nThis project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 21.1.0.\n\n## Development server\n\nTo start a local development server, run:\n\n```bash\nng serve\n```\n\nOnce the server is running, open your browser and navigate to `http://localhost:4200/`. The application will automatically reload whenever you modify any of the source files.\n\n## Code scaffolding\n\nAngular CLI includes powerful code scaffolding tools. To generate a new component, run:\n\n```bash\nng generate component component-name\n```\n\nFor a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:\n\n```bash\nng generate --help\n```\n\n## Building\n\nTo build the project run:\n\n```bash\nng build\n```\n\nThis will compile your project and store the build artifacts in the `dist/` directory. By default, the production build optimizes your application for performance and speed.\n\n## Running unit tests\n\nTo execute unit tests with the [Vitest](https://vitest.dev/) test runner, use the following command:\n\n```bash\nng test\n```\n\n## Running end-to-end tests\n\nFor end-to-end (e2e) testing, run:\n\n```bash\nng e2e\n```\n\nAngular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.\n\n## Additional Resources\n\nFor more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.\n"
  },
  {
    "path": "examples/angular/composable-tables/angular.json",
    "content": "{\n  \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\n  \"version\": 1,\n  \"cli\": {\n    \"packageManager\": \"pnpm\",\n    \"analytics\": false,\n    \"cache\": {\n      \"enabled\": false\n    }\n  },\n  \"newProjectRoot\": \"projects\",\n  \"projects\": {\n    \"composable-tables\": {\n      \"projectType\": \"application\",\n      \"schematics\": {\n        \"@schematics/angular:component\": {\n          \"inlineTemplate\": true,\n          \"inlineStyle\": true,\n          \"skipTests\": true\n        },\n        \"@schematics/angular:class\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:directive\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:guard\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:interceptor\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:pipe\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:resolver\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:service\": {\n          \"skipTests\": true\n        }\n      },\n      \"root\": \"\",\n      \"sourceRoot\": \"src\",\n      \"prefix\": \"app\",\n      \"architect\": {\n        \"build\": {\n          \"builder\": \"@angular/build:application\",\n          \"options\": {\n            \"browser\": \"src/main.ts\",\n            \"tsConfig\": \"tsconfig.app.json\",\n            \"assets\": [\n              {\n                \"glob\": \"**/*\",\n                \"input\": \"public\"\n              }\n            ],\n            \"styles\": [\"src/styles.css\"]\n          },\n          \"configurations\": {\n            \"production\": {\n              \"budgets\": [\n                {\n                  \"type\": \"initial\",\n                  \"maximumWarning\": \"500kB\",\n                  \"maximumError\": \"1MB\"\n                },\n                {\n                  \"type\": \"anyComponentStyle\",\n                  \"maximumWarning\": \"4kB\",\n                  \"maximumError\": \"8kB\"\n                }\n              ],\n              \"outputHashing\": \"all\"\n            },\n            \"development\": {\n              \"optimization\": false,\n              \"extractLicenses\": false,\n              \"sourceMap\": true\n            }\n          },\n          \"defaultConfiguration\": \"production\"\n        },\n        \"serve\": {\n          \"builder\": \"@angular/build:dev-server\",\n          \"configurations\": {\n            \"production\": {\n              \"buildTarget\": \"composable-tables:build:production\"\n            },\n            \"development\": {\n              \"buildTarget\": \"composable-tables:build:development\"\n            }\n          },\n          \"defaultConfiguration\": \"development\"\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "examples/angular/composable-tables/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-angular-composable-tables\",\n  \"version\": \"0.0.0\",\n  \"scripts\": {\n    \"ng\": \"ng\",\n    \"start\": \"ng serve\",\n    \"build\": \"ng build\",\n    \"lint\": \"eslint ./src\",\n    \"watch\": \"ng build --watch --configuration development\"\n  },\n  \"private\": true,\n  \"packageManager\": \"pnpm@10.28.2\",\n  \"dependencies\": {\n    \"@angular/common\": \"^21.1.1\",\n    \"@angular/compiler\": \"^21.1.1\",\n    \"@angular/core\": \"^21.1.1\",\n    \"@angular/forms\": \"^21.1.1\",\n    \"@angular/platform-browser\": \"^21.1.1\",\n    \"@angular/router\": \"^21.1.1\",\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"@tanstack/angular-table\": \"^9.0.0-alpha.17\",\n    \"rxjs\": \"~7.8.2\",\n    \"tslib\": \"^2.8.1\"\n  },\n  \"devDependencies\": {\n    \"@angular/build\": \"^21.1.2\",\n    \"@angular/cli\": \"^21.1.2\",\n    \"@angular/compiler-cli\": \"^21.1.1\",\n    \"typescript\": \"5.9.3\"\n  }\n}\n"
  },
  {
    "path": "examples/angular/composable-tables/src/app/app.config.ts",
    "content": "import { provideBrowserGlobalErrorListeners } from '@angular/core'\nimport type { ApplicationConfig } from '@angular/core'\n\nexport const appConfig: ApplicationConfig = {\n  providers: [provideBrowserGlobalErrorListeners()],\n}\n"
  },
  {
    "path": "examples/angular/composable-tables/src/app/app.ts",
    "content": "import { ChangeDetectionStrategy, Component } from '@angular/core'\nimport { UsersTable } from './components/users-table/users-table'\nimport { ProductsTable } from './components/products-table/products-table'\n\n@Component({\n  selector: 'app-root',\n  imports: [UsersTable, ProductsTable],\n  host: {\n    class: 'app',\n  },\n  template: `\n    <h1>Composable Tables Example</h1>\n    <p class=\"description\">\n      Both tables below use the same <code>injectAppTable</code> function and\n      shareable components, but with different data types and column\n      configurations.\n    </p>\n\n    <users-table />\n\n    <div class=\"table-divider\"></div>\n\n    <products-table />\n  `,\n  changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class App {}\n"
  },
  {
    "path": "examples/angular/composable-tables/src/app/components/cell-components.ts",
    "content": "import { Component, computed } from '@angular/core'\nimport { injectFlexRenderContext } from '@tanstack/angular-table'\nimport { CurrencyPipe } from '@angular/common'\nimport { injectTableCellContext } from '../table'\nimport type { CellContext, TableFeatures } from '@tanstack/angular-table'\nimport type { Person } from '../makeData'\n\n@Component({\n  // Using dynamic components with Angular, we can just put a simple selector\n  // that will be rendered, but we need to specify an unique host property\n  // that will identify this component\n  selector: 'span',\n  host: {\n    'tanstack-table-text-cell': '',\n  },\n  template: ` {{ cell.getValue() }} `,\n})\nexport class TextCell {\n  readonly cell =\n    injectFlexRenderContext<CellContext<TableFeatures, any, string>>()\n}\n\n@Component({\n  selector: 'span',\n  host: {\n    'tanstack-table-number-cell': '',\n  },\n  template: ` {{ cell.getValue().toLocaleString() }} `,\n})\nexport class NumberCell {\n  readonly cell =\n    injectFlexRenderContext<CellContext<TableFeatures, any, number>>()\n}\n\n@Component({\n  selector: 'span',\n  host: {\n    'tanstack-table-status-cell': '',\n    '[class.status-badge]': 'true',\n    '[class]': 'cell().getValue()',\n  },\n  template: ` {{ cell().getValue() }} `,\n})\nexport class StatusCell {\n  readonly cell = injectTableCellContext<\n    'relationship' | 'complicated' | 'single'\n  >()\n}\n\n@Component({\n  selector: 'table-progress-cell',\n  template: `\n    <div class=\"progress-bar\"></div>\n    <div class=\"progress-bar-fill\" [style.width.%]=\"progress()\"></div>\n  `,\n})\nexport class ProgressCell {\n  readonly cell = injectTableCellContext<number>()\n\n  readonly progress = computed(() => this.cell().getValue())\n}\n\n@Component({\n  selector: 'table-row-actions',\n  template: `\n    <div class=\"row-actions\">\n      <button (click)=\"view()\" title=\"View\">👁️</button>\n      <button (click)=\"edit()\" title=\"Edit\">️️✏️</button>\n      <button (click)=\"delete()\" title=\"Delete\">🗑️</button>\n    </div>\n  `,\n})\nexport class RowActionsCell {\n  readonly cell = injectTableCellContext<number, Person>()\n\n  view() {\n    alert(\n      `View: ${this.cell().row.original.firstName} ${this.cell().row.original.lastName}`,\n    )\n  }\n\n  edit() {\n    alert(\n      `Edit: ${this.cell().row.original.firstName} ${this.cell().row.original.lastName}`,\n    )\n  }\n\n  delete() {\n    alert(\n      `Delete: ${this.cell().row.original.firstName} ${this.cell().row.original.lastName}`,\n    )\n  }\n}\n\n@Component({\n  selector: 'table-price-cell',\n  template: ` <span class=\"price\"> {{ cell().getValue() | currency }} </span> `,\n  imports: [CurrencyPipe],\n})\nexport class PriceCell {\n  readonly cell = injectTableCellContext<number>()\n}\n\n@Component({\n  selector: 'span',\n  host: {\n    'tanstack-table-category-cell': '',\n    '[class.category-badge]': 'true',\n    '[class]': 'cell().getValue()',\n  },\n  template: ` {{ cell().getValue() }} `,\n})\nexport class CategoryCell {\n  readonly cell = injectTableCellContext<\n    'electronics' | 'clothing' | 'food' | 'books'\n  >()\n}\n"
  },
  {
    "path": "examples/angular/composable-tables/src/app/components/header-components.ts",
    "content": "// export function SortIndicator() {\n//   const header = useHeaderContext()\n//   const sorted = header.column.getIsSorted()\n//\n//   if (!sorted) return null\n//\n//   return (\n//     <span className=\"sort-indicator\">{sorted === 'asc' ? '🔼' : '🔽'}</span>\n// )\n// }\n\nimport { Component, computed } from '@angular/core'\nimport { flexRenderComponent } from '@tanstack/angular-table'\nimport { FormsModule } from '@angular/forms'\nimport { injectTableHeaderContext } from '../table'\nimport type { FlexRenderComponent } from '@tanstack/angular-table'\n\nexport function SortIndicator(): string | null {\n  const header = injectTableHeaderContext()\n  const sorted = header().column.getIsSorted()\n  if (!sorted) {\n    return null\n  }\n  return `<span class=\"sort-indicator\">${sorted === 'asc' ? '🔼' : '🔽'}</span>`\n}\n\nexport function ColumnFilter(): FlexRenderComponent | null {\n  const header = injectTableHeaderContext()\n  if (!header().column.getCanFilter()) return null\n  return flexRenderComponent(_ColumnFilter)\n}\n\n@Component({\n  template: `\n    <div class=\"column-filter\" (click)=\"$event.stopPropagation()\">\n      <input\n        type=\"text\"\n        [ngModel]=\"filterValue()\"\n        (ngModelChange)=\"header().column.setFilterValue($event)\"\n        [placeholder]=\"placeholder()\"\n      />\n    </div>\n  `,\n  imports: [FormsModule],\n})\nexport class _ColumnFilter {\n  readonly header = injectTableHeaderContext()\n  readonly filterValue = computed(() => this.header().column.getFilterValue())\n  readonly placeholder = computed(() => `Filter ${this.header().column.id}...`)\n}\n\n@Component({\n  selector: 'span',\n  host: {\n    'tanstack-footer-column-id': '',\n    class: 'footer-column-id',\n  },\n  template: `{{ header().column.id }}`,\n})\nexport class FooterColumnId {\n  readonly header = injectTableHeaderContext()\n}\n\n@Component({\n  selector: 'span',\n  host: {\n    'tanstack-footer-sum': '',\n    class: 'footer-sum',\n  },\n  template: `{{ sum() > 0 ? sum().toLocaleString() : '—' }}`,\n})\nexport class FooterSum {\n  readonly header = injectTableHeaderContext()\n\n  readonly table = computed(() => this.header().getContext().table)\n  readonly rows = computed(() => this.table().getFilteredRowModel().rows)\n\n  readonly sum = computed(() =>\n    this.rows().reduce((acc, row) => {\n      const value = row.getValue(this.header().column.id)\n      return acc + (typeof value === 'number' ? value : 0)\n    }, 0),\n  )\n}\n"
  },
  {
    "path": "examples/angular/composable-tables/src/app/components/products-table/products-table.html",
    "content": "<div class=\"table-container\" [tanStackTable]=\"table\">\n  <ng-container\n    *ngComponentOutlet=\"table.TableToolbar; inputs: { title: 'Products Table', onRefresh }\"\n  />\n\n  <table>\n    <thead>\n      @for (headerGroup of table.getHeaderGroups(); track headerGroup.id) {\n        <tr>\n          @for (_header of headerGroup.headers; track _header.id) {\n            @let header = table.appHeader(_header);\n            @if (!header.isPlaceholder) {\n              <th [tanStackTableHeader]=\"header\" (click)=\"header.column.toggleSorting()\">\n                <ng-container *flexRenderHeader=\"header; let header\">\n                  {{ header }}\n                </ng-container>\n\n                <ng-container\n                  *flexRender=\"header.SortIndicator; props: header.getContext(); let value\"\n                >\n                  <div [innerHTML]=\"value\"></div>\n                </ng-container>\n\n                <ng-container\n                  *flexRender=\"header.ColumnFilter; props: header.getContext(); let value\"\n                >\n                  <div [innerHTML]=\"value\"></div>\n                </ng-container>\n              </th>\n            }\n          }\n        </tr>\n      }\n    </thead>\n    <tbody>\n      @for (row of table.getRowModel().rows; track row.id) {\n        <tr>\n          @for (cell of row.getAllCells(); track cell.id) {\n            <td [tanStackTableCell]=\"cell\">\n              <ng-container *flexRenderCell=\"cell; let cell\">\n                {{ cell }}\n              </ng-container>\n            </td>\n          }\n        </tr>\n      }\n    </tbody>\n\n    <tfoot>\n      @for (footerGroup of table.getFooterGroups(); track footerGroup.id) {\n        <tr>\n          @for (footer of footerGroup.headers; track footer.id) {\n            <th [colSpan]=\"footer.colSpan\" [tanStackTableHeader]=\"footer\">\n              @if (!footer.isPlaceholder) {\n                <ng-container *flexRenderFooter=\"footer; let footer\">\n                  {{ footer }}\n                </ng-container>\n              }\n            </th>\n          }\n        </tr>\n      }\n    </tfoot>\n  </table>\n\n  <ng-container *ngComponentOutlet=\"table.PaginationControls\" />\n\n  <ng-container *ngComponentOutlet=\"table.RowCount\" />\n</div>\n"
  },
  {
    "path": "examples/angular/composable-tables/src/app/components/products-table/products-table.ts",
    "content": "import { ChangeDetectionStrategy, Component, signal } from '@angular/core'\nimport { NgComponentOutlet } from '@angular/common'\nimport {\n  FlexRender,\n  TanStackTable,\n  TanStackTableCell,\n  TanStackTableHeader,\n} from '@tanstack/angular-table'\nimport { makeProductData } from '../../makeData'\nimport { createAppColumnHelper, injectAppTable } from '../../table'\nimport type { Product } from '../../makeData'\n\nexport const productColumnHelper = createAppColumnHelper<Product>()\n\n@Component({\n  selector: 'products-table',\n  templateUrl: './products-table.html',\n  imports: [\n    NgComponentOutlet,\n    FlexRender,\n    TanStackTable,\n    TanStackTableHeader,\n    TanStackTableCell,\n  ],\n  changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ProductsTable {\n  readonly data = signal(makeProductData(5000))\n\n  readonly columns = productColumnHelper.columns([\n    productColumnHelper.accessor('name', {\n      header: 'Product Name',\n      footer: (props) => props.column.id,\n      cell: ({ cell }) => cell.TextCell,\n    }),\n    productColumnHelper.accessor('category', {\n      header: 'Category',\n      footer: (props) => props.column.id,\n      cell: ({ cell }) => cell.CategoryCell,\n    }),\n    productColumnHelper.accessor('price', {\n      header: 'Price',\n      footer: (props) => props.column.id,\n      cell: ({ cell }) => cell.PriceCell,\n    }),\n    productColumnHelper.accessor('stock', {\n      header: 'In Stock',\n      footer: (props) => props.column.id,\n      cell: ({ cell }) => cell.NumberCell,\n    }),\n    productColumnHelper.accessor('rating', {\n      header: 'Rating',\n      footer: (props) => props.column.id,\n      cell: ({ cell }) => cell.ProgressCell,\n    }),\n  ])\n\n  table = injectAppTable(() => ({\n    columns: this.columns,\n    data: this.data(),\n    getRowId: (row) => row.id,\n    // more table options\n  }))\n\n  onRefresh = () => {\n    this.data.set([...makeProductData(5000)])\n  }\n}\n"
  },
  {
    "path": "examples/angular/composable-tables/src/app/components/table-components.ts",
    "content": "import {\n  ChangeDetectionStrategy,\n  Component,\n  computed,\n  input,\n} from '@angular/core'\nimport { injectTableContext } from '../table'\n\n@Component({\n  selector: 'app-table-toolbar',\n  template: `\n    <div class=\"table-toolbar\">\n      <h2>{{ title() }}</h2>\n      <button (click)=\"table().resetColumnFilters()\">Clear filters</button>\n      <button (click)=\"table().resetSorting()\">Clear sorting</button>\n\n      @if (onRefresh(); as onRefresh) {\n        <button (click)=\"onRefresh()\">Refresh data</button>\n      }\n    </div>\n  `,\n  changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TableToolbar {\n  readonly title = input.required<string>()\n  readonly onRefresh = input<() => void>()\n\n  readonly table = injectTableContext()\n\n  constructor() {\n    this.table().resetColumnFilters()\n  }\n}\n\n@Component({\n  selector: 'app-row-count',\n  template: `\n    <div class=\"row-count\">Showing {{ length() }} of {{ rowCount() }} rows</div>\n  `,\n  changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class RowCount {\n  readonly table = injectTableContext()\n\n  readonly length = computed(() =>\n    this.table().getRowModel().rows.length.toLocaleString(),\n  )\n\n  readonly rowCount = computed(() =>\n    this.table().getRowCount().toLocaleString(),\n  )\n}\n\n/**\n * Pagination controls for the table\n */\n@Component({\n  selector: 'app-pagination-controls',\n  template: `\n    <div class=\"pagination\">\n      <button (click)=\"table().firstPage()\" [disabled]=\"!canPreviousPage()\">\n        &lt;&lt;\n      </button>\n      <button (click)=\"table().previousPage()\" [disabled]=\"!canPreviousPage()\">\n        &lt;\n      </button>\n      <button (click)=\"table().nextPage()\" [disabled]=\"!canNextPage()\">\n        &gt;\n      </button>\n      <button (click)=\"table().lastPage()\" [disabled]=\"!canNextPage()\">\n        &gt;&gt;\n      </button>\n      <span>\n        Page\n        <strong> {{ pageIndex() + 1 }} of {{ pageCount() }} </strong>\n      </span>\n      <span>\n        | Go to page:\n        <input\n          type=\"number\"\n          min=\"1\"\n          [max]=\"table().getPageCount()\"\n          [value]=\"pageIndex() + 1\"\n          (change)=\"onPageChange($event)\"\n        />\n      </span>\n      <select [value]=\"pageSize()\" (change)=\"onPageSizeChange($event)\">\n        @for (size of pageSizes; track size) {\n          <option [value]=\"size\">Show {{ size }}</option>\n        }\n      </select>\n    </div>\n  `,\n  changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class PaginationControls {\n  readonly table = injectTableContext()\n\n  readonly pageSizes = [10, 20, 30, 40, 50]\n\n  readonly canPreviousPage = computed(() => this.table().getCanPreviousPage())\n  readonly canNextPage = computed(() => this.table().getCanNextPage())\n  readonly pageIndex = computed(() => this.table().state().pagination.pageIndex)\n  readonly pageSize = computed(() => this.table().state().pagination.pageSize)\n  readonly pageCount = computed(() =>\n    this.table().getPageCount().toLocaleString(),\n  )\n\n  onPageChange(event: Event) {\n    const target = event.target as HTMLInputElement\n    const page = target.value ? Number(target.value) - 1 : 0\n    this.table().setPageIndex(page)\n  }\n\n  onPageSizeChange(event: Event) {\n    const target = event.target as HTMLSelectElement\n    this.table().setPageSize(Number(target.value))\n  }\n}\n"
  },
  {
    "path": "examples/angular/composable-tables/src/app/components/users-table/users-table.html",
    "content": "<div class=\"table-container\" [tanStackTable]=\"table\">\n  <ng-container\n    *ngComponentOutlet=\"table.TableToolbar; inputs: { title: 'Users Table', onRefresh }\"\n  />\n\n  <table>\n    <thead>\n      @for (headerGroup of table.getHeaderGroups(); track headerGroup.id) {\n        <tr>\n          @for (_header of headerGroup.headers; track _header.id) {\n            @let header = table.appHeader(_header);\n            @if (!header.isPlaceholder) {\n              <th [tanStackTableHeader]=\"header\" (click)=\"header.column.toggleSorting()\">\n                <ng-container *flexRenderHeader=\"header; let header\">\n                  {{ header }}\n                </ng-container>\n\n                <ng-container\n                  *flexRender=\"header.SortIndicator; props: header.getContext(); let value\"\n                >\n                  <div [innerHTML]=\"value\"></div>\n                </ng-container>\n\n                <ng-container\n                  *flexRender=\"header.ColumnFilter; props: header.getContext(); let value\"\n                >\n                  <div [innerHTML]=\"value\"></div>\n                </ng-container>\n              </th>\n            }\n          }\n        </tr>\n      }\n    </thead>\n    <tbody>\n      @for (row of table.getRowModel().rows; track row.id) {\n        <tr>\n          @for (cell of row.getAllCells(); track cell.id) {\n            <td [tanStackTableCell]=\"cell\">\n              <ng-container *flexRenderCell=\"cell; let cell\">\n                {{ cell }}\n              </ng-container>\n            </td>\n          }\n        </tr>\n      }\n    </tbody>\n\n    <tfoot>\n      @for (footerGroup of table.getFooterGroups(); track footerGroup.id) {\n        <tr>\n          @for (footer of footerGroup.headers; track footer.id) {\n            <th [colSpan]=\"footer.colSpan\" [tanStackTableHeader]=\"footer\">\n              @if (!footer.isPlaceholder) {\n                <ng-container *flexRenderFooter=\"footer; let footer\">\n                  {{ footer }}\n                </ng-container>\n              }\n            </th>\n          }\n        </tr>\n      }\n    </tfoot>\n  </table>\n\n  <ng-container *ngComponentOutlet=\"table.PaginationControls\" />\n\n  <ng-container *ngComponentOutlet=\"table.RowCount\" />\n</div>\n"
  },
  {
    "path": "examples/angular/composable-tables/src/app/components/users-table/users-table.ts",
    "content": "import { ChangeDetectionStrategy, Component, signal } from '@angular/core'\nimport { NgComponentOutlet } from '@angular/common'\nimport {\n  FlexRender,\n  TanStackTable,\n  TanStackTableCell,\n  TanStackTableHeader,\n  flexRenderComponent,\n} from '@tanstack/angular-table'\nimport { makeData } from '../../makeData'\nimport { createAppColumnHelper, injectAppTable } from '../../table'\nimport type { Person } from '../../makeData'\n\nexport const personColumnHelper = createAppColumnHelper<Person>()\n\n@Component({\n  selector: 'users-table',\n  templateUrl: './users-table.html',\n  imports: [\n    NgComponentOutlet,\n    FlexRender,\n    TanStackTable,\n    TanStackTableHeader,\n    TanStackTableCell,\n  ],\n  changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class UsersTable {\n  readonly data = signal(makeData(5000))\n\n  readonly columns = personColumnHelper.columns([\n    personColumnHelper.accessor('firstName', {\n      header: 'First Name',\n      footer: ({ header }) => flexRenderComponent(header.FooterColumnId),\n      cell: ({ cell }) => flexRenderComponent(cell.TextCell),\n    }),\n    personColumnHelper.accessor('lastName', {\n      header: 'Last Name',\n      footer: ({ header }) => flexRenderComponent(header.FooterColumnId),\n      cell: ({ cell }) => flexRenderComponent(cell.TextCell),\n    }),\n    personColumnHelper.accessor('age', {\n      header: 'Age',\n      footer: ({ header }) => flexRenderComponent(header.FooterSum),\n      cell: ({ cell }) => flexRenderComponent(cell.NumberCell),\n    }),\n    personColumnHelper.accessor('visits', {\n      header: 'Visits',\n      footer: ({ header }) => flexRenderComponent(header.FooterSum),\n      cell: ({ cell }) => flexRenderComponent(cell.NumberCell),\n    }),\n    personColumnHelper.accessor('status', {\n      header: 'Status',\n      footer: ({ header }) => flexRenderComponent(header.FooterColumnId),\n      cell: ({ cell }) => flexRenderComponent(cell.StatusCell),\n    }),\n    personColumnHelper.accessor('progress', {\n      header: 'Progress',\n      footer: ({ header }) => flexRenderComponent(header.FooterSum),\n      cell: ({ cell }) => flexRenderComponent(cell.ProgressCell),\n    }),\n    personColumnHelper.display({\n      id: 'actions',\n      header: 'Actions',\n      cell: ({ cell }) => flexRenderComponent(cell.RowActionsCell),\n    }),\n  ])\n\n  table = injectAppTable(() => ({\n    columns: this.columns,\n    data: this.data(),\n    debugTable: true,\n    // more table options\n  }))\n\n  onRefresh = () => {\n    this.data.set([...makeData(5000)])\n  }\n}\n"
  },
  {
    "path": "examples/angular/composable-tables/src/app/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  subRows?: Array<Person>\n}\n\nexport type Product = {\n  id: string\n  name: string\n  category: 'electronics' | 'clothing' | 'food' | 'books'\n  price: number\n  stock: number\n  rating: number\n}\n\nconst range = (len: number) => {\n  const arr: Array<number> = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (): Person => {\n  return {\n    firstName: faker.person.firstName(),\n    lastName: faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: faker.number.int(1000),\n    progress: faker.number.int(100),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0],\n  }\n}\n\nconst newProduct = (): Product => {\n  return {\n    id: faker.string.uuid(),\n    name: faker.commerce.productName(),\n    category: faker.helpers.shuffle<Product['category']>([\n      'electronics',\n      'clothing',\n      'food',\n      'books',\n    ])[0],\n    price: parseFloat(faker.commerce.price({ min: 5, max: 500 })),\n    stock: faker.number.int({ min: 0, max: 200 }),\n    rating: faker.number.int({ min: 0, max: 100 }),\n  }\n}\n\nexport function makeData(...lens: Array<number>) {\n  const makeDataLevel = (depth = 0): Array<Person> => {\n    const len = lens[depth]\n    return range(len).map((): Person => {\n      return {\n        ...newPerson(),\n        subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined,\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n\nexport function makeProductData(count: number): Array<Product> {\n  return range(count).map(() => newProduct())\n}\n"
  },
  {
    "path": "examples/angular/composable-tables/src/app/table.ts",
    "content": "/**\n * Custom table hook setup using createTableHook\n *\n * This file creates a custom useAppTable hook with pre-bound components.\n * Features, row models, and default options are defined once here and shared across all tables.\n * Context hooks and a pre-bound createAppColumnHelper are also exported.\n */\nimport {\n  columnFilteringFeature,\n  createFilteredRowModel,\n  createPaginatedRowModel,\n  createSortedRowModel,\n  createTableHook,\n  filterFns,\n  rowPaginationFeature,\n  rowSortingFeature,\n  sortFns,\n  tableFeatures,\n} from '@tanstack/angular-table'\n\n// Import table-level components\nimport {\n  PaginationControls,\n  RowCount,\n  TableToolbar,\n} from './components/table-components'\n// Import cell-level components\nimport {\n  CategoryCell,\n  NumberCell,\n  PriceCell,\n  ProgressCell,\n  RowActionsCell,\n  StatusCell,\n  TextCell,\n} from './components/cell-components'\n// Import header-level components (both use injectTableHeaderContext())\nimport {\n  ColumnFilter,\n  FooterColumnId,\n  FooterSum,\n  SortIndicator,\n} from './components/header-components'\n\n/**\n * Create the custom table hook with all pre-bound components.\n * This exports:\n * - createAppColumnHelper: Create column definitions with TFeatures already bound\n * - injectAppTable: Function for creating tables with TFeatures baked in\n * - injectTableContext: Access table instance in tableComponents\n * - injectTableCellContext: Access cell instance in cellComponents\n * - injectTableHeaderContext: Access header instance in headerComponents\n * - injectFlexRenderHeaderContext: Access FlexRenderContext with header-level typings\n * - injectFlexRenderCellContext: Access FlexRenderContext with cell-level typings\n */\nexport const {\n  createAppColumnHelper,\n  injectAppTable,\n  injectTableContext,\n  injectTableCellContext,\n  injectTableHeaderContext,\n  // injectFlexRenderHeaderContext\n  // injectFlexRenderCellContext\n} = createTableHook({\n  // Features are set once here and shared across all tables\n  _features: tableFeatures({\n    columnFilteringFeature,\n    rowPaginationFeature,\n    rowSortingFeature,\n  }),\n\n  // Row models are set once here\n  _rowModels: {\n    sortedRowModel: createSortedRowModel(sortFns),\n    filteredRowModel: createFilteredRowModel(filterFns),\n    paginatedRowModel: createPaginatedRowModel(),\n  },\n\n  // set any default table options here too\n  getRowId: (row) => row.id,\n\n  // Register table-level components (accessible via table.ComponentName)\n  tableComponents: {\n    PaginationControls,\n    RowCount,\n    TableToolbar,\n  },\n\n  // Register cell-level components (accessible via cell.ComponentName in AppCell)\n  cellComponents: {\n    TextCell,\n    NumberCell,\n    ProgressCell,\n    StatusCell,\n    CategoryCell,\n    PriceCell,\n    RowActionsCell,\n  },\n\n  // Register header/footer-level components (accessible via header.ComponentName in AppHeader/AppFooter)\n  headerComponents: {\n    SortIndicator,\n    ColumnFilter,\n    FooterColumnId,\n    FooterSum,\n  },\n})\n"
  },
  {
    "path": "examples/angular/composable-tables/src/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"utf-8\" />\n    <title>Composable tables</title>\n    <base href=\"/\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n    <link rel=\"icon\" type=\"image/x-icon\" href=\"favicon.ico\" />\n  </head>\n  <body>\n    <app-root></app-root>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/angular/composable-tables/src/main.ts",
    "content": "import { bootstrapApplication } from '@angular/platform-browser'\nimport { appConfig } from './app/app.config'\nimport { App } from './app/app'\n\nbootstrapApplication(App, appConfig).catch((err) => console.error(err))\n"
  },
  {
    "path": "examples/angular/composable-tables/src/styles.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n  border-collapse: collapse;\n  width: 100%;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth,\ntd {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 8px 12px;\n  text-align: left;\n}\n\nth {\n  background-color: #f5f5f5;\n  font-weight: 600;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n\n.table-container {\n  padding: 16px;\n  max-width: 1200px;\n  margin: 0 auto;\n}\n\n.pagination {\n  display: flex;\n  align-items: center;\n  gap: 8px;\n  margin-top: 16px;\n  flex-wrap: wrap;\n}\n\n.pagination button {\n  border: 1px solid #ccc;\n  border-radius: 4px;\n  padding: 4px 8px;\n  cursor: pointer;\n  background: white;\n}\n\n.pagination button:disabled {\n  opacity: 0.5;\n  cursor: not-allowed;\n}\n\n.pagination input {\n  border: 1px solid #ccc;\n  border-radius: 4px;\n  padding: 4px;\n  width: 64px;\n}\n\n.pagination select {\n  border: 1px solid #ccc;\n  border-radius: 4px;\n  padding: 4px;\n}\n\n.sort-indicator {\n  margin-left: 4px;\n}\n\n.column-filter {\n  margin-top: 4px;\n}\n\n.column-filter input {\n  border: 1px solid #ccc;\n  border-radius: 4px;\n  padding: 4px;\n  width: 100%;\n  font-size: 12px;\n}\n\n.sortable-header {\n  cursor: pointer;\n  user-select: none;\n}\n\n.sortable-header:hover {\n  background-color: #e8e8e8;\n}\n\n.row-actions {\n  display: flex;\n  gap: 4px;\n}\n\n.row-actions button {\n  border: 1px solid #ccc;\n  border-radius: 4px;\n  padding: 2px 8px;\n  cursor: pointer;\n  background: white;\n  font-size: 12px;\n}\n\n.row-actions button:hover {\n  background-color: #f0f0f0;\n}\n\n.status-badge {\n  display: inline-block;\n  padding: 2px 8px;\n  border-radius: 12px;\n  font-size: 12px;\n  font-weight: 500;\n}\n\n.status-badge.relationship {\n  background-color: #d4edda;\n  color: #155724;\n}\n\n.status-badge.complicated {\n  background-color: #fff3cd;\n  color: #856404;\n}\n\n.status-badge.single {\n  background-color: #cce5ff;\n  color: #004085;\n}\n\n.progress-bar {\n  width: 100%;\n  height: 8px;\n  background-color: #e9ecef;\n  border-radius: 4px;\n  overflow: hidden;\n}\n\n.progress-bar-fill {\n  height: 100%;\n  background-color: #007bff;\n  transition: width 0.2s;\n}\n\n.table-toolbar {\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  margin-bottom: 16px;\n  flex-wrap: wrap;\n  gap: 8px;\n}\n\n.table-toolbar h2 {\n  margin: 0;\n}\n\n.table-toolbar button {\n  border: 1px solid #ccc;\n  border-radius: 4px;\n  padding: 8px 16px;\n  cursor: pointer;\n  background: white;\n}\n\n.table-toolbar button:hover {\n  background-color: #f0f0f0;\n}\n\n.row-count {\n  color: #666;\n  font-size: 14px;\n  margin-top: 8px;\n}\n\n.app {\n  padding: 16px;\n}\n\n.app h1 {\n  text-align: center;\n  margin-bottom: 8px;\n}\n\n.description {\n  text-align: center;\n  color: #666;\n  margin-bottom: 32px;\n}\n\n.description code {\n  background-color: #f5f5f5;\n  padding: 2px 6px;\n  border-radius: 4px;\n  font-size: 13px;\n}\n\n.table-divider {\n  height: 48px;\n  border-bottom: 1px solid #e0e0e0;\n  margin: 32px auto;\n  max-width: 1200px;\n}\n\n.category-badge {\n  display: inline-block;\n  padding: 2px 8px;\n  border-radius: 12px;\n  font-size: 12px;\n  font-weight: 500;\n  text-transform: capitalize;\n}\n\n.category-badge.electronics {\n  background-color: #e3f2fd;\n  color: #1565c0;\n}\n\n.category-badge.clothing {\n  background-color: #fce4ec;\n  color: #c2185b;\n}\n\n.category-badge.food {\n  background-color: #e8f5e9;\n  color: #2e7d32;\n}\n\n.category-badge.books {\n  background-color: #fff8e1;\n  color: #f57c00;\n}\n\n.price {\n  font-weight: 600;\n  color: #2e7d32;\n}\n"
  },
  {
    "path": "examples/angular/composable-tables/tsconfig.app.json",
    "content": "/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */\n/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */\n{\n  \"extends\": \"./tsconfig.json\",\n  \"compilerOptions\": {\n    \"outDir\": \"./out-tsc/app\",\n    \"types\": []\n  },\n  \"include\": [\"src/**/*.ts\"],\n  \"exclude\": [\"src/**/*.spec.ts\"]\n}\n"
  },
  {
    "path": "examples/angular/composable-tables/tsconfig.json",
    "content": "/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */\n/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */\n{\n  \"compileOnSave\": false,\n  \"compilerOptions\": {\n    \"strict\": true,\n    \"noImplicitOverride\": true,\n    \"noPropertyAccessFromIndexSignature\": true,\n    \"noImplicitReturns\": true,\n    \"noFallthroughCasesInSwitch\": true,\n    \"skipLibCheck\": true,\n    \"isolatedModules\": true,\n    \"experimentalDecorators\": true,\n    \"importHelpers\": true,\n    \"target\": \"ES2022\",\n    \"module\": \"preserve\"\n  },\n  \"angularCompilerOptions\": {\n    \"enableI18nLegacyMessageIdFormat\": false,\n    \"strictInjectionParameters\": true,\n    \"strictInputAccessModifiers\": true,\n    \"strictTemplates\": true\n  }\n}\n"
  },
  {
    "path": "examples/angular/composable-tables/tsconfig.spec.json",
    "content": "/* To learn more about this file see: https://angular.io/config/tsconfig. */\n{\n  \"extends\": \"./tsconfig.json\",\n  \"compilerOptions\": {\n    \"outDir\": \"./out-tsc/spec\",\n    \"types\": [\"jasmine\"]\n  },\n  \"include\": [\"src/**/*.spec.ts\", \"src/**/*.d.ts\"]\n}\n"
  },
  {
    "path": "examples/angular/custom-plugin/.gitignore",
    "content": "# See https://docs.github.com/get-started/getting-started-with-git/ignoring-files for more about ignoring files.\n\n# Compiled output\n/dist\n/tmp\n/out-tsc\n/bazel-out\n\n# Node\n/node_modules\nnpm-debug.log\nyarn-error.log\n\n# IDEs and editors\n.idea/\n.project\n.classpath\n.c9/\n*.launch\n.settings/\n*.sublime-workspace\n\n# Visual Studio Code\n.vscode/*\n!.vscode/settings.json\n!.vscode/tasks.json\n!.vscode/launch.json\n!.vscode/extensions.json\n!.vscode/mcp.json\n.history/*\n\n# Miscellaneous\n/.angular/cache\n.sass-cache/\n/connect.lock\n/coverage\n/libpeerconnection.log\ntestem.log\n/typings\n__screenshots__/\n\n# System files\n.DS_Store\nThumbs.db\n"
  },
  {
    "path": "examples/angular/custom-plugin/.vscode/extensions.json",
    "content": "{\n  // For more information, visit: https://go.microsoft.com/fwlink/?linkid=827846\n  \"recommendations\": [\"angular.ng-template\"]\n}\n"
  },
  {
    "path": "examples/angular/custom-plugin/.vscode/launch.json",
    "content": "{\n  // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387\n  \"version\": \"0.2.0\",\n  \"configurations\": [\n    {\n      \"name\": \"ng serve\",\n      \"type\": \"chrome\",\n      \"request\": \"launch\",\n      \"preLaunchTask\": \"npm: start\",\n      \"url\": \"http://localhost:4200/\"\n    }\n  ]\n}\n"
  },
  {
    "path": "examples/angular/custom-plugin/.vscode/mcp.json",
    "content": "{\n  // For more information, visit: https://angular.dev/ai/mcp\n  \"mcpServers\": {\n    \"angular-cli\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@angular/cli\", \"mcp\"]\n    }\n  }\n}\n"
  },
  {
    "path": "examples/angular/custom-plugin/.vscode/tasks.json",
    "content": "{\n  // For more information, visit: https://go.microsoft.com/fwlink/?LinkId=733558\n  \"version\": \"2.0.0\",\n  \"tasks\": [\n    {\n      \"type\": \"npm\",\n      \"script\": \"start\",\n      \"isBackground\": true,\n      \"problemMatcher\": {\n        \"owner\": \"typescript\",\n        \"pattern\": \"$tsc\",\n        \"background\": {\n          \"activeOnStart\": true,\n          \"beginsPattern\": {\n            \"regexp\": \"Changes detected\"\n          },\n          \"endsPattern\": {\n            \"regexp\": \"bundle generation (complete|failed)\"\n          }\n        }\n      }\n    }\n  ]\n}\n"
  },
  {
    "path": "examples/angular/custom-plugin/README.md",
    "content": "# CustomPlugin\n\nThis project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 21.1.0.\n\n## Development server\n\nTo start a local development server, run:\n\n```bash\nng serve\n```\n\nOnce the server is running, open your browser and navigate to `http://localhost:4200/`. The application will automatically reload whenever you modify any of the source files.\n\n## Code scaffolding\n\nAngular CLI includes powerful code scaffolding tools. To generate a new component, run:\n\n```bash\nng generate component component-name\n```\n\nFor a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:\n\n```bash\nng generate --help\n```\n\n## Building\n\nTo build the project run:\n\n```bash\nng build\n```\n\nThis will compile your project and store the build artifacts in the `dist/` directory. By default, the production build optimizes your application for performance and speed.\n\n## Running unit tests\n\nTo execute unit tests with the [Vitest](https://vitest.dev/) test runner, use the following command:\n\n```bash\nng test\n```\n\n## Running end-to-end tests\n\nFor end-to-end (e2e) testing, run:\n\n```bash\nng e2e\n```\n\nAngular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.\n\n## Additional Resources\n\nFor more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.\n"
  },
  {
    "path": "examples/angular/custom-plugin/angular.json",
    "content": "{\n  \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\n  \"version\": 1,\n  \"cli\": {\n    \"packageManager\": \"pnpm\",\n    \"analytics\": false,\n    \"cache\": {\n      \"enabled\": false\n    }\n  },\n  \"newProjectRoot\": \"projects\",\n  \"projects\": {\n    \"custom-plugin\": {\n      \"projectType\": \"application\",\n      \"schematics\": {\n        \"@schematics/angular:component\": {\n          \"inlineTemplate\": true,\n          \"inlineStyle\": true,\n          \"skipTests\": true\n        },\n        \"@schematics/angular:class\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:directive\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:guard\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:interceptor\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:pipe\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:resolver\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:service\": {\n          \"skipTests\": true\n        }\n      },\n      \"root\": \"\",\n      \"sourceRoot\": \"src\",\n      \"prefix\": \"app\",\n      \"architect\": {\n        \"build\": {\n          \"builder\": \"@angular/build:application\",\n          \"options\": {\n            \"browser\": \"src/main.ts\",\n            \"tsConfig\": \"tsconfig.app.json\",\n            \"assets\": [\n              {\n                \"glob\": \"**/*\",\n                \"input\": \"public\"\n              }\n            ],\n            \"styles\": [\"src/styles.css\"]\n          },\n          \"configurations\": {\n            \"production\": {\n              \"budgets\": [\n                {\n                  \"type\": \"initial\",\n                  \"maximumWarning\": \"500kB\",\n                  \"maximumError\": \"1MB\"\n                },\n                {\n                  \"type\": \"anyComponentStyle\",\n                  \"maximumWarning\": \"4kB\",\n                  \"maximumError\": \"8kB\"\n                }\n              ],\n              \"outputHashing\": \"all\"\n            },\n            \"development\": {\n              \"optimization\": false,\n              \"extractLicenses\": false,\n              \"sourceMap\": true\n            }\n          },\n          \"defaultConfiguration\": \"production\"\n        },\n        \"serve\": {\n          \"builder\": \"@angular/build:dev-server\",\n          \"configurations\": {\n            \"production\": {\n              \"buildTarget\": \"custom-plugin:build:production\"\n            },\n            \"development\": {\n              \"buildTarget\": \"custom-plugin:build:development\"\n            }\n          },\n          \"defaultConfiguration\": \"development\"\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "examples/angular/custom-plugin/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-angular-custom-plugin\",\n  \"version\": \"0.0.0\",\n  \"scripts\": {\n    \"ng\": \"ng\",\n    \"start\": \"ng serve\",\n    \"build\": \"ng build\",\n    \"watch\": \"ng build --watch --configuration development\",\n    \"lint\": \"eslint ./src\"\n  },\n  \"private\": true,\n  \"packageManager\": \"pnpm@10.28.2\",\n  \"dependencies\": {\n    \"@angular/common\": \"^21.1.1\",\n    \"@angular/compiler\": \"^21.1.1\",\n    \"@angular/core\": \"^21.1.1\",\n    \"@angular/forms\": \"^21.1.1\",\n    \"@angular/platform-browser\": \"^21.1.1\",\n    \"@angular/router\": \"^21.1.1\",\n    \"@tanstack/angular-table\": \"^9.0.0-alpha.17\",\n    \"rxjs\": \"~7.8.2\",\n    \"tslib\": \"^2.8.1\"\n  },\n  \"devDependencies\": {\n    \"@angular/build\": \"^21.1.2\",\n    \"@angular/cli\": \"^21.1.2\",\n    \"@angular/compiler-cli\": \"^21.1.1\",\n    \"typescript\": \"5.9.3\"\n  }\n}\n"
  },
  {
    "path": "examples/angular/custom-plugin/src/app/app.config.ts",
    "content": "import { provideBrowserGlobalErrorListeners } from '@angular/core'\n\nimport type { ApplicationConfig } from '@angular/core'\n\nexport const appConfig: ApplicationConfig = {\n  providers: [provideBrowserGlobalErrorListeners()],\n}\n"
  },
  {
    "path": "examples/angular/custom-plugin/src/app/app.css",
    "content": "table {\n  &[data-table-density] {\n    :where(td, th) {\n      transition: padding 0.2s;\n      padding: 16px;\n    }\n\n    &[data-table-density='sm'] {\n      :where(td, th) {\n        padding: 4px;\n      }\n    }\n\n    &[data-table-density='md'] {\n      :where(td, th) {\n        padding: 8px;\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "examples/angular/custom-plugin/src/app/app.html",
    "content": "<div class=\"p-2\">\n  <div class=\"h-2\"></div>\n  <button\n    (click)=\"table.toggleDensity()\"\n    class=\"border rounded p-1 bg-blue-500 text-white mb-2 w-64\"\n  >\n    Toggle Density\n  </button>\n\n  <table [attr.data-table-density]=\"density()\">\n    <thead>\n      @for (headerGroup of table.getHeaderGroups(); track headerGroup.id) {\n        <tr>\n          @for (header of headerGroup.headers; track header.id) {\n            @if (!header.isPlaceholder) {\n              <th *flexRenderHeader=\"header; let header\">\n                <div [innerHTML]=\"header\"></div>\n              </th>\n            }\n          }\n        </tr>\n      }\n    </thead>\n    <tbody>\n      @for (row of table.getRowModel().rows; track row.id) {\n        <tr>\n          @for (cell of row.getAllCells(); track cell.id) {\n            <td *flexRenderCell=\"cell; let cell\">\n              <div [innerHTML]=\"cell\"></div>\n            </td>\n          }\n        </tr>\n      }\n    </tbody>\n    <tfoot>\n      @for (footerGroup of table.getFooterGroups(); track footerGroup.id) {\n        <tr>\n          @for (footer of footerGroup.headers; track footer.id) {\n            <th *flexRenderFooter=\"footer; let footer\">\n              {{ footer }}\n            </th>\n          }\n        </tr>\n      }\n    </tfoot>\n  </table>\n</div>\n"
  },
  {
    "path": "examples/angular/custom-plugin/src/app/app.ts",
    "content": "import { Component, signal } from '@angular/core'\nimport {\n  FlexRender,\n  createColumnHelper,\n  createPaginatedRowModel,\n  injectTable,\n  isFunction,\n  rowPaginationFeature,\n  tableFeatures,\n} from '@tanstack/angular-table'\nimport { densityPlugin } from './density/density-feature'\nimport { makeData } from './makeData'\nimport type { DensityState } from './density/density-feature'\nimport type { Person } from './makeData'\n\nconst _features = tableFeatures({\n  rowPaginationFeature,\n  densityPlugin, // pass in our plugin just like any other stock feature\n})\nconst columnHelper = createColumnHelper<typeof _features, Person>()\n\nconst columns = columnHelper.columns([\n  columnHelper.accessor('firstName', {\n    cell: (info) => info.getValue(),\n    footer: (props) => props.column.id,\n  }),\n  columnHelper.accessor((row) => row.lastName, {\n    id: 'lastName',\n    cell: (info) => info.getValue(),\n    header: () => 'Last Name',\n    footer: (props) => props.column.id,\n  }),\n  columnHelper.accessor('age', {\n    header: () => 'Age',\n    footer: (props) => props.column.id,\n  }),\n  columnHelper.accessor('visits', {\n    header: () => 'Visits',\n    footer: (props) => props.column.id,\n  }),\n  columnHelper.accessor('status', {\n    header: 'Status',\n    footer: (props) => props.column.id,\n  }),\n  columnHelper.accessor('progress', {\n    header: 'Profile Progress',\n    footer: (props) => props.column.id,\n  }),\n])\n\n@Component({\n  selector: 'app-root',\n  imports: [FlexRender],\n  templateUrl: './app.html',\n  styleUrl: './app.css',\n})\nexport class App {\n  readonly data = signal(makeData(1000))\n  readonly density = signal<DensityState>('md')\n\n  readonly table = injectTable(() => ({\n    _features,\n    _rowModels: {\n      paginatedRowModel: createPaginatedRowModel<typeof _features, Person>(),\n    },\n    columns,\n    data: this.data(),\n    debugTable: true,\n    state: {\n      // passing the density state to the table, TS is still happy :)\n      density: this.density(),\n    },\n    // using the new onDensityChange option, TS is still happy :)\n    onDensityChange: (updater) =>\n      isFunction(updater)\n        ? this.density.update(updater)\n        : this.density.set(updater),\n  }))\n}\n"
  },
  {
    "path": "examples/angular/custom-plugin/src/app/density/density-feature.ts",
    "content": "import { functionalUpdate, makeStateUpdater } from '@tanstack/angular-table'\nimport type {\n  OnChangeFn,\n  TableFeature,\n  TableFeatures,\n  Updater,\n} from '@tanstack/angular-table'\n\n// TypeScript setup for our new feature with all of the same type-safety as stock TanStack Table features\n\n// define types for our new feature's custom state\nexport type DensityState = 'sm' | 'md' | 'lg'\nexport interface TableState_Density {\n  density: DensityState\n}\n\n// define types for our new feature's table options\nexport interface TableOptions_Density {\n  enableDensity?: boolean\n  onDensityChange?: OnChangeFn<DensityState>\n}\n\n// Define types for our new feature's table APIs\nexport interface Table_Density {\n  setDensity: (updater: Updater<DensityState>) => void\n  toggleDensity: (value?: DensityState) => void\n}\n\ninterface DensityPluginConstructors<TFeatures extends TableFeatures, TData> {\n  Table: Table_Density\n  TableOptions: TableOptions_Density\n  TableState: TableState_Density\n}\n\n// Here is all of the actual javascript code for our new feature\nexport const densityPlugin: TableFeature<\n  DensityPluginConstructors<TableFeatures, Table_Density>\n> = {\n  // define the new feature's initial state\n  getInitialState: (initialState) => {\n    return {\n      density: 'md',\n      ...initialState, // must come last\n    }\n  },\n\n  // define the new feature's default options\n  getDefaultTableOptions: (table) => {\n    return {\n      enableDensity: true,\n      onDensityChange: makeStateUpdater('density', table),\n    }\n  },\n  // if you need to add a default column definition...\n  // getDefaultColumnDef: () => {},\n\n  // define the new feature's table instance methods\n  constructTableAPIs: (table) => {\n    table.setDensity = (updater) => {\n      const safeUpdater: Updater<DensityState> = (old) => {\n        const newState = functionalUpdate(updater, old)\n        return newState\n      }\n      return table.options.onDensityChange?.(safeUpdater)\n    }\n    table.toggleDensity = (value) => {\n      table.setDensity?.((old) => {\n        if (value) return value\n        return old === 'lg' ? 'md' : old === 'md' ? 'sm' : 'lg' // cycle through the 3 options\n      })\n    }\n  },\n\n  // if you need to add row instance APIs...\n  // constructRowAPIs: (row) => {},\n\n  // if you need to add cell instance APIs...\n  // constructCellAPIs: (cell) => {},\n\n  // if you need to add column instance APIs...\n  // constructColumnAPIs: (column) => {},\n\n  // if you need to add header instance APIs...\n  // constructHeaderAPIs: (header) => {},\n}\n// end of custom feature code\n"
  },
  {
    "path": "examples/angular/custom-plugin/src/app/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  subRows?: Array<Person>\n}\n\nconst range = (len: number) => {\n  const arr: Array<number> = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (): Person => {\n  return {\n    firstName: faker.person.firstName(),\n    lastName: faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: faker.number.int(1000),\n    progress: faker.number.int(100),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0],\n  }\n}\n\nexport function makeData(...lens: Array<number>) {\n  const makeDataLevel = (depth = 0): Array<Person> => {\n    const len = lens[depth]\n    return range(len).map((_d): Person => {\n      return {\n        ...newPerson(),\n        subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined,\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n"
  },
  {
    "path": "examples/angular/custom-plugin/src/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"utf-8\" />\n    <title>CustomPlugin</title>\n    <base href=\"/\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n    <link rel=\"icon\" type=\"image/x-icon\" href=\"favicon.ico\" />\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n  </head>\n  <body>\n    <app-root></app-root>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/angular/custom-plugin/src/main.ts",
    "content": "import { bootstrapApplication } from '@angular/platform-browser'\nimport { appConfig } from './app/app.config'\nimport { App } from './app/app'\n\nbootstrapApplication(App, appConfig).catch((err) => console.error(err))\n"
  },
  {
    "path": "examples/angular/custom-plugin/src/styles.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n\ntr {\n  border-bottom: 1px solid lightgray;\n}\n\nbutton:disabled {\n  opacity: 0.5;\n}\n"
  },
  {
    "path": "examples/angular/custom-plugin/tsconfig.app.json",
    "content": "/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */\n/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */\n{\n  \"extends\": \"./tsconfig.json\",\n  \"compilerOptions\": {\n    \"outDir\": \"./out-tsc/app\",\n    \"types\": []\n  },\n  \"include\": [\"src/**/*.ts\"],\n  \"exclude\": [\"src/**/*.spec.ts\"]\n}\n"
  },
  {
    "path": "examples/angular/custom-plugin/tsconfig.json",
    "content": "/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */\n/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */\n{\n  \"compileOnSave\": false,\n  \"compilerOptions\": {\n    \"strict\": true,\n    \"noImplicitOverride\": true,\n    \"noPropertyAccessFromIndexSignature\": true,\n    \"noImplicitReturns\": true,\n    \"noFallthroughCasesInSwitch\": true,\n    \"skipLibCheck\": true,\n    \"isolatedModules\": true,\n    \"experimentalDecorators\": true,\n    \"importHelpers\": true,\n    \"target\": \"ES2022\",\n    \"module\": \"preserve\"\n  },\n  \"angularCompilerOptions\": {\n    \"enableI18nLegacyMessageIdFormat\": false,\n    \"strictInjectionParameters\": true,\n    \"strictInputAccessModifiers\": true,\n    \"strictTemplates\": true\n  }\n}\n"
  },
  {
    "path": "examples/angular/editable/.gitignore",
    "content": "# See https://docs.github.com/get-started/getting-started-with-git/ignoring-files for more about ignoring files.\n\n# Compiled output\n/dist\n/tmp\n/out-tsc\n/bazel-out\n\n# Node\n/node_modules\nnpm-debug.log\nyarn-error.log\n\n# IDEs and editors\n.idea/\n.project\n.classpath\n.c9/\n*.launch\n.settings/\n*.sublime-workspace\n\n# Visual Studio Code\n.vscode/*\n!.vscode/settings.json\n!.vscode/tasks.json\n!.vscode/launch.json\n!.vscode/extensions.json\n!.vscode/mcp.json\n.history/*\n\n# Miscellaneous\n/.angular/cache\n.sass-cache/\n/connect.lock\n/coverage\n/libpeerconnection.log\ntestem.log\n/typings\n__screenshots__/\n\n# System files\n.DS_Store\nThumbs.db\n"
  },
  {
    "path": "examples/angular/editable/README.md",
    "content": "# Editable Data\n\nThis project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 21.1.0.\n\n## Development server\n\nTo start a local development server, run:\n\n```bash\nng serve\n```\n\nOnce the server is running, open your browser and navigate to `http://localhost:4200/`. The application will automatically reload whenever you modify any of the source files.\n\n## Code scaffolding\n\nAngular CLI includes powerful code scaffolding tools. To generate a new component, run:\n\n```bash\nng generate component component-name\n```\n\nFor a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:\n\n```bash\nng generate --help\n```\n\n## Building\n\nTo build the project run:\n\n```bash\nng build\n```\n\nThis will compile your project and store the build artifacts in the `dist/` directory. By default, the production build optimizes your application for performance and speed.\n\n## Running unit tests\n\nTo execute unit tests with the [Vitest](https://vitest.dev/) test runner, use the following command:\n\n```bash\nng test\n```\n\n## Running end-to-end tests\n\nFor end-to-end (e2e) testing, run:\n\n```bash\nng e2e\n```\n\nAngular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.\n\n## Additional Resources\n\nFor more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.\n"
  },
  {
    "path": "examples/angular/editable/angular.json",
    "content": "{\n  \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\n  \"version\": 1,\n  \"cli\": {\n    \"packageManager\": \"pnpm\",\n    \"analytics\": false,\n    \"cache\": {\n      \"enabled\": false\n    }\n  },\n  \"newProjectRoot\": \"projects\",\n  \"projects\": {\n    \"editable-data\": {\n      \"projectType\": \"application\",\n      \"schematics\": {\n        \"@schematics/angular:component\": {\n          \"inlineTemplate\": true,\n          \"inlineStyle\": true,\n          \"skipTests\": true\n        },\n        \"@schematics/angular:class\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:directive\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:guard\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:interceptor\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:pipe\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:resolver\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:service\": {\n          \"skipTests\": true\n        }\n      },\n      \"root\": \"\",\n      \"sourceRoot\": \"src\",\n      \"prefix\": \"app\",\n      \"architect\": {\n        \"build\": {\n          \"builder\": \"@angular/build:application\",\n          \"options\": {\n            \"browser\": \"src/main.ts\",\n            \"tsConfig\": \"tsconfig.app.json\",\n            \"assets\": [\n              {\n                \"glob\": \"**/*\",\n                \"input\": \"public\"\n              }\n            ],\n            \"styles\": [\"src/styles.css\"]\n          },\n          \"configurations\": {\n            \"production\": {\n              \"budgets\": [\n                {\n                  \"type\": \"initial\",\n                  \"maximumWarning\": \"500kB\",\n                  \"maximumError\": \"1MB\"\n                },\n                {\n                  \"type\": \"anyComponentStyle\",\n                  \"maximumWarning\": \"4kB\",\n                  \"maximumError\": \"8kB\"\n                }\n              ],\n              \"outputHashing\": \"all\"\n            },\n            \"development\": {\n              \"optimization\": false,\n              \"extractLicenses\": false,\n              \"sourceMap\": true\n            }\n          },\n          \"defaultConfiguration\": \"production\"\n        },\n        \"serve\": {\n          \"builder\": \"@angular/build:dev-server\",\n          \"configurations\": {\n            \"production\": {\n              \"buildTarget\": \"editable-data:build:production\"\n            },\n            \"development\": {\n              \"buildTarget\": \"editable-data:build:development\"\n            }\n          },\n          \"defaultConfiguration\": \"development\"\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "examples/angular/editable/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-angular-editable\",\n  \"version\": \"0.0.0\",\n  \"scripts\": {\n    \"ng\": \"ng\",\n    \"start\": \"ng serve\",\n    \"build\": \"ng build\",\n    \"lint\": \"eslint ./src\",\n    \"watch\": \"ng build --watch --configuration development\"\n  },\n  \"private\": true,\n  \"packageManager\": \"pnpm@10.28.2\",\n  \"dependencies\": {\n    \"@angular/common\": \"^21.1.1\",\n    \"@angular/compiler\": \"^21.1.1\",\n    \"@angular/core\": \"^21.1.1\",\n    \"@angular/forms\": \"^21.1.1\",\n    \"@angular/platform-browser\": \"^21.1.1\",\n    \"@angular/router\": \"^21.1.1\",\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"@tanstack/angular-table\": \"^9.0.0-alpha.17\",\n    \"rxjs\": \"~7.8.2\",\n    \"tslib\": \"^2.8.1\"\n  },\n  \"devDependencies\": {\n    \"@angular/build\": \"^21.1.2\",\n    \"@angular/cli\": \"^21.1.2\",\n    \"@angular/compiler-cli\": \"^21.1.1\",\n    \"typescript\": \"5.9.3\"\n  }\n}\n"
  },
  {
    "path": "examples/angular/editable/src/app/app.config.ts",
    "content": "import { provideBrowserGlobalErrorListeners } from '@angular/core'\nimport type { ApplicationConfig } from '@angular/core'\n\nexport const appConfig: ApplicationConfig = {\n  providers: [provideBrowserGlobalErrorListeners()],\n}\n"
  },
  {
    "path": "examples/angular/editable/src/app/app.html",
    "content": "<div class=\"p-2\">\n  <table>\n    <thead>\n      @for (headerGroup of table.getHeaderGroups(); track headerGroup.id) {\n        <tr>\n          @for (header of headerGroup.headers; track header.id) {\n            @if (!header.isPlaceholder) {\n              <th>\n                <ng-container *flexRenderHeader=\"header; let header\">\n                  <div [innerHTML]=\"header\"></div>\n                </ng-container>\n              </th>\n            }\n          }\n        </tr>\n      }\n    </thead>\n    <tbody>\n      @for (row of table.getRowModel().rows; track row.id) {\n        <tr>\n          @for (cell of row.getAllCells(); track cell.id) {\n            <td>\n              <ng-container *flexRenderCell=\"cell; let cell\">\n                <div [innerHTML]=\"cell\"></div>\n              </ng-container>\n            </td>\n          }\n        </tr>\n      }\n    </tbody>\n    <tfoot>\n      @for (footerGroup of table.getFooterGroups(); track footerGroup.id) {\n        <tr>\n          @for (footer of footerGroup.headers; track footer.id) {\n            <th>\n              <ng-container *flexRenderFooter=\"footer; let footer\">\n                {{ footer }}\n              </ng-container>\n            </th>\n          }\n        </tr>\n      }\n    </tfoot>\n  </table>\n\n  <div class=\"h-2\"></div>\n  <div class=\"flex items-center gap-2\">\n    <button\n      class=\"border rounded p-1\"\n      (click)=\"table.setPageIndex(0)\"\n      [disabled]=\"!table.getCanPreviousPage()\"\n    >\n      <<\n    </button>\n    <button\n      class=\"border rounded p-1\"\n      (click)=\"table.previousPage()\"\n      [disabled]=\"!table.getCanPreviousPage()\"\n    >\n      <\n    </button>\n    <button\n      class=\"border rounded p-1\"\n      (click)=\"table.nextPage()\"\n      [disabled]=\"!table.getCanNextPage()\"\n    >\n      >\n    </button>\n    <button\n      class=\"border rounded p-1\"\n      (click)=\"table.setPageIndex(table.getPageCount() - 1)\"\n      [disabled]=\"!table.getCanNextPage()\"\n    >\n      >>\n    </button>\n    <span class=\"flex items-center gap-1\">\n      <div>Page</div>\n      <strong>\n        {{ table.state().pagination.pageIndex + 1 }} of\n        {{ table.getPageCount() }}\n      </strong>\n    </span>\n  </div>\n  <br />\n  <button class=\"border rounded p-2 mb-2\" (click)=\"refresh()\">Refresh data</button>\n</div>\n"
  },
  {
    "path": "examples/angular/editable/src/app/app.ts",
    "content": "import {\n  ChangeDetectionStrategy,\n  Component,\n  Injector,\n  afterNextRender,\n  inject,\n  signal,\n} from '@angular/core'\nimport {\n  FlexRender,\n  createPaginatedRowModel,\n  flexRenderComponent,\n  injectTable,\n  rowPaginationFeature,\n  tableFeatures,\n} from '@tanstack/angular-table'\nimport { EditableCell } from './editable-cell/editable-cell'\nimport { makeData } from './makeData'\nimport type { Person } from './makeData'\nimport type { ColumnDef, RowData, TableFeatures } from '@tanstack/angular-table'\n\ndeclare module '@tanstack/angular-table' {\n  interface TableMeta<TFeatures extends TableFeatures, TData extends RowData> {\n    updateData: (rowIndex: number, columnId: string, value: unknown) => void\n  }\n}\n\nconst _features = tableFeatures({\n  rowPaginationFeature,\n})\n\nconst defaultColumn: Partial<ColumnDef<typeof _features, Person>> = {\n  cell: ({ getValue, row, column, table }) => {\n    const initialValue = getValue()\n\n    return flexRenderComponent(EditableCell, {\n      inputs: {\n        value: initialValue,\n      },\n      outputs: {\n        change: (value) => {\n          if (table.options.meta?.updateData) {\n            table.options.meta.updateData(row.index, column.id, value)\n          }\n        },\n      },\n    })\n  },\n}\n\nconst defaultColumns: Array<ColumnDef<typeof _features, Person>> = [\n  {\n    accessorKey: 'firstName',\n    footer: (info) => info.column.id,\n  },\n  {\n    accessorFn: (row) => row.lastName,\n    id: 'lastName',\n    header: () => `<span>Last Name</span>`,\n    footer: (info) => info.column.id,\n  },\n  {\n    accessorKey: 'age',\n    header: () => 'Age',\n    footer: (info) => info.column.id,\n  },\n  {\n    accessorKey: 'visits',\n    header: () => `<span>Visits</span>`,\n    footer: (info) => info.column.id,\n  },\n  {\n    accessorKey: 'status',\n    header: 'Status',\n    footer: (info) => info.column.id,\n  },\n  {\n    accessorKey: 'progress',\n    header: 'Profile Progress',\n    footer: (info) => info.column.id,\n  },\n]\n\n@Component({\n  selector: 'app-root',\n  imports: [FlexRender],\n  templateUrl: './app.html',\n  changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class App {\n  readonly data = signal<Array<Person>>(makeData(10_000))\n  readonly injector = inject(Injector)\n\n  readonly autoResetPageIndex = signal(true)\n\n  readonly table = injectTable(() => ({\n    data: this.data(),\n    columns: defaultColumns,\n    _features,\n    _rowModels: {\n      paginatedRowModel: createPaginatedRowModel<typeof _features, Person>(),\n    },\n    defaultColumn: defaultColumn,\n    debugTable: true,\n    autoResetPageIndex: this.autoResetPageIndex(),\n    // Provide our updateData function to our table meta\n    meta: {\n      updateData: (rowIndex, columnId, value) => {\n        // Skip page index reset until after next rerender\n        this.autoResetPageIndex.set(false)\n\n        this.data.update((old) =>\n          old.map((row, index) => {\n            if (index === rowIndex) {\n              return {\n                ...old[rowIndex],\n                [columnId]: value,\n              }\n            }\n            return row\n          }),\n        )\n\n        afterNextRender(() => this.autoResetPageIndex.set(true), {\n          injector: this.injector,\n        })\n      },\n    },\n  }))\n\n  refresh() {\n    this.data.set(makeData(10_000))\n  }\n}\n"
  },
  {
    "path": "examples/angular/editable/src/app/editable-cell/editable-cell.ts",
    "content": "import { Component, input, output } from '@angular/core'\nimport { FormsModule } from '@angular/forms'\n\n@Component({\n  selector: 'editable-cell',\n  template: `\n    <input\n      [ngModel]=\"value()\"\n      [ngModelOptions]=\"{ updateOn: 'blur' }\"\n      (ngModelChange)=\"change.emit($event)\"\n    />\n  `,\n  imports: [FormsModule],\n})\nexport class EditableCell {\n  readonly value = input<unknown>()\n\n  readonly change = output<unknown>()\n}\n"
  },
  {
    "path": "examples/angular/editable/src/app/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  subRows?: Array<Person>\n}\n\nconst range = (len: number) => {\n  const arr: Array<number> = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (): Person => {\n  return {\n    firstName: faker.person.firstName(),\n    lastName: faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: faker.number.int(1000),\n    progress: faker.number.int(100),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0],\n  }\n}\n\nexport function makeData(...lens: Array<number>) {\n  const makeDataLevel = (depth = 0): Array<Person> => {\n    const len = lens[depth]\n    return range(len).map((d): Person => {\n      return {\n        ...newPerson(),\n        subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined,\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n"
  },
  {
    "path": "examples/angular/editable/src/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"utf-8\" />\n    <title>Editable data</title>\n    <base href=\"/\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n    <link rel=\"icon\" type=\"image/x-icon\" href=\"favicon.ico\" />\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n  </head>\n  <body>\n    <app-root></app-root>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/angular/editable/src/main.ts",
    "content": "import { bootstrapApplication } from '@angular/platform-browser'\nimport { appConfig } from './app/app.config'\nimport { App } from './app/app'\n\nbootstrapApplication(App, appConfig).catch((err) => console.error(err))\n"
  },
  {
    "path": "examples/angular/editable/src/styles.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n\n.pagination-actions {\n  margin: 10px;\n  display: flex;\n  gap: 10px;\n}\n"
  },
  {
    "path": "examples/angular/editable/tsconfig.app.json",
    "content": "/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */\n/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */\n{\n  \"extends\": \"./tsconfig.json\",\n  \"compilerOptions\": {\n    \"outDir\": \"./out-tsc/app\",\n    \"types\": []\n  },\n  \"include\": [\"src/**/*.ts\"],\n  \"exclude\": [\"src/**/*.spec.ts\"]\n}\n"
  },
  {
    "path": "examples/angular/editable/tsconfig.json",
    "content": "/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */\n/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */\n{\n  \"compileOnSave\": false,\n  \"compilerOptions\": {\n    \"strict\": true,\n    \"noImplicitOverride\": true,\n    \"noPropertyAccessFromIndexSignature\": true,\n    \"noImplicitReturns\": true,\n    \"noFallthroughCasesInSwitch\": true,\n    \"skipLibCheck\": true,\n    \"isolatedModules\": true,\n    \"experimentalDecorators\": true,\n    \"importHelpers\": true,\n    \"target\": \"ES2022\",\n    \"module\": \"preserve\"\n  },\n  \"angularCompilerOptions\": {\n    \"enableI18nLegacyMessageIdFormat\": false,\n    \"strictInjectionParameters\": true,\n    \"strictInputAccessModifiers\": true,\n    \"strictTemplates\": true\n  }\n}\n"
  },
  {
    "path": "examples/angular/expanding/.gitignore",
    "content": "# See https://docs.github.com/get-started/getting-started-with-git/ignoring-files for more about ignoring files.\n\n# Compiled output\n/dist\n/tmp\n/out-tsc\n/bazel-out\n\n# Node\n/node_modules\nnpm-debug.log\nyarn-error.log\n\n# IDEs and editors\n.idea/\n.project\n.classpath\n.c9/\n*.launch\n.settings/\n*.sublime-workspace\n\n# Visual Studio Code\n.vscode/*\n!.vscode/settings.json\n!.vscode/tasks.json\n!.vscode/launch.json\n!.vscode/extensions.json\n!.vscode/mcp.json\n.history/*\n\n# Miscellaneous\n/.angular/cache\n.sass-cache/\n/connect.lock\n/coverage\n/libpeerconnection.log\ntestem.log\n/typings\n__screenshots__/\n\n# System files\n.DS_Store\nThumbs.db\n"
  },
  {
    "path": "examples/angular/expanding/README.md",
    "content": "# Expanding\n\nThis project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 21.1.0.\n\n## Development server\n\nTo start a local development server, run:\n\n```bash\nng serve\n```\n\nOnce the server is running, open your browser and navigate to `http://localhost:4200/`. The application will automatically reload whenever you modify any of the source files.\n\n## Code scaffolding\n\nAngular CLI includes powerful code scaffolding tools. To generate a new component, run:\n\n```bash\nng generate component component-name\n```\n\nFor a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:\n\n```bash\nng generate --help\n```\n\n## Building\n\nTo build the project run:\n\n```bash\nng build\n```\n\nThis will compile your project and store the build artifacts in the `dist/` directory. By default, the production build optimizes your application for performance and speed.\n\n## Running unit tests\n\nTo execute unit tests with the [Vitest](https://vitest.dev/) test runner, use the following command:\n\n```bash\nng test\n```\n\n## Running end-to-end tests\n\nFor end-to-end (e2e) testing, run:\n\n```bash\nng e2e\n```\n\nAngular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.\n\n## Additional Resources\n\nFor more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.\n"
  },
  {
    "path": "examples/angular/expanding/angular.json",
    "content": "{\n  \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\n  \"version\": 1,\n  \"cli\": {\n    \"packageManager\": \"pnpm\",\n    \"analytics\": false,\n    \"cache\": {\n      \"enabled\": false\n    }\n  },\n  \"newProjectRoot\": \"projects\",\n  \"projects\": {\n    \"expanding\": {\n      \"projectType\": \"application\",\n      \"schematics\": {\n        \"@schematics/angular:component\": {\n          \"inlineTemplate\": true,\n          \"inlineStyle\": true,\n          \"skipTests\": true\n        },\n        \"@schematics/angular:class\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:directive\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:guard\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:interceptor\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:pipe\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:resolver\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:service\": {\n          \"skipTests\": true\n        }\n      },\n      \"root\": \"\",\n      \"sourceRoot\": \"src\",\n      \"prefix\": \"app\",\n      \"architect\": {\n        \"build\": {\n          \"builder\": \"@angular/build:application\",\n          \"options\": {\n            \"browser\": \"src/main.ts\",\n            \"tsConfig\": \"tsconfig.app.json\",\n            \"assets\": [\n              {\n                \"glob\": \"**/*\",\n                \"input\": \"public\"\n              }\n            ],\n            \"styles\": [\"src/styles.css\"]\n          },\n          \"configurations\": {\n            \"production\": {\n              \"budgets\": [\n                {\n                  \"type\": \"initial\",\n                  \"maximumWarning\": \"500kB\",\n                  \"maximumError\": \"1MB\"\n                },\n                {\n                  \"type\": \"anyComponentStyle\",\n                  \"maximumWarning\": \"4kB\",\n                  \"maximumError\": \"8kB\"\n                }\n              ],\n              \"outputHashing\": \"all\"\n            },\n            \"development\": {\n              \"optimization\": false,\n              \"extractLicenses\": false,\n              \"sourceMap\": true\n            }\n          },\n          \"defaultConfiguration\": \"production\"\n        },\n        \"serve\": {\n          \"builder\": \"@angular/build:dev-server\",\n          \"configurations\": {\n            \"production\": {\n              \"buildTarget\": \"expanding:build:production\"\n            },\n            \"development\": {\n              \"buildTarget\": \"expanding:build:development\"\n            }\n          },\n          \"defaultConfiguration\": \"development\"\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "examples/angular/expanding/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-angular-expanding\",\n  \"version\": \"0.0.0\",\n  \"scripts\": {\n    \"ng\": \"ng\",\n    \"start\": \"ng serve\",\n    \"build\": \"ng build\",\n    \"lint\": \"eslint ./src\",\n    \"watch\": \"ng build --watch --configuration development\"\n  },\n  \"private\": true,\n  \"packageManager\": \"pnpm@10.28.2\",\n  \"dependencies\": {\n    \"@angular/common\": \"^21.1.1\",\n    \"@angular/compiler\": \"^21.1.1\",\n    \"@angular/core\": \"^21.1.1\",\n    \"@angular/forms\": \"^21.1.1\",\n    \"@angular/platform-browser\": \"^21.1.1\",\n    \"@angular/router\": \"^21.1.1\",\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"@tanstack/angular-table\": \"^9.0.0-alpha.17\",\n    \"rxjs\": \"~7.8.2\",\n    \"tslib\": \"^2.8.1\"\n  },\n  \"devDependencies\": {\n    \"@angular/build\": \"^21.1.2\",\n    \"@angular/cli\": \"^21.1.2\",\n    \"@angular/compiler-cli\": \"^21.1.1\",\n    \"typescript\": \"5.9.3\"\n  }\n}\n"
  },
  {
    "path": "examples/angular/expanding/src/app/app.config.ts",
    "content": "import { provideBrowserGlobalErrorListeners } from '@angular/core'\nimport type { ApplicationConfig } from '@angular/core'\n\nexport const appConfig: ApplicationConfig = {\n  providers: [provideBrowserGlobalErrorListeners()],\n}\n"
  },
  {
    "path": "examples/angular/expanding/src/app/app.html",
    "content": "<div class=\"p-2\">\n  <div class=\"h-4\"></div>\n\n  <div class=\"overflow-x-auto\">\n    <table>\n      <thead>\n        @for (headerGroup of table.getHeaderGroups(); track headerGroup.id) {\n          <tr>\n            @for (header of headerGroup.headers; track header.id) {\n              <th [colSpan]=\"header.colSpan\">\n                @if (!header.isPlaceholder) {\n                  <ng-container\n                    *flexRender=\"\n                      header.column.columnDef.header;\n                      props: header.getContext();\n                      let header\n                    \"\n                  >\n                    <div [innerHTML]=\"header\"></div>\n                  </ng-container>\n                }\n              </th>\n            }\n          </tr>\n        }\n      </thead>\n      <tbody>\n        @for (row of table.getRowModel().rows; track row.id) {\n          <tr>\n            @for (cell of row.getAllCells(); track cell.id) {\n              <td>\n                <ng-container\n                  *flexRender=\"cell.column.columnDef.cell; props: cell.getContext(); let cell\"\n                >\n                  <div [innerHTML]=\"cell\"></div>\n                </ng-container>\n              </td>\n            }\n          </tr>\n        }\n      </tbody>\n    </table>\n  </div>\n\n  <div class=\"h-2\"></div>\n  <div class=\"flex items-center gap-2\">\n    <button\n      class=\"border rounded p-1\"\n      (click)=\"table.setPageIndex(0)\"\n      [disabled]=\"!table.getCanPreviousPage()\"\n    >\n      <<\n    </button>\n    <button\n      class=\"border rounded p-1\"\n      (click)=\"table.previousPage()\"\n      [disabled]=\"!table.getCanPreviousPage()\"\n    >\n      <\n    </button>\n    <button\n      class=\"border rounded p-1\"\n      (click)=\"table.nextPage()\"\n      [disabled]=\"!table.getCanNextPage()\"\n    >\n      >\n    </button>\n    <button\n      class=\"border rounded p-1\"\n      (click)=\"table.setPageIndex(table.getPageCount() - 1)\"\n      [disabled]=\"!table.getCanNextPage()\"\n    >\n      >>\n    </button>\n    <span class=\"flex items-center gap-1\">\n      <div>Page</div>\n      <strong>\n        {{ table.store.state.pagination.pageIndex + 1 }} of\n        {{ table.getPageCount() }}\n      </strong>\n    </span>\n    <span class=\"flex items-center gap-1\">\n      | Go to page:\n      <input\n        type=\"number\"\n        [value]=\"table.store.state.pagination.pageIndex + 1\"\n        (input)=\"onPageInputChange($event)\"\n        class=\"border p-1 rounded w-16\"\n      />\n    </span>\n\n    <select [value]=\"table.store.state.pagination.pageSize\" (change)=\"onPageSizeChange($event)\">\n      @for (pageSize of [10, 20, 30, 40, 50]; track pageSize) {\n        <option [value]=\"pageSize\">Show {{ pageSize }}</option>\n      }\n    </select>\n  </div>\n\n  <label>Expanded State:</label>\n  <pre>{{ rawExpandedState() }}</pre>\n  <label>Row Selection State:</label>\n  <pre>{{ rawRowSelectionState() }}</pre>\n</div>\n"
  },
  {
    "path": "examples/angular/expanding/src/app/app.ts",
    "content": "import {\n  ChangeDetectionStrategy,\n  Component,\n  computed,\n  signal,\n} from '@angular/core'\nimport {\n  FlexRender,\n  createExpandedRowModel,\n  createPaginatedRowModel,\n  flexRenderComponent,\n  injectTable,\n  rowExpandingFeature,\n  rowPaginationFeature,\n  rowSelectionFeature,\n  tableFeatures,\n} from '@tanstack/angular-table'\nimport { ReactiveFormsModule } from '@angular/forms'\nimport { makeData } from './makeData'\nimport {\n  ExpandableCell,\n  ExpandableHeaderCell,\n} from './expandable-cell/expandable-cell'\nimport type { Person } from './makeData'\nimport type { ColumnDef, ExpandedState } from '@tanstack/angular-table'\n\nexport const _features = tableFeatures({\n  rowExpandingFeature: rowExpandingFeature,\n  rowPaginationFeature: rowPaginationFeature,\n  rowSelectionFeature: rowSelectionFeature,\n})\n\nconst defaultColumns: Array<ColumnDef<typeof _features, Person>> = [\n  {\n    accessorKey: 'firstName',\n    header: () =>\n      flexRenderComponent(ExpandableHeaderCell, {\n        inputs: {\n          label: 'First name',\n        },\n      }),\n    cell: () => flexRenderComponent(ExpandableCell),\n  },\n  {\n    accessorFn: (row) => row.lastName,\n    id: 'lastName',\n    cell: (info) => info.getValue(),\n    header: () => 'Last Name',\n    footer: (props) => props.column.id,\n  },\n  {\n    accessorKey: 'age',\n    header: () => 'Age',\n    footer: (props) => props.column.id,\n  },\n  {\n    accessorKey: 'visits',\n    header: () => `Visits`,\n    footer: (props) => props.column.id,\n  },\n  {\n    accessorKey: 'status',\n    header: 'Status',\n    footer: (props) => props.column.id,\n  },\n  {\n    accessorKey: 'progress',\n    header: 'Profile Progress',\n    footer: (props) => props.column.id,\n  },\n]\n\n@Component({\n  selector: 'app-root',\n  imports: [FlexRender, ReactiveFormsModule],\n  templateUrl: './app.html',\n  changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class App {\n  readonly data = signal<Array<Person>>(makeData(100, 5, 3))\n  readonly expanded = signal<ExpandedState>({})\n\n  readonly table = injectTable(() => ({\n    _features,\n    _rowModels: {\n      paginatedRowModel: createPaginatedRowModel<typeof _features, Person>(),\n      expandedRowModel: createExpandedRowModel<typeof _features, Person>(),\n    },\n    data: this.data(),\n    columns: defaultColumns,\n    state: {\n      expanded: this.expanded(),\n    },\n    onExpandedChange: (updater) =>\n      typeof updater === 'function'\n        ? this.expanded.update(updater)\n        : this.expanded.set(updater),\n    getSubRows: (row) => row.subRows,\n    // filterFromLeafRows: true,\n    // maxLeafRowFilterDepth: 0,\n    debugTable: true,\n  }))\n\n  readonly rawExpandedState = computed(() =>\n    JSON.stringify(this.expanded(), undefined, 2),\n  )\n\n  readonly rowSelectionState = this.table.computed({\n    selector: (state) => state.rowSelection,\n  })\n  readonly rawRowSelectionState = computed(() =>\n    JSON.stringify(this.rowSelectionState(), undefined, 2),\n  )\n\n  onPageInputChange(event: Event): void {\n    const inputElement = event.target as HTMLInputElement\n    const page = inputElement.value ? Number(inputElement.value) - 1 : 0\n    this.table.setPageIndex(page)\n  }\n\n  onPageSizeChange(event: any): void {\n    this.table.setPageSize(Number(event.target.value))\n  }\n}\n"
  },
  {
    "path": "examples/angular/expanding/src/app/expandable-cell/expandable-cell.ts",
    "content": "import { ChangeDetectionStrategy, Component, input } from '@angular/core'\nimport {\n  injectTableCellContext,\n  injectTableHeaderContext,\n} from '@tanstack/angular-table'\nimport type { RowData } from '@tanstack/angular-table'\nimport type { _features } from '../app'\n\n@Component({\n  standalone: true,\n  template: `\n    <input\n      type=\"checkbox\"\n      [indeterminate]=\"table.getIsSomeRowsSelected()\"\n      [checked]=\"table.getIsAllRowsSelected()\"\n      (change)=\"table.getToggleAllRowsSelectedHandler()($event)\"\n    />\n    {{ ' ' }}\n\n    <button (click)=\"table.getToggleAllRowsExpandedHandler()($event)\">\n      {{ table.getIsAllRowsExpanded() ? '👇' : '👉' }}\n    </button>\n\n    {{ label() }}\n  `,\n  changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ExpandableHeaderCell<T extends RowData> {\n  readonly context = injectTableHeaderContext<typeof _features, T, unknown>()\n\n  readonly label = input.required<string>()\n\n  get table() {\n    return this.context().table\n  }\n}\n\n@Component({\n  standalone: true,\n  template: `\n    <div [style.--depth]=\"row.depth\">\n      <div>\n        <input\n          type=\"checkbox\"\n          [indeterminate]=\"row.getIsSomeSelected()\"\n          [checked]=\"row.getIsSelected()\"\n          (change)=\"row.getToggleSelectedHandler()($event)\"\n        />\n        {{ ' ' }}\n\n        @if (row.getCanExpand()) {\n          <button (click)=\"row.getToggleExpandedHandler()()\">\n            {{ row.getIsExpanded() ? '👇' : '👉' }}\n          </button>\n        } @else {\n          <span>🔵</span>\n        }\n        {{ ' ' }}\n\n        {{ context().getValue() }}\n      </div>\n    </div>\n  `,\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  styles: `\n    :host {\n      > div {\n        padding-left: calc(2rem * var(--depth, 1));\n      }\n    }\n  `,\n})\nexport class ExpandableCell<T extends RowData> {\n  readonly context = injectTableCellContext<typeof _features, T, unknown>()\n\n  get row() {\n    return this.context().row\n  }\n}\n"
  },
  {
    "path": "examples/angular/expanding/src/app/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  subRows?: Array<Person>\n}\n\nconst range = (len: number) => {\n  const arr: Array<number> = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (): Person => {\n  return {\n    firstName: faker.person.firstName(),\n    lastName: faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: faker.number.int(1000),\n    progress: faker.number.int(100),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0],\n  }\n}\n\nexport function makeData(...lens: Array<number>) {\n  const makeDataLevel = (depth = 0): Array<Person> => {\n    const len = lens[depth]\n    return range(len).map((d): Person => {\n      return {\n        ...newPerson(),\n        subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined,\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n"
  },
  {
    "path": "examples/angular/expanding/src/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"utf-8\" />\n    <title>Expanding</title>\n    <base href=\"/\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n    <link rel=\"icon\" type=\"image/x-icon\" href=\"favicon.ico\" />\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n  </head>\n  <body>\n    <app-root></app-root>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/angular/expanding/src/main.ts",
    "content": "import { bootstrapApplication } from '@angular/platform-browser'\nimport { appConfig } from './app/app.config'\nimport { App } from './app/app'\n\nbootstrapApplication(App, appConfig).catch((err) => console.error(err))\n"
  },
  {
    "path": "examples/angular/expanding/src/styles.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n"
  },
  {
    "path": "examples/angular/expanding/tsconfig.app.json",
    "content": "/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */\n/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */\n{\n  \"extends\": \"./tsconfig.json\",\n  \"compilerOptions\": {\n    \"outDir\": \"./out-tsc/app\",\n    \"types\": []\n  },\n  \"include\": [\"src/**/*.ts\"],\n  \"exclude\": [\"src/**/*.spec.ts\"]\n}\n"
  },
  {
    "path": "examples/angular/expanding/tsconfig.json",
    "content": "/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */\n/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */\n{\n  \"compileOnSave\": false,\n  \"compilerOptions\": {\n    \"strict\": true,\n    \"noImplicitOverride\": true,\n    \"noPropertyAccessFromIndexSignature\": true,\n    \"noImplicitReturns\": true,\n    \"noFallthroughCasesInSwitch\": true,\n    \"skipLibCheck\": true,\n    \"isolatedModules\": true,\n    \"experimentalDecorators\": true,\n    \"importHelpers\": true,\n    \"target\": \"ES2022\",\n    \"module\": \"preserve\"\n  },\n  \"angularCompilerOptions\": {\n    \"enableI18nLegacyMessageIdFormat\": false,\n    \"strictInjectionParameters\": true,\n    \"strictInputAccessModifiers\": true,\n    \"strictTemplates\": true\n  }\n}\n"
  },
  {
    "path": "examples/angular/filters/.gitignore",
    "content": "# See https://docs.github.com/get-started/getting-started-with-git/ignoring-files for more about ignoring files.\n\n# Compiled output\n/dist\n/tmp\n/out-tsc\n/bazel-out\n\n# Node\n/node_modules\nnpm-debug.log\nyarn-error.log\n\n# IDEs and editors\n.idea/\n.project\n.classpath\n.c9/\n*.launch\n.settings/\n*.sublime-workspace\n\n# Visual Studio Code\n.vscode/*\n!.vscode/settings.json\n!.vscode/tasks.json\n!.vscode/launch.json\n!.vscode/extensions.json\n!.vscode/mcp.json\n.history/*\n\n# Miscellaneous\n/.angular/cache\n.sass-cache/\n/connect.lock\n/coverage\n/libpeerconnection.log\ntestem.log\n/typings\n__screenshots__/\n\n# System files\n.DS_Store\nThumbs.db\n"
  },
  {
    "path": "examples/angular/filters/README.md",
    "content": "# Filters\n\nThis project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 21.1.0.\n\n## Development server\n\nTo start a local development server, run:\n\n```bash\nng serve\n```\n\nOnce the server is running, open your browser and navigate to `http://localhost:4200/`. The application will automatically reload whenever you modify any of the source files.\n\n## Code scaffolding\n\nAngular CLI includes powerful code scaffolding tools. To generate a new component, run:\n\n```bash\nng generate component component-name\n```\n\nFor a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:\n\n```bash\nng generate --help\n```\n\n## Building\n\nTo build the project run:\n\n```bash\nng build\n```\n\nThis will compile your project and store the build artifacts in the `dist/` directory. By default, the production build optimizes your application for performance and speed.\n\n## Running unit tests\n\nTo execute unit tests with the [Vitest](https://vitest.dev/) test runner, use the following command:\n\n```bash\nng test\n```\n\n## Running end-to-end tests\n\nFor end-to-end (e2e) testing, run:\n\n```bash\nng e2e\n```\n\nAngular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.\n\n## Additional Resources\n\nFor more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.\n"
  },
  {
    "path": "examples/angular/filters/angular.json",
    "content": "{\n  \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\n  \"version\": 1,\n  \"cli\": {\n    \"packageManager\": \"pnpm\",\n    \"analytics\": false,\n    \"cache\": {\n      \"enabled\": false\n    }\n  },\n  \"newProjectRoot\": \"projects\",\n  \"projects\": {\n    \"filters\": {\n      \"projectType\": \"application\",\n      \"schematics\": {\n        \"@schematics/angular:component\": {\n          \"inlineTemplate\": true,\n          \"inlineStyle\": true,\n          \"skipTests\": true\n        },\n        \"@schematics/angular:class\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:directive\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:guard\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:interceptor\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:pipe\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:resolver\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:service\": {\n          \"skipTests\": true\n        }\n      },\n      \"root\": \"\",\n      \"sourceRoot\": \"src\",\n      \"prefix\": \"app\",\n      \"architect\": {\n        \"build\": {\n          \"builder\": \"@angular/build:application\",\n          \"options\": {\n            \"browser\": \"src/main.ts\",\n            \"tsConfig\": \"tsconfig.app.json\",\n            \"assets\": [\n              {\n                \"glob\": \"**/*\",\n                \"input\": \"public\"\n              }\n            ],\n            \"styles\": [\"src/styles.css\"]\n          },\n          \"configurations\": {\n            \"production\": {\n              \"budgets\": [\n                {\n                  \"type\": \"initial\",\n                  \"maximumWarning\": \"500kB\",\n                  \"maximumError\": \"1MB\"\n                },\n                {\n                  \"type\": \"anyComponentStyle\",\n                  \"maximumWarning\": \"4kB\",\n                  \"maximumError\": \"8kB\"\n                }\n              ],\n              \"outputHashing\": \"all\"\n            },\n            \"development\": {\n              \"optimization\": false,\n              \"extractLicenses\": false,\n              \"sourceMap\": true\n            }\n          },\n          \"defaultConfiguration\": \"production\"\n        },\n        \"serve\": {\n          \"builder\": \"@angular/build:dev-server\",\n          \"configurations\": {\n            \"production\": {\n              \"buildTarget\": \"filters:build:production\"\n            },\n            \"development\": {\n              \"buildTarget\": \"filters:build:development\"\n            }\n          },\n          \"defaultConfiguration\": \"development\"\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "examples/angular/filters/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-angular-filters\",\n  \"version\": \"0.0.0\",\n  \"scripts\": {\n    \"ng\": \"ng\",\n    \"start\": \"ng serve\",\n    \"build\": \"ng build\",\n    \"lint\": \"eslint ./src\",\n    \"watch\": \"ng build --watch --configuration development\"\n  },\n  \"private\": true,\n  \"packageManager\": \"pnpm@10.28.2\",\n  \"dependencies\": {\n    \"@angular/common\": \"^21.1.1\",\n    \"@angular/compiler\": \"^21.1.1\",\n    \"@angular/core\": \"^21.1.1\",\n    \"@angular/forms\": \"^21.1.1\",\n    \"@angular/platform-browser\": \"^21.1.1\",\n    \"@angular/router\": \"^21.1.1\",\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"@tanstack/angular-table\": \"^9.0.0-alpha.17\",\n    \"rxjs\": \"~7.8.2\",\n    \"tslib\": \"^2.8.1\"\n  },\n  \"devDependencies\": {\n    \"@angular/build\": \"^21.1.2\",\n    \"@angular/cli\": \"^21.1.2\",\n    \"@angular/compiler-cli\": \"^21.1.1\",\n    \"typescript\": \"5.9.3\"\n  }\n}\n"
  },
  {
    "path": "examples/angular/filters/src/app/app.config.ts",
    "content": "import { provideBrowserGlobalErrorListeners } from '@angular/core'\nimport type { ApplicationConfig } from '@angular/core'\n\nexport const appConfig: ApplicationConfig = {\n  providers: [provideBrowserGlobalErrorListeners()],\n}\n"
  },
  {
    "path": "examples/angular/filters/src/app/app.html",
    "content": "<div class=\"p-2\">\n  <div class=\"h-2\"></div>\n\n  <table>\n    <thead>\n      @for (headerGroup of table.getHeaderGroups(); track headerGroup.id) {\n        <tr>\n          @for (header of headerGroup.headers; track header.id) {\n            <th [attr.colSpan]=\"header.colSpan\">\n              @if (!header.isPlaceholder) {\n                <div\n                  [class.cursor-pointer]=\"header.column.getCanSort()\"\n                  [class.select-none]=\"header.column.getCanSort()\"\n                >\n                  <ng-container *flexRenderHeader=\"header; let headerCell\">\n                    {{ headerCell }}\n                  </ng-container>\n\n                  @if (header.column.getIsSorted() === 'asc') {\n                    <span> 🔼</span>\n                  }\n                  @if (header.column.getIsSorted() === 'desc') {\n                    <span> 🔽</span>\n                  }\n                </div>\n\n                @if (header.column.getCanFilter()) {\n                  <div>\n                    <app-table-filter [column]=\"header.column\" [table]=\"table\" />\n                  </div>\n                }\n              }\n            </th>\n          }\n        </tr>\n      }\n    </thead>\n    <tbody>\n      @for (row of table.getRowModel().rows; track row.id) {\n        <tr>\n          @for (cell of row.getAllCells(); track cell.id) {\n            <td>\n              <ng-container *flexRenderCell=\"cell; let renderCell\">\n                {{ renderCell }}\n              </ng-container>\n            </td>\n          }\n        </tr>\n      }\n    </tbody>\n  </table>\n\n  <div class=\"h-2\"></div>\n  <div class=\"flex items-center gap-2\">\n    <button\n      class=\"border rounded p-1\"\n      (click)=\"table.setPageIndex(0)\"\n      [disabled]=\"!table.getCanPreviousPage()\"\n    >\n      <<\n    </button>\n    <button\n      class=\"border rounded p-1\"\n      (click)=\"table.previousPage()\"\n      [disabled]=\"!table.getCanPreviousPage()\"\n    >\n      <\n    </button>\n    <button\n      class=\"border rounded p-1\"\n      (click)=\"table.nextPage()\"\n      [disabled]=\"!table.getCanNextPage()\"\n    >\n      >\n    </button>\n    <button\n      class=\"border rounded p-1\"\n      (click)=\"table.setPageIndex(table.getPageCount() - 1)\"\n      [disabled]=\"!table.getCanNextPage()\"\n    >\n      >>\n    </button>\n    <span class=\"flex items-center gap-1\">\n      <div>Page</div>\n      <strong>\n        {{ table.store.state.pagination.pageIndex + 1 }} of\n        {{ table.getPageCount() }}\n      </strong>\n    </span>\n    <span class=\"flex items-center gap-1\">\n      | Go to page:\n      <input\n        type=\"number\"\n        [value]=\"table.store.state.pagination.pageIndex + 1\"\n        (input)=\"onPageInputChange($event)\"\n        class=\"border p-1 rounded w-16\"\n      />\n    </span>\n\n    <select [value]=\"table.store.state.pagination.pageSize\" (change)=\"onPageSizeChange($event)\">\n      @for (pageSize of [10, 20, 30, 40, 50]; track pageSize) {\n        <option [value]=\"pageSize\">Show {{ pageSize }}</option>\n      }\n    </select>\n  </div>\n  <div>{{ table.getPrePaginatedRowModel().rows.length }} Rows</div>\n  <div>\n    <button class=\"border rounded p-2 mb-2\" (click)=\"refreshData()\">Refresh Data</button>\n  </div>\n  <div>\n    <pre>{{ stringifiedFilters() }}</pre>\n  </div>\n</div>\n"
  },
  {
    "path": "examples/angular/filters/src/app/app.ts",
    "content": "import {\n  ChangeDetectionStrategy,\n  Component,\n  computed,\n  signal,\n} from '@angular/core'\nimport {\n  FlexRender,\n  columnFacetingFeature,\n  columnFilteringFeature,\n  createFacetedMinMaxValues,\n  createFacetedRowModel,\n  createFacetedUniqueValues,\n  createFilteredRowModel,\n  createPaginatedRowModel,\n  createSortedRowModel,\n  createTableHook,\n  filterFns,\n  isFunction,\n  rowPaginationFeature,\n  rowSortingFeature,\n  sortFns,\n  tableFeatures,\n} from '@tanstack/angular-table'\nimport { makeData } from './makeData'\nimport { TableFilter } from './table-filter/table-filter'\nimport type { ColumnFiltersState, Updater } from '@tanstack/angular-table'\nimport type { Person } from './makeData'\n\nexport const _features = tableFeatures({\n  columnFilteringFeature,\n  columnFacetingFeature,\n  rowPaginationFeature,\n  rowSortingFeature,\n})\n\nconst { injectAppTable, createAppColumnHelper } = createTableHook({\n  _features,\n  _rowModels: {\n    facetedMinMaxValues: createFacetedMinMaxValues(),\n    facetedRowModel: createFacetedRowModel(),\n    facetedUniqueValues: createFacetedUniqueValues(),\n    filteredRowModel: createFilteredRowModel(filterFns),\n    paginatedRowModel: createPaginatedRowModel(),\n    sortedRowModel: createSortedRowModel(sortFns),\n  },\n  debugTable: true,\n  debugHeaders: true,\n  debugColumns: false,\n})\n\nconst columnHelper = createAppColumnHelper<Person>()\n\nconst columns = columnHelper.columns([\n  columnHelper.accessor('firstName', {\n    cell: (info) => info.getValue(),\n  }),\n  columnHelper.accessor((row) => row.lastName, {\n    id: 'lastName',\n    cell: (info) => info.getValue(),\n    header: () => 'Last Name',\n  }),\n  columnHelper.accessor('age', {\n    header: () => 'Age',\n    meta: {\n      filterVariant: 'range',\n    },\n  }),\n  columnHelper.accessor('visits', {\n    header: () => 'Visits',\n    meta: {\n      filterVariant: 'range',\n    },\n  }),\n  columnHelper.accessor('status', {\n    header: 'Status',\n    meta: {\n      filterVariant: 'select',\n    },\n  }),\n  columnHelper.accessor('progress', {\n    header: 'Profile Progress',\n    meta: {\n      filterVariant: 'range',\n    },\n  }),\n])\n\n@Component({\n  selector: 'app-root',\n  imports: [TableFilter, FlexRender],\n  templateUrl: './app.html',\n  changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class App {\n  readonly columnFilters = signal<ColumnFiltersState>([])\n  readonly data = signal(makeData(5000))\n\n  table = injectAppTable(() => ({\n    columns,\n    data: this.data(),\n    state: {\n      columnFilters: this.columnFilters(),\n    },\n    onColumnFiltersChange: (updater: Updater<ColumnFiltersState>) => {\n      isFunction(updater)\n        ? this.columnFilters.update(updater)\n        : this.columnFilters.set(updater)\n    },\n  }))\n\n  readonly stringifiedFilters = computed(() =>\n    JSON.stringify(this.columnFilters(), null, 2),\n  )\n\n  onPageInputChange(event: Event): void {\n    const inputElement = event.target as HTMLInputElement\n    const page = inputElement.value ? Number(inputElement.value) - 1 : 0\n    this.table.setPageIndex(page)\n  }\n\n  onPageSizeChange(event: any): void {\n    this.table.setPageSize(Number(event.target.value))\n  }\n\n  refreshData(): void {\n    this.data.set(makeData(100_000)) // stress test\n  }\n}\n"
  },
  {
    "path": "examples/angular/filters/src/app/debounced-input/debounced-input.ts",
    "content": "import { Directive, ElementRef, inject, input } from '@angular/core'\nimport { debounceTime, fromEvent, switchMap } from 'rxjs'\nimport { outputFromObservable, toObservable } from '@angular/core/rxjs-interop'\n\n@Directive({\n  standalone: true,\n  selector: 'input[debouncedInput]',\n})\nexport class DebouncedInput {\n  #ref = inject(ElementRef).nativeElement as HTMLInputElement\n\n  readonly debounce = input<number>(500)\n  readonly debounce$ = toObservable(this.debounce)\n\n  readonly changeEvent = outputFromObservable(\n    this.debounce$.pipe(\n      switchMap((debounce: number) => {\n        return fromEvent(this.#ref, 'change').pipe(debounceTime(debounce))\n      }),\n    ),\n  )\n}\n"
  },
  {
    "path": "examples/angular/filters/src/app/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  subRows?: Array<Person>\n}\n\nconst range = (len: number) => {\n  const arr: Array<number> = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (): Person => {\n  return {\n    firstName: faker.person.firstName(),\n    lastName: faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: faker.number.int(1000),\n    progress: faker.number.int(100),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0],\n  }\n}\n\nexport function makeData(...lens: Array<number>) {\n  const makeDataLevel = (depth = 0): Array<Person> => {\n    const len = lens[depth]\n    return range(len).map((d): Person => {\n      return {\n        ...newPerson(),\n        subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined,\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n"
  },
  {
    "path": "examples/angular/filters/src/app/table-filter/table-filter.ts",
    "content": "import { Component, computed, input } from '@angular/core'\nimport { DebouncedInput } from '../debounced-input/debounced-input'\nimport type { _features } from '../app'\nimport type { Person } from '../makeData'\nimport type {\n  CellData,\n  Column,\n  RowData,\n  Table,\n  TableFeatures,\n} from '@tanstack/angular-table'\n\ndeclare module '@tanstack/angular-table' {\n  // allows us to define custom properties for our columns\n  interface ColumnMeta<\n    TFeatures extends TableFeatures,\n    TData extends RowData,\n    TValue extends CellData = CellData,\n  > {\n    filterVariant?: 'text' | 'range' | 'select'\n  }\n}\n\n@Component({\n  selector: 'app-table-filter',\n  template: `\n    @switch (filterVariant()) {\n      @case ('range') {\n        <div>\n          <div class=\"flex space-x-2\">\n            <input\n              debouncedInput\n              [debounce]=\"500\"\n              type=\"number\"\n              class=\"w-24 border shadow rounded\"\n              [min]=\"column().getFacetedMinMaxValues()?.[0] ?? ''\"\n              [max]=\"column().getFacetedMinMaxValues()?.[1] ?? ''\"\n              [value]=\"columnFilterValue()?.[0] ?? ''\"\n              [attr.placeholder]=\"minRangePlaceholder()\"\n              (changeEvent)=\"changeMinRangeValue($event)\"\n            />\n\n            <input\n              debouncedInput\n              [debounce]=\"500\"\n              type=\"number\"\n              class=\"w-24 border shadow rounded\"\n              [min]=\"column().getFacetedMinMaxValues()?.[0] ?? ''\"\n              [max]=\"column().getFacetedMinMaxValues()?.[1] ?? ''\"\n              [value]=\"columnFilterValue()?.[1] ?? ''\"\n              [attr.placeholder]=\"maxRangePlaceholder()\"\n              (changeEvent)=\"changeMaxRangeValue($event)\"\n            />\n          </div>\n          <div class=\"h-1\"></div>\n        </div>\n      }\n      @case ('select') {\n        <select\n          [value]=\"columnFilterValue()?.toString()\"\n          (change)=\"column().setFilterValue($any($event).target.value)\"\n        >\n          <option value=\"\">All</option>\n          @for (value of sortedUniqueValues(); track value) {\n            <option [value]=\"value\">\n              {{ value }}\n            </option>\n          }\n        </select>\n      }\n      @default {\n        <datalist [id]=\"column().id + 'list'\">\n          @for (value of sortedUniqueValues(); track value) {\n            <option [value]=\"value\">\n              {{ value }}\n            </option>\n          }\n        </datalist>\n        <input\n          type=\"text\"\n          class=\"w-36 border shadow rounded\"\n          debouncedInput\n          [debounce]=\"500\"\n          [attr.placeholder]=\"\n            'Search... (' + column().getFacetedUniqueValues().size + ')'\n          \"\n          [attr.list]=\"column().id + 'list'\"\n          [value]=\"columnFilterValue() ?? ''\"\n          (changeEvent)=\"column().setFilterValue($any($event).target.value)\"\n        />\n        <div class=\"h-1\"></div>\n      }\n    }\n  `,\n  imports: [DebouncedInput],\n})\nexport class TableFilter {\n  readonly column = input.required<Column<typeof _features, Person>>()\n\n  readonly table = input.required<Table<typeof _features, Person>>()\n\n  readonly filterVariant = computed(() => {\n    return (this.column().columnDef.meta ?? {}).filterVariant\n  })\n\n  readonly columnFilterValue = computed(\n    () => this.column().getFilterValue() as any,\n  )\n\n  readonly minRangePlaceholder = computed(() => {\n    return `Min ${\n      this.column().getFacetedMinMaxValues()?.[0] !== undefined\n        ? `(${this.column().getFacetedMinMaxValues()?.[0]})`\n        : ''\n    }`\n  })\n\n  readonly maxRangePlaceholder = computed(() => {\n    return `Max ${\n      this.column().getFacetedMinMaxValues()?.[1]\n        ? `(${this.column().getFacetedMinMaxValues()?.[1]})`\n        : ''\n    }`\n  })\n\n  readonly sortedUniqueValues = computed(() => {\n    const filterVariant = this.filterVariant()\n    const column = this.column()\n    if (filterVariant === 'range') {\n      return []\n    }\n    return Array.from(column.getFacetedUniqueValues().keys())\n      .sort()\n      .slice(0, 5000)\n  })\n\n  readonly changeMinRangeValue = (event: Event) => {\n    const value = (event.target as HTMLInputElement).value\n    this.column().setFilterValue((old?: [number, number]) => {\n      return [value, old?.[1]]\n    })\n  }\n\n  readonly changeMaxRangeValue = (event: Event) => {\n    const value = (event.target as HTMLInputElement).value\n    this.column().setFilterValue((old?: [number, number]) => {\n      return [old?.[0], value]\n    })\n  }\n}\n"
  },
  {
    "path": "examples/angular/filters/src/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"utf-8\" />\n    <title>Selection</title>\n    <base href=\"/\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n    <link rel=\"icon\" type=\"image/x-icon\" href=\"favicon.ico\" />\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n  </head>\n  <body>\n    <app-root></app-root>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/angular/filters/src/main.ts",
    "content": "import { bootstrapApplication } from '@angular/platform-browser'\nimport { appConfig } from './app/app.config'\nimport { App } from './app/app'\n\nbootstrapApplication(App, appConfig).catch((err) => console.error(err))\n"
  },
  {
    "path": "examples/angular/filters/src/styles.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n"
  },
  {
    "path": "examples/angular/filters/tsconfig.app.json",
    "content": "/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */\n/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */\n{\n  \"extends\": \"./tsconfig.json\",\n  \"compilerOptions\": {\n    \"outDir\": \"./out-tsc/app\",\n    \"types\": []\n  },\n  \"include\": [\"src/**/*.ts\"],\n  \"exclude\": [\"src/**/*.spec.ts\"]\n}\n"
  },
  {
    "path": "examples/angular/filters/tsconfig.json",
    "content": "/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */\n/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */\n{\n  \"compileOnSave\": false,\n  \"compilerOptions\": {\n    \"strict\": true,\n    \"noImplicitOverride\": true,\n    \"noPropertyAccessFromIndexSignature\": true,\n    \"noImplicitReturns\": true,\n    \"noFallthroughCasesInSwitch\": true,\n    \"skipLibCheck\": true,\n    \"isolatedModules\": true,\n    \"experimentalDecorators\": true,\n    \"importHelpers\": true,\n    \"target\": \"ES2022\",\n    \"module\": \"preserve\"\n  },\n  \"angularCompilerOptions\": {\n    \"enableI18nLegacyMessageIdFormat\": false,\n    \"strictInjectionParameters\": true,\n    \"strictInputAccessModifiers\": true,\n    \"strictTemplates\": true\n  }\n}\n"
  },
  {
    "path": "examples/angular/grouping/.gitignore",
    "content": "# See https://docs.github.com/get-started/getting-started-with-git/ignoring-files for more about ignoring files.\n\n# Compiled output\n/dist\n/tmp\n/out-tsc\n/bazel-out\n\n# Node\n/node_modules\nnpm-debug.log\nyarn-error.log\n\n# IDEs and editors\n.idea/\n.project\n.classpath\n.c9/\n*.launch\n.settings/\n*.sublime-workspace\n\n# Visual Studio Code\n.vscode/*\n!.vscode/settings.json\n!.vscode/tasks.json\n!.vscode/launch.json\n!.vscode/extensions.json\n!.vscode/mcp.json\n.history/*\n\n# Miscellaneous\n/.angular/cache\n.sass-cache/\n/connect.lock\n/coverage\n/libpeerconnection.log\ntestem.log\n/typings\n__screenshots__/\n\n# System files\n.DS_Store\nThumbs.db\n"
  },
  {
    "path": "examples/angular/grouping/README.md",
    "content": "# Grouping\n\nThis project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 21.1.0.\n\n## Development server\n\nTo start a local development server, run:\n\n```bash\nng serve\n```\n\nOnce the server is running, open your browser and navigate to `http://localhost:4200/`. The application will automatically reload whenever you modify any of the source files.\n\n## Code scaffolding\n\nAngular CLI includes powerful code scaffolding tools. To generate a new component, run:\n\n```bash\nng generate component component-name\n```\n\nFor a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:\n\n```bash\nng generate --help\n```\n\n## Building\n\nTo build the project run:\n\n```bash\nng build\n```\n\nThis will compile your project and store the build artifacts in the `dist/` directory. By default, the production build optimizes your application for performance and speed.\n\n## Running unit tests\n\nTo execute unit tests with the [Vitest](https://vitest.dev/) test runner, use the following command:\n\n```bash\nng test\n```\n\n## Running end-to-end tests\n\nFor end-to-end (e2e) testing, run:\n\n```bash\nng e2e\n```\n\nAngular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.\n\n## Additional Resources\n\nFor more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.\n"
  },
  {
    "path": "examples/angular/grouping/angular.json",
    "content": "{\n  \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\n  \"version\": 1,\n  \"cli\": {\n    \"packageManager\": \"pnpm\",\n    \"analytics\": false,\n    \"cache\": {\n      \"enabled\": false\n    }\n  },\n  \"newProjectRoot\": \"projects\",\n  \"projects\": {\n    \"grouping\": {\n      \"projectType\": \"application\",\n      \"schematics\": {\n        \"@schematics/angular:component\": {\n          \"inlineTemplate\": true,\n          \"inlineStyle\": true,\n          \"skipTests\": true\n        },\n        \"@schematics/angular:class\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:directive\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:guard\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:interceptor\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:pipe\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:resolver\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:service\": {\n          \"skipTests\": true\n        }\n      },\n      \"root\": \"\",\n      \"sourceRoot\": \"src\",\n      \"prefix\": \"app\",\n      \"architect\": {\n        \"build\": {\n          \"builder\": \"@angular/build:application\",\n          \"options\": {\n            \"browser\": \"src/main.ts\",\n            \"tsConfig\": \"tsconfig.app.json\",\n            \"assets\": [\n              {\n                \"glob\": \"**/*\",\n                \"input\": \"public\"\n              }\n            ],\n            \"styles\": [\"src/styles.css\"]\n          },\n          \"configurations\": {\n            \"production\": {\n              \"budgets\": [\n                {\n                  \"type\": \"initial\",\n                  \"maximumWarning\": \"500kB\",\n                  \"maximumError\": \"1MB\"\n                },\n                {\n                  \"type\": \"anyComponentStyle\",\n                  \"maximumWarning\": \"4kB\",\n                  \"maximumError\": \"8kB\"\n                }\n              ],\n              \"outputHashing\": \"all\"\n            },\n            \"development\": {\n              \"optimization\": false,\n              \"extractLicenses\": false,\n              \"sourceMap\": true\n            }\n          },\n          \"defaultConfiguration\": \"production\"\n        },\n        \"serve\": {\n          \"builder\": \"@angular/build:dev-server\",\n          \"configurations\": {\n            \"production\": {\n              \"buildTarget\": \"grouping:build:production\"\n            },\n            \"development\": {\n              \"buildTarget\": \"grouping:build:development\"\n            }\n          },\n          \"defaultConfiguration\": \"development\"\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "examples/angular/grouping/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-angular-grouping\",\n  \"version\": \"0.0.0\",\n  \"scripts\": {\n    \"ng\": \"ng\",\n    \"start\": \"ng serve\",\n    \"build\": \"ng build\",\n    \"watch\": \"ng build --watch --configuration development\",\n    \"lint\": \"eslint ./src\"\n  },\n  \"private\": true,\n  \"packageManager\": \"pnpm@10.28.2\",\n  \"dependencies\": {\n    \"@angular/common\": \"^21.1.1\",\n    \"@angular/compiler\": \"^21.1.1\",\n    \"@angular/core\": \"^21.1.1\",\n    \"@angular/forms\": \"^21.1.1\",\n    \"@angular/platform-browser\": \"^21.1.1\",\n    \"@angular/router\": \"^21.1.1\",\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"@tanstack/angular-table\": \"^9.0.0-alpha.17\",\n    \"rxjs\": \"~7.8.2\",\n    \"tslib\": \"^2.8.1\"\n  },\n  \"devDependencies\": {\n    \"@angular/build\": \"^21.1.2\",\n    \"@angular/cli\": \"^21.1.2\",\n    \"@angular/compiler-cli\": \"^21.1.1\",\n    \"typescript\": \"5.9.3\"\n  }\n}\n"
  },
  {
    "path": "examples/angular/grouping/src/app/app.config.ts",
    "content": "import { provideBrowserGlobalErrorListeners } from '@angular/core'\nimport type { ApplicationConfig } from '@angular/core'\n\nexport const appConfig: ApplicationConfig = {\n  providers: [provideBrowserGlobalErrorListeners()],\n}\n"
  },
  {
    "path": "examples/angular/grouping/src/app/app.html",
    "content": "<div class=\"p-2\">\n  <div class=\"h-2\"></div>\n  <table>\n    <thead>\n      @for (headerGroup of table.getHeaderGroups(); track headerGroup.id) {\n        <tr>\n          @for (header of headerGroup.headers; track header.id) {\n            <th [attr.colSpan]=\"header.colSpan\">\n              @if (header.isPlaceholder) {\n                <ng-container />\n              } @else {\n                <div>\n                  @if (header.column.getCanGroup()) {\n                    <!-- If the header can be grouped, let's add a toggle -->\n                    <button (click)=\"header.column.toggleGrouping()\" [style.cursor]=\"'pointer'\">\n                      @if (header.column.getIsGrouped()) {\n                        🛑({{ header.column.getGroupedIndex() }})\n                      } @else {\n                        👊\n                      }\n                    </button>\n                  }\n                  <ng-container *flexRenderHeader=\"header; let header\">\n                    <span>{{ header }}</span>\n                  </ng-container>\n                </div>\n              }\n            </th>\n          }\n        </tr>\n      }\n    </thead>\n    <tbody>\n      @for (row of table.getRowModel().rows; track row.id) {\n        <tr>\n          @for (cell of row.getAllCells(); track cell.id) {\n            <td\n              [style.background]=\"\n                cell.getIsGrouped()\n                  ? '#0aff0082'\n                  : cell.getIsAggregated()\n                    ? '#ffa50078'\n                    : cell.getIsPlaceholder()\n                      ? '#ff000042'\n                      : 'white'\n              \"\n            >\n              @if (cell.getIsGrouped()) {\n                <!-- If it's a grouped cell, add an expander and row count -->\n                <button\n                  (click)=\"row.toggleExpanded()\"\n                  [style.cursor]=\"row.getCanExpand() ? 'pointer' : 'normal'\"\n                >\n                  {{ row.getIsExpanded() ? '👇 ' : '👉' }}\n                </button>\n                <ng-container *flexRenderCell=\"cell; let cell\">\n                  <span>{{ cell }}</span>\n                </ng-container>\n                {{ ' ' }}{{ row.subRows.length }}\n              } @else if (cell.getIsAggregated()) {\n                <!-- If the cell is aggregated, use the Aggregated -->\n                <!-- renderer for cell -->\n                <ng-container\n                  *flexRender=\"\n                    cell.column.columnDef.aggregatedCell ?? cell.column.columnDef.cell;\n                    props: cell.getContext();\n                    let aggregatedCell\n                  \"\n                >\n                  {{ aggregatedCell }}\n                </ng-container>\n              } @else if (cell.getIsPlaceholder()) {\n              } @else {\n                <!-- For cells with repeated values, render null-->\n                <!-- Otherwise, just render the regular cell-->\n                <ng-container *flexRenderCell=\"cell; let cell\">\n                  {{ cell }}\n                </ng-container>\n              }\n            </td>\n          }\n        </tr>\n      }\n    </tbody>\n  </table>\n\n  <div class=\"h-2\"></div>\n  <div class=\"flex items-center gap-2\">\n    <button\n      class=\"border rounded p-1\"\n      (click)=\"table.setPageIndex(0)\"\n      [disabled]=\"!table.getCanPreviousPage()\"\n    >\n      <<\n    </button>\n    <button\n      class=\"border rounded p-1\"\n      (click)=\"table.previousPage()\"\n      [disabled]=\"!table.getCanPreviousPage()\"\n    >\n      <\n    </button>\n    <button\n      class=\"border rounded p-1\"\n      (click)=\"table.nextPage()\"\n      [disabled]=\"!table.getCanNextPage()\"\n    >\n      >\n    </button>\n    <button\n      class=\"border rounded p-1\"\n      (click)=\"table.setPageIndex(table.getPageCount() - 1)\"\n      [disabled]=\"!table.getCanNextPage()\"\n    >\n      >>\n    </button>\n    <span class=\"flex items-center gap-1\">\n      <div>Page</div>\n      <strong>\n        {{ table.store.state.pagination.pageIndex + 1 }} of\n        {{ table.getPageCount() }}\n      </strong>\n    </span>\n    <span class=\"flex items-center gap-1\">\n      | Go to page:\n      <input\n        type=\"number\"\n        [value]=\"table.store.state.pagination.pageIndex + 1\"\n        (input)=\"onPageInputChange($event)\"\n        class=\"border p-1 rounded w-16\"\n      />\n    </span>\n\n    <select [value]=\"table.store.state.pagination.pageSize\" (change)=\"onPageSizeChange($event)\">\n      @for (pageSize of [10, 20, 30, 40, 50]; track pageSize) {\n        <option [value]=\"pageSize\">Show {{ pageSize }}</option>\n      }\n    </select>\n  </div>\n  <div>{{ table.getRowModel().rows.length }} Rows</div>\n  <div>\n    <button (click)=\"refreshData()\">Refresh Data</button>\n  </div>\n  <pre>{{ stringifiedGrouping() }}</pre>\n</div>\n"
  },
  {
    "path": "examples/angular/grouping/src/app/app.ts",
    "content": "import {\n  ChangeDetectionStrategy,\n  Component,\n  computed,\n  signal,\n} from '@angular/core'\nimport { FlexRender, isFunction } from '@tanstack/angular-table'\nimport { columns, injectTable } from './columns'\nimport { makeData } from './makeData'\nimport type { GroupingState, Updater } from '@tanstack/angular-table'\n\n@Component({\n  selector: 'app-root',\n  standalone: true,\n  imports: [FlexRender],\n  templateUrl: './app.html',\n  changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class App {\n  readonly data = signal(makeData(10000))\n  readonly grouping = signal<GroupingState>([])\n\n  readonly stringifiedGrouping = computed(() =>\n    JSON.stringify(this.grouping(), null, 2),\n  )\n\n  readonly table = injectTable(() => ({\n    data: this.data(),\n    columns: columns,\n    initialState: {\n      pagination: { pageSize: 20, pageIndex: 0 },\n    },\n    state: {\n      grouping: this.grouping(),\n    },\n    onGroupingChange: (updaterOrValue: Updater<GroupingState>) => {\n      const groupingState = isFunction(updaterOrValue)\n        ? updaterOrValue([...this.grouping()])\n        : updaterOrValue\n      this.grouping.set(groupingState)\n    },\n  }))\n\n  onPageInputChange(event: any): void {\n    const page = event.target.value ? Number(event.target.value) - 1 : 0\n    this.table.setPageIndex(page)\n  }\n\n  onPageSizeChange(event: any) {\n    this.table.setPageSize(Number(event.target.value))\n  }\n\n  refreshData() {\n    this.data.set(makeData(10000))\n  }\n}\n"
  },
  {
    "path": "examples/angular/grouping/src/app/columns.ts",
    "content": "import {\n  aggregationFns,\n  columnFilteringFeature,\n  columnGroupingFeature,\n  createExpandedRowModel,\n  createFilteredRowModel,\n  createGroupedRowModel,\n  createPaginatedRowModel,\n  createTableHook,\n  filterFns,\n  rowExpandingFeature,\n  rowPaginationFeature,\n} from '@tanstack/angular-table'\nimport type { Person } from './makeData'\n\nexport const { createAppColumnHelper, injectAppTable: injectTable } =\n  createTableHook({\n    _features: {\n      columnGroupingFeature,\n      rowPaginationFeature,\n      columnFilteringFeature,\n      rowExpandingFeature,\n    },\n    _rowModels: {\n      groupedRowModel: createGroupedRowModel(aggregationFns),\n      expandedRowModel: createExpandedRowModel(),\n      paginatedRowModel: createPaginatedRowModel(),\n      filteredRowModel: createFilteredRowModel(filterFns),\n    },\n  })\nconst columnHelper = createAppColumnHelper<Person>()\n\nexport const columns = columnHelper.columns([\n  columnHelper.group({\n    header: 'Name',\n    columns: columnHelper.columns([\n      columnHelper.accessor('firstName', {\n        header: () => 'First Name',\n        cell: (info) => info.getValue(),\n        getGroupingValue: (row) => `${row.firstName} ${row.lastName}`,\n      }),\n      columnHelper.accessor((row) => row.lastName, {\n        id: 'lastName',\n        header: () => 'Last Name',\n        cell: (info) => info.getValue(),\n      }),\n    ]),\n  }),\n  columnHelper.group({\n    header: 'Info',\n    columns: columnHelper.columns([\n      columnHelper.accessor('age', {\n        header: () => 'Age',\n        aggregatedCell: ({ getValue }) =>\n          Math.round(getValue<number>() * 100) / 100,\n        aggregationFn: 'median',\n      }),\n      columnHelper.group({\n        header: 'More Info',\n        columns: columnHelper.columns([\n          columnHelper.accessor('visits', {\n            header: () => `Visits`,\n            aggregationFn: 'sum',\n            aggregatedCell: ({ getValue }) => getValue().toLocaleString(),\n          }),\n          columnHelper.accessor('status', {\n            header: 'Status',\n          }),\n          columnHelper.accessor('progress', {\n            header: 'Profile Progress',\n            cell: ({ getValue }) =>\n              Math.round(getValue<number>() * 100) / 100 + '%',\n            aggregationFn: 'mean',\n            aggregatedCell: ({ getValue }) =>\n              Math.round(getValue<number>() * 100) / 100 + '%',\n          }),\n        ]),\n      }),\n    ]),\n  }),\n])\n"
  },
  {
    "path": "examples/angular/grouping/src/app/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  subRows?: Array<Person>\n}\n\nconst range = (len: number) => {\n  const arr: Array<number> = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (): Person => {\n  return {\n    firstName: faker.person.firstName(),\n    lastName: faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: faker.number.int(1000),\n    progress: faker.number.int(100),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0],\n  }\n}\n\nexport function makeData(...lens: Array<number>): Array<Person> {\n  const makeDataLevel = (depth = 0): Array<Person> => {\n    const len = lens[depth]\n    return range(len).map((d): Person => {\n      return {\n        ...newPerson(),\n        subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined,\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n"
  },
  {
    "path": "examples/angular/grouping/src/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"utf-8\" />\n    <title>Grouping</title>\n    <base href=\"/\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n    <link rel=\"icon\" type=\"image/x-icon\" href=\"favicon.ico\" />\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n    <link href=\"https://fonts.googleapis.com/icon?family=Material+Icons+Sharp\" rel=\"stylesheet\" />\n  </head>\n  <body>\n    <app-root></app-root>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/angular/grouping/src/main.ts",
    "content": "import { bootstrapApplication } from '@angular/platform-browser'\nimport { appConfig } from './app/app.config'\nimport { App } from './app/app'\n\nbootstrapApplication(App, appConfig).catch((err) => console.error(err))\n"
  },
  {
    "path": "examples/angular/grouping/src/styles.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n"
  },
  {
    "path": "examples/angular/grouping/tsconfig.app.json",
    "content": "/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */\n/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */\n{\n  \"extends\": \"./tsconfig.json\",\n  \"compilerOptions\": {\n    \"outDir\": \"./out-tsc/app\",\n    \"types\": []\n  },\n  \"include\": [\"src/**/*.ts\"],\n  \"exclude\": [\"src/**/*.spec.ts\"]\n}\n"
  },
  {
    "path": "examples/angular/grouping/tsconfig.json",
    "content": "/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */\n/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */\n{\n  \"compileOnSave\": false,\n  \"compilerOptions\": {\n    \"strict\": true,\n    \"noImplicitOverride\": true,\n    \"noPropertyAccessFromIndexSignature\": true,\n    \"noImplicitReturns\": true,\n    \"noFallthroughCasesInSwitch\": true,\n    \"skipLibCheck\": true,\n    \"isolatedModules\": true,\n    \"experimentalDecorators\": true,\n    \"importHelpers\": true,\n    \"target\": \"ES2022\",\n    \"module\": \"preserve\"\n  },\n  \"angularCompilerOptions\": {\n    \"enableI18nLegacyMessageIdFormat\": false,\n    \"strictInjectionParameters\": true,\n    \"strictInputAccessModifiers\": true,\n    \"strictTemplates\": true\n  }\n}\n"
  },
  {
    "path": "examples/angular/remote-data/.gitignore",
    "content": "# See http://help.github.com/ignore-files/ for more about ignoring files.\n\n# Compiled output\n/dist\n/tmp\n/out-tsc\n/bazel-out\n\n# Node\n/node_modules\nnpm-debug.log\nyarn-error.log\n\n# IDEs and editors\n.idea/\n.project\n.classpath\n.c9/\n*.launch\n.settings/\n*.sublime-workspace\n\n# Visual Studio Code\n.vscode/*\n!.vscode/settings.json\n!.vscode/tasks.json\n!.vscode/launch.json\n!.vscode/extensions.json\n.history/*\n\n# Miscellaneous\n/.angular/cache\n.sass-cache/\n/connect.lock\n/coverage\n/libpeerconnection.log\ntestem.log\n/typings\n\n# System files\n.DS_Store\nThumbs.db\n"
  },
  {
    "path": "examples/angular/remote-data/README.md",
    "content": "# Basic\n\nThis project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 17.1.2.\n\n## Development server\n\nRun `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files.\n\n## Code scaffolding\n\nRun `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.\n\n## Build\n\nRun `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.\n\n## Running unit tests\n\nRun `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).\n\n## Running end-to-end tests\n\nRun `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.\n\n## Further help\n\nTo get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.\n"
  },
  {
    "path": "examples/angular/remote-data/angular.json",
    "content": "{\n  \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\n  \"version\": 1,\n  \"newProjectRoot\": \"projects\",\n  \"projects\": {\n    \"remote-data\": {\n      \"cli\": {\n        \"cache\": {\n          \"enabled\": false\n        }\n      },\n      \"projectType\": \"application\",\n      \"schematics\": {\n        \"@schematics/angular:component\": {\n          \"style\": \"scss\"\n        }\n      },\n      \"root\": \"\",\n      \"sourceRoot\": \"src\",\n      \"prefix\": \"app\",\n      \"architect\": {\n        \"build\": {\n          \"builder\": \"@angular-devkit/build-angular:application\",\n          \"options\": {\n            \"outputPath\": \"dist/remote-data\",\n            \"index\": \"src/index.html\",\n            \"browser\": \"src/main.ts\",\n            \"polyfills\": [],\n            \"tsConfig\": \"tsconfig.app.json\",\n            \"inlineStyleLanguage\": \"scss\",\n            \"assets\": [\"src/favicon.ico\", \"src/assets\"],\n            \"styles\": [\"src/styles.scss\"],\n            \"scripts\": []\n          },\n          \"configurations\": {\n            \"production\": {\n              \"budgets\": [],\n              \"outputHashing\": \"all\",\n              \"outputMode\": \"server\",\n              \"server\": \"src/main.server.ts\",\n              \"ssr\": {\n                \"entry\": \"src/server.ts\"\n              }\n            },\n            \"no-ssr\": {\n              \"budgets\": [],\n              \"outputHashing\": \"all\",\n              \"prerender\": false,\n              \"ssr\": false\n            },\n            \"development\": {\n              \"optimization\": false,\n              \"extractLicenses\": false,\n              \"sourceMap\": true,\n              \"outputMode\": \"server\",\n              \"server\": \"src/main.server.ts\",\n              \"ssr\": {\n                \"entry\": \"src/server.ts\"\n              }\n            }\n          },\n          \"defaultConfiguration\": \"production\"\n        },\n        \"serve\": {\n          \"builder\": \"@angular-devkit/build-angular:dev-server\",\n          \"configurations\": {\n            \"production\": {\n              \"buildTarget\": \"remote-data:build:production\"\n            },\n            \"no-ssr\": {\n              \"buildTarget\": \"remote-data:build:no-ssr\"\n            },\n            \"development\": {\n              \"buildTarget\": \"remote-data:build:development\"\n            }\n          },\n          \"defaultConfiguration\": \"development\"\n        },\n        \"extract-i18n\": {\n          \"builder\": \"@angular-devkit/build-angular:extract-i18n\",\n          \"options\": {\n            \"buildTarget\": \"remote-data:build\"\n          }\n        },\n        \"test\": {\n          \"builder\": \"@angular-devkit/build-angular:karma\",\n          \"options\": {\n            \"polyfills\": [],\n            \"tsConfig\": \"tsconfig.spec.json\",\n            \"inlineStyleLanguage\": \"scss\",\n            \"assets\": [\"src/favicon.ico\", \"src/assets\"],\n            \"styles\": [\"src/styles.scss\"],\n            \"scripts\": []\n          }\n        }\n      }\n    }\n  },\n  \"cli\": {\n    \"analytics\": false\n  }\n}\n"
  },
  {
    "path": "examples/angular/remote-data/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-angular-remote-data\",\n  \"version\": \"0.0.0\",\n  \"scripts\": {\n    \"ng\": \"ng\",\n    \"start\": \"ng serve\",\n    \"start:no-ssr\": \"ng serve --configuration=no-ssr\",\n    \"build\": \"ng build\",\n    \"watch\": \"ng build --watch --configuration development\",\n    \"test\": \"ng test\",\n    \"lint\": \"eslint ./src\",\n    \"serve:ssr:remote-data\": \"node dist/remote-data/server/server.mjs\"\n  },\n  \"private\": true,\n  \"dependencies\": {\n    \"@angular/common\": \"^21.1.1\",\n    \"@angular/compiler\": \"^21.1.1\",\n    \"@angular/core\": \"^21.1.1\",\n    \"@angular/forms\": \"^21.1.1\",\n    \"@angular/platform-browser\": \"^21.1.1\",\n    \"@angular/platform-browser-dynamic\": \"^21.1.1\",\n    \"@angular/platform-server\": \"^21.1.1\",\n    \"@angular/router\": \"^21.1.1\",\n    \"@angular/ssr\": \"^21.1.2\",\n    \"@tanstack/angular-table\": \"^9.0.0-alpha.17\",\n    \"express\": \"^5.2.1\",\n    \"rxjs\": \"~7.8.2\"\n  },\n  \"devDependencies\": {\n    \"@angular-devkit/build-angular\": \"^21.1.2\",\n    \"@angular/cli\": \"^21.1.2\",\n    \"@angular/compiler-cli\": \"^21.1.1\",\n    \"@types/express\": \"^5.0.6\",\n    \"@types/node\": \"^25.0.10\",\n    \"tslib\": \"^2.8.1\",\n    \"typescript\": \"5.9.3\"\n  }\n}\n"
  },
  {
    "path": "examples/angular/remote-data/src/app/app.config.server.ts",
    "content": "import { mergeApplicationConfig } from '@angular/core'\nimport { provideServerRendering, withRoutes } from '@angular/ssr'\nimport { appConfig } from './app.config'\nimport { serverRoutes } from './app.routes.server'\nimport type { ApplicationConfig } from '@angular/core'\n\nconst serverConfig: ApplicationConfig = {\n  providers: [provideServerRendering(withRoutes(serverRoutes))],\n}\n\nexport const config = mergeApplicationConfig(appConfig, serverConfig)\n"
  },
  {
    "path": "examples/angular/remote-data/src/app/app.config.ts",
    "content": "import {\n  provideClientHydration,\n  withEventReplay,\n  withHttpTransferCacheOptions,\n} from '@angular/platform-browser'\nimport { provideBrowserGlobalErrorListeners } from '@angular/core'\nimport type { ApplicationConfig } from '@angular/core'\n\nexport const appConfig: ApplicationConfig = {\n  providers: [\n    provideBrowserGlobalErrorListeners(),\n    provideClientHydration(\n      withEventReplay(),\n      withHttpTransferCacheOptions({\n        includeHeaders: ['X-Total-Count'],\n      }),\n    ),\n  ],\n}\n"
  },
  {
    "path": "examples/angular/remote-data/src/app/app.html",
    "content": "<div class=\"p-2\">\n  <div>\n    <input\n      (change)=\"table.setGlobalFilter($any($event.currentTarget).value)\"\n      placeholder=\"Search...\"\n    />\n  </div>\n\n  <div class=\"overflow-x-auto\">\n    <table>\n      <thead>\n        @for (headerGroup of table.getHeaderGroups(); track headerGroup.id) {\n          <tr>\n            @for (header of headerGroup.headers; track header.id) {\n              <th\n                [colSpan]=\"header.colSpan\"\n                (click)=\"header.column.getToggleSortingHandler()?.($event)\"\n              >\n                @if (!header.isPlaceholder) {\n                  <div [class.cursor-pointer]=\"header.column.getCanSort()\" class=\"flex gap-2\">\n                    <ng-container\n                      *flexRender=\"\n                        header.column.columnDef.header;\n                        props: header.getContext();\n                        let header\n                      \"\n                    >\n                      <div [innerHTML]=\"header\"></div>\n                    </ng-container>\n\n                    @if (header.column.getIsSorted() === 'asc') {\n                      <span>🔼</span>\n                    }\n                    @if (header.column.getIsSorted() === 'desc') {\n                      <span>🔽</span>\n                    }\n                  </div>\n                }\n              </th>\n            }\n          </tr>\n        }\n      </thead>\n      <tbody>\n        @for (row of table.getRowModel().rows; track row.id) {\n          <!-- first row is a normal row -->\n          <tr>\n            @for (cell of row.getAllCells(); track cell.id) {\n              <td>\n                <ng-container\n                  *flexRender=\"cell.column.columnDef.cell; props: cell.getContext(); let cell\"\n                >\n                  <div [innerHTML]=\"cell\"></div>\n                </ng-container>\n              </td>\n            }\n          </tr>\n        }\n      </tbody>\n    </table>\n  </div>\n\n  @if (data.isLoading()) {\n    Loading...\n  }\n</div>\n\n<div class=\"h-2\"></div>\n<div class=\"flex items-center gap-2\">\n  <button\n    class=\"border rounded p-1\"\n    (click)=\"table.setPageIndex(0)\"\n    [disabled]=\"!table.getCanPreviousPage()\"\n  >\n    <<\n  </button>\n  <button\n    class=\"border rounded p-1\"\n    (click)=\"table.previousPage()\"\n    [disabled]=\"!table.getCanPreviousPage()\"\n  >\n    <\n  </button>\n  <button\n    class=\"border rounded p-1\"\n    (click)=\"table.nextPage()\"\n    [disabled]=\"!table.getCanNextPage()\"\n  >\n    >\n  </button>\n  <button\n    class=\"border rounded p-1\"\n    (click)=\"table.setPageIndex(table.getPageCount() - 1)\"\n    [disabled]=\"!table.getCanNextPage()\"\n  >\n    >>\n  </button>\n  <span class=\"flex items-center gap-1\">\n    <div>Page</div>\n    <strong>\n      {{ table.store.state.pagination.pageIndex + 1 }} of\n      {{ table.getPageCount() }}\n    </strong>\n  </span>\n  <span class=\"flex items-center gap-1\">\n    | Go to page:\n    <input\n      type=\"number\"\n      [value]=\"table.store.state.pagination.pageIndex + 1\"\n      (input)=\"onPageInputChange($event)\"\n      class=\"border p-1 rounded w-16\"\n    />\n  </span>\n\n  <select [value]=\"table.store.state.pagination.pageSize\" (change)=\"onPageSizeChange($event)\">\n    @for (pageSize of [10, 20, 30, 40, 50]; track pageSize) {\n      <option [value]=\"pageSize\">Show {{ pageSize }}</option>\n    }\n  </select>\n</div>\n"
  },
  {
    "path": "examples/angular/remote-data/src/app/app.routes.server.ts",
    "content": "import { RenderMode } from '@angular/ssr'\nimport type { ServerRoute } from '@angular/ssr'\n\nexport const serverRoutes: Array<ServerRoute> = [\n  {\n    path: '**',\n    renderMode: RenderMode.Server,\n  },\n]\n"
  },
  {
    "path": "examples/angular/remote-data/src/app/app.ts",
    "content": "import { HttpClient, HttpParams } from '@angular/common/http'\nimport {\n  ChangeDetectionStrategy,\n  Component,\n  inject,\n  linkedSignal,\n  signal,\n} from '@angular/core'\nimport { ReactiveFormsModule } from '@angular/forms'\nimport {\n  FlexRender,\n  createColumnHelper,\n  globalFilteringFeature,\n  injectTable,\n  rowPaginationFeature,\n  rowSortingFeature,\n  tableFeatures,\n} from '@tanstack/angular-table'\nimport { map } from 'rxjs'\nimport { rxResource } from '@angular/core/rxjs-interop'\nimport type {\n  ColumnDef,\n  PaginationState,\n  SortingState,\n} from '@tanstack/angular-table'\nimport type { WritableSignal } from '@angular/core'\n\nexport type Todo = {\n  userId: number\n  id: number\n  title: string\n  completed: boolean\n}\n\nconst _features = tableFeatures({\n  rowPaginationFeature,\n  globalFilteringFeature,\n  rowSortingFeature,\n})\n\nconst columnHelper = createColumnHelper<typeof _features, Todo>()\n\ntype TodoResponse = { items: Array<Todo>; totalCount: number }\n\n@Component({\n  selector: 'app-root',\n  imports: [FlexRender, ReactiveFormsModule],\n  templateUrl: './app.html',\n  changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class App {\n  readonly client = inject(HttpClient)\n  readonly pagination = signal<PaginationState>({\n    pageSize: 10,\n    pageIndex: 0,\n  })\n\n  readonly sorting = signal<SortingState>([{ id: 'id', desc: false }])\n  readonly globalFilter = signal<string | null>(null)\n  readonly data = rxResource({\n    params: () => ({\n      page: this.pagination(),\n      globalFilter: this.globalFilter(),\n      sorting: this.sorting(),\n    }),\n    stream: ({ params: { page, globalFilter, sorting } }) => {\n      let httpParams = new HttpParams({\n        fromObject: {\n          _page: page.pageIndex + 1,\n          _limit: page.pageSize,\n        },\n      })\n      if (globalFilter) {\n        httpParams = httpParams.set('title_like', globalFilter)\n      }\n      if (sorting.length) {\n        const keys: Array<string> = []\n        const orders: Array<string> = []\n        for (const sort of sorting) {\n          keys.push(sort.id)\n          orders.push(sort.desc ? 'desc' : 'asc')\n        }\n        httpParams = httpParams\n          .set('_sort', keys.join(','))\n          .set('_order', orders.join(','))\n      }\n\n      return this.client\n        .get<\n          Array<Todo>\n        >(`https://jsonplaceholder.typicode.com/todos`, { params: httpParams, observe: 'response' })\n        .pipe(\n          map((response) => {\n            return {\n              items: response.body ?? [],\n              totalCount: Number(response.headers.get('X-Total-Count')),\n            } satisfies TodoResponse\n          }),\n        )\n    },\n  })\n\n  readonly columns = [\n    columnHelper.accessor('id', {\n      id: 'id',\n      cell: (info) => info.getValue(),\n      header: () => 'Id',\n      footer: (props) => props.column.id,\n    }),\n    columnHelper.accessor('title', {\n      id: 'title',\n      cell: (info) => info.getValue(),\n      header: () => 'Title',\n      footer: (props) => props.column.id,\n    }),\n    columnHelper.accessor('completed', {\n      id: 'completed',\n      cell: (info) => (info.getValue() ? `✅` : `❌`),\n      header: () => 'Completed',\n      footer: (props) => props.column.id,\n    }),\n  ] as Array<ColumnDef<typeof _features, Todo>>\n\n  // Keep previous value\n  readonly dataWithLatest: WritableSignal<TodoResponse> = linkedSignal({\n    source: () => ({\n      value: this.data.value(),\n      status: this.data.status(),\n    }),\n    computation: (source, previous) => {\n      if (previous && source.status === 'loading') return previous.value\n      return source.value ?? { items: [], totalCount: 0 }\n    },\n  })\n\n  readonly table = injectTable(() => {\n    const data = this.dataWithLatest()\n    return {\n      _features,\n      data: data.items,\n      columns: this.columns,\n      state: {\n        pagination: this.pagination(),\n        globalFilter: this.globalFilter(),\n        sorting: this.sorting(),\n      },\n      manualFiltering: true,\n      manualPagination: true,\n      manualSorting: true,\n      rowCount: data.totalCount,\n      onPaginationChange: (updater) =>\n        typeof updater === 'function'\n          ? this.pagination.update(updater)\n          : this.pagination.set(updater),\n      onSortingChange: (updater) => {\n        typeof updater === 'function'\n          ? this.sorting.update(updater)\n          : this.sorting.set(updater)\n      },\n      onGlobalFilterChange: (updater) => {\n        typeof updater === 'function'\n          ? this.globalFilter.update(updater)\n          : this.globalFilter.set(updater)\n        this.pagination.update((page) => ({\n          ...page,\n          pageIndex: 0,\n        }))\n      },\n    }\n  })\n\n  onPageInputChange(event: Event): void {\n    const inputElement = event.target as HTMLInputElement\n    const page = inputElement.value ? Number(inputElement.value) - 1 : 0\n    this.table.setPageIndex(page)\n  }\n\n  onPageSizeChange(event: any): void {\n    this.table.setPageSize(Number(event.target.value))\n  }\n}\n"
  },
  {
    "path": "examples/angular/remote-data/src/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"utf-8\" />\n    <title>Expanding</title>\n    <base href=\"/\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n    <link rel=\"icon\" type=\"image/x-icon\" href=\"favicon.ico\" />\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n  </head>\n  <body>\n    <app-root></app-root>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/angular/remote-data/src/main.server.ts",
    "content": "import { bootstrapApplication } from '@angular/platform-browser'\nimport { config } from './app/app.config.server'\nimport { App } from './app/app'\nimport type { BootstrapContext } from '@angular/platform-browser'\n\nconst bootstrap = (context: BootstrapContext) =>\n  bootstrapApplication(App, config, context)\n\nexport default bootstrap\n"
  },
  {
    "path": "examples/angular/remote-data/src/main.ts",
    "content": "import { bootstrapApplication } from '@angular/platform-browser'\nimport { appConfig } from './app/app.config'\nimport { App } from './app/app'\n\nbootstrapApplication(App, appConfig).catch((err) => console.error(err))\n"
  },
  {
    "path": "examples/angular/remote-data/src/server.ts",
    "content": "import { join } from 'node:path'\nimport {\n  AngularNodeAppEngine,\n  createNodeRequestHandler,\n  isMainModule,\n  writeResponseToNodeResponse,\n} from '@angular/ssr/node'\nimport express from 'express'\n\nconst browserDistFolder = join(import.meta.dirname, '../browser')\n\nconst app = express()\nconst angularApp = new AngularNodeAppEngine()\n\n/**\n * Example Express Rest API endpoints can be defined here.\n * Uncomment and define endpoints as necessary.\n *\n * Example:\n * ```ts\n * app.get('/api/{*splat}', (req, res) => {\n *   // Handle API request\n * });\n * ```\n */\n\n/**\n * Serve static files from /browser\n */\napp.use(\n  express.static(browserDistFolder, {\n    maxAge: '1y',\n    index: false,\n    redirect: false,\n  }),\n)\n\n/**\n * Handle all other requests by rendering the Angular application.\n */\napp.use((req, res, next) => {\n  angularApp\n    .handle(req)\n    .then((response) =>\n      response ? writeResponseToNodeResponse(response, res) : next(),\n    )\n    .catch(next)\n})\n\n/**\n * Start the server if this module is the main entry point, or it is ran via PM2.\n * The server listens on the port defined by the `PORT` environment variable, or defaults to 4000.\n */\nif (isMainModule(import.meta.url) || process.env['pm_id']) {\n  const port = process.env['PORT'] || 4000\n  app.listen(port, (error) => {\n    if (error) {\n      throw error\n    }\n\n    console.log(`Node Express server listening on http://localhost:${port}`)\n  })\n}\n\n/**\n * Request handler used by the Angular CLI (for dev-server and during build) or Firebase Cloud Functions.\n */\nexport const reqHandler = createNodeRequestHandler(app)\n"
  },
  {
    "path": "examples/angular/remote-data/src/styles.scss",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntbody td {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n"
  },
  {
    "path": "examples/angular/remote-data/tsconfig.app.json",
    "content": "/* To learn more about this file see: https://angular.io/config/tsconfig. */\n{\n  \"extends\": \"./tsconfig.json\",\n  \"compilerOptions\": {\n    \"outDir\": \"./out-tsc/app\",\n    \"types\": [\"node\"]\n  },\n  \"files\": [\"src/main.ts\", \"src/main.server.ts\", \"src/server.ts\"],\n  \"include\": [\"src/**/*.d.ts\"]\n}\n"
  },
  {
    "path": "examples/angular/remote-data/tsconfig.json",
    "content": "/* To learn more about this file see: https://angular.io/config/tsconfig. */\n{\n  \"compileOnSave\": false,\n  \"compilerOptions\": {\n    \"baseUrl\": \"src\",\n    \"outDir\": \"./dist/out-tsc\",\n    \"forceConsistentCasingInFileNames\": true,\n    \"strict\": true,\n    \"noImplicitOverride\": true,\n    \"noPropertyAccessFromIndexSignature\": true,\n    \"noImplicitReturns\": true,\n    \"noFallthroughCasesInSwitch\": true,\n    \"skipLibCheck\": true,\n    \"esModuleInterop\": true,\n    \"sourceMap\": true,\n    \"declaration\": false,\n    \"experimentalDecorators\": true,\n    \"moduleResolution\": \"bundler\",\n    \"importHelpers\": true,\n    \"target\": \"ES2022\",\n    \"module\": \"ES2022\",\n    \"useDefineForClassFields\": false,\n    \"lib\": [\"ES2022\", \"dom\"]\n  },\n  \"angularCompilerOptions\": {\n    \"enableI18nLegacyMessageIdFormat\": false,\n    \"strictInjectionParameters\": true,\n    \"strictInputAccessModifiers\": true,\n    \"strictTemplates\": true\n  }\n}\n"
  },
  {
    "path": "examples/angular/row-dnd/.gitignore",
    "content": "# See https://docs.github.com/get-started/getting-started-with-git/ignoring-files for more about ignoring files.\n\n# Compiled output\n/dist\n/tmp\n/out-tsc\n/bazel-out\n\n# Node\n/node_modules\nnpm-debug.log\nyarn-error.log\n\n# IDEs and editors\n.idea/\n.project\n.classpath\n.c9/\n*.launch\n.settings/\n*.sublime-workspace\n\n# Visual Studio Code\n.vscode/*\n!.vscode/settings.json\n!.vscode/tasks.json\n!.vscode/launch.json\n!.vscode/extensions.json\n!.vscode/mcp.json\n.history/*\n\n# Miscellaneous\n/.angular/cache\n.sass-cache/\n/connect.lock\n/coverage\n/libpeerconnection.log\ntestem.log\n/typings\n__screenshots__/\n\n# System files\n.DS_Store\nThumbs.db\n"
  },
  {
    "path": "examples/angular/row-dnd/README.md",
    "content": "# Row Drag and Drop\n\nThis project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 21.1.0.\n\n## Development server\n\nTo start a local development server, run:\n\n```bash\nng serve\n```\n\nOnce the server is running, open your browser and navigate to `http://localhost:4200/`. The application will automatically reload whenever you modify any of the source files.\n\n## Code scaffolding\n\nAngular CLI includes powerful code scaffolding tools. To generate a new component, run:\n\n```bash\nng generate component component-name\n```\n\nFor a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:\n\n```bash\nng generate --help\n```\n\n## Building\n\nTo build the project run:\n\n```bash\nng build\n```\n\nThis will compile your project and store the build artifacts in the `dist/` directory. By default, the production build optimizes your application for performance and speed.\n\n## Running unit tests\n\nTo execute unit tests with the [Vitest](https://vitest.dev/) test runner, use the following command:\n\n```bash\nng test\n```\n\n## Running end-to-end tests\n\nFor end-to-end (e2e) testing, run:\n\n```bash\nng e2e\n```\n\nAngular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.\n\n## Additional Resources\n\nFor more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.\n"
  },
  {
    "path": "examples/angular/row-dnd/angular.json",
    "content": "{\n  \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\n  \"version\": 1,\n  \"cli\": {\n    \"packageManager\": \"pnpm\",\n    \"analytics\": false,\n    \"cache\": {\n      \"enabled\": false\n    }\n  },\n  \"newProjectRoot\": \"projects\",\n  \"projects\": {\n    \"row-dnd\": {\n      \"projectType\": \"application\",\n      \"schematics\": {\n        \"@schematics/angular:component\": {\n          \"inlineTemplate\": true,\n          \"inlineStyle\": true,\n          \"skipTests\": true\n        },\n        \"@schematics/angular:class\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:directive\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:guard\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:interceptor\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:pipe\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:resolver\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:service\": {\n          \"skipTests\": true\n        }\n      },\n      \"root\": \"\",\n      \"sourceRoot\": \"src\",\n      \"prefix\": \"app\",\n      \"architect\": {\n        \"build\": {\n          \"builder\": \"@angular/build:application\",\n          \"options\": {\n            \"browser\": \"src/main.ts\",\n            \"tsConfig\": \"tsconfig.app.json\",\n            \"assets\": [\n              {\n                \"glob\": \"**/*\",\n                \"input\": \"public\"\n              }\n            ],\n            \"styles\": [\"src/styles.css\"]\n          },\n          \"configurations\": {\n            \"production\": {\n              \"budgets\": [\n                {\n                  \"type\": \"initial\",\n                  \"maximumWarning\": \"500kB\",\n                  \"maximumError\": \"1MB\"\n                },\n                {\n                  \"type\": \"anyComponentStyle\",\n                  \"maximumWarning\": \"4kB\",\n                  \"maximumError\": \"8kB\"\n                }\n              ],\n              \"outputHashing\": \"all\"\n            },\n            \"development\": {\n              \"optimization\": false,\n              \"extractLicenses\": false,\n              \"sourceMap\": true\n            }\n          },\n          \"defaultConfiguration\": \"production\"\n        },\n        \"serve\": {\n          \"builder\": \"@angular/build:dev-server\",\n          \"configurations\": {\n            \"production\": {\n              \"buildTarget\": \"row-dnd:build:production\"\n            },\n            \"development\": {\n              \"buildTarget\": \"row-dnd:build:development\"\n            }\n          },\n          \"defaultConfiguration\": \"development\"\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "examples/angular/row-dnd/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-angular-row-dnd\",\n  \"version\": \"0.0.0\",\n  \"scripts\": {\n    \"ng\": \"ng\",\n    \"start\": \"ng serve\",\n    \"build\": \"ng build\",\n    \"watch\": \"ng build --watch --configuration development\",\n    \"lint\": \"eslint ./src\"\n  },\n  \"private\": true,\n  \"packageManager\": \"pnpm@10.28.2\",\n  \"dependencies\": {\n    \"@angular/cdk\": \"^21.1.1\",\n    \"@angular/common\": \"^21.1.1\",\n    \"@angular/compiler\": \"^21.1.1\",\n    \"@angular/core\": \"^21.1.1\",\n    \"@angular/forms\": \"^21.1.1\",\n    \"@angular/platform-browser\": \"^21.1.1\",\n    \"@angular/router\": \"^21.1.1\",\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"@tanstack/angular-table\": \"^9.0.0-alpha.17\",\n    \"rxjs\": \"~7.8.2\",\n    \"tslib\": \"^2.8.1\"\n  },\n  \"devDependencies\": {\n    \"@angular/build\": \"^21.1.2\",\n    \"@angular/cli\": \"^21.1.2\",\n    \"@angular/compiler-cli\": \"^21.1.1\",\n    \"typescript\": \"5.9.3\"\n  }\n}\n"
  },
  {
    "path": "examples/angular/row-dnd/src/app/app.config.ts",
    "content": "import { provideBrowserGlobalErrorListeners } from '@angular/core'\nimport type { ApplicationConfig } from '@angular/core'\n\nexport const appConfig: ApplicationConfig = {\n  providers: [provideBrowserGlobalErrorListeners()],\n}\n"
  },
  {
    "path": "examples/angular/row-dnd/src/app/app.css",
    "content": ".cdk-drag-preview {\n  box-sizing: border-box;\n  box-shadow:\n    0 5px 5px -3px rgba(0, 0, 0, 0.2),\n    0 8px 10px 1px rgba(0, 0, 0, 0.14),\n    0 3px 14px 2px rgba(0, 0, 0, 0.12);\n}\n\n.cdk-drag-placeholder {\n  transition: transform 250ms cubic-bezier(0, 0, 0.2, 1);\n}\n\n.cdk-drag-placeholder > td {\n  background: #ccc;\n}\n\n.cdk-drag-animating {\n  transition: transform 250ms cubic-bezier(0, 0, 0.2, 1);\n}\n\n.cdk-drop-list-dragging tr[cdkdrag]:not(.cdk-drag-placeholder) {\n  transition: transform 250ms cubic-bezier(0, 0, 0.2, 1);\n}\n"
  },
  {
    "path": "examples/angular/row-dnd/src/app/app.html",
    "content": "<div class=\"p-2\">\n  <table>\n    <thead>\n      @for (headerGroup of table.getHeaderGroups(); track headerGroup.id) {\n        <tr>\n          @for (header of headerGroup.headers; track header.id) {\n            @if (!header.isPlaceholder) {\n              <th>\n                <ng-container *flexRenderHeader=\"header; let header\">\n                  <div [innerHTML]=\"header\"></div>\n                </ng-container>\n              </th>\n            }\n          }\n        </tr>\n      }\n    </thead>\n    <tbody\n      #boundaryElement\n      cdkDropList\n      [cdkDropListData]=\"data()\"\n      (cdkDropListDropped)=\"drop($event)\"\n    >\n      @for (row of table.getRowModel().rows; track row.id) {\n        <tr cdkDrag [cdkDragData]=\"row.original\" [cdkDragBoundary]=\"boundaryElement\">\n          @for (cell of row.getVisibleCells(); track cell.id) {\n            <td [style.width.px]=\"cell.column.getSize()\">\n              <ng-container *flexRenderCell=\"cell; let cell\">\n                <div [innerHTML]=\"cell\"></div>\n              </ng-container>\n            </td>\n          }\n        </tr>\n      }\n    </tbody>\n  </table>\n\n  <pre>{{ sortedIds() | json }}</pre>\n</div>\n"
  },
  {
    "path": "examples/angular/row-dnd/src/app/app.ts",
    "content": "import {\n  ChangeDetectionStrategy,\n  Component,\n  computed,\n  signal,\n} from '@angular/core'\nimport {\n  FlexRender,\n  columnSizingFeature,\n  columnVisibilityFeature,\n  flexRenderComponent,\n  injectTable,\n  rowPaginationFeature,\n  tableFeatures,\n} from '@tanstack/angular-table'\nimport { CdkDrag, CdkDropList, moveItemInArray } from '@angular/cdk/drag-drop'\nimport { JsonPipe } from '@angular/common'\nimport { DragHandleCell } from './drag-handle-cell/drag-handle-cell'\nimport { makeData } from './makeData'\nimport type { Person } from './makeData'\nimport type { CdkDragDrop } from '@angular/cdk/drag-drop'\nimport type { ColumnDef } from '@tanstack/angular-table'\n\nconst _tableFeatures = tableFeatures({\n  rowPaginationFeature,\n  columnSizingFeature,\n  columnVisibilityFeature,\n})\n\nconst defaultColumns: Array<ColumnDef<typeof _tableFeatures, Person>> = [\n  {\n    id: 'drag-handle',\n    header: 'Move',\n    cell: () => flexRenderComponent(DragHandleCell),\n    size: 60,\n  },\n  {\n    accessorKey: 'firstName',\n    cell: (info) => info.getValue(),\n  },\n  {\n    accessorFn: (row) => row.lastName,\n    id: 'lastName',\n    cell: (info) => info.getValue(),\n    header: () => `Last Name`,\n  },\n  {\n    accessorKey: 'age',\n    header: () => 'Age',\n  },\n  {\n    accessorKey: 'visits',\n    header: () => `Visits`,\n  },\n  {\n    accessorKey: 'status',\n    header: 'Status',\n  },\n  {\n    accessorKey: 'progress',\n    header: 'Profile Progress',\n  },\n]\n\n@Component({\n  selector: 'app-root',\n  imports: [FlexRender, CdkDropList, CdkDrag, JsonPipe],\n  templateUrl: './app.html',\n  styleUrl: './app.css',\n  changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class App {\n  readonly data = signal<Array<Person>>(makeData(20))\n\n  readonly table = injectTable(() => {\n    return {\n      _features: _tableFeatures,\n      data: this.data(),\n      columns: defaultColumns,\n      getRowId: (row) => row.userId,\n      debugTable: true,\n      debugHeaders: true,\n      debugColumns: true,\n    }\n  })\n\n  readonly sortedIds = computed(() => this.data().map((data) => data.userId))\n\n  drop(event: CdkDragDrop<Array<Person>>) {\n    const data = [...this.data()]\n    moveItemInArray(data, event.previousIndex, event.currentIndex)\n    this.data.set(data)\n  }\n}\n"
  },
  {
    "path": "examples/angular/row-dnd/src/app/drag-handle-cell/drag-handle-cell.ts",
    "content": "import { ChangeDetectionStrategy, Component } from '@angular/core'\nimport { CdkDragHandle } from '@angular/cdk/drag-drop'\n\n@Component({\n  selector: 'drag-handle-cell',\n  template: ` <button cdkDragHandle>🟰</button> `,\n  imports: [CdkDragHandle],\n  changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DragHandleCell {}\n"
  },
  {
    "path": "examples/angular/row-dnd/src/app/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = {\n  userId: string\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  subRows?: Array<Person>\n}\n\nconst range = (len: number) => {\n  const arr: Array<number> = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (): Person => {\n  return {\n    userId: faker.string.uuid(),\n    firstName: faker.person.firstName(),\n    lastName: faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: faker.number.int(1000),\n    progress: faker.number.int(100),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0],\n  }\n}\n\nexport function makeData(...lens: Array<number>) {\n  const makeDataLevel = (depth = 0): Array<Person> => {\n    const len = lens[depth]\n    return range(len).map((_d): Person => {\n      return {\n        ...newPerson(),\n        subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined,\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n"
  },
  {
    "path": "examples/angular/row-dnd/src/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"utf-8\" />\n    <title>Row Drag and drop</title>\n    <base href=\"/\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n    <link rel=\"icon\" type=\"image/x-icon\" href=\"favicon.ico\" />\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n  </head>\n  <body>\n    <app-root></app-root>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/angular/row-dnd/src/main.ts",
    "content": "import { bootstrapApplication } from '@angular/platform-browser'\nimport { appConfig } from './app/app.config'\nimport { App } from './app/app'\n\nbootstrapApplication(App, appConfig).catch((err) => console.error(err))\n"
  },
  {
    "path": "examples/angular/row-dnd/src/styles.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntd {\n  border-right: 1px solid lightgray;\n  padding: 4px 4px;\n  background-color: white;\n}\n\ntd button {\n  padding: 1px 1rem;\n  cursor: grab;\n}\n\ntd:last-child {\n  border-right: 0;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n"
  },
  {
    "path": "examples/angular/row-dnd/tsconfig.app.json",
    "content": "/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */\n/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */\n{\n  \"extends\": \"./tsconfig.json\",\n  \"compilerOptions\": {\n    \"outDir\": \"./out-tsc/app\",\n    \"types\": []\n  },\n  \"include\": [\"src/**/*.ts\"],\n  \"exclude\": [\"src/**/*.spec.ts\"]\n}\n"
  },
  {
    "path": "examples/angular/row-dnd/tsconfig.json",
    "content": "/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */\n/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */\n{\n  \"compileOnSave\": false,\n  \"compilerOptions\": {\n    \"strict\": true,\n    \"noImplicitOverride\": true,\n    \"noPropertyAccessFromIndexSignature\": true,\n    \"noImplicitReturns\": true,\n    \"noFallthroughCasesInSwitch\": true,\n    \"skipLibCheck\": true,\n    \"isolatedModules\": true,\n    \"experimentalDecorators\": true,\n    \"importHelpers\": true,\n    \"target\": \"ES2022\",\n    \"module\": \"preserve\"\n  },\n  \"angularCompilerOptions\": {\n    \"enableI18nLegacyMessageIdFormat\": false,\n    \"strictInjectionParameters\": true,\n    \"strictInputAccessModifiers\": true,\n    \"strictTemplates\": true\n  }\n}\n"
  },
  {
    "path": "examples/angular/row-selection/.gitignore",
    "content": "# See https://docs.github.com/get-started/getting-started-with-git/ignoring-files for more about ignoring files.\n\n# Compiled output\n/dist\n/tmp\n/out-tsc\n/bazel-out\n\n# Node\n/node_modules\nnpm-debug.log\nyarn-error.log\n\n# IDEs and editors\n.idea/\n.project\n.classpath\n.c9/\n*.launch\n.settings/\n*.sublime-workspace\n\n# Visual Studio Code\n.vscode/*\n!.vscode/settings.json\n!.vscode/tasks.json\n!.vscode/launch.json\n!.vscode/extensions.json\n!.vscode/mcp.json\n.history/*\n\n# Miscellaneous\n/.angular/cache\n.sass-cache/\n/connect.lock\n/coverage\n/libpeerconnection.log\ntestem.log\n/typings\n__screenshots__/\n\n# System files\n.DS_Store\nThumbs.db\n"
  },
  {
    "path": "examples/angular/row-selection/README.md",
    "content": "# Row Selection\n\nThis project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 21.1.0.\n\n## Development server\n\nTo start a local development server, run:\n\n```bash\nng serve\n```\n\nOnce the server is running, open your browser and navigate to `http://localhost:4200/`. The application will automatically reload whenever you modify any of the source files.\n\n## Code scaffolding\n\nAngular CLI includes powerful code scaffolding tools. To generate a new component, run:\n\n```bash\nng generate component component-name\n```\n\nFor a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:\n\n```bash\nng generate --help\n```\n\n## Building\n\nTo build the project run:\n\n```bash\nng build\n```\n\nThis will compile your project and store the build artifacts in the `dist/` directory. By default, the production build optimizes your application for performance and speed.\n\n## Running unit tests\n\nTo execute unit tests with the [Vitest](https://vitest.dev/) test runner, use the following command:\n\n```bash\nng test\n```\n\n## Running end-to-end tests\n\nFor end-to-end (e2e) testing, run:\n\n```bash\nng e2e\n```\n\nAngular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.\n\n## Additional Resources\n\nFor more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.\n"
  },
  {
    "path": "examples/angular/row-selection/angular.json",
    "content": "{\n  \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\n  \"version\": 1,\n  \"cli\": {\n    \"packageManager\": \"pnpm\",\n    \"analytics\": false,\n    \"cache\": {\n      \"enabled\": false\n    }\n  },\n  \"newProjectRoot\": \"projects\",\n  \"projects\": {\n    \"row-selection\": {\n      \"projectType\": \"application\",\n      \"schematics\": {\n        \"@schematics/angular:component\": {\n          \"inlineTemplate\": true,\n          \"inlineStyle\": true,\n          \"skipTests\": true\n        },\n        \"@schematics/angular:class\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:directive\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:guard\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:interceptor\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:pipe\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:resolver\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:service\": {\n          \"skipTests\": true\n        }\n      },\n      \"root\": \"\",\n      \"sourceRoot\": \"src\",\n      \"prefix\": \"app\",\n      \"architect\": {\n        \"build\": {\n          \"builder\": \"@angular/build:application\",\n          \"options\": {\n            \"browser\": \"src/main.ts\",\n            \"tsConfig\": \"tsconfig.app.json\",\n            \"assets\": [\n              {\n                \"glob\": \"**/*\",\n                \"input\": \"public\"\n              }\n            ],\n            \"styles\": [\"src/styles.css\"]\n          },\n          \"configurations\": {\n            \"production\": {\n              \"budgets\": [\n                {\n                  \"type\": \"initial\",\n                  \"maximumWarning\": \"500kB\",\n                  \"maximumError\": \"1MB\"\n                },\n                {\n                  \"type\": \"anyComponentStyle\",\n                  \"maximumWarning\": \"4kB\",\n                  \"maximumError\": \"8kB\"\n                }\n              ],\n              \"outputHashing\": \"all\"\n            },\n            \"development\": {\n              \"optimization\": false,\n              \"extractLicenses\": false,\n              \"sourceMap\": true\n            }\n          },\n          \"defaultConfiguration\": \"production\"\n        },\n        \"serve\": {\n          \"builder\": \"@angular/build:dev-server\",\n          \"configurations\": {\n            \"production\": {\n              \"buildTarget\": \"row-selection:build:production\"\n            },\n            \"development\": {\n              \"buildTarget\": \"row-selection:build:development\"\n            }\n          },\n          \"defaultConfiguration\": \"development\"\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "examples/angular/row-selection/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-angular-row-selection\",\n  \"version\": \"0.0.0\",\n  \"scripts\": {\n    \"ng\": \"ng\",\n    \"start\": \"ng serve\",\n    \"build\": \"ng build\",\n    \"watch\": \"ng build --watch --configuration development\",\n    \"lint\": \"eslint ./src\"\n  },\n  \"private\": true,\n  \"packageManager\": \"pnpm@10.28.2\",\n  \"dependencies\": {\n    \"@angular/cdk\": \"^21.1.1\",\n    \"@angular/common\": \"^21.1.1\",\n    \"@angular/compiler\": \"^21.1.1\",\n    \"@angular/core\": \"^21.1.1\",\n    \"@angular/forms\": \"^21.1.1\",\n    \"@angular/platform-browser\": \"^21.1.1\",\n    \"@angular/router\": \"^21.1.1\",\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"@tanstack/angular-table\": \"^9.0.0-alpha.17\",\n    \"rxjs\": \"~7.8.2\",\n    \"tslib\": \"^2.8.1\"\n  },\n  \"devDependencies\": {\n    \"@angular/build\": \"^21.1.2\",\n    \"@angular/cli\": \"^21.1.2\",\n    \"@angular/compiler-cli\": \"^21.1.1\",\n    \"typescript\": \"5.9.3\"\n  }\n}\n"
  },
  {
    "path": "examples/angular/row-selection/src/app/app.config.ts",
    "content": "import { provideBrowserGlobalErrorListeners } from '@angular/core'\nimport type { ApplicationConfig } from '@angular/core'\n\nexport const appConfig: ApplicationConfig = {\n  providers: [provideBrowserGlobalErrorListeners()],\n}\n"
  },
  {
    "path": "examples/angular/row-selection/src/app/app.html",
    "content": "<div class=\"p-2\">\n  <button class=\"border rounded px-2\" (click)=\"toggleEnableRowSelection()\">\n    {{ enableRowSelection() ? 'Disable' : 'Enable' }} Row selection\n  </button>\n\n  <div class=\"h-2\"></div>\n\n  <table [tanStackTable]=\"table\">\n    <thead>\n      @for (headerGroup of table.getHeaderGroups(); track headerGroup.id) {\n        <tr>\n          @for (header of headerGroup.headers; track header.id) {\n            <th [attr.colSpan]=\"header.colSpan\">\n              @if (!header.isPlaceholder) {\n                <ng-container *flexRenderHeader=\"header; let headerCell\">\n                  {{ headerCell }}\n                </ng-container>\n\n                @if (header.column.getCanFilter()) {\n                  <div>\n                    <app-table-filter [column]=\"header.column\" />\n                  </div>\n                }\n              }\n            </th>\n          }\n        </tr>\n      }\n    </thead>\n    <tbody>\n      @for (row of table.getRowModel().rows; track row.id) {\n        <tr>\n          @for (cell of row.getAllCells(); track cell.id) {\n            <td>\n              <ng-container *flexRenderCell=\"cell; let renderCell\">\n                {{ renderCell }}\n              </ng-container>\n            </td>\n          }\n        </tr>\n      }\n    </tbody>\n    <tfoot>\n      <tr>\n        <td class=\"p-1\">\n          <input\n            type=\"checkbox\"\n            [checked]=\"table.getIsAllPageRowsSelected()\"\n            [indeterminate]=\"table.getIsSomePageRowsSelected()\"\n            (change)=\"table.toggleAllPageRowsSelected()\"\n          />\n        </td>\n        <td [attr.colspan]=\"20\">Page Rows ({{ table.getRowModel().rows.length }})</td>\n      </tr>\n    </tfoot>\n  </table>\n\n  <div class=\"h-2\"></div>\n  <div class=\"flex items-center gap-2\">\n    <button\n      class=\"border rounded p-1\"\n      (click)=\"table.setPageIndex(0)\"\n      [disabled]=\"!table.getCanPreviousPage()\"\n    >\n      <<\n    </button>\n    <button\n      class=\"border rounded p-1\"\n      (click)=\"table.previousPage()\"\n      [disabled]=\"!table.getCanPreviousPage()\"\n    >\n      <\n    </button>\n    <button\n      class=\"border rounded p-1\"\n      (click)=\"table.nextPage()\"\n      [disabled]=\"!table.getCanNextPage()\"\n    >\n      >\n    </button>\n    <button\n      class=\"border rounded p-1\"\n      (click)=\"table.setPageIndex(table.getPageCount() - 1)\"\n      [disabled]=\"!table.getCanNextPage()\"\n    >\n      >>\n    </button>\n    <span class=\"flex items-center gap-1\">\n      <div>Page</div>\n      <strong>\n        {{ paginationState().pageIndex + 1 }} of\n        {{ table.getPageCount() }}\n      </strong>\n    </span>\n    <span class=\"flex items-center gap-1\">\n      | Go to page:\n      <input\n        type=\"number\"\n        [value]=\"paginationState().pageIndex + 1\"\n        (input)=\"onPageInputChange($event)\"\n        class=\"border p-1 rounded w-16\"\n      />\n    </span>\n\n    <select [value]=\"paginationState().pageSize\" (change)=\"onPageSizeChange($event)\">\n      @for (pageSize of [10, 20, 30, 40, 50]; track pageSize) {\n        <option [value]=\"pageSize\">Show {{ pageSize }}</option>\n      }\n    </select>\n  </div>\n  <br />\n  <div>\n    {{ rowSelectionLength() }} of {{ table.getPreFilteredRowModel().rows.length }} Total Rows\n  </div>\n  <hr />\n  <br />\n  <div>\n    <button class=\"border rounded p-2 mb-2\" (click)=\"refreshData()\">Refresh Data</button>\n  </div>\n  <div>\n    <button class=\"border rounded p-2 mb-2\" (click)=\"logSelectedFlatRows()\">\n      Log table.getSelectedRowModel().flatRows\n    </button>\n  </div>\n  <div>\n    <label>Row Selection State:</label>\n    <pre>{{ stringifiedRowSelection() }}</pre>\n  </div>\n</div>\n"
  },
  {
    "path": "examples/angular/row-selection/src/app/app.ts",
    "content": "import {\n  ChangeDetectionStrategy,\n  Component,\n  computed,\n  signal,\n} from '@angular/core'\nimport {\n  FlexRender,\n  TanStackTable,\n  flexRenderComponent,\n} from '@tanstack/angular-table'\nimport { TableFilter } from './table-filter/table-filter'\nimport { makeData } from './makeData'\nimport {\n  TableHeaderSelection,\n  TableRowSelection,\n} from './selection-column/selection-column'\nimport { createAppColumnHelper, injectTable } from './table'\nimport type { Person } from './makeData'\nimport type { RowSelectionState } from '@tanstack/angular-table'\n\nconst columnHelper = createAppColumnHelper<Person>()\n\n@Component({\n  selector: 'app-root',\n  standalone: true,\n  imports: [TableFilter, FlexRender, TanStackTable],\n  templateUrl: './app.html',\n  changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class App {\n  private readonly rowSelection = signal<RowSelectionState>({})\n  readonly globalFilter = signal<string>('')\n  readonly data = signal(makeData(10_000))\n  readonly enableRowSelection = signal(true)\n\n  readonly columns = columnHelper.columns([\n    columnHelper.display({\n      id: 'select',\n      header: () => flexRenderComponent(TableHeaderSelection),\n      cell: () => flexRenderComponent(TableRowSelection),\n    }),\n    columnHelper.group({\n      header: 'Name',\n      footer: (props) => props.column.id,\n      columns: columnHelper.columns([\n        columnHelper.accessor('firstName', {\n          cell: (info) => info.getValue(),\n          footer: (props) => props.column.id,\n          header: () => 'First name',\n        }),\n        columnHelper.accessor('lastName', {\n          cell: (info) => info.getValue(),\n          header: () => 'Last Name',\n          footer: (props) => props.column.id,\n        }),\n      ]),\n    }),\n    columnHelper.group({\n      header: 'Info',\n      footer: (props) => props.column.id,\n      columns: columnHelper.columns([\n        columnHelper.accessor('age', {\n          header: () => `Age 🥳`,\n          footer: (props) => props.column.id,\n        }),\n        columnHelper.group({\n          header: 'More Info',\n          columns: columnHelper.columns([\n            columnHelper.accessor((row) => row.visits, {\n              id: 'visits',\n              header: () => 'Visits',\n              footer: (props) => props.column.id,\n            }),\n            columnHelper.accessor((row) => row.status, {\n              id: 'status',\n              header: () => 'Status',\n              footer: (props) => props.column.id,\n            }),\n            columnHelper.accessor((row) => row.progress, {\n              id: 'progress',\n              header: 'Profile Progress',\n              footer: (props) => props.column.id,\n            }),\n          ]),\n        }),\n      ]),\n    }),\n  ])\n\n  readonly table = injectTable(() => ({\n    data: this.data(),\n    columns: this.columns,\n    state: {\n      rowSelection: this.rowSelection(),\n    },\n\n    enableRowSelection: this.enableRowSelection(), // enable row selection for all rows\n    // enableRowSelection: row => row.original.age > 18, // or enable row selection conditionally per row\n    onRowSelectionChange: (updaterOrValue) => {\n      this.rowSelection.set(\n        typeof updaterOrValue === 'function'\n          ? updaterOrValue(this.rowSelection())\n          : updaterOrValue,\n      )\n    },\n  }))\n\n  readonly paginationState = this.table.computed({\n    selector: (state) => state.pagination,\n  })\n\n  readonly stringifiedRowSelection = computed(() =>\n    JSON.stringify(this.rowSelection(), null, 2),\n  )\n\n  readonly rowSelectionLength = computed(\n    () => Object.keys(this.rowSelection()).length,\n  )\n\n  onPageInputChange(event: Event): void {\n    const inputElement = event.target as HTMLInputElement\n    const page = inputElement.value ? Number(inputElement.value) - 1 : 0\n    this.table.setPageIndex(page)\n  }\n\n  onPageSizeChange(event: any): void {\n    this.table.setPageSize(Number(event.target.value))\n  }\n\n  logSelectedFlatRows(): void {\n    console.info(\n      'table.getSelectedRowModel().flatRows',\n      this.table.getSelectedRowModel().flatRows,\n    )\n  }\n\n  refreshData(): void {\n    this.data.set(makeData(10_000))\n  }\n\n  toggleEnableRowSelection() {\n    this.enableRowSelection.update((value) => !value)\n  }\n}\n"
  },
  {
    "path": "examples/angular/row-selection/src/app/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  subRows?: Array<Person>\n}\n\nconst range = (len: number) => {\n  const arr: Array<number> = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (): Person => {\n  return {\n    firstName: faker.person.firstName(),\n    lastName: faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: faker.number.int(1000),\n    progress: faker.number.int(100),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0],\n  }\n}\n\nexport function makeData(...lens: Array<number>) {\n  const makeDataLevel = (depth = 0): Array<Person> => {\n    const len = lens[depth]\n    return range(len).map((d): Person => {\n      return {\n        ...newPerson(),\n        subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined,\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n"
  },
  {
    "path": "examples/angular/row-selection/src/app/selection-column/selection-column.ts",
    "content": "import { injectTableCellContext } from '@tanstack/angular-table'\nimport { ChangeDetectionStrategy, Component, computed } from '@angular/core'\nimport {\n  injectFlexRenderCellContext,\n  injectFlexRenderHeaderContext,\n} from '../table'\n\n@Component({\n  template: `\n    <input\n      type=\"checkbox\"\n      [checked]=\"context.table.getIsAllRowsSelected()\"\n      [indeterminate]=\"context.table.getIsSomeRowsSelected()\"\n      (change)=\"context.table.toggleAllRowsSelected()\"\n    />\n  `,\n  host: {\n    class: 'px-1 block',\n  },\n  standalone: true,\n  changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TableHeaderSelection {\n  context = injectFlexRenderHeaderContext()\n}\n\n@Component({\n  template: `\n    <input\n      type=\"checkbox\"\n      [checked]=\"context.row.getIsSelected()\"\n      [disabled]=\"!context.row.getCanSelect()\"\n      (change)=\"context.row.getToggleSelectedHandler()($event)\"\n    />\n  `,\n  host: {\n    class: 'px-1 block',\n  },\n  standalone: true,\n  changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TableRowSelection {\n  readonly cell = injectTableCellContext()\n  readonly row = computed(() => this.cell().row)\n  readonly context = injectFlexRenderCellContext()\n}\n"
  },
  {
    "path": "examples/angular/row-selection/src/app/table-filter/table-filter.ts",
    "content": "import { Component, computed, input } from '@angular/core'\nimport { injectTableContext } from '../table'\nimport type { Column } from '@tanstack/angular-table'\n\n@Component({\n  selector: 'app-table-filter',\n  template: `\n    @let columnType = this.columnType();\n\n    @if (columnType == 'number') {\n      <div class=\"flex space-x-2\">\n        <input\n          #min\n          type=\"number\"\n          class=\"w-24 border shadow rounded\"\n          placeholder=\"Min\"\n          [value]=\"getMinValue()\"\n          (input)=\"updateMinFilterValue(min.value)\"\n        />\n        <input\n          #max\n          type=\"number\"\n          class=\"w-36 border shadow rounded\"\n          placeholder=\"max\"\n          [value]=\"getMaxValue()\"\n          (input)=\"updateMaxFilterValue(max.value)\"\n        />\n      </div>\n    } @else {\n      <input\n        #search\n        type=\"text\"\n        class=\"w-36 border shadow rounded\"\n        placeholder=\"Search...\"\n        [value]=\"column().getFilterValue() ?? ''\"\n        (input)=\"column().setFilterValue(search.value)\"\n      />\n    }\n  `,\n  standalone: true,\n})\nexport class TableFilter {\n  readonly column = input.required<Column<any, any, any>>()\n  readonly table = injectTableContext()\n\n  readonly columnType = computed(() => {\n    return typeof this.table()\n      .getPreFilteredRowModel()\n      .flatRows[0]?.getValue(this.column().id)\n  })\n\n  getMinValue() {\n    const minValue = this.column().getFilterValue()\n\n    return (minValue?.[0] ?? '') as string\n  }\n\n  getMaxValue() {\n    const maxValue = this.column().getFilterValue()\n    return (maxValue?.[1] ?? '') as string\n  }\n\n  updateMinFilterValue(newValue: string): void {\n    this.column().setFilterValue((old: any) => {\n      return [newValue, old?.[1]]\n    })\n  }\n\n  updateMaxFilterValue(newValue: string): void {\n    this.column().setFilterValue((old: any) => [old?.[0], newValue])\n  }\n}\n"
  },
  {
    "path": "examples/angular/row-selection/src/app/table.ts",
    "content": "import {\n  columnFilteringFeature,\n  createFilteredRowModel,\n  createPaginatedRowModel,\n  createTableHook,\n  filterFns,\n  rowPaginationFeature,\n  rowSelectionFeature,\n  tableFeatures,\n} from '@tanstack/angular-table'\n\nconst _features = tableFeatures({\n  columnFilteringFeature,\n  rowPaginationFeature,\n  rowSelectionFeature,\n})\n\nexport const {\n  injectAppTable: injectTable,\n  injectTableContext,\n  createAppColumnHelper,\n  injectFlexRenderCellContext,\n  injectFlexRenderHeaderContext,\n} = createTableHook({\n  _features,\n  _rowModels: {\n    filteredRowModel: createFilteredRowModel(filterFns),\n    paginatedRowModel: createPaginatedRowModel(),\n  },\n  debugTable: true,\n})\n"
  },
  {
    "path": "examples/angular/row-selection/src/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"utf-8\" />\n    <title>Selection</title>\n    <base href=\"/\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n    <link rel=\"icon\" type=\"image/x-icon\" href=\"favicon.ico\" />\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n  </head>\n  <body>\n    <app-root></app-root>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/angular/row-selection/src/main.ts",
    "content": "import { bootstrapApplication } from '@angular/platform-browser'\nimport { appConfig } from './app/app.config'\nimport { App } from './app/app'\n\nbootstrapApplication(App, appConfig).catch((err) => console.error(err))\n"
  },
  {
    "path": "examples/angular/row-selection/src/styles.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n"
  },
  {
    "path": "examples/angular/row-selection/tsconfig.app.json",
    "content": "/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */\n/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */\n{\n  \"extends\": \"./tsconfig.json\",\n  \"compilerOptions\": {\n    \"outDir\": \"./out-tsc/app\",\n    \"types\": []\n  },\n  \"include\": [\"src/**/*.ts\"],\n  \"exclude\": [\"src/**/*.spec.ts\"]\n}\n"
  },
  {
    "path": "examples/angular/row-selection/tsconfig.json",
    "content": "/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */\n/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */\n{\n  \"compileOnSave\": false,\n  \"compilerOptions\": {\n    \"strict\": true,\n    \"noImplicitOverride\": true,\n    \"noPropertyAccessFromIndexSignature\": true,\n    \"noImplicitReturns\": true,\n    \"noFallthroughCasesInSwitch\": true,\n    \"skipLibCheck\": true,\n    \"isolatedModules\": true,\n    \"experimentalDecorators\": true,\n    \"importHelpers\": true,\n    \"target\": \"ES2022\",\n    \"module\": \"preserve\"\n  },\n  \"angularCompilerOptions\": {\n    \"enableI18nLegacyMessageIdFormat\": false,\n    \"strictInjectionParameters\": true,\n    \"strictInputAccessModifiers\": true,\n    \"strictTemplates\": true\n  }\n}\n"
  },
  {
    "path": "examples/angular/row-selection-signal/.devcontainer/devcontainer.json",
    "content": "{\n  \"name\": \"Node.js\",\n  \"image\": \"mcr.microsoft.com/devcontainers/javascript-node:18\"\n}\n"
  },
  {
    "path": "examples/angular/row-selection-signal/.editorconfig",
    "content": "# Editor configuration, see https://editorconfig.org\nroot = true\n\n[*]\ncharset = utf-8\nindent_style = space\nindent_size = 2\ninsert_final_newline = true\ntrim_trailing_whitespace = true\n\n[*.ts]\nquote_type = single\n\n[*.md]\nmax_line_length = off\ntrim_trailing_whitespace = false\n"
  },
  {
    "path": "examples/angular/row-selection-signal/.gitignore",
    "content": "# See http://help.github.com/ignore-files/ for more about ignoring files.\n\n# Compiled output\n/dist\n/tmp\n/out-tsc\n/bazel-out\n\n# Node\n/node_modules\nnpm-debug.log\nyarn-error.log\n\n# IDEs and editors\n.idea/\n.project\n.classpath\n.c9/\n*.launch\n.settings/\n*.sublime-workspace\n\n# Visual Studio Code\n.vscode/*\n!.vscode/settings.json\n!.vscode/tasks.json\n!.vscode/launch.json\n!.vscode/extensions.json\n.history/*\n\n# Miscellaneous\n/.angular/cache\n.sass-cache/\n/connect.lock\n/coverage\n/libpeerconnection.log\ntestem.log\n/typings\n\n# System files\n.DS_Store\nThumbs.db\n"
  },
  {
    "path": "examples/angular/row-selection-signal/README.md",
    "content": "# Selection\n\nThis project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 17.1.2.\n\n## Development server\n\nRun `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files.\n\n## Code scaffolding\n\nRun `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.\n\n## Build\n\nRun `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.\n\n## Running unit tests\n\nRun `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).\n\n## Running end-to-end tests\n\nRun `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.\n\n## Further help\n\nTo get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.\n"
  },
  {
    "path": "examples/angular/row-selection-signal/angular.json",
    "content": "{\n  \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\n  \"version\": 1,\n  \"newProjectRoot\": \"projects\",\n  \"projects\": {\n    \"row-selection-signal\": {\n      \"cli\": {\n        \"cache\": {\n          \"enabled\": false\n        }\n      },\n      \"projectType\": \"application\",\n      \"schematics\": {\n        \"@schematics/angular:component\": {\n          \"inlineTemplate\": true,\n          \"inlineStyle\": true,\n          \"skipTests\": true,\n          \"style\": \"scss\"\n        },\n        \"@schematics/angular:class\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:directive\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:guard\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:interceptor\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:pipe\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:resolver\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:service\": {\n          \"skipTests\": true\n        }\n      },\n      \"root\": \"\",\n      \"sourceRoot\": \"src\",\n      \"prefix\": \"app\",\n      \"architect\": {\n        \"build\": {\n          \"builder\": \"@angular/build:application\",\n          \"options\": {\n            \"outputPath\": \"dist/row-selection-signal\",\n            \"index\": \"src/index.html\",\n            \"browser\": \"src/main.ts\",\n            \"polyfills\": [],\n            \"tsConfig\": \"tsconfig.app.json\",\n            \"inlineStyleLanguage\": \"scss\",\n            \"assets\": [\"src/favicon.ico\", \"src/assets\"],\n            \"styles\": [\"src/styles.scss\"],\n            \"scripts\": []\n          },\n          \"configurations\": {\n            \"production\": {\n              \"budgets\": [\n                {\n                  \"type\": \"initial\",\n                  \"maximumWarning\": \"500kb\",\n                  \"maximumError\": \"1mb\"\n                },\n                {\n                  \"type\": \"anyComponentStyle\",\n                  \"maximumWarning\": \"2kb\",\n                  \"maximumError\": \"4kb\"\n                }\n              ],\n              \"outputHashing\": \"all\"\n            },\n            \"development\": {\n              \"optimization\": false,\n              \"extractLicenses\": false,\n              \"sourceMap\": true\n            }\n          },\n          \"defaultConfiguration\": \"production\"\n        },\n        \"serve\": {\n          \"builder\": \"@angular/build:dev-server\",\n          \"configurations\": {\n            \"production\": {\n              \"buildTarget\": \"row-selection-signal:build:production\"\n            },\n            \"development\": {\n              \"buildTarget\": \"row-selection-signal:build:development\"\n            }\n          },\n          \"defaultConfiguration\": \"development\"\n        },\n        \"extract-i18n\": {\n          \"builder\": \"@angular/build:extract-i18n\",\n          \"options\": {\n            \"buildTarget\": \"row-selection-signal:build\"\n          }\n        }\n      }\n    }\n  },\n  \"cli\": {\n    \"analytics\": false\n  }\n}\n"
  },
  {
    "path": "examples/angular/row-selection-signal/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-angular-row-selection-signal\",\n  \"version\": \"0.0.0\",\n  \"scripts\": {\n    \"ng\": \"ng\",\n    \"start\": \"ng serve\",\n    \"build\": \"ng build\",\n    \"watch\": \"ng build --watch --configuration development\",\n    \"test\": \"ng test\",\n    \"lint\": \"eslint ./src\"\n  },\n  \"private\": true,\n  \"dependencies\": {\n    \"@angular/animations\": \"^21.1.1\",\n    \"@angular/common\": \"^21.1.1\",\n    \"@angular/compiler\": \"^21.1.1\",\n    \"@angular/core\": \"^21.1.1\",\n    \"@angular/forms\": \"^21.1.1\",\n    \"@angular/platform-browser\": \"^21.1.1\",\n    \"@angular/platform-browser-dynamic\": \"^21.1.1\",\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"@tanstack/angular-table\": \"^9.0.0-alpha.17\",\n    \"rxjs\": \"~7.8.2\",\n    \"tslib\": \"^2.8.1\"\n  },\n  \"devDependencies\": {\n    \"@angular/build\": \"^21.1.2\",\n    \"@angular/cli\": \"^21.1.2\",\n    \"@angular/compiler-cli\": \"^21.1.1\",\n    \"typescript\": \"5.9.3\"\n  }\n}\n"
  },
  {
    "path": "examples/angular/row-selection-signal/src/app/app.component.html",
    "content": "<div class=\"p-2\">\n  <div class=\"h-2\"></div>\n\n  <table>\n    <thead>\n      @for (headerGroup of table.getHeaderGroups(); track headerGroup.id) {\n        <tr>\n          @for (header of headerGroup.headers; track header.id) {\n            <th [attr.colSpan]=\"header.colSpan\">\n              @if (!header.isPlaceholder) {\n                <ng-container\n                  *flexRender=\"\n                    header.column.columnDef.header;\n                    props: header.getContext();\n                    let headerCell\n                  \"\n                >\n                  {{ headerCell }}\n                </ng-container>\n\n                @if (header.column.getCanFilter()) {\n                  <div>\n                    <!-- TODO fix type -->\n                    <app-table-filter [column]=\"$any(header.column)\" [table]=\"table\" />\n                  </div>\n                }\n              }\n            </th>\n          }\n        </tr>\n      }\n    </thead>\n    <tbody>\n      @for (row of table.getRowModel().rows; track row.id) {\n        <tr>\n          @for (cell of row.getVisibleCells(); track cell.id) {\n            <td>\n              <ng-container\n                *flexRender=\"cell.column.columnDef.cell; props: cell.getContext(); let renderCell\"\n              >\n                {{ renderCell }}\n              </ng-container>\n            </td>\n          }\n        </tr>\n      }\n    </tbody>\n    <tfoot>\n      <tr>\n        <td class=\"p-1\">\n          <input\n            type=\"checkbox\"\n            [checked]=\"table.getIsAllPageRowsSelected()\"\n            [indeterminate]=\"table.getIsSomePageRowsSelected()\"\n            (change)=\"table.toggleAllPageRowsSelected()\"\n          />\n        </td>\n        <td [attr.colspan]=\"20\">Page Rows ({{ table.getRowModel().rows.length }})</td>\n      </tr>\n    </tfoot>\n  </table>\n\n  <div class=\"h-2\"></div>\n  <div class=\"flex items-center gap-2\">\n    <button\n      class=\"border rounded p-1\"\n      (click)=\"table.setPageIndex(0)\"\n      [disabled]=\"!table.getCanPreviousPage()\"\n    >\n      <<\n    </button>\n    <button\n      class=\"border rounded p-1\"\n      (click)=\"table.previousPage()\"\n      [disabled]=\"!table.getCanPreviousPage()\"\n    >\n      <\n    </button>\n    <button\n      class=\"border rounded p-1\"\n      (click)=\"table.nextPage()\"\n      [disabled]=\"!table.getCanNextPage()\"\n    >\n      >\n    </button>\n    <button\n      class=\"border rounded p-1\"\n      (click)=\"table.setPageIndex(table.getPageCount() - 1)\"\n      [disabled]=\"!table.getCanNextPage()\"\n    >\n      >>\n    </button>\n    <span class=\"flex items-center gap-1\">\n      <div>Page</div>\n      <strong>\n        {{ table.store.state.pagination.pageIndex + 1 }} of\n        {{ table.getPageCount() }}\n      </strong>\n    </span>\n    <span class=\"flex items-center gap-1\">\n      | Go to page:\n      <input\n        type=\"number\"\n        [value]=\"table.store.state.pagination.pageIndex + 1\"\n        (input)=\"onPageInputChange($event)\"\n        class=\"border p-1 rounded w-16\"\n      />\n    </span>\n\n    <select [value]=\"table.store.state.pagination.pageSize\" (change)=\"onPageSizeChange($event)\">\n      @for (pageSize of [10, 20, 30, 40, 50]; track pageSize) {\n        <option [value]=\"pageSize\">Show {{ pageSize }}</option>\n      }\n    </select>\n  </div>\n  <br />\n  <div>\n    {{ rowSelectionLength() }} of {{ table.getPreFilteredRowModel().rows.length }} Total Rows\n  </div>\n  <hr />\n  <br />\n  <div>\n    <button class=\"border rounded p-2 mb-2\" (click)=\"refreshData()\">Refresh Data</button>\n  </div>\n  <div>\n    <button class=\"border rounded p-2 mb-2\" (click)=\"logSelectedFlatRows()\">\n      Log table.getSelectedRowModel().flatRows\n    </button>\n  </div>\n  <div>\n    <label>Row Selection State:</label>\n    <pre>{{ stringifiedRowSelection() }}</pre>\n  </div>\n</div>\n\n<ng-template #ageHeaderCell let-context>\n  <span>Age 🥳</span>\n</ng-template>\n"
  },
  {
    "path": "examples/angular/row-selection-signal/src/app/app.component.ts",
    "content": "import {\n  ChangeDetectionStrategy,\n  Component,\n  computed,\n  signal,\n  viewChild,\n} from '@angular/core'\nimport {\n  FlexRenderDirective,\n  columnFilteringFeature,\n  columnVisibilityFeature,\n  createFilteredRowModel,\n  createPaginatedRowModel,\n  filterFns,\n  injectTable,\n  rowPaginationFeature,\n  rowSelectionFeature,\n  tableFeatures,\n} from '@tanstack/angular-table'\nimport { FilterComponent } from './filter'\nimport { makeData } from './makeData'\nimport {\n  TableHeadSelectionComponent,\n  TableRowSelectionComponent,\n} from './selection-column.component'\nimport type { Person } from './makeData'\nimport type { ColumnDef, RowSelectionState } from '@tanstack/angular-table'\nimport type { TemplateRef } from '@angular/core'\n\nconst _features = tableFeatures({\n  columnFilteringFeature,\n  columnVisibilityFeature,\n  rowPaginationFeature,\n  rowSelectionFeature,\n})\n\n@Component({\n  selector: 'app-root',\n  imports: [FilterComponent, FlexRenderDirective],\n  templateUrl: './app.component.html',\n  changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AppComponent {\n  private readonly rowSelection = signal<RowSelectionState>({})\n  readonly globalFilter = signal<string>('')\n  readonly data = signal(makeData(10_000))\n\n  readonly ageHeaderCell =\n    viewChild.required<TemplateRef<unknown>>('ageHeaderCell')\n\n  readonly columns: Array<ColumnDef<typeof _features, Person>> = [\n    {\n      id: 'select',\n      header: () => TableHeadSelectionComponent<Person>,\n      cell: () => TableRowSelectionComponent<Person>,\n    },\n    {\n      header: 'Name',\n      footer: (props) => props.column.id,\n      columns: [\n        {\n          accessorKey: 'firstName',\n          cell: (info) => info.getValue(),\n          footer: (props) => props.column.id,\n          header: 'First name',\n        },\n        {\n          accessorFn: (row) => row.lastName,\n          id: 'lastName',\n          cell: (info) => info.getValue(),\n          header: () => 'Last Name',\n          footer: (props) => props.column.id,\n        },\n      ],\n    },\n    {\n      header: 'Info',\n      footer: (props) => props.column.id,\n      columns: [\n        {\n          accessorKey: 'age',\n          header: () => this.ageHeaderCell(),\n          footer: (props) => props.column.id,\n        },\n        {\n          header: 'More Info',\n          columns: [\n            {\n              accessorKey: 'visits',\n              header: () => 'Visits',\n              footer: (props) => props.column.id,\n            },\n            {\n              accessorKey: 'status',\n              header: 'Status',\n              footer: (props) => props.column.id,\n            },\n            {\n              accessorKey: 'progress',\n              header: 'Profile Progress',\n              footer: (props) => props.column.id,\n            },\n          ],\n        },\n      ],\n    },\n  ]\n\n  // TODO make this generic infer without passing in manually\n  table = injectTable<typeof _features, Person>(() => ({\n    _features,\n    _rowModels: {\n      filteredRowModel: createFilteredRowModel(filterFns),\n      paginatedRowModel: createPaginatedRowModel(),\n    },\n    columns: this.columns,\n    data: this.data(),\n    state: {\n      rowSelection: this.rowSelection(),\n    },\n    enableRowSelection: true, // enable row selection for all rows\n    // enableRowSelection: row => row.original.age > 18, // or enable row selection conditionally per row\n    onRowSelectionChange: (updaterOrValue) => {\n      this.rowSelection.set(\n        typeof updaterOrValue === 'function'\n          ? updaterOrValue(this.rowSelection())\n          : updaterOrValue,\n      )\n    },\n    debugTable: true,\n  }))\n\n  readonly stringifiedRowSelection = computed(() =>\n    JSON.stringify(this.rowSelection(), null, 2),\n  )\n\n  readonly rowSelectionLength = computed(\n    () => Object.keys(this.rowSelection()).length,\n  )\n\n  onPageInputChange(event: Event): void {\n    const inputElement = event.target as HTMLInputElement\n    const page = inputElement.value ? Number(inputElement.value) - 1 : 0\n    this.table.setPageIndex(page)\n  }\n\n  onPageSizeChange(event: any): void {\n    this.table.setPageSize(Number(event.target.value))\n  }\n\n  logSelectedFlatRows(): void {\n    console.info(\n      'table.getSelectedRowModel().flatRows',\n      this.table.getSelectedRowModel().flatRows,\n    )\n  }\n\n  refreshData(): void {\n    this.data.set(makeData(10_000))\n  }\n}\n"
  },
  {
    "path": "examples/angular/row-selection-signal/src/app/app.config.ts",
    "content": "import type { ApplicationConfig } from '@angular/core'\n\nexport const appConfig: ApplicationConfig = {\n  providers: [],\n}\n"
  },
  {
    "path": "examples/angular/row-selection-signal/src/app/filter.ts",
    "content": "import { Component, input } from '@angular/core'\nimport type { OnInit } from '@angular/core'\nimport type { Column, RowData, Table } from '@tanstack/angular-table'\n\n@Component({\n  selector: 'app-table-filter',\n  template: ` @if (columnType) {\n    @if (columnType == 'number') {\n      <div class=\"flex space-x-2\">\n        <input\n          #min\n          type=\"number\"\n          class=\"w-24 border shadow rounded\"\n          placeholder=\"Min\"\n          [value]=\"getMinValue()\"\n          (input)=\"updateMinFilterValue(min.value)\"\n        />\n        <input\n          #max\n          type=\"number\"\n          class=\"w-36 border shadow rounded\"\n          placeholder=\"max\"\n          [value]=\"getMaxValue()\"\n          (input)=\"updateMaxFilterValue(max.value)\"\n        />\n      </div>\n    } @else {\n      <input\n        #search\n        type=\"text\"\n        class=\"w-36 border shadow rounded\"\n        placeholder=\"Search...\"\n        [value]=\"column().getFilterValue() ?? ''\"\n        (input)=\"column().setFilterValue(search.value)\"\n      />\n    }\n  }`,\n})\nexport class FilterComponent<T extends RowData> implements OnInit {\n  column = input.required<Column<any, any>>()\n\n  table = input.required<Table<any, T>>()\n\n  columnType!: string\n\n  ngOnInit() {\n    this.columnType = typeof this.table()\n      .getPreFilteredRowModel()\n      .flatRows[0]?.getValue(this.column().id)\n  }\n\n  getMinValue() {\n    const minValue = this.column().getFilterValue()\n\n    return (minValue?.[0] ?? '') as string\n  }\n\n  getMaxValue() {\n    const maxValue = this.column().getFilterValue()\n    return (maxValue?.[1] ?? '') as string\n  }\n\n  updateMinFilterValue(newValue: string): void {\n    this.column().setFilterValue((old: any) => {\n      return [newValue, old?.[1]]\n    })\n  }\n\n  updateMaxFilterValue(newValue: string): void {\n    this.column().setFilterValue((old: any) => [old?.[0], newValue])\n  }\n}\n"
  },
  {
    "path": "examples/angular/row-selection-signal/src/app/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  subRows?: Array<Person>\n}\n\nconst range = (len: number) => {\n  const arr: Array<number> = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (): Person => {\n  return {\n    firstName: faker.person.firstName(),\n    lastName: faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: faker.number.int(1000),\n    progress: faker.number.int(100),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0],\n  }\n}\n\nexport function makeData(...lens: Array<number>) {\n  const makeDataLevel = (depth = 0): Array<Person> => {\n    const len = lens[depth]\n    return range(len).map((d): Person => {\n      return {\n        ...newPerson(),\n        subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined,\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n"
  },
  {
    "path": "examples/angular/row-selection-signal/src/app/selection-column.component.ts",
    "content": "import { ChangeDetectionStrategy, Component, input } from '@angular/core'\nimport type { Row, RowData, Table } from '@tanstack/angular-table'\n\n@Component({\n  template: `\n    <input\n      type=\"checkbox\"\n      [checked]=\"table().getIsAllRowsSelected()\"\n      [indeterminate]=\"table().getIsSomeRowsSelected()\"\n      (change)=\"table().toggleAllRowsSelected()\"\n    />\n  `,\n  host: {\n    class: 'px-1 block',\n  },\n  standalone: true,\n  changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TableHeadSelectionComponent<T extends RowData> {\n  // Your component should also reflect the fields you use as props in flexRenderer directive.\n  // Define the fields as input you want to use in your component\n  // ie. In this case, you are passing HeaderContext object as props in flexRenderer directive.\n  // You can define and use the table field, which is defined in HeaderContext.\n  // Please take note that only signal based input is supported.\n\n  // column = input.required<Column<T, unknown>>()\n  // header = input.required<Header<T, unknown>>()\n  table = input.required<Table<any, T>>()\n}\n\n@Component({\n  template: `\n    <input\n      type=\"checkbox\"\n      [checked]=\"row().getIsSelected()\"\n      (change)=\"row().getToggleSelectedHandler()($event)\"\n    />\n  `,\n  host: {\n    class: 'px-1 block',\n  },\n  standalone: true,\n  changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TableRowSelectionComponent<T extends RowData> {\n  row = input.required<Row<any, T>>()\n}\n"
  },
  {
    "path": "examples/angular/row-selection-signal/src/assets/.gitkeep",
    "content": ""
  },
  {
    "path": "examples/angular/row-selection-signal/src/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"utf-8\" />\n    <title>Selection</title>\n    <base href=\"/\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n    <link rel=\"icon\" type=\"image/x-icon\" href=\"favicon.ico\" />\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n  </head>\n  <body>\n    <app-root></app-root>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/angular/row-selection-signal/src/main.ts",
    "content": "import { bootstrapApplication } from '@angular/platform-browser'\nimport { appConfig } from './app/app.config'\nimport { AppComponent } from './app/app.component'\n\nbootstrapApplication(AppComponent, appConfig).catch((err) => console.error(err))\n"
  },
  {
    "path": "examples/angular/row-selection-signal/src/styles.scss",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n"
  },
  {
    "path": "examples/angular/row-selection-signal/tsconfig.app.json",
    "content": "/* To learn more about this file see: https://angular.io/config/tsconfig. */\n{\n  \"extends\": \"./tsconfig.json\",\n  \"compilerOptions\": {\n    \"outDir\": \"./out-tsc/app\",\n    \"types\": []\n  },\n  \"files\": [\"src/main.ts\"],\n  \"include\": [\"src/**/*.d.ts\"]\n}\n"
  },
  {
    "path": "examples/angular/row-selection-signal/tsconfig.json",
    "content": "/* To learn more about this file see: https://angular.io/config/tsconfig. */\n{\n  \"compileOnSave\": false,\n  \"compilerOptions\": {\n    \"outDir\": \"./dist/out-tsc\",\n    \"forceConsistentCasingInFileNames\": true,\n    \"strict\": true,\n    \"noImplicitOverride\": true,\n    \"noPropertyAccessFromIndexSignature\": true,\n    \"noImplicitReturns\": true,\n    \"noFallthroughCasesInSwitch\": true,\n    \"skipLibCheck\": true,\n    \"esModuleInterop\": true,\n    \"sourceMap\": true,\n    \"declaration\": false,\n    \"experimentalDecorators\": true,\n    \"moduleResolution\": \"node\",\n    \"importHelpers\": true,\n    \"target\": \"ES2022\",\n    \"module\": \"ES2022\",\n    \"useDefineForClassFields\": false,\n    \"lib\": [\"ES2022\", \"dom\"]\n  },\n  \"angularCompilerOptions\": {\n    \"enableI18nLegacyMessageIdFormat\": false,\n    \"strictInjectionParameters\": true,\n    \"strictInputAccessModifiers\": true,\n    \"strictTemplates\": true\n  }\n}\n"
  },
  {
    "path": "examples/angular/row-selection-signal/tsconfig.spec.json",
    "content": "/* To learn more about this file see: https://angular.io/config/tsconfig. */\n{\n  \"extends\": \"./tsconfig.json\",\n  \"compilerOptions\": {\n    \"outDir\": \"./out-tsc/spec\",\n    \"types\": [\"jasmine\"]\n  },\n  \"include\": [\"src/**/*.spec.ts\", \"src/**/*.d.ts\"]\n}\n"
  },
  {
    "path": "examples/angular/signal-input/.gitignore",
    "content": "# See https://docs.github.com/get-started/getting-started-with-git/ignoring-files for more about ignoring files.\n\n# Compiled output\n/dist\n/tmp\n/out-tsc\n/bazel-out\n\n# Node\n/node_modules\nnpm-debug.log\nyarn-error.log\n\n# IDEs and editors\n.idea/\n.project\n.classpath\n.c9/\n*.launch\n.settings/\n*.sublime-workspace\n\n# Visual Studio Code\n.vscode/*\n!.vscode/settings.json\n!.vscode/tasks.json\n!.vscode/launch.json\n!.vscode/extensions.json\n!.vscode/mcp.json\n.history/*\n\n# Miscellaneous\n/.angular/cache\n.sass-cache/\n/connect.lock\n/coverage\n/libpeerconnection.log\ntestem.log\n/typings\n__screenshots__/\n\n# System files\n.DS_Store\nThumbs.db\n"
  },
  {
    "path": "examples/angular/signal-input/README.md",
    "content": "# Signal Input\n\nThis project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 21.1.0.\n\n## Development server\n\nTo start a local development server, run:\n\n```bash\nng serve\n```\n\nOnce the server is running, open your browser and navigate to `http://localhost:4200/`. The application will automatically reload whenever you modify any of the source files.\n\n## Code scaffolding\n\nAngular CLI includes powerful code scaffolding tools. To generate a new component, run:\n\n```bash\nng generate component component-name\n```\n\nFor a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:\n\n```bash\nng generate --help\n```\n\n## Building\n\nTo build the project run:\n\n```bash\nng build\n```\n\nThis will compile your project and store the build artifacts in the `dist/` directory. By default, the production build optimizes your application for performance and speed.\n\n## Running unit tests\n\nTo execute unit tests with the [Vitest](https://vitest.dev/) test runner, use the following command:\n\n```bash\nng test\n```\n\n## Running end-to-end tests\n\nFor end-to-end (e2e) testing, run:\n\n```bash\nng e2e\n```\n\nAngular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.\n\n## Additional Resources\n\nFor more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.\n"
  },
  {
    "path": "examples/angular/signal-input/angular.json",
    "content": "{\n  \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\n  \"version\": 1,\n  \"cli\": {\n    \"packageManager\": \"pnpm\",\n    \"analytics\": false,\n    \"cache\": {\n      \"enabled\": false\n    }\n  },\n  \"newProjectRoot\": \"projects\",\n  \"projects\": {\n    \"signal-input\": {\n      \"projectType\": \"application\",\n      \"schematics\": {\n        \"@schematics/angular:component\": {\n          \"inlineTemplate\": true,\n          \"inlineStyle\": true,\n          \"skipTests\": true\n        },\n        \"@schematics/angular:class\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:directive\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:guard\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:interceptor\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:pipe\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:resolver\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:service\": {\n          \"skipTests\": true\n        }\n      },\n      \"root\": \"\",\n      \"sourceRoot\": \"src\",\n      \"prefix\": \"app\",\n      \"architect\": {\n        \"build\": {\n          \"builder\": \"@angular/build:application\",\n          \"options\": {\n            \"browser\": \"src/main.ts\",\n            \"tsConfig\": \"tsconfig.app.json\",\n            \"assets\": [\n              {\n                \"glob\": \"**/*\",\n                \"input\": \"public\"\n              }\n            ],\n            \"styles\": [\"src/styles.css\"]\n          },\n          \"configurations\": {\n            \"production\": {\n              \"budgets\": [\n                {\n                  \"type\": \"initial\",\n                  \"maximumWarning\": \"500kB\",\n                  \"maximumError\": \"1MB\"\n                },\n                {\n                  \"type\": \"anyComponentStyle\",\n                  \"maximumWarning\": \"4kB\",\n                  \"maximumError\": \"8kB\"\n                }\n              ],\n              \"outputHashing\": \"all\"\n            },\n            \"development\": {\n              \"optimization\": false,\n              \"extractLicenses\": false,\n              \"sourceMap\": true\n            }\n          },\n          \"defaultConfiguration\": \"production\"\n        },\n        \"serve\": {\n          \"builder\": \"@angular/build:dev-server\",\n          \"configurations\": {\n            \"production\": {\n              \"buildTarget\": \"signal-input:build:production\"\n            },\n            \"development\": {\n              \"buildTarget\": \"signal-input:build:development\"\n            }\n          },\n          \"defaultConfiguration\": \"development\"\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "examples/angular/signal-input/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-angular-signal-input\",\n  \"version\": \"0.0.0\",\n  \"scripts\": {\n    \"ng\": \"ng\",\n    \"start\": \"ng serve\",\n    \"build\": \"ng build\",\n    \"watch\": \"ng build --watch --configuration development\",\n    \"lint\": \"eslint ./src\"\n  },\n  \"private\": true,\n  \"packageManager\": \"pnpm@10.28.2\",\n  \"dependencies\": {\n    \"@angular/cdk\": \"^21.1.1\",\n    \"@angular/common\": \"^21.1.1\",\n    \"@angular/compiler\": \"^21.1.1\",\n    \"@angular/core\": \"^21.1.1\",\n    \"@angular/forms\": \"^21.1.1\",\n    \"@angular/platform-browser\": \"^21.1.1\",\n    \"@angular/router\": \"^21.1.1\",\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"@tanstack/angular-table\": \"^9.0.0-alpha.17\",\n    \"rxjs\": \"~7.8.2\",\n    \"tslib\": \"^2.8.1\"\n  },\n  \"devDependencies\": {\n    \"@angular/build\": \"^21.1.2\",\n    \"@angular/cli\": \"^21.1.2\",\n    \"@angular/compiler-cli\": \"^21.1.1\",\n    \"typescript\": \"5.9.3\"\n  }\n}\n"
  },
  {
    "path": "examples/angular/signal-input/src/app/app.config.ts",
    "content": "import { provideBrowserGlobalErrorListeners } from '@angular/core'\nimport type { ApplicationConfig } from '@angular/core'\n\nexport const appConfig: ApplicationConfig = {\n  providers: [provideBrowserGlobalErrorListeners()],\n}\n"
  },
  {
    "path": "examples/angular/signal-input/src/app/app.html",
    "content": "<div class=\"p-2\">\n  <div class=\"h-2\"></div>\n  <app-person-table [data]=\"data()\" [(pagination)]=\"pagination\" />\n\n  <div>\n    <button class=\"border rounded p-2 mb-2\" (click)=\"refreshData()\">Refresh Data</button>\n\n    <button class=\"border rounded p-2 mb-2\" (click)=\"previousPage()\">Previous page</button>\n\n    <button class=\"border rounded p-2 mb-2\" (click)=\"nextPage()\">Next page</button>\n  </div>\n</div>\n"
  },
  {
    "path": "examples/angular/signal-input/src/app/app.ts",
    "content": "import { ChangeDetectionStrategy, Component, signal } from '@angular/core'\nimport { makeData } from './makeData'\nimport { PersonTable } from './person-table/person-table'\nimport type { PaginationState } from '@tanstack/angular-table'\n\n@Component({\n  selector: 'app-root',\n  imports: [PersonTable],\n  templateUrl: './app.html',\n  changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class App {\n  data = signal(makeData(10000))\n  pagination = signal<PaginationState>({\n    pageIndex: 0,\n    pageSize: 5,\n  })\n\n  refreshData() {\n    this.data.set(makeData(10000))\n  }\n\n  previousPage(): void {\n    this.pagination.update((pagination) => ({\n      ...pagination,\n      pageIndex: pagination.pageIndex - 1,\n    }))\n  }\n\n  nextPage(): void {\n    this.pagination.update((pagination) => ({\n      ...pagination,\n      pageIndex: pagination.pageIndex + 1,\n    }))\n  }\n}\n"
  },
  {
    "path": "examples/angular/signal-input/src/app/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  subRows?: Array<Person>\n}\n\nconst range = (len: number) => {\n  const arr: Array<number> = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (): Person => {\n  return {\n    firstName: faker.person.firstName(),\n    lastName: faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: faker.number.int(1000),\n    progress: faker.number.int(100),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0],\n  }\n}\n\nexport function makeData(...lens: Array<number>) {\n  const makeDataLevel = (depth = 0): Array<Person> => {\n    const len = lens[depth]\n    return range(len).map((d): Person => {\n      return {\n        ...newPerson(),\n        subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined,\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n"
  },
  {
    "path": "examples/angular/signal-input/src/app/person-table/person-table.html",
    "content": "<table>\n  <thead>\n    @for (headerGroup of table.getHeaderGroups(); track headerGroup.id) {\n      <tr>\n        @for (header of headerGroup.headers; track header.id) {\n          <th [attr.colSpan]=\"header.colSpan\">\n            @if (!header.isPlaceholder) {\n              <ng-container\n                *flexRender=\"header.column.columnDef.header; props: header.getContext(); let header\"\n              >\n                <span>{{ header }}</span>\n              </ng-container>\n            }\n          </th>\n        }\n      </tr>\n    }\n  </thead>\n  <tbody>\n    @for (row of table.getRowModel().rows; track row.id) {\n      <tr>\n        @for (cell of row.getVisibleCells(); track cell.id) {\n          <td>\n            <ng-container\n              *flexRender=\"cell.column.columnDef.cell; props: cell.getContext(); let cell\"\n            >\n              {{ cell }}\n            </ng-container>\n          </td>\n        }\n      </tr>\n    }\n  </tbody>\n</table>\n\n<div class=\"h-2\"></div>\n<div class=\"flex items-center gap-2\">\n  <button\n    class=\"border rounded p-1\"\n    (click)=\"table.setPageIndex(0)\"\n    [disabled]=\"!table.getCanPreviousPage()\"\n  >\n    <<\n  </button>\n  <button\n    class=\"border rounded p-1\"\n    (click)=\"table.previousPage()\"\n    [disabled]=\"!table.getCanPreviousPage()\"\n  >\n    <\n  </button>\n  <button\n    class=\"border rounded p-1\"\n    (click)=\"table.nextPage()\"\n    [disabled]=\"!table.getCanNextPage()\"\n  >\n    >\n  </button>\n  <button\n    class=\"border rounded p-1\"\n    (click)=\"table.setPageIndex(table.getPageCount() - 1)\"\n    [disabled]=\"!table.getCanNextPage()\"\n  >\n    >>\n  </button>\n  <span class=\"flex items-center gap-1\">\n    <div>Page</div>\n    <strong>\n      {{ table.store.state.pagination.pageIndex + 1 }} of\n      {{ table.getPageCount() }}\n    </strong>\n  </span>\n  <span class=\"flex items-center gap-1\">\n    | Go to page:\n    <input\n      type=\"number\"\n      [value]=\"table.store.state.pagination.pageIndex + 1\"\n      (input)=\"onPageInputChange($event)\"\n      class=\"border p-1 rounded w-16\"\n    />\n  </span>\n\n  <select [value]=\"table.store.state.pagination.pageSize\" (change)=\"onPageSizeChange($event)\">\n    @for (pageSize of [10, 20, 30, 40, 50]; track pageSize) {\n      <option [value]=\"pageSize\">Show {{ pageSize }}</option>\n    }\n  </select>\n</div>\n<div>{{ table.getRowModel().rows.length }} Rows</div>\n"
  },
  {
    "path": "examples/angular/signal-input/src/app/person-table/person-table.ts",
    "content": "import { ChangeDetectionStrategy, Component, input, model } from '@angular/core'\nimport {\n  FlexRender,\n  columnVisibilityFeature,\n  createPaginatedRowModel,\n  injectTable,\n  rowPaginationFeature,\n  tableFeatures,\n} from '@tanstack/angular-table'\nimport type { ColumnDef, PaginationState } from '@tanstack/angular-table'\nimport type { Person } from '../makeData'\n\nconst _features = tableFeatures({\n  rowPaginationFeature,\n  columnVisibilityFeature,\n})\n\n@Component({\n  selector: 'app-person-table',\n  templateUrl: 'person-table.html',\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  imports: [FlexRender],\n})\nexport class PersonTable {\n  readonly data = input.required<Array<Person>>()\n\n  readonly pagination = model.required<PaginationState>()\n\n  readonly columns: Array<ColumnDef<typeof _features, Person>> = [\n    {\n      accessorKey: 'firstName',\n      header: 'First Name',\n      cell: (info) => info.getValue(),\n    },\n    {\n      accessorFn: (row) => row.lastName,\n      id: 'lastName',\n      header: () => `Last Name`,\n      cell: (info) => info.getValue(),\n    },\n  ]\n\n  readonly table = injectTable(() => {\n    return {\n      _features,\n      _rowModels: {\n        paginatedRowModel: createPaginatedRowModel<typeof _features, Person>(),\n      },\n      data: this.data(),\n      columns: this.columns,\n      state: {\n        pagination: this.pagination(),\n      },\n      onPaginationChange: (updaterOrValue) => {\n        typeof updaterOrValue === 'function'\n          ? this.pagination.update(updaterOrValue)\n          : this.pagination.set(updaterOrValue)\n      },\n      debugTable: true,\n    }\n  })\n\n  onPageInputChange(event: any): void {\n    const page = event.target.value ? Number(event.target.value) - 1 : 0\n    this.table.setPageIndex(page)\n  }\n\n  onPageSizeChange(event: any) {\n    this.table.setPageSize(Number(event.target.value))\n  }\n}\n"
  },
  {
    "path": "examples/angular/signal-input/src/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"utf-8\" />\n    <title>Signal Input</title>\n    <base href=\"/\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n    <link rel=\"icon\" type=\"image/x-icon\" href=\"favicon.ico\" />\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n    <link href=\"https://fonts.googleapis.com/icon?family=Material+Icons+Sharp\" rel=\"stylesheet\" />\n  </head>\n  <body>\n    <app-root></app-root>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/angular/signal-input/src/main.ts",
    "content": "import { bootstrapApplication } from '@angular/platform-browser'\nimport { appConfig } from './app/app.config'\nimport { App } from './app/app'\n\nbootstrapApplication(App, appConfig).catch((err) => console.error(err))\n"
  },
  {
    "path": "examples/angular/signal-input/src/styles.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n"
  },
  {
    "path": "examples/angular/signal-input/tsconfig.app.json",
    "content": "/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */\n/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */\n{\n  \"extends\": \"./tsconfig.json\",\n  \"compilerOptions\": {\n    \"outDir\": \"./out-tsc/app\",\n    \"types\": []\n  },\n  \"include\": [\"src/**/*.ts\"],\n  \"exclude\": [\"src/**/*.spec.ts\"]\n}\n"
  },
  {
    "path": "examples/angular/signal-input/tsconfig.json",
    "content": "/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */\n/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */\n{\n  \"compileOnSave\": false,\n  \"compilerOptions\": {\n    \"strict\": true,\n    \"noImplicitOverride\": true,\n    \"noPropertyAccessFromIndexSignature\": true,\n    \"noImplicitReturns\": true,\n    \"noFallthroughCasesInSwitch\": true,\n    \"skipLibCheck\": true,\n    \"isolatedModules\": true,\n    \"experimentalDecorators\": true,\n    \"importHelpers\": true,\n    \"target\": \"ES2022\",\n    \"module\": \"preserve\"\n  },\n  \"angularCompilerOptions\": {\n    \"enableI18nLegacyMessageIdFormat\": false,\n    \"strictInjectionParameters\": true,\n    \"strictInputAccessModifiers\": true,\n    \"strictTemplates\": true\n  }\n}\n"
  },
  {
    "path": "examples/angular/sub-components/.gitignore",
    "content": "# See https://docs.github.com/get-started/getting-started-with-git/ignoring-files for more about ignoring files.\n\n# Compiled output\n/dist\n/tmp\n/out-tsc\n/bazel-out\n\n# Node\n/node_modules\nnpm-debug.log\nyarn-error.log\n\n# IDEs and editors\n.idea/\n.project\n.classpath\n.c9/\n*.launch\n.settings/\n*.sublime-workspace\n\n# Visual Studio Code\n.vscode/*\n!.vscode/settings.json\n!.vscode/tasks.json\n!.vscode/launch.json\n!.vscode/extensions.json\n!.vscode/mcp.json\n.history/*\n\n# Miscellaneous\n/.angular/cache\n.sass-cache/\n/connect.lock\n/coverage\n/libpeerconnection.log\ntestem.log\n/typings\n__screenshots__/\n\n# System files\n.DS_Store\nThumbs.db\n"
  },
  {
    "path": "examples/angular/sub-components/README.md",
    "content": "# Sub components\n\nThis project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 21.1.0.\n\n## Development server\n\nTo start a local development server, run:\n\n```bash\nng serve\n```\n\nOnce the server is running, open your browser and navigate to `http://localhost:4200/`. The application will automatically reload whenever you modify any of the source files.\n\n## Code scaffolding\n\nAngular CLI includes powerful code scaffolding tools. To generate a new component, run:\n\n```bash\nng generate component component-name\n```\n\nFor a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:\n\n```bash\nng generate --help\n```\n\n## Building\n\nTo build the project run:\n\n```bash\nng build\n```\n\nThis will compile your project and store the build artifacts in the `dist/` directory. By default, the production build optimizes your application for performance and speed.\n\n## Running unit tests\n\nTo execute unit tests with the [Vitest](https://vitest.dev/) test runner, use the following command:\n\n```bash\nng test\n```\n\n## Running end-to-end tests\n\nFor end-to-end (e2e) testing, run:\n\n```bash\nng e2e\n```\n\nAngular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.\n\n## Additional Resources\n\nFor more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.\n"
  },
  {
    "path": "examples/angular/sub-components/angular.json",
    "content": "{\n  \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\n  \"version\": 1,\n  \"cli\": {\n    \"packageManager\": \"pnpm\",\n    \"analytics\": false,\n    \"cache\": {\n      \"enabled\": false\n    }\n  },\n  \"newProjectRoot\": \"projects\",\n  \"projects\": {\n    \"sub-components\": {\n      \"projectType\": \"application\",\n      \"schematics\": {\n        \"@schematics/angular:component\": {\n          \"inlineTemplate\": true,\n          \"inlineStyle\": true,\n          \"skipTests\": true\n        },\n        \"@schematics/angular:class\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:directive\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:guard\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:interceptor\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:pipe\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:resolver\": {\n          \"skipTests\": true\n        },\n        \"@schematics/angular:service\": {\n          \"skipTests\": true\n        }\n      },\n      \"root\": \"\",\n      \"sourceRoot\": \"src\",\n      \"prefix\": \"app\",\n      \"architect\": {\n        \"build\": {\n          \"builder\": \"@angular/build:application\",\n          \"options\": {\n            \"browser\": \"src/main.ts\",\n            \"tsConfig\": \"tsconfig.app.json\",\n            \"assets\": [\n              {\n                \"glob\": \"**/*\",\n                \"input\": \"public\"\n              }\n            ],\n            \"styles\": [\"src/styles.css\"]\n          },\n          \"configurations\": {\n            \"production\": {\n              \"budgets\": [\n                {\n                  \"type\": \"initial\",\n                  \"maximumWarning\": \"500kB\",\n                  \"maximumError\": \"1MB\"\n                },\n                {\n                  \"type\": \"anyComponentStyle\",\n                  \"maximumWarning\": \"4kB\",\n                  \"maximumError\": \"8kB\"\n                }\n              ],\n              \"outputHashing\": \"all\"\n            },\n            \"development\": {\n              \"optimization\": false,\n              \"extractLicenses\": false,\n              \"sourceMap\": true\n            }\n          },\n          \"defaultConfiguration\": \"production\"\n        },\n        \"serve\": {\n          \"builder\": \"@angular/build:dev-server\",\n          \"configurations\": {\n            \"production\": {\n              \"buildTarget\": \"sub-components:build:production\"\n            },\n            \"development\": {\n              \"buildTarget\": \"sub-components:build:development\"\n            }\n          },\n          \"defaultConfiguration\": \"development\"\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "examples/angular/sub-components/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-angular-sub-components\",\n  \"version\": \"0.0.0\",\n  \"scripts\": {\n    \"ng\": \"ng\",\n    \"start\": \"ng serve\",\n    \"build\": \"ng build\",\n    \"watch\": \"ng build --watch --configuration development\",\n    \"lint\": \"eslint ./src\"\n  },\n  \"private\": true,\n  \"packageManager\": \"pnpm@10.28.2\",\n  \"dependencies\": {\n    \"@angular/common\": \"^21.1.1\",\n    \"@angular/compiler\": \"^21.1.1\",\n    \"@angular/core\": \"^21.1.1\",\n    \"@angular/forms\": \"^21.1.1\",\n    \"@angular/platform-browser\": \"^21.1.1\",\n    \"@angular/router\": \"^21.1.1\",\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"@tanstack/angular-table\": \"^9.0.0-alpha.17\",\n    \"rxjs\": \"~7.8.2\",\n    \"tslib\": \"^2.8.1\"\n  },\n  \"devDependencies\": {\n    \"@angular/build\": \"^21.1.2\",\n    \"@angular/cli\": \"^21.1.2\",\n    \"@angular/compiler-cli\": \"^21.1.1\",\n    \"typescript\": \"5.9.3\"\n  }\n}\n"
  },
  {
    "path": "examples/angular/sub-components/src/app/app.config.ts",
    "content": "import type { ApplicationConfig } from '@angular/core'\n\nexport const appConfig: ApplicationConfig = {\n  providers: [],\n}\n"
  },
  {
    "path": "examples/angular/sub-components/src/app/app.html",
    "content": "<div class=\"p-2\">\n  <div class=\"overflow-x-auto\">\n    <table>\n      <thead>\n        @for (headerGroup of table.getHeaderGroups(); track headerGroup.id) {\n          <tr>\n            @for (header of headerGroup.headers; track header.id) {\n              <th [colSpan]=\"header.colSpan\">\n                @if (!header.isPlaceholder) {\n                  <ng-container *flexRenderHeader=\"header; let header\">\n                    <div [innerHTML]=\"header\"></div>\n                  </ng-container>\n                }\n              </th>\n            }\n          </tr>\n        }\n      </thead>\n      <tbody>\n        @for (row of table.getRowModel().rows; track row.id) {\n          <!-- first row is a normal row -->\n          <tr>\n            @for (cell of row.getVisibleCells(); track cell.id) {\n              <td>\n                <ng-container *flexRenderCell=\"cell; let cell\">\n                  <div [innerHTML]=\"cell\"></div>\n                </ng-container>\n              </td>\n            }\n          </tr>\n\n          @if (row.getIsExpanded()) {\n            <tr>\n              <!-- 2nd row is a custom 1 cell row -->\n              <td [colSpan]=\"row.getVisibleCells().length\">\n                <app-sub [row]=\"row\" />\n              </td>\n            </tr>\n          }\n        }\n      </tbody>\n    </table>\n  </div>\n</div>\n\n<ng-template #subComponentTemplate let-row>\n  <pre [style.font-size.px]=\"10\" class=\"bg-gray-100\">\n    <code>\n      {{ row.original | json }}\n    </code>\n  </pre>\n</ng-template>\n"
  },
  {
    "path": "examples/angular/sub-components/src/app/app.ts",
    "content": "import { ChangeDetectionStrategy, Component, signal } from '@angular/core'\nimport {\n  FlexRender,\n  columnVisibilityFeature,\n  createExpandedRowModel,\n  flexRenderComponent,\n  injectTable,\n  rowExpandingFeature,\n  tableFeatures,\n} from '@tanstack/angular-table'\nimport { ReactiveFormsModule } from '@angular/forms'\nimport { JsonPipe } from '@angular/common'\nimport { makeData } from './makeData'\nimport { ExpandableCell, ExpanderCell } from './expandable-cell'\nimport { SubComponent } from './sub-component/sub-component'\nimport type { Person } from './makeData'\nimport type { ColumnDef, ExpandedState } from '@tanstack/angular-table'\n\nconst _features = tableFeatures({\n  rowExpandingFeature,\n  columnVisibilityFeature,\n})\n\nconst columns: Array<ColumnDef<typeof _features, Person>> = [\n  {\n    header: 'Name',\n    footer: (props) => props.column.id,\n    columns: [\n      {\n        id: 'expander',\n        header: () => null,\n        cell: ({ row }) => {\n          if (!row.getCanExpand()) {\n            return '🔵'\n          }\n          return flexRenderComponent(ExpanderCell, {\n            inputs: {\n              expanded: row.getIsExpanded(),\n            },\n            outputs: {\n              click: row.getToggleExpandedHandler(),\n            },\n          })\n        },\n      },\n      {\n        accessorKey: 'firstName',\n        header: 'First Name',\n        cell: () => flexRenderComponent(ExpandableCell),\n        footer: (props) => props.column.id,\n      },\n      {\n        accessorFn: (row) => row.lastName,\n        id: 'lastName',\n        cell: (info) => info.getValue(),\n        header: () => 'Last Name',\n        footer: (props) => props.column.id,\n      },\n    ],\n  },\n  {\n    header: 'Info',\n    footer: (props) => props.column.id,\n    columns: [\n      {\n        accessorKey: 'age',\n        header: () => 'Age',\n        footer: (props) => props.column.id,\n      },\n      {\n        header: 'More Info',\n        columns: [\n          {\n            accessorKey: 'visits',\n            header: () => 'Visits',\n            footer: (props) => props.column.id,\n          },\n          {\n            accessorKey: 'status',\n            header: 'Status',\n            footer: (props) => props.column.id,\n          },\n          {\n            accessorKey: 'progress',\n            header: 'Profile Progress',\n            footer: (props) => props.column.id,\n          },\n        ],\n      },\n    ],\n  },\n]\n\n@Component({\n  selector: 'app-root',\n  imports: [FlexRender, ReactiveFormsModule, JsonPipe, SubComponent],\n  templateUrl: './app.html',\n  changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class App {\n  readonly data = signal<Array<Person>>(makeData(10))\n  readonly expanded = signal<ExpandedState>({})\n\n  readonly table = injectTable(() => ({\n    _features,\n    _rowModels: {\n      expandedRowModel: createExpandedRowModel<typeof _features, Person>(),\n    },\n    data: this.data(),\n    columns,\n    state: {\n      expanded: this.expanded(),\n    },\n    onExpandedChange: (updater) =>\n      typeof updater === 'function'\n        ? this.expanded.update(updater)\n        : this.expanded.set(updater),\n    getRowCanExpand: () => true,\n  }))\n}\n"
  },
  {
    "path": "examples/angular/sub-components/src/app/expandable-cell.ts",
    "content": "import {\n  ChangeDetectionStrategy,\n  Component,\n  input,\n  output,\n} from '@angular/core'\nimport { injectFlexRenderContext } from '@tanstack/angular-table'\nimport type { CellContext, RowData } from '@tanstack/angular-table'\n\n@Component({\n  standalone: true,\n  template: `\n    <button (click)=\"click.emit($event)\">\n      {{ expanded() ? '👇' : '👉' }}\n    </button>\n  `,\n  changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ExpanderCell {\n  readonly expanded = input.required<boolean>()\n\n  readonly click = output<MouseEvent>()\n}\n\n@Component({\n  standalone: true,\n  template: `\n    <div [style.--depth]=\"row.depth\">\n      {{ context.getValue() }}\n    </div>\n  `,\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  styles: `\n    :host {\n      > div {\n        padding-left: calc(2rem * var(--depth, 1));\n      }\n    }\n  `,\n})\nexport class ExpandableCell<T extends RowData> {\n  readonly context = injectFlexRenderContext<CellContext<{}, T, unknown>>()\n\n  get row() {\n    return this.context.row\n  }\n}\n"
  },
  {
    "path": "examples/angular/sub-components/src/app/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  subRows?: Array<Person>\n}\n\nconst range = (len: number) => {\n  const arr: Array<number> = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (): Person => {\n  return {\n    firstName: faker.person.firstName(),\n    lastName: faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: faker.number.int(1000),\n    progress: faker.number.int(100),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0],\n  }\n}\n\nexport function makeData(...lens: Array<number>) {\n  const makeDataLevel = (depth = 0): Array<Person> => {\n    const len = lens[depth]\n    return range(len).map((d): Person => {\n      return {\n        ...newPerson(),\n        subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined,\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n"
  },
  {
    "path": "examples/angular/sub-components/src/app/sub-component/sub-component.ts",
    "content": "import { Component, input } from '@angular/core'\nimport { JsonPipe } from '@angular/common'\nimport type { Row } from '@tanstack/angular-table'\n\n@Component({\n  selector: 'app-sub',\n  template: `\n    <pre [style.font-size.px]=\"10\" class=\"bg-gray-100\">\n    <code>\n      {{ row().original | json }}\n    </code>\n  </pre>\n  `,\n  imports: [JsonPipe],\n})\nexport class SubComponent {\n  readonly row = input.required<Row<any, any>>()\n}\n"
  },
  {
    "path": "examples/angular/sub-components/src/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"utf-8\" />\n    <title>Sub componentss</title>\n    <base href=\"/\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n    <link rel=\"icon\" type=\"image/x-icon\" href=\"favicon.ico\" />\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n  </head>\n  <body>\n    <app-root></app-root>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/angular/sub-components/src/main.ts",
    "content": "import { bootstrapApplication } from '@angular/platform-browser'\nimport { appConfig } from './app/app.config'\nimport { App } from './app/app'\n\nbootstrapApplication(App, appConfig).catch((err) => console.error(err))\n"
  },
  {
    "path": "examples/angular/sub-components/src/styles.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n"
  },
  {
    "path": "examples/angular/sub-components/tsconfig.app.json",
    "content": "/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */\n/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */\n{\n  \"extends\": \"./tsconfig.json\",\n  \"compilerOptions\": {\n    \"outDir\": \"./out-tsc/app\",\n    \"types\": []\n  },\n  \"include\": [\"src/**/*.ts\"],\n  \"exclude\": [\"src/**/*.spec.ts\"]\n}\n"
  },
  {
    "path": "examples/angular/sub-components/tsconfig.json",
    "content": "/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */\n/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */\n{\n  \"compileOnSave\": false,\n  \"compilerOptions\": {\n    \"strict\": true,\n    \"noImplicitOverride\": true,\n    \"noPropertyAccessFromIndexSignature\": true,\n    \"noImplicitReturns\": true,\n    \"noFallthroughCasesInSwitch\": true,\n    \"skipLibCheck\": true,\n    \"isolatedModules\": true,\n    \"experimentalDecorators\": true,\n    \"importHelpers\": true,\n    \"target\": \"ES2022\",\n    \"module\": \"preserve\"\n  },\n  \"angularCompilerOptions\": {\n    \"enableI18nLegacyMessageIdFormat\": false,\n    \"strictInjectionParameters\": true,\n    \"strictInputAccessModifiers\": true,\n    \"strictTemplates\": true\n  }\n}\n"
  },
  {
    "path": "examples/lit/basic/.gitignore",
    "content": "node_modules\n.DS_Store\ndist\ndist-ssr\n*.local\n"
  },
  {
    "path": "examples/lit/basic/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run start` or `yarn start`\n"
  },
  {
    "path": "examples/lit/basic/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite App</title>\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n  </head>\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.ts\"></script>\n    <lit-table-example></lit-table-example>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/lit/basic/package.json",
    "content": "{\n  \"name\": \"tanstack-lit-table-example-basic\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"start\": \"vite\",\n    \"lint\": \"eslint ./src\"\n  },\n  \"dependencies\": {\n    \"@tanstack/lit-table\": \"^9.0.0-alpha.10\",\n    \"@twind/core\": \"^1.1.3\",\n    \"@twind/preset-autoprefix\": \"^1.0.7\",\n    \"@twind/preset-tailwind\": \"^1.1.4\",\n    \"@twind/with-web-components\": \"^1.1.3\",\n    \"lit\": \"^3.3.2\"\n  },\n  \"devDependencies\": {\n    \"@rollup/plugin-replace\": \"^6.0.3\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\"\n  }\n}\n"
  },
  {
    "path": "examples/lit/basic/src/main.ts",
    "content": "import { customElement } from 'lit/decorators.js'\nimport { LitElement, html } from 'lit'\nimport { repeat } from 'lit/directives/repeat.js'\nimport {\n  ColumnDef,\n  TableController,\n  flexRender,\n  tableFeatures,\n} from '@tanstack/lit-table'\nimport install from '@twind/with-web-components'\nimport config from '../twind.config'\n\nconst withTwind = install(config)\n\n// 1. Define what the shape of your data will be for each row\ntype Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  status: string\n  progress: number\n}\n\n// 3. New in V9! Tell the table which features and row models we want to use. In this case, this will be a basic table with no additional features\nconst _features = tableFeatures({})\n\n// const columnHelper = createColumnHelper<typeof _features, Person>()\n\n// 4. Define the columns for your table. This uses the new `ColumnDef` type to define columns. Alternatively, check out the createTableHelper/createColumnHelper util for an even more type-safe way to define columns.\nconst columns: Array<ColumnDef<typeof _features, Person>> = [\n  {\n    accessorKey: 'firstName', // accessorKey method (most common for simple use-cases)\n    header: 'First Name',\n    cell: (info) => info.getValue(),\n  },\n  {\n    accessorFn: (row) => row.lastName, // accessorFn used (alternative) along with a custom id\n    id: 'lastName',\n    header: () => html`<span>Last Name</span>`,\n    cell: (info) => html`<i>${info.getValue<string>()}</i>`,\n  },\n  {\n    accessorFn: (row) => Number(row.age), // accessorFn used to transform the data\n    id: 'age',\n    header: () => 'Age',\n    cell: (info) => info.renderValue(),\n  },\n  {\n    accessorKey: 'visits',\n    header: () => html`<span>Visits</span>`,\n  },\n  {\n    accessorKey: 'status',\n    header: 'Status',\n  },\n  {\n    accessorKey: 'progress',\n    header: 'Profile Progress',\n  },\n]\n\nconst data: Array<Person> = [\n  {\n    firstName: 'tanner',\n    lastName: 'linsley',\n    age: 24,\n    visits: 100,\n    status: 'In Relationship',\n    progress: 50,\n  },\n  {\n    firstName: 'tandy',\n    lastName: 'miller',\n    age: 40,\n    visits: 40,\n    status: 'Single',\n    progress: 80,\n  },\n  {\n    firstName: 'joe',\n    lastName: 'dirte',\n    age: 45,\n    visits: 20,\n    status: 'Complicated',\n    progress: 10,\n  },\n  {\n    firstName: 'mor',\n    lastName: 'kadosh',\n    age: 31,\n    visits: 30,\n    status: 'In Relationship',\n    progress: 90,\n  },\n]\n\n@customElement('lit-table-example')\n@withTwind\nclass LitTableExample extends LitElement {\n  private tableController = new TableController<typeof _features, Person>(this)\n\n  protected render(): unknown {\n    const table = this.tableController.table(\n      {\n        _features, // new required option in V9. Tell the table which features you are importing and using (better tree-shaking)\n        _rowModels: {}, // `Core` row model is now included by default, but you can still override it here\n        columns,\n        data,\n        // add additional table options here\n        debugTable: true,\n      },\n      () => ({}), // selector - empty since we don't need any state\n    )\n\n    return html`\n      <table>\n        <thead>\n          ${repeat(\n            table.getHeaderGroups(),\n            (headerGroup) => headerGroup.id,\n            (headerGroup) =>\n              html`${repeat(\n                headerGroup.headers,\n                (header) => header.id,\n                (header) =>\n                  html` <th>\n                    ${header.isPlaceholder\n                      ? null\n                      : flexRender(\n                          header.column.columnDef.header,\n                          header.getContext(),\n                        )}\n                  </th>`,\n              )}`,\n          )}\n        </thead>\n        <tbody>\n          ${repeat(\n            table.getRowModel().rows,\n            (row) => row.id,\n            (row) => html`\n              <tr>\n                ${repeat(\n                  row.getAllCells(),\n                  (cell) => cell.id,\n                  (cell) =>\n                    html` <td>\n                      ${flexRender(\n                        cell.column.columnDef.cell,\n                        cell.getContext(),\n                      )}\n                    </td>`,\n                )}\n              </tr>\n            `,\n          )}\n        </tbody>\n        <tfoot>\n          ${repeat(\n            table.getFooterGroups(),\n            (footerGroup) => footerGroup.id,\n            (footerGroup) => html`\n              <tr>\n                ${repeat(\n                  footerGroup.headers,\n                  (header) => header.id,\n                  (header) => html`\n                    <th>\n                      ${header.isPlaceholder\n                        ? null\n                        : flexRender(\n                            header.column.columnDef.footer,\n                            header.getContext(),\n                          )}\n                    </th>\n                  `,\n                )}\n              </tr>\n            `,\n          )}\n        </tfoot>\n      </table>\n      <style>\n        * {\n          font-family: sans-serif;\n          font-size: 14px;\n          box-sizing: border-box;\n        }\n\n        table {\n          border: 1px solid lightgray;\n          border-collapse: collapse;\n        }\n\n        tbody {\n          border-bottom: 1px solid lightgray;\n        }\n\n        th {\n          border-bottom: 1px solid lightgray;\n          border-right: 1px solid lightgray;\n          padding: 2px 4px;\n        }\n\n        tfoot {\n          color: gray;\n        }\n\n        tfoot th {\n          font-weight: normal;\n        }\n      </style>\n    `\n  }\n}\n"
  },
  {
    "path": "examples/lit/basic/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"module\": \"ESNext\",\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"emitDecoratorMetadata\": true,\n    \"noEmit\": true,\n    \"jsx\": \"react-jsx\",\n    \"experimentalDecorators\": true,\n    \"useDefineForClassFields\": false,\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": false,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "examples/lit/basic/twind.config.ts",
    "content": "import { defineConfig } from '@twind/core'\nimport presetAutoprefix from '@twind/preset-autoprefix'\nimport presetTailwind from '@twind/preset-tailwind/base'\n\nexport default defineConfig({\n  presets: [presetAutoprefix(), presetTailwind()],\n})\n"
  },
  {
    "path": "examples/lit/basic/vite.config.js",
    "content": "import { defineConfig } from 'vite'\nimport rollupReplace from '@rollup/plugin-replace'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [\n    rollupReplace({\n      preventAssignment: true,\n      values: {\n        __DEV__: JSON.stringify(true),\n        'process.env.NODE_ENV': JSON.stringify('development'),\n      },\n    }),\n  ],\n})\n"
  },
  {
    "path": "examples/lit/column-sizing/.gitignore",
    "content": "node_modules\n.DS_Store\ndist\ndist-ssr\n*.local\n"
  },
  {
    "path": "examples/lit/column-sizing/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run start` or `yarn start`\n"
  },
  {
    "path": "examples/lit/column-sizing/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite App</title>\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n  </head>\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.ts\"></script>\n    <lit-table-example></lit-table-example>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/lit/column-sizing/package.json",
    "content": "{\n  \"name\": \"tanstack-lit-table-example-column-sizing\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"start\": \"vite\",\n    \"lint\": \"eslint ./src\"\n  },\n  \"dependencies\": {\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"@tanstack/lit-table\": \"^9.0.0-alpha.10\",\n    \"lit\": \"^3.3.2\"\n  },\n  \"devDependencies\": {\n    \"@rollup/plugin-replace\": \"^6.0.3\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\"\n  }\n}\n"
  },
  {
    "path": "examples/lit/column-sizing/src/main.ts",
    "content": "import { customElement } from 'lit/decorators.js'\nimport { LitElement, html } from 'lit'\nimport { repeat } from 'lit/directives/repeat.js'\nimport {\n  ColumnDef,\n  TableController,\n  columnResizingFeature,\n  columnSizingFeature,\n  flexRender,\n  tableFeatures,\n} from '@tanstack/lit-table'\nimport { Person, makeData } from './makeData'\n\nconst _features = tableFeatures({\n  columnSizingFeature,\n  columnResizingFeature,\n})\n\nconst columns: Array<ColumnDef<typeof _features, Person>> = [\n  {\n    accessorKey: 'firstName',\n    cell: (info) => info.getValue(),\n  },\n  {\n    accessorFn: (row) => row.lastName,\n    id: 'lastName',\n    cell: (info) => info.getValue(),\n    header: () => html`<span>Last Name</span>`,\n  },\n  {\n    accessorKey: 'age',\n    header: () => 'Age',\n  },\n  {\n    accessorKey: 'visits',\n    header: () => html`<span>Visits</span>`,\n  },\n  {\n    accessorKey: 'status',\n    header: 'Status',\n  },\n  {\n    accessorKey: 'progress',\n    header: 'Profile Progress',\n  },\n  {\n    accessorKey: 'rank',\n    header: 'Rank',\n  },\n  {\n    accessorKey: 'createdAt',\n    header: 'Created At',\n  },\n]\n\nconst data: Array<Person> = makeData(1000)\n\n@customElement('lit-table-example')\nclass LitTableExample extends LitElement {\n  private tableController = new TableController<typeof _features, Person>(this)\n\n  protected render() {\n    const table = this.tableController.table(\n      {\n        _features,\n        _rowModels: {},\n        data,\n        columns,\n        columnResizeMode: 'onChange',\n        columnResizeDirection: 'ltr',\n        debugTable: true,\n        debugHeaders: true,\n        debugColumns: true,\n      },\n      (state) => ({\n        columnSizing: state.columnSizing,\n        columnResizing: state.columnResizing,\n      }),\n    )\n\n    return html`\n      <table style=\"width: ${table.getCenterTotalSize()}px\">\n        <thead>\n          ${repeat(\n            table.getHeaderGroups(),\n            (headerGroup) => headerGroup.id,\n            (headerGroup) => html`\n              <tr>\n                ${headerGroup.headers.map(\n                  (header) => html`\n                    <th\n                      colspan=\"${header.colSpan}\"\n                      style=\"width: ${header.getSize()}px\"\n                    >\n                      ${flexRender(\n                        header.column.columnDef.header,\n                        header.getContext(),\n                      )}\n                      ${header.isPlaceholder\n                        ? null\n                        : html`<div\n                            class=\"resizer ${table.options\n                              .columnResizeDirection} ${header.column.getIsResizing()\n                              ? 'is-resizing'\n                              : ''}\"\n                            @dblclick=\"${() => header.column.resetSize()}\"\n                            @mousedown=\"${header.getResizeHandler()}\"\n                            @touchstart=\"${header.getResizeHandler()}\"\n                          />`}\n                    </th>\n                  `,\n                )}\n              </tr>\n            `,\n          )}\n        </thead>\n        <tbody>\n          ${table\n            .getRowModel()\n            .rows.slice(0, 10)\n            .map(\n              (row) => html`\n                <tr>\n                  ${row\n                    .getAllCells()\n                    .map(\n                      (cell) => html`\n                        <td>\n                          ${flexRender(\n                            cell.column.columnDef.cell,\n                            cell.getContext(),\n                          )}\n                        </td>\n                      `,\n                    )}\n                </tr>\n              `,\n            )}\n        </tbody>\n      </table>\n      <pre>${JSON.stringify(table.state, null, 2)}</pre>\n      <style>\n        * {\n          font-family: sans-serif;\n          font-size: 14px;\n          box-sizing: border-box;\n        }\n\n        table {\n          border: 1px solid lightgray;\n          border-collapse: collapse;\n        }\n\n        tbody {\n          border-bottom: 1px solid lightgray;\n        }\n\n        th,\n        td {\n          border-bottom: 1px solid lightgray;\n          border-right: 1px solid lightgray;\n          padding: 2px 4px;\n        }\n\n        th {\n          padding: 2px 4px;\n          position: relative;\n          font-weight: bold;\n          text-align: center;\n          height: 30px;\n        }\n\n        tfoot {\n          color: gray;\n        }\n\n        tfoot th {\n          font-weight: normal;\n        }\n        .resizer {\n          position: absolute;\n          top: 0;\n          height: 100%;\n          width: 5px;\n          background: rgba(0, 0, 0, 0.5);\n          cursor: col-resize;\n          user-select: none;\n          touch-action: none;\n        }\n\n        .resizer.ltr {\n          right: 0;\n        }\n\n        .resizer.rtl {\n          left: 0;\n        }\n\n        .resizer.is-resizing {\n          background: blue;\n          opacity: 1;\n        }\n\n        @media (hover: hover) {\n          .resizer {\n            opacity: 0;\n          }\n\n          *:hover > .resizer {\n            opacity: 1;\n          }\n        }\n      </style>\n    `\n  }\n}\n"
  },
  {
    "path": "examples/lit/column-sizing/src/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = {\n  firstName: string\n  lastName: string | undefined\n  age: number\n  visits: number | undefined\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  rank: number\n  createdAt: Date\n  subRows?: Array<Person>\n}\n\nconst range = (len: number) => {\n  const arr: Array<number> = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (): Person => {\n  return {\n    firstName: faker.person.firstName(),\n    lastName: Math.random() < 0.1 ? undefined : faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: Math.random() < 0.1 ? undefined : faker.number.int(1000),\n    progress: faker.number.int(100),\n    createdAt: faker.date.anytime(),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0],\n    rank: faker.number.int(100),\n  }\n}\n\nexport function makeData(...lens: Array<number>) {\n  const makeDataLevel = (depth = 0): Array<Person> => {\n    const len = lens[depth]\n    return range(len).map((_d): Person => {\n      return {\n        ...newPerson(),\n        subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined,\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n"
  },
  {
    "path": "examples/lit/column-sizing/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"module\": \"ESNext\",\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"experimentalDecorators\": true,\n    \"emitDecoratorMetadata\": true,\n    \"useDefineForClassFields\": false,\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": false,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "examples/lit/filters/.gitignore",
    "content": "node_modules\n.DS_Store\ndist\ndist-ssr\n*.local\n"
  },
  {
    "path": "examples/lit/filters/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run start` or `yarn start`\n"
  },
  {
    "path": "examples/lit/filters/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite App</title>\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n  </head>\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.ts\"></script>\n    <lit-table-example></lit-table-example>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/lit/filters/package.json",
    "content": "{\n  \"name\": \"tanstack-lit-table-example-filters\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"start\": \"vite\",\n    \"lint\": \"eslint ./src\"\n  },\n  \"dependencies\": {\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"@tanstack/lit-table\": \"^9.0.0-alpha.10\",\n    \"lit\": \"^3.3.2\"\n  },\n  \"devDependencies\": {\n    \"@rollup/plugin-replace\": \"^6.0.3\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\"\n  }\n}\n"
  },
  {
    "path": "examples/lit/filters/src/main.ts",
    "content": "import { customElement, property } from 'lit/decorators.js'\nimport { LitElement, html } from 'lit'\nimport { repeat } from 'lit/directives/repeat.js'\nimport {\n  TableController,\n  columnFilteringFeature,\n  createFilteredRowModel,\n  createPaginatedRowModel,\n  createSortedRowModel,\n  filterFns,\n  flexRender,\n  rowPaginationFeature,\n  rowSortingFeature,\n  sortFns,\n  tableFeatures,\n} from '@tanstack/lit-table'\nimport { makeData } from './makeData'\nimport type {\n  CellData,\n  Column,\n  ColumnDef,\n  RowData,\n  TableFeatures,\n} from '@tanstack/lit-table'\nimport type { Person } from './makeData'\n\nconst _features = tableFeatures({\n  columnFilteringFeature,\n  rowPaginationFeature,\n  rowSortingFeature,\n})\n\nconst columns: Array<ColumnDef<typeof _features, Person>> = [\n  {\n    accessorKey: 'firstName',\n    cell: (info) => info.getValue(),\n  },\n  {\n    accessorFn: (row) => row.lastName,\n    id: 'lastName',\n    cell: (info) => info.getValue(),\n    header: () => html`<span>Last Name</span>`,\n  },\n  {\n    accessorFn: (row) => `${row.firstName} ${row.lastName}`,\n    id: 'fullName',\n    header: 'Full Name',\n    cell: (info) => info.getValue(),\n  },\n  {\n    accessorKey: 'age',\n    header: () => 'Age',\n    meta: {\n      filterVariant: 'range',\n    },\n  },\n  {\n    accessorKey: 'visits',\n    header: () => html`<span>Visits</span>`,\n    meta: {\n      filterVariant: 'range',\n    },\n  },\n  {\n    accessorKey: 'status',\n    header: 'Status',\n    meta: {\n      filterVariant: 'select',\n    },\n  },\n  {\n    accessorKey: 'progress',\n    header: 'Profile Progress',\n    meta: {\n      filterVariant: 'range',\n    },\n  },\n]\n\ndeclare module '@tanstack/lit-table' {\n  // allows us to define custom properties for our columns\n  interface ColumnMeta<\n    TFeatures extends TableFeatures,\n    TData extends RowData,\n    TValue extends CellData = CellData,\n  > {\n    filterVariant?: 'text' | 'range' | 'select'\n  }\n}\n\nconst data = makeData(50_000)\n\n@customElement('column-filter')\nclass ColumnFilter extends LitElement {\n  @property()\n  private column!: Column<typeof _features, Person>\n\n  private onChange(evt: InputEvent) {\n    this.column.setFilterValue((evt.target as HTMLInputElement).value)\n  }\n\n  render() {\n    const { filterVariant } = this.column.columnDef.meta ?? {}\n    const columnFilterValue = this.column.getFilterValue()\n\n    switch (filterVariant) {\n      case 'select':\n        return html` <select\n          @change=${(e: Event) =>\n            this.column.setFilterValue((e.target as HTMLSelectElement).value)}\n        >\n          <option value=\"\">All</option>\n          <option value=\"complicated\">complicated</option>\n          <option value=\"relationship\">relationship</option>\n          <option value=\"single\">single</option>\n        </select>`\n      case 'range':\n        return html`\n          <div style=\"display:flex;gap:2px\">\n            <input\n              type=\"number\"\n              placeholder=\"Min\"\n              @change=\"${(e: Event) =>\n                this.column.setFilterValue((old: [number, number]) => [\n                  parseInt((e.target as HTMLInputElement).value, 10),\n                  old[1],\n                ])}\"\n              value=${(\n                columnFilterValue as [number, number] | undefined\n              )?.[0] ?? ''}\n            />\n            <input\n              type=\"number\"\n              placeholder=\"Max\"\n              @change=\"${(e: Event) =>\n                this.column.setFilterValue((old: [number, number]) => [\n                  parseInt((e.target as HTMLInputElement).value, 10),\n                  old[0],\n                ])}\"\n              value=${(\n                columnFilterValue as [number, number] | undefined\n              )?.[1] ?? ''}\n            />\n          </div>\n        `\n      default:\n        return html`<input @input=${this.onChange} />`\n    }\n    return null\n  }\n}\n\n@customElement('lit-table-example')\nclass LitTableExample extends LitElement {\n  private tableController = new TableController<typeof _features, Person>(this)\n\n  protected render() {\n    const table = this.tableController.table(\n      {\n        _features,\n        _rowModels: {\n          filteredRowModel: createFilteredRowModel(filterFns),\n          paginatedRowModel: createPaginatedRowModel(),\n          sortedRowModel: createSortedRowModel(sortFns),\n        },\n        data,\n        columns,\n        debugTable: true,\n        debugHeaders: true,\n        debugColumns: false,\n      },\n      (state) => ({ columnFilters: state.columnFilters }),\n    )\n\n    return html`\n      <table>\n        <thead>\n          ${repeat(\n            table.getHeaderGroups(),\n            (headerGroup) => headerGroup.id,\n            (headerGroup) => html`\n              <tr>\n                ${repeat(\n                  headerGroup.headers,\n                  (header) => header.id,\n                  (header) => html`\n                    <th colspan=\"${header.colSpan}\">\n                      ${header.isPlaceholder\n                        ? null\n                        : html`<div\n                              title=${header.column.getCanSort()\n                                ? header.column.getNextSortingOrder() === 'asc'\n                                  ? 'Sort ascending'\n                                  : header.column.getNextSortingOrder() ===\n                                      'desc'\n                                    ? 'Sort descending'\n                                    : 'Clear sort'\n                                : undefined}\n                              @click=\"${header.column.getToggleSortingHandler()}\"\n                              style=\"cursor: ${header.column.getCanSort()\n                                ? 'pointer'\n                                : 'not-allowed'}\"\n                            >\n                              ${flexRender(\n                                header.column.columnDef.header,\n                                header.getContext(),\n                              )}\n                              ${{ asc: ' 🔼', desc: ' 🔽' }[\n                                header.column.getIsSorted() as string\n                              ] ?? null}\n                            </div>\n                            ${header.column.getCanFilter()\n                              ? html` <div>\n                                  <column-filter\n                                    .column=\"${header.column}\"\n                                  ></column-filter>\n                                </div>`\n                              : null} `}\n                    </th>\n                  `,\n                )}\n              </tr>\n            `,\n          )}\n        </thead>\n        <tbody>\n          ${table\n            .getRowModel()\n            .rows.slice(0, 10)\n            .map(\n              (row) => html`\n                <tr>\n                  ${row\n                    .getAllCells()\n                    .map(\n                      (cell) => html`\n                        <td>\n                          ${flexRender(\n                            cell.column.columnDef.cell,\n                            cell.getContext(),\n                          )}\n                        </td>\n                      `,\n                    )}\n                </tr>\n              `,\n            )}\n        </tbody>\n      </table>\n      <div class=\"page-controls\">\n        <button\n          @click=${() => table.setPageIndex(0)}\n          ?disabled=\"${!table.getCanPreviousPage()}\"\n        >\n          <<\n        </button>\n        <button\n          @click=${() => table.previousPage()}\n          ?disabled=${!table.getCanPreviousPage()}\n        >\n          <\n        </button>\n        <button\n          @click=${() => table.nextPage()}\n          ?disabled=${!table.getCanNextPage()}\n        >\n          >\n        </button>\n        <button\n          @click=${() => table.setPageIndex(table.getPageCount() - 1)}\n          ?disabled=\"${!table.getCanNextPage()}\"\n        >\n          >>\n        </button>\n        <span style=\"display: flex;gap:2px\">\n          <span>Page</span>\n          <strong>\n            ${table.store.state.pagination.pageIndex + 1} of\n            ${table.getPageCount()}\n          </strong>\n        </span>\n      </div>\n      <pre>${JSON.stringify(table.state.columnFilters, null, 2)}</pre>\n      <style>\n        * {\n          font-family: sans-serif;\n          font-size: 14px;\n          box-sizing: border-box;\n        }\n\n        table {\n          border: 1px solid lightgray;\n          border-collapse: collapse;\n        }\n\n        tbody {\n          border-bottom: 1px solid lightgray;\n        }\n\n        th {\n          border-bottom: 1px solid lightgray;\n          border-right: 1px solid lightgray;\n          padding: 2px 4px;\n        }\n\n        tfoot {\n          color: gray;\n        }\n\n        tfoot th {\n          font-weight: normal;\n        }\n\n        .page-controls {\n          display: flex;\n          gap: 10px;\n          padding: 4px 0;\n        }\n      </style>\n    `\n  }\n}\n"
  },
  {
    "path": "examples/lit/filters/src/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  subRows?: Array<Person>\n}\n\nconst range = (len: number) => {\n  const arr: Array<number> = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (): Person => {\n  return {\n    firstName: faker.person.firstName(),\n    lastName: faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: faker.number.int(1000),\n    progress: faker.number.int(100),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0],\n  }\n}\n\nexport function makeData(...lens: Array<number>) {\n  const makeDataLevel = (depth = 0): Array<Person> => {\n    const len = lens[depth]\n    return range(len).map((): Person => {\n      return {\n        ...newPerson(),\n        subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined,\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n"
  },
  {
    "path": "examples/lit/filters/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"module\": \"ESNext\",\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"react-jsx\",\n    \"experimentalDecorators\": true,\n    \"useDefineForClassFields\": false,\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": false,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "examples/lit/filters/vite.config.js",
    "content": "import { defineConfig } from 'vite'\nimport rollupReplace from '@rollup/plugin-replace'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [\n    rollupReplace({\n      preventAssignment: true,\n      values: {\n        __DEV__: JSON.stringify(true),\n        'process.env.NODE_ENV': JSON.stringify('development'),\n      },\n    }),\n  ],\n})\n"
  },
  {
    "path": "examples/lit/row-selection/.gitignore",
    "content": "node_modules\n.DS_Store\ndist\ndist-ssr\n*.local\n"
  },
  {
    "path": "examples/lit/row-selection/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run start` or `yarn start`\n"
  },
  {
    "path": "examples/lit/row-selection/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite App</title>\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n  </head>\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.ts\"></script>\n    <lit-table-example></lit-table-example>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/lit/row-selection/package.json",
    "content": "{\n  \"name\": \"tanstack-lit-table-example-row-selection\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"start\": \"vite\",\n    \"lint\": \"eslint ./src\"\n  },\n  \"dependencies\": {\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"@tanstack/lit-table\": \"^9.0.0-alpha.10\",\n    \"lit\": \"^3.3.2\"\n  },\n  \"devDependencies\": {\n    \"@rollup/plugin-replace\": \"^6.0.3\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\"\n  }\n}\n"
  },
  {
    "path": "examples/lit/row-selection/src/main.ts",
    "content": "import { customElement } from 'lit/decorators.js'\nimport { LitElement, html } from 'lit'\nimport { repeat } from 'lit/directives/repeat.js'\nimport {\n  TableController,\n  columnFilteringFeature,\n  createFilteredRowModel,\n  createPaginatedRowModel,\n  filterFns,\n  flexRender,\n  rowPaginationFeature,\n  rowSelectionFeature,\n  tableFeatures,\n} from '@tanstack/lit-table'\nimport { makeData } from './makeData'\nimport type { ColumnDef } from '@tanstack/lit-table'\nimport type { Person } from './makeData'\n\nconst _features = tableFeatures({\n  rowSelectionFeature,\n  columnFilteringFeature,\n  rowPaginationFeature,\n})\n\nconst columns: Array<ColumnDef<typeof _features, Person>> = [\n  {\n    id: 'select',\n    header: ({ table }) => html`\n      <input\n        type=\"checkbox\"\n        @change=\"${table.getToggleAllRowsSelectedHandler()}\"\n        .checked=\"${table.getIsAllRowsSelected()}\"\n        .indeterminate=\"${table.getIsSomeRowsSelected()}\"\n      />\n    `,\n    cell: ({ row }) => html`\n      <input\n        type=\"checkbox\"\n        @change=\"${row.getToggleSelectedHandler()}\"\n        .checked=\"${row.getIsSelected()}\"\n        ?disabled=\"${!row.getCanSelect()}\"\n        .indeterminate=\"${row.getIsSomeSelected()}\"\n      />\n    `,\n  },\n  {\n    accessorKey: 'firstName',\n    cell: (info) => info.getValue(),\n  },\n  {\n    accessorFn: (row) => row.lastName,\n    id: 'lastName',\n    cell: (info) => info.getValue(),\n    header: () => html`<span>Last Name</span>`,\n  },\n  {\n    accessorFn: (row) => `${row.firstName} ${row.lastName}`,\n    id: 'fullName',\n    header: 'Full Name',\n    cell: (info) => info.getValue(),\n  },\n  {\n    accessorKey: 'age',\n    header: () => 'Age',\n  },\n  {\n    accessorKey: 'visits',\n    header: () => html`<span>Visits</span>`,\n  },\n  {\n    accessorKey: 'status',\n    header: 'Status',\n  },\n  {\n    accessorKey: 'progress',\n    header: 'Profile Progress',\n  },\n]\n\nconst data = makeData(50_000)\n\n@customElement('lit-table-example')\nclass LitTableExample extends LitElement {\n  private tableController = new TableController<typeof _features, Person>(this)\n\n  protected render() {\n    const table = this.tableController.table(\n      {\n        _features,\n        _rowModels: {\n          filteredRowModel: createFilteredRowModel(filterFns),\n          paginatedRowModel: createPaginatedRowModel(),\n        },\n        data,\n        columns,\n        enableRowSelection: true,\n        debugTable: true,\n      },\n      (state) => ({ rowSelection: state.rowSelection }),\n    )\n\n    return html`\n      <table>\n        <thead>\n          ${repeat(\n            table.getHeaderGroups(),\n            (headerGroup) => headerGroup.id,\n            (headerGroup) => html`\n              <tr>\n                ${repeat(\n                  headerGroup.headers,\n                  (header) => header.id,\n                  (header) => html`\n                    <th colspan=\"${header.colSpan}\">\n                      ${header.isPlaceholder\n                        ? null\n                        : html`<div>\n                            ${flexRender(\n                              header.column.columnDef.header,\n                              header.getContext(),\n                            )}\n                          </div>`}\n                    </th>\n                  `,\n                )}\n              </tr>\n            `,\n          )}\n        </thead>\n        <tbody>\n          ${table\n            .getRowModel()\n            .rows.slice(0, 10)\n            .map(\n              (row) => html`\n                <tr>\n                  ${row\n                    .getAllCells()\n                    .map(\n                      (cell) => html`\n                        <td>\n                          ${flexRender(\n                            cell.column.columnDef.cell,\n                            cell.getContext(),\n                          )}\n                        </td>\n                      `,\n                    )}\n                </tr>\n              `,\n            )}\n        </tbody>\n      </table>\n      <div class=\"page-controls\">\n        <button\n          @click=${() => table.setPageIndex(0)}\n          ?disabled=\"${!table.getCanPreviousPage()}\"\n        >\n          <<\n        </button>\n        <button\n          @click=${() => table.previousPage()}\n          ?disabled=${!table.getCanPreviousPage()}\n        >\n          <\n        </button>\n        <button\n          @click=${() => table.nextPage()}\n          ?disabled=${!table.getCanNextPage()}\n        >\n          >\n        </button>\n        <button\n          @click=${() => table.setPageIndex(table.getPageCount() - 1)}\n          ?disabled=\"${!table.getCanNextPage()}\"\n        >\n          >>\n        </button>\n        <span style=\"display: flex;gap:2px\">\n          <span>Page</span>\n          <strong>\n            ${table.store.state.pagination.pageIndex + 1} of\n            ${table.getPageCount()}\n          </strong>\n        </span>\n      </div>\n      <style>\n        * {\n          font-family: sans-serif;\n          font-size: 14px;\n          box-sizing: border-box;\n        }\n\n        table {\n          border: 1px solid lightgray;\n          border-collapse: collapse;\n        }\n\n        tbody {\n          border-bottom: 1px solid lightgray;\n        }\n\n        th {\n          border-bottom: 1px solid lightgray;\n          border-right: 1px solid lightgray;\n          padding: 2px 4px;\n        }\n\n        tfoot {\n          color: gray;\n        }\n\n        tfoot th {\n          font-weight: normal;\n        }\n\n        .page-controls {\n          display: flex;\n          gap: 10px;\n          padding: 4px 0;\n        }\n      </style>\n    `\n  }\n}\n"
  },
  {
    "path": "examples/lit/row-selection/src/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = {\n  firstName: string\n  lastName: string | undefined\n  age: number\n  visits: number | undefined\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  rank: number\n  createdAt: Date\n  subRows?: Array<Person>\n}\n\nconst range = (len: number) => {\n  const arr: Array<number> = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (): Person => {\n  return {\n    firstName: faker.person.firstName(),\n    lastName: Math.random() < 0.1 ? undefined : faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: Math.random() < 0.1 ? undefined : faker.number.int(1000),\n    progress: faker.number.int(100),\n    createdAt: faker.date.anytime(),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0],\n    rank: faker.number.int(100),\n  }\n}\n\nexport function makeData(...lens: Array<number>) {\n  const makeDataLevel = (depth = 0): Array<Person> => {\n    const len = lens[depth]\n    return range(len).map((_d): Person => {\n      return {\n        ...newPerson(),\n        subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined,\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n"
  },
  {
    "path": "examples/lit/row-selection/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"module\": \"ESNext\",\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"experimentalDecorators\": true,\n    \"useDefineForClassFields\": false,\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": false,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "examples/lit/row-selection/vite.config.js",
    "content": "import { defineConfig } from 'vite'\nimport rollupReplace from '@rollup/plugin-replace'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [\n    rollupReplace({\n      preventAssignment: true,\n      values: {\n        __DEV__: JSON.stringify(true),\n        'process.env.NODE_ENV': JSON.stringify('development'),\n      },\n    }),\n  ],\n})\n"
  },
  {
    "path": "examples/lit/sorting/.gitignore",
    "content": "node_modules\n.DS_Store\ndist\ndist-ssr\n*.local\n"
  },
  {
    "path": "examples/lit/sorting/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run start` or `yarn start`\n"
  },
  {
    "path": "examples/lit/sorting/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite App</title>\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n  </head>\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.ts\"></script>\n    <lit-table-example></lit-table-example>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/lit/sorting/package.json",
    "content": "{\n  \"name\": \"tanstack-lit-table-example-sorting\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"start\": \"vite\",\n    \"lint\": \"eslint ./src\"\n  },\n  \"dependencies\": {\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"@tanstack/lit-table\": \"^9.0.0-alpha.10\",\n    \"lit\": \"^3.3.2\"\n  },\n  \"devDependencies\": {\n    \"@rollup/plugin-replace\": \"^6.0.3\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\"\n  }\n}\n"
  },
  {
    "path": "examples/lit/sorting/src/main.ts",
    "content": "import { customElement } from 'lit/decorators.js'\nimport { LitElement, html } from 'lit'\nimport { repeat } from 'lit/directives/repeat.js'\nimport {\n  TableController,\n  createSortedRowModel,\n  flexRender,\n  rowSortingFeature,\n  sortFns,\n  tableFeatures,\n} from '@tanstack/lit-table'\nimport { Person, makeData } from './makeData'\nimport type { ColumnDef, SortFn } from '@tanstack/lit-table'\n\nconst _features = tableFeatures({\n  rowSortingFeature,\n})\n\nconst sortStatusFn: SortFn<any, any> = (rowA, rowB, _columnId) => {\n  const statusA = rowA.original.status\n  const statusB = rowB.original.status\n  const statusOrder = ['single', 'complicated', 'relationship']\n  return statusOrder.indexOf(statusA) - statusOrder.indexOf(statusB)\n}\n\nconst columns: Array<ColumnDef<typeof _features, Person>> = [\n  {\n    accessorKey: 'firstName',\n    cell: (info) => info.getValue(),\n    // this column will sort in ascending order by default since it is a string column\n  },\n  {\n    accessorFn: (row) => row.lastName,\n    id: 'lastName',\n    cell: (info) => info.getValue(),\n    header: () => html`<span>Last Name</span>`,\n    sortUndefined: 'last', // force undefined values to the end\n    sortDescFirst: false, // first sort order will be ascending (nullable values can mess up auto detection of sort order)\n  },\n  {\n    accessorKey: 'age',\n    header: () => 'Age',\n    // this column will sort in descending order by default since it is a number column\n  },\n  {\n    accessorKey: 'visits',\n    header: () => html`<span>Visits</span>`,\n    sortUndefined: 'last', // force undefined values to the end\n  },\n  {\n    accessorKey: 'status',\n    header: 'Status',\n    sortFn: sortStatusFn, // use our custom sorting function for this enum column\n  },\n  {\n    accessorKey: 'progress',\n    header: 'Profile Progress',\n    // enableSorting: false, //disable sorting for this column\n  },\n  {\n    accessorKey: 'rank',\n    header: 'Rank',\n    invertSorting: true, // invert the sorting order (golf score-like where smaller is better)\n  },\n  {\n    accessorKey: 'createdAt',\n    header: 'Created At',\n    // sortFn: 'datetime' //make sure table knows this is a datetime column (usually can detect if no null values)\n  },\n]\n\nconst data: Array<Person> = makeData(1000)\n\n@customElement('lit-table-example')\nclass LitTableExample extends LitElement {\n  private tableController = new TableController<typeof _features, Person>(this)\n\n  protected render() {\n    const table = this.tableController.table(\n      {\n        _features,\n        _rowModels: {\n          sortedRowModel: createSortedRowModel(sortFns),\n        },\n        columns,\n        data,\n      },\n      (state) => ({ sorting: state.sorting }),\n    )\n\n    return html`\n      <table>\n        <thead>\n          ${repeat(\n            table.getHeaderGroups(),\n            (headerGroup) => headerGroup.id,\n            (headerGroup) => html`\n              <tr>\n                ${headerGroup.headers.map(\n                  (header) => html`\n                    <th colspan=\"${header.colSpan}\">\n                      ${header.isPlaceholder\n                        ? null\n                        : html`<div\n                            title=${header.column.getCanSort()\n                              ? header.column.getNextSortingOrder() === 'asc'\n                                ? 'Sort ascending'\n                                : header.column.getNextSortingOrder() === 'desc'\n                                  ? 'Sort descending'\n                                  : 'Clear sort'\n                              : undefined}\n                            @click=\"${header.column.getToggleSortingHandler()}\"\n                            style=\"cursor: ${header.column.getCanSort()\n                              ? 'pointer'\n                              : 'not-allowed'}\"\n                          >\n                            ${flexRender(\n                              header.column.columnDef.header,\n                              header.getContext(),\n                            )}\n                            ${{ asc: ' 🔼', desc: ' 🔽' }[\n                              header.column.getIsSorted() as string\n                            ] ?? null}\n                          </div>`}\n                    </th>\n                  `,\n                )}\n              </tr>\n            `,\n          )}\n        </thead>\n        <tbody>\n          ${table\n            .getRowModel()\n            .rows.slice(0, 10)\n            .map(\n              (row) => html`\n                <tr>\n                  ${row\n                    .getAllCells()\n                    .map(\n                      (cell) => html`\n                        <td>\n                          ${flexRender(\n                            cell.column.columnDef.cell,\n                            cell.getContext(),\n                          )}\n                        </td>\n                      `,\n                    )}\n                </tr>\n              `,\n            )}\n        </tbody>\n      </table>\n      <pre>${JSON.stringify(table.state.sorting, null, 2)}</pre>\n      <style>\n        * {\n          font-family: sans-serif;\n          font-size: 14px;\n          box-sizing: border-box;\n        }\n\n        table {\n          border: 1px solid lightgray;\n          border-collapse: collapse;\n        }\n\n        tbody {\n          border-bottom: 1px solid lightgray;\n        }\n\n        th {\n          border-bottom: 1px solid lightgray;\n          border-right: 1px solid lightgray;\n          padding: 2px 4px;\n        }\n\n        tfoot {\n          color: gray;\n        }\n\n        tfoot th {\n          font-weight: normal;\n        }\n      </style>\n    `\n  }\n}\n"
  },
  {
    "path": "examples/lit/sorting/src/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = {\n  firstName: string\n  lastName: string | undefined\n  age: number\n  visits: number | undefined\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  rank: number\n  createdAt: Date\n  subRows?: Array<Person>\n}\n\nconst range = (len: number) => {\n  const arr: Array<number> = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (): Person => {\n  return {\n    firstName: faker.person.firstName(),\n    lastName: Math.random() < 0.1 ? undefined : faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: Math.random() < 0.1 ? undefined : faker.number.int(1000),\n    progress: faker.number.int(100),\n    createdAt: faker.date.anytime(),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0],\n    rank: faker.number.int(100),\n  }\n}\n\nexport function makeData(...lens: Array<number>) {\n  const makeDataLevel = (depth = 0): Array<Person> => {\n    const len = lens[depth]\n    return range(len).map((_d): Person => {\n      return {\n        ...newPerson(),\n        subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined,\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n"
  },
  {
    "path": "examples/lit/sorting/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"module\": \"ESNext\",\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"experimentalDecorators\": true,\n    \"emitDecoratorMetadata\": true,\n    \"useDefineForClassFields\": false,\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": false,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "examples/lit/sorting/vite.config.js",
    "content": "import { defineConfig } from 'vite'\nimport rollupReplace from '@rollup/plugin-replace'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [\n    rollupReplace({\n      preventAssignment: true,\n      values: {\n        __DEV__: JSON.stringify(true),\n        'process.env.NODE_ENV': JSON.stringify('development'),\n      },\n    }),\n  ],\n})\n"
  },
  {
    "path": "examples/lit/sorting-dynamic-data/.gitignore",
    "content": "node_modules\n.DS_Store\ndist\ndist-ssr\n*.local\n"
  },
  {
    "path": "examples/lit/sorting-dynamic-data/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run start` or `yarn start`\n"
  },
  {
    "path": "examples/lit/sorting-dynamic-data/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite App</title>\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n  </head>\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.ts\"></script>\n    <lit-table-example></lit-table-example>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/lit/sorting-dynamic-data/package.json",
    "content": "{\n  \"name\": \"tanstack-lit-table-example-sorting-dynamic-data\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"start\": \"vite\"\n  },\n  \"dependencies\": {\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"@tanstack/lit-table\": \"^9.0.0-alpha.10\",\n    \"lit\": \"^3.3.2\"\n  },\n  \"devDependencies\": {\n    \"@rollup/plugin-replace\": \"^6.0.3\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\"\n  }\n}\n"
  },
  {
    "path": "examples/lit/sorting-dynamic-data/src/main.ts",
    "content": "import { customElement } from 'lit/decorators.js'\nimport { html, LitElement, PropertyValueMap } from 'lit'\nimport { repeat } from 'lit/directives/repeat.js'\nimport { state } from 'lit/decorators/state.js'\nimport {\n  ColumnDef,\n  flexRender,\n  createSortedRowModel,\n  TableController,\n  rowSortingFeature,\n  sortFns,\n  tableFeatures,\n} from '@tanstack/lit-table'\nimport type { SortFn } from '@tanstack/lit-table'\n\nimport { makeData, Person } from './makeData'\n\nconst _features = tableFeatures({\n  rowSortingFeature,\n})\n\nconst sortStatusFn: SortFn<typeof _features, Person> = (\n  rowA,\n  rowB,\n  _columnId,\n) => {\n  const statusA = rowA.original.status\n  const statusB = rowB.original.status\n  const statusOrder = ['single', 'complicated', 'relationship']\n  return statusOrder.indexOf(statusA) - statusOrder.indexOf(statusB)\n}\n\nconst columns: ColumnDef<typeof _features, Person>[] = [\n  {\n    accessorKey: 'firstName',\n    cell: (info) => info.getValue(),\n    //this column will sort in ascending order by default since it is a string column\n  },\n  {\n    accessorFn: (row) => row.lastName,\n    id: 'lastName',\n    cell: (info) => info.getValue(),\n    header: () => html`<span>Last Name</span>`,\n    sortUndefined: 'last', //force undefined values to the end\n    sortDescFirst: false, //first sort order will be ascending (nullable values can mess up auto detection of sort order)\n  },\n  {\n    accessorKey: 'age',\n    header: () => 'Age',\n    //this column will sort in descending order by default since it is a number column\n  },\n  {\n    accessorKey: 'visits',\n    header: () => html`<span>Visits</span>`,\n    sortUndefined: 'last', //force undefined values to the end\n  },\n  {\n    accessorKey: 'status',\n    header: 'Status',\n    sortFn: sortStatusFn, //use our custom sorting function for this enum column\n  },\n  {\n    accessorKey: 'progress',\n    header: 'Profile Progress',\n    // enableSorting: false, //disable sorting for this column\n  },\n  {\n    accessorKey: 'rank',\n    header: 'Rank',\n    invertSorting: true, //invert the sorting order (golf score-like where smaller is better)\n  },\n  {\n    accessorKey: 'createdAt',\n    header: 'Created At',\n    // sortingFn: 'datetime' //make sure table knows this is a datetime column (usually can detect if no null values)\n  },\n]\n\nconst data: Person[] = makeData(1000)\n\n@customElement('lit-table-example')\nclass LitTableExample extends LitElement {\n  @state()\n  private _multiplier: number = 1\n\n  @state()\n  private _data: Person[] = new Array<Person>()\n\n  private tableController = new TableController<typeof _features, Person>(this)\n\n  constructor() {\n    super()\n    this._data = [...data]\n  }\n\n  protected willUpdate(\n    _changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>,\n  ): void {\n    super.willUpdate(_changedProperties)\n    if (_changedProperties.has('_multiplier')) {\n      const newData: Person[] = data.map((d) => {\n        const p: Person = {\n          ...d,\n          visits: d.visits ? d.visits * this._multiplier : undefined,\n        }\n        return p\n      })\n      this._data.length = 0\n      this._data = newData\n    }\n  }\n  protected render() {\n    const table = this.tableController.table(\n      {\n        _features,\n        _rowModels: {\n          sortedRowModel: createSortedRowModel(sortFns),\n        },\n        columns,\n        data: this._data,\n      },\n      (state) => ({ sorting: state.sorting }),\n    )\n\n    return html`\n      <input\n        type=\"number\"\n        min=\"1\"\n        max=\"100\"\n        id=\"multiplier\"\n        @change=\"${(e: Event) => {\n          const inputElement = (e as CustomEvent).target as HTMLInputElement\n          if (inputElement) {\n            this._multiplier = +inputElement.value\n            this.requestUpdate('_multiplier')\n          }\n        }}\"\n      />\n      <table>\n        <thead>\n          ${repeat(\n            table.getHeaderGroups(),\n            (headerGroup) => headerGroup.id,\n            (headerGroup) => html`\n              <tr>\n                ${headerGroup.headers.map(\n                  (header) => html`\n                    <th colspan=\"${header.colSpan}\">\n                      ${header.isPlaceholder\n                        ? null\n                        : html`<div\n                            title=${header.column.getCanSort()\n                              ? header.column.getNextSortingOrder() === 'asc'\n                                ? 'Sort ascending'\n                                : header.column.getNextSortingOrder() === 'desc'\n                                  ? 'Sort descending'\n                                  : 'Clear sort'\n                              : undefined}\n                            @click=\"${header.column.getToggleSortingHandler()}\"\n                            style=\"cursor: ${header.column.getCanSort()\n                              ? 'pointer'\n                              : 'not-allowed'}\"\n                          >\n                            ${flexRender(\n                              header.column.columnDef.header,\n                              header.getContext(),\n                            )}\n                            ${{ asc: ' 🔼', desc: ' 🔽' }[\n                              header.column.getIsSorted() as string\n                            ] ?? null}\n                          </div>`}\n                    </th>\n                  `,\n                )}\n              </tr>\n            `,\n          )}\n        </thead>\n        <tbody>\n          ${table\n            .getRowModel()\n            .rows.slice(0, 10)\n            .map(\n              (row) => html`\n                <tr>\n                  ${row\n                    .getVisibleCells()\n                    .map(\n                      (cell) => html`\n                        <td>\n                          ${flexRender(\n                            cell.column.columnDef.cell,\n                            cell.getContext(),\n                          )}\n                        </td>\n                      `,\n                    )}\n                </tr>\n              `,\n            )}\n        </tbody>\n      </table>\n      <pre>${JSON.stringify(table.state.sorting, null, 2)}</pre>\n      <style>\n        * {\n          font-family: sans-serif;\n          font-size: 14px;\n          box-sizing: border-box;\n        }\n\n        table {\n          border: 1px solid lightgray;\n          border-collapse: collapse;\n        }\n\n        tbody {\n          border-bottom: 1px solid lightgray;\n        }\n\n        th {\n          border-bottom: 1px solid lightgray;\n          border-right: 1px solid lightgray;\n          padding: 2px 4px;\n        }\n\n        tfoot {\n          color: gray;\n        }\n\n        tfoot th {\n          font-weight: normal;\n        }\n      </style>\n    `\n  }\n}\n"
  },
  {
    "path": "examples/lit/sorting-dynamic-data/src/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = {\n  firstName: string\n  lastName: string | undefined\n  age: number\n  visits: number | undefined\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  rank: number\n  createdAt: Date\n  subRows?: Person[]\n}\n\nconst range = (len: number) => {\n  const arr: number[] = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (): Person => {\n  return {\n    firstName: faker.person.firstName(),\n    lastName: Math.random() < 0.1 ? undefined : faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: Math.random() < 0.1 ? undefined : faker.number.int(1000),\n    progress: faker.number.int(100),\n    createdAt: faker.date.anytime(),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0]!,\n    rank: faker.number.int(100),\n  }\n}\n\nexport function makeData(...lens: number[]) {\n  const makeDataLevel = (depth = 0): Person[] => {\n    const len = lens[depth]!\n    return range(len).map((_d): Person => {\n      return {\n        ...newPerson(),\n        subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined,\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n"
  },
  {
    "path": "examples/lit/sorting-dynamic-data/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"module\": \"ESNext\",\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"experimentalDecorators\": true,\n    \"emitDecoratorMetadata\": true,\n    \"useDefineForClassFields\": false,\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": false,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "examples/lit/sorting-dynamic-data/vite.config.js",
    "content": "import { defineConfig } from 'vite'\nimport rollupReplace from '@rollup/plugin-replace'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [\n    rollupReplace({\n      preventAssignment: true,\n      values: {\n        __DEV__: JSON.stringify(true),\n        'process.env.NODE_ENV': JSON.stringify('development'),\n      },\n    }),\n  ],\n})\n"
  },
  {
    "path": "examples/lit/virtualized-rows/.gitignore",
    "content": "node_modules\n.DS_Store\ndist\ndist-ssr\n*.local\n"
  },
  {
    "path": "examples/lit/virtualized-rows/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run start` or `yarn start`\n"
  },
  {
    "path": "examples/lit/virtualized-rows/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite App</title>\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n  </head>\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.ts\"></script>\n    <lit-table-example></lit-table-example>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/lit/virtualized-rows/package.json",
    "content": "{\n  \"name\": \"tanstack-lit-table-virtualized-rows\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"start\": \"vite\",\n    \"lint\": \"eslint ./src\"\n  },\n  \"dependencies\": {\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"@tanstack/lit-table\": \"^9.0.0-alpha.10\",\n    \"@tanstack/lit-virtual\": \"^3.13.19\",\n    \"lit\": \"^3.3.2\"\n  },\n  \"devDependencies\": {\n    \"@rollup/plugin-replace\": \"^6.0.3\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\"\n  }\n}\n"
  },
  {
    "path": "examples/lit/virtualized-rows/src/main.ts",
    "content": "import { customElement } from 'lit/decorators.js'\nimport { LitElement, html } from 'lit'\nimport { repeat } from 'lit/directives/repeat.js'\nimport {\n  TableController,\n  columnSizingFeature,\n  createSortedRowModel,\n  flexRender,\n  rowSortingFeature,\n  sortFns,\n  tableFeatures,\n} from '@tanstack/lit-table'\nimport { styleMap } from 'lit/directives/style-map.js'\nimport { Ref, createRef, ref } from 'lit/directives/ref.js'\nimport { VirtualizerController } from '@tanstack/lit-virtual'\nimport { Person, makeData } from './makeData.ts'\nimport type { ColumnDef } from '@tanstack/lit-table'\n\nconst _features = tableFeatures({\n  columnSizingFeature,\n  rowSortingFeature,\n})\n\nconst columns: Array<ColumnDef<typeof _features, Person>> = [\n  {\n    accessorKey: 'id',\n    header: 'ID',\n    size: 60,\n  },\n  {\n    accessorKey: 'firstName',\n    cell: (info) => info.getValue(),\n  },\n  {\n    accessorFn: (row) => row.lastName,\n    id: 'lastName',\n    cell: (info) => info.getValue(),\n    header: () => html`<span>Last Name</span>`,\n  },\n  {\n    accessorKey: 'age',\n    header: () => 'Age',\n    size: 50,\n  },\n  {\n    accessorKey: 'visits',\n    header: () => html`<span>Visits</span>`,\n    size: 50,\n  },\n  {\n    accessorKey: 'status',\n    header: 'Status',\n  },\n  {\n    accessorKey: 'progress',\n    header: 'Profile Progress',\n    size: 80,\n  },\n  {\n    accessorKey: 'createdAt',\n    header: 'Created At',\n    cell: (info) => info.getValue<Date>().toLocaleString(),\n    size: 250,\n  },\n]\nconst data = makeData(50_000)\n\n@customElement('lit-table-example')\nclass LitTableExample extends LitElement {\n  private tableController = new TableController<typeof _features, Person>(this)\n\n  private tableContainerRef: Ref = createRef()\n\n  private rowVirtualizerController: VirtualizerController<Element, Element>\n\n  connectedCallback() {\n    this.rowVirtualizerController = new VirtualizerController(this, {\n      count: data.length,\n      getScrollElement: () => this.tableContainerRef.value!,\n      estimateSize: () => 33,\n      overscan: 5,\n    })\n    super.connectedCallback()\n  }\n\n  protected render() {\n    const table = this.tableController.table(\n      {\n        _features,\n        _rowModels: {\n          sortedRowModel: createSortedRowModel(sortFns),\n        },\n        columns,\n        data,\n      },\n      () => ({}), // selector - empty since we don't need any state\n    )\n    const { rows } = table.getRowModel()\n\n    const virtualizer = this.rowVirtualizerController.getVirtualizer()\n    return html`\n      <div class=\"app\">\n        (${data.length} rows)\n        <div\n          class=\"container\"\n          ${ref(this.tableContainerRef)}\n          style=\"${styleMap({\n            overflow: 'auto', // our scrollable table container\n            position: 'relative', // needed for sticky header\n            height: '800px', // should be a fixed height\n          })}\"\n        >\n          <table style=\"display: grid\">\n            <thead\n              style=\"${styleMap({\n                display: 'grid',\n                position: 'sticky',\n                top: 0,\n                zIndex: 1,\n              })}\"\n            >\n              ${repeat(\n                table.getHeaderGroups(),\n                (headerGroup) => headerGroup.id,\n                (headerGroup) => html`\n                  <tr style=\"${styleMap({ display: 'flex', width: '100%' })}\">\n                    ${repeat(\n                      headerGroup.headers,\n                      (header) => header.id,\n                      (header) => html`\n                        <th\n                          style=\"${styleMap({\n                            display: 'flex',\n                            width: `${header.getSize()}px`,\n                          })}\"\n                          @click=\"${header.column.getToggleSortingHandler()}\"\n                        >\n                          ${flexRender(\n                            header.column.columnDef.header,\n                            header.getContext(),\n                          )}\n                          ${{ asc: ' 🔼', desc: ' 🔽' }[\n                            header.column.getIsSorted() as string\n                          ] ?? null}\n                        </th>\n                      `,\n                    )}\n                  </tr>\n                `,\n              )}\n            </thead>\n            <tbody\n              style=${styleMap({\n                display: 'grid',\n                height: `${virtualizer.getTotalSize()}px`, // tells scrollbar how big the table is\n                position: 'relative', // needed for absolute positioning of rows\n              })}\n            >\n              ${repeat(\n                this.rowVirtualizerController\n                  .getVirtualizer()\n                  .getVirtualItems(),\n                (item) => item.key,\n                (item) => {\n                  const row = rows[item.index]\n                  return html`\n                    <tr\n                      style=${styleMap({\n                        display: 'flex',\n                        position: 'absolute',\n                        transform: `translateY(${item.start}px)`,\n                        width: '100%',\n                      })}\n                      ${ref((node) =>\n                        this.rowVirtualizerController\n                          .getVirtualizer()\n                          .measureElement(node),\n                      )}\n                    >\n                      ${repeat(\n                        row.getAllCells(),\n                        (cell) => cell.id,\n                        (cell) => html`\n                          <td\n                            style=${styleMap({\n                              display: 'flex',\n                              width: `${cell.column.getSize()}px`,\n                            })}\n                          >\n                            ${flexRender(\n                              cell.column.columnDef.cell,\n                              cell.getContext(),\n                            )}\n                          </td>\n                        `,\n                      )}\n                    </tr>\n                  `\n                },\n              )}\n            </tbody>\n          </table>\n        </div>\n      </div>\n\n      <style>\n        html {\n          font-family: sans-serif;\n          font-size: 14px;\n        }\n\n        table {\n          border-collapse: collapse;\n          border-spacing: 0;\n          font-family: arial, sans-serif;\n          table-layout: fixed;\n        }\n\n        thead {\n          background: lightgray;\n        }\n\n        tr {\n          border-bottom: 1px solid lightgray;\n        }\n\n        th {\n          border-bottom: 1px solid lightgray;\n          border-right: 1px solid lightgray;\n          padding: 2px 4px;\n          text-align: left;\n        }\n\n        td {\n          padding: 6px;\n        }\n\n        .container {\n          border: 1px solid lightgray;\n          margin: 1rem auto;\n        }\n\n        .app {\n          margin: 1rem auto;\n          text-align: center;\n        }\n      </style>\n    `\n  }\n}\n"
  },
  {
    "path": "examples/lit/virtualized-rows/src/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = {\n  id: number\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  createdAt: Date\n}\n\nconst range = (len: number) => {\n  const arr: Array<number> = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (index: number): Person => {\n  return {\n    id: index + 1,\n    firstName: faker.person.firstName(),\n    lastName: faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: faker.number.int(1000),\n    progress: faker.number.int(100),\n    createdAt: faker.date.anytime(),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0],\n  }\n}\n\nexport function makeData(...lens: Array<number>) {\n  const makeDataLevel = (depth = 0): Array<Person> => {\n    const len = lens[depth]\n    return range(len).map((d): Person => {\n      return {\n        ...newPerson(d),\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n"
  },
  {
    "path": "examples/lit/virtualized-rows/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"module\": \"ESNext\",\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"emitDecoratorMetadata\": true,\n    \"noEmit\": true,\n    \"jsx\": \"react-jsx\",\n    \"experimentalDecorators\": true,\n    \"useDefineForClassFields\": false,\n    \"strictPropertyInitialization\": false,\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": false,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "examples/lit/virtualized-rows/twind.config.ts",
    "content": "import { defineConfig } from '@twind/core'\nimport presetAutoprefix from '@twind/preset-autoprefix'\nimport presetTailwind from '@twind/preset-tailwind/base'\n\nexport default defineConfig({\n  presets: [presetAutoprefix(), presetTailwind()],\n})\n"
  },
  {
    "path": "examples/lit/virtualized-rows/vite.config.js",
    "content": "import { defineConfig } from 'vite'\nimport rollupReplace from '@rollup/plugin-replace'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [\n    rollupReplace({\n      preventAssignment: true,\n      values: {\n        __DEV__: JSON.stringify(true),\n        'process.env.NODE_ENV': JSON.stringify('development'),\n      },\n    }),\n  ],\n})\n"
  },
  {
    "path": "examples/preact/basic/.gitignore",
    "content": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\npnpm-debug.log*\nlerna-debug.log*\n\nnode_modules\ndist\ndist-ssr\n*.local\n\n# Editor directories and files\n.vscode/*\n!.vscode/extensions.json\n.idea\n.DS_Store\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n*.sw?\n"
  },
  {
    "path": "examples/preact/basic/README.md",
    "content": "# `create-preact`\n\n<h2 align=\"center\">\n  <img height=\"256\" width=\"256\" src=\"./src/assets/preact.svg\">\n</h2>\n\n<h3 align=\"center\">Get started using Preact and Vite!</h3>\n\n## Getting Started\n\n- `npm run dev` - Starts a dev server at http://localhost:5173/\n\n- `npm run build` - Builds for production, emitting to `dist/`\n\n- `npm run preview` - Starts a server at http://localhost:4173/ to test production build locally\n"
  },
  {
    "path": "examples/preact/basic/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <link rel=\"icon\" type=\"image/svg+xml\" href=\"/vite.svg\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <meta name=\"color-scheme\" content=\"light dark\" />\n    <title>Vite + Preact</title>\n  </head>\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.tsx\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/preact/basic/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-preact-basic\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"start\": \"vite\",\n    \"lint\": \"eslint ./src\",\n    \"test:types\": \"tsc\"\n  },\n  \"dependencies\": {\n    \"@tanstack/preact-table\": \"^9.0.0-alpha.16\",\n    \"preact\": \"^10.28.2\"\n  },\n  \"devDependencies\": {\n    \"@preact/preset-vite\": \"^2.10.3\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\"\n  }\n}\n"
  },
  {
    "path": "examples/preact/basic/src/index.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n"
  },
  {
    "path": "examples/preact/basic/src/main.tsx",
    "content": "import { render } from 'preact'\nimport { useReducer, useState } from 'preact/hooks'\nimport { tableFeatures, useTable } from '@tanstack/preact-table'\nimport type { ColumnDef } from '@tanstack/preact-table'\nimport './index.css'\n\n// This example uses the classic standalone `useTable` hook to create a table without the new `createTableHelper` util.\n\n// 1. Define what the shape of your data will be for each row\ntype Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  status: string\n  progress: number\n}\n\n// 2. Create some dummy data with a stable reference (this could be an API response stored in useState or similar)\nconst defaultData: Array<Person> = [\n  {\n    firstName: 'tanner',\n    lastName: 'linsley',\n    age: 24,\n    visits: 100,\n    status: 'In Relationship',\n    progress: 50,\n  },\n  {\n    firstName: 'tandy',\n    lastName: 'miller',\n    age: 40,\n    visits: 40,\n    status: 'Single',\n    progress: 80,\n  },\n  {\n    firstName: 'joe',\n    lastName: 'dirte',\n    age: 45,\n    visits: 20,\n    status: 'Complicated',\n    progress: 10,\n  },\n  {\n    firstName: 'kevin',\n    lastName: 'vandy',\n    age: 12,\n    visits: 100,\n    status: 'Single',\n    progress: 70,\n  },\n]\n\n// 3. New in V9! Tell the table which features and row models we want to use. In this case, this will be a basic table with no additional features\nconst _features = tableFeatures({}) // util method to create sharable TFeatures object/type\n\n// 4. Define the columns for your table. This uses the new `ColumnDef` type to define columns. Alternatively, check out the createTableHelper/createColumnHelper util for an even more type-safe way to define columns.\nconst columns: Array<ColumnDef<typeof _features, Person>> = [\n  {\n    accessorKey: 'firstName', // accessorKey method (most common for simple use-cases)\n    header: 'First Name',\n    cell: (info) => info.getValue(),\n  },\n  {\n    accessorFn: (row) => row.lastName, // accessorFn used (alternative) along with a custom id\n    id: 'lastName',\n    header: () => <span>Last Name</span>,\n    cell: (info) => <i>{info.getValue<string>()}</i>,\n  },\n  {\n    accessorFn: (row) => Number(row.age), // accessorFn used to transform the data\n    id: 'age',\n    header: () => 'Age',\n    cell: (info) => {\n      return info.renderValue()\n    },\n  },\n  {\n    accessorKey: 'visits',\n    header: () => <span>Visits</span>,\n  },\n  {\n    accessorKey: 'status',\n    header: 'Status',\n  },\n  {\n    accessorKey: 'progress',\n    header: 'Profile Progress',\n  },\n]\n\nfunction App() {\n  // 5. Store data with a stable reference\n  const [data, _setData] = useState(() => [...defaultData])\n  const rerender = useReducer(() => ({}), {})[1]\n\n  // 6. Create the table instance with required _features, columns, and data\n  const table = useTable({\n    _features, // new required option in V9. Tell the table which features you are importing and using (better tree-shaking)\n    _rowModels: {}, // `Core` row model is now included by default, but you can still override it here\n    columns,\n    data,\n    // add additional table options here\n  })\n\n  // 7. Render your table markup from the table instance APIs\n  return (\n    <div className=\"p-2\">\n      <table>\n        <thead>\n          {table.getHeaderGroups().map((headerGroup) => (\n            <tr key={headerGroup.id}>\n              {headerGroup.headers.map((header) => (\n                <th key={header.id}>\n                  {header.isPlaceholder ? null : (\n                    <table.FlexRender header={header} />\n                  )}\n                </th>\n              ))}\n            </tr>\n          ))}\n        </thead>\n        <tbody>\n          {table.getRowModel().rows.map((row) => (\n            <tr key={row.id}>\n              {row.getAllCells().map((cell) => (\n                <td key={cell.id}>\n                  <table.FlexRender cell={cell} />\n                </td>\n              ))}\n            </tr>\n          ))}\n        </tbody>\n        <tfoot>\n          {table.getFooterGroups().map((footerGroup) => (\n            <tr key={footerGroup.id}>\n              {footerGroup.headers.map((header) => (\n                <th key={header.id}>\n                  {header.isPlaceholder ? null : (\n                    <table.FlexRender footer={header} />\n                  )}\n                </th>\n              ))}\n            </tr>\n          ))}\n        </tfoot>\n      </table>\n      <div className=\"h-4\" />\n      <button onClick={() => rerender(0)} className=\"border p-2\">\n        Rerender\n      </button>\n    </div>\n  )\n}\n\nconst rootElement = document.getElementById('root')\nif (!rootElement) throw new Error('Failed to find the root element')\n\nrender(<App />, rootElement)\n"
  },
  {
    "path": "examples/preact/basic/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"strictNullChecks\": true,\n    \"target\": \"ES2020\",\n    \"module\": \"ESNext\",\n    \"moduleResolution\": \"bundler\",\n    \"noEmit\": true,\n    \"allowJs\": true,\n    \"checkJs\": true,\n\n    /* Preact Config */\n    \"jsx\": \"react-jsx\",\n    \"jsxImportSource\": \"preact\",\n    \"skipLibCheck\": true,\n    \"paths\": {\n      \"react\": [\"./node_modules/preact/compat/\"],\n      \"react-dom\": [\"./node_modules/preact/compat/\"]\n    }\n  },\n  \"include\": [\"node_modules/vite/client.d.ts\", \"src/**/*\"],\n  \"exclude\": [\"dist/**/*\", \"node_modules\"]\n}\n"
  },
  {
    "path": "examples/preact/basic/vite.config.ts",
    "content": "import { defineConfig } from 'vite'\nimport preact from '@preact/preset-vite'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [preact()],\n})\n"
  },
  {
    "path": "examples/preact/sorting/.gitignore",
    "content": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\npnpm-debug.log*\nlerna-debug.log*\n\nnode_modules\ndist\ndist-ssr\n*.local\n\n# Editor directories and files\n.vscode/*\n!.vscode/extensions.json\n.idea\n.DS_Store\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n*.sw?\n"
  },
  {
    "path": "examples/preact/sorting/README.md",
    "content": "# `create-preact`\n\n<h2 align=\"center\">\n  <img height=\"256\" width=\"256\" src=\"./src/assets/preact.svg\">\n</h2>\n\n<h3 align=\"center\">Get started using Preact and Vite!</h3>\n\n## Getting Started\n\n- `npm run dev` - Starts a dev server at http://localhost:5173/\n\n- `npm run build` - Builds for production, emitting to `dist/`\n\n- `npm run preview` - Starts a server at http://localhost:4173/ to test production build locally\n"
  },
  {
    "path": "examples/preact/sorting/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <link rel=\"icon\" type=\"image/svg+xml\" href=\"/vite.svg\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <meta name=\"color-scheme\" content=\"light dark\" />\n    <title>Vite + Preact</title>\n  </head>\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.tsx\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/preact/sorting/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-preact-sorting\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"start\": \"vite\",\n    \"lint\": \"eslint ./src\",\n    \"test:types\": \"tsc\"\n  },\n  \"dependencies\": {\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"@tanstack/preact-table\": \"^9.0.0-alpha.16\",\n    \"preact\": \"^10.28.2\"\n  },\n  \"devDependencies\": {\n    \"@preact/preset-vite\": \"^2.10.3\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\"\n  }\n}\n"
  },
  {
    "path": "examples/preact/sorting/src/index.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n"
  },
  {
    "path": "examples/preact/sorting/src/main.tsx",
    "content": "import { render } from 'preact'\nimport { useMemo, useReducer, useState } from 'preact/hooks'\nimport './index.css'\nimport {\n  createSortedRowModel,\n  rowSortingFeature,\n  sortFns,\n  tableFeatures,\n  useTable,\n} from '@tanstack/preact-table'\nimport { makeData } from './makeData'\nimport type { ColumnDef, SortFn, SortingState } from '@tanstack/preact-table'\nimport type { Person } from './makeData'\n\nconst _features = tableFeatures({\n  rowSortingFeature,\n})\n\n// custom sorting logic for one of our enum columns\nconst sortStatusFn: SortFn<any, any> = (rowA, rowB, _columnId) => {\n  const statusA = rowA.original.status\n  const statusB = rowB.original.status\n  const statusOrder = ['single', 'complicated', 'relationship']\n  return statusOrder.indexOf(statusA) - statusOrder.indexOf(statusB)\n}\n\nfunction App() {\n  const rerender = useReducer(() => ({}), {})[1]\n\n  const columns = useMemo<Array<ColumnDef<typeof _features, Person>>>(\n    () => [\n      {\n        accessorKey: 'firstName',\n        cell: (info) => info.getValue(),\n        // this column will sort in ascending order by default since it is a string column\n      },\n      {\n        accessorFn: (row) => row.lastName,\n        id: 'lastName',\n        cell: (info) => info.getValue(),\n        header: () => <span>Last Name</span>,\n        sortUndefined: 'last', // force undefined values to the end\n        sortDescFirst: false, // first sort order will be ascending (nullable values can mess up auto detection of sort order)\n      },\n      {\n        accessorKey: 'age',\n        header: () => 'Age',\n        // this column will sort in descending order by default since it is a number column\n      },\n      {\n        accessorKey: 'visits',\n        header: () => <span>Visits</span>,\n        sortUndefined: 'last', // force undefined values to the end\n      },\n      {\n        accessorKey: 'status',\n        header: 'Status',\n        sortFn: sortStatusFn, // use our custom sorting function for this enum column\n      },\n      {\n        accessorKey: 'progress',\n        header: 'Profile Progress',\n        // enableSorting: false, // disable sorting for this column\n      },\n      {\n        accessorKey: 'rank',\n        header: 'Rank',\n        invertSorting: true, // invert the sorting order (golf score-like where smaller is better)\n      },\n      {\n        accessorKey: 'createdAt',\n        header: 'Created At',\n        // sortFn: 'datetime' //make sure table knows this is a datetime column (usually can detect if no null values)\n      },\n    ],\n    [],\n  )\n\n  const [data, setData] = useState(() => makeData(1_000))\n  const refreshData = () => setData(() => makeData(100_000)) // stress test with 100k rows\n\n  // optionally, manage sorting state in your own state management (although preact state causes more re-renders here than necessary)\n  const [sorting, setSorting] = useState<SortingState>([])\n\n  console.log('sorting', sorting)\n\n  const table = useTable(\n    {\n      _features,\n      _rowModels: {\n        sortedRowModel: createSortedRowModel(sortFns), // client-side sorting\n      },\n      columns,\n      data,\n      debugTable: true,\n      state: {\n        sorting,\n      },\n      onSortingChange: setSorting,\n      // no need to pass pageCount or rowCount with client-side pagination as it is calculated automatically\n      // autoResetPageIndex: false, // turn off page index reset when sorting or filtering - default on/true\n      // enableMultiSort: false, //Don't allow shift key to sort multiple columns - default on/true\n      // enableSorting: false, // - default on/true\n      // enableSortingRemoval: false, //Don't allow - default on/true\n      // isMultiSortEvent: (e) => true, //Make all clicks multi-sort - default requires `shift` key\n      // maxMultiSortColCount: 3, // only allow 3 columns to be sorted at once - default is Infinity\n    },\n    // (state) => ({ state }), // uncomment to subscribe to the entire table state (this is how it worked in v8 by default)\n  )\n\n  return (\n    <table.Subscribe selector={(state) => ({ sorting: state.sorting })}>\n      {(_state) => (\n        <div className=\"p-2\">\n          <div className=\"h-2\" />\n          <table>\n            <thead>\n              {table.getHeaderGroups().map((headerGroup) => (\n                <tr key={headerGroup.id}>\n                  {headerGroup.headers.map((header) => {\n                    return (\n                      <th key={header.id} colSpan={header.colSpan}>\n                        {header.isPlaceholder ? null : (\n                          <div\n                            className={\n                              header.column.getCanSort()\n                                ? 'cursor-pointer select-none'\n                                : ''\n                            }\n                            onClick={header.column.getToggleSortingHandler()}\n                            title={\n                              header.column.getCanSort()\n                                ? header.column.getNextSortingOrder() === 'asc'\n                                  ? 'Sort ascending'\n                                  : header.column.getNextSortingOrder() ===\n                                      'desc'\n                                    ? 'Sort descending'\n                                    : 'Clear sort'\n                                : undefined\n                            }\n                          >\n                            <table.FlexRender header={header} />\n                            {{\n                              asc: ' 🔼',\n                              desc: ' 🔽',\n                            }[header.column.getIsSorted() as string] ?? null}\n                          </div>\n                        )}\n                      </th>\n                    )\n                  })}\n                </tr>\n              ))}\n            </thead>\n            <tbody>\n              {table\n                .getRowModel()\n                .rows.slice(0, 10)\n                .map((row) => {\n                  return (\n                    <tr key={row.id}>\n                      {row.getAllCells().map((cell) => {\n                        return (\n                          <td key={cell.id}>\n                            <table.FlexRender cell={cell} />\n                          </td>\n                        )\n                      })}\n                    </tr>\n                  )\n                })}\n            </tbody>\n          </table>\n          <div>{table.getRowModel().rows.length.toLocaleString()} Rows</div>\n          <div>\n            <button onClick={() => rerender(0)}>Force Rerender</button>\n          </div>\n          <div>\n            <button onClick={() => refreshData()}>Refresh Data</button>\n          </div>\n          <table.Subscribe selector={(state) => state}>\n            {(state) => <pre>{JSON.stringify(state, null, 2)}</pre>}\n          </table.Subscribe>\n        </div>\n      )}\n    </table.Subscribe>\n  )\n}\n\nconst rootElement = document.getElementById('root')\nif (!rootElement) throw new Error('Failed to find the root element')\n\nrender(<App />, rootElement)\n"
  },
  {
    "path": "examples/preact/sorting/src/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = {\n  firstName: string\n  lastName: string | undefined\n  age: number\n  visits: number | undefined\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  rank: number\n  createdAt: Date\n  subRows?: Array<Person>\n}\n\nconst range = (len: number) => {\n  const arr: Array<number> = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (): Person => {\n  return {\n    firstName: faker.person.firstName(),\n    lastName: Math.random() < 0.1 ? undefined : faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: Math.random() < 0.1 ? undefined : faker.number.int(1000),\n    progress: faker.number.int(100),\n    createdAt: faker.date.anytime(),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0],\n    rank: faker.number.int(100),\n  }\n}\n\nexport function makeData(...lens: Array<number>) {\n  const makeDataLevel = (depth = 0): Array<Person> => {\n    const len = lens[depth]\n    return range(len).map((_d): Person => {\n      return {\n        ...newPerson(),\n        subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined,\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n"
  },
  {
    "path": "examples/preact/sorting/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"strictNullChecks\": true,\n    \"target\": \"ES2020\",\n    \"module\": \"ESNext\",\n    \"moduleResolution\": \"bundler\",\n    \"noEmit\": true,\n    \"allowJs\": true,\n    \"checkJs\": true,\n\n    /* Preact Config */\n    \"jsx\": \"react-jsx\",\n    \"jsxImportSource\": \"preact\",\n    \"skipLibCheck\": true,\n    \"paths\": {\n      \"react\": [\"./node_modules/preact/compat/\"],\n      \"react-dom\": [\"./node_modules/preact/compat/\"]\n    }\n  },\n  \"include\": [\"node_modules/vite/client.d.ts\", \"src/**/*\"],\n  \"exclude\": [\"dist/**/*\", \"node_modules\"]\n}\n"
  },
  {
    "path": "examples/preact/sorting/vite.config.ts",
    "content": "import { defineConfig } from 'vite'\nimport preact from '@preact/preset-vite'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [preact()],\n})\n"
  },
  {
    "path": "examples/react/basic-external-state/.gitignore",
    "content": "node_modules\n.DS_Store\ndist\ndist-ssr\n*.local\n"
  },
  {
    "path": "examples/react/basic-external-state/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run start` or `yarn start`\n"
  },
  {
    "path": "examples/react/basic-external-state/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite App</title>\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n    <script src=\"https://unpkg.com/react-scan/dist/auto.global.js\"></script>\n  </head>\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.tsx\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/react/basic-external-state/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-basic-external-state\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"start\": \"vite\",\n    \"lint\": \"eslint ./src\",\n    \"test:types\": \"tsc\"\n  },\n  \"dependencies\": {\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"@tanstack/react-store\": \"^0.9.2\",\n    \"@tanstack/react-table\": \"^9.0.0-alpha.19\",\n    \"react\": \"^19.2.4\",\n    \"react-dom\": \"^19.2.4\"\n  },\n  \"devDependencies\": {\n    \"@rollup/plugin-replace\": \"^6.0.3\",\n    \"@types/react\": \"^19.2.10\",\n    \"@types/react-dom\": \"^19.2.3\",\n    \"@vitejs/plugin-react\": \"^5.1.2\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\"\n  }\n}\n"
  },
  {
    "path": "examples/react/basic-external-state/src/index.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n"
  },
  {
    "path": "examples/react/basic-external-state/src/main.tsx",
    "content": "import React from 'react'\nimport ReactDOM from 'react-dom/client'\nimport './index.css'\nimport {\n  createColumnHelper,\n  createPaginatedRowModel,\n  createSortedRowModel,\n  rowPaginationFeature,\n  rowSortingFeature,\n  sortFns,\n  tableFeatures,\n  useTable,\n} from '@tanstack/react-table'\nimport { makeData } from './makeData'\nimport type { PaginationState, SortingState } from '@tanstack/react-table'\n\ntype Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  status: string\n  progress: number\n}\n\nconst _features = tableFeatures({\n  rowPaginationFeature,\n  rowSortingFeature,\n})\n\nconst columnHelper = createColumnHelper<typeof _features, Person>()\n\nconst columns = columnHelper.columns([\n  columnHelper.accessor('firstName', {\n    header: 'First Name',\n    cell: (info) => info.getValue(),\n  }),\n  columnHelper.accessor('lastName', {\n    header: 'Last Name',\n    cell: (info) => info.getValue(),\n  }),\n  columnHelper.accessor('age', {\n    header: 'Age',\n  }),\n  columnHelper.accessor('visits', {\n    header: 'Visits',\n  }),\n  columnHelper.accessor('status', {\n    header: 'Status',\n  }),\n  columnHelper.accessor('progress', {\n    header: 'Profile Progress',\n  }),\n])\n\nfunction App() {\n  const [data] = React.useState(() => makeData(1000))\n\n  const rerender = React.useReducer(() => ({}), {})[1]\n\n  // Manage sorting state with React.useState (although react state causes more re-renders here than necessary compared to using a store)\n  const [sorting, setSorting] = React.useState<SortingState>([])\n\n  // Manage pagination state with React.useState (although react state causes more re-renders here than necessary compared to using a store)\n  const [pagination, setPagination] = React.useState<PaginationState>({\n    pageIndex: 0,\n    pageSize: 10,\n  })\n\n  console.log('sorting', sorting)\n  console.log('pagination', pagination)\n\n  // Create the table and pass state + onChange handlers\n  const table = useTable({\n    _features,\n    _rowModels: {\n      sortedRowModel: createSortedRowModel(sortFns),\n      paginatedRowModel: createPaginatedRowModel(),\n    },\n    columns,\n    data,\n    state: {\n      sorting, // connect our sorting state back down to the table\n      pagination, // connect our pagination state back down to the table\n    },\n    onSortingChange: setSorting, // raise sorting state changes to our own state management\n    onPaginationChange: setPagination, // raise pagination state changes to our own state management\n  })\n\n  return (\n    <div className=\"p-2\">\n      <table>\n        <thead>\n          {table.getHeaderGroups().map((headerGroup) => (\n            <tr key={headerGroup.id}>\n              {headerGroup.headers.map((header) => (\n                <th key={header.id} colSpan={header.colSpan}>\n                  {header.isPlaceholder ? null : (\n                    <div\n                      className={\n                        header.column.getCanSort()\n                          ? 'cursor-pointer select-none'\n                          : ''\n                      }\n                      onClick={header.column.getToggleSortingHandler()}\n                    >\n                      <table.FlexRender header={header} />\n                      {{\n                        asc: ' 🔼',\n                        desc: ' 🔽',\n                      }[header.column.getIsSorted() as string] ?? null}\n                    </div>\n                  )}\n                </th>\n              ))}\n            </tr>\n          ))}\n        </thead>\n        <tbody>\n          {table.getRowModel().rows.map((row) => (\n            <tr key={row.id}>\n              {row.getAllCells().map((cell) => (\n                <td key={cell.id}>\n                  <table.FlexRender cell={cell} />\n                </td>\n              ))}\n            </tr>\n          ))}\n        </tbody>\n      </table>\n      <div className=\"h-2\" />\n      <div className=\"flex items-center gap-2\">\n        <button\n          className=\"border rounded p-1\"\n          onClick={() => table.setPageIndex(0)}\n          disabled={!table.getCanPreviousPage()}\n        >\n          {'<<'}\n        </button>\n        <button\n          className=\"border rounded p-1\"\n          onClick={() => table.previousPage()}\n          disabled={!table.getCanPreviousPage()}\n        >\n          {'<'}\n        </button>\n        <button\n          className=\"border rounded p-1\"\n          onClick={() => table.nextPage()}\n          disabled={!table.getCanNextPage()}\n        >\n          {'>'}\n        </button>\n        <button\n          className=\"border rounded p-1\"\n          onClick={() => table.setPageIndex(table.getPageCount() - 1)}\n          disabled={!table.getCanNextPage()}\n        >\n          {'>>'}\n        </button>\n        <span className=\"flex items-center gap-1\">\n          <div>Page</div>\n          <strong>\n            {pagination.pageIndex + 1} of {table.getPageCount()}\n          </strong>\n        </span>\n        <span className=\"flex items-center gap-1\">\n          | Go to page:\n          <input\n            type=\"number\"\n            min=\"1\"\n            max={table.getPageCount()}\n            defaultValue={pagination.pageIndex + 1}\n            onChange={(e) => {\n              const page = e.target.value ? Number(e.target.value) - 1 : 0\n              table.setPageIndex(page)\n            }}\n            className=\"border p-1 rounded w-16\"\n          />\n        </span>\n        <select\n          value={pagination.pageSize}\n          onChange={(e) => {\n            table.setPageSize(Number(e.target.value))\n          }}\n        >\n          {[10, 20, 30, 40, 50].map((pageSize) => (\n            <option key={pageSize} value={pageSize}>\n              Show {pageSize}\n            </option>\n          ))}\n        </select>\n      </div>\n      <div className=\"h-4\" />\n      <button onClick={() => rerender()} className=\"border p-2\">\n        Rerender\n      </button>\n      <pre>{JSON.stringify({ sorting, pagination }, null, 2)}</pre>\n    </div>\n  )\n}\n\nconst rootElement = document.getElementById('root')\nif (!rootElement) throw new Error('Failed to find the root element')\n\nReactDOM.createRoot(rootElement).render(\n  <React.StrictMode>\n    <App />\n  </React.StrictMode>,\n)\n"
  },
  {
    "path": "examples/react/basic-external-state/src/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  subRows?: Array<Person>\n}\n\nconst range = (len: number) => {\n  const arr: Array<number> = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (): Person => {\n  return {\n    firstName: faker.person.firstName(),\n    lastName: faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: faker.number.int(1000),\n    progress: faker.number.int(100),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0],\n  }\n}\n\nexport function makeData(...lens: Array<number>) {\n  const makeDataLevel = (depth = 0): Array<Person> => {\n    const len = lens[depth]\n    return range(len).map((_d): Person => {\n      return {\n        ...newPerson(),\n        subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined,\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n"
  },
  {
    "path": "examples/react/basic-external-state/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"module\": \"ESNext\",\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"react-jsx\",\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "examples/react/basic-external-state/vite.config.js",
    "content": "import { defineConfig } from 'vite'\nimport react from '@vitejs/plugin-react'\nimport rollupReplace from '@rollup/plugin-replace'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [\n    rollupReplace({\n      preventAssignment: true,\n      values: {\n        __DEV__: JSON.stringify(true),\n        'process.env.NODE_ENV': JSON.stringify('development'),\n      },\n    }),\n    react(),\n  ],\n})\n"
  },
  {
    "path": "examples/react/basic-external-store/.gitignore",
    "content": "node_modules\n.DS_Store\ndist\ndist-ssr\n*.local\n"
  },
  {
    "path": "examples/react/basic-external-store/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run start` or `yarn start`\n"
  },
  {
    "path": "examples/react/basic-external-store/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite App</title>\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n    <script src=\"https://unpkg.com/react-scan/dist/auto.global.js\"></script>\n  </head>\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.tsx\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/react/basic-external-store/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-basic-external-store\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"start\": \"vite\",\n    \"lint\": \"eslint ./src\",\n    \"test:types\": \"tsc\"\n  },\n  \"dependencies\": {\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"@tanstack/react-store\": \"^0.9.2\",\n    \"@tanstack/react-table\": \"^9.0.0-alpha.19\",\n    \"react\": \"^19.2.4\",\n    \"react-dom\": \"^19.2.4\"\n  },\n  \"devDependencies\": {\n    \"@rollup/plugin-replace\": \"^6.0.3\",\n    \"@types/react\": \"^19.2.10\",\n    \"@types/react-dom\": \"^19.2.3\",\n    \"@vitejs/plugin-react\": \"^5.1.2\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\"\n  }\n}\n"
  },
  {
    "path": "examples/react/basic-external-store/src/index.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n"
  },
  {
    "path": "examples/react/basic-external-store/src/main.tsx",
    "content": "import React from 'react'\nimport ReactDOM from 'react-dom/client'\nimport './index.css'\nimport { createStore, useStore } from '@tanstack/react-store'\nimport {\n  createColumnHelper,\n  createPaginatedRowModel,\n  createSortedRowModel,\n  getInitialTableState,\n  rowPaginationFeature,\n  rowSortingFeature,\n  sortFns,\n  tableFeatures,\n  useTable,\n} from '@tanstack/react-table'\nimport { makeData } from './makeData'\n\ntype Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  status: string\n  progress: number\n}\n\nconst _features = tableFeatures({\n  rowPaginationFeature,\n  rowSortingFeature,\n})\n\nconst columnHelper = createColumnHelper<typeof _features, Person>()\n\nconst columns = columnHelper.columns([\n  columnHelper.accessor('firstName', {\n    header: 'First Name',\n    cell: (info) => info.getValue(),\n  }),\n  columnHelper.accessor('lastName', {\n    header: 'Last Name',\n    cell: (info) => info.getValue(),\n  }),\n  columnHelper.accessor('age', {\n    header: 'Age',\n  }),\n  columnHelper.accessor('visits', {\n    header: 'Visits',\n  }),\n  columnHelper.accessor('status', {\n    header: 'Status',\n  }),\n  columnHelper.accessor('progress', {\n    header: 'Profile Progress',\n  }),\n])\n\nfunction App() {\n  const [data] = React.useState(() => makeData(1000))\n\n  const rerender = React.useReducer(() => ({}), {})[1]\n\n  // create our own TanStack Store in our own scope (This could just be a global store if defined outside of this component)\n  const [myTableStore] = React.useState(() =>\n    createStore(\n      getInitialTableState(\n        _features, // get default initial state from features\n        // custom initial state\n        {\n          sorting: [],\n          pagination: { pageIndex: 0, pageSize: 10 },\n        },\n      ),\n    ),\n  )\n\n  // Subscribe to store state for reactive updates, custom selector available too\n  const state = useStore(myTableStore, (state) => state)\n\n  console.log('state', state)\n\n  // Create the table and pass your store\n  const table = useTable({\n    _features,\n    _rowModels: {\n      sortedRowModel: createSortedRowModel(sortFns),\n      paginatedRowModel: createPaginatedRowModel(),\n    },\n    columns,\n    data,\n    store: myTableStore,\n    debugTable: state.pagination.pageIndex > 2,\n  })\n\n  return (\n    <div className=\"p-2\">\n      <table>\n        <thead>\n          {table.getHeaderGroups().map((headerGroup) => (\n            <tr key={headerGroup.id}>\n              {headerGroup.headers.map((header) => (\n                <th key={header.id} colSpan={header.colSpan}>\n                  {header.isPlaceholder ? null : (\n                    <div\n                      className={\n                        header.column.getCanSort()\n                          ? 'cursor-pointer select-none'\n                          : ''\n                      }\n                      onClick={header.column.getToggleSortingHandler()}\n                    >\n                      <table.FlexRender header={header} />\n                      {{\n                        asc: ' 🔼',\n                        desc: ' 🔽',\n                      }[header.column.getIsSorted() as string] ?? null}\n                    </div>\n                  )}\n                </th>\n              ))}\n            </tr>\n          ))}\n        </thead>\n        <tbody>\n          {table.getRowModel().rows.map((row) => (\n            <tr key={row.id}>\n              {row.getAllCells().map((cell) => (\n                <td key={cell.id}>\n                  <table.FlexRender cell={cell} />\n                </td>\n              ))}\n            </tr>\n          ))}\n        </tbody>\n      </table>\n      <div className=\"h-2\" />\n      <div className=\"flex items-center gap-2\">\n        <button\n          className=\"border rounded p-1\"\n          onClick={() => table.setPageIndex(0)}\n          disabled={!table.getCanPreviousPage()}\n        >\n          {'<<'}\n        </button>\n        <button\n          className=\"border rounded p-1\"\n          onClick={() => table.previousPage()}\n          disabled={!table.getCanPreviousPage()}\n        >\n          {'<'}\n        </button>\n        <button\n          className=\"border rounded p-1\"\n          onClick={() => table.nextPage()}\n          disabled={!table.getCanNextPage()}\n        >\n          {'>'}\n        </button>\n        <button\n          className=\"border rounded p-1\"\n          onClick={() => table.setPageIndex(table.getPageCount() - 1)}\n          disabled={!table.getCanNextPage()}\n        >\n          {'>>'}\n        </button>\n        <span className=\"flex items-center gap-1\">\n          <div>Page</div>\n          <strong>\n            {state.pagination.pageIndex + 1} of {table.getPageCount()}\n          </strong>\n        </span>\n        <span className=\"flex items-center gap-1\">\n          | Go to page:\n          <input\n            type=\"number\"\n            min=\"1\"\n            max={table.getPageCount()}\n            defaultValue={state.pagination.pageIndex + 1}\n            onChange={(e) => {\n              const page = e.target.value ? Number(e.target.value) - 1 : 0\n              table.setPageIndex(page)\n            }}\n            className=\"border p-1 rounded w-16\"\n          />\n        </span>\n        <select\n          value={state.pagination.pageSize}\n          onChange={(e) => {\n            table.setPageSize(Number(e.target.value))\n          }}\n        >\n          {[10, 20, 30, 40, 50].map((pageSize) => (\n            <option key={pageSize} value={pageSize}>\n              Show {pageSize}\n            </option>\n          ))}\n        </select>\n      </div>\n      <div className=\"h-4\" />\n      <button onClick={() => rerender()} className=\"border p-2\">\n        Rerender\n      </button>\n      <pre>{JSON.stringify(state, null, 2)}</pre>\n    </div>\n  )\n}\n\nconst rootElement = document.getElementById('root')\nif (!rootElement) throw new Error('Failed to find the root element')\n\nReactDOM.createRoot(rootElement).render(\n  <React.StrictMode>\n    <App />\n  </React.StrictMode>,\n)\n"
  },
  {
    "path": "examples/react/basic-external-store/src/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  subRows?: Array<Person>\n}\n\nconst range = (len: number) => {\n  const arr: Array<number> = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (): Person => {\n  return {\n    firstName: faker.person.firstName(),\n    lastName: faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: faker.number.int(1000),\n    progress: faker.number.int(100),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0],\n  }\n}\n\nexport function makeData(...lens: Array<number>) {\n  const makeDataLevel = (depth = 0): Array<Person> => {\n    const len = lens[depth]\n    return range(len).map((_d): Person => {\n      return {\n        ...newPerson(),\n        subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined,\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n"
  },
  {
    "path": "examples/react/basic-external-store/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"module\": \"ESNext\",\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"react-jsx\",\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "examples/react/basic-external-store/vite.config.js",
    "content": "import { defineConfig } from 'vite'\nimport react from '@vitejs/plugin-react'\nimport rollupReplace from '@rollup/plugin-replace'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [\n    rollupReplace({\n      preventAssignment: true,\n      values: {\n        __DEV__: JSON.stringify(true),\n        'process.env.NODE_ENV': JSON.stringify('development'),\n      },\n    }),\n    react(),\n  ],\n})\n"
  },
  {
    "path": "examples/react/basic-shadcn/.gitignore",
    "content": "node_modules\n.DS_Store\ndist\ndist-ssr\n*.local\n!lib\n"
  },
  {
    "path": "examples/react/basic-shadcn/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run start` or `yarn start`\n"
  },
  {
    "path": "examples/react/basic-shadcn/components.json",
    "content": "{\n  \"$schema\": \"https://ui.shadcn.com/schema.json\",\n  \"style\": \"new-york\",\n  \"rsc\": false,\n  \"tsx\": true,\n  \"tailwind\": {\n    \"config\": \"\",\n    \"css\": \"src/index.css\",\n    \"baseColor\": \"zinc\",\n    \"cssVariables\": true,\n    \"prefix\": \"\"\n  },\n  \"aliases\": {\n    \"components\": \"@/components\",\n    \"utils\": \"@/lib/utils\",\n    \"ui\": \"@/components/ui\",\n    \"lib\": \"@/lib\",\n    \"hooks\": \"@/hooks\"\n  },\n  \"iconLibrary\": \"lucide\"\n}\n"
  },
  {
    "path": "examples/react/basic-shadcn/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite App</title>\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n    <script src=\"https://unpkg.com/react-scan/dist/auto.global.js\"></script>\n  </head>\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.tsx\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/react/basic-shadcn/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-basic-shadcn\",\n  \"version\": \"0.0.0\",\n  \"type\": \"module\",\n  \"private\": true,\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"start\": \"vite\",\n    \"lint\": \"eslint ./src\",\n    \"test:types\": \"tsc\"\n  },\n  \"dependencies\": {\n    \"@radix-ui/react-slot\": \"^1.2.4\",\n    \"@tailwindcss/vite\": \"^4.1.18\",\n    \"@tanstack/react-table\": \"^9.0.0-alpha.19\",\n    \"class-variance-authority\": \"^0.7.1\",\n    \"clsx\": \"^2.1.1\",\n    \"lucide-react\": \"^0.563.0\",\n    \"react\": \"^19.2.4\",\n    \"react-dom\": \"^19.2.4\",\n    \"tailwind-merge\": \"^3.4.0\",\n    \"tailwindcss\": \"^4.1.18\",\n    \"tailwindcss-animate\": \"^1.0.7\"\n  },\n  \"devDependencies\": {\n    \"@rollup/plugin-replace\": \"^6.0.3\",\n    \"@types/react\": \"^19.2.10\",\n    \"@types/react-dom\": \"^19.2.3\",\n    \"@vitejs/plugin-react\": \"^5.1.2\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\"\n  }\n}\n"
  },
  {
    "path": "examples/react/basic-shadcn/src/components/ui/button.tsx",
    "content": "import * as React from 'react'\nimport { Slot } from '@radix-ui/react-slot'\nimport { cva } from 'class-variance-authority'\nimport type { VariantProps } from 'class-variance-authority'\n\nimport { cn } from '@/lib/utils'\n\nconst buttonVariants = cva(\n  \"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-[color,box-shadow] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 ring-ring/10 dark:ring-ring/20 dark:outline-ring/40 outline-ring/50 focus-visible:ring-4 focus-visible:outline-1 aria-invalid:focus-visible:ring-0\",\n  {\n    variants: {\n      variant: {\n        default:\n          'bg-primary text-primary-foreground shadow-sm hover:bg-primary/90',\n        destructive:\n          'bg-destructive text-destructive-foreground shadow-xs hover:bg-destructive/90',\n        outline:\n          'border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground',\n        secondary:\n          'bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80',\n        ghost: 'hover:bg-accent hover:text-accent-foreground',\n        link: 'text-primary underline-offset-4 hover:underline',\n      },\n      size: {\n        default: 'h-9 px-4 py-2 has-[>svg]:px-3',\n        sm: 'h-8 rounded-md px-3 has-[>svg]:px-2.5',\n        lg: 'h-10 rounded-md px-6 has-[>svg]:px-4',\n        icon: 'size-9',\n      },\n    },\n    defaultVariants: {\n      variant: 'default',\n      size: 'default',\n    },\n  },\n)\n\nfunction Button({\n  className,\n  variant,\n  size,\n  asChild = false,\n  ...props\n}: React.ComponentProps<'button'> &\n  VariantProps<typeof buttonVariants> & {\n    asChild?: boolean\n  }) {\n  const Comp = asChild ? Slot : 'button'\n\n  return (\n    <Comp\n      data-slot=\"button\"\n      className={cn(buttonVariants({ variant, size, className }))}\n      {...props}\n    />\n  )\n}\n\nexport { Button, buttonVariants }\n"
  },
  {
    "path": "examples/react/basic-shadcn/src/components/ui/table.tsx",
    "content": "import * as React from 'react'\n\nimport { cn } from '@/lib/utils'\n\nfunction Table({ className, ...props }: React.ComponentProps<'table'>) {\n  return (\n    <div className=\"relative w-full overflow-auto\">\n      <table\n        data-slot=\"table\"\n        className={cn('w-full caption-bottom text-sm', className)}\n        {...props}\n      />\n    </div>\n  )\n}\n\nfunction TableHeader({ className, ...props }: React.ComponentProps<'thead'>) {\n  return (\n    <thead\n      data-slot=\"table-header\"\n      className={cn('[&_tr]:border-b', className)}\n      {...props}\n    />\n  )\n}\n\nfunction TableBody({ className, ...props }: React.ComponentProps<'tbody'>) {\n  return (\n    <tbody\n      data-slot=\"table-body\"\n      className={cn('[&_tr:last-child]:border-0', className)}\n      {...props}\n    />\n  )\n}\n\nfunction TableFooter({ className, ...props }: React.ComponentProps<'tfoot'>) {\n  return (\n    <tfoot\n      data-slot=\"table-footer\"\n      className={cn(\n        'bg-muted/50 border-t font-medium [&>tr]:last:border-b-0',\n        className,\n      )}\n      {...props}\n    />\n  )\n}\n\nfunction TableRow({ className, ...props }: React.ComponentProps<'tr'>) {\n  return (\n    <tr\n      data-slot=\"table-row\"\n      className={cn(\n        'hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors',\n        className,\n      )}\n      {...props}\n    />\n  )\n}\n\nfunction TableHead({ className, ...props }: React.ComponentProps<'th'>) {\n  return (\n    <th\n      data-slot=\"table-head\"\n      className={cn(\n        'text-muted-foreground h-10 px-2 text-left align-middle font-medium [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]',\n        className,\n      )}\n      {...props}\n    />\n  )\n}\n\nfunction TableCell({ className, ...props }: React.ComponentProps<'td'>) {\n  return (\n    <td\n      data-slot=\"table-cell\"\n      className={cn(\n        'p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]',\n        className,\n      )}\n      {...props}\n    />\n  )\n}\n\nfunction TableCaption({\n  className,\n  ...props\n}: React.ComponentProps<'caption'>) {\n  return (\n    <caption\n      data-slot=\"table-caption\"\n      className={cn('text-muted-foreground mt-4 text-sm', className)}\n      {...props}\n    />\n  )\n}\n\nexport {\n  Table,\n  TableHeader,\n  TableBody,\n  TableFooter,\n  TableHead,\n  TableRow,\n  TableCell,\n  TableCaption,\n}\n"
  },
  {
    "path": "examples/react/basic-shadcn/src/index.css",
    "content": "@import 'tailwindcss' source('../');\n\n@plugin 'tailwindcss-animate';\n\n@custom-variant dark (&:is(.dark *));\n\n:root {\n  --background: hsl(0 0% 100%);\n  --foreground: hsl(240 10% 3.9%);\n  --card: hsl(0 0% 100%);\n  --card-foreground: hsl(240 10% 3.9%);\n  --popover: hsl(0 0% 100%);\n  --popover-foreground: hsl(240 10% 3.9%);\n  --primary: hsl(240 5.9% 10%);\n  --primary-foreground: hsl(0 0% 98%);\n  --secondary: hsl(240 4.8% 95.9%);\n  --secondary-foreground: hsl(240 5.9% 10%);\n  --muted: hsl(240 4.8% 95.9%);\n  --muted-foreground: hsl(240 3.8% 46.1%);\n  --accent: hsl(240 4.8% 95.9%);\n  --accent-foreground: hsl(240 5.9% 10%);\n  --destructive: hsl(0 84.2% 60.2%);\n  --destructive-foreground: hsl(0 0% 98%);\n  --border: hsl(240 5.9% 90%);\n  --input: hsl(240 5.9% 90%);\n  --ring: hsl(240 10% 3.9%);\n  --chart-1: hsl(12 76% 61%);\n  --chart-2: hsl(173 58% 39%);\n  --chart-3: hsl(197 37% 24%);\n  --chart-4: hsl(43 74% 66%);\n  --chart-5: hsl(27 87% 67%);\n  --radius: 0.6rem;\n}\n\n.dark {\n  --background: hsl(240 10% 3.9%);\n  --foreground: hsl(0 0% 98%);\n  --card: hsl(240 10% 3.9%);\n  --card-foreground: hsl(0 0% 98%);\n  --popover: hsl(240 10% 3.9%);\n  --popover-foreground: hsl(0 0% 98%);\n  --primary: hsl(0 0% 98%);\n  --primary-foreground: hsl(240 5.9% 10%);\n  --secondary: hsl(240 3.7% 15.9%);\n  --secondary-foreground: hsl(0 0% 98%);\n  --muted: hsl(240 3.7% 15.9%);\n  --muted-foreground: hsl(240 5% 64.9%);\n  --accent: hsl(240 3.7% 15.9%);\n  --accent-foreground: hsl(0 0% 98%);\n  --destructive: hsl(0 62.8% 30.6%);\n  --destructive-foreground: hsl(0 0% 98%);\n  --border: hsl(240 3.7% 15.9%);\n  --input: hsl(240 3.7% 15.9%);\n  --ring: hsl(240 4.9% 83.9%);\n  --chart-1: hsl(220 70% 50%);\n  --chart-2: hsl(160 60% 45%);\n  --chart-3: hsl(30 80% 55%);\n  --chart-4: hsl(280 65% 60%);\n  --chart-5: hsl(340 75% 55%);\n}\n\n@theme inline {\n  --color-background: var(--background);\n  --color-foreground: var(--foreground);\n  --color-card: var(--card);\n  --color-card-foreground: var(--card-foreground);\n  --color-popover: var(--popover);\n  --color-popover-foreground: var(--popover-foreground);\n  --color-primary: var(--primary);\n  --color-primary-foreground: var(--primary-foreground);\n  --color-secondary: var(--secondary);\n  --color-secondary-foreground: var(--secondary-foreground);\n  --color-muted: var(--muted);\n  --color-muted-foreground: var(--muted-foreground);\n  --color-accent: var(--accent);\n  --color-accent-foreground: var(--accent-foreground);\n  --color-destructive: var(--destructive);\n  --color-destructive-foreground: var(--destructive-foreground);\n  --color-border: var(--border);\n  --color-input: var(--input);\n  --color-ring: var(--ring);\n  --color-chart-1: var(--chart-1);\n  --color-chart-2: var(--chart-2);\n  --color-chart-3: var(--chart-3);\n  --color-chart-4: var(--chart-4);\n  --color-chart-5: var(--chart-5);\n  --radius-sm: calc(var(--radius) - 4px);\n  --radius-md: calc(var(--radius) - 2px);\n  --radius-lg: var(--radius);\n  --radius-xl: calc(var(--radius) + 4px);\n}\n\n@layer base {\n  * {\n    @apply border-border outline-ring/50;\n  }\n  body {\n    @apply bg-background text-foreground;\n  }\n}\n"
  },
  {
    "path": "examples/react/basic-shadcn/src/lib/utils.ts",
    "content": "import { clsx } from 'clsx'\nimport { twMerge } from 'tailwind-merge'\nimport type { ClassValue } from 'clsx'\n\nexport function cn(...inputs: Array<ClassValue>) {\n  return twMerge(clsx(inputs))\n}\n"
  },
  {
    "path": "examples/react/basic-shadcn/src/main.tsx",
    "content": "import * as React from 'react'\nimport ReactDOM from 'react-dom/client'\nimport { tableFeatures, useTable } from '@tanstack/react-table'\nimport { Button } from './components/ui/button'\nimport {\n  Table,\n  TableBody,\n  TableCell,\n  TableFooter,\n  TableHeader,\n  TableRow,\n} from './components/ui/table'\nimport type { ColumnDef } from '@tanstack/react-table'\nimport './index.css'\n// This example uses the classic standalone `useTable` hook to create a table without the new `createTableHelper` util.\n\n// 1. Define what the shape of your data will be for each row\ntype Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  status: string\n  progress: number\n}\n\n// 2. Create some dummy data with a stable reference (this could be an API response stored in useState or similar)\nconst defaultData: Array<Person> = [\n  {\n    firstName: 'tanner',\n    lastName: 'linsley',\n    age: 24,\n    visits: 100,\n    status: 'In Relationship',\n    progress: 50,\n  },\n  {\n    firstName: 'tandy',\n    lastName: 'miller',\n    age: 40,\n    visits: 40,\n    status: 'Single',\n    progress: 80,\n  },\n  {\n    firstName: 'joe',\n    lastName: 'dirte',\n    age: 45,\n    visits: 20,\n    status: 'Complicated',\n    progress: 10,\n  },\n  {\n    firstName: 'kevin',\n    lastName: 'vandy',\n    age: 12,\n    visits: 100,\n    status: 'Single',\n    progress: 70,\n  },\n]\n\n// 3. New in V9! Tell the table which features and row models we want to use. In this case, this will be a basic table with no additional features\nconst _features = tableFeatures({}) // util method to create sharable TFeatures object/type\n\n// 4. Define the columns for your table. This uses the new `ColumnDef` type to define columns. Alternatively, check out the createTableHelper/createColumnHelper util for an even more type-safe way to define columns.\nconst columns: Array<ColumnDef<typeof _features, Person>> = [\n  {\n    accessorKey: 'firstName', // accessorKey method (most common for simple use-cases)\n    header: 'First Name',\n    cell: (info) => info.getValue(),\n  },\n  {\n    accessorFn: (row) => row.lastName, // accessorFn used (alternative) along with a custom id\n    id: 'lastName',\n    header: () => <span>Last Name</span>,\n    cell: (info) => <i>{info.getValue<string>()}</i>,\n  },\n  {\n    accessorFn: (row) => Number(row.age), // accessorFn used to transform the data\n    id: 'age',\n    header: () => 'Age',\n    cell: (info) => {\n      return info.renderValue()\n    },\n  },\n  {\n    accessorKey: 'visits',\n    header: () => <span>Visits</span>,\n  },\n  {\n    accessorKey: 'status',\n    header: 'Status',\n  },\n  {\n    accessorKey: 'progress',\n    header: 'Profile Progress',\n  },\n]\n\nfunction App() {\n  // 5. Store data with a stable reference\n  const [data, _setData] = React.useState(() => [...defaultData])\n  const rerender = React.useReducer(() => ({}), {})[1]\n\n  // 6. Create the table instance with required _features, columns, and data\n  const table = useTable({\n    _features, // new required option in V9. Tell the table which features you are importing and using (better tree-shaking)\n    _rowModels: {}, // `Core` row model is now included by default, but you can still override it here\n    columns,\n    data,\n    // add additional table options here\n  })\n\n  // 7. Render your table markup from the table instance APIs\n  return (\n    <div className=\"p-2\">\n      <Table className=\"border\">\n        <TableHeader className=\"bg-gray-200\">\n          {table.getHeaderGroups().map((headerGroup) => (\n            <tr key={headerGroup.id}>\n              {headerGroup.headers.map((header) => (\n                <th key={header.id}>\n                  {header.isPlaceholder ? null : (\n                    <table.FlexRender header={header} />\n                  )}\n                </th>\n              ))}\n            </tr>\n          ))}\n        </TableHeader>\n        <TableBody>\n          {table.getRowModel().rows.map((row) => (\n            <TableRow key={row.id}>\n              {row.getAllCells().map((cell) => (\n                <TableCell key={cell.id} className=\"border\">\n                  <table.FlexRender cell={cell} />\n                </TableCell>\n              ))}\n            </TableRow>\n          ))}\n        </TableBody>\n        <TableFooter>\n          {table.getFooterGroups().map((footerGroup) => (\n            <tr key={footerGroup.id}>\n              {footerGroup.headers.map((header) => (\n                <th key={header.id}>\n                  {header.isPlaceholder ? null : (\n                    <table.FlexRender footer={header} />\n                  )}\n                </th>\n              ))}\n            </tr>\n          ))}\n        </TableFooter>\n      </Table>\n      <div className=\"h-4\" />\n      <Button variant=\"outline\" onClick={() => rerender()}>\n        Rerender\n      </Button>\n    </div>\n  )\n}\n\nconst rootElement = document.getElementById('root')\nif (!rootElement) throw new Error('Failed to find the root element')\n\nReactDOM.createRoot(rootElement).render(\n  <React.StrictMode>\n    <App />\n  </React.StrictMode>,\n)\n"
  },
  {
    "path": "examples/react/basic-shadcn/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"module\": \"ESNext\",\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"react-jsx\",\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true,\n\n    \"baseUrl\": \".\",\n    \"paths\": {\n      \"@/*\": [\"src/*\"]\n    }\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "examples/react/basic-shadcn/vite.config.js",
    "content": "import { defineConfig } from 'vite'\nimport react from '@vitejs/plugin-react'\nimport rollupReplace from '@rollup/plugin-replace'\nimport tailwindcss from '@tailwindcss/vite'\nimport * as path from 'path'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [\n    rollupReplace({\n      preventAssignment: true,\n      values: {\n        __DEV__: JSON.stringify(true),\n        'process.env.NODE_ENV': JSON.stringify('development'),\n      },\n    }),\n    react(),\n    tailwindcss(),\n  ],\n  resolve: {\n    alias: {\n      '@': path.resolve(__dirname, './src'),\n    },\n  },\n})\n"
  },
  {
    "path": "examples/react/basic-use-app-table/.gitignore",
    "content": "node_modules\n.DS_Store\ndist\ndist-ssr\n*.local\n"
  },
  {
    "path": "examples/react/basic-use-app-table/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run start` or `yarn start`\n"
  },
  {
    "path": "examples/react/basic-use-app-table/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite App</title>\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n    <script src=\"https://unpkg.com/react-scan/dist/auto.global.js\"></script>\n  </head>\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.tsx\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/react/basic-use-app-table/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-basic-use-app-table\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"start\": \"vite\",\n    \"lint\": \"eslint ./src\",\n    \"test:types\": \"tsc\"\n  },\n  \"dependencies\": {\n    \"@tanstack/react-table\": \"^9.0.0-alpha.19\",\n    \"react\": \"^19.2.4\",\n    \"react-dom\": \"^19.2.4\"\n  },\n  \"devDependencies\": {\n    \"@rollup/plugin-replace\": \"^6.0.3\",\n    \"@types/react\": \"^19.2.10\",\n    \"@types/react-dom\": \"^19.2.3\",\n    \"@vitejs/plugin-react\": \"^5.1.2\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\"\n  }\n}\n"
  },
  {
    "path": "examples/react/basic-use-app-table/src/index.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n"
  },
  {
    "path": "examples/react/basic-use-app-table/src/main.tsx",
    "content": "import * as React from 'react'\nimport ReactDOM from 'react-dom/client'\nimport { createTableHook } from '@tanstack/react-table'\nimport './index.css'\n\n// This example uses the new `createTableHook` method to create a re-usable table hook factory instead of independently using the standalone `useTable` hook and `createColumnHelper` method. You can choose to use either way.\n\n// 1. Define what the shape of your data will be for each row\ntype Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  status: string\n  progress: number\n}\n\n// 2. Create some dummy data with a stable reference (this could be an API response stored in useState or similar)\nconst defaultData: Array<Person> = [\n  {\n    firstName: 'tanner',\n    lastName: 'linsley',\n    age: 24,\n    visits: 100,\n    status: 'In Relationship',\n    progress: 50,\n  },\n  {\n    firstName: 'tandy',\n    lastName: 'miller',\n    age: 40,\n    visits: 40,\n    status: 'Single',\n    progress: 80,\n  },\n  {\n    firstName: 'joe',\n    lastName: 'dirte',\n    age: 45,\n    visits: 20,\n    status: 'Complicated',\n    progress: 10,\n  },\n  {\n    firstName: 'kevin',\n    lastName: 'vandy',\n    age: 28,\n    visits: 100,\n    status: 'Single',\n    progress: 70,\n  },\n]\n\n// 3. New in V9! Tell the table which features and row models we want to use. In this case, this will be a basic table with no additional features\nconst { useAppTable, createAppColumnHelper } = createTableHook({\n  _features: {},\n  _rowModels: {}, // client-side row models. `Core` row model is now included by default, but you can still override it here\n  debugTable: true,\n})\n\n// 4. Create a helper object to help define our columns\nconst columnHelper = createAppColumnHelper<Person>()\n\n// 5. Define the columns for your table with a stable reference (in this case, defined statically outside of a react component)\nconst columns = columnHelper.columns([\n  // accessorKey method (most common for simple use-cases)\n  columnHelper.accessor('firstName', {\n    cell: (info) => info.getValue(),\n    footer: (info) => info.column.id,\n  }),\n  // accessorFn used (alternative) along with a custom id\n  columnHelper.accessor((row) => row.lastName, {\n    id: 'lastName',\n    cell: (info) => <i>{info.getValue()}</i>,\n    header: () => <span>Last Name</span>,\n    footer: (info) => info.column.id,\n  }),\n  // accessorFn used to transform the data\n  columnHelper.accessor((row) => Number(row.age), {\n    id: 'age',\n    header: () => 'Age',\n    cell: (info) => info.renderValue(),\n    footer: (info) => info.column.id,\n  }),\n  columnHelper.accessor('visits', {\n    header: () => <span>Visits</span>,\n    footer: (info) => info.column.id,\n  }),\n  columnHelper.accessor('status', {\n    header: 'Status',\n    footer: (info) => info.column.id,\n  }),\n  columnHelper.accessor('progress', {\n    header: 'Profile Progress',\n    footer: (info) => info.column.id,\n  }),\n])\n\nfunction App() {\n  // 6. Store data with a stable reference\n  const [data, _setData] = React.useState(() => [...defaultData])\n  const rerender = React.useReducer(() => ({}), {})[1]\n\n  // 7. Create the table instance with the required columns and data.\n  // Features and row models are already defined in the createTableHook call above\n  const table = useAppTable({\n    columns,\n    data,\n    // add additional table options here or in the createTableHook call above\n  })\n\n  // 8. Render your table markup from the table instance APIs\n  return (\n    <div className=\"p-2\">\n      <table>\n        <thead>\n          {table.getHeaderGroups().map((headerGroup) => (\n            <tr key={headerGroup.id}>\n              {headerGroup.headers.map((header) => (\n                <th key={header.id}>\n                  {header.isPlaceholder ? null : (\n                    <table.FlexRender header={header} />\n                  )}\n                </th>\n              ))}\n            </tr>\n          ))}\n        </thead>\n        <tbody>\n          {table.getRowModel().rows.map((row) => (\n            <tr key={row.id}>\n              {row.getAllCells().map((cell) => (\n                <td key={cell.id}>\n                  <table.FlexRender cell={cell} />\n                </td>\n              ))}\n            </tr>\n          ))}\n        </tbody>\n        <tfoot>\n          {table.getFooterGroups().map((footerGroup) => (\n            <tr key={footerGroup.id}>\n              {footerGroup.headers.map((header) => (\n                <th key={header.id}>\n                  {header.isPlaceholder ? null : (\n                    <table.FlexRender footer={header} />\n                  )}\n                </th>\n              ))}\n            </tr>\n          ))}\n        </tfoot>\n      </table>\n      <div className=\"h-4\" />\n      <button onClick={() => rerender()} className=\"border p-2\">\n        Rerender\n      </button>\n    </div>\n  )\n}\n\nconst rootElement = document.getElementById('root')\nif (!rootElement) throw new Error('Failed to find the root element')\n\nReactDOM.createRoot(rootElement).render(\n  <React.StrictMode>\n    <App />\n  </React.StrictMode>,\n)\n"
  },
  {
    "path": "examples/react/basic-use-app-table/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"module\": \"ESNext\",\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"react-jsx\",\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "examples/react/basic-use-app-table/vite.config.js",
    "content": "import { defineConfig } from 'vite'\nimport react from '@vitejs/plugin-react'\nimport rollupReplace from '@rollup/plugin-replace'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [\n    rollupReplace({\n      preventAssignment: true,\n      values: {\n        __DEV__: JSON.stringify(true),\n        'process.env.NODE_ENV': JSON.stringify('development'),\n      },\n    }),\n    react(),\n  ],\n})\n"
  },
  {
    "path": "examples/react/basic-use-legacy-table/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>TanStack Table - useLegacyTable Example</title>\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n    <script src=\"https://unpkg.com/react-scan/dist/auto.global.js\"></script>\n  </head>\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.tsx\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/react/basic-use-legacy-table/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-basic-use-legacy-table\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"start\": \"vite\",\n    \"lint\": \"eslint ./src\",\n    \"test:types\": \"tsc\"\n  },\n  \"dependencies\": {\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"@tanstack/react-table\": \"^9.0.0-alpha.19\",\n    \"react\": \"^19.2.4\",\n    \"react-dom\": \"^19.2.4\"\n  },\n  \"devDependencies\": {\n    \"@rollup/plugin-replace\": \"^6.0.3\",\n    \"@types/react\": \"^19.2.10\",\n    \"@types/react-dom\": \"^19.2.3\",\n    \"@vitejs/plugin-react\": \"^5.1.2\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\"\n  }\n}\n"
  },
  {
    "path": "examples/react/basic-use-legacy-table/src/index.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n"
  },
  {
    "path": "examples/react/basic-use-legacy-table/src/main.tsx",
    "content": "/**\n * This example demonstrates the useLegacyTable hook which provides\n * a v8-style API for easier migration from TanStack Table v8 to v9.\n *\n * Key differences from the v9 useTable hook:\n * - No need to define _features - all stock features are included\n * - Uses v8-style get*RowModel() options instead of _rowModels\n * - Subscribes to all state automatically (like v8 behavior)\n *\n * NOTE: useLegacyTable is deprecated and intended only as a migration aid.\n * New code should use useTable with explicit _features and _rowModels.\n */\nimport React from 'react'\nimport ReactDOM from 'react-dom/client'\nimport './index.css'\nimport { flexRender } from '@tanstack/react-table'\nimport {\n  getCoreRowModel,\n  getFilteredRowModel,\n  getPaginationRowModel,\n  getSortedRowModel,\n  legacyCreateColumnHelper,\n  useLegacyTable,\n} from '@tanstack/react-table/legacy'\nimport { makeData } from './makeData'\nimport type {\n  CellData,\n  ColumnFiltersState,\n  PaginationState,\n  RowData,\n  SortingState,\n  TableFeatures,\n} from '@tanstack/react-table'\nimport type { LegacyColumn } from '@tanstack/react-table/legacy' // legacy types\nimport type { Person } from './makeData'\n\ndeclare module '@tanstack/react-table' {\n  // allows us to define custom properties for our columns\n  interface ColumnMeta<\n    TFeatures extends TableFeatures,\n    TData extends RowData,\n    TValue extends CellData = CellData,\n  > {\n    filterVariant?: 'text' | 'range' | 'select'\n  }\n}\n\nconst columnHelper = legacyCreateColumnHelper<Person>()\n\nfunction App() {\n  const rerender = React.useReducer(() => ({}), {})[1]\n\n  const columns = React.useMemo(\n    () =>\n      columnHelper.columns([\n        columnHelper.accessor('firstName', {\n          cell: (info) => info.getValue(),\n        }),\n        columnHelper.accessor((row) => row.lastName, {\n          id: 'lastName',\n          cell: (info) => info.getValue(),\n          header: () => <span>Last Name</span>,\n        }),\n        columnHelper.accessor((row) => `${row.firstName} ${row.lastName}`, {\n          id: 'fullName',\n          header: 'Full Name',\n          cell: (info) => info.getValue(),\n        }),\n        columnHelper.accessor('age', {\n          header: () => 'Age',\n          meta: {\n            filterVariant: 'range',\n          },\n        }),\n        columnHelper.accessor('visits', {\n          header: () => <span>Visits</span>,\n          meta: {\n            filterVariant: 'range',\n          },\n        }),\n        columnHelper.accessor('status', {\n          header: 'Status',\n          meta: {\n            filterVariant: 'select',\n          },\n        }),\n        columnHelper.accessor('progress', {\n          header: 'Profile Progress',\n          meta: {\n            filterVariant: 'range',\n          },\n        }),\n      ]),\n    [],\n  )\n\n  const [data, setData] = React.useState<Array<Person>>(() => makeData(5_000))\n  const refreshData = () => setData((_old) => makeData(50_000)) // stress test\n\n  const [sorting, setSorting] = React.useState<SortingState>([])\n  const [columnFilters, setColumnFilters] = React.useState<ColumnFiltersState>(\n    [],\n  )\n  const [pagination, setPagination] = React.useState<PaginationState>({\n    pageIndex: 0,\n    pageSize: 10,\n  })\n\n  // Using useLegacyTable with the v8-style API!\n  // Notice how we use get*RowModel() options instead of _rowModels\n  // and we don't need to define _features\n  const table = useLegacyTable({\n    data,\n    columns,\n    // V8-style row model options (these are mapped to v9 _rowModels under the hood)\n    getCoreRowModel: getCoreRowModel(),\n    getFilteredRowModel: getFilteredRowModel(), // client side filtering\n    getSortedRowModel: getSortedRowModel(), // client side sorting\n    getPaginationRowModel: getPaginationRowModel(),\n    state: {\n      columnFilters,\n      pagination,\n      sorting,\n    },\n    onColumnFiltersChange: setColumnFilters,\n    onPaginationChange: setPagination,\n    onSortingChange: setSorting,\n    // Debug options work the same\n    debugTable: true,\n    debugColumns: true,\n  })\n\n  return (\n    <div className=\"p-2\">\n      <div className=\"mb-4 p-2 bg-yellow-100 border border-yellow-400 rounded\">\n        <strong>Migration Example:</strong> This example uses the deprecated{' '}\n        <code>useLegacyTable</code> hook with v8-style API. See the{' '}\n        <a href=\"../filters\" className=\"text-blue-600 underline\">\n          filters example\n        </a>{' '}\n        for the recommended v9 approach.\n      </div>\n\n      <table>\n        <thead>\n          {table.getHeaderGroups().map((headerGroup) => (\n            <tr key={headerGroup.id}>\n              {headerGroup.headers.map((header) => {\n                return (\n                  <th key={header.id} colSpan={header.colSpan}>\n                    {header.isPlaceholder ? null : (\n                      <>\n                        <div\n                          className={\n                            header.column.getCanSort()\n                              ? 'cursor-pointer select-none'\n                              : ''\n                          }\n                          onClick={header.column.getToggleSortingHandler()}\n                        >\n                          {/* With useLegacyTable, we use flexRender instead of table.FlexRender */}\n                          {flexRender(\n                            header.column.columnDef.header,\n                            header.getContext(),\n                          )}\n                          {{\n                            asc: ' 🔼',\n                            desc: ' 🔽',\n                          }[header.column.getIsSorted() as string] ?? null}\n                        </div>\n                        {header.column.getCanFilter() ? (\n                          <div>\n                            <Filter column={header.column} />\n                          </div>\n                        ) : null}\n                      </>\n                    )}\n                  </th>\n                )\n              })}\n            </tr>\n          ))}\n        </thead>\n        <tbody>\n          {table.getRowModel().rows.map((row) => {\n            return (\n              <tr key={row.id}>\n                {row.getAllCells().map((cell) => {\n                  return (\n                    <td key={cell.id}>\n                      {flexRender(\n                        cell.column.columnDef.cell,\n                        cell.getContext(),\n                      )}\n                    </td>\n                  )\n                })}\n              </tr>\n            )\n          })}\n        </tbody>\n      </table>\n      <div className=\"h-2\" />\n      <div className=\"flex items-center gap-2\">\n        <button\n          className=\"border rounded p-1\"\n          onClick={() => table.setPageIndex(0)}\n          disabled={!table.getCanPreviousPage()}\n        >\n          {'<<'}\n        </button>\n        <button\n          className=\"border rounded p-1\"\n          onClick={() => table.previousPage()}\n          disabled={!table.getCanPreviousPage()}\n        >\n          {'<'}\n        </button>\n        <button\n          className=\"border rounded p-1\"\n          onClick={() => table.nextPage()}\n          disabled={!table.getCanNextPage()}\n        >\n          {'>'}\n        </button>\n        <button\n          className=\"border rounded p-1\"\n          onClick={() => table.setPageIndex(table.getPageCount() - 1)}\n          disabled={!table.getCanNextPage()}\n        >\n          {'>>'}\n        </button>\n        <span className=\"flex items-center gap-1\">\n          <div>Page</div>\n          <strong>\n            {pagination.pageIndex + 1} of {table.getPageCount()}\n          </strong>\n        </span>\n        <span className=\"flex items-center gap-1\">\n          | Go to page:\n          <input\n            type=\"number\"\n            min=\"1\"\n            max={table.getPageCount()}\n            defaultValue={pagination.pageIndex + 1}\n            onChange={(e) => {\n              const page = e.target.value ? Number(e.target.value) - 1 : 0\n              table.setPageIndex(page)\n            }}\n            className=\"border p-1 rounded w-16\"\n          />\n        </span>\n        <select\n          value={pagination.pageSize}\n          onChange={(e) => {\n            table.setPageSize(Number(e.target.value))\n          }}\n        >\n          {[10, 20, 30, 40, 50].map((pageSize) => (\n            <option key={pageSize} value={pageSize}>\n              Show {pageSize}\n            </option>\n          ))}\n        </select>\n      </div>\n      <div>{table.getPrePaginatedRowModel().rows.length} Rows</div>\n      <div>\n        <button onClick={() => rerender()}>Force Rerender</button>\n      </div>\n      <div>\n        <button onClick={() => refreshData()}>Refresh Data</button>\n      </div>\n      <div className=\"mt-4\">\n        <h4 className=\"font-bold\">Current State:</h4>\n        <pre className=\"text-xs bg-gray-100 p-2 rounded overflow-auto max-h-64\">\n          {JSON.stringify({ columnFilters, pagination, sorting }, null, 2)}\n        </pre>\n      </div>\n    </div>\n  )\n}\n\nfunction Filter({ column }: { column: LegacyColumn<Person> }) {\n  const columnFilterValue = column.getFilterValue()\n  const { filterVariant } = column.columnDef.meta ?? {}\n\n  return filterVariant === 'range' ? (\n    <div>\n      <div className=\"flex space-x-2\">\n        {/* See faceted column filters example for min max values functionality */}\n        <DebouncedInput\n          type=\"number\"\n          value={(columnFilterValue as [number, number] | undefined)?.[0] ?? ''}\n          onChange={(value) =>\n            column.setFilterValue((old: [number, number] | undefined) => [\n              value,\n              old?.[1],\n            ])\n          }\n          placeholder={`Min`}\n          className=\"w-24 border shadow rounded\"\n        />\n        <DebouncedInput\n          type=\"number\"\n          value={(columnFilterValue as [number, number] | undefined)?.[1] ?? ''}\n          onChange={(value) =>\n            column.setFilterValue((old: [number, number] | undefined) => [\n              old?.[0],\n              value,\n            ])\n          }\n          placeholder={`Max`}\n          className=\"w-24 border shadow rounded\"\n        />\n      </div>\n      <div className=\"h-1\" />\n    </div>\n  ) : filterVariant === 'select' ? (\n    <select\n      onChange={(e) => column.setFilterValue(e.target.value)}\n      value={columnFilterValue?.toString()}\n    >\n      {/* See faceted column filters example for dynamic select options */}\n      <option value=\"\">All</option>\n      <option value=\"complicated\">complicated</option>\n      <option value=\"relationship\">relationship</option>\n      <option value=\"single\">single</option>\n    </select>\n  ) : (\n    <DebouncedInput\n      className=\"w-36 border shadow rounded\"\n      onChange={(value) => column.setFilterValue(value)}\n      placeholder={`Search...`}\n      type=\"text\"\n      value={(columnFilterValue ?? '') as string}\n    />\n    // See faceted column filters example for datalist search suggestions\n  )\n}\n\n// A typical debounced input react component\nfunction DebouncedInput({\n  value: initialValue,\n  onChange,\n  debounce = 500,\n  ...props\n}: {\n  value: string | number\n  onChange: (value: string | number) => void\n  debounce?: number\n} & Omit<React.InputHTMLAttributes<HTMLInputElement>, 'onChange'>) {\n  const [value, setValue] = React.useState(initialValue)\n\n  React.useEffect(() => {\n    setValue(initialValue)\n  }, [initialValue])\n\n  React.useEffect(() => {\n    const timeout = setTimeout(() => {\n      onChange(value)\n    }, debounce)\n\n    return () => clearTimeout(timeout)\n  }, [value])\n\n  return (\n    <input\n      {...props}\n      value={value}\n      onChange={(e) => setValue(e.target.value)}\n    />\n  )\n}\n\nconst rootElement = document.getElementById('root')\nif (!rootElement) throw new Error('Failed to find the root element')\n\nReactDOM.createRoot(rootElement).render(\n  <React.StrictMode>\n    <App />\n  </React.StrictMode>,\n)\n"
  },
  {
    "path": "examples/react/basic-use-legacy-table/src/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  subRows?: Array<Person>\n}\n\nconst range = (len: number) => {\n  const arr: Array<number> = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (): Person => {\n  return {\n    firstName: faker.person.firstName(),\n    lastName: faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: faker.number.int(1000),\n    progress: faker.number.int(100),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0],\n  }\n}\n\nexport function makeData(...lens: Array<number>) {\n  const makeDataLevel = (depth = 0): Array<Person> => {\n    const len = lens[depth]\n    return range(len).map((_d): Person => {\n      return {\n        ...newPerson(),\n        subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined,\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n"
  },
  {
    "path": "examples/react/basic-use-legacy-table/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"module\": \"ESNext\",\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"react-jsx\",\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true,\n    \"noErrorTruncation\": true\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "examples/react/basic-use-legacy-table/vite.config.js",
    "content": "import { defineConfig } from 'vite'\nimport react from '@vitejs/plugin-react'\nimport rollupReplace from '@rollup/plugin-replace'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [\n    rollupReplace({\n      preventAssignment: true,\n      values: {\n        __DEV__: JSON.stringify(true),\n        'process.env.NODE_ENV': JSON.stringify('development'),\n      },\n    }),\n    react(),\n  ],\n})\n"
  },
  {
    "path": "examples/react/basic-use-table/.gitignore",
    "content": "node_modules\n.DS_Store\ndist\ndist-ssr\n*.local\n"
  },
  {
    "path": "examples/react/basic-use-table/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run start` or `yarn start`\n"
  },
  {
    "path": "examples/react/basic-use-table/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite App</title>\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n    <script src=\"https://unpkg.com/react-scan/dist/auto.global.js\"></script>\n  </head>\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.tsx\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/react/basic-use-table/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-basic-use-table\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"start\": \"vite\",\n    \"lint\": \"eslint ./src\",\n    \"test:types\": \"tsc\"\n  },\n  \"dependencies\": {\n    \"@tanstack/react-table\": \"^9.0.0-alpha.19\",\n    \"react\": \"^19.2.4\",\n    \"react-dom\": \"^19.2.4\"\n  },\n  \"devDependencies\": {\n    \"@rollup/plugin-replace\": \"^6.0.3\",\n    \"@types/react\": \"^19.2.10\",\n    \"@types/react-dom\": \"^19.2.3\",\n    \"@vitejs/plugin-react\": \"^5.1.2\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\"\n  }\n}\n"
  },
  {
    "path": "examples/react/basic-use-table/src/index.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n"
  },
  {
    "path": "examples/react/basic-use-table/src/main.tsx",
    "content": "import * as React from 'react'\nimport ReactDOM from 'react-dom/client'\nimport { tableFeatures, useTable } from '@tanstack/react-table'\nimport type { ColumnDef } from '@tanstack/react-table'\nimport './index.css'\n\n// This example uses the classic standalone `useTable` hook to create a table without the new `createTableHelper` util.\n\n// 1. Define what the shape of your data will be for each row\ntype Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  status: string\n  progress: number\n}\n\n// 2. Create some dummy data with a stable reference (this could be an API response stored in useState or similar)\nconst defaultData: Array<Person> = [\n  {\n    firstName: 'tanner',\n    lastName: 'linsley',\n    age: 24,\n    visits: 100,\n    status: 'In Relationship',\n    progress: 50,\n  },\n  {\n    firstName: 'tandy',\n    lastName: 'miller',\n    age: 40,\n    visits: 40,\n    status: 'Single',\n    progress: 80,\n  },\n  {\n    firstName: 'joe',\n    lastName: 'dirte',\n    age: 45,\n    visits: 20,\n    status: 'Complicated',\n    progress: 10,\n  },\n  {\n    firstName: 'kevin',\n    lastName: 'vandy',\n    age: 12,\n    visits: 100,\n    status: 'Single',\n    progress: 70,\n  },\n]\n\n// 3. New in V9! Tell the table which features and row models we want to use. In this case, this will be a basic table with no additional features\nconst _features = tableFeatures({}) // util method to create sharable TFeatures object/type\n\n// 4. Define the columns for your table. This uses the new `ColumnDef` type to define columns. Alternatively, check out the createTableHelper/createColumnHelper util for an even more type-safe way to define columns.\nconst columns: Array<ColumnDef<typeof _features, Person>> = [\n  {\n    accessorKey: 'firstName', // accessorKey method (most common for simple use-cases)\n    header: 'First Name',\n    cell: (info) => info.getValue(),\n  },\n  {\n    accessorFn: (row) => row.lastName, // accessorFn used (alternative) along with a custom id\n    id: 'lastName',\n    header: () => <span>Last Name</span>,\n    cell: (info) => <i>{info.getValue<string>()}</i>,\n  },\n  {\n    accessorFn: (row) => Number(row.age), // accessorFn used to transform the data\n    id: 'age',\n    header: () => 'Age',\n    cell: (info) => {\n      return info.renderValue()\n    },\n  },\n  {\n    accessorKey: 'visits',\n    header: () => <span>Visits</span>,\n  },\n  {\n    accessorKey: 'status',\n    header: 'Status',\n  },\n  {\n    accessorKey: 'progress',\n    header: 'Profile Progress',\n  },\n]\n\nfunction App() {\n  // 5. Store data with a stable reference\n  const [data, _setData] = React.useState(() => [...defaultData])\n  const rerender = React.useReducer(() => ({}), {})[1]\n\n  // 6. Create the table instance with required _features, columns, and data\n  const table = useTable({\n    _features, // new required option in V9. Tell the table which features you are importing and using (better tree-shaking)\n    _rowModels: {}, // `Core` row model is now included by default, but you can still override it here\n    columns,\n    data,\n    // add additional table options here\n  })\n\n  // 7. Render your table markup from the table instance APIs\n  return (\n    <div className=\"p-2\">\n      <table>\n        <thead>\n          {table.getHeaderGroups().map((headerGroup) => (\n            <tr key={headerGroup.id}>\n              {headerGroup.headers.map((header) => (\n                <th key={header.id}>\n                  {header.isPlaceholder ? null : (\n                    <table.FlexRender header={header} />\n                  )}\n                </th>\n              ))}\n            </tr>\n          ))}\n        </thead>\n        <tbody>\n          {table.getRowModel().rows.map((row) => (\n            <tr key={row.id}>\n              {row.getAllCells().map((cell) => (\n                <td key={cell.id}>\n                  <table.FlexRender cell={cell} />\n                </td>\n              ))}\n            </tr>\n          ))}\n        </tbody>\n        <tfoot>\n          {table.getFooterGroups().map((footerGroup) => (\n            <tr key={footerGroup.id}>\n              {footerGroup.headers.map((header) => (\n                <th key={header.id}>\n                  {header.isPlaceholder ? null : (\n                    <table.FlexRender footer={header} />\n                  )}\n                </th>\n              ))}\n            </tr>\n          ))}\n        </tfoot>\n      </table>\n      <div className=\"h-4\" />\n      <button onClick={() => rerender()} className=\"border p-2\">\n        Rerender\n      </button>\n    </div>\n  )\n}\n\nconst rootElement = document.getElementById('root')\nif (!rootElement) throw new Error('Failed to find the root element')\n\nReactDOM.createRoot(rootElement).render(\n  <React.StrictMode>\n    <App />\n  </React.StrictMode>,\n)\n"
  },
  {
    "path": "examples/react/basic-use-table/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"module\": \"ESNext\",\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"react-jsx\",\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "examples/react/basic-use-table/vite.config.js",
    "content": "import { defineConfig } from 'vite'\nimport react from '@vitejs/plugin-react'\nimport rollupReplace from '@rollup/plugin-replace'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [\n    rollupReplace({\n      preventAssignment: true,\n      values: {\n        __DEV__: JSON.stringify(true),\n        'process.env.NODE_ENV': JSON.stringify('development'),\n      },\n    }),\n    react(),\n  ],\n})\n"
  },
  {
    "path": "examples/react/column-dnd/.gitignore",
    "content": "node_modules\n.DS_Store\ndist\ndist-ssr\n*.local\n"
  },
  {
    "path": "examples/react/column-dnd/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run start` or `yarn start`\n"
  },
  {
    "path": "examples/react/column-dnd/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite App</title>\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n    <script src=\"https://unpkg.com/react-scan/dist/auto.global.js\"></script>\n  </head>\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.tsx\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/react/column-dnd/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-column-dnd\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"start\": \"vite\",\n    \"lint\": \"eslint ./src\",\n    \"test:types\": \"tsc\"\n  },\n  \"dependencies\": {\n    \"@dnd-kit/core\": \"^6.3.1\",\n    \"@dnd-kit/modifiers\": \"^9.0.0\",\n    \"@dnd-kit/sortable\": \"^10.0.0\",\n    \"@dnd-kit/utilities\": \"^3.2.2\",\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"@tanstack/react-table\": \"^9.0.0-alpha.19\",\n    \"react\": \"^19.2.4\",\n    \"react-dom\": \"^19.2.4\"\n  },\n  \"devDependencies\": {\n    \"@rollup/plugin-replace\": \"^6.0.3\",\n    \"@types/react\": \"^19.2.10\",\n    \"@types/react-dom\": \"^19.2.3\",\n    \"@vitejs/plugin-react\": \"^5.1.2\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\"\n  }\n}\n"
  },
  {
    "path": "examples/react/column-dnd/src/index.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n  text-align: left;\n}\n\nth div {\n  display: flex;\n  flex-wrap: nowrap;\n  align-items: center;\n}\n\nth button {\n  padding: 1rem;\n  cursor: grab;\n}\n\ntd {\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntd:last-child {\n  border-right: 0;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n"
  },
  {
    "path": "examples/react/column-dnd/src/main.tsx",
    "content": "import React from 'react'\nimport ReactDOM from 'react-dom/client'\nimport {\n  FlexRender,\n  columnOrderingFeature,\n  columnSizingFeature,\n  createTableHook,\n} from '@tanstack/react-table'\nimport {\n  DndContext,\n  KeyboardSensor,\n  MouseSensor,\n  TouchSensor,\n  closestCenter,\n  useSensor,\n  useSensors,\n} from '@dnd-kit/core'\nimport { restrictToHorizontalAxis } from '@dnd-kit/modifiers'\nimport {\n  SortableContext,\n  arrayMove,\n  horizontalListSortingStrategy,\n  useSortable,\n} from '@dnd-kit/sortable'\nimport { CSS } from '@dnd-kit/utilities'\nimport { makeData } from './makeData'\nimport type { DragEndEvent } from '@dnd-kit/core'\nimport type { CSSProperties } from 'react'\nimport type { Person } from './makeData'\nimport type { Cell, Header } from '@tanstack/react-table'\nimport './index.css'\n\nconst { appFeatures, useAppTable, createAppColumnHelper } = createTableHook({\n  _features: { columnOrderingFeature, columnSizingFeature },\n  _rowModels: {},\n  debugTable: true,\n  debugHeaders: true,\n  debugColumns: true,\n})\n\nconst columnHelper = createAppColumnHelper<Person>()\n\nconst DraggableTableHeader = ({\n  header,\n}: {\n  header: Header<typeof appFeatures, Person, unknown>\n}) => {\n  const { attributes, isDragging, listeners, setNodeRef, transform } =\n    useSortable({ id: header.column.id })\n\n  const style: CSSProperties = {\n    opacity: isDragging ? 0.8 : 1,\n    position: 'relative',\n    transform: CSS.Translate.toString(transform), // translate instead of transform to avoid squishing\n    transition: 'width transform 0.2s ease-in-out',\n    whiteSpace: 'nowrap',\n    width: header.column.getSize(),\n    zIndex: isDragging ? 1 : 0,\n  }\n\n  return (\n    <th colSpan={header.colSpan} ref={setNodeRef} style={style}>\n      {header.isPlaceholder ? null : <FlexRender header={header} />}\n      <button {...attributes} {...listeners}>\n        🟰\n      </button>\n    </th>\n  )\n}\n\nconst DragAlongCell = ({\n  cell,\n}: {\n  cell: Cell<typeof appFeatures, Person, unknown>\n}) => {\n  const { isDragging, setNodeRef, transform } = useSortable({\n    id: cell.column.id,\n  })\n\n  const style: CSSProperties = {\n    opacity: isDragging ? 0.8 : 1,\n    position: 'relative',\n    transform: CSS.Translate.toString(transform), // translate instead of transform to avoid squishing\n    transition: 'width transform 0.2s ease-in-out',\n    width: cell.column.getSize(),\n    zIndex: isDragging ? 1 : 0,\n  }\n\n  return (\n    <td style={style} ref={setNodeRef}>\n      <FlexRender cell={cell} />\n    </td>\n  )\n}\n\nfunction App() {\n  const columns = React.useMemo(\n    () =>\n      columnHelper.columns([\n        columnHelper.accessor('firstName', {\n          cell: (info) => info.getValue(),\n          id: 'firstName',\n          size: 150,\n        }),\n        columnHelper.accessor((row) => row.lastName, {\n          cell: (info) => info.getValue(),\n          header: () => <span>Last Name</span>,\n          id: 'lastName',\n          size: 150,\n        }),\n        columnHelper.accessor('age', {\n          header: () => 'Age',\n          id: 'age',\n          size: 120,\n        }),\n        columnHelper.accessor('visits', {\n          header: () => <span>Visits</span>,\n          id: 'visits',\n          size: 120,\n        }),\n        columnHelper.accessor('status', {\n          header: 'Status',\n          id: 'status',\n          size: 150,\n        }),\n        columnHelper.accessor('progress', {\n          header: 'Profile Progress',\n          id: 'progress',\n          size: 180,\n        }),\n      ]),\n    [],\n  )\n\n  const [data, setData] = React.useState(() => makeData(20))\n\n  const rerender = () => setData(() => makeData(20))\n\n  const table = useAppTable(\n    {\n      columns,\n      data,\n      initialState: {\n        columnOrder: columns.map((c) => c.id!),\n      },\n    },\n    (state) => state,\n  )\n\n  // reorder columns after drag & drop\n  function handleDragEnd(event: DragEndEvent) {\n    const { active, over } = event\n    if (over && active.id !== over.id) {\n      table.setColumnOrder((prevColumnOrder) => {\n        const oldIndex = prevColumnOrder.indexOf(active.id as string)\n        const newIndex = prevColumnOrder.indexOf(over.id as string)\n        return arrayMove(prevColumnOrder, oldIndex, newIndex) // this is just a splice util\n      })\n    }\n  }\n\n  const sensors = useSensors(\n    useSensor(MouseSensor, {}),\n    useSensor(TouchSensor, {}),\n    useSensor(KeyboardSensor, {}),\n  )\n\n  return (\n    // NOTE: This provider creates div elements, so don't nest inside of <table> elements\n    <DndContext\n      collisionDetection={closestCenter}\n      modifiers={[restrictToHorizontalAxis]}\n      onDragEnd={handleDragEnd}\n      sensors={sensors}\n    >\n      <div className=\"p-2\">\n        <div className=\"h-4\" />\n        <div className=\"flex flex-wrap gap-2\">\n          <button onClick={() => rerender()} className=\"border p-1\">\n            Regenerate\n          </button>\n        </div>\n        <div className=\"h-4\" />\n        <table>\n          <thead>\n            {table.getHeaderGroups().map((headerGroup) => (\n              <tr key={headerGroup.id}>\n                <SortableContext\n                  items={table.store.state.columnOrder}\n                  strategy={horizontalListSortingStrategy}\n                >\n                  {headerGroup.headers.map((header) => (\n                    <DraggableTableHeader key={header.id} header={header} />\n                  ))}\n                </SortableContext>\n              </tr>\n            ))}\n          </thead>\n          <tbody>\n            {table.getRowModel().rows.map((row) => (\n              <tr key={row.id}>\n                {row.getAllCells().map((cell) => (\n                  <SortableContext\n                    key={cell.id}\n                    items={table.store.state.columnOrder}\n                    strategy={horizontalListSortingStrategy}\n                  >\n                    <DragAlongCell key={cell.id} cell={cell} />\n                  </SortableContext>\n                ))}\n              </tr>\n            ))}\n          </tbody>\n        </table>\n        <table.Subscribe selector={(state) => state}>\n          {(state) => <pre>{JSON.stringify(state, null, 2)}</pre>}\n        </table.Subscribe>\n      </div>\n    </DndContext>\n  )\n}\n\nconst rootElement = document.getElementById('root')\nif (!rootElement) throw new Error('Failed to find the root element')\n\nReactDOM.createRoot(rootElement).render(\n  <React.StrictMode>\n    <App />\n  </React.StrictMode>,\n)\n"
  },
  {
    "path": "examples/react/column-dnd/src/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  subRows?: Array<Person>\n}\n\nconst range = (len: number) => {\n  const arr: Array<number> = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (): Person => {\n  return {\n    firstName: faker.person.firstName(),\n    lastName: faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: faker.number.int(1000),\n    progress: faker.number.int(100),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0],\n  }\n}\n\nexport function makeData(...lens: Array<number>) {\n  const makeDataLevel = (depth = 0): Array<Person> => {\n    const len = lens[depth]\n    return range(len).map((_d): Person => {\n      return {\n        ...newPerson(),\n        subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined,\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n"
  },
  {
    "path": "examples/react/column-dnd/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"module\": \"ESNext\",\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"react-jsx\",\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "examples/react/column-dnd/vite.config.js",
    "content": "import { defineConfig } from 'vite'\nimport react from '@vitejs/plugin-react'\nimport rollupReplace from '@rollup/plugin-replace'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [\n    rollupReplace({\n      preventAssignment: true,\n      values: {\n        __DEV__: JSON.stringify(true),\n        'process.env.NODE_ENV': JSON.stringify('development'),\n      },\n    }),\n    react(),\n  ],\n})\n"
  },
  {
    "path": "examples/react/column-groups/.gitignore",
    "content": "node_modules\n.DS_Store\ndist\ndist-ssr\n*.local\n"
  },
  {
    "path": "examples/react/column-groups/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run start` or `yarn start`\n"
  },
  {
    "path": "examples/react/column-groups/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite App</title>\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n    <script src=\"https://unpkg.com/react-scan/dist/auto.global.js\"></script>\n  </head>\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.tsx\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/react/column-groups/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-column-groups\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"start\": \"vite\",\n    \"lint\": \"eslint ./src\",\n    \"test:types\": \"tsc\"\n  },\n  \"dependencies\": {\n    \"@tanstack/react-table\": \"^9.0.0-alpha.19\",\n    \"react\": \"^19.2.4\",\n    \"react-dom\": \"^19.2.4\"\n  },\n  \"devDependencies\": {\n    \"@rollup/plugin-replace\": \"^6.0.3\",\n    \"@types/react\": \"^19.2.10\",\n    \"@types/react-dom\": \"^19.2.3\",\n    \"@vitejs/plugin-react\": \"^5.1.2\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\"\n  }\n}\n"
  },
  {
    "path": "examples/react/column-groups/src/index.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n"
  },
  {
    "path": "examples/react/column-groups/src/main.tsx",
    "content": "import * as React from 'react'\nimport ReactDOM from 'react-dom/client'\nimport './index.css'\nimport {\n  createColumnHelper,\n  tableFeatures,\n  useTable,\n} from '@tanstack/react-table'\n\ntype Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  status: string\n  progress: number\n}\n\nconst defaultData: Array<Person> = [\n  {\n    firstName: 'tanner',\n    lastName: 'linsley',\n    age: 24,\n    visits: 100,\n    status: 'In Relationship',\n    progress: 50,\n  },\n  {\n    firstName: 'tandy',\n    lastName: 'miller',\n    age: 40,\n    visits: 40,\n    status: 'Single',\n    progress: 80,\n  },\n  {\n    firstName: 'joe',\n    lastName: 'dirte',\n    age: 45,\n    visits: 20,\n    status: 'Complicated',\n    progress: 10,\n  },\n]\n\nconst _features = tableFeatures({})\n\nconst columnHelper = createColumnHelper<typeof _features, Person>()\n\n// use new columnHelper.columns method to create columns with the same TValue generic so TypeScript doesn't complain when passing columns to useTable\nconst columns = columnHelper.columns([\n  columnHelper.group({\n    id: 'hello',\n    header: () => <span>Hello</span>,\n    columns: columnHelper.columns([\n      columnHelper.accessor('firstName', {\n        cell: (info) => info.getValue(),\n        footer: (props) => props.column.id,\n      }),\n      columnHelper.accessor((row) => row.lastName, {\n        id: 'lastName',\n        cell: (info) => info.getValue(),\n        header: () => <span>Last Name</span>,\n        footer: (props) => props.column.id,\n      }),\n    ]),\n  }),\n  columnHelper.group({\n    header: 'Info',\n    footer: (props) => props.column.id,\n    columns: columnHelper.columns([\n      columnHelper.accessor('age', {\n        header: () => 'Age',\n        footer: (props) => props.column.id,\n      }),\n      columnHelper.group({\n        header: 'More Info',\n        columns: columnHelper.columns([\n          columnHelper.accessor('visits', {\n            header: () => <span>Visits</span>,\n            footer: (props) => props.column.id,\n          }),\n          columnHelper.accessor('status', {\n            header: 'Status',\n            footer: (props) => props.column.id,\n          }),\n          columnHelper.accessor('progress', {\n            header: 'Profile Progress',\n            footer: (props) => props.column.id,\n          }),\n        ]),\n      }),\n    ]),\n  }),\n])\n\nfunction App() {\n  const [data, _setData] = React.useState(() => [...defaultData])\n  const rerender = React.useReducer(() => ({}), {})[1]\n\n  const table = useTable({\n    _features,\n    _rowModels: {},\n    columns,\n    data,\n  })\n\n  return (\n    <div className=\"p-2\">\n      <table>\n        <thead>\n          {table.getHeaderGroups().map((headerGroup) => (\n            <tr key={headerGroup.id}>\n              {headerGroup.headers.map((header) => (\n                <th key={header.id} colSpan={header.colSpan}>\n                  {header.isPlaceholder ? null : (\n                    <table.FlexRender header={header} />\n                  )}\n                </th>\n              ))}\n            </tr>\n          ))}\n        </thead>\n        <tbody>\n          {table.getRowModel().rows.map((row) => (\n            <tr key={row.id}>\n              {row.getAllCells().map((cell) => (\n                <td key={cell.id}>\n                  <table.FlexRender cell={cell} />\n                </td>\n              ))}\n            </tr>\n          ))}\n        </tbody>\n        <tfoot>\n          {table.getFooterGroups().map((footerGroup) => (\n            <tr key={footerGroup.id}>\n              {footerGroup.headers.map((header) => (\n                <th key={header.id} colSpan={header.colSpan}>\n                  {header.isPlaceholder ? null : (\n                    <table.FlexRender footer={header} />\n                  )}\n                </th>\n              ))}\n            </tr>\n          ))}\n        </tfoot>\n      </table>\n      <div className=\"h-4\" />\n      <button onClick={() => rerender()} className=\"border p-2\">\n        Rerender\n      </button>\n    </div>\n  )\n}\n\nconst rootElement = document.getElementById('root')\nif (!rootElement) throw new Error('Failed to find the root element')\n\nReactDOM.createRoot(rootElement).render(\n  <React.StrictMode>\n    <App />\n  </React.StrictMode>,\n)\n"
  },
  {
    "path": "examples/react/column-groups/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"module\": \"ESNext\",\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"react-jsx\",\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "examples/react/column-groups/vite.config.js",
    "content": "import { defineConfig } from 'vite'\nimport react from '@vitejs/plugin-react'\nimport rollupReplace from '@rollup/plugin-replace'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [\n    rollupReplace({\n      preventAssignment: true,\n      values: {\n        __DEV__: JSON.stringify(true),\n        'process.env.NODE_ENV': JSON.stringify('development'),\n      },\n    }),\n    react(),\n  ],\n})\n"
  },
  {
    "path": "examples/react/column-ordering/.gitignore",
    "content": "node_modules\n.DS_Store\ndist\ndist-ssr\n*.local\n"
  },
  {
    "path": "examples/react/column-ordering/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run start` or `yarn start`\n"
  },
  {
    "path": "examples/react/column-ordering/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite App</title>\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n    <script src=\"https://unpkg.com/react-scan/dist/auto.global.js\"></script>\n  </head>\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.tsx\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/react/column-ordering/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-column-ordering\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"start\": \"vite\",\n    \"lint\": \"eslint ./src\",\n    \"test:types\": \"tsc\"\n  },\n  \"dependencies\": {\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"@tanstack/react-table\": \"^9.0.0-alpha.19\",\n    \"react\": \"^19.2.4\",\n    \"react-dom\": \"^19.2.4\"\n  },\n  \"devDependencies\": {\n    \"@rollup/plugin-replace\": \"^6.0.3\",\n    \"@types/react\": \"^19.2.10\",\n    \"@types/react-dom\": \"^19.2.3\",\n    \"@vitejs/plugin-react\": \"^5.1.2\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\"\n  }\n}\n"
  },
  {
    "path": "examples/react/column-ordering/src/index.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntd {\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntd:last-child {\n  border-right: 0;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n"
  },
  {
    "path": "examples/react/column-ordering/src/main.tsx",
    "content": "import React from 'react'\nimport ReactDOM from 'react-dom/client'\nimport { faker } from '@faker-js/faker'\nimport {\n  columnOrderingFeature,\n  columnVisibilityFeature,\n  createColumnHelper,\n  tableFeatures,\n  useTable,\n} from '@tanstack/react-table'\nimport { makeData } from './makeData'\nimport type { Person } from './makeData'\nimport './index.css'\n\nconst _features = tableFeatures({\n  columnOrderingFeature,\n  columnVisibilityFeature,\n})\n\nconst columnHelper = createColumnHelper<typeof _features, Person>()\n\nconst defaultColumns = columnHelper.columns([\n  columnHelper.group({\n    header: 'Name',\n    footer: (props) => props.column.id,\n    columns: columnHelper.columns([\n      columnHelper.accessor('firstName', {\n        cell: (info) => info.getValue(),\n        footer: (props) => props.column.id,\n      }),\n      columnHelper.accessor((row) => row.lastName, {\n        id: 'lastName',\n        cell: (info) => info.getValue(),\n        header: () => <span>Last Name</span>,\n        footer: (props) => props.column.id,\n      }),\n    ]),\n  }),\n  columnHelper.group({\n    header: 'Info',\n    footer: (props) => props.column.id,\n    columns: columnHelper.columns([\n      columnHelper.accessor('age', {\n        header: () => 'Age',\n        footer: (props) => props.column.id,\n      }),\n      columnHelper.group({\n        header: 'More Info',\n        columns: columnHelper.columns([\n          columnHelper.accessor('visits', {\n            header: () => <span>Visits</span>,\n            footer: (props) => props.column.id,\n          }),\n          columnHelper.accessor('status', {\n            header: 'Status',\n            footer: (props) => props.column.id,\n          }),\n          columnHelper.accessor('progress', {\n            header: 'Profile Progress',\n            footer: (props) => props.column.id,\n          }),\n        ]),\n      }),\n    ]),\n  }),\n])\n\nfunction App() {\n  const [data, setData] = React.useState(() => makeData(20))\n  const [columns] = React.useState(() => [...defaultColumns])\n\n  const rerender = () => setData(() => makeData(20))\n\n  const table = useTable({\n    _features,\n    _rowModels: {},\n    columns,\n    data,\n    debugTable: true,\n    debugHeaders: true,\n    debugColumns: true,\n  })\n\n  const randomizeColumns = () => {\n    table.setColumnOrder(\n      faker.helpers.shuffle(table.getAllLeafColumns().map((d) => d.id)),\n    )\n  }\n\n  return (\n    <table.Subscribe\n      selector={(state) => ({\n        // subscribe to only the column order and visibility state changes at root level\n        columnOrder: state.columnOrder,\n        columnVisibility: state.columnVisibility,\n      })}\n    >\n      {(_state) => (\n        <div className=\"p-2\">\n          <div className=\"inline-block border border-black shadow rounded\">\n            <div className=\"px-1 border-b border-black\">\n              <label>\n                <input\n                  type=\"checkbox\"\n                  checked={table.getIsAllColumnsVisible()}\n                  onChange={table.getToggleAllColumnsVisibilityHandler()}\n                />{' '}\n                Toggle All\n              </label>\n            </div>\n            {table.getAllLeafColumns().map((column) => {\n              return (\n                <div key={column.id} className=\"px-1\">\n                  <label>\n                    <input\n                      type=\"checkbox\"\n                      checked={column.getIsVisible()}\n                      onChange={column.getToggleVisibilityHandler()}\n                    />{' '}\n                    {column.id}\n                  </label>\n                </div>\n              )\n            })}\n          </div>\n          <div className=\"h-4\" />\n          <div className=\"flex flex-wrap gap-2\">\n            <button onClick={() => rerender()} className=\"border p-1\">\n              Regenerate\n            </button>\n            <button onClick={() => randomizeColumns()} className=\"border p-1\">\n              Shuffle Columns\n            </button>\n          </div>\n          <div className=\"h-4\" />\n          <table>\n            <thead>\n              {table.getHeaderGroups().map((headerGroup) => (\n                <tr key={headerGroup.id}>\n                  {headerGroup.headers.map((header) => (\n                    <th key={header.id} colSpan={header.colSpan}>\n                      {header.isPlaceholder ? null : (\n                        <table.FlexRender header={header} />\n                      )}\n                    </th>\n                  ))}\n                </tr>\n              ))}\n            </thead>\n            <tbody>\n              {table.getRowModel().rows.map((row) => (\n                <tr key={row.id}>\n                  {row.getVisibleCells().map((cell) => (\n                    <td key={cell.id}>\n                      <table.FlexRender cell={cell} />\n                    </td>\n                  ))}\n                </tr>\n              ))}\n            </tbody>\n            <tfoot>\n              {table.getFooterGroups().map((footerGroup) => (\n                <tr key={footerGroup.id}>\n                  {footerGroup.headers.map((header) => (\n                    <th key={header.id} colSpan={header.colSpan}>\n                      {header.isPlaceholder ? null : (\n                        <table.FlexRender footer={header} />\n                      )}\n                    </th>\n                  ))}\n                </tr>\n              ))}\n            </tfoot>\n          </table>\n          <table.Subscribe selector={(state) => state}>\n            {(state) => <pre>{JSON.stringify(state, null, 2)}</pre>}\n          </table.Subscribe>\n        </div>\n      )}\n    </table.Subscribe>\n  )\n}\n\nconst rootElement = document.getElementById('root')\nif (!rootElement) throw new Error('Failed to find the root element')\n\nReactDOM.createRoot(rootElement).render(\n  <React.StrictMode>\n    <App />\n  </React.StrictMode>,\n)\n"
  },
  {
    "path": "examples/react/column-ordering/src/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  subRows?: Array<Person>\n}\n\nconst range = (len: number) => {\n  const arr: Array<number> = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (): Person => {\n  return {\n    firstName: faker.person.firstName(),\n    lastName: faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: faker.number.int(1000),\n    progress: faker.number.int(100),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0],\n  }\n}\n\nexport function makeData(...lens: Array<number>) {\n  const makeDataLevel = (depth = 0): Array<Person> => {\n    const len = lens[depth]\n    return range(len).map((_d): Person => {\n      return {\n        ...newPerson(),\n        subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined,\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n"
  },
  {
    "path": "examples/react/column-ordering/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"module\": \"ESNext\",\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"react-jsx\",\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "examples/react/column-ordering/vite.config.js",
    "content": "import { defineConfig } from 'vite'\nimport react from '@vitejs/plugin-react'\nimport rollupReplace from '@rollup/plugin-replace'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [\n    rollupReplace({\n      preventAssignment: true,\n      values: {\n        __DEV__: JSON.stringify(true),\n        'process.env.NODE_ENV': JSON.stringify('development'),\n      },\n    }),\n    react(),\n  ],\n})\n"
  },
  {
    "path": "examples/react/column-pinning/.gitignore",
    "content": "node_modules\n.DS_Store\ndist\ndist-ssr\n*.local\n"
  },
  {
    "path": "examples/react/column-pinning/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run start` or `yarn start`\n"
  },
  {
    "path": "examples/react/column-pinning/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite App</title>\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n    <script src=\"https://unpkg.com/react-scan/dist/auto.global.js\"></script>\n  </head>\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.tsx\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/react/column-pinning/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-column-pinning\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"start\": \"vite\",\n    \"lint\": \"eslint ./src\",\n    \"test:types\": \"tsc\"\n  },\n  \"dependencies\": {\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"@tanstack/react-table\": \"^9.0.0-alpha.19\",\n    \"react\": \"^19.2.4\",\n    \"react-dom\": \"^19.2.4\"\n  },\n  \"devDependencies\": {\n    \"@rollup/plugin-replace\": \"^6.0.3\",\n    \"@types/react\": \"^19.2.10\",\n    \"@types/react-dom\": \"^19.2.3\",\n    \"@vitejs/plugin-react\": \"^5.1.2\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\"\n  }\n}\n"
  },
  {
    "path": "examples/react/column-pinning/src/index.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntd {\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntd:last-child {\n  border-right: 0;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n"
  },
  {
    "path": "examples/react/column-pinning/src/main.tsx",
    "content": "import React from 'react'\nimport ReactDOM from 'react-dom/client'\nimport { faker } from '@faker-js/faker'\nimport './index.css'\nimport {\n  columnOrderingFeature,\n  columnPinningFeature,\n  columnVisibilityFeature,\n  createTableHook,\n} from '@tanstack/react-table'\nimport { makeData } from './makeData'\nimport type { Person } from './makeData'\n\n// Create table hook with features\nconst { useAppTable, createAppColumnHelper } = createTableHook({\n  _features: {\n    columnVisibilityFeature,\n    columnPinningFeature,\n    columnOrderingFeature,\n  },\n  _rowModels: {},\n  debugTable: true,\n  debugHeaders: true,\n  debugColumns: true,\n})\n\n// Create column helper\nconst columnHelper = createAppColumnHelper<Person>()\n\n// Define columns using columnHelper\nconst columns = columnHelper.columns([\n  columnHelper.group({\n    header: 'Name',\n    footer: (props) => props.column.id,\n    columns: columnHelper.columns([\n      columnHelper.accessor('firstName', {\n        cell: (info) => info.getValue(),\n        footer: (props) => props.column.id,\n      }),\n      columnHelper.accessor((row) => row.lastName, {\n        id: 'lastName',\n        cell: (info) => info.getValue(),\n        header: () => <span>Last Name</span>,\n        footer: (props) => props.column.id,\n      }),\n    ]),\n  }),\n  columnHelper.group({\n    header: 'Info',\n    footer: (props) => props.column.id,\n    columns: columnHelper.columns([\n      columnHelper.accessor('age', {\n        header: () => 'Age',\n        footer: (props) => props.column.id,\n      }),\n      columnHelper.group({\n        header: 'More Info',\n        columns: columnHelper.columns([\n          columnHelper.accessor('visits', {\n            header: () => <span>Visits</span>,\n            footer: (props) => props.column.id,\n          }),\n          columnHelper.accessor('status', {\n            header: 'Status',\n            footer: (props) => props.column.id,\n          }),\n          columnHelper.accessor('progress', {\n            header: 'Profile Progress',\n            footer: (props) => props.column.id,\n          }),\n        ]),\n      }),\n    ]),\n  }),\n])\n\nfunction App() {\n  const [data, setData] = React.useState(() => makeData(5000))\n\n  const rerender = () => setData(() => makeData(5000))\n\n  const table = useAppTable({\n    columns,\n    data,\n  })\n\n  const randomizeColumns = () => {\n    table.setColumnOrder(\n      faker.helpers.shuffle(table.getAllLeafColumns().map((d) => d.id)),\n    )\n  }\n\n  return (\n    <table.Subscribe\n      selector={(state) => ({\n        columnVisibility: state.columnVisibility,\n        columnOrder: state.columnOrder,\n        columnPinning: state.columnPinning,\n      })}\n    >\n      {(_state) => (\n        <div className=\"p-2\">\n          <div className=\"inline-block border border-black shadow rounded\">\n            <div className=\"px-1 border-b border-black\">\n              <label>\n                <input\n                  type=\"checkbox\"\n                  checked={table.getIsAllColumnsVisible()}\n                  onChange={table.getToggleAllColumnsVisibilityHandler()}\n                />{' '}\n                Toggle All\n              </label>\n            </div>\n            {table.getAllLeafColumns().map((column) => {\n              return (\n                <div key={column.id} className=\"px-1\">\n                  <label>\n                    <input\n                      type=\"checkbox\"\n                      checked={column.getIsVisible()}\n                      onChange={column.getToggleVisibilityHandler()}\n                    />{' '}\n                    {column.id}\n                  </label>\n                </div>\n              )\n            })}\n          </div>\n          <div className=\"h-4\" />\n          <div className=\"flex flex-wrap gap-2\">\n            <button onClick={() => rerender()} className=\"border p-1\">\n              Regenerate\n            </button>\n            <button onClick={() => randomizeColumns()} className=\"border p-1\">\n              Shuffle Columns\n            </button>\n          </div>\n          <div className=\"h-4\" />\n          <p className=\"text-sm mb-2\">\n            This example using the non-split APIs. Columns are just reordered\n            within 1 table instead of being split into 3 different tables.\n          </p>\n          <div className=\"flex\">\n            <table className=\"border-2 border-black\">\n              <thead>\n                {table.getHeaderGroups().map((headerGroup) => (\n                  <tr key={headerGroup.id}>\n                    {headerGroup.headers.map((header) => (\n                      <th key={header.id} colSpan={header.colSpan}>\n                        <div className=\"whitespace-nowrap\">\n                          {header.isPlaceholder ? null : (\n                            <table.FlexRender header={header} />\n                          )}\n                        </div>\n                        {!header.isPlaceholder && header.column.getCanPin() && (\n                          <div className=\"flex gap-1 justify-center\">\n                            {header.column.getIsPinned() !== 'left' ? (\n                              <button\n                                className=\"border rounded px-2\"\n                                onClick={() => {\n                                  header.column.pin('left')\n                                }}\n                              >\n                                {'<='}\n                              </button>\n                            ) : null}\n                            {header.column.getIsPinned() ? (\n                              <button\n                                className=\"border rounded px-2\"\n                                onClick={() => {\n                                  header.column.pin(false)\n                                }}\n                              >\n                                X\n                              </button>\n                            ) : null}\n                            {header.column.getIsPinned() !== 'right' ? (\n                              <button\n                                className=\"border rounded px-2\"\n                                onClick={() => {\n                                  header.column.pin('right')\n                                }}\n                              >\n                                {'=>'}\n                              </button>\n                            ) : null}\n                          </div>\n                        )}\n                      </th>\n                    ))}\n                  </tr>\n                ))}\n              </thead>\n              <tbody>\n                {table\n                  .getRowModel()\n                  .rows.slice(0, 20)\n                  .map((row) => {\n                    return (\n                      <tr key={row.id}>\n                        {row.getVisibleCells().map((cell) => {\n                          return (\n                            <td key={cell.id}>\n                              <table.FlexRender cell={cell} />\n                            </td>\n                          )\n                        })}\n                      </tr>\n                    )\n                  })}\n              </tbody>\n            </table>\n          </div>\n          <table.Subscribe selector={(state) => state}>\n            {(state) => <pre>{JSON.stringify(state, null, 2)}</pre>}\n          </table.Subscribe>\n        </div>\n      )}\n    </table.Subscribe>\n  )\n}\n\nconst rootElement = document.getElementById('root')\nif (!rootElement) throw new Error('Failed to find the root element')\n\nReactDOM.createRoot(rootElement).render(\n  <React.StrictMode>\n    <App />\n  </React.StrictMode>,\n)\n"
  },
  {
    "path": "examples/react/column-pinning/src/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  subRows?: Array<Person>\n}\n\nconst range = (len: number) => {\n  const arr: Array<number> = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (): Person => {\n  return {\n    firstName: faker.person.firstName(),\n    lastName: faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: faker.number.int(1000),\n    progress: faker.number.int(100),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0],\n  }\n}\n\nexport function makeData(...lens: Array<number>) {\n  const makeDataLevel = (depth = 0): Array<Person> => {\n    const len = lens[depth]\n    return range(len).map((_d): Person => {\n      return {\n        ...newPerson(),\n        subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined,\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n"
  },
  {
    "path": "examples/react/column-pinning/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"module\": \"ESNext\",\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"react-jsx\",\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "examples/react/column-pinning/vite.config.js",
    "content": "import { defineConfig } from 'vite'\nimport react from '@vitejs/plugin-react'\nimport rollupReplace from '@rollup/plugin-replace'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [\n    rollupReplace({\n      preventAssignment: true,\n      values: {\n        __DEV__: JSON.stringify(true),\n        'process.env.NODE_ENV': JSON.stringify('development'),\n      },\n    }),\n    react(),\n  ],\n})\n"
  },
  {
    "path": "examples/react/column-pinning-split/.gitignore",
    "content": "node_modules\n.DS_Store\ndist\ndist-ssr\n*.local\n"
  },
  {
    "path": "examples/react/column-pinning-split/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run start` or `yarn start`\n"
  },
  {
    "path": "examples/react/column-pinning-split/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite App</title>\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n    <script src=\"https://unpkg.com/react-scan/dist/auto.global.js\"></script>\n  </head>\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.tsx\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/react/column-pinning-split/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-column-pinning-split\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"start\": \"vite\",\n    \"lint\": \"eslint ./src\",\n    \"test:types\": \"tsc\"\n  },\n  \"dependencies\": {\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"@tanstack/react-table\": \"^9.0.0-alpha.19\",\n    \"react\": \"^19.2.4\",\n    \"react-dom\": \"^19.2.4\"\n  },\n  \"devDependencies\": {\n    \"@rollup/plugin-replace\": \"^6.0.3\",\n    \"@types/react\": \"^19.2.10\",\n    \"@types/react-dom\": \"^19.2.3\",\n    \"@vitejs/plugin-react\": \"^5.1.2\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\"\n  }\n}\n"
  },
  {
    "path": "examples/react/column-pinning-split/src/index.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntd {\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntd:last-child {\n  border-right: 0;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n"
  },
  {
    "path": "examples/react/column-pinning-split/src/main.tsx",
    "content": "import React from 'react'\nimport ReactDOM from 'react-dom/client'\nimport { faker } from '@faker-js/faker'\nimport './index.css'\nimport {\n  columnOrderingFeature,\n  columnPinningFeature,\n  columnVisibilityFeature,\n  tableFeatures,\n  useTable,\n} from '@tanstack/react-table'\nimport { makeData } from './makeData'\nimport type { ColumnDef } from '@tanstack/react-table'\nimport type { Person } from './makeData'\n\nconst _features = tableFeatures({\n  columnVisibilityFeature,\n  columnPinningFeature,\n  columnOrderingFeature,\n})\n\nconst defaultColumns: Array<ColumnDef<typeof _features, Person>> = [\n  {\n    header: 'Name',\n    footer: (props) => props.column.id,\n    columns: [\n      {\n        accessorKey: 'firstName',\n        cell: (info) => info.getValue(),\n        footer: (props) => props.column.id,\n      },\n      {\n        accessorFn: (row) => row.lastName,\n        id: 'lastName',\n        cell: (info) => info.getValue(),\n        header: () => <span>Last Name</span>,\n        footer: (props) => props.column.id,\n      },\n    ],\n  },\n  {\n    header: 'Info',\n    footer: (props) => props.column.id,\n    columns: [\n      {\n        accessorKey: 'age',\n        header: () => 'Age',\n        footer: (props) => props.column.id,\n      },\n      {\n        header: 'More Info',\n        columns: [\n          {\n            accessorKey: 'visits',\n            header: () => <span>Visits</span>,\n            footer: (props) => props.column.id,\n          },\n          {\n            accessorKey: 'status',\n            header: 'Status',\n            footer: (props) => props.column.id,\n          },\n          {\n            accessorKey: 'progress',\n            header: 'Profile Progress',\n            footer: (props) => props.column.id,\n          },\n        ],\n      },\n    ],\n  },\n]\n\nfunction App() {\n  const [data, setData] = React.useState(() => makeData(5000))\n  const [columns] = React.useState(() => [...defaultColumns])\n\n  const rerender = () => setData(() => makeData(5000))\n\n  const table = useTable({\n    _features,\n    _rowModels: {},\n    columns,\n    data,\n    debugTable: true,\n    debugHeaders: true,\n    debugColumns: true,\n  })\n\n  const randomizeColumns = () => {\n    table.setColumnOrder(\n      faker.helpers.shuffle(table.getAllLeafColumns().map((d) => d.id)),\n    )\n  }\n\n  return (\n    <table.Subscribe\n      selector={(state) => ({\n        columnVisibility: state.columnVisibility,\n        columnOrder: state.columnOrder,\n        columnPinning: state.columnPinning,\n      })}\n    >\n      {(_state) => (\n        <div className=\"p-2\">\n          <div className=\"inline-block border border-black shadow rounded\">\n            <div className=\"px-1 border-b border-black\">\n              <label>\n                <input\n                  type=\"checkbox\"\n                  checked={table.getIsAllColumnsVisible()}\n                  onChange={table.getToggleAllColumnsVisibilityHandler()}\n                />{' '}\n                Toggle All\n              </label>\n            </div>\n            {table.getAllLeafColumns().map((column) => {\n              return (\n                <div key={column.id} className=\"px-1\">\n                  <label>\n                    <input\n                      type=\"checkbox\"\n                      checked={column.getIsVisible()}\n                      onChange={column.getToggleVisibilityHandler()}\n                    />{' '}\n                    {column.id}\n                  </label>\n                </div>\n              )\n            })}\n          </div>\n          <div className=\"h-4\" />\n          <div className=\"flex flex-wrap gap-2\">\n            <button onClick={() => rerender()} className=\"border p-1\">\n              Regenerate\n            </button>\n            <button onClick={() => randomizeColumns()} className=\"border p-1\">\n              Shuffle Columns\n            </button>\n          </div>\n          <div className=\"h-4\" />\n          <p className=\"text-sm mb-2\">\n            This example takes advantage of the \"splitting\" APIs. (APIs that\n            have \"left, \"center\", and \"right\" modifiers)\n          </p>\n          <div className=\"flex gap-4\">\n            <table className=\"border-2 border-black\">\n              <thead>\n                {table.getLeftHeaderGroups().map((headerGroup) => (\n                  <tr key={headerGroup.id}>\n                    {headerGroup.headers.map((header) => (\n                      <th key={header.id} colSpan={header.colSpan}>\n                        <div className=\"whitespace-nowrap\">\n                          {header.isPlaceholder ? null : (\n                            <table.FlexRender header={header} />\n                          )}\n                        </div>\n                        {!header.isPlaceholder && header.column.getCanPin() && (\n                          <div className=\"flex gap-1 justify-center\">\n                            {header.column.getIsPinned() !== 'left' ? (\n                              <button\n                                className=\"border rounded px-2\"\n                                onClick={() => {\n                                  header.column.pin('left')\n                                }}\n                              >\n                                {'<='}\n                              </button>\n                            ) : null}\n                            {header.column.getIsPinned() ? (\n                              <button\n                                className=\"border rounded px-2\"\n                                onClick={() => {\n                                  header.column.pin(false)\n                                }}\n                              >\n                                X\n                              </button>\n                            ) : null}\n                            {header.column.getIsPinned() !== 'right' ? (\n                              <button\n                                className=\"border rounded px-2\"\n                                onClick={() => {\n                                  header.column.pin('right')\n                                }}\n                              >\n                                {'=>'}\n                              </button>\n                            ) : null}\n                          </div>\n                        )}\n                      </th>\n                    ))}\n                  </tr>\n                ))}\n              </thead>\n              <tbody>\n                {table\n                  .getRowModel()\n                  .rows.slice(0, 20)\n                  .map((row) => {\n                    return (\n                      <tr key={row.id}>\n                        {row.getLeftVisibleCells().map((cell) => {\n                          return (\n                            <td key={cell.id}>\n                              <table.FlexRender cell={cell} />\n                            </td>\n                          )\n                        })}\n                      </tr>\n                    )\n                  })}\n              </tbody>\n            </table>\n            <table className=\"border-2 border-black\">\n              <thead>\n                {table.getCenterHeaderGroups().map((headerGroup) => (\n                  <tr key={headerGroup.id}>\n                    {headerGroup.headers.map((header) => (\n                      <th key={header.id} colSpan={header.colSpan}>\n                        <div className=\"whitespace-nowrap\">\n                          {header.isPlaceholder ? null : (\n                            <table.FlexRender header={header} />\n                          )}\n                        </div>\n                        {!header.isPlaceholder && header.column.getCanPin() && (\n                          <div className=\"flex gap-1 justify-center\">\n                            {header.column.getIsPinned() !== 'left' ? (\n                              <button\n                                className=\"border rounded px-2\"\n                                onClick={() => {\n                                  header.column.pin('left')\n                                }}\n                              >\n                                {'<='}\n                              </button>\n                            ) : null}\n                            {header.column.getIsPinned() ? (\n                              <button\n                                className=\"border rounded px-2\"\n                                onClick={() => {\n                                  header.column.pin(false)\n                                }}\n                              >\n                                X\n                              </button>\n                            ) : null}\n                            {header.column.getIsPinned() !== 'right' ? (\n                              <button\n                                className=\"border rounded px-2\"\n                                onClick={() => {\n                                  header.column.pin('right')\n                                }}\n                              >\n                                {'=>'}\n                              </button>\n                            ) : null}\n                          </div>\n                        )}\n                      </th>\n                    ))}\n                  </tr>\n                ))}\n              </thead>\n              <tbody>\n                {table\n                  .getRowModel()\n                  .rows.slice(0, 20)\n                  .map((row) => {\n                    return (\n                      <tr key={row.id}>\n                        {row.getCenterVisibleCells().map((cell) => {\n                          return (\n                            <td key={cell.id}>\n                              <table.FlexRender cell={cell} />\n                            </td>\n                          )\n                        })}\n                      </tr>\n                    )\n                  })}\n              </tbody>\n            </table>\n            <table className=\"border-2 border-black\">\n              <thead>\n                {table.getRightHeaderGroups().map((headerGroup) => (\n                  <tr key={headerGroup.id}>\n                    {headerGroup.headers.map((header) => (\n                      <th key={header.id} colSpan={header.colSpan}>\n                        <div className=\"whitespace-nowrap\">\n                          {header.isPlaceholder ? null : (\n                            <table.FlexRender header={header} />\n                          )}\n                        </div>\n                        {!header.isPlaceholder && header.column.getCanPin() && (\n                          <div className=\"flex gap-1 justify-center\">\n                            {header.column.getIsPinned() !== 'left' ? (\n                              <button\n                                className=\"border rounded px-2\"\n                                onClick={() => {\n                                  header.column.pin('left')\n                                }}\n                              >\n                                {'<='}\n                              </button>\n                            ) : null}\n                            {header.column.getIsPinned() ? (\n                              <button\n                                className=\"border rounded px-2\"\n                                onClick={() => {\n                                  header.column.pin(false)\n                                }}\n                              >\n                                X\n                              </button>\n                            ) : null}\n                            {header.column.getIsPinned() !== 'right' ? (\n                              <button\n                                className=\"border rounded px-2\"\n                                onClick={() => {\n                                  header.column.pin('right')\n                                }}\n                              >\n                                {'=>'}\n                              </button>\n                            ) : null}\n                          </div>\n                        )}\n                      </th>\n                    ))}\n                  </tr>\n                ))}\n              </thead>\n              <tbody>\n                {table\n                  .getRowModel()\n                  .rows.slice(0, 20)\n                  .map((row) => {\n                    return (\n                      <tr key={row.id}>\n                        {row.getRightVisibleCells().map((cell) => {\n                          return (\n                            <td key={cell.id}>\n                              <table.FlexRender cell={cell} />\n                            </td>\n                          )\n                        })}\n                      </tr>\n                    )\n                  })}\n              </tbody>\n            </table>\n          </div>\n          <table.Subscribe selector={(state) => state}>\n            {(state) => <pre>{JSON.stringify(state, null, 2)}</pre>}\n          </table.Subscribe>\n        </div>\n      )}\n    </table.Subscribe>\n  )\n}\n\nconst rootElement = document.getElementById('root')\nif (!rootElement) throw new Error('Failed to find the root element')\n\nReactDOM.createRoot(rootElement).render(\n  <React.StrictMode>\n    <App />\n  </React.StrictMode>,\n)\n"
  },
  {
    "path": "examples/react/column-pinning-split/src/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  subRows?: Array<Person>\n}\n\nconst range = (len: number) => {\n  const arr: Array<number> = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (): Person => {\n  return {\n    firstName: faker.person.firstName(),\n    lastName: faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: faker.number.int(1000),\n    progress: faker.number.int(100),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0],\n  }\n}\n\nexport function makeData(...lens: Array<number>) {\n  const makeDataLevel = (depth = 0): Array<Person> => {\n    const len = lens[depth]\n    return range(len).map((_d): Person => {\n      return {\n        ...newPerson(),\n        subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined,\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n"
  },
  {
    "path": "examples/react/column-pinning-split/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"module\": \"ESNext\",\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"react-jsx\",\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "examples/react/column-pinning-split/vite.config.js",
    "content": "import { defineConfig } from 'vite'\nimport react from '@vitejs/plugin-react'\nimport rollupReplace from '@rollup/plugin-replace'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [\n    rollupReplace({\n      preventAssignment: true,\n      values: {\n        __DEV__: JSON.stringify(true),\n        'process.env.NODE_ENV': JSON.stringify('development'),\n      },\n    }),\n    react(),\n  ],\n})\n"
  },
  {
    "path": "examples/react/column-pinning-sticky/.gitignore",
    "content": "node_modules\n.DS_Store\ndist\ndist-ssr\n*.local\n"
  },
  {
    "path": "examples/react/column-pinning-sticky/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run start` or `yarn start`\n"
  },
  {
    "path": "examples/react/column-pinning-sticky/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite App</title>\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n    <script src=\"https://unpkg.com/react-scan/dist/auto.global.js\"></script>\n  </head>\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.tsx\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/react/column-pinning-sticky/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-column-pinning-sticky\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"start\": \"vite\",\n    \"lint\": \"eslint ./src\",\n    \"test:types\": \"tsc\"\n  },\n  \"dependencies\": {\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"@tanstack/react-table\": \"^9.0.0-alpha.19\",\n    \"react\": \"^19.2.4\",\n    \"react-dom\": \"^19.2.4\"\n  },\n  \"devDependencies\": {\n    \"@rollup/plugin-replace\": \"^6.0.3\",\n    \"@types/react\": \"^19.2.10\",\n    \"@types/react-dom\": \"^19.2.3\",\n    \"@vitejs/plugin-react\": \"^5.1.2\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\"\n  }\n}\n"
  },
  {
    "path": "examples/react/column-pinning-sticky/src/index.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\n.table-container {\n  border: 1px solid lightgray;\n  overflow-x: scroll;\n  width: 100%;\n  max-width: 960px;\n  position: relative;\n}\n\ntable {\n  /* box-shadow and borders will not work with positon: sticky otherwise */\n  border-collapse: separate !important;\n  border-spacing: 0;\n}\n\nth {\n  background-color: lightgray;\n  border-bottom: 1px solid lightgray;\n  font-weight: bold;\n  height: 30px;\n  padding: 2px 4px;\n  position: relative;\n  text-align: center;\n}\n\ntd {\n  background-color: white;\n  padding: 2px 4px;\n}\n\n.resizer {\n  background: rgba(0, 0, 0, 0.5);\n  cursor: col-resize;\n  height: 100%;\n  position: absolute;\n  right: 0;\n  top: 0;\n  touch-action: none;\n  user-select: none;\n  width: 5px;\n}\n\n.resizer.isResizing {\n  background: blue;\n  opacity: 1;\n}\n"
  },
  {
    "path": "examples/react/column-pinning-sticky/src/main.tsx",
    "content": "import React from 'react'\nimport ReactDOM from 'react-dom/client'\nimport {\n  columnOrderingFeature,\n  columnPinningFeature,\n  columnResizingFeature,\n  columnSizingFeature,\n  columnVisibilityFeature,\n  tableFeatures,\n  useTable,\n} from '@tanstack/react-table'\nimport { faker } from '@faker-js/faker'\nimport { makeData } from './makeData'\nimport type { Column, ColumnDef } from '@tanstack/react-table'\nimport type { CSSProperties } from 'react'\nimport type { Person } from './makeData'\nimport './index.css'\n\nconst _features = tableFeatures({\n  columnOrderingFeature,\n  columnPinningFeature,\n  columnResizingFeature,\n  columnSizingFeature,\n  columnVisibilityFeature,\n})\n\n// These are the important styles to make sticky column pinning work!\n// Apply styles like this using your CSS strategy of choice with this kind of logic to head cells, data cells, footer cells, etc.\n// View the index.css file for more needed styles such as border-collapse: separate\nconst getCommonPinningStyles = (\n  column: Column<typeof _features, Person>,\n): CSSProperties => {\n  const isPinned = column.getIsPinned()\n  const isLastLeftPinnedColumn =\n    isPinned === 'left' && column.getIsLastColumn('left')\n  const isFirstRightPinnedColumn =\n    isPinned === 'right' && column.getIsFirstColumn('right')\n\n  return {\n    boxShadow: isLastLeftPinnedColumn\n      ? '-4px 0 4px -4px gray inset'\n      : isFirstRightPinnedColumn\n        ? '4px 0 4px -4px gray inset'\n        : undefined,\n    left: isPinned === 'left' ? `${column.getStart('left')}px` : undefined,\n    right: isPinned === 'right' ? `${column.getAfter('right')}px` : undefined,\n    opacity: isPinned ? 0.95 : 1,\n    position: isPinned ? 'sticky' : 'relative',\n    width: column.getSize(),\n    zIndex: isPinned ? 1 : 0,\n  }\n}\n\nconst defaultColumns: Array<ColumnDef<typeof _features, Person>> = [\n  {\n    accessorKey: 'firstName',\n    id: 'firstName',\n    header: 'First Name',\n    cell: (info) => info.getValue(),\n    footer: (props) => props.column.id,\n    size: 180,\n  },\n  {\n    accessorFn: (row) => row.lastName,\n    id: 'lastName',\n    cell: (info) => info.getValue(),\n    header: () => <span>Last Name</span>,\n    footer: (props) => props.column.id,\n    size: 180,\n  },\n  {\n    accessorKey: 'age',\n    id: 'age',\n    header: 'Age',\n    footer: (props) => props.column.id,\n    size: 180,\n  },\n  {\n    accessorKey: 'visits',\n    id: 'visits',\n    header: 'Visits',\n    footer: (props) => props.column.id,\n    size: 180,\n  },\n  {\n    accessorKey: 'status',\n    id: 'status',\n    header: 'Status',\n    footer: (props) => props.column.id,\n    size: 180,\n  },\n  {\n    accessorKey: 'progress',\n    id: 'progress',\n    header: 'Profile Progress',\n    footer: (props) => props.column.id,\n    size: 180,\n  },\n]\n\nfunction App() {\n  const [data, setData] = React.useState(() => makeData(30))\n  const [columns] = React.useState(() => [...defaultColumns])\n\n  const rerender = () => setData(() => makeData(30))\n\n  const table = useTable(\n    {\n      _features,\n      _rowModels: {},\n      columns,\n      data,\n      debugTable: true,\n      debugHeaders: true,\n      debugColumns: true,\n      columnResizeMode: 'onChange',\n    },\n    (state) => state,\n  )\n\n  const randomizeColumns = () => {\n    table.setColumnOrder(\n      faker.helpers.shuffle(table.getAllLeafColumns().map((d) => d.id)),\n    )\n  }\n\n  return (\n    <table.Subscribe\n      selector={(state) => ({\n        columnVisibility: state.columnVisibility,\n        columnOrder: state.columnOrder,\n        columnPinning: state.columnPinning,\n        columnSizing: state.columnSizing,\n        columnResizing: state.columnResizing,\n      })}\n    >\n      {(_topLevelState) => (\n        <div className=\"p-2\">\n          <div className=\"inline-block border border-black shadow rounded\">\n            <div className=\"px-1 border-b border-black\">\n              <label>\n                <input\n                  type=\"checkbox\"\n                  checked={table.getIsAllColumnsVisible()}\n                  onChange={table.getToggleAllColumnsVisibilityHandler()}\n                />{' '}\n                Toggle All\n              </label>\n            </div>\n            {table.getAllLeafColumns().map((column) => {\n              return (\n                <div key={column.id} className=\"px-1\">\n                  <label>\n                    <input\n                      type=\"checkbox\"\n                      checked={column.getIsVisible()}\n                      onChange={column.getToggleVisibilityHandler()}\n                    />{' '}\n                    {column.id}\n                  </label>\n                </div>\n              )\n            })}\n          </div>\n          <div className=\"h-4\" />\n          <div className=\"flex flex-wrap gap-2\">\n            <button onClick={() => rerender()} className=\"border p-1\">\n              Regenerate\n            </button>\n            <button onClick={() => randomizeColumns()} className=\"border p-1\">\n              Shuffle Columns\n            </button>\n          </div>\n          <div className=\"h-4\" />\n          <div className=\"table-container\">\n            <table\n              style={{\n                width: table.getTotalSize(),\n              }}\n            >\n              <thead>\n                {table.getHeaderGroups().map((headerGroup) => (\n                  <tr key={headerGroup.id}>\n                    {headerGroup.headers.map((header) => {\n                      const { column } = header\n\n                      return (\n                        <table.Subscribe\n                          // subscribe only to the column resizing and sizing state changes\n                          selector={(state) => ({\n                            isResizingColumn:\n                              state.columnResizing.isResizingColumn ===\n                              column.id,\n                            columnSize: state.columnSizing[column.id],\n                          })}\n                        >\n                          {() => (\n                            <th\n                              key={header.id}\n                              colSpan={header.colSpan}\n                              // IMPORTANT: This is where the magic happens!\n                              style={{ ...getCommonPinningStyles(column) }}\n                            >\n                              <div className=\"whitespace-nowrap\">\n                                {header.isPlaceholder ? null : (\n                                  <>\n                                    <table.FlexRender header={header} />{' '}\n                                  </>\n                                )}\n                                {/* Demo getIndex behavior */}\n                                {column.getIndex(\n                                  column.getIsPinned() || 'center',\n                                )}\n                              </div>\n                              {!header.isPlaceholder &&\n                                header.column.getCanPin() && (\n                                  <div className=\"flex gap-1 justify-center\">\n                                    {header.column.getIsPinned() !== 'left' ? (\n                                      <button\n                                        className=\"border rounded px-2\"\n                                        onClick={() => {\n                                          header.column.pin('left')\n                                        }}\n                                      >\n                                        {'<='}\n                                      </button>\n                                    ) : null}\n                                    {header.column.getIsPinned() ? (\n                                      <button\n                                        className=\"border rounded px-2\"\n                                        onClick={() => {\n                                          header.column.pin(false)\n                                        }}\n                                      >\n                                        X\n                                      </button>\n                                    ) : null}\n                                    {header.column.getIsPinned() !== 'right' ? (\n                                      <button\n                                        className=\"border rounded px-2\"\n                                        onClick={() => {\n                                          header.column.pin('right')\n                                        }}\n                                      >\n                                        {'=>'}\n                                      </button>\n                                    ) : null}\n                                  </div>\n                                )}\n                              <div\n                                onDoubleClick={() => header.column.resetSize()}\n                                onMouseDown={header.getResizeHandler()}\n                                onTouchStart={header.getResizeHandler()}\n                                className={`resizer ${\n                                  header.column.getIsResizing()\n                                    ? 'isResizing'\n                                    : ''\n                                }`}\n                              />\n                            </th>\n                          )}\n                        </table.Subscribe>\n                      )\n                    })}\n                  </tr>\n                ))}\n              </thead>\n              <tbody>\n                {table.getRowModel().rows.map((row) => (\n                  <tr key={row.id}>\n                    {row.getVisibleCells().map((cell) => {\n                      const { column } = cell\n                      return (\n                        <table.Subscribe\n                          // subscribe only to the column resizing and sizing state changes\n                          selector={(state) => ({\n                            isResizingColumn:\n                              state.columnResizing.isResizingColumn ===\n                              column.id,\n                            columnSize: state.columnSizing[column.id],\n                          })}\n                        >\n                          {() => (\n                            <td\n                              key={cell.id}\n                              // IMPORTANT: This is where the magic happens!\n                              style={{ ...getCommonPinningStyles(column) }}\n                            >\n                              <table.FlexRender cell={cell} />\n                            </td>\n                          )}\n                        </table.Subscribe>\n                      )\n                    })}\n                  </tr>\n                ))}\n              </tbody>\n            </table>\n          </div>\n          <table.Subscribe selector={(state) => state}>\n            {(state) => <pre>{JSON.stringify(state, null, 2)}</pre>}\n          </table.Subscribe>\n        </div>\n      )}\n    </table.Subscribe>\n  )\n}\n\nconst rootElement = document.getElementById('root')\nif (!rootElement) throw new Error('Failed to find the root element')\n\nReactDOM.createRoot(rootElement).render(\n  <React.StrictMode>\n    <App />\n  </React.StrictMode>,\n)\n"
  },
  {
    "path": "examples/react/column-pinning-sticky/src/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  subRows?: Array<Person>\n}\n\nconst range = (len: number) => {\n  const arr: Array<number> = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (): Person => {\n  return {\n    firstName: faker.person.firstName(),\n    lastName: faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: faker.number.int(1000),\n    progress: faker.number.int(100),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0],\n  }\n}\n\nexport function makeData(...lens: Array<number>) {\n  const makeDataLevel = (depth = 0): Array<Person> => {\n    const len = lens[depth]\n    return range(len).map((_d): Person => {\n      return {\n        ...newPerson(),\n        subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined,\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n"
  },
  {
    "path": "examples/react/column-pinning-sticky/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"module\": \"ESNext\",\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"react-jsx\",\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "examples/react/column-pinning-sticky/vite.config.js",
    "content": "import { defineConfig } from 'vite'\nimport react from '@vitejs/plugin-react'\nimport rollupReplace from '@rollup/plugin-replace'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [\n    rollupReplace({\n      preventAssignment: true,\n      values: {\n        __DEV__: JSON.stringify(true),\n        'process.env.NODE_ENV': JSON.stringify('development'),\n      },\n    }),\n    react(),\n  ],\n})\n"
  },
  {
    "path": "examples/react/column-resizing/.gitignore",
    "content": "node_modules\n.DS_Store\ndist\ndist-ssr\n*.local\n"
  },
  {
    "path": "examples/react/column-resizing/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run start` or `yarn start`\n"
  },
  {
    "path": "examples/react/column-resizing/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite App</title>\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n    <script src=\"https://unpkg.com/react-scan/dist/auto.global.js\"></script>\n  </head>\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.tsx\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/react/column-resizing/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-column-resizing\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"start\": \"vite\",\n    \"lint\": \"eslint ./src\",\n    \"test:types\": \"tsc\"\n  },\n  \"dependencies\": {\n    \"@tanstack/react-table\": \"^9.0.0-alpha.19\",\n    \"react\": \"^19.2.4\",\n    \"react-dom\": \"^19.2.4\"\n  },\n  \"devDependencies\": {\n    \"@rollup/plugin-replace\": \"^6.0.3\",\n    \"@types/react\": \"^19.2.10\",\n    \"@types/react-dom\": \"^19.2.3\",\n    \"@vitejs/plugin-react\": \"^5.1.2\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\"\n  }\n}\n"
  },
  {
    "path": "examples/react/column-resizing/src/index.css",
    "content": "* {\n  box-sizing: border-box;\n}\n\nhtml {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable,\n.divTable {\n  border: 1px solid lightgray;\n  width: fit-content;\n}\n\n.tr {\n  display: flex;\n}\n\ntr,\n.tr {\n  width: fit-content;\n  height: 30px;\n}\n\nth,\n.th,\ntd,\n.td {\n  box-shadow: inset 0 0 0 1px lightgray;\n  padding: 0.25rem;\n}\n\nth,\n.th {\n  padding: 2px 4px;\n  position: relative;\n  font-weight: bold;\n  text-align: center;\n  height: 30px;\n}\n\ntd,\n.td {\n  height: 30px;\n}\n\n.resizer {\n  position: absolute;\n  top: 0;\n  height: 100%;\n  width: 5px;\n  background: rgba(0, 0, 0, 0.5);\n  cursor: col-resize;\n  user-select: none;\n  touch-action: none;\n}\n\n.resizer.ltr {\n  right: 0;\n}\n\n.resizer.rtl {\n  left: 0;\n}\n\n.resizer.isResizing {\n  background: blue;\n  opacity: 1;\n}\n\n@media (hover: hover) {\n  .resizer {\n    opacity: 0;\n  }\n\n  *:hover > .resizer {\n    opacity: 1;\n  }\n}\n"
  },
  {
    "path": "examples/react/column-resizing/src/main.tsx",
    "content": "import React from 'react'\nimport ReactDOM from 'react-dom/client'\nimport {\n  columnResizingFeature,\n  columnSizingFeature,\n  createColumnHelper,\n  tableFeatures,\n  useTable,\n} from '@tanstack/react-table'\nimport type {\n  ColumnResizeDirection,\n  ColumnResizeMode,\n} from '@tanstack/react-table'\nimport './index.css'\n\nconst _features = tableFeatures({ columnResizingFeature, columnSizingFeature })\n\ntype Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  status: string\n  progress: number\n}\n\nconst defaultData: Array<Person> = [\n  {\n    firstName: 'tanner',\n    lastName: 'linsley',\n    age: 24,\n    visits: 100,\n    status: 'In Relationship',\n    progress: 50,\n  },\n  {\n    firstName: 'tandy',\n    lastName: 'miller',\n    age: 40,\n    visits: 40,\n    status: 'Single',\n    progress: 80,\n  },\n  {\n    firstName: 'joe',\n    lastName: 'dirte',\n    age: 45,\n    visits: 20,\n    status: 'Complicated',\n    progress: 10,\n  },\n]\n\nconst columnHelper = createColumnHelper<typeof _features, Person>()\n\nconst columns = columnHelper.columns([\n  columnHelper.group({\n    header: 'Name',\n    footer: (props) => props.column.id,\n    columns: columnHelper.columns([\n      columnHelper.accessor('firstName', {\n        cell: (info) => info.getValue(),\n        footer: (props) => props.column.id,\n      }),\n      columnHelper.accessor((row) => row.lastName, {\n        id: 'lastName',\n        cell: (info) => info.getValue(),\n        header: () => <span>Last Name</span>,\n        footer: (props) => props.column.id,\n      }),\n    ]),\n  }),\n  columnHelper.group({\n    header: 'Info',\n    footer: (props) => props.column.id,\n    columns: columnHelper.columns([\n      columnHelper.accessor('age', {\n        header: () => 'Age',\n        footer: (props) => props.column.id,\n      }),\n      columnHelper.group({\n        header: 'More Info',\n        columns: columnHelper.columns([\n          columnHelper.accessor('visits', {\n            header: () => <span>Visits</span>,\n            footer: (props) => props.column.id,\n          }),\n          columnHelper.accessor('status', {\n            header: 'Status',\n            footer: (props) => props.column.id,\n          }),\n          columnHelper.accessor('progress', {\n            header: 'Profile Progress',\n            footer: (props) => props.column.id,\n          }),\n        ]),\n      }),\n    ]),\n  }),\n])\n\nfunction App() {\n  const [data] = React.useState(() => [...defaultData])\n\n  const [columnResizeMode, setColumnResizeMode] =\n    React.useState<ColumnResizeMode>('onChange')\n\n  const [columnResizeDirection, setColumnResizeDirection] =\n    React.useState<ColumnResizeDirection>('ltr')\n\n  const rerender = React.useReducer(() => ({}), {})[1]\n\n  const table = useTable(\n    {\n      _features,\n      _rowModels: {},\n      columns,\n      data,\n      columnResizeMode,\n      columnResizeDirection,\n      debugTable: true,\n      debugHeaders: true,\n      debugColumns: true,\n    },\n    (state) => state,\n  )\n\n  return (\n    <div className=\"p-2\">\n      <select\n        value={columnResizeMode}\n        onChange={(e) =>\n          setColumnResizeMode(e.target.value as ColumnResizeMode)\n        }\n        className=\"border p-2 border-black rounded\"\n      >\n        <option value=\"onEnd\">Resize: \"onEnd\"</option>\n        <option value=\"onChange\">Resize: \"onChange\"</option>\n      </select>\n      <select\n        value={columnResizeDirection}\n        onChange={(e) =>\n          setColumnResizeDirection(e.target.value as ColumnResizeDirection)\n        }\n        className=\"border p-2 border-black rounded\"\n      >\n        <option value=\"ltr\">Resize Direction: \"ltr\"</option>\n        <option value=\"rtl\">Resize Direction: \"rtl\"</option>\n      </select>\n      <div style={{ direction: table.options.columnResizeDirection }}>\n        <div className=\"h-4\" />\n        <div className=\"text-xl\">{'<table/>'}</div>\n        <div className=\"overflow-x-auto\">\n          <table style={{ width: table.getCenterTotalSize() }}>\n            <thead>\n              {table.getHeaderGroups().map((headerGroup) => (\n                <tr key={headerGroup.id}>\n                  {headerGroup.headers.map((header) => (\n                    <th\n                      key={header.id}\n                      colSpan={header.colSpan}\n                      style={{\n                        width: header.getSize(),\n                      }}\n                    >\n                      {header.isPlaceholder ? null : (\n                        <table.FlexRender header={header} />\n                      )}\n                      <div\n                        onDoubleClick={() => header.column.resetSize()}\n                        onMouseDown={header.getResizeHandler()}\n                        onTouchStart={header.getResizeHandler()}\n                        className={`resizer ${\n                          table.options.columnResizeDirection\n                        } ${header.column.getIsResizing() ? 'isResizing' : ''}`}\n                        style={{\n                          transform:\n                            columnResizeMode === 'onEnd' &&\n                            header.column.getIsResizing()\n                              ? `translateX(${\n                                  (table.options.columnResizeDirection === 'rtl'\n                                    ? -1\n                                    : 1) *\n                                  (table.store.state.columnResizing\n                                    .deltaOffset ?? 0)\n                                }px)`\n                              : '',\n                        }}\n                      />\n                    </th>\n                  ))}\n                </tr>\n              ))}\n            </thead>\n            <tbody>\n              {table.getRowModel().rows.map((row) => (\n                <tr key={row.id}>\n                  {row.getAllCells().map((cell) => (\n                    <td\n                      key={cell.id}\n                      style={{\n                        width: cell.column.getSize(),\n                      }}\n                    >\n                      <table.FlexRender cell={cell} />\n                    </td>\n                  ))}\n                </tr>\n              ))}\n            </tbody>\n          </table>\n        </div>\n        <div className=\"h-4\" />\n        <div className=\"text-xl\">{'<div/> (relative)'}</div>\n        <div className=\"overflow-x-auto\">\n          <div className=\"divTable\" style={{ width: table.getTotalSize() }}>\n            <div className=\"thead\">\n              {table.getHeaderGroups().map((headerGroup) => (\n                <div key={headerGroup.id} className=\"tr\">\n                  {headerGroup.headers.map((header) => (\n                    <div\n                      key={header.id}\n                      className=\"th\"\n                      style={{\n                        width: header.getSize(),\n                      }}\n                    >\n                      {header.isPlaceholder ? null : (\n                        <table.FlexRender header={header} />\n                      )}\n                      <div\n                        onDoubleClick={() => header.column.resetSize()}\n                        onMouseDown={header.getResizeHandler()}\n                        onTouchStart={header.getResizeHandler()}\n                        className={`resizer ${\n                          table.options.columnResizeDirection\n                        } ${header.column.getIsResizing() ? 'isResizing' : ''}`}\n                        style={{\n                          transform:\n                            columnResizeMode === 'onEnd' &&\n                            header.column.getIsResizing()\n                              ? `translateX(${\n                                  (table.options.columnResizeDirection === 'rtl'\n                                    ? -1\n                                    : 1) *\n                                  (table.store.state.columnResizing\n                                    .deltaOffset ?? 0)\n                                }px)`\n                              : '',\n                        }}\n                      />\n                    </div>\n                  ))}\n                </div>\n              ))}\n            </div>\n            <div className=\"tbody\">\n              {table.getRowModel().rows.map((row) => (\n                <div key={row.id} className=\"tr\">\n                  {row.getAllCells().map((cell) => (\n                    <div\n                      key={cell.id}\n                      className=\"td\"\n                      style={{\n                        width: cell.column.getSize(),\n                      }}\n                    >\n                      <table.FlexRender cell={cell} />\n                    </div>\n                  ))}\n                </div>\n              ))}\n            </div>\n          </div>\n        </div>\n        <div className=\"h-4\" />\n        <div className=\"text-xl\">{'<div/> (absolute positioning)'}</div>\n        <div className=\"overflow-x-auto\">\n          <div\n            className=\"divTable\"\n            style={{\n              width: table.getTotalSize(),\n            }}\n          >\n            <div className=\"thead\">\n              {table.getHeaderGroups().map((headerGroup) => (\n                <div\n                  key={headerGroup.id}\n                  className=\"tr\"\n                  style={{\n                    position: 'relative',\n                  }}\n                >\n                  {headerGroup.headers.map((header) => (\n                    <div\n                      key={header.id}\n                      className=\"th\"\n                      style={{\n                        position: 'absolute',\n                        left: header.getStart(),\n                        width: header.getSize(),\n                      }}\n                    >\n                      {header.isPlaceholder ? null : (\n                        <table.FlexRender header={header} />\n                      )}\n                      <div\n                        onDoubleClick={() => header.column.resetSize()}\n                        onMouseDown={header.getResizeHandler()}\n                        onTouchStart={header.getResizeHandler()}\n                        className={`resizer ${\n                          table.options.columnResizeDirection\n                        } ${header.column.getIsResizing() ? 'isResizing' : ''}`}\n                        style={{\n                          transform:\n                            columnResizeMode === 'onEnd' &&\n                            header.column.getIsResizing()\n                              ? `translateX(${\n                                  (table.options.columnResizeDirection === 'rtl'\n                                    ? -1\n                                    : 1) *\n                                  (table.store.state.columnResizing\n                                    .deltaOffset ?? 0)\n                                }px)`\n                              : '',\n                        }}\n                      />\n                    </div>\n                  ))}\n                </div>\n              ))}\n            </div>\n            <div className=\"tbody\">\n              {table.getRowModel().rows.map((row) => (\n                <div\n                  key={row.id}\n                  className=\"tr\"\n                  style={{\n                    position: 'relative',\n                  }}\n                >\n                  {row.getAllCells().map((cell) => (\n                    <div\n                      key={cell.id}\n                      className=\"td\"\n                      style={{\n                        position: 'absolute',\n                        left: cell.column.getStart(),\n                        width: cell.column.getSize(),\n                      }}\n                    >\n                      <table.FlexRender cell={cell} />\n                    </div>\n                  ))}\n                </div>\n              ))}\n            </div>\n          </div>\n        </div>\n      </div>\n      <div className=\"h-4\" />\n      <button onClick={() => rerender()} className=\"border p-2\">\n        Rerender\n      </button>\n      <table.Subscribe selector={(state) => state}>\n        {(state) => <pre>{JSON.stringify(state, null, 2)}</pre>}\n      </table.Subscribe>\n    </div>\n  )\n}\n\nconst rootElement = document.getElementById('root')\nif (!rootElement) throw new Error('Failed to find the root element')\n\nReactDOM.createRoot(rootElement).render(\n  <React.StrictMode>\n    <App />\n  </React.StrictMode>,\n)\n"
  },
  {
    "path": "examples/react/column-resizing/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"module\": \"ESNext\",\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"react-jsx\",\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "examples/react/column-resizing/vite.config.js",
    "content": "import { defineConfig } from 'vite'\nimport react from '@vitejs/plugin-react'\nimport rollupReplace from '@rollup/plugin-replace'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [\n    rollupReplace({\n      preventAssignment: true,\n      values: {\n        __DEV__: JSON.stringify(true),\n        'process.env.NODE_ENV': JSON.stringify('development'),\n      },\n    }),\n    react(),\n  ],\n})\n"
  },
  {
    "path": "examples/react/column-resizing-performant/.gitignore",
    "content": "node_modules\n.DS_Store\ndist\ndist-ssr\n*.local\n"
  },
  {
    "path": "examples/react/column-resizing-performant/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run start` or `yarn start`\n"
  },
  {
    "path": "examples/react/column-resizing-performant/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite App</title>\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n    <script src=\"https://unpkg.com/react-scan/dist/auto.global.js\"></script>\n  </head>\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.tsx\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/react/column-resizing-performant/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-column-resizing-performant\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"start\": \"vite\",\n    \"lint\": \"eslint ./src\",\n    \"test:types\": \"tsc\"\n  },\n  \"dependencies\": {\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"@tanstack/react-table\": \"^9.0.0-alpha.19\",\n    \"react\": \"^19.2.4\",\n    \"react-dom\": \"^19.2.4\"\n  },\n  \"devDependencies\": {\n    \"@rollup/plugin-replace\": \"^6.0.3\",\n    \"@types/react\": \"^19.2.10\",\n    \"@types/react-dom\": \"^19.2.3\",\n    \"@vitejs/plugin-react\": \"^5.1.2\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\"\n  }\n}\n"
  },
  {
    "path": "examples/react/column-resizing-performant/src/index.css",
    "content": "* {\n  box-sizing: border-box;\n}\n\nhtml {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable,\n.divTable {\n  border: 1px solid lightgray;\n  width: fit-content;\n}\n\n.tr {\n  display: flex;\n}\n\ntr,\n.tr {\n  width: fit-content;\n  height: 30px;\n}\n\nth,\n.th,\ntd,\n.td {\n  box-shadow: inset 0 0 0 1px lightgray;\n  padding: 0.25rem;\n}\n\nth,\n.th {\n  padding: 2px 4px;\n  position: relative;\n  font-weight: bold;\n  text-align: center;\n  height: 30px;\n}\n\ntd,\n.td {\n  height: 30px;\n}\n\n.resizer {\n  position: absolute;\n  top: 0;\n  height: 100%;\n  right: 0;\n  width: 5px;\n  background: rgba(0, 0, 0, 0.5);\n  cursor: col-resize;\n  user-select: none;\n  touch-action: none;\n}\n\n.resizer.isResizing {\n  background: blue;\n  opacity: 1;\n}\n\n@media (hover: hover) {\n  .resizer {\n    opacity: 0;\n  }\n\n  *:hover > .resizer {\n    opacity: 1;\n  }\n}\n"
  },
  {
    "path": "examples/react/column-resizing-performant/src/main.tsx",
    "content": "import React from 'react'\nimport ReactDOM from 'react-dom/client'\nimport {\n  columnResizingFeature,\n  columnSizingFeature,\n  createColumnHelper,\n  tableFeatures,\n  useTable,\n} from '@tanstack/react-table'\nimport { makeData } from './makeData'\nimport type { Table } from '@tanstack/react-table'\nimport './index.css'\n\nconst _features = tableFeatures({ columnSizingFeature, columnResizingFeature })\n\ntype Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  status: string\n  progress: number\n}\n\nconst columnHelper = createColumnHelper<typeof _features, Person>()\n\nconst columns = columnHelper.columns([\n  columnHelper.group({\n    header: 'Name',\n    footer: (props) => props.column.id,\n    columns: columnHelper.columns([\n      columnHelper.accessor('firstName', {\n        cell: (info) => info.getValue(),\n        footer: (props) => props.column.id,\n      }),\n      columnHelper.accessor((row) => row.lastName, {\n        id: 'lastName',\n        cell: (info) => info.getValue(),\n        header: () => <span>Last Name</span>,\n        footer: (props) => props.column.id,\n      }),\n    ]),\n  }),\n  columnHelper.group({\n    header: 'Info',\n    footer: (props) => props.column.id,\n    columns: columnHelper.columns([\n      columnHelper.accessor('age', {\n        header: () => 'Age',\n        footer: (props) => props.column.id,\n      }),\n      columnHelper.accessor('visits', {\n        header: () => <span>Visits</span>,\n        footer: (props) => props.column.id,\n      }),\n      columnHelper.accessor('status', {\n        header: 'Status',\n        footer: (props) => props.column.id,\n      }),\n      columnHelper.accessor('progress', {\n        header: 'Profile Progress',\n        footer: (props) => props.column.id,\n      }),\n    ]),\n  }),\n])\n\nfunction App() {\n  const [data, _setData] = React.useState(() => makeData(200))\n\n  const rerender = React.useReducer(() => ({}), {})[1]\n\n  const table = useTable(\n    {\n      _features,\n      _rowModels: {},\n      columns,\n      data,\n      defaultColumn: {\n        minSize: 60,\n        maxSize: 800,\n      },\n      columnResizeMode: 'onChange',\n      debugTable: true,\n      debugHeaders: true,\n      debugColumns: true,\n    },\n    (state) => ({\n      columnSizing: state.columnSizing,\n      columnResizing: state.columnResizing,\n    }),\n  )\n\n  /**\n   * Instead of calling `column.getSize()` on every render for every header\n   * and especially every data cell (very expensive),\n   * we will calculate all column sizes at once at the root table level in a useMemo\n   * and pass the column sizes down as CSS variables to the <table> element.\n   */\n  const columnSizeVars = React.useMemo(() => {\n    const headers = table.getFlatHeaders()\n    const colSizes: { [key: string]: number } = {}\n    for (const header of headers) {\n      colSizes[`--header-${header.id}-size`] = header.getSize()\n      colSizes[`--col-${header.column.id}-size`] = header.column.getSize()\n    }\n    return colSizes\n  }, [table.state.columnResizing, table.state.columnSizing])\n\n  // demo purposes\n  const [enableMemo, setEnableMemo] = React.useState(true)\n\n  return (\n    <div className=\"p-2\">\n      <i>\n        This example has artificially slow cell renders to simulate complex\n        usage\n      </i>\n      <div className=\"h-4\" />\n      <label>\n        Memoize Table Body:{' '}\n        <input\n          type=\"checkbox\"\n          checked={enableMemo}\n          onChange={() => setEnableMemo(!enableMemo)}\n        />\n      </label>\n      <div className=\"h-4\" />\n      <button onClick={() => rerender()} className=\"border p-2\">\n        Rerender\n      </button>\n      <table.Subscribe selector={(state) => state}>\n        {(state) => (\n          <pre style={{ minHeight: '10rem' }}>\n            {JSON.stringify(state, null, 2)}\n          </pre>\n        )}\n      </table.Subscribe>\n      <div className=\"h-4\" />({data.length} rows)\n      <div className=\"overflow-x-auto\">\n        {/* Here in the <table> equivalent element (surrounds all table head and data cells), we will define our CSS variables for column sizes */}\n        <div\n          className=\"divTable\"\n          style={{\n            ...columnSizeVars, // Define column sizes on the <table> element\n            width: table.getTotalSize(),\n          }}\n        >\n          <div className=\"thead\">\n            {table.getHeaderGroups().map((headerGroup) => (\n              <div key={headerGroup.id} className=\"tr\">\n                {headerGroup.headers.map((header) => (\n                  <div\n                    key={header.id}\n                    className=\"th\"\n                    style={{\n                      width: `calc(var(--header-${header.id}-size) * 1px)`,\n                    }}\n                  >\n                    {header.isPlaceholder ? null : (\n                      <table.FlexRender header={header} />\n                    )}\n                    <div\n                      onDoubleClick={() => header.column.resetSize()}\n                      onMouseDown={header.getResizeHandler()}\n                      onTouchStart={header.getResizeHandler()}\n                      className={`resizer ${\n                        header.column.getIsResizing() ? 'isResizing' : ''\n                      }`}\n                    />\n                  </div>\n                ))}\n              </div>\n            ))}\n          </div>\n          {/* When resizing any column we will render this special memoized version of our table body */}\n          {table.store.state.columnResizing.isResizingColumn && enableMemo ? (\n            <MemoizedTableBody table={table} />\n          ) : (\n            <TableBody table={table} />\n          )}\n        </div>\n      </div>\n    </div>\n  )\n}\n\n// un-memoized normal table body component - see memoized version below\nfunction TableBody({ table }: { table: Table<typeof _features, Person> }) {\n  return (\n    <div className=\"tbody\">\n      {table.getRowModel().rows.map((row) => (\n        <div key={row.id} className=\"tr\">\n          {row.getAllCells().map((cell) => {\n            // simulate expensive render\n            for (const _ of Array(10000)) {\n              Math.random()\n            }\n\n            return (\n              <div\n                key={cell.id}\n                className=\"td\"\n                style={{\n                  width: `calc(var(--col-${cell.column.id}-size) * 1px)`,\n                }}\n              >\n                {cell.renderValue<any>()}\n              </div>\n            )\n          })}\n        </div>\n      ))}\n    </div>\n  )\n}\n\n// special memoized wrapper for our table body that we will use during column resizing\nexport const MemoizedTableBody = React.memo(\n  TableBody,\n  (prev, next) => prev.table.options.data === next.table.options.data,\n) as typeof TableBody\n\nconst rootElement = document.getElementById('root')\nif (!rootElement) throw new Error('Failed to find the root element')\n\nReactDOM.createRoot(rootElement).render(\n  <React.StrictMode>\n    <App />\n  </React.StrictMode>,\n)\n"
  },
  {
    "path": "examples/react/column-resizing-performant/src/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  subRows?: Array<Person>\n}\n\nconst range = (len: number) => {\n  const arr: Array<number> = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (): Person => {\n  return {\n    firstName: faker.person.firstName(),\n    lastName: faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: faker.number.int(1000),\n    progress: faker.number.int(100),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0],\n  }\n}\n\nexport function makeData(...lens: Array<number>) {\n  const makeDataLevel = (depth = 0): Array<Person> => {\n    const len = lens[depth]\n    return range(len).map((_d): Person => {\n      return {\n        ...newPerson(),\n        subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined,\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n"
  },
  {
    "path": "examples/react/column-resizing-performant/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"module\": \"ESNext\",\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"react-jsx\",\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "examples/react/column-resizing-performant/vite.config.js",
    "content": "import { defineConfig } from 'vite'\nimport react from '@vitejs/plugin-react'\nimport rollupReplace from '@rollup/plugin-replace'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [\n    rollupReplace({\n      preventAssignment: true,\n      values: {\n        __DEV__: JSON.stringify(true),\n        'process.env.NODE_ENV': JSON.stringify('development'),\n      },\n    }),\n    react(),\n  ],\n})\n"
  },
  {
    "path": "examples/react/column-sizing/.gitignore",
    "content": "node_modules\n.DS_Store\ndist\ndist-ssr\n*.local\n"
  },
  {
    "path": "examples/react/column-sizing/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run start` or `yarn start`\n"
  },
  {
    "path": "examples/react/column-sizing/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite App</title>\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n    <script src=\"https://unpkg.com/react-scan/dist/auto.global.js\"></script>\n  </head>\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.tsx\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/react/column-sizing/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-column-sizing\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"start\": \"vite\",\n    \"lint\": \"eslint ./src\",\n    \"test:types\": \"tsc\"\n  },\n  \"dependencies\": {\n    \"@tanstack/react-table\": \"^9.0.0-alpha.19\",\n    \"react\": \"^19.2.4\",\n    \"react-dom\": \"^19.2.4\"\n  },\n  \"devDependencies\": {\n    \"@rollup/plugin-replace\": \"^6.0.3\",\n    \"@types/react\": \"^19.2.10\",\n    \"@types/react-dom\": \"^19.2.3\",\n    \"@vitejs/plugin-react\": \"^5.1.2\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\"\n  }\n}\n"
  },
  {
    "path": "examples/react/column-sizing/src/index.css",
    "content": "* {\n  box-sizing: border-box;\n}\n\nhtml {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable,\n.divTable {\n  border: 1px solid lightgray;\n  width: fit-content;\n}\n\n.tr {\n  display: flex;\n}\n\ntr,\n.tr {\n  width: fit-content;\n  height: 30px;\n}\n\nth,\n.th,\ntd,\n.td {\n  box-shadow: inset 0 0 0 1px lightgray;\n  padding: 0.25rem;\n}\n\nth,\n.th {\n  padding: 2px 4px;\n  position: relative;\n  font-weight: bold;\n  text-align: center;\n  height: 30px;\n}\n\ntd,\n.td {\n  height: 30px;\n}\n\n.resizer {\n  position: absolute;\n  top: 0;\n  height: 100%;\n  width: 5px;\n  background: rgba(0, 0, 0, 0.5);\n  cursor: col-resize;\n  user-select: none;\n  touch-action: none;\n}\n\n.resizer.ltr {\n  right: 0;\n}\n\n.resizer.rtl {\n  left: 0;\n}\n\n.resizer.isResizing {\n  background: blue;\n  opacity: 1;\n}\n\n@media (hover: hover) {\n  .resizer {\n    opacity: 0;\n  }\n\n  *:hover > .resizer {\n    opacity: 1;\n  }\n}\n"
  },
  {
    "path": "examples/react/column-sizing/src/main.tsx",
    "content": "import React from 'react'\nimport ReactDOM from 'react-dom/client'\nimport {\n  columnSizingFeature,\n  createColumnHelper,\n  tableFeatures,\n  useTable,\n} from '@tanstack/react-table'\nimport './index.css'\n\nconst _features = tableFeatures({ columnSizingFeature })\n\ntype Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  status: string\n  progress: number\n}\n\nconst defaultData: Array<Person> = [\n  {\n    firstName: 'tanner',\n    lastName: 'linsley',\n    age: 24,\n    visits: 100,\n    status: 'In Relationship',\n    progress: 50,\n  },\n  {\n    firstName: 'tandy',\n    lastName: 'miller',\n    age: 40,\n    visits: 40,\n    status: 'Single',\n    progress: 80,\n  },\n  {\n    firstName: 'joe',\n    lastName: 'dirte',\n    age: 45,\n    visits: 20,\n    status: 'Complicated',\n    progress: 10,\n  },\n]\n\nconst columnHelper = createColumnHelper<typeof _features, Person>()\n\n// This is not the Column Resizing Example, this is a simplified version that just sets static column sizes\nfunction App() {\n  const [data] = React.useState(() => [...defaultData])\n\n  const columns = React.useMemo(\n    () =>\n      columnHelper.columns([\n        columnHelper.accessor('firstName', {\n          cell: (info) => info.getValue(),\n          footer: (props) => props.column.id,\n          size: 120, // initial size\n        }),\n        columnHelper.accessor((row) => row.lastName, {\n          id: 'lastName',\n          cell: (info) => info.getValue(),\n          header: () => <span>Last Name</span>,\n          footer: (props) => props.column.id,\n          size: 120,\n        }),\n        columnHelper.accessor('age', {\n          header: () => 'Age',\n          footer: (props) => props.column.id,\n          size: 100,\n        }),\n        columnHelper.accessor('visits', {\n          header: () => <span>Visits</span>,\n          footer: (props) => props.column.id,\n          size: 80,\n        }),\n        columnHelper.accessor('status', {\n          header: 'Status',\n          footer: (props) => props.column.id,\n          size: 200,\n        }),\n        columnHelper.accessor('progress', {\n          header: 'Profile Progress',\n          footer: (props) => props.column.id,\n          size: 200,\n        }),\n      ]),\n    [],\n  )\n\n  const rerender = React.useReducer(() => ({}), {})[1]\n\n  const table = useTable(\n    {\n      _features,\n      _rowModels: {},\n      columns,\n      data,\n      debugTable: true,\n      debugHeaders: true,\n      debugColumns: true,\n    },\n    (state) => state,\n  )\n\n  return (\n    <div className=\"p-2\">\n      <div className=\"flex flex-wrap gap-2\">\n        <div className=\"text-xl\">{'Initial Column Sizes'}</div>\n        <br />\n        {table.getAllColumns().map((column) => (\n          <div key={column.id}>\n            <label>\n              {column.id}\n              <input\n                type=\"number\"\n                value={column.getSize()}\n                onChange={(e) => {\n                  // Don't actually do this to resize columns. This is just for demonstration purposes.\n                  // See the Column Resizing Example for how to do this with dedicated resizing APIs efficiently.\n                  table.setColumnSizing({\n                    ...table.store.state.columnSizing,\n                    [column.id]: Number(e.target.value),\n                  })\n                }}\n                className=\"border rounded p-1 w-24 ml-2\"\n              />\n            </label>\n          </div>\n        ))}\n      </div>\n      <div className=\"flex gap-2\"></div>\n      <div className=\"h-4\" />\n      <div className=\"text-xl\">{'<table/>'}</div>\n      <div className=\"overflow-x-auto\">\n        <table\n          style={{\n            width: table.getCenterTotalSize(),\n          }}\n        >\n          <thead>\n            {table.getHeaderGroups().map((headerGroup) => (\n              <tr key={headerGroup.id}>\n                {headerGroup.headers.map((header) => (\n                  <th\n                    key={header.id}\n                    colSpan={header.colSpan}\n                    style={{\n                      width: header.getSize(),\n                    }}\n                  >\n                    {header.isPlaceholder ? null : (\n                      <table.FlexRender header={header} />\n                    )}\n                    <div />\n                  </th>\n                ))}\n              </tr>\n            ))}\n          </thead>\n          <tbody>\n            {table.getRowModel().rows.map((row) => (\n              <tr key={row.id}>\n                {row.getAllCells().map((cell) => (\n                  <td\n                    key={cell.id}\n                    style={{\n                      width: cell.column.getSize(),\n                    }}\n                  >\n                    <table.FlexRender cell={cell} />\n                  </td>\n                ))}\n              </tr>\n            ))}\n          </tbody>\n        </table>\n      </div>\n      <div className=\"h-4\" />\n      <div className=\"text-xl\">{'<div/> (relative)'}</div>\n      <div className=\"overflow-x-auto\">\n        <div\n          className=\"divTable\"\n          style={{\n            width: table.getTotalSize(),\n          }}\n        >\n          <div className=\"thead\">\n            {table.getHeaderGroups().map((headerGroup) => (\n              <div key={headerGroup.id} className=\"tr\">\n                {headerGroup.headers.map((header) => (\n                  <div\n                    key={header.id}\n                    className=\"th\"\n                    style={{\n                      width: header.getSize(),\n                    }}\n                  >\n                    {header.isPlaceholder ? null : (\n                      <table.FlexRender header={header} />\n                    )}\n                    <div />\n                  </div>\n                ))}\n              </div>\n            ))}\n          </div>\n          <div className=\"tbody\">\n            {table.getRowModel().rows.map((row) => (\n              <div key={row.id} className=\"tr\">\n                {row.getAllCells().map((cell) => (\n                  <div\n                    key={cell.id}\n                    className=\"td\"\n                    style={{\n                      width: cell.column.getSize(),\n                    }}\n                  >\n                    <table.FlexRender cell={cell} />\n                  </div>\n                ))}\n              </div>\n            ))}\n          </div>\n        </div>\n      </div>\n      <div className=\"h-4\" />\n      <div className=\"text-xl\">{'<div/> (absolute positioning)'}</div>\n      <div className=\"overflow-x-auto\">\n        <div\n          className=\"divTable\"\n          style={{\n            width: table.getTotalSize(),\n          }}\n        >\n          <div className=\"thead\">\n            {table.getHeaderGroups().map((headerGroup) => (\n              <div\n                key={headerGroup.id}\n                className=\"tr\"\n                style={{\n                  position: 'relative',\n                }}\n              >\n                {headerGroup.headers.map((header) => (\n                  <div\n                    key={header.id}\n                    className=\"th\"\n                    style={{\n                      position: 'absolute',\n                      left: header.getStart(),\n                      width: header.getSize(),\n                    }}\n                  >\n                    {header.isPlaceholder ? null : (\n                      <table.FlexRender header={header} />\n                    )}\n                    <div />\n                  </div>\n                ))}\n              </div>\n            ))}\n          </div>\n          <div className=\"tbody\">\n            {table.getRowModel().rows.map((row) => (\n              <div\n                key={row.id}\n                className=\"tr\"\n                style={{\n                  position: 'relative',\n                }}\n              >\n                {row.getAllCells().map((cell) => (\n                  <div\n                    key={cell.id}\n                    className=\"td\"\n                    style={{\n                      position: 'absolute',\n                      left: cell.column.getStart(),\n                      width: cell.column.getSize(),\n                    }}\n                  >\n                    <table.FlexRender cell={cell} />\n                  </div>\n                ))}\n              </div>\n            ))}\n          </div>\n        </div>\n      </div>\n      <div className=\"h-4\" />\n      <button onClick={() => rerender()} className=\"border p-2\">\n        Rerender\n      </button>\n      <table.Subscribe selector={(state) => state}>\n        {(state) => <pre>{JSON.stringify(state, null, 2)}</pre>}\n      </table.Subscribe>\n    </div>\n  )\n}\n\nconst rootElement = document.getElementById('root')\nif (!rootElement) throw new Error('Failed to find the root element')\n\nReactDOM.createRoot(rootElement).render(\n  <React.StrictMode>\n    <App />\n  </React.StrictMode>,\n)\n"
  },
  {
    "path": "examples/react/column-sizing/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"module\": \"ESNext\",\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"react-jsx\",\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "examples/react/column-sizing/vite.config.js",
    "content": "import { defineConfig } from 'vite'\nimport react from '@vitejs/plugin-react'\nimport rollupReplace from '@rollup/plugin-replace'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [\n    rollupReplace({\n      preventAssignment: true,\n      values: {\n        __DEV__: JSON.stringify(true),\n        'process.env.NODE_ENV': JSON.stringify('development'),\n      },\n    }),\n    react(),\n  ],\n})\n"
  },
  {
    "path": "examples/react/column-visibility/.gitignore",
    "content": "node_modules\n.DS_Store\ndist\ndist-ssr\n*.local\n"
  },
  {
    "path": "examples/react/column-visibility/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run start` or `yarn start`\n"
  },
  {
    "path": "examples/react/column-visibility/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite App</title>\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n    <script src=\"https://unpkg.com/react-scan/dist/auto.global.js\"></script>\n  </head>\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.tsx\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/react/column-visibility/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-column-visibility\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"start\": \"vite\",\n    \"lint\": \"eslint ./src\",\n    \"test:types\": \"tsc\"\n  },\n  \"dependencies\": {\n    \"@tanstack/react-table\": \"^9.0.0-alpha.19\",\n    \"react\": \"^19.2.4\",\n    \"react-dom\": \"^19.2.4\"\n  },\n  \"devDependencies\": {\n    \"@rollup/plugin-replace\": \"^6.0.3\",\n    \"@types/react\": \"^19.2.10\",\n    \"@types/react-dom\": \"^19.2.3\",\n    \"@vitejs/plugin-react\": \"^5.1.2\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\"\n  }\n}\n"
  },
  {
    "path": "examples/react/column-visibility/src/index.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n"
  },
  {
    "path": "examples/react/column-visibility/src/main.tsx",
    "content": "import React from 'react'\nimport ReactDOM from 'react-dom/client'\nimport {\n  columnVisibilityFeature,\n  createColumnHelper,\n  tableFeatures,\n  useTable,\n} from '@tanstack/react-table'\nimport './index.css'\n\nconst _features = tableFeatures({ columnVisibilityFeature })\n\ntype Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  status: string\n  progress: number\n}\n\nconst defaultData: Array<Person> = [\n  {\n    firstName: 'tanner',\n    lastName: 'linsley',\n    age: 24,\n    visits: 100,\n    status: 'In Relationship',\n    progress: 50,\n  },\n  {\n    firstName: 'tandy',\n    lastName: 'miller',\n    age: 40,\n    visits: 40,\n    status: 'Single',\n    progress: 80,\n  },\n  {\n    firstName: 'joe',\n    lastName: 'dirte',\n    age: 45,\n    visits: 20,\n    status: 'Complicated',\n    progress: 10,\n  },\n]\n\nconst columnHelper = createColumnHelper<typeof _features, Person>()\n\nconst columns = columnHelper.columns([\n  columnHelper.group({\n    header: 'Name',\n    footer: (props) => props.column.id,\n    columns: columnHelper.columns([\n      columnHelper.accessor('firstName', {\n        cell: (info) => info.getValue(),\n        footer: (props) => props.column.id,\n      }),\n      columnHelper.accessor((row) => row.lastName, {\n        id: 'lastName',\n        cell: (info) => info.getValue(),\n        header: () => <span>Last Name</span>,\n        footer: (props) => props.column.id,\n      }),\n    ]),\n  }),\n  columnHelper.group({\n    header: 'Info',\n    footer: (props) => props.column.id,\n    columns: columnHelper.columns([\n      columnHelper.accessor('age', {\n        header: () => 'Age',\n        footer: (props) => props.column.id,\n      }),\n      columnHelper.group({\n        header: 'More Info',\n        columns: columnHelper.columns([\n          columnHelper.accessor('visits', {\n            header: () => <span>Visits</span>,\n            footer: (props) => props.column.id,\n          }),\n          columnHelper.accessor('status', {\n            header: 'Status',\n            footer: (props) => props.column.id,\n          }),\n          columnHelper.accessor('progress', {\n            header: 'Profile Progress',\n            footer: (props) => props.column.id,\n          }),\n        ]),\n      }),\n    ]),\n  }),\n])\n\nfunction App() {\n  const [data, _setData] = React.useState(() => [...defaultData])\n  const rerender = React.useReducer(() => ({}), {})[1]\n\n  const table = useTable({\n    _features,\n    _rowModels: {},\n    columns,\n    data,\n    debugTable: true,\n    debugHeaders: true,\n    debugColumns: true,\n  })\n\n  return (\n    <table.Subscribe\n      selector={(state) => ({\n        columnVisibility: state.columnVisibility,\n      })}\n    >\n      {(_state) => (\n        <div className=\"p-2\">\n          <div className=\"inline-block border border-black shadow rounded\">\n            <div className=\"px-1 border-b border-black\">\n              <label>\n                <input\n                  type=\"checkbox\"\n                  checked={table.getIsAllColumnsVisible()}\n                  onChange={table.getToggleAllColumnsVisibilityHandler()}\n                />{' '}\n                Toggle All\n              </label>\n            </div>\n            {table.getAllLeafColumns().map((column) => {\n              return (\n                <div key={column.id} className=\"px-1\">\n                  <label>\n                    <input\n                      type=\"checkbox\"\n                      checked={column.getIsVisible()}\n                      onChange={column.getToggleVisibilityHandler()}\n                    />{' '}\n                    {column.id}\n                  </label>\n                </div>\n              )\n            })}\n          </div>\n          <div className=\"h-4\" />\n          <table>\n            <thead>\n              {table.getHeaderGroups().map((headerGroup) => (\n                <tr key={headerGroup.id}>\n                  {headerGroup.headers.map((header) => (\n                    <th key={header.id} colSpan={header.colSpan}>\n                      {header.isPlaceholder ? null : (\n                        <table.FlexRender header={header} />\n                      )}\n                    </th>\n                  ))}\n                </tr>\n              ))}\n            </thead>\n            <tbody>\n              {table.getRowModel().rows.map((row) => (\n                <tr key={row.id}>\n                  {row.getVisibleCells().map((cell) => (\n                    <td key={cell.id}>\n                      <table.FlexRender cell={cell} />\n                    </td>\n                  ))}\n                </tr>\n              ))}\n            </tbody>\n            <tfoot>\n              {table.getFooterGroups().map((footerGroup) => (\n                <tr key={footerGroup.id}>\n                  {footerGroup.headers.map((header) => (\n                    <th key={header.id} colSpan={header.colSpan}>\n                      {header.isPlaceholder ? null : (\n                        <table.FlexRender footer={header} />\n                      )}\n                    </th>\n                  ))}\n                </tr>\n              ))}\n            </tfoot>\n          </table>\n          <div className=\"h-4\" />\n          <button onClick={() => rerender()} className=\"border p-2\">\n            Rerender\n          </button>\n          <div className=\"h-4\" />\n          <table.Subscribe selector={(state) => state}>\n            {(state) => <pre>{JSON.stringify(state, null, 2)}</pre>}\n          </table.Subscribe>\n        </div>\n      )}\n    </table.Subscribe>\n  )\n}\n\nconst rootElement = document.getElementById('root')\nif (!rootElement) throw new Error('Failed to find the root element')\n\nReactDOM.createRoot(rootElement).render(\n  <React.StrictMode>\n    <App />\n  </React.StrictMode>,\n)\n"
  },
  {
    "path": "examples/react/column-visibility/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"module\": \"ESNext\",\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"react-jsx\",\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "examples/react/column-visibility/vite.config.js",
    "content": "import { defineConfig } from 'vite'\nimport react from '@vitejs/plugin-react'\nimport rollupReplace from '@rollup/plugin-replace'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [\n    rollupReplace({\n      preventAssignment: true,\n      values: {\n        __DEV__: JSON.stringify(true),\n        'process.env.NODE_ENV': JSON.stringify('development'),\n      },\n    }),\n    react(),\n  ],\n})\n"
  },
  {
    "path": "examples/react/composable-tables/README.md",
    "content": "# Large Table Example\n\nThis example demonstrates the `createTableHook` composition pattern for TanStack Table v9, similar to TanStack Form's `createFormHook`.\n\n## What This Demonstrates\n\n### Single Source of Truth (`createTableHook`)\n\nThe `hooks/table.ts` file sets up everything in one place:\n\n- **Features** - `_features` defines which table features are enabled\n- **Row Models** - Pre-configured sorted, filtered, and paginated row models\n- **Default Options** - Any table options can be set as defaults (except columns/data/store/state/initialState)\n- **Contexts** - Created internally, with `TFeatures` already baked in\n- **Context Hooks** - `useTableContext`, `useCellContext`, `useHeaderContext` - all typed!\n- **Pre-bound Components** - Table, cell, and header components\n- **Column Helper** - `createAppColumnHelper` pre-bound to your features\n\n### No Generics Needed in Components\n\nBecause `TFeatures` is baked into the context hooks at creation time, your custom components don't need type annotations:\n\n```tsx\n// components/table-components.tsx\nfunction PaginationControls() {\n  const table = useTableContext() // TFeatures already known!\n  return <table.Subscribe selector={(s) => s.pagination}>...</table.Subscribe>\n}\n```\n\n### Simplified Column Helper\n\nSince `TFeatures` is configured once in `createTableHook`, the `createAppColumnHelper` only needs `TData`:\n\n```tsx\n// TFeatures already bound - only need TData!\nconst columnHelper = createAppColumnHelper<Person>()\n\nconst columns = columnHelper.columns([\n  columnHelper.accessor('firstName', { header: 'First Name' }),\n  columnHelper.accessor('age', { header: 'Age' }),\n])\n```\n\n### Simplified useAppTable\n\nSince `_features`, `_rowModels`, and default options are configured once in `createTableHook`, `useAppTable` only needs `columns` and `data`:\n\n```tsx\nconst table = useAppTable({\n  columns,\n  data, // TData inferred from this\n})\n```\n\n### Pre-bound Components\n\n**Table Components** (accessible via `table.ComponentName`):\n\n- `PaginationControls` - Full pagination UI\n- `RowCount` - Row count display\n- `TableToolbar` - Header with title and actions\n\n**Cell Components** (accessible via `cell.ComponentName` in `AppCell`):\n\n- `TextCell` - Generic text renderer\n- `NumberCell` - Formatted number renderer\n- `StatusCell` - Status badge\n- `ProgressCell` - Progress bar\n- `RowActionsCell` - Row action buttons (view, edit, delete)\n\n**Header Components** (accessible via `header.ComponentName` in `AppHeader`):\n\n- `SortIndicator` - Sort direction icon\n- `ColumnFilter` - Filter input\n\n**Footer Components** (accessible via `footer.ComponentName` in `AppFooter`):\n\n- `FooterColumnId` - Display the column ID\n- `FooterSum` - Sum aggregation for numeric columns\n\n### App Wrapper Components\n\nThe `useAppTable` hook returns these wrapper components:\n\n- `AppTable` - Root wrapper providing table context\n- `AppCell` - Cell wrapper with pre-bound cellComponents\n- `AppHeader` - Header wrapper with pre-bound headerComponents\n- `AppFooter` - Footer wrapper with pre-bound headerComponents\n\n### Subscribe Integration\n\nAll App wrapper components support an optional `selector` prop for optimized re-renders:\n\n```tsx\n// Without selector - children is a function receiving the entity\n<table.AppCell cell={c}>\n  {(cell) => <td><cell.TextCell /></td>}\n</table.AppCell>\n\n// With selector - children receives both entity and selected state\n<table.AppCell cell={c} selector={(state) => state.columnFilters}>\n  {(cell, filters) => <td>{filters.length} filters</td>}\n</table.AppCell>\n\n// AppTable with selector\n<table.AppTable selector={(state) => state.pagination}>\n  {(pagination) => <div>Page {pagination.pageIndex + 1}</div>}\n</table.AppTable>\n```\n\nThis wraps the children in a `Subscribe` component for fine-grained reactivity.\n\n## File Structure\n\n```\nsrc/\n├── hooks/\n│   └── table.ts             # createTableHook setup with features, row models, and components\n├── components/\n│   ├── cell-components.tsx  # TextCell, NumberCell, StatusCell, ProgressCell, RowActionsCell\n│   ├── header-components.tsx # SortIndicator, ColumnFilter\n│   └── table-components.tsx # PaginationControls, RowCount, TableToolbar\n├── main.tsx                 # App entry point with table component\n├── makeData.ts              # Mock data generator\n└── index.css                # Styles\n```\n\n## Running the Example\n\n```bash\ncd examples/react/large-table\npnpm install\npnpm dev\n```\n"
  },
  {
    "path": "examples/react/composable-tables/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>TanStack Table - Large Table Example with createTableHook</title>\n  </head>\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.tsx\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/react/composable-tables/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-composable-tables\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"start\": \"vite\",\n    \"lint\": \"eslint ./src\",\n    \"test:types\": \"tsc\"\n  },\n  \"dependencies\": {\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"@tanstack/react-store\": \"^0.9.2\",\n    \"@tanstack/react-table\": \"^9.0.0-alpha.19\",\n    \"react\": \"^19.2.4\",\n    \"react-dom\": \"^19.2.4\"\n  },\n  \"devDependencies\": {\n    \"@rollup/plugin-replace\": \"^6.0.3\",\n    \"@types/react\": \"^19.2.10\",\n    \"@types/react-dom\": \"^19.2.3\",\n    \"@vitejs/plugin-react\": \"^5.1.2\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\"\n  }\n}\n"
  },
  {
    "path": "examples/react/composable-tables/src/components/cell-components.tsx",
    "content": "/**\n * Cell-level components that use useCellContext\n *\n * These components can be used via the pre-bound cellComponents\n * in AppCell children, e.g., <cell.TextCell />\n */\nimport { useCellContext } from '../hooks/table'\n\n/**\n * Generic text cell renderer\n */\nexport function TextCell() {\n  const cell = useCellContext<string>()\n  return <span>{cell.getValue()}</span>\n}\n\n/**\n * Number cell with locale formatting\n */\nexport function NumberCell() {\n  const cell = useCellContext<number>()\n  return <span>{cell.getValue().toLocaleString()}</span>\n}\n\n/**\n * Status badge cell for status column\n */\nexport function StatusCell() {\n  const cell = useCellContext<'relationship' | 'complicated' | 'single'>()\n  const status = cell.getValue()\n  return <span className={`status-badge ${status}`}>{status}</span>\n}\n\n/**\n * Progress bar cell\n */\nexport function ProgressCell() {\n  const cell = useCellContext<number>()\n  const progress = cell.getValue()\n  return (\n    <div className=\"progress-bar\">\n      <div className=\"progress-bar-fill\" style={{ width: `${progress}%` }} />\n    </div>\n  )\n}\n\n/**\n * Row actions cell - actions for the current row\n */\nexport function RowActionsCell() {\n  const cell = useCellContext()\n  const row = cell.row\n\n  return (\n    <div className=\"row-actions\">\n      <button\n        onClick={() =>\n          alert(`View: ${row.original.firstName} ${row.original.lastName}`)\n        }\n        title=\"View\"\n      >\n        👁️\n      </button>\n      <button\n        onClick={() =>\n          alert(`Edit: ${row.original.firstName} ${row.original.lastName}`)\n        }\n        title=\"Edit\"\n      >\n        ✏️\n      </button>\n      <button\n        onClick={() =>\n          alert(`Delete: ${row.original.firstName} ${row.original.lastName}`)\n        }\n        title=\"Delete\"\n      >\n        🗑️\n      </button>\n    </div>\n  )\n}\n\n/**\n * Price cell with currency formatting\n */\nexport function PriceCell() {\n  const cell = useCellContext<number>()\n  return (\n    <span className=\"price\">\n      $\n      {cell.getValue().toLocaleString(undefined, {\n        minimumFractionDigits: 2,\n        maximumFractionDigits: 2,\n      })}\n    </span>\n  )\n}\n\n/**\n * Category badge cell\n */\nexport function CategoryCell() {\n  const cell = useCellContext<'electronics' | 'clothing' | 'food' | 'books'>()\n  const category = cell.getValue()\n  return <span className={`category-badge ${category}`}>{category}</span>\n}\n"
  },
  {
    "path": "examples/react/composable-tables/src/components/header-components.tsx",
    "content": "/**\n * Header-level components that use useHeaderContext\n *\n * These components can be used via the pre-bound headerComponents\n * in AppHeader children, e.g., <header.SortIndicator />\n */\nimport { useHeaderContext } from '../hooks/table'\n\n/**\n * Sort indicator showing current sort direction\n */\nexport function SortIndicator() {\n  const header = useHeaderContext()\n  const sorted = header.column.getIsSorted()\n\n  if (!sorted) return null\n\n  return (\n    <span className=\"sort-indicator\">{sorted === 'asc' ? '🔼' : '🔽'}</span>\n  )\n}\n\n/**\n * Column filter input\n */\nexport function ColumnFilter() {\n  const header = useHeaderContext()\n\n  if (!header.column.getCanFilter()) return null\n\n  const columnFilterValue = header.column.getFilterValue()\n\n  return (\n    <div className=\"column-filter\" onClick={(e) => e.stopPropagation()}>\n      <input\n        type=\"text\"\n        value={(columnFilterValue ?? '') as string}\n        onChange={(e) => header.column.setFilterValue(e.target.value)}\n        placeholder={`Filter ${header.column.id}...`}\n      />\n    </div>\n  )\n}\n\n/**\n * Footer showing the column ID\n */\nexport function FooterColumnId() {\n  const header = useHeaderContext()\n  return <span className=\"footer-column-id\">{header.column.id}</span>\n}\n\n/**\n * Footer showing a summary/aggregation for numeric columns\n */\nexport function FooterSum() {\n  const header = useHeaderContext()\n  const table = header.getContext().table\n  const rows = table.getFilteredRowModel().rows\n\n  // Calculate sum for numeric columns\n  const sum = rows.reduce((acc, row) => {\n    const value = row.getValue(header.column.id)\n    return acc + (typeof value === 'number' ? value : 0)\n  }, 0)\n\n  return (\n    <span className=\"footer-sum\">{sum > 0 ? sum.toLocaleString() : '—'}</span>\n  )\n}\n"
  },
  {
    "path": "examples/react/composable-tables/src/components/table-components.tsx",
    "content": "/**\n * Table-level components that use useTableContext\n *\n * These components can be used via the pre-bound tableComponents\n * directly on the table object, e.g., <table.PaginationControls />\n */\nimport { useTableContext } from '../hooks/table'\n\n/**\n * Pagination controls for the table\n */\nexport function PaginationControls() {\n  const table = useTableContext()\n\n  return (\n    <table.Subscribe selector={(state) => state.pagination}>\n      {(pagination) => (\n        <div className=\"pagination\">\n          <button\n            onClick={() => table.firstPage()}\n            disabled={!table.getCanPreviousPage()}\n          >\n            {'<<'}\n          </button>\n          <button\n            onClick={() => table.previousPage()}\n            disabled={!table.getCanPreviousPage()}\n          >\n            {'<'}\n          </button>\n          <button\n            onClick={() => table.nextPage()}\n            disabled={!table.getCanNextPage()}\n          >\n            {'>'}\n          </button>\n          <button\n            onClick={() => table.lastPage()}\n            disabled={!table.getCanNextPage()}\n          >\n            {'>>'}\n          </button>\n          <span>\n            Page{' '}\n            <strong>\n              {pagination.pageIndex + 1} of{' '}\n              {table.getPageCount().toLocaleString()}\n            </strong>\n          </span>\n          <span>\n            | Go to page:\n            <input\n              type=\"number\"\n              min=\"1\"\n              max={table.getPageCount()}\n              defaultValue={pagination.pageIndex + 1}\n              onChange={(e) => {\n                const page = e.target.value ? Number(e.target.value) - 1 : 0\n                table.setPageIndex(page)\n              }}\n            />\n          </span>\n          <select\n            value={pagination.pageSize}\n            onChange={(e) => {\n              table.setPageSize(Number(e.target.value))\n            }}\n          >\n            {[10, 20, 30, 40, 50].map((pageSize) => (\n              <option key={pageSize} value={pageSize}>\n                Show {pageSize}\n              </option>\n            ))}\n          </select>\n        </div>\n      )}\n    </table.Subscribe>\n  )\n}\n\n/**\n * Row count display\n */\nexport function RowCount() {\n  const table = useTableContext()\n\n  return (\n    <div className=\"row-count\">\n      Showing {table.getRowModel().rows.length.toLocaleString()} of{' '}\n      {table.getRowCount().toLocaleString()} rows\n    </div>\n  )\n}\n\n/**\n * Table toolbar with title and actions\n */\nexport function TableToolbar({\n  title,\n  onRefresh,\n}: {\n  title: string\n  onRefresh?: () => void\n}) {\n  const table = useTableContext()\n\n  return (\n    <div className=\"table-toolbar\">\n      <h2>{title}</h2>\n      <div>\n        <button onClick={() => table.resetColumnFilters()}>\n          Clear Filters\n        </button>\n        <button onClick={() => table.resetSorting()}>Clear Sorting</button>\n        {onRefresh && <button onClick={onRefresh}>Refresh Data</button>}\n      </div>\n    </div>\n  )\n}\n"
  },
  {
    "path": "examples/react/composable-tables/src/hooks/table.ts",
    "content": "/**\n * Custom table hook setup using createTableHook\n *\n * This file creates a custom useAppTable hook with pre-bound components.\n * Features, row models, and default options are defined once here and shared across all tables.\n * Context hooks and a pre-bound createAppColumnHelper are also exported.\n */\nimport {\n  columnFilteringFeature,\n  createFilteredRowModel,\n  createPaginatedRowModel,\n  createSortedRowModel,\n  createTableHook,\n  filterFns,\n  rowPaginationFeature,\n  rowSortingFeature,\n  sortFns,\n  tableFeatures,\n} from '@tanstack/react-table'\n\n// Import table-level components\nimport {\n  PaginationControls,\n  RowCount,\n  TableToolbar,\n} from '../components/table-components'\n\n// Import cell-level components\nimport {\n  CategoryCell,\n  NumberCell,\n  PriceCell,\n  ProgressCell,\n  RowActionsCell,\n  StatusCell,\n  TextCell,\n} from '../components/cell-components'\n\n// Import header/footer-level components (both use useHeaderContext)\nimport {\n  ColumnFilter,\n  FooterColumnId,\n  FooterSum,\n  SortIndicator,\n} from '../components/header-components'\n\n/**\n * Create the custom table hook with all pre-bound components.\n * This exports:\n * - createAppColumnHelper: Create column definitions with TFeatures already bound\n * - useAppTable: Hook for creating tables with TFeatures baked in\n * - useTableContext: Access table instance in tableComponents\n * - useCellContext: Access cell instance in cellComponents\n * - useHeaderContext: Access header instance in headerComponents\n */\nexport const {\n  createAppColumnHelper,\n  useAppTable,\n  useTableContext,\n  useCellContext,\n  useHeaderContext,\n} = createTableHook({\n  // Features are set once here and shared across all tables\n  _features: tableFeatures({\n    columnFilteringFeature,\n    rowPaginationFeature,\n    rowSortingFeature,\n  }),\n\n  // Row models are set once here\n  _rowModels: {\n    sortedRowModel: createSortedRowModel(sortFns),\n    filteredRowModel: createFilteredRowModel(filterFns),\n    paginatedRowModel: createPaginatedRowModel(),\n  },\n\n  // set any default table options here too\n  getRowId: (row) => row.id,\n\n  // Register table-level components (accessible via table.ComponentName)\n  tableComponents: {\n    PaginationControls,\n    RowCount,\n    TableToolbar,\n  },\n\n  // Register cell-level components (accessible via cell.ComponentName in AppCell)\n  cellComponents: {\n    TextCell,\n    NumberCell,\n    StatusCell,\n    ProgressCell,\n    RowActionsCell,\n    PriceCell,\n    CategoryCell,\n  },\n\n  // Register header/footer-level components (accessible via header.ComponentName in AppHeader/AppFooter)\n  headerComponents: {\n    SortIndicator,\n    ColumnFilter,\n    FooterColumnId,\n    FooterSum,\n  },\n})\n"
  },
  {
    "path": "examples/react/composable-tables/src/index.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n  border-collapse: collapse;\n  width: 100%;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth,\ntd {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 8px 12px;\n  text-align: left;\n}\n\nth {\n  background-color: #f5f5f5;\n  font-weight: 600;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n\n.table-container {\n  padding: 16px;\n  max-width: 1200px;\n  margin: 0 auto;\n}\n\n.pagination {\n  display: flex;\n  align-items: center;\n  gap: 8px;\n  margin-top: 16px;\n  flex-wrap: wrap;\n}\n\n.pagination button {\n  border: 1px solid #ccc;\n  border-radius: 4px;\n  padding: 4px 8px;\n  cursor: pointer;\n  background: white;\n}\n\n.pagination button:disabled {\n  opacity: 0.5;\n  cursor: not-allowed;\n}\n\n.pagination input {\n  border: 1px solid #ccc;\n  border-radius: 4px;\n  padding: 4px;\n  width: 64px;\n}\n\n.pagination select {\n  border: 1px solid #ccc;\n  border-radius: 4px;\n  padding: 4px;\n}\n\n.sort-indicator {\n  margin-left: 4px;\n}\n\n.column-filter {\n  margin-top: 4px;\n}\n\n.column-filter input {\n  border: 1px solid #ccc;\n  border-radius: 4px;\n  padding: 4px;\n  width: 100%;\n  font-size: 12px;\n}\n\n.sortable-header {\n  cursor: pointer;\n  user-select: none;\n}\n\n.sortable-header:hover {\n  background-color: #e8e8e8;\n}\n\n.row-actions {\n  display: flex;\n  gap: 4px;\n}\n\n.row-actions button {\n  border: 1px solid #ccc;\n  border-radius: 4px;\n  padding: 2px 8px;\n  cursor: pointer;\n  background: white;\n  font-size: 12px;\n}\n\n.row-actions button:hover {\n  background-color: #f0f0f0;\n}\n\n.status-badge {\n  display: inline-block;\n  padding: 2px 8px;\n  border-radius: 12px;\n  font-size: 12px;\n  font-weight: 500;\n}\n\n.status-badge.relationship {\n  background-color: #d4edda;\n  color: #155724;\n}\n\n.status-badge.complicated {\n  background-color: #fff3cd;\n  color: #856404;\n}\n\n.status-badge.single {\n  background-color: #cce5ff;\n  color: #004085;\n}\n\n.progress-bar {\n  width: 100%;\n  height: 8px;\n  background-color: #e9ecef;\n  border-radius: 4px;\n  overflow: hidden;\n}\n\n.progress-bar-fill {\n  height: 100%;\n  background-color: #007bff;\n  transition: width 0.2s;\n}\n\n.table-toolbar {\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  margin-bottom: 16px;\n  flex-wrap: wrap;\n  gap: 8px;\n}\n\n.table-toolbar h2 {\n  margin: 0;\n}\n\n.table-toolbar button {\n  border: 1px solid #ccc;\n  border-radius: 4px;\n  padding: 8px 16px;\n  cursor: pointer;\n  background: white;\n}\n\n.table-toolbar button:hover {\n  background-color: #f0f0f0;\n}\n\n.row-count {\n  color: #666;\n  font-size: 14px;\n  margin-top: 8px;\n}\n\n.app {\n  padding: 16px;\n}\n\n.app h1 {\n  text-align: center;\n  margin-bottom: 8px;\n}\n\n.description {\n  text-align: center;\n  color: #666;\n  margin-bottom: 32px;\n}\n\n.description code {\n  background-color: #f5f5f5;\n  padding: 2px 6px;\n  border-radius: 4px;\n  font-size: 13px;\n}\n\n.table-divider {\n  height: 48px;\n  border-bottom: 1px solid #e0e0e0;\n  margin: 32px auto;\n  max-width: 1200px;\n}\n\n.category-badge {\n  display: inline-block;\n  padding: 2px 8px;\n  border-radius: 12px;\n  font-size: 12px;\n  font-weight: 500;\n  text-transform: capitalize;\n}\n\n.category-badge.electronics {\n  background-color: #e3f2fd;\n  color: #1565c0;\n}\n\n.category-badge.clothing {\n  background-color: #fce4ec;\n  color: #c2185b;\n}\n\n.category-badge.food {\n  background-color: #e8f5e9;\n  color: #2e7d32;\n}\n\n.category-badge.books {\n  background-color: #fff8e1;\n  color: #f57c00;\n}\n\n.price {\n  font-weight: 600;\n  color: #2e7d32;\n}\n"
  },
  {
    "path": "examples/react/composable-tables/src/main.tsx",
    "content": "import * as React from 'react'\nimport { useCallback, useMemo, useState } from 'react'\nimport ReactDOM from 'react-dom/client'\nimport { createAppColumnHelper, useAppTable } from './hooks/table'\nimport { makeData, makeProductData } from './makeData'\nimport type { Person, Product } from './makeData'\nimport './index.css'\n// Import cell components directly - they use useCellContext internally\n\n// Create column helpers with TFeatures already bound - only need TData!\nconst personColumnHelper = createAppColumnHelper<Person>()\nconst productColumnHelper = createAppColumnHelper<Product>()\n\n// Users Table Component - Original implementation\nfunction UsersTable() {\n  // Data state\n  const [data, setData] = useState(() => makeData(1000))\n\n  // Refresh data callback\n  const refreshData = useCallback(() => {\n    setData(makeData(1000))\n  }, [])\n\n  // Define columns using the column helper\n  const columns = useMemo(\n    () =>\n      // NOTE: You must use `createAppColumnHelper` instead of `createColumnHelper` when using pre-bound components like <cell.TextCell />\n      personColumnHelper.columns([\n        personColumnHelper.accessor('firstName', {\n          header: 'First Name',\n          footer: (props) => props.column.id,\n          cell: ({ cell }) => <cell.TextCell />,\n        }),\n        personColumnHelper.accessor('lastName', {\n          header: 'Last Name',\n          footer: (props) => props.column.id,\n          cell: ({ cell }) => <cell.TextCell />,\n        }),\n        personColumnHelper.accessor('age', {\n          header: 'Age',\n          footer: (props) => props.column.id,\n          cell: ({ cell }) => <cell.NumberCell />,\n        }),\n        personColumnHelper.accessor('visits', {\n          header: 'Visits',\n          footer: (props) => props.column.id,\n          cell: ({ cell }) => <cell.NumberCell />,\n        }),\n        personColumnHelper.accessor('status', {\n          header: 'Status',\n          footer: (props) => props.column.id,\n          cell: ({ cell }) => <cell.StatusCell />,\n        }),\n        personColumnHelper.accessor('progress', {\n          header: 'Progress',\n          footer: (props) => props.column.id,\n          cell: ({ cell }) => <cell.ProgressCell />,\n        }),\n        personColumnHelper.display({\n          id: 'actions',\n          header: 'Actions',\n          cell: ({ cell }) => <cell.RowActionsCell />,\n        }),\n      ]),\n    [],\n  )\n\n  // Create the table - _features and _rowModels are already configured!\n  const table = useAppTable(\n    {\n      columns,\n      data,\n      debugTable: true,\n      // more table options\n    },\n    // (state) => state, // alternatively, subscribe to the entire state instead of using table.Subscribe or selectors down below\n  )\n\n  return (\n    // Main selector on AppTable - selects all needed state in one place\n    <table.AppTable\n      selector={(state) => ({\n        // subscribe to specific states for re-rendering if you are optimizing for maximum performance\n        pagination: state.pagination,\n        sorting: state.sorting,\n        columnFilters: state.columnFilters,\n      })}\n    >\n      {({ sorting, columnFilters }) => (\n        <div className=\"table-container\">\n          {/* Table toolbar using pre-bound component */}\n          <table.TableToolbar title=\"Users Table\" onRefresh={refreshData} />\n\n          {/* Table element */}\n          <table>\n            <thead>\n              {table.getHeaderGroups().map((headerGroup) => (\n                <tr key={headerGroup.id}>\n                  {headerGroup.headers.map((h) => (\n                    <table.AppHeader header={h} key={h.id}>\n                      {(header) => (\n                        <th\n                          colSpan={header.colSpan}\n                          className={\n                            header.column.getCanSort() ? 'sortable-header' : ''\n                          }\n                          onClick={header.column.getToggleSortingHandler()}\n                        >\n                          {header.isPlaceholder ? null : (\n                            <>\n                              <header.FlexRender />\n                              <header.SortIndicator />\n                              <header.ColumnFilter />\n                              {/* Show sort order number when multiple columns sorted */}\n                              {sorting.length > 1 &&\n                                sorting.findIndex(\n                                  (s) => s.id === header.column.id,\n                                ) > -1 && (\n                                  <span className=\"sort-order\">\n                                    {sorting.findIndex(\n                                      (s) => s.id === header.column.id,\n                                    ) + 1}\n                                  </span>\n                                )}\n                            </>\n                          )}\n                        </th>\n                      )}\n                    </table.AppHeader>\n                  ))}\n                </tr>\n              ))}\n            </thead>\n            <tbody>\n              {table.getRowModel().rows.map((row) => (\n                <tr key={row.id}>\n                  {row.getAllCells().map((c) => (\n                    <table.AppCell cell={c} key={c.id}>\n                      {(cell) => (\n                        <td>\n                          {/* Cell components are pre-bound via AppCell */}\n                          <cell.FlexRender />\n                        </td>\n                      )}\n                    </table.AppCell>\n                  ))}\n                </tr>\n              ))}\n            </tbody>\n            <tfoot>\n              {table.getFooterGroups().map((footerGroup) => (\n                <tr key={footerGroup.id}>\n                  {footerGroup.headers.map((f) => (\n                    <table.AppFooter header={f} key={f.id}>\n                      {(footer) => {\n                        const columnId = footer.column.id\n                        const hasFilter = columnFilters.some(\n                          (cf) => cf.id === columnId,\n                        )\n\n                        return (\n                          <td colSpan={footer.colSpan}>\n                            {footer.isPlaceholder ? null : (\n                              <>\n                                {/* Use FooterSum for numeric columns, FooterColumnId for others */}\n                                {columnId === 'age' ||\n                                columnId === 'visits' ||\n                                columnId === 'progress' ? (\n                                  <>\n                                    <footer.FooterSum />\n                                    {hasFilter && (\n                                      <span className=\"filtered-indicator\">\n                                        {' '}\n                                        (filtered)\n                                      </span>\n                                    )}\n                                  </>\n                                ) : columnId === 'actions' ? null : (\n                                  <>\n                                    <footer.FooterColumnId />\n                                    {hasFilter && (\n                                      <span className=\"filtered-indicator\">\n                                        {' '}\n                                        ✓\n                                      </span>\n                                    )}\n                                  </>\n                                )}\n                              </>\n                            )}\n                          </td>\n                        )\n                      }}\n                    </table.AppFooter>\n                  ))}\n                </tr>\n              ))}\n            </tfoot>\n          </table>\n\n          {/* Pagination using pre-bound component */}\n          <table.PaginationControls />\n\n          {/* Row count using pre-bound component */}\n          <table.RowCount />\n        </div>\n      )}\n    </table.AppTable>\n  )\n}\n\n// Products Table Component - New implementation using same hook and components\nfunction ProductsTable() {\n  // Data state\n  const [data, setData] = useState(() => makeProductData(500))\n\n  // Refresh data callback\n  const refreshData = useCallback(() => {\n    setData(makeProductData(500))\n  }, [])\n\n  // Define columns using the column helper - different structure than Users table\n  const columns = useMemo(\n    () =>\n      productColumnHelper.columns([\n        productColumnHelper.accessor('name', {\n          header: 'Product Name',\n          footer: (props) => props.column.id,\n          cell: ({ cell }) => <cell.TextCell />,\n        }),\n        productColumnHelper.accessor('category', {\n          header: 'Category',\n          footer: (props) => props.column.id,\n          cell: ({ cell }) => <cell.CategoryCell />,\n        }),\n        productColumnHelper.accessor('price', {\n          header: 'Price',\n          footer: (props) => props.column.id,\n          cell: ({ cell }) => <cell.PriceCell />,\n        }),\n        productColumnHelper.accessor('stock', {\n          header: 'In Stock',\n          footer: (props) => props.column.id,\n          cell: ({ cell }) => <cell.NumberCell />,\n        }),\n        productColumnHelper.accessor('rating', {\n          header: 'Rating',\n          footer: (props) => props.column.id,\n          cell: ({ cell }) => <cell.ProgressCell />,\n        }),\n      ]),\n    [],\n  )\n\n  // Create the table using the same useAppTable hook\n  const table = useAppTable({\n    columns,\n    data,\n    getRowId: (row) => row.id,\n  })\n\n  return (\n    <table.AppTable\n      selector={(state) => ({\n        pagination: state.pagination,\n        sorting: state.sorting,\n        columnFilters: state.columnFilters,\n      })}\n    >\n      {({ sorting, columnFilters }) => (\n        <div className=\"table-container\">\n          {/* Table toolbar using the same pre-bound component */}\n          <table.TableToolbar title=\"Products Table\" onRefresh={refreshData} />\n\n          {/* Table element */}\n          <table>\n            <thead>\n              {table.getHeaderGroups().map((headerGroup) => (\n                <tr key={headerGroup.id}>\n                  {headerGroup.headers.map((h) => (\n                    <table.AppHeader header={h} key={h.id}>\n                      {(header) => (\n                        <th\n                          colSpan={header.colSpan}\n                          className={\n                            header.column.getCanSort() ? 'sortable-header' : ''\n                          }\n                          onClick={header.column.getToggleSortingHandler()}\n                        >\n                          {header.isPlaceholder ? null : (\n                            <>\n                              <header.FlexRender />\n                              <header.SortIndicator />\n                              <header.ColumnFilter />\n                              {sorting.length > 1 &&\n                                sorting.findIndex(\n                                  (s) => s.id === header.column.id,\n                                ) > -1 && (\n                                  <span className=\"sort-order\">\n                                    {sorting.findIndex(\n                                      (s) => s.id === header.column.id,\n                                    ) + 1}\n                                  </span>\n                                )}\n                            </>\n                          )}\n                        </th>\n                      )}\n                    </table.AppHeader>\n                  ))}\n                </tr>\n              ))}\n            </thead>\n            <tbody>\n              {table.getRowModel().rows.map((row) => (\n                <tr key={row.id}>\n                  {row.getAllCells().map((c) => (\n                    <table.AppCell cell={c} key={c.id}>\n                      {(cell) => (\n                        <td>\n                          {/* Cell components are pre-bound via AppCell */}\n                          <cell.FlexRender />\n                        </td>\n                      )}\n                    </table.AppCell>\n                  ))}\n                </tr>\n              ))}\n            </tbody>\n            <tfoot>\n              {table.getFooterGroups().map((footerGroup) => (\n                <tr key={footerGroup.id}>\n                  {footerGroup.headers.map((f) => (\n                    <table.AppFooter header={f} key={f.id}>\n                      {(footer) => {\n                        const columnId = footer.column.id\n                        const hasFilter = columnFilters.some(\n                          (cf) => cf.id === columnId,\n                        )\n\n                        return (\n                          <td colSpan={footer.colSpan}>\n                            {footer.isPlaceholder ? null : (\n                              <>\n                                {/* Use FooterSum for numeric columns, FooterColumnId for others */}\n                                {columnId === 'price' ||\n                                columnId === 'stock' ||\n                                columnId === 'rating' ? (\n                                  <>\n                                    <footer.FooterSum />\n                                    {hasFilter && (\n                                      <span className=\"filtered-indicator\">\n                                        {' '}\n                                        (filtered)\n                                      </span>\n                                    )}\n                                  </>\n                                ) : (\n                                  <>\n                                    <footer.FooterColumnId />\n                                    {hasFilter && (\n                                      <span className=\"filtered-indicator\">\n                                        {' '}\n                                        ✓\n                                      </span>\n                                    )}\n                                  </>\n                                )}\n                              </>\n                            )}\n                          </td>\n                        )\n                      }}\n                    </table.AppFooter>\n                  ))}\n                </tr>\n              ))}\n            </tfoot>\n          </table>\n\n          {/* Pagination using the same pre-bound component */}\n          <table.PaginationControls />\n\n          {/* Row count using the same pre-bound component */}\n          <table.RowCount />\n        </div>\n      )}\n    </table.AppTable>\n  )\n}\n\nfunction App() {\n  return (\n    <div className=\"app\">\n      <h1>Composable Tables Example</h1>\n      <p className=\"description\">\n        Both tables below use the same <code>useAppTable</code> hook and\n        shareable components, but with different data types and column\n        configurations.\n      </p>\n\n      {/* Original Users Table */}\n      <UsersTable />\n\n      <div className=\"table-divider\" />\n\n      {/* New Products Table */}\n      <ProductsTable />\n    </div>\n  )\n}\n\nconst rootElement = document.getElementById('root')\nif (!rootElement) throw new Error('Failed to find the root element')\n\nReactDOM.createRoot(rootElement).render(\n  <React.StrictMode>\n    <App />\n  </React.StrictMode>,\n)\n"
  },
  {
    "path": "examples/react/composable-tables/src/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  subRows?: Array<Person>\n}\n\nexport type Product = {\n  id: string\n  name: string\n  category: 'electronics' | 'clothing' | 'food' | 'books'\n  price: number\n  stock: number\n  rating: number\n}\n\nconst range = (len: number) => {\n  const arr: Array<number> = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (): Person => {\n  return {\n    firstName: faker.person.firstName(),\n    lastName: faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: faker.number.int(1000),\n    progress: faker.number.int(100),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0],\n  }\n}\n\nconst newProduct = (): Product => {\n  return {\n    id: faker.string.uuid(),\n    name: faker.commerce.productName(),\n    category: faker.helpers.shuffle<Product['category']>([\n      'electronics',\n      'clothing',\n      'food',\n      'books',\n    ])[0],\n    price: parseFloat(faker.commerce.price({ min: 5, max: 500 })),\n    stock: faker.number.int({ min: 0, max: 200 }),\n    rating: faker.number.int({ min: 0, max: 100 }),\n  }\n}\n\nexport function makeData(...lens: Array<number>) {\n  const makeDataLevel = (depth = 0): Array<Person> => {\n    const len = lens[depth]\n    return range(len).map((): Person => {\n      return {\n        ...newPerson(),\n        subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined,\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n\nexport function makeProductData(count: number): Array<Product> {\n  return range(count).map(() => newProduct())\n}\n"
  },
  {
    "path": "examples/react/composable-tables/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"module\": \"ESNext\",\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"react-jsx\",\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "examples/react/composable-tables/vite.config.js",
    "content": "import { defineConfig } from 'vite'\nimport react from '@vitejs/plugin-react'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [react()],\n})\n"
  },
  {
    "path": "examples/react/custom-plugin/.gitignore",
    "content": "node_modules\n.DS_Store\ndist\ndist-ssr\n*.local\n"
  },
  {
    "path": "examples/react/custom-plugin/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run start` or `yarn start`\n"
  },
  {
    "path": "examples/react/custom-plugin/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite App</title>\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n    <script src=\"https://unpkg.com/react-scan/dist/auto.global.js\"></script>\n  </head>\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.tsx\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/react/custom-plugin/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-custom-plugin\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"start\": \"vite\",\n    \"lint\": \"eslint ./src\",\n    \"test:types\": \"tsc\"\n  },\n  \"dependencies\": {\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"@tanstack/react-table\": \"^9.0.0-alpha.19\",\n    \"react\": \"^19.2.4\",\n    \"react-dom\": \"^19.2.4\"\n  },\n  \"devDependencies\": {\n    \"@rollup/plugin-replace\": \"^6.0.3\",\n    \"@types/react\": \"^19.2.10\",\n    \"@types/react-dom\": \"^19.2.3\",\n    \"@vitejs/plugin-react\": \"^5.1.2\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\"\n  }\n}\n"
  },
  {
    "path": "examples/react/custom-plugin/src/index.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n\ntr {\n  border-bottom: 1px solid lightgray;\n}\n\nbutton:disabled {\n  opacity: 0.5;\n}\n"
  },
  {
    "path": "examples/react/custom-plugin/src/main.tsx",
    "content": "import React from 'react'\nimport ReactDOM from 'react-dom/client'\nimport './index.css'\nimport {\n  columnFilteringFeature,\n  createColumnHelper,\n  createFilteredRowModel,\n  createPaginatedRowModel,\n  createSortedRowModel,\n  filterFns,\n  functionalUpdate,\n  makeStateUpdater,\n  rowPaginationFeature,\n  rowSortingFeature,\n  sortFns,\n  tableFeatures,\n  useTable,\n} from '@tanstack/react-table'\nimport { makeData } from './makeData'\nimport type {\n  Column,\n  OnChangeFn,\n  ReactTable,\n  TableFeature,\n  Updater,\n} from '@tanstack/react-table'\nimport type { Person } from './makeData'\n\n// TypeScript setup for our new feature with all of the same type-safety as stock TanStack Table features\n\n// define types for our new feature's custom state\nexport type DensityState = 'sm' | 'md' | 'lg'\nexport interface TableState_Density {\n  density: DensityState\n}\n\n// define types for our new feature's table options\nexport interface TableOptions_Density {\n  enableDensity?: boolean\n  onDensityChange?: OnChangeFn<DensityState>\n}\n\n// Define types for our new feature's table APIs\nexport interface Table_Density {\n  setDensity: (updater: Updater<DensityState>) => void\n  toggleDensity: (value?: DensityState) => void\n}\n\ninterface DensityPluginConstructors {\n  Table: Table_Density\n  TableOptions: TableOptions_Density\n  TableState: TableState_Density\n}\n\n// Here is all of the actual javascript code for our new feature\nexport const densityPlugin: TableFeature<DensityPluginConstructors> = {\n  // define the new feature's initial state\n  getInitialState: (initialState) => {\n    return {\n      density: 'md',\n      ...initialState, // must come last\n    }\n  },\n\n  // define the new feature's default options\n  getDefaultTableOptions: (table) => {\n    return {\n      enableDensity: true,\n      onDensityChange: makeStateUpdater('density', table),\n    }\n  },\n  // if you need to add a default column definition...\n  // getDefaultColumnDef: () => {},\n\n  // define the new feature's table instance methods\n  constructTableAPIs: (table) => {\n    table.setDensity = (updater) => {\n      const safeUpdater: Updater<DensityState> = (old) => {\n        const newState = functionalUpdate(updater, old)\n        return newState\n      }\n      return table.options.onDensityChange?.(safeUpdater)\n    }\n    table.toggleDensity = (value) => {\n      table.setDensity?.((old) => {\n        if (value) return value\n        return old === 'lg' ? 'md' : old === 'md' ? 'sm' : 'lg' // cycle through the 3 options\n      })\n    }\n  },\n\n  // if you need to add row instance APIs...\n  // constructRowAPIs: (row) => {},\n\n  // if you need to add cell instance APIs...\n  // constructCellAPIs: (cell) => {},\n\n  // if you need to add column instance APIs...\n  // constructColumnAPIs: (column) => {},\n\n  // if you need to add header instance APIs...\n  // constructHeaderAPIs: (header) => {},\n}\n// end of custom feature code\n\n// app code\nconst _features = tableFeatures({\n  columnFilteringFeature,\n  rowSortingFeature,\n  rowPaginationFeature,\n  densityPlugin, // pass in our plugin just like any other stock feature\n})\n\nconst columnHelper = createColumnHelper<typeof _features, Person>()\n\nfunction App() {\n  const columns = React.useMemo(\n    () =>\n      columnHelper.columns([\n        columnHelper.accessor('firstName', {\n          cell: (info) => info.getValue(),\n          footer: (props) => props.column.id,\n        }),\n        columnHelper.accessor((row) => row.lastName, {\n          id: 'lastName',\n          cell: (info) => info.getValue(),\n          header: () => <span>Last Name</span>,\n          footer: (props) => props.column.id,\n        }),\n        columnHelper.accessor('age', {\n          header: () => 'Age',\n          footer: (props) => props.column.id,\n        }),\n        columnHelper.accessor('visits', {\n          header: () => <span>Visits</span>,\n          footer: (props) => props.column.id,\n        }),\n        columnHelper.accessor('status', {\n          header: 'Status',\n          footer: (props) => props.column.id,\n        }),\n        columnHelper.accessor('progress', {\n          header: 'Profile Progress',\n          footer: (props) => props.column.id,\n        }),\n      ]),\n    [],\n  )\n\n  const [data, _setData] = React.useState(() => makeData(1000))\n  const [density, setDensity] = React.useState<DensityState>('md')\n\n  const table = useTable({\n    _features,\n    _rowModels: {\n      filteredRowModel: createFilteredRowModel(filterFns),\n      paginatedRowModel: createPaginatedRowModel(),\n      sortedRowModel: createSortedRowModel(sortFns),\n    },\n    columns,\n    data,\n    debugTable: true,\n    state: {\n      density, // passing the density state to the table, TS is still happy :)\n    },\n    onDensityChange: setDensity, // using the new onDensityChange option, TS is still happy :)\n  })\n\n  return (\n    <div className=\"p-2\">\n      <div className=\"h-2\" />\n      <button\n        onClick={() => table.toggleDensity()}\n        className=\"border rounded p-1 bg-blue-500 text-white mb-2 w-64\"\n      >\n        Toggle Density\n      </button>\n      <table>\n        <thead>\n          {table.getHeaderGroups().map((headerGroup) => (\n            <tr key={headerGroup.id}>\n              {headerGroup.headers.map((header) => {\n                return (\n                  <th\n                    key={header.id}\n                    colSpan={header.colSpan}\n                    style={{\n                      // using our new feature\n                      padding:\n                        density === 'sm'\n                          ? '4px'\n                          : density === 'md'\n                            ? '8px'\n                            : '16px',\n                      transition: 'padding 0.2s',\n                    }}\n                  >\n                    <div\n                      className={\n                        header.column.getCanSort()\n                          ? 'cursor-pointer select-none'\n                          : ''\n                      }\n                      onClick={header.column.getToggleSortingHandler()}\n                    >\n                      <table.FlexRender header={header} />\n                      {{\n                        asc: ' 🔼',\n                        desc: ' 🔽',\n                      }[header.column.getIsSorted() as string] ?? null}\n                    </div>\n                    {header.column.getCanFilter() ? (\n                      <div>\n                        <Filter column={header.column} table={table} />\n                      </div>\n                    ) : null}\n                  </th>\n                )\n              })}\n            </tr>\n          ))}\n        </thead>\n        <tbody>\n          {table.getRowModel().rows.map((row) => {\n            return (\n              <tr key={row.id}>\n                {row.getAllCells().map((cell) => {\n                  return (\n                    <td\n                      key={cell.id}\n                      style={{\n                        // using our new feature\n                        padding:\n                          density === 'sm'\n                            ? '4px'\n                            : density === 'md'\n                              ? '8px'\n                              : '16px',\n                        transition: 'padding 0.2s',\n                      }}\n                    >\n                      <table.FlexRender cell={cell} />\n                    </td>\n                  )\n                })}\n              </tr>\n            )\n          })}\n        </tbody>\n      </table>\n      <div className=\"h-2\" />\n      <div className=\"flex items-center gap-2\">\n        <button\n          className=\"border rounded p-1\"\n          onClick={() => table.firstPage()}\n          disabled={!table.getCanPreviousPage()}\n        >\n          {'<<'}\n        </button>\n        <button\n          className=\"border rounded p-1\"\n          onClick={() => table.previousPage()}\n          disabled={!table.getCanPreviousPage()}\n        >\n          {'<'}\n        </button>\n        <button\n          className=\"border rounded p-1\"\n          onClick={() => table.nextPage()}\n          disabled={!table.getCanNextPage()}\n        >\n          {'>'}\n        </button>\n        <button\n          className=\"border rounded p-1\"\n          onClick={() => table.lastPage()}\n          disabled={!table.getCanNextPage()}\n        >\n          {'>>'}\n        </button>\n        <span className=\"flex items-center gap-1\">\n          <div>Page</div>\n          <strong>\n            {table.store.state.pagination.pageIndex + 1} of{' '}\n            {table.getPageCount().toLocaleString()}\n          </strong>\n        </span>\n        <span className=\"flex items-center gap-1\">\n          | Go to page:\n          <input\n            type=\"number\"\n            defaultValue={table.store.state.pagination.pageIndex + 1}\n            onChange={(e) => {\n              const page = e.target.value ? Number(e.target.value) - 1 : 0\n              table.setPageIndex(page)\n            }}\n            className=\"border p-1 rounded w-16\"\n          />\n        </span>\n        <select\n          value={table.store.state.pagination.pageSize}\n          onChange={(e) => {\n            table.setPageSize(Number(e.target.value))\n          }}\n        >\n          {[10, 20, 30, 40, 50].map((pageSize) => (\n            <option key={pageSize} value={pageSize}>\n              Show {pageSize}\n            </option>\n          ))}\n        </select>\n      </div>\n      <div>\n        Showing {table.getRowModel().rows.length.toLocaleString()} of{' '}\n        {table.getRowCount().toLocaleString()} Rows\n      </div>\n      <table.Subscribe selector={(state) => state}>\n        {(state) => <pre>{JSON.stringify(state, null, 2)}</pre>}\n      </table.Subscribe>\n    </div>\n  )\n}\n\nfunction Filter({\n  column,\n  table,\n}: {\n  column: Column<typeof _features, Person>\n  table: ReactTable<typeof _features, Person>\n}) {\n  const firstValue = table\n    .getPreFilteredRowModel()\n    .flatRows[0]?.getValue(column.id)\n\n  const columnFilterValue = column.getFilterValue()\n\n  return typeof firstValue === 'number' ? (\n    <div className=\"flex space-x-2\">\n      <input\n        type=\"number\"\n        value={(columnFilterValue as [number, number] | undefined)?.[0]}\n        onChange={(e) =>\n          column.setFilterValue((old: [number, number]) => [\n            e.target.value,\n            old[1],\n          ])\n        }\n        placeholder={`Min`}\n        className=\"w-24 border shadow rounded\"\n      />\n      <input\n        type=\"number\"\n        value={(columnFilterValue as [number, number] | undefined)?.[1]}\n        onChange={(e) =>\n          column.setFilterValue((old: [number, number]) => [\n            old[0],\n            e.target.value,\n          ])\n        }\n        placeholder={`Max`}\n        className=\"w-24 border shadow rounded\"\n      />\n    </div>\n  ) : (\n    <input\n      type=\"text\"\n      value={(columnFilterValue ?? '') as string}\n      onChange={(e) => column.setFilterValue(e.target.value)}\n      placeholder={`Search...`}\n      className=\"w-36 border shadow rounded\"\n    />\n  )\n}\n\nconst rootElement = document.getElementById('root')\nif (!rootElement) throw new Error('Failed to find the root element')\n\nReactDOM.createRoot(rootElement).render(\n  <React.StrictMode>\n    <App />\n  </React.StrictMode>,\n)\n"
  },
  {
    "path": "examples/react/custom-plugin/src/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  subRows?: Array<Person>\n}\n\nconst range = (len: number) => {\n  const arr: Array<number> = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (): Person => {\n  return {\n    firstName: faker.person.firstName(),\n    lastName: faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: faker.number.int(1000),\n    progress: faker.number.int(100),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0],\n  }\n}\n\nexport function makeData(...lens: Array<number>) {\n  const makeDataLevel = (depth = 0): Array<Person> => {\n    const len = lens[depth]\n    return range(len).map((_d): Person => {\n      return {\n        ...newPerson(),\n        subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined,\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n"
  },
  {
    "path": "examples/react/custom-plugin/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"module\": \"ESNext\",\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"react-jsx\",\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "examples/react/custom-plugin/vite.config.js",
    "content": "import { defineConfig } from 'vite'\nimport react from '@vitejs/plugin-react'\nimport rollupReplace from '@rollup/plugin-replace'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [\n    rollupReplace({\n      preventAssignment: true,\n      values: {\n        __DEV__: JSON.stringify(true),\n        'process.env.NODE_ENV': JSON.stringify('development'),\n      },\n    }),\n    react(),\n  ],\n})\n"
  },
  {
    "path": "examples/react/expanding/.gitignore",
    "content": "node_modules\n.DS_Store\ndist\ndist-ssr\n*.local\n"
  },
  {
    "path": "examples/react/expanding/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run start` or `yarn start`\n"
  },
  {
    "path": "examples/react/expanding/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite App</title>\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n    <script src=\"https://unpkg.com/react-scan/dist/auto.global.js\"></script>\n  </head>\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.tsx\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/react/expanding/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-expanding\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"start\": \"vite\",\n    \"lint\": \"eslint ./src\",\n    \"test:types\": \"tsc\"\n  },\n  \"dependencies\": {\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"@tanstack/react-table\": \"^9.0.0-alpha.19\",\n    \"react\": \"^19.2.4\",\n    \"react-dom\": \"^19.2.4\"\n  },\n  \"devDependencies\": {\n    \"@rollup/plugin-replace\": \"^6.0.3\",\n    \"@types/react\": \"^19.2.10\",\n    \"@types/react-dom\": \"^19.2.3\",\n    \"@vitejs/plugin-react\": \"^5.1.2\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\"\n  }\n}\n"
  },
  {
    "path": "examples/react/expanding/src/index.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n"
  },
  {
    "path": "examples/react/expanding/src/main.tsx",
    "content": "import React from 'react'\nimport ReactDOM from 'react-dom/client'\nimport {\n  columnFilteringFeature,\n  createColumnHelper,\n  createExpandedRowModel,\n  createFilteredRowModel,\n  createPaginatedRowModel,\n  createSortedRowModel,\n  filterFns,\n  rowExpandingFeature,\n  rowPaginationFeature,\n  rowSelectionFeature,\n  rowSortingFeature,\n  sortFns,\n  tableFeatures,\n  useTable,\n} from '@tanstack/react-table'\nimport { makeData } from './makeData'\nimport type { HTMLProps } from 'react'\nimport type { Person } from './makeData'\nimport type { Column, Table } from '@tanstack/react-table'\nimport './index.css'\n\nconst _features = tableFeatures({\n  columnFilteringFeature,\n  rowExpandingFeature,\n  rowPaginationFeature,\n  rowSortingFeature,\n  rowSelectionFeature,\n})\n\nconst columnHelper = createColumnHelper<typeof _features, Person>()\n\nfunction App() {\n  const rerender = React.useReducer(() => ({}), {})[1]\n\n  const columns = React.useMemo(\n    () =>\n      columnHelper.columns([\n        columnHelper.accessor('firstName', {\n          header: ({ table }) => (\n            <>\n              <IndeterminateCheckbox\n                checked={table.getIsAllRowsSelected()}\n                indeterminate={table.getIsSomeRowsSelected()}\n                onChange={table.getToggleAllRowsSelectedHandler()}\n              />{' '}\n              <button onClick={table.getToggleAllRowsExpandedHandler()}>\n                {table.getIsAllRowsExpanded() ? '👇' : '👉'}\n              </button>{' '}\n              First Name\n            </>\n          ),\n          cell: ({ row, getValue }) => (\n            <div\n              style={{\n                // Since rows are flattened by default,\n                // we can use the row.depth property\n                // and paddingLeft to visually indicate the depth\n                // of the row\n                paddingLeft: `${row.depth * 2}rem`,\n              }}\n            >\n              <div>\n                <IndeterminateCheckbox\n                  checked={row.getIsSelected()}\n                  indeterminate={row.getIsSomeSelected()}\n                  onChange={row.getToggleSelectedHandler()}\n                />{' '}\n                {row.getCanExpand() ? (\n                  <button\n                    onClick={row.getToggleExpandedHandler()}\n                    style={{ cursor: 'pointer' }}\n                  >\n                    {row.getIsExpanded() ? '👇' : '👉'}\n                  </button>\n                ) : (\n                  '🔵'\n                )}{' '}\n                {getValue<boolean>()}\n              </div>\n            </div>\n          ),\n          footer: (props) => props.column.id,\n        }),\n        columnHelper.accessor((row) => row.lastName, {\n          id: 'lastName',\n          cell: (info) => info.getValue(),\n          header: () => <span>Last Name</span>,\n          footer: (props) => props.column.id,\n        }),\n        columnHelper.accessor('age', {\n          header: () => 'Age',\n          footer: (props) => props.column.id,\n          filterFn: 'between',\n        }),\n        columnHelper.accessor('visits', {\n          header: () => <span>Visits</span>,\n          footer: (props) => props.column.id,\n        }),\n        columnHelper.accessor('status', {\n          header: 'Status',\n          footer: (props) => props.column.id,\n        }),\n        columnHelper.accessor('progress', {\n          header: 'Profile Progress',\n          footer: (props) => props.column.id,\n        }),\n      ]),\n    [],\n  )\n\n  const [data, setData] = React.useState(() => makeData(100, 5, 3))\n  const refreshData = () => setData(() => makeData(100, 5, 3))\n\n  const table = useTable({\n    _features,\n    _rowModels: {\n      expandedRowModel: createExpandedRowModel(),\n      filteredRowModel: createFilteredRowModel(filterFns),\n      paginatedRowModel: createPaginatedRowModel(),\n      sortedRowModel: createSortedRowModel(sortFns),\n    },\n    columns,\n    data,\n    getSubRows: (row) => row.subRows,\n    // filterFromLeafRows: true,\n    // maxLeafRowFilterDepth: 0,\n    debugTable: true,\n  })\n\n  return (\n    <table.Subscribe\n      selector={(state) => ({\n        expanded: state.expanded,\n        pagination: state.pagination,\n      })}\n    >\n      {(state) => (\n        <div className=\"p-2\">\n          <div className=\"h-2\" />\n          <table>\n            <thead>\n              {table.getHeaderGroups().map((headerGroup) => (\n                <tr key={headerGroup.id}>\n                  {headerGroup.headers.map((header) => {\n                    return (\n                      <th key={header.id} colSpan={header.colSpan}>\n                        {header.isPlaceholder ? null : (\n                          <div>\n                            <table.FlexRender header={header} />\n                            {header.column.getCanFilter() ? (\n                              <div>\n                                <Filter column={header.column} table={table} />\n                              </div>\n                            ) : null}\n                          </div>\n                        )}\n                      </th>\n                    )\n                  })}\n                </tr>\n              ))}\n            </thead>\n            <tbody>\n              {table.getRowModel().rows.map((row) => {\n                return (\n                  <tr key={row.id}>\n                    {row.getAllCells().map((cell) => {\n                      return (\n                        <td key={cell.id}>\n                          <table.FlexRender cell={cell} />\n                        </td>\n                      )\n                    })}\n                  </tr>\n                )\n              })}\n            </tbody>\n          </table>\n          <div className=\"h-2\" />\n          <div className=\"flex items-center gap-2\">\n            <button\n              className=\"border rounded p-1\"\n              onClick={() => table.setPageIndex(0)}\n              disabled={!table.getCanPreviousPage()}\n            >\n              {'<<'}\n            </button>\n            <button\n              className=\"border rounded p-1\"\n              onClick={() => table.previousPage()}\n              disabled={!table.getCanPreviousPage()}\n            >\n              {'<'}\n            </button>\n            <button\n              className=\"border rounded p-1\"\n              onClick={() => table.nextPage()}\n              disabled={!table.getCanNextPage()}\n            >\n              {'>'}\n            </button>\n            <button\n              className=\"border rounded p-1\"\n              onClick={() => table.setPageIndex(table.getPageCount() - 1)}\n              disabled={!table.getCanNextPage()}\n            >\n              {'>>'}\n            </button>\n            <span className=\"flex items-center gap-1\">\n              <div>Page</div>\n              <strong>\n                {state.pagination.pageIndex + 1} of {table.getPageCount()}\n              </strong>\n            </span>\n            <span className=\"flex items-center gap-1\">\n              | Go to page:\n              <input\n                type=\"number\"\n                min=\"1\"\n                max={table.getPageCount()}\n                defaultValue={state.pagination.pageIndex + 1}\n                onChange={(e) => {\n                  const page = e.target.value ? Number(e.target.value) - 1 : 0\n                  table.setPageIndex(page)\n                }}\n                className=\"border p-1 rounded w-16\"\n              />\n            </span>\n            <select\n              value={state.pagination.pageSize}\n              onChange={(e) => {\n                table.setPageSize(Number(e.target.value))\n              }}\n            >\n              {[10, 20, 30, 40, 50].map((pageSize) => (\n                <option key={pageSize} value={pageSize}>\n                  Show {pageSize}\n                </option>\n              ))}\n            </select>\n          </div>\n          <div>{table.getRowModel().rows.length} Rows</div>\n          <div>\n            <button onClick={() => rerender()}>Force Rerender</button>\n          </div>\n          <div>\n            <button onClick={() => refreshData()}>Refresh Data</button>\n          </div>\n          <table.Subscribe selector={(state) => state}>\n            {(state) => <pre>{JSON.stringify(state, null, 2)}</pre>}\n          </table.Subscribe>\n        </div>\n      )}\n    </table.Subscribe>\n  )\n}\n\nfunction Filter({\n  column,\n  table,\n}: {\n  column: Column<typeof _features, Person>\n  table: Table<typeof _features, Person>\n}) {\n  const firstValue = table\n    .getPreFilteredRowModel()\n    .flatRows[0]?.getValue(column.id)\n\n  const columnFilterValue = column.getFilterValue()\n\n  return typeof firstValue === 'number' ? (\n    <div className=\"flex space-x-2\">\n      <input\n        type=\"number\"\n        value={(columnFilterValue as [number, number] | undefined)?.[0]}\n        onChange={(e) =>\n          column.setFilterValue((old: [number, number] | undefined) => [\n            e.target.value,\n            old?.[1],\n          ])\n        }\n        placeholder={`Min`}\n        className=\"w-24 border shadow rounded\"\n      />\n      <input\n        type=\"number\"\n        value={(columnFilterValue as [number, number] | undefined)?.[1]}\n        onChange={(e) =>\n          column.setFilterValue((old: [number, number] | undefined) => [\n            old?.[0],\n            e.target.value,\n          ])\n        }\n        placeholder={`Max`}\n        className=\"w-24 border shadow rounded\"\n      />\n    </div>\n  ) : (\n    <input\n      type=\"text\"\n      value={(columnFilterValue ?? '') as string}\n      onChange={(e) => column.setFilterValue(e.target.value)}\n      placeholder={`Search...`}\n      className=\"w-36 border shadow rounded\"\n    />\n  )\n}\n\nfunction IndeterminateCheckbox({\n  indeterminate,\n  className = '',\n  ...rest\n}: { indeterminate?: boolean } & HTMLProps<HTMLInputElement>) {\n  const ref = React.useRef<HTMLInputElement>(null!)\n\n  React.useEffect(() => {\n    if (typeof indeterminate === 'boolean') {\n      ref.current.indeterminate = !rest.checked && indeterminate\n    }\n  }, [ref, indeterminate])\n\n  return (\n    <input\n      type=\"checkbox\"\n      ref={ref}\n      className={className + ' cursor-pointer'}\n      {...rest}\n    />\n  )\n}\n\nconst rootElement = document.getElementById('root')\nif (!rootElement) throw new Error('Failed to find the root element')\n\nReactDOM.createRoot(rootElement).render(\n  <React.StrictMode>\n    <App />\n  </React.StrictMode>,\n)\n"
  },
  {
    "path": "examples/react/expanding/src/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  subRows?: Array<Person>\n}\n\nconst range = (len: number) => {\n  const arr: Array<number> = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (): Person => {\n  return {\n    firstName: faker.person.firstName(),\n    lastName: faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: faker.number.int(1000),\n    progress: faker.number.int(100),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0],\n  }\n}\n\nexport function makeData(...lens: Array<number>) {\n  const makeDataLevel = (depth = 0): Array<Person> => {\n    const len = lens[depth]\n    return range(len).map((_): Person => {\n      return {\n        ...newPerson(),\n        subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined,\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n"
  },
  {
    "path": "examples/react/expanding/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"module\": \"ESNext\",\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"react-jsx\",\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "examples/react/expanding/vite.config.js",
    "content": "import { defineConfig } from 'vite'\nimport react from '@vitejs/plugin-react'\nimport rollupReplace from '@rollup/plugin-replace'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [\n    rollupReplace({\n      preventAssignment: true,\n      values: {\n        __DEV__: JSON.stringify(true),\n        'process.env.NODE_ENV': JSON.stringify('development'),\n      },\n    }),\n    react(),\n  ],\n})\n"
  },
  {
    "path": "examples/react/filters/.gitignore",
    "content": "node_modules\n.DS_Store\ndist\ndist-ssr\n*.local\n"
  },
  {
    "path": "examples/react/filters/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run start` or `yarn start`\n"
  },
  {
    "path": "examples/react/filters/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite App</title>\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n    <script src=\"https://unpkg.com/react-scan/dist/auto.global.js\"></script>\n  </head>\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.tsx\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/react/filters/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-filters\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"start\": \"vite\",\n    \"lint\": \"eslint ./src\",\n    \"test:types\": \"tsc\"\n  },\n  \"dependencies\": {\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"@tanstack/match-sorter-utils\": \"^9.0.0-alpha.4\",\n    \"@tanstack/react-table\": \"^9.0.0-alpha.19\",\n    \"react\": \"^19.2.4\",\n    \"react-dom\": \"^19.2.4\"\n  },\n  \"devDependencies\": {\n    \"@rollup/plugin-replace\": \"^6.0.3\",\n    \"@types/react\": \"^19.2.10\",\n    \"@types/react-dom\": \"^19.2.3\",\n    \"@vitejs/plugin-react\": \"^5.1.2\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\"\n  }\n}\n"
  },
  {
    "path": "examples/react/filters/src/index.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n"
  },
  {
    "path": "examples/react/filters/src/main.tsx",
    "content": "import React from 'react'\nimport ReactDOM from 'react-dom/client'\nimport './index.css'\nimport {\n  columnFilteringFeature,\n  createColumnHelper,\n  createFilteredRowModel,\n  createPaginatedRowModel,\n  createSortedRowModel,\n  filterFns,\n  rowPaginationFeature,\n  rowSortingFeature,\n  sortFns,\n  tableFeatures,\n  useTable,\n} from '@tanstack/react-table'\nimport { makeData } from './makeData'\nimport type {\n  CellData,\n  Column,\n  RowData,\n  TableFeatures,\n} from '@tanstack/react-table'\nimport type { Person } from './makeData'\n\ndeclare module '@tanstack/react-table' {\n  // allows us to define custom properties for our columns\n  interface ColumnMeta<\n    TFeatures extends TableFeatures,\n    TData extends RowData,\n    TValue extends CellData = CellData,\n  > {\n    filterVariant?: 'text' | 'range' | 'select'\n  }\n}\n\nconst _features = tableFeatures({\n  columnFilteringFeature,\n  rowSortingFeature,\n  rowPaginationFeature,\n})\n\nconst columnHelper = createColumnHelper<typeof _features, Person>()\n\nfunction App() {\n  const rerender = React.useReducer(() => ({}), {})[1]\n\n  const columns = React.useMemo(\n    () =>\n      columnHelper.columns([\n        columnHelper.accessor('firstName', {\n          cell: (info) => info.getValue(),\n        }),\n        columnHelper.accessor((row) => row.lastName, {\n          id: 'lastName',\n          cell: (info) => info.getValue(),\n          header: () => <span>Last Name</span>,\n        }),\n        columnHelper.accessor((row) => `${row.firstName} ${row.lastName}`, {\n          id: 'fullName',\n          header: 'Full Name',\n          cell: (info) => info.getValue(),\n        }),\n        columnHelper.accessor('age', {\n          header: () => 'Age',\n          meta: {\n            filterVariant: 'range',\n          },\n        }),\n        columnHelper.accessor('visits', {\n          header: () => <span>Visits</span>,\n          meta: {\n            filterVariant: 'range',\n          },\n        }),\n        columnHelper.accessor('status', {\n          header: 'Status',\n          meta: {\n            filterVariant: 'select',\n          },\n        }),\n        columnHelper.accessor('progress', {\n          header: 'Profile Progress',\n          meta: {\n            filterVariant: 'range',\n          },\n        }),\n      ]),\n    [],\n  )\n\n  const [data, setData] = React.useState<Array<Person>>(() => makeData(5_000))\n  const refreshData = () => setData((_old) => makeData(50_000)) // stress test\n\n  const table = useTable({\n    _features,\n    _rowModels: {\n      filteredRowModel: createFilteredRowModel(filterFns), // client side filtering\n      sortedRowModel: createSortedRowModel(sortFns), // client side sorting\n      paginatedRowModel: createPaginatedRowModel(),\n    },\n    columns,\n    data,\n    debugTable: true,\n    debugColumns: true,\n  })\n\n  return (\n    <table.Subscribe\n      selector={(state) => ({\n        columnFilters: state.columnFilters,\n        pagination: state.pagination,\n        sorting: state.sorting,\n      })}\n    >\n      {(state) => (\n        <div className=\"p-2\">\n          <table>\n            <thead>\n              {table.getHeaderGroups().map((headerGroup) => (\n                <tr key={headerGroup.id}>\n                  {headerGroup.headers.map((header) => {\n                    return (\n                      <th key={header.id} colSpan={header.colSpan}>\n                        {header.isPlaceholder ? null : (\n                          <>\n                            <div\n                              className={\n                                header.column.getCanSort()\n                                  ? 'cursor-pointer select-none'\n                                  : ''\n                              }\n                              onClick={header.column.getToggleSortingHandler()}\n                            >\n                              <table.FlexRender header={header} />\n                              {{\n                                asc: ' 🔼',\n                                desc: ' 🔽',\n                              }[header.column.getIsSorted() as string] ?? null}\n                            </div>\n                            {header.column.getCanFilter() ? (\n                              <div>\n                                <Filter column={header.column} />\n                              </div>\n                            ) : null}\n                          </>\n                        )}\n                      </th>\n                    )\n                  })}\n                </tr>\n              ))}\n            </thead>\n            <tbody>\n              {table.getRowModel().rows.map((row) => {\n                return (\n                  <tr key={row.id}>\n                    {row.getAllCells().map((cell) => {\n                      return (\n                        <td key={cell.id}>\n                          <table.FlexRender cell={cell} />\n                        </td>\n                      )\n                    })}\n                  </tr>\n                )\n              })}\n            </tbody>\n          </table>\n          <div className=\"h-2\" />\n          <div className=\"flex items-center gap-2\">\n            <button\n              className=\"border rounded p-1\"\n              onClick={() => table.setPageIndex(0)}\n              disabled={!table.getCanPreviousPage()}\n            >\n              {'<<'}\n            </button>\n            <button\n              className=\"border rounded p-1\"\n              onClick={() => table.previousPage()}\n              disabled={!table.getCanPreviousPage()}\n            >\n              {'<'}\n            </button>\n            <button\n              className=\"border rounded p-1\"\n              onClick={() => table.nextPage()}\n              disabled={!table.getCanNextPage()}\n            >\n              {'>'}\n            </button>\n            <button\n              className=\"border rounded p-1\"\n              onClick={() => table.setPageIndex(table.getPageCount() - 1)}\n              disabled={!table.getCanNextPage()}\n            >\n              {'>>'}\n            </button>\n            <span className=\"flex items-center gap-1\">\n              <div>Page</div>\n              <strong>\n                {state.pagination.pageIndex + 1} of {table.getPageCount()}\n              </strong>\n            </span>\n            <span className=\"flex items-center gap-1\">\n              | Go to page:\n              <input\n                type=\"number\"\n                min=\"1\"\n                max={table.getPageCount()}\n                defaultValue={state.pagination.pageIndex + 1}\n                onChange={(e) => {\n                  const page = e.target.value ? Number(e.target.value) - 1 : 0\n                  table.setPageIndex(page)\n                }}\n                className=\"border p-1 rounded w-16\"\n              />\n            </span>\n            <select\n              value={state.pagination.pageSize}\n              onChange={(e) => {\n                table.setPageSize(Number(e.target.value))\n              }}\n            >\n              {[10, 20, 30, 40, 50].map((pageSize) => (\n                <option key={pageSize} value={pageSize}>\n                  Show {pageSize}\n                </option>\n              ))}\n            </select>\n          </div>\n          <div>{table.getPrePaginatedRowModel().rows.length} Rows</div>\n          <div>\n            <button onClick={() => rerender()}>Force Rerender</button>\n          </div>\n          <div>\n            <button onClick={() => refreshData()}>Refresh Data</button>\n          </div>\n          <table.Subscribe selector={(state) => state}>\n            {(state) => <pre>{JSON.stringify(state, null, 2)}</pre>}\n          </table.Subscribe>\n        </div>\n      )}\n    </table.Subscribe>\n  )\n}\n\nfunction Filter({\n  column,\n}: {\n  column: Column<typeof _features, Person, unknown>\n}) {\n  const columnFilterValue = column.getFilterValue()\n  const { filterVariant } = column.columnDef.meta ?? {}\n\n  return filterVariant === 'range' ? (\n    <div>\n      <div className=\"flex space-x-2\">\n        {/* See faceted column filters example for min max values functionality */}\n        <DebouncedInput\n          type=\"number\"\n          value={(columnFilterValue as [number, number] | undefined)?.[0] ?? ''}\n          onChange={(value) =>\n            column.setFilterValue((old: [number, number] | undefined) => [\n              value,\n              old?.[1],\n            ])\n          }\n          placeholder={`Min`}\n          className=\"w-24 border shadow rounded\"\n        />\n        <DebouncedInput\n          type=\"number\"\n          value={(columnFilterValue as [number, number] | undefined)?.[1] ?? ''}\n          onChange={(value) =>\n            column.setFilterValue((old: [number, number] | undefined) => [\n              old?.[0],\n              value,\n            ])\n          }\n          placeholder={`Max`}\n          className=\"w-24 border shadow rounded\"\n        />\n      </div>\n      <div className=\"h-1\" />\n    </div>\n  ) : filterVariant === 'select' ? (\n    <select\n      onChange={(e) => column.setFilterValue(e.target.value)}\n      value={columnFilterValue?.toString()}\n    >\n      {/* See faceted column filters example for dynamic select options */}\n      <option value=\"\">All</option>\n      <option value=\"complicated\">complicated</option>\n      <option value=\"relationship\">relationship</option>\n      <option value=\"single\">single</option>\n    </select>\n  ) : (\n    <DebouncedInput\n      className=\"w-36 border shadow rounded\"\n      onChange={(value) => column.setFilterValue(value)}\n      placeholder={`Search...`}\n      type=\"text\"\n      value={(columnFilterValue ?? '') as string}\n    />\n    // See faceted column filters example for datalist search suggestions\n  )\n}\n\n// A typical debounced input react component\nfunction DebouncedInput({\n  value: initialValue,\n  onChange,\n  debounce = 500,\n  ...props\n}: {\n  value: string | number\n  onChange: (value: string | number) => void\n  debounce?: number\n} & Omit<React.InputHTMLAttributes<HTMLInputElement>, 'onChange'>) {\n  const [value, setValue] = React.useState(initialValue)\n\n  React.useEffect(() => {\n    setValue(initialValue)\n  }, [initialValue])\n\n  React.useEffect(() => {\n    const timeout = setTimeout(() => {\n      onChange(value)\n    }, debounce)\n\n    return () => clearTimeout(timeout)\n  }, [value])\n\n  return (\n    <input\n      {...props}\n      value={value}\n      onChange={(e) => setValue(e.target.value)}\n    />\n  )\n}\n\nconst rootElement = document.getElementById('root')\nif (!rootElement) throw new Error('Failed to find the root element')\n\nReactDOM.createRoot(rootElement).render(\n  <React.StrictMode>\n    <App />\n  </React.StrictMode>,\n)\n"
  },
  {
    "path": "examples/react/filters/src/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  subRows?: Array<Person>\n}\n\nconst range = (len: number) => {\n  const arr: Array<number> = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (): Person => {\n  return {\n    firstName: faker.person.firstName(),\n    lastName: faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: faker.number.int(1000),\n    progress: faker.number.int(100),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0],\n  }\n}\n\nexport function makeData(...lens: Array<number>) {\n  const makeDataLevel = (depth = 0): Array<Person> => {\n    const len = lens[depth]\n    return range(len).map((_d): Person => {\n      return {\n        ...newPerson(),\n        subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined,\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n"
  },
  {
    "path": "examples/react/filters/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"module\": \"ESNext\",\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"react-jsx\",\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true,\n    \"noErrorTruncation\": true\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "examples/react/filters/vite.config.js",
    "content": "import { defineConfig } from 'vite'\nimport react from '@vitejs/plugin-react'\nimport rollupReplace from '@rollup/plugin-replace'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [\n    rollupReplace({\n      preventAssignment: true,\n      values: {\n        __DEV__: JSON.stringify(true),\n        'process.env.NODE_ENV': JSON.stringify('development'),\n      },\n    }),\n    react(),\n  ],\n})\n"
  },
  {
    "path": "examples/react/filters-faceted/.gitignore",
    "content": "node_modules\n.DS_Store\ndist\ndist-ssr\n*.local\n"
  },
  {
    "path": "examples/react/filters-faceted/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run start` or `yarn start`\n"
  },
  {
    "path": "examples/react/filters-faceted/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite App</title>\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n    <script src=\"https://unpkg.com/react-scan/dist/auto.global.js\"></script>\n  </head>\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.tsx\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/react/filters-faceted/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-filters-faceted\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"start\": \"vite\",\n    \"lint\": \"eslint ./src\",\n    \"test:types\": \"tsc\"\n  },\n  \"dependencies\": {\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"@tanstack/match-sorter-utils\": \"^9.0.0-alpha.4\",\n    \"@tanstack/react-table\": \"^9.0.0-alpha.19\",\n    \"react\": \"^19.2.4\",\n    \"react-dom\": \"^19.2.4\"\n  },\n  \"devDependencies\": {\n    \"@rollup/plugin-replace\": \"^6.0.3\",\n    \"@types/react\": \"^19.2.10\",\n    \"@types/react-dom\": \"^19.2.3\",\n    \"@vitejs/plugin-react\": \"^5.1.2\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\"\n  }\n}\n"
  },
  {
    "path": "examples/react/filters-faceted/src/index.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n"
  },
  {
    "path": "examples/react/filters-faceted/src/main.tsx",
    "content": "import React from 'react'\nimport ReactDOM from 'react-dom/client'\nimport './index.css'\nimport {\n  columnFacetingFeature,\n  columnFilteringFeature,\n  createColumnHelper,\n  createFacetedMinMaxValues,\n  createFacetedRowModel,\n  createFacetedUniqueValues,\n  createFilteredRowModel,\n  createPaginatedRowModel,\n  createSortedRowModel,\n  filterFns,\n  rowPaginationFeature,\n  rowSortingFeature,\n  sortFns,\n  tableFeatures,\n  useTable,\n} from '@tanstack/react-table'\nimport { makeData } from './makeData'\nimport type {\n  CellData,\n  Column,\n  RowData,\n  TableFeatures,\n} from '@tanstack/react-table'\nimport type { Person } from './makeData'\n\nconst _features = tableFeatures({\n  columnFacetingFeature,\n  columnFilteringFeature,\n  rowPaginationFeature,\n  rowSortingFeature,\n})\n\nconst columnHelper = createColumnHelper<typeof _features, Person>()\n\ndeclare module '@tanstack/react-table' {\n  // allows us to define custom properties for our columns\n  interface ColumnMeta<\n    TFeatures extends TableFeatures,\n    TData extends RowData,\n    TValue extends CellData = CellData,\n  > {\n    filterVariant?: 'text' | 'range' | 'select'\n  }\n}\n\nfunction App() {\n  const columns = React.useMemo(\n    () =>\n      columnHelper.columns([\n        columnHelper.accessor('firstName', {\n          cell: (info) => info.getValue(),\n        }),\n        columnHelper.accessor((row) => row.lastName, {\n          id: 'lastName',\n          cell: (info) => info.getValue(),\n          header: () => <span>Last Name</span>,\n        }),\n        columnHelper.accessor('age', {\n          header: () => 'Age',\n          meta: {\n            filterVariant: 'range',\n          },\n        }),\n        columnHelper.accessor('visits', {\n          header: () => <span>Visits</span>,\n          meta: {\n            filterVariant: 'range',\n          },\n        }),\n        columnHelper.accessor('status', {\n          header: 'Status',\n          meta: {\n            filterVariant: 'select',\n          },\n        }),\n        columnHelper.accessor('progress', {\n          header: 'Profile Progress',\n          meta: {\n            filterVariant: 'range',\n          },\n        }),\n      ]),\n    [],\n  )\n\n  const [data, setData] = React.useState<Array<Person>>(() => makeData(5_000))\n  const refreshData = () => setData((_old) => makeData(100_000)) // stress test\n  const rerender = React.useReducer(() => ({}), {})[1]\n\n  const table = useTable({\n    _features,\n    _rowModels: {\n      filteredRowModel: createFilteredRowModel(filterFns), // client-side filtering\n      paginatedRowModel: createPaginatedRowModel(),\n      sortedRowModel: createSortedRowModel(sortFns),\n      facetedRowModel: createFacetedRowModel(), // client-side faceting\n      facetedMinMaxValues: createFacetedMinMaxValues(), // generate min/max values for range filter\n      facetedUniqueValues: createFacetedUniqueValues(), // generate unique values for select filter/autocomplete\n    },\n    columns,\n    data,\n    debugTable: true,\n    debugHeaders: true,\n    debugColumns: false,\n  })\n\n  return (\n    <table.Subscribe\n      selector={(state) => ({\n        columnFilters: state.columnFilters,\n        pagination: state.pagination,\n      })}\n    >\n      {(state) => (\n        <div className=\"p-2\">\n          <table>\n            <thead>\n              {table.getHeaderGroups().map((headerGroup) => (\n                <tr key={headerGroup.id}>\n                  {headerGroup.headers.map((header) => {\n                    return (\n                      <th key={header.id} colSpan={header.colSpan}>\n                        {header.isPlaceholder ? null : (\n                          <>\n                            <div\n                              className={\n                                header.column.getCanSort()\n                                  ? 'cursor-pointer select-none'\n                                  : ''\n                              }\n                              onClick={header.column.getToggleSortingHandler()}\n                            >\n                              <table.FlexRender header={header} />\n                              {{\n                                asc: ' 🔼',\n                                desc: ' 🔽',\n                              }[header.column.getIsSorted() as string] ?? null}\n                            </div>\n                            {header.column.getCanFilter() ? (\n                              <div>\n                                <Filter column={header.column} />\n                              </div>\n                            ) : null}\n                          </>\n                        )}\n                      </th>\n                    )\n                  })}\n                </tr>\n              ))}\n            </thead>\n            <tbody>\n              {table.getRowModel().rows.map((row) => {\n                return (\n                  <tr key={row.id}>\n                    {row.getAllCells().map((cell) => {\n                      return (\n                        <td key={cell.id}>\n                          <table.FlexRender cell={cell} />\n                        </td>\n                      )\n                    })}\n                  </tr>\n                )\n              })}\n            </tbody>\n          </table>\n          <div className=\"h-2\" />\n          <div className=\"flex items-center gap-2\">\n            <button\n              className=\"border rounded p-1\"\n              onClick={() => table.setPageIndex(0)}\n              disabled={!table.getCanPreviousPage()}\n            >\n              {'<<'}\n            </button>\n            <button\n              className=\"border rounded p-1\"\n              onClick={() => table.previousPage()}\n              disabled={!table.getCanPreviousPage()}\n            >\n              {'<'}\n            </button>\n            <button\n              className=\"border rounded p-1\"\n              onClick={() => table.nextPage()}\n              disabled={!table.getCanNextPage()}\n            >\n              {'>'}\n            </button>\n            <button\n              className=\"border rounded p-1\"\n              onClick={() => table.setPageIndex(table.getPageCount() - 1)}\n              disabled={!table.getCanNextPage()}\n            >\n              {'>>'}\n            </button>\n            <span className=\"flex items-center gap-1\">\n              <div>Page</div>\n              <strong>\n                {state.pagination.pageIndex + 1} of {table.getPageCount()}\n              </strong>\n            </span>\n            <span className=\"flex items-center gap-1\">\n              | Go to page:\n              <input\n                type=\"number\"\n                defaultValue={state.pagination.pageIndex + 1}\n                onChange={(e) => {\n                  const page = e.target.value ? Number(e.target.value) - 1 : 0\n                  table.setPageIndex(page)\n                }}\n                className=\"border p-1 rounded w-16\"\n              />\n            </span>\n            <select\n              value={state.pagination.pageSize}\n              onChange={(e) => {\n                table.setPageSize(Number(e.target.value))\n              }}\n            >\n              {[10, 20, 30, 40, 50].map((pageSize) => (\n                <option key={pageSize} value={pageSize}>\n                  Show {pageSize}\n                </option>\n              ))}\n            </select>\n          </div>\n          <div>{table.getPrePaginatedRowModel().rows.length} Rows</div>\n          <div>\n            <button onClick={rerender}>Force Rerender</button>\n          </div>\n          <div>\n            <button onClick={refreshData}>Refresh Data</button>\n          </div>\n          <table.Subscribe selector={(state) => state}>\n            {(state) => <pre>{JSON.stringify(state, null, 2)}</pre>}\n          </table.Subscribe>\n        </div>\n      )}\n    </table.Subscribe>\n  )\n}\n\nfunction Filter({ column }: { column: Column<typeof _features, Person> }) {\n  const { filterVariant } = column.columnDef.meta ?? {}\n\n  const columnFilterValue = column.getFilterValue()\n\n  const minMaxValues = column.getFacetedMinMaxValues()\n\n  const sortedUniqueValues = React.useMemo(\n    () =>\n      filterVariant === 'range'\n        ? []\n        : Array.from(column.getFacetedUniqueValues().keys())\n            .sort()\n            .slice(0, 5000),\n    [column.getFacetedUniqueValues(), filterVariant],\n  )\n\n  return filterVariant === 'range' ? (\n    <div>\n      <div className=\"flex space-x-2\">\n        <DebouncedInput\n          type=\"number\"\n          min={Number(minMaxValues?.[0] ?? '')}\n          max={Number(minMaxValues?.[1] ?? '')}\n          value={(columnFilterValue as [number, number] | undefined)?.[0] ?? ''}\n          onChange={(value) =>\n            column.setFilterValue((old: [number, number] | undefined) => [\n              value,\n              old?.[1],\n            ])\n          }\n          placeholder={`Min ${\n            minMaxValues?.[0] !== undefined ? `(${minMaxValues[0]})` : ''\n          }`}\n          className=\"w-24 border shadow rounded\"\n        />\n        <DebouncedInput\n          type=\"number\"\n          min={Number(minMaxValues?.[0] ?? '')}\n          max={Number(minMaxValues?.[1] ?? '')}\n          value={(columnFilterValue as [number, number] | undefined)?.[1] ?? ''}\n          onChange={(value) =>\n            column.setFilterValue((old: [number, number] | undefined) => [\n              old?.[0],\n              value,\n            ])\n          }\n          placeholder={`Max ${minMaxValues?.[1] ? `(${minMaxValues[1]})` : ''}`}\n          className=\"w-24 border shadow rounded\"\n        />\n      </div>\n      <div className=\"h-1\" />\n    </div>\n  ) : filterVariant === 'select' ? (\n    <select\n      onChange={(e) => column.setFilterValue(e.target.value)}\n      value={columnFilterValue?.toString()}\n    >\n      <option value=\"\">All</option>\n      {sortedUniqueValues.map((value) => (\n        // dynamically generated select options from faceted values feature\n        <option value={value} key={value}>\n          {value}\n        </option>\n      ))}\n    </select>\n  ) : (\n    <>\n      {/* Autocomplete suggestions from faceted values feature */}\n      <datalist id={column.id + 'list'}>\n        {sortedUniqueValues.map((value: any) => (\n          <option value={value} key={value} />\n        ))}\n      </datalist>\n      <DebouncedInput\n        type=\"text\"\n        value={(columnFilterValue ?? '') as string}\n        onChange={(value) => column.setFilterValue(value)}\n        placeholder={`Search... (${column.getFacetedUniqueValues().size})`}\n        className=\"w-36 border shadow rounded\"\n        list={column.id + 'list'}\n      />\n      <div className=\"h-1\" />\n    </>\n  )\n}\n\n// A typical debounced input react component\nfunction DebouncedInput({\n  value: initialValue,\n  onChange,\n  debounce = 500,\n  ...props\n}: {\n  value: string | number\n  onChange: (value: string | number) => void\n  debounce?: number\n} & Omit<React.InputHTMLAttributes<HTMLInputElement>, 'onChange'>) {\n  const [value, setValue] = React.useState(initialValue)\n\n  React.useEffect(() => {\n    setValue(initialValue)\n  }, [initialValue])\n\n  React.useEffect(() => {\n    const timeout = setTimeout(() => {\n      onChange(value)\n    }, debounce)\n\n    return () => clearTimeout(timeout)\n  }, [value])\n\n  return (\n    <input\n      {...props}\n      value={value}\n      onChange={(e) => setValue(e.target.value)}\n    />\n  )\n}\n\nconst rootElement = document.getElementById('root')\nif (!rootElement) throw new Error('Failed to find the root element')\n\nReactDOM.createRoot(rootElement).render(\n  <React.StrictMode>\n    <App />\n  </React.StrictMode>,\n)\n"
  },
  {
    "path": "examples/react/filters-faceted/src/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  subRows?: Array<Person>\n}\n\nconst range = (len: number) => {\n  const arr: Array<number> = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (): Person => {\n  return {\n    firstName: faker.person.firstName(),\n    lastName: faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: faker.number.int(1000),\n    progress: faker.number.int(100),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0],\n  }\n}\n\nexport function makeData(...lens: Array<number>) {\n  const makeDataLevel = (depth = 0): Array<Person> => {\n    const len = lens[depth]\n    return range(len).map((_d): Person => {\n      return {\n        ...newPerson(),\n        subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined,\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n"
  },
  {
    "path": "examples/react/filters-faceted/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"module\": \"ESNext\",\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"react-jsx\",\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "examples/react/filters-faceted/vite.config.js",
    "content": "import { defineConfig } from 'vite'\nimport react from '@vitejs/plugin-react'\nimport rollupReplace from '@rollup/plugin-replace'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [\n    rollupReplace({\n      preventAssignment: true,\n      values: {\n        __DEV__: JSON.stringify(true),\n        'process.env.NODE_ENV': JSON.stringify('development'),\n      },\n    }),\n    react(),\n  ],\n})\n"
  },
  {
    "path": "examples/react/filters-fuzzy/.gitignore",
    "content": "node_modules\n.DS_Store\ndist\ndist-ssr\n*.local\n"
  },
  {
    "path": "examples/react/filters-fuzzy/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run start` or `yarn start`\n"
  },
  {
    "path": "examples/react/filters-fuzzy/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite App</title>\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n    <script src=\"https://unpkg.com/react-scan/dist/auto.global.js\"></script>\n  </head>\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.tsx\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/react/filters-fuzzy/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-filters-fuzzy\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"start\": \"vite\",\n    \"lint\": \"eslint ./src\",\n    \"test:types\": \"tsc\"\n  },\n  \"dependencies\": {\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"@tanstack/match-sorter-utils\": \"^9.0.0-alpha.4\",\n    \"@tanstack/react-table\": \"^9.0.0-alpha.19\",\n    \"react\": \"^19.2.4\",\n    \"react-dom\": \"^19.2.4\"\n  },\n  \"devDependencies\": {\n    \"@rollup/plugin-replace\": \"^6.0.3\",\n    \"@types/react\": \"^19.2.10\",\n    \"@types/react-dom\": \"^19.2.3\",\n    \"@vitejs/plugin-react\": \"^5.1.2\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\"\n  }\n}\n"
  },
  {
    "path": "examples/react/filters-fuzzy/src/index.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n"
  },
  {
    "path": "examples/react/filters-fuzzy/src/main.tsx",
    "content": "import React from 'react'\nimport ReactDOM from 'react-dom/client'\nimport './index.css'\nimport {\n  columnFilteringFeature,\n  createColumnHelper,\n  createFilteredRowModel,\n  createPaginatedRowModel,\n  createSortedRowModel,\n  filterFns,\n  globalFilteringFeature,\n  rowPaginationFeature,\n  rowSortingFeature,\n  sortFns,\n  tableFeatures,\n  useTable,\n} from '@tanstack/react-table'\nimport { compareItems, rankItem } from '@tanstack/match-sorter-utils'\nimport { makeData } from './makeData'\nimport type { Person } from './makeData'\nimport type { Column, FilterFn, SortFn } from '@tanstack/react-table'\n\n// A TanStack fork of Kent C. Dodds' match-sorter library that provides ranking information\nimport type { RankingInfo } from '@tanstack/match-sorter-utils'\n\nconst _features = tableFeatures({\n  columnFilteringFeature,\n  globalFilteringFeature,\n  rowSortingFeature,\n  rowPaginationFeature,\n})\n\nconst columnHelper = createColumnHelper<typeof _features, Person>()\n\n// Define a custom fuzzy filter function that will apply ranking info to rows (using match-sorter utils)\nconst fuzzyFilter: FilterFn<typeof _features, Person> = (\n  row,\n  columnId,\n  value,\n  addMeta,\n) => {\n  // Rank the item\n  const itemRank = rankItem(row.getValue(columnId), value)\n\n  // Store the itemRank info\n  addMeta?.({\n    itemRank,\n  })\n\n  // Return if the item should be filtered in/out\n  return itemRank.passed\n}\n\n// Define a custom fuzzy sort function that will sort by rank if the row has ranking information\nconst fuzzySort: SortFn<typeof _features, Person> = (rowA, rowB, columnId) => {\n  let dir = 0\n\n  // Only sort by rank if the column has ranking information\n  // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n  if (rowA.columnFiltersMeta[columnId]) {\n    dir = compareItems(\n      rowA.columnFiltersMeta[columnId].itemRank!,\n      rowB.columnFiltersMeta[columnId].itemRank!,\n    )\n  }\n\n  // Provide an alphanumeric fallback for when the item ranks are equal\n  return dir === 0 ? sortFns.alphanumeric(rowA, rowB, columnId) : dir\n}\n\ndeclare module '@tanstack/react-table' {\n  // add fuzzy filter to the filterFns\n  interface FilterFns {\n    fuzzy: FilterFn<typeof _features, Person>\n  }\n  interface FilterMeta {\n    itemRank?: RankingInfo\n  }\n}\n\nfunction App() {\n  const rerender = React.useReducer(() => ({}), {})[1]\n\n  const columns = React.useMemo(\n    () =>\n      columnHelper.columns([\n        columnHelper.accessor('id', {\n          filterFn: 'equalsString', // note: normal non-fuzzy filter column - exact match required\n        }),\n        columnHelper.accessor('firstName', {\n          cell: (info) => info.getValue(),\n          filterFn: 'includesStringSensitive', // note: normal non-fuzzy filter column - case sensitive\n        }),\n        columnHelper.accessor((row) => row.lastName, {\n          id: 'lastName',\n          cell: (info) => info.getValue(),\n          header: () => <span>Last Name</span>,\n          filterFn: 'includesString', // note: normal non-fuzzy filter column - case insensitive\n        }),\n        columnHelper.accessor((row) => `${row.firstName} ${row.lastName}`, {\n          id: 'fullName',\n          header: 'Full Name',\n          cell: (info) => info.getValue(),\n          filterFn: 'fuzzy', // using our custom fuzzy filter function\n          // filterFn: fuzzyFilter, //or just define with the function\n          sortFn: fuzzySort, // sort by fuzzy rank (falls back to alphanumeric)\n        }),\n      ]),\n    [],\n  )\n\n  const [data, setData] = React.useState<Array<Person>>(() => makeData(5_000))\n  const refreshData = () => setData((_old) => makeData(50_000)) // stress test\n\n  const table = useTable<typeof _features, Person>({\n    _features,\n    _rowModels: {\n      filteredRowModel: createFilteredRowModel({\n        ...filterFns,\n        fuzzy: fuzzyFilter,\n      }),\n      paginatedRowModel: createPaginatedRowModel(),\n      sortedRowModel: createSortedRowModel(sortFns),\n    },\n    columns,\n    data,\n    globalFilterFn: 'fuzzy', // apply fuzzy filter to the global filter (most common use case for fuzzy filter)\n    debugTable: true,\n    debugHeaders: true,\n    debugColumns: false,\n  })\n\n  // apply the fuzzy sort if the fullName column is being filtered\n  React.useEffect(() => {\n    if (table.store.state.columnFilters[0]?.id === 'fullName') {\n      if (table.store.state.sorting[0]?.id !== 'fullName') {\n        table.setSorting([{ id: 'fullName', desc: false }])\n      }\n    }\n  }, [table.store.state.columnFilters[0]?.id])\n\n  return (\n    <table.Subscribe\n      selector={(state) => ({\n        columnFilters: state.columnFilters,\n        globalFilter: state.globalFilter,\n        pagination: state.pagination,\n      })}\n    >\n      {(state) => (\n        <div className=\"p-2\">\n          <div>\n            <DebouncedInput\n              value={state.globalFilter ?? ''}\n              onChange={(value) => table.setGlobalFilter(String(value))}\n              className=\"p-2 font-lg shadow border border-block\"\n              placeholder=\"Search all columns...\"\n            />\n          </div>\n          <div className=\"h-2\" />\n          <table>\n            <thead>\n              {table.getHeaderGroups().map((headerGroup) => (\n                <tr key={headerGroup.id}>\n                  {headerGroup.headers.map((header) => {\n                    return (\n                      <th key={header.id} colSpan={header.colSpan}>\n                        {header.isPlaceholder ? null : (\n                          <>\n                            <div\n                              className={\n                                header.column.getCanSort()\n                                  ? 'cursor-pointer select-none'\n                                  : ''\n                              }\n                              onClick={header.column.getToggleSortingHandler()}\n                            >\n                              <table.FlexRender header={header} />\n                              {{\n                                asc: ' 🔼',\n                                desc: ' 🔽',\n                              }[header.column.getIsSorted() as string] ?? null}\n                            </div>\n                            {header.column.getCanFilter() ? (\n                              <div>\n                                <Filter column={header.column} />\n                              </div>\n                            ) : null}\n                          </>\n                        )}\n                      </th>\n                    )\n                  })}\n                </tr>\n              ))}\n            </thead>\n            <tbody>\n              {table.getRowModel().rows.map((row) => {\n                return (\n                  <tr key={row.id}>\n                    {row.getAllCells().map((cell) => {\n                      return (\n                        <td key={cell.id}>\n                          <table.FlexRender cell={cell} />\n                        </td>\n                      )\n                    })}\n                  </tr>\n                )\n              })}\n            </tbody>\n          </table>\n          <div className=\"h-2\" />\n          <div className=\"flex items-center gap-2\">\n            <button\n              className=\"border rounded p-1\"\n              onClick={() => table.setPageIndex(0)}\n              disabled={!table.getCanPreviousPage()}\n            >\n              {'<<'}\n            </button>\n            <button\n              className=\"border rounded p-1\"\n              onClick={() => table.previousPage()}\n              disabled={!table.getCanPreviousPage()}\n            >\n              {'<'}\n            </button>\n            <button\n              className=\"border rounded p-1\"\n              onClick={() => table.nextPage()}\n              disabled={!table.getCanNextPage()}\n            >\n              {'>'}\n            </button>\n            <button\n              className=\"border rounded p-1\"\n              onClick={() => table.setPageIndex(table.getPageCount() - 1)}\n              disabled={!table.getCanNextPage()}\n            >\n              {'>>'}\n            </button>\n            <span className=\"flex items-center gap-1\">\n              <div>Page</div>\n              <strong>\n                {state.pagination.pageIndex + 1} of {table.getPageCount()}\n              </strong>\n            </span>\n            <span className=\"flex items-center gap-1\">\n              | Go to page:\n              <input\n                type=\"number\"\n                defaultValue={state.pagination.pageIndex + 1}\n                onChange={(e) => {\n                  const page = e.target.value ? Number(e.target.value) - 1 : 0\n                  table.setPageIndex(page)\n                }}\n                className=\"border p-1 rounded w-16\"\n              />\n            </span>\n            <select\n              value={state.pagination.pageSize}\n              onChange={(e) => {\n                table.setPageSize(Number(e.target.value))\n              }}\n            >\n              {[10, 20, 30, 40, 50].map((pageSize) => (\n                <option key={pageSize} value={pageSize}>\n                  Show {pageSize}\n                </option>\n              ))}\n            </select>\n          </div>\n          <div>{table.getPrePaginatedRowModel().rows.length} Rows</div>\n          <div>\n            <button onClick={() => rerender()}>Force Rerender</button>\n          </div>\n          <div>\n            <button onClick={() => refreshData()}>Refresh Data</button>\n          </div>\n          <table.Subscribe selector={(state) => state}>\n            {(state) => <pre>{JSON.stringify(state, null, 2)}</pre>}\n          </table.Subscribe>\n        </div>\n      )}\n    </table.Subscribe>\n  )\n}\n\nfunction Filter({ column }: { column: Column<typeof _features, Person> }) {\n  const columnFilterValue = column.getFilterValue()\n\n  return (\n    <DebouncedInput\n      type=\"text\"\n      value={(columnFilterValue ?? '') as string}\n      onChange={(value) => column.setFilterValue(value)}\n      placeholder={`Search...`}\n      className=\"w-36 border shadow rounded\"\n    />\n  )\n}\n\n// A typical debounced input react component\nfunction DebouncedInput({\n  value: initialValue,\n  onChange,\n  debounce = 500,\n  ...props\n}: {\n  value: string | number\n  onChange: (value: string | number) => void\n  debounce?: number\n} & Omit<React.InputHTMLAttributes<HTMLInputElement>, 'onChange'>) {\n  const [value, setValue] = React.useState(initialValue)\n\n  React.useEffect(() => {\n    setValue(initialValue)\n  }, [initialValue])\n\n  React.useEffect(() => {\n    const timeout = setTimeout(() => {\n      onChange(value)\n    }, debounce)\n\n    return () => clearTimeout(timeout)\n  }, [value])\n\n  return (\n    <input\n      {...props}\n      value={value}\n      onChange={(e) => setValue(e.target.value)}\n    />\n  )\n}\n\nconst rootElement = document.getElementById('root')\nif (!rootElement) throw new Error('Failed to find the root element')\n\nReactDOM.createRoot(rootElement).render(\n  <React.StrictMode>\n    <App />\n  </React.StrictMode>,\n)\n"
  },
  {
    "path": "examples/react/filters-fuzzy/src/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = {\n  id: number\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  subRows?: Array<Person>\n}\n\nconst range = (len: number) => {\n  const arr: Array<number> = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (num: number): Person => {\n  return {\n    id: num,\n    firstName: faker.person.firstName(),\n    lastName: faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: faker.number.int(1000),\n    progress: faker.number.int(100),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0],\n  }\n}\n\nexport function makeData(...lens: Array<number>) {\n  const makeDataLevel = (depth = 0): Array<Person> => {\n    const len = lens[depth]\n    return range(len).map((index): Person => {\n      return {\n        ...newPerson(index),\n        subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined,\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n"
  },
  {
    "path": "examples/react/filters-fuzzy/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"module\": \"ESNext\",\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"react-jsx\",\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "examples/react/filters-fuzzy/vite.config.js",
    "content": "import { defineConfig } from 'vite'\nimport react from '@vitejs/plugin-react'\nimport rollupReplace from '@rollup/plugin-replace'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [\n    rollupReplace({\n      preventAssignment: true,\n      values: {\n        __DEV__: JSON.stringify(true),\n        'process.env.NODE_ENV': JSON.stringify('development'),\n      },\n    }),\n    react(),\n  ],\n})\n"
  },
  {
    "path": "examples/react/grouping/.gitignore",
    "content": "node_modules\n.DS_Store\ndist\ndist-ssr\n*.local\n"
  },
  {
    "path": "examples/react/grouping/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run start` or `yarn start`\n"
  },
  {
    "path": "examples/react/grouping/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite App</title>\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n    <script src=\"https://unpkg.com/react-scan/dist/auto.global.js\"></script>\n  </head>\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.tsx\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/react/grouping/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-grouping\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"start\": \"vite\",\n    \"lint\": \"eslint ./src\",\n    \"test:types\": \"tsc\"\n  },\n  \"dependencies\": {\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"@tanstack/react-table\": \"^9.0.0-alpha.19\",\n    \"react\": \"^19.2.4\",\n    \"react-dom\": \"^19.2.4\"\n  },\n  \"devDependencies\": {\n    \"@rollup/plugin-replace\": \"^6.0.3\",\n    \"@types/react\": \"^19.2.10\",\n    \"@types/react-dom\": \"^19.2.3\",\n    \"@vitejs/plugin-react\": \"^5.1.2\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\"\n  }\n}\n"
  },
  {
    "path": "examples/react/grouping/src/index.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n"
  },
  {
    "path": "examples/react/grouping/src/main.tsx",
    "content": "import React from 'react'\nimport ReactDOM from 'react-dom/client'\nimport './index.css'\nimport {\n  aggregationFns,\n  columnFilteringFeature,\n  columnGroupingFeature,\n  createExpandedRowModel,\n  createFilteredRowModel,\n  createGroupedRowModel,\n  createPaginatedRowModel,\n  createSortedRowModel,\n  createTableHook,\n  filterFns,\n  rowExpandingFeature,\n  rowPaginationFeature,\n  rowSortingFeature,\n  sortFns,\n} from '@tanstack/react-table'\nimport { makeData } from './makeData'\nimport type { Person } from './makeData'\n\n// this example happens to use the createTableHook pattern, but it is not required\nconst { useAppTable, createAppColumnHelper } = createTableHook({\n  _features: {\n    columnFilteringFeature,\n    columnGroupingFeature,\n    rowExpandingFeature,\n    rowPaginationFeature,\n    rowSortingFeature,\n  },\n  _rowModels: {\n    expandedRowModel: createExpandedRowModel(),\n    filteredRowModel: createFilteredRowModel(filterFns),\n    groupedRowModel: createGroupedRowModel(aggregationFns),\n    paginatedRowModel: createPaginatedRowModel(),\n    sortedRowModel: createSortedRowModel(sortFns),\n  },\n})\n\nconst columnHelper = createAppColumnHelper<Person>()\n\nfunction App() {\n  const rerender = React.useReducer(() => ({}), {})[1]\n\n  const columns = React.useMemo(\n    () =>\n      columnHelper.columns([\n        columnHelper.accessor('firstName', {\n          header: 'First Name',\n          cell: (info) => info.getValue(),\n          /**\n           * override the value used for row grouping\n           * (otherwise, defaults to the value derived from accessorKey / accessorFn)\n           */\n          getGroupingValue: (row) => `${row.firstName} ${row.lastName}`,\n        }),\n        columnHelper.accessor((row) => row.lastName, {\n          id: 'lastName',\n          header: () => <span>Last Name</span>,\n          cell: (info) => info.getValue(),\n        }),\n        columnHelper.accessor('age', {\n          header: () => 'Age',\n          aggregatedCell: ({ getValue }) =>\n            Math.round(getValue<number>() * 100) / 100,\n          aggregationFn: 'median',\n        }),\n        columnHelper.accessor('visits', {\n          header: () => <span>Visits</span>,\n          aggregationFn: 'sum',\n          aggregatedCell: ({ getValue }) => getValue<number>().toLocaleString(),\n        }),\n        columnHelper.accessor('status', {\n          header: 'Status',\n        }),\n        columnHelper.accessor('progress', {\n          header: 'Profile Progress',\n          cell: ({ getValue }) =>\n            Math.round(getValue<number>() * 100) / 100 + '%',\n          aggregationFn: 'mean',\n          aggregatedCell: ({ getValue }) =>\n            Math.round(getValue<number>() * 100) / 100 + '%',\n        }),\n      ]),\n    [],\n  )\n\n  const [data, setData] = React.useState(() => makeData(10_000))\n  const refreshData = () => setData(() => makeData(100_000)) // stress test\n\n  const table = useAppTable(\n    {\n      columns,\n      data,\n      debugTable: true,\n    },\n    (state) => state, // subscribe to all state changes\n  )\n\n  return (\n    <div className=\"p-2\">\n      <div className=\"h-2\" />\n      <table>\n        <thead>\n          {table.getHeaderGroups().map((headerGroup) => (\n            <tr key={headerGroup.id}>\n              {headerGroup.headers.map((header) => {\n                return (\n                  <th key={header.id} colSpan={header.colSpan}>\n                    {header.isPlaceholder ? null : (\n                      <div>\n                        {header.column.getCanGroup() ? (\n                          // If the header can be grouped, let's add a toggle\n                          <button\n                            onClick={header.column.getToggleGroupingHandler()}\n                            style={{ cursor: 'pointer' }}\n                          >\n                            {header.column.getIsGrouped()\n                              ? `🛑(${header.column.getGroupedIndex()}) `\n                              : `👊 `}\n                          </button>\n                        ) : null}{' '}\n                        <table.FlexRender header={header} />\n                      </div>\n                    )}\n                  </th>\n                )\n              })}\n            </tr>\n          ))}\n        </thead>\n        <tbody>\n          {table.getRowModel().rows.map((row) => {\n            return (\n              <tr key={row.id}>\n                {row.getAllCells().map((cell) => {\n                  return (\n                    <td\n                      key={cell.id}\n                      style={{\n                        background: cell.getIsGrouped()\n                          ? '#0aff0082'\n                          : cell.getIsAggregated()\n                            ? '#ffa50078'\n                            : cell.getIsPlaceholder()\n                              ? '#ff000042'\n                              : 'white',\n                      }}\n                    >\n                      {cell.getIsGrouped() ? (\n                        // If it's a grouped cell, add an expander and row count\n                        <>\n                          <button\n                            onClick={row.getToggleExpandedHandler()}\n                            style={{\n                              cursor: row.getCanExpand() ? 'pointer' : 'normal',\n                            }}\n                          >\n                            {row.getIsExpanded() ? '👇' : '👉'}{' '}\n                            <table.FlexRender cell={cell} /> (\n                            {row.subRows.length})\n                          </button>\n                        </>\n                      ) : cell.getIsAggregated() ? (\n                        // If the cell is aggregated, use the Aggregated\n                        // renderer for cell\n                        <table.FlexRender cell={cell} />\n                      ) : cell.getIsPlaceholder() ? null : ( // For cells with repeated values, render null\n                        // Otherwise, just render the regular cell\n                        <table.FlexRender cell={cell} />\n                      )}\n                    </td>\n                  )\n                })}\n              </tr>\n            )\n          })}\n        </tbody>\n      </table>\n      <div className=\"h-2\" />\n      <div className=\"flex items-center gap-2\">\n        <button\n          className=\"border rounded p-1\"\n          onClick={() => table.setPageIndex(0)}\n          disabled={!table.getCanPreviousPage()}\n        >\n          {'<<'}\n        </button>\n        <button\n          className=\"border rounded p-1\"\n          onClick={() => table.previousPage()}\n          disabled={!table.getCanPreviousPage()}\n        >\n          {'<'}\n        </button>\n        <button\n          className=\"border rounded p-1\"\n          onClick={() => table.nextPage()}\n          disabled={!table.getCanNextPage()}\n        >\n          {'>'}\n        </button>\n        <button\n          className=\"border rounded p-1\"\n          onClick={() => table.setPageIndex(table.getPageCount() - 1)}\n          disabled={!table.getCanNextPage()}\n        >\n          {'>>'}\n        </button>\n        <span className=\"flex items-center gap-1\">\n          <div>Page</div>\n          <strong>\n            {table.state.pagination.pageIndex + 1} of {table.getPageCount()}\n          </strong>\n        </span>\n        <span className=\"flex items-center gap-1\">\n          | Go to page:\n          <input\n            type=\"number\"\n            min=\"1\"\n            max={table.getPageCount()}\n            defaultValue={table.state.pagination.pageIndex + 1}\n            onChange={(e) => {\n              const page = e.target.value ? Number(e.target.value) - 1 : 0\n              table.setPageIndex(page)\n            }}\n            className=\"border p-1 rounded w-16\"\n          />\n        </span>\n        <select\n          value={table.state.pagination.pageSize}\n          onChange={(e) => {\n            table.setPageSize(Number(e.target.value))\n          }}\n        >\n          {[10, 20, 30, 40, 50].map((pageSize) => (\n            <option key={pageSize} value={pageSize}>\n              Show {pageSize}\n            </option>\n          ))}\n        </select>\n      </div>\n      <div>{table.getRowModel().rows.length} Rows</div>\n      <div>\n        <button onClick={() => rerender()}>Force Rerender</button>\n      </div>\n      <div>\n        <button onClick={() => refreshData()}>Refresh Data</button>\n      </div>\n      <table.Subscribe selector={(state) => state}>\n        {(state) => <pre>{JSON.stringify(state, null, 2)}</pre>}\n      </table.Subscribe>\n    </div>\n  )\n}\n\nconst rootElement = document.getElementById('root')\nif (!rootElement) throw new Error('Failed to find the root element')\n\nReactDOM.createRoot(rootElement).render(\n  <React.StrictMode>\n    <App />\n  </React.StrictMode>,\n)\n"
  },
  {
    "path": "examples/react/grouping/src/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  subRows?: Array<Person>\n}\n\nconst range = (len: number) => {\n  const arr: Array<number> = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (): Person => {\n  return {\n    firstName: faker.person.firstName(),\n    lastName: faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: faker.number.int(1000),\n    progress: faker.number.int(100),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0],\n  }\n}\n\nexport function makeData(...lens: Array<number>) {\n  const makeDataLevel = (depth = 0): Array<Person> => {\n    const len = lens[depth]\n    return range(len).map((_): Person => {\n      return {\n        ...newPerson(),\n        subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined,\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n"
  },
  {
    "path": "examples/react/grouping/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"module\": \"ESNext\",\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"react-jsx\",\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "examples/react/grouping/vite.config.js",
    "content": "import { defineConfig } from 'vite'\nimport react from '@vitejs/plugin-react'\nimport rollupReplace from '@rollup/plugin-replace'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [\n    rollupReplace({\n      preventAssignment: true,\n      values: {\n        __DEV__: JSON.stringify(true),\n        'process.env.NODE_ENV': JSON.stringify('development'),\n      },\n    }),\n    react(),\n  ],\n})\n"
  },
  {
    "path": "examples/react/kitchen-sink-shadcn/.gitignore",
    "content": "node_modules\n.DS_Store\ndist\ndist-ssr\n*.local\n!lib\n"
  },
  {
    "path": "examples/react/kitchen-sink-shadcn/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run start` or `yarn start`\n"
  },
  {
    "path": "examples/react/kitchen-sink-shadcn/components.json",
    "content": "{\n  \"$schema\": \"https://ui.shadcn.com/schema.json\",\n  \"style\": \"new-york\",\n  \"rsc\": false,\n  \"tsx\": true,\n  \"tailwind\": {\n    \"config\": \"tailwind.config.ts\",\n    \"css\": \"src/index.css\",\n    \"baseColor\": \"zinc\",\n    \"cssVariables\": true,\n    \"prefix\": \"\"\n  },\n  \"aliases\": {\n    \"components\": \"@/components\",\n    \"utils\": \"@/lib/utils\",\n    \"ui\": \"@/components/ui\",\n    \"lib\": \"@/lib\",\n    \"hooks\": \"@/hooks\"\n  },\n  \"iconLibrary\": \"lucide\"\n}\n"
  },
  {
    "path": "examples/react/kitchen-sink-shadcn/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite App</title>\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n    <script src=\"https://unpkg.com/react-scan/dist/auto.global.js\"></script>\n  </head>\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.tsx\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/react/kitchen-sink-shadcn/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-kitchen-sink-shadcn\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"start\": \"vite\",\n    \"lint\": \"eslint ./src\",\n    \"test:types\": \"tsc\",\n    \"shadcn\": \"pnpm dlx shadcn@latest\"\n  },\n  \"dependencies\": {\n    \"@dnd-kit/core\": \"^6.3.1\",\n    \"@dnd-kit/modifiers\": \"^9.0.0\",\n    \"@dnd-kit/sortable\": \"^10.0.0\",\n    \"@dnd-kit/utilities\": \"^3.2.2\",\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"@radix-ui/react-checkbox\": \"^1.3.3\",\n    \"@radix-ui/react-dialog\": \"^1.1.15\",\n    \"@radix-ui/react-dropdown-menu\": \"^2.1.16\",\n    \"@radix-ui/react-popover\": \"^1.1.15\",\n    \"@radix-ui/react-progress\": \"^1.1.8\",\n    \"@radix-ui/react-select\": \"^2.2.6\",\n    \"@radix-ui/react-slot\": \"^1.2.4\",\n    \"@radix-ui/react-tooltip\": \"^1.2.8\",\n    \"@tailwindcss/vite\": \"^4.1.18\",\n    \"@tanstack/react-table\": \"^9.0.0-alpha.19\",\n    \"class-variance-authority\": \"^0.7.1\",\n    \"clsx\": \"^2.1.1\",\n    \"cmdk\": \"1.1.1\",\n    \"date-fns\": \"^4.1.0\",\n    \"lucide-react\": \"^0.563.0\",\n    \"react\": \"^19.2.4\",\n    \"react-day-picker\": \"9.13.0\",\n    \"react-dom\": \"^19.2.4\",\n    \"tailwind-merge\": \"^3.4.0\",\n    \"tailwindcss-animate\": \"^1.0.7\"\n  },\n  \"devDependencies\": {\n    \"@rollup/plugin-replace\": \"^6.0.3\",\n    \"@types/react\": \"^19.2.10\",\n    \"@types/react-dom\": \"^19.2.3\",\n    \"@vitejs/plugin-react\": \"^5.1.2\",\n    \"tailwindcss\": \"^4.1.18\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\"\n  }\n}\n"
  },
  {
    "path": "examples/react/kitchen-sink-shadcn/src/components/data-table/data-table-filter-list.tsx",
    "content": "'use client'\n\nimport * as React from 'react'\nimport { format } from 'date-fns'\nimport {\n  CalendarIcon,\n  Check,\n  ChevronsUpDown,\n  ListFilter,\n  Trash2,\n} from 'lucide-react'\nimport type {\n  ExtendedColumnFilter,\n  FilterOperator,\n  JoinOperator,\n  TableFilterFeatures,\n} from '@/types'\nimport type {\n  Column,\n  ColumnMeta,\n  RowData,\n  Table,\n  TableFeatures,\n} from '@tanstack/react-table'\n\nimport { Badge } from '@/components/ui/badge'\nimport { Button } from '@/components/ui/button'\nimport { Input } from '@/components/ui/input'\nimport {\n  Popover,\n  PopoverContent,\n  PopoverTrigger,\n} from '@/components/ui/popover'\nimport {\n  Select,\n  SelectContent,\n  SelectItem,\n  SelectTrigger,\n  SelectValue,\n} from '@/components/ui/select'\nimport { Calendar } from '@/components/ui/calendar'\nimport { getFilterOperators } from '@/lib/data-table'\nimport { cn } from '@/lib/utils'\nimport {\n  Faceted,\n  FacetedBadgeList,\n  FacetedContent,\n  FacetedEmpty,\n  FacetedGroup,\n  FacetedInput,\n  FacetedItem,\n  FacetedList,\n  FacetedTrigger,\n} from '@/components/ui/faceted'\nimport {\n  Command,\n  CommandEmpty,\n  CommandGroup,\n  CommandInput,\n  CommandItem,\n  CommandList,\n} from '@/components/ui/command'\n\n// TODO: column.getFacetedUniqueValues() is broken rn, remove this once it's fixed\nfunction createManualFacetedValues<TData extends RowData>(\n  table: Table<TableFilterFeatures<TableFeatures>, TData>,\n  columnId: string,\n): Map<unknown, number> {\n  const facetedValues = new Map<unknown, number>()\n\n  const rows = table.getPreFilteredRowModel().flatRows\n\n  for (const row of rows) {\n    const value = row.getValue(columnId)\n    if (value !== undefined && value !== null) {\n      const count = facetedValues.get(value) ?? 0\n      facetedValues.set(value, count + 1)\n    }\n  }\n\n  return facetedValues\n}\n\nfunction getColumnOptions<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>({\n  column,\n  table,\n}: {\n  column: Column<TableFilterFeatures<TFeatures>, TData>\n  table: Table<TableFilterFeatures<TFeatures>, TData>\n}): Array<{ label: string; value: string; count?: number }> {\n  const customOptions = column.columnDef.meta?.options\n\n  if (customOptions) return customOptions\n\n  let uniqueValues: Map<unknown, number>\n  try {\n    uniqueValues = column.getFacetedUniqueValues()\n\n    if (!(uniqueValues instanceof Map)) {\n      uniqueValues = createManualFacetedValues(table, column.id)\n    }\n  } catch (_err) {\n    uniqueValues = createManualFacetedValues(table, column.id)\n  }\n\n  return Array.from(uniqueValues.entries()).map(([value, count]) => ({\n    label: String(value),\n    value: String(value),\n    count,\n  }))\n}\n\ninterface DataTableFilterListProps<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  table: Table<TableFilterFeatures<TFeatures>, TData>\n  columnFilters: Array<ExtendedColumnFilter>\n  onColumnFiltersChange: (filters: Array<ExtendedColumnFilter>) => void\n}\n\nexport function DataTableFilterList<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>({\n  table,\n  columnFilters,\n  onColumnFiltersChange,\n}: DataTableFilterListProps<TFeatures, TData>) {\n  const id = React.useId()\n  const labelId = React.useId()\n  const descriptionId = React.useId()\n  const listId = React.useId()\n  const [open, setOpen] = React.useState(false)\n\n  const filterableColumns = React.useMemo(\n    () => table.getAllColumns().filter((column) => column.getCanFilter()),\n    [table],\n  )\n\n  const getColumnFilterVariant = React.useCallback(\n    (\n      column: Column<TableFilterFeatures<TFeatures>, TData>,\n    ): ColumnMeta<TFeatures, TData>['variant'] => {\n      if (column.columnDef.meta?.variant) {\n        return column.columnDef.meta.variant\n      }\n\n      const firstValue = table\n        .getPreFilteredRowModel()\n        .flatRows[0]?.getValue(column.id)\n\n      if (Array.isArray(firstValue)) return 'multi-select'\n      if (typeof firstValue === 'number') return 'number'\n      if (firstValue instanceof Date) return 'date'\n      if (column.columnDef.meta?.variant === 'select') return 'select'\n\n      return 'text'\n    },\n    [table],\n  )\n\n  const onFilterAddImpl = React.useCallback(\n    (columnId: string): ExtendedColumnFilter | null => {\n      const column = filterableColumns.find((col) => col.id === columnId)\n      if (!column) return null\n\n      const filterVariant = getColumnFilterVariant(column)\n      const operators = getFilterOperators(filterVariant ?? 'text')\n      const defaultOperator = operators[0].value\n\n      return {\n        id: columnId,\n        value: filterVariant === 'multi-select' ? [] : '',\n        operator: defaultOperator,\n        filterId: crypto.randomUUID(),\n        joinOperator: 'and',\n      }\n    },\n    [filterableColumns, getColumnFilterVariant],\n  )\n\n  const onFilterAdd = React.useCallback(() => {\n    const firstFilterableColumn = filterableColumns[0]\n\n    const newFilter = onFilterAddImpl(firstFilterableColumn.id)\n    if (newFilter) {\n      onColumnFiltersChange([...columnFilters, newFilter])\n    }\n  }, [columnFilters, onFilterAddImpl, filterableColumns, onColumnFiltersChange])\n\n  const onFilterUpdate = React.useCallback(\n    (\n      filterId: string,\n      updates: Partial<Omit<ExtendedColumnFilter, 'filterId'>>,\n    ) => {\n      const newFilters = columnFilters.map((filter) => {\n        if (filter.filterId === filterId) {\n          if (updates.id) {\n            const newColumn = filterableColumns.find(\n              (col) => col.id === updates.id,\n            )\n            if (newColumn) {\n              const filterVariant = getColumnFilterVariant(newColumn)\n              const operators = getFilterOperators(filterVariant ?? 'text')\n              const defaultOperator = operators[0].value\n              return {\n                ...filter,\n                ...updates,\n                operator: defaultOperator,\n                value: filterVariant === 'multi-select' ? [] : '',\n              }\n            }\n          }\n\n          if (updates.operator && filter.value) {\n            const column = filterableColumns.find((col) => col.id === filter.id)\n            if (column && getColumnFilterVariant(column) === 'date') {\n              const currentValue = filter.value\n              if (\n                updates.operator === 'inRange' &&\n                !Array.isArray(currentValue)\n              ) {\n                return {\n                  ...filter,\n                  ...updates,\n                  value: [currentValue, undefined],\n                }\n              } else if (\n                updates.operator !== 'inRange' &&\n                Array.isArray(currentValue)\n              ) {\n                return {\n                  ...filter,\n                  ...updates,\n                  value: currentValue[0] ?? '',\n                }\n              }\n            }\n          }\n\n          return { ...filter, ...updates }\n        }\n        return filter\n      })\n      onColumnFiltersChange(newFilters)\n    },\n    [\n      columnFilters,\n      filterableColumns,\n      getColumnFilterVariant,\n      getFilterOperators,\n      onColumnFiltersChange,\n    ],\n  )\n\n  const onFilterRemove = React.useCallback(\n    (filterId: string) => {\n      const newFilters = columnFilters.filter((filter) => {\n        return filter.filterId !== filterId\n      })\n      onColumnFiltersChange(newFilters)\n    },\n    [columnFilters, onColumnFiltersChange],\n  )\n\n  const onFilterInputRender = React.useCallback(\n    ({\n      column,\n      operator,\n      filterId,\n      inputId,\n    }: {\n      column: Column<TableFilterFeatures<TFeatures>, TData>\n      operator: FilterOperator\n      filterId: string\n      inputId: string\n    }) => {\n      const filterVariant = getColumnFilterVariant(column) ?? 'text'\n      const currentFilter = columnFilters.find(\n        (filter) => filter.filterId === filterId,\n      )\n      const columnLabel = column.columnDef.meta?.label ?? column.id\n\n      switch (filterVariant) {\n        case 'date':\n          if (operator === 'inRange') {\n            const currentValue = Array.isArray(currentFilter?.value)\n              ? currentFilter.value\n              : [currentFilter?.value, undefined]\n\n            const dateRange =\n              currentValue[0] || currentValue[1]\n                ? {\n                    from: currentValue[0]\n                      ? new Date(currentValue[0])\n                      : undefined,\n                    to: currentValue[1] ? new Date(currentValue[1]) : undefined,\n                  }\n                : undefined\n\n            return (\n              <div className=\"flex items-center gap-2\">\n                <Popover>\n                  <PopoverTrigger asChild>\n                    <Button\n                      id={inputId}\n                      aria-controls={`${inputId}-calendar`}\n                      aria-label={`${columnLabel} date range filter`}\n                      variant=\"outline\"\n                      size=\"sm\"\n                      className={cn(\n                        'w-full justify-start text-left font-normal [&>svg]:size-3.5',\n                        !dateRange && 'text-muted-foreground',\n                      )}\n                      onPointerDown={(event) => {\n                        const target = event.target\n                        if (!(target instanceof HTMLElement)) return\n                        if (target.hasPointerCapture(event.pointerId)) {\n                          target.releasePointerCapture(event.pointerId)\n                        }\n\n                        if (\n                          event.button === 0 &&\n                          event.ctrlKey === false &&\n                          event.pointerType === 'mouse'\n                        ) {\n                          event.preventDefault()\n                        }\n                      }}\n                    >\n                      <CalendarIcon />\n                      {dateRange?.from ? (\n                        dateRange.to ? (\n                          <>\n                            {format(dateRange.from, 'LLL dd, y')} -{' '}\n                            {format(dateRange.to, 'LLL dd, y')}\n                          </>\n                        ) : (\n                          format(dateRange.from, 'LLL dd, y')\n                        )\n                      ) : (\n                        <span>Select date range</span>\n                      )}\n                    </Button>\n                  </PopoverTrigger>\n                  <PopoverContent\n                    id={`${inputId}-calendar`}\n                    className=\"w-auto p-0\"\n                    align=\"start\"\n                    onCloseAutoFocus={() => {\n                      document.getElementById(inputId)?.focus({\n                        preventScroll: true,\n                      })\n                    }}\n                  >\n                    <Calendar\n                      mode=\"range\"\n                      aria-label={`Select ${columnLabel} date range`}\n                      selected={dateRange}\n                      defaultMonth={dateRange?.from}\n                      onSelect={(date) => {\n                        if (filterId) {\n                          onFilterUpdate(filterId, {\n                            value: [\n                              date?.from ? date.from.toISOString() : undefined,\n                              date?.to ? date.to.toISOString() : undefined,\n                            ],\n                            operator,\n                          })\n                        }\n                      }}\n                      numberOfMonths={2}\n                      initialFocus\n                    />\n                  </PopoverContent>\n                </Popover>\n              </div>\n            )\n          }\n\n          const selectedDate = currentFilter?.value\n            ? new Date(currentFilter.value as string)\n            : undefined\n\n          return (\n            <Popover>\n              <PopoverTrigger asChild>\n                <Button\n                  id={inputId}\n                  aria-controls={`${inputId}-calendar`}\n                  aria-label={`${columnLabel} date filter`}\n                  variant=\"outline\"\n                  size=\"sm\"\n                  className={cn(\n                    'w-full justify-start text-left font-normal [&>svg]:size-3.5',\n                    !currentFilter?.value && 'text-muted-foreground',\n                  )}\n                  onPointerDown={(event) => {\n                    const target = event.target\n                    if (!(target instanceof HTMLElement)) return\n                    if (target.hasPointerCapture(event.pointerId)) {\n                      target.releasePointerCapture(event.pointerId)\n                    }\n\n                    if (\n                      event.button === 0 &&\n                      event.ctrlKey === false &&\n                      event.pointerType === 'mouse'\n                    ) {\n                      event.preventDefault()\n                    }\n                  }}\n                >\n                  <CalendarIcon />\n                  {currentFilter?.value ? (\n                    format(new Date(currentFilter.value as string), 'PP')\n                  ) : (\n                    <span className=\"text-muted-foreground\">Pick a date</span>\n                  )}\n                </Button>\n              </PopoverTrigger>\n              <PopoverContent\n                id={`${inputId}-calendar`}\n                className=\"w-auto p-0\"\n                align=\"start\"\n                onCloseAutoFocus={() => {\n                  document.getElementById(inputId)?.focus({\n                    preventScroll: true,\n                  })\n                }}\n              >\n                <Calendar\n                  mode=\"single\"\n                  aria-label={`Select ${columnLabel} date`}\n                  selected={selectedDate}\n                  defaultMonth={selectedDate}\n                  onSelect={(date) => {\n                    if (filterId) {\n                      onFilterUpdate(filterId, {\n                        value: date ? date.toISOString() : undefined,\n                        operator,\n                      })\n                    }\n                  }}\n                  initialFocus\n                />\n              </PopoverContent>\n            </Popover>\n          )\n        case 'number':\n          if (operator === 'inRange') {\n            const currentValue = Array.isArray(currentFilter?.value)\n              ? currentFilter.value\n              : [currentFilter?.value, undefined]\n\n            return (\n              <div className=\"flex items-center gap-2\">\n                <Input\n                  id={`${inputId}-min`}\n                  type=\"number\"\n                  aria-label={`${columnLabel} minimum value`}\n                  value={currentValue[0] ?? ''}\n                  placeholder=\"Min\"\n                  className=\"h-8\"\n                  onChange={(event) => {\n                    if (filterId) {\n                      onFilterUpdate(filterId, {\n                        value: [\n                          event.target.value === ''\n                            ? undefined\n                            : Number(event.target.value),\n                          currentValue[1] ?? undefined,\n                        ],\n                        operator,\n                      })\n                    }\n                  }}\n                />\n                <Input\n                  id={`${inputId}-max`}\n                  type=\"number\"\n                  aria-label={`${columnLabel} maximum value`}\n                  value={currentValue[1] ?? ''}\n                  placeholder=\"Max\"\n                  className=\"h-8\"\n                  onChange={(event) => {\n                    if (filterId) {\n                      onFilterUpdate(filterId, {\n                        value: [\n                          currentValue[0] ?? undefined,\n                          event.target.value === ''\n                            ? undefined\n                            : Number(event.target.value),\n                        ],\n                        operator,\n                      })\n                    }\n                  }}\n                />\n              </div>\n            )\n          }\n\n          return (\n            <Input\n              id={inputId}\n              type=\"number\"\n              aria-label={`${columnLabel} filter value`}\n              value={(currentFilter?.value ?? '') as string}\n              placeholder={`Enter number...`}\n              className=\"h-8\"\n              onChange={(event) => {\n                if (filterId) {\n                  onFilterUpdate(filterId, {\n                    value:\n                      event.target.value === ''\n                        ? ''\n                        : Number(event.target.value),\n                    operator,\n                  })\n                }\n              }}\n            />\n          )\n        case 'select':\n          const selectOptions = getColumnOptions({ column, table })\n\n          return (\n            <Faceted\n              value={\n                typeof currentFilter?.value === 'string'\n                  ? currentFilter.value\n                  : undefined\n              }\n              onValueChange={(value) => {\n                if (filterId) {\n                  onFilterUpdate(filterId, { value })\n                }\n              }}\n            >\n              <FacetedTrigger asChild>\n                <Button\n                  id={inputId}\n                  aria-controls={`${inputId}-listbox`}\n                  aria-label={`${columnLabel} filter value`}\n                  variant=\"outline\"\n                  size=\"sm\"\n                  className=\"h-8 w-full justify-start text-left font-normal\"\n                >\n                  <FacetedBadgeList\n                    options={selectOptions}\n                    placeholder={`Select ${column.columnDef.meta?.label ?? column.id}...`}\n                  />\n                </Button>\n              </FacetedTrigger>\n              <FacetedContent id={`${inputId}-listbox`}>\n                <FacetedInput\n                  aria-label={`Search ${columnLabel} options`}\n                  placeholder={`Search ${column.columnDef.meta?.label ?? column.id}...`}\n                />\n                <FacetedList>\n                  <FacetedEmpty>No options found.</FacetedEmpty>\n                  <FacetedGroup>\n                    {selectOptions.map((option) => (\n                      <FacetedItem key={option.value} value={option.value}>\n                        <span>{option.label}</span>\n                        {option.count && (\n                          <span className=\"ml-auto flex size-4 items-center justify-center font-mono text-xs\">\n                            {option.count}\n                          </span>\n                        )}\n                      </FacetedItem>\n                    ))}\n                  </FacetedGroup>\n                </FacetedList>\n              </FacetedContent>\n            </Faceted>\n          )\n\n        case 'multi-select':\n          const multiSelectOptions = getColumnOptions({ column, table })\n          const selectedValues = Array.isArray(currentFilter?.value)\n            ? currentFilter.value\n            : []\n\n          return (\n            <Faceted\n              multiple\n              value={selectedValues}\n              onValueChange={(value) => {\n                if (filterId) {\n                  onFilterUpdate(filterId, { value })\n                }\n              }}\n            >\n              <FacetedTrigger asChild>\n                <Button\n                  id={inputId}\n                  aria-controls={`${inputId}-listbox`}\n                  aria-label={`${columnLabel} filter values`}\n                  variant=\"outline\"\n                  size=\"sm\"\n                  className=\"h-8 w-full justify-start text-left font-normal\"\n                >\n                  <FacetedBadgeList\n                    options={multiSelectOptions}\n                    placeholder={`Select ${column.columnDef.meta?.label ?? column.id}...`}\n                  />\n                </Button>\n              </FacetedTrigger>\n              <FacetedContent id={`${inputId}-listbox`}>\n                <FacetedInput\n                  aria-label={`Search ${columnLabel} options`}\n                  placeholder={`Search ${column.columnDef.meta?.label ?? column.id}...`}\n                />\n                <FacetedList>\n                  <FacetedEmpty>No options found.</FacetedEmpty>\n                  <FacetedGroup>\n                    {multiSelectOptions.map((option) => (\n                      <FacetedItem key={option.value} value={option.value}>\n                        <span>{option.label}</span>\n                        {option.count && (\n                          <span className=\"ml-auto flex size-4 items-center justify-center font-mono text-xs\">\n                            {option.count}\n                          </span>\n                        )}\n                      </FacetedItem>\n                    ))}\n                  </FacetedGroup>\n                </FacetedList>\n              </FacetedContent>\n            </Faceted>\n          )\n\n        default:\n          if (operator === 'isEmpty' || operator === 'isNotEmpty') {\n            return (\n              <div\n                role=\"status\"\n                id={inputId}\n                aria-live=\"polite\"\n                aria-label={`${columnLabel} filter is ${\n                  operator === 'isEmpty' ? 'empty' : 'not empty'\n                }`}\n                className=\"h-8 w-full rounded-md border border-dashed\"\n              />\n            )\n          }\n\n          return (\n            <Input\n              id={inputId}\n              type=\"text\"\n              aria-label={`${columnLabel} filter value`}\n              value={(currentFilter?.value ?? '') as string}\n              placeholder={`Search ${\n                column.columnDef.meta?.label ?? column.id\n              }...`}\n              className=\"h-8\"\n              onChange={(event) => {\n                if (filterId) {\n                  onFilterUpdate(filterId, {\n                    value: event.target.value,\n                    operator,\n                  })\n                }\n              }}\n            />\n          )\n      }\n    },\n    [getColumnFilterVariant, columnFilters, onFilterUpdate],\n  )\n\n  const onFilterRender = React.useCallback(\n    ({ filter, index }: { filter: ExtendedColumnFilter; index: number }) => {\n      const column = table.getColumn(filter.id)\n      if (!column || !filter.filterId) return null\n\n      const filterVariant = getColumnFilterVariant(column) ?? 'text'\n      const operators = getFilterOperators(filterVariant)\n      const filterItemId = `${id}-filter-${filter.filterId}`\n      const triggerId = `${filterItemId}-trigger`\n      const joinOperatorListboxId = `${filterItemId}-join-operator-listbox`\n      const fieldListboxId = `${filterItemId}-field-listbox`\n      const operatorListboxId = `${filterItemId}-operator-listbox`\n      const inputId = `${filterItemId}-input`\n\n      return (\n        <div\n          role=\"listitem\"\n          id={filterItemId}\n          className=\"grid items-center grid-cols-[70px_135px_125px_minmax(0,200px)_32px] gap-2\"\n        >\n          {index === 0 ? (\n            <span className=\"text-sm text-center text-muted-foreground\">\n              Where\n            </span>\n          ) : index === 1 ? (\n            <Select\n              value={filter.joinOperator}\n              onValueChange={(value: JoinOperator) => {\n                if (columnFilters.length > 0) {\n                  const updatedFilters = columnFilters.map((f) => ({\n                    ...f,\n                    joinOperator: value,\n                  }))\n                  onColumnFiltersChange(updatedFilters)\n                }\n              }}\n            >\n              <SelectTrigger\n                className=\"h-8\"\n                aria-label=\"Select join operator\"\n                aria-controls={joinOperatorListboxId}\n              >\n                <SelectValue placeholder=\"Join\" />\n              </SelectTrigger>\n              <SelectContent\n                id={joinOperatorListboxId}\n                className=\"min-w-[var(--radix-select-trigger-width)]\"\n              >\n                <SelectItem value=\"and\">and</SelectItem>\n                <SelectItem value=\"or\">or</SelectItem>\n              </SelectContent>\n            </Select>\n          ) : (\n            <span className=\"text-sm text-center text-muted-foreground\">\n              {filter.joinOperator}\n            </span>\n          )}\n          <Popover>\n            <PopoverTrigger asChild>\n              <Button\n                role=\"combobox\"\n                id={triggerId}\n                aria-controls={fieldListboxId}\n                aria-label={`Select filter field. Current: ${column.columnDef.meta?.label ?? column.id}`}\n                variant=\"outline\"\n                size=\"sm\"\n                className=\"h-8 justify-between font-normal focus:outline-none focus:ring-1 focus:ring-ring\"\n                onPointerDown={(event) => {\n                  const target = event.target\n                  if (!(target instanceof HTMLElement)) return\n                  if (target.hasPointerCapture(event.pointerId)) {\n                    target.releasePointerCapture(event.pointerId)\n                  }\n\n                  if (\n                    event.button === 0 &&\n                    event.ctrlKey === false &&\n                    event.pointerType === 'mouse'\n                  ) {\n                    event.preventDefault()\n                  }\n                }}\n              >\n                <span className=\"truncate\">\n                  {column.columnDef.meta?.label ?? column.id}\n                </span>\n                <ChevronsUpDown className=\"opacity-50\" />\n              </Button>\n            </PopoverTrigger>\n            <PopoverContent\n              id={fieldListboxId}\n              className=\"w-[var(--radix-popover-trigger-width)] p-0\"\n              onCloseAutoFocus={() =>\n                document\n                  .getElementById(triggerId)\n                  ?.focus({ preventScroll: true })\n              }\n            >\n              <Command>\n                <CommandInput\n                  placeholder=\"Search columns...\"\n                  aria-label=\"Search filterable columns\"\n                />\n                <CommandList>\n                  <CommandEmpty>No column found.</CommandEmpty>\n                  <CommandGroup>\n                    {filterableColumns.map((col) => (\n                      <CommandItem\n                        key={col.id}\n                        value={col.id}\n                        onSelect={(value) => {\n                          if (!filter.filterId) return\n                          onFilterUpdate(filter.filterId, { id: value })\n                        }}\n                      >\n                        <span className=\"truncate\">\n                          {col.columnDef.meta?.label ?? col.id}\n                        </span>\n                        <Check\n                          className={cn(\n                            'ml-auto size-4',\n                            col.id === filter.id ? 'opacity-100' : 'opacity-0',\n                          )}\n                          aria-hidden=\"true\"\n                        />\n                      </CommandItem>\n                    ))}\n                  </CommandGroup>\n                </CommandList>\n              </Command>\n            </PopoverContent>\n          </Popover>\n          <Select\n            value={filter.operator ?? 'contains'}\n            onValueChange={(value: FilterOperator) => {\n              if (!filter.filterId) return\n\n              onFilterUpdate(filter.filterId, {\n                operator: value,\n              })\n            }}\n          >\n            <SelectTrigger\n              className=\"h-8\"\n              aria-label=\"Select filter operator\"\n              aria-controls={operatorListboxId}\n            >\n              <SelectValue placeholder=\"Select operator\" />\n            </SelectTrigger>\n            <SelectContent id={operatorListboxId}>\n              {operators.map((op) => (\n                <SelectItem key={op.value} value={op.value}>\n                  {op.label}\n                </SelectItem>\n              ))}\n            </SelectContent>\n          </Select>\n          {onFilterInputRender({\n            column,\n            operator: filter.operator ?? 'includesString',\n            filterId: filter.filterId,\n            inputId,\n          })}\n          <Button\n            variant=\"outline\"\n            size=\"icon\"\n            className=\"size-8 [&_svg]:size-3.5\"\n            aria-label={`Remove ${column.columnDef.meta?.label ?? column.id} filter`}\n            onClick={() => {\n              if (!filter.filterId) return\n\n              onFilterRemove(filter.filterId)\n            }}\n          >\n            <Trash2 />\n          </Button>\n        </div>\n      )\n    },\n    [\n      table,\n      filterableColumns,\n      getColumnFilterVariant,\n      onFilterInputRender,\n      onFilterUpdate,\n      onFilterRemove,\n    ],\n  )\n\n  return (\n    <Popover open={open} onOpenChange={setOpen}>\n      <PopoverTrigger asChild>\n        <Button\n          variant=\"outline\"\n          size=\"sm\"\n          className=\"[&_svg]:size-3\"\n          onClick={(event) => event.currentTarget.focus()}\n          onPointerDown={(event) => {\n            const target = event.target\n            if (!(target instanceof HTMLElement)) return\n            if (target.hasPointerCapture(event.pointerId)) {\n              target.releasePointerCapture(event.pointerId)\n            }\n\n            if (\n              event.button === 0 &&\n              event.ctrlKey === false &&\n              event.pointerType === 'mouse'\n            ) {\n              event.preventDefault()\n            }\n          }}\n        >\n          <ListFilter />\n          Filter\n          {columnFilters.length > 0 && (\n            <Badge\n              variant=\"secondary\"\n              className=\"h-[1.14rem] rounded-[0.2rem] px-[0.32rem] font-mono font-normal text-[0.65rem]\"\n            >\n              {columnFilters.length}\n            </Badge>\n          )}\n        </Button>\n      </PopoverTrigger>\n      <PopoverContent\n        aria-describedby={descriptionId}\n        aria-labelledby={labelId}\n        align=\"start\"\n        collisionPadding={16}\n        className=\"flex flex-col gap-3 origin-[var(--radix-popover-content-transform-origin)] p-4 w-[calc(100vw-theme(spacing.12))] min-w-60 sm:min-w-80 sm:w-fit\"\n      >\n        <div className=\"flex flex-col gap-1\">\n          <h4 id={labelId} className=\"font-medium leading-none\">\n            Filters\n          </h4>\n          <p\n            id={descriptionId}\n            className={cn(\n              'text-sm text-muted-foreground',\n              columnFilters.length > 0 && 'sr-only',\n            )}\n          >\n            {columnFilters.length > 0\n              ? 'Modify filters to refine your results.'\n              : 'Add filters to refine your results.'}\n          </p>\n        </div>\n        {columnFilters.length > 0 && (\n          <div\n            role=\"list\"\n            id={listId}\n            className=\"flex max-h-[300px] flex-col gap-2 overflow-y-auto p-0.5\"\n          >\n            {columnFilters.map((filter, index) =>\n              onFilterRender({ filter, index }),\n            )}\n          </div>\n        )}\n        <div className=\"flex items-center gap-2\">\n          <Button size=\"sm\" onClick={onFilterAdd} aria-label=\"Add new filter\">\n            Add filter\n          </Button>\n          {columnFilters.length > 0 && (\n            <Button\n              aria-label=\"Reset all filters\"\n              variant=\"outline\"\n              size=\"sm\"\n              onClick={() => onColumnFiltersChange([])}\n            >\n              Reset filters\n            </Button>\n          )}\n        </div>\n      </PopoverContent>\n    </Popover>\n  )\n}\n"
  },
  {
    "path": "examples/react/kitchen-sink-shadcn/src/components/data-table/data-table-pagination.tsx",
    "content": "'use client'\n\nimport {\n  ChevronLeft,\n  ChevronRight,\n  ChevronsLeft,\n  ChevronsRight,\n} from 'lucide-react'\nimport type { RowData, Table, TableFeatures } from '@tanstack/react-table'\n\nimport { Button } from '@/components/ui/button'\nimport {\n  Select,\n  SelectContent,\n  SelectItem,\n  SelectTrigger,\n  SelectValue,\n} from '@/components/ui/select'\n\ninterface DataTablePaginationProps {\n  table: Table<Pick<TableFeatures, 'rowPaginationFeature'>, RowData>\n  pageSizeOptions?: Array<number>\n}\n\nexport function DataTablePagination({\n  table,\n  pageSizeOptions = [10, 20, 30, 40, 50],\n}: DataTablePaginationProps) {\n  return (\n    <div className=\"flex w-full flex-col-reverse items-center justify-between gap-4 overflow-auto p-1 sm:flex-row sm:gap-8\">\n      <div className=\"flex-1 whitespace-nowrap text-muted-foreground text-sm\">\n        {table.getFilteredSelectedRowModel().rows.length} of{' '}\n        {table.getFilteredRowModel().rows.length} row(s) selected.\n      </div>\n      <div className=\"flex flex-col-reverse items-center gap-4 sm:flex-row sm:gap-6 lg:gap-8\">\n        <div className=\"flex items-center space-x-2\">\n          <p className=\"whitespace-nowrap font-medium text-sm\">Rows per page</p>\n          <Select\n            value={`${table.store.state.pagination.pageSize}`}\n            onValueChange={(value) => {\n              table.setPageSize(Number(value))\n            }}\n          >\n            <SelectTrigger className=\"h-8 w-[4.5rem]\">\n              <SelectValue\n                placeholder={table.store.state.pagination.pageSize}\n              />\n            </SelectTrigger>\n            <SelectContent side=\"top\">\n              {pageSizeOptions.map((pageSize) => (\n                <SelectItem key={pageSize} value={`${pageSize}`}>\n                  {pageSize}\n                </SelectItem>\n              ))}\n            </SelectContent>\n          </Select>\n        </div>\n        <div className=\"flex items-center justify-center font-medium text-sm\">\n          Page {table.store.state.pagination.pageIndex + 1} of{' '}\n          {table.getPageCount()}\n        </div>\n        <div className=\"flex items-center space-x-2\">\n          <Button\n            aria-label=\"Go to first page\"\n            variant=\"outline\"\n            className=\"hidden size-8 p-0 lg:flex\"\n            onClick={() => table.setPageIndex(0)}\n            disabled={!table.getCanPreviousPage()}\n          >\n            <ChevronsLeft className=\"size-4\" aria-hidden=\"true\" />\n          </Button>\n          <Button\n            aria-label=\"Go to previous page\"\n            variant=\"outline\"\n            size=\"icon\"\n            className=\"size-8\"\n            onClick={() => table.previousPage()}\n            disabled={!table.getCanPreviousPage()}\n          >\n            <ChevronLeft className=\"size-4\" aria-hidden=\"true\" />\n          </Button>\n          <Button\n            aria-label=\"Go to next page\"\n            variant=\"outline\"\n            size=\"icon\"\n            className=\"size-8\"\n            onClick={() => table.nextPage()}\n            disabled={!table.getCanNextPage()}\n          >\n            <ChevronRight className=\"size-4\" aria-hidden=\"true\" />\n          </Button>\n          <Button\n            aria-label=\"Go to last page\"\n            variant=\"outline\"\n            size=\"icon\"\n            className=\"hidden size-8 lg:flex\"\n            onClick={() => table.setPageIndex(table.getPageCount() - 1)}\n            disabled={!table.getCanNextPage()}\n          >\n            <ChevronsRight className=\"size-4\" aria-hidden=\"true\" />\n          </Button>\n        </div>\n      </div>\n    </div>\n  )\n}\n"
  },
  {
    "path": "examples/react/kitchen-sink-shadcn/src/components/data-table/data-table-sort-list.tsx",
    "content": "'use client'\n\nimport * as React from 'react'\nimport {\n  ArrowDownUp,\n  Check,\n  ChevronsUpDown,\n  GripVertical,\n  Trash2,\n} from 'lucide-react'\nimport type {\n  ColumnSort,\n  RowData,\n  SortDirection,\n  SortingState,\n  Table,\n  TableFeatures,\n} from '@tanstack/react-table'\n\nimport { Badge } from '@/components/ui/badge'\nimport { Button } from '@/components/ui/button'\nimport {\n  Command,\n  CommandEmpty,\n  CommandGroup,\n  CommandInput,\n  CommandItem,\n  CommandList,\n} from '@/components/ui/command'\nimport {\n  Popover,\n  PopoverContent,\n  PopoverTrigger,\n} from '@/components/ui/popover'\nimport {\n  Select,\n  SelectContent,\n  SelectItem,\n  SelectTrigger,\n  SelectValue,\n} from '@/components/ui/select'\nimport {\n  Sortable,\n  SortableContent,\n  SortableItem,\n  SortableItemHandle,\n  SortableOverlay,\n} from '@/components/ui/sortable'\nimport { cn } from '@/lib/utils'\n\ninterface DataTableSortListProps<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  table: Table<Pick<TFeatures, 'rowSortingFeature'>, TData>\n  sorting: SortingState\n  onSortingChange: (sorting: SortingState) => void\n}\n\nexport function DataTableSortList<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>({\n  table,\n  sorting,\n  onSortingChange,\n}: DataTableSortListProps<TFeatures, TData>) {\n  const labelId = React.useId()\n  const descriptionId = React.useId()\n  const listId = React.useId()\n  const [open, setOpen] = React.useState(false)\n\n  const sortableColumns = React.useMemo(\n    () => table.getAllColumns().filter((column) => column.getCanSort()),\n    [table],\n  )\n\n  const onColumnSelect = React.useCallback(\n    (currentSortId: string, newColumnId: string) => {\n      const newSorting = sorting.map((s) =>\n        s.id === currentSortId ? { ...s, id: newColumnId } : s,\n      )\n      table.setSorting(newSorting)\n    },\n    [sorting, table],\n  )\n\n  const onSortAdd = React.useCallback(() => {\n    const firstAvailableColumn = sortableColumns.find(\n      (col) => !sorting.some((s) => s.id === col.id),\n    )\n    if (firstAvailableColumn) {\n      table.setSorting([\n        ...sorting,\n        { id: firstAvailableColumn.id, desc: false },\n      ])\n    }\n  }, [sorting, sortableColumns, table])\n\n  const onSortUpdate = React.useCallback(\n    (sortId: string, updates: Partial<Omit<ColumnSort, 'id'>>) => {\n      const newSorting = sorting.map((s) =>\n        s.id === sortId ? { ...s, ...updates } : s,\n      )\n      table.setSorting(newSorting)\n    },\n    [sorting, table],\n  )\n\n  const onSortRemove = React.useCallback(\n    (sortId: string) => {\n      const newSorting = sorting.filter((s) => s.id !== sortId)\n      table.setSorting(newSorting)\n    },\n    [sorting, table],\n  )\n\n  return (\n    <Sortable\n      value={sorting}\n      onValueChange={onSortingChange}\n      getItemValue={(item) => item.id}\n    >\n      <Popover open={open} onOpenChange={setOpen}>\n        <PopoverTrigger asChild>\n          <Button\n            variant=\"outline\"\n            size=\"sm\"\n            className=\"[&_svg]:size-3\"\n            onClick={(event) => event.currentTarget.focus()}\n            onPointerDown={(event) => {\n              const target = event.target\n              if (!(target instanceof HTMLElement)) return\n              if (target.hasPointerCapture(event.pointerId)) {\n                target.releasePointerCapture(event.pointerId)\n              }\n\n              if (\n                event.button === 0 &&\n                event.ctrlKey === false &&\n                event.pointerType === 'mouse'\n              ) {\n                event.preventDefault()\n              }\n            }}\n          >\n            <ArrowDownUp />\n            Sort\n            {sorting.length > 0 && (\n              <Badge\n                variant=\"secondary\"\n                className=\"h-[1.14rem] rounded-[0.2rem] px-[0.32rem] font-mono font-normal text-[0.65rem]\"\n              >\n                {sorting.length}\n              </Badge>\n            )}\n          </Button>\n        </PopoverTrigger>\n        <PopoverContent\n          aria-labelledby={labelId}\n          aria-describedby={descriptionId}\n          align=\"start\"\n          collisionPadding={16}\n          className=\"w-[calc(100vw-theme(spacing.20))] origin-[var(--radix-popover-content-transform-origin)] flex flex-col gap-3 min-w-72 max-w-[25rem] p-4 sm:w-[25rem]\"\n        >\n          <div className=\"flex flex-col gap-1\">\n            <h4 id={labelId} className=\"font-medium leading-none\">\n              {sorting.length > 0 ? 'Sort by' : 'No sorting applied'}\n            </h4>\n            <p\n              id={descriptionId}\n              className={cn(\n                'text-muted-foreground text-sm',\n                sorting.length > 0 && 'sr-only',\n              )}\n            >\n              {sorting.length > 0\n                ? 'Modify sorting to organize your results.'\n                : 'Add sorting to organize your results.'}\n            </p>\n          </div>\n          {sorting.length > 0 ? (\n            <SortableContent asChild>\n              <div\n                role=\"list\"\n                id={listId}\n                aria-labelledby={labelId}\n                aria-describedby={descriptionId}\n                className=\"flex max-h-[300px] flex-col gap-2 overflow-y-auto p-0.5\"\n              >\n                {sorting.map((sort, index) => {\n                  const columnTitle =\n                    sortableColumns.find((col) => col.id === sort.id)?.columnDef\n                      .meta?.label ?? sort.id\n                  const sortItemId = `${listId}-item-${sort.id}`\n                  const triggerId = `${listId}-${index}-trigger`\n                  const fieldListboxId = `${sortItemId}-field-listbox`\n                  const operatorListboxId = `${sortItemId}-operator-listbox`\n\n                  return (\n                    <SortableItem key={sort.id} value={sort.id} asChild>\n                      <div\n                        role=\"listitem\"\n                        id={sortItemId}\n                        tabIndex={-1}\n                        className=\"grid items-center grid-cols-[175px_100px_32px_32px] gap-2\"\n                      >\n                        <Popover>\n                          <PopoverTrigger asChild>\n                            <Button\n                              role=\"combobox\"\n                              id={triggerId}\n                              aria-controls={fieldListboxId}\n                              aria-label={`Select column to sort by. Current: ${columnTitle}`}\n                              variant=\"outline\"\n                              size=\"sm\"\n                              className=\"h-8 font-normal justify-between gap-2 focus:outline-none focus:ring-1 focus:ring-ring\"\n                              onPointerDown={(event) => {\n                                const target = event.target\n                                if (!(target instanceof HTMLElement)) return\n                                if (target.hasPointerCapture(event.pointerId)) {\n                                  target.releasePointerCapture(event.pointerId)\n                                }\n\n                                if (\n                                  event.button === 0 &&\n                                  event.ctrlKey === false &&\n                                  event.pointerType === 'mouse'\n                                ) {\n                                  event.preventDefault()\n                                }\n                              }}\n                            >\n                              <span className=\"truncate\">{columnTitle}</span>\n                              <ChevronsUpDown className=\"opacity-50\" />\n                            </Button>\n                          </PopoverTrigger>\n                          <PopoverContent\n                            id={fieldListboxId}\n                            className=\"w-[var(--radix-popover-trigger-width)] p-0\"\n                            onCloseAutoFocus={() =>\n                              document\n                                .getElementById(triggerId)\n                                ?.focus({ preventScroll: true })\n                            }\n                          >\n                            <Command>\n                              <CommandInput\n                                placeholder=\"Search columns...\"\n                                aria-label=\"Search sortable columns\"\n                              />\n                              <CommandList>\n                                <CommandEmpty>No column found.</CommandEmpty>\n                                <CommandGroup>\n                                  {sortableColumns\n                                    .filter(\n                                      (column) =>\n                                        !sorting.some(\n                                          (s) =>\n                                            s.id === column.id &&\n                                            s.id !== sort.id,\n                                        ),\n                                    )\n                                    .map((column) => (\n                                      <CommandItem\n                                        key={column.id}\n                                        value={column.id}\n                                        onSelect={() =>\n                                          onColumnSelect(sort.id, column.id)\n                                        }\n                                      >\n                                        <span className=\"truncate\">\n                                          {column.columnDef.meta?.label ??\n                                            column.id}\n                                        </span>\n                                        <Check\n                                          className={cn(\n                                            'ml-auto size-4',\n                                            column.id === sort.id\n                                              ? 'opacity-100'\n                                              : 'opacity-0',\n                                          )}\n                                          aria-hidden=\"true\"\n                                        />\n                                      </CommandItem>\n                                    ))}\n                                </CommandGroup>\n                              </CommandList>\n                            </Command>\n                          </PopoverContent>\n                        </Popover>\n                        <Select\n                          value={sort.desc ? 'desc' : 'asc'}\n                          onValueChange={(value: SortDirection) =>\n                            onSortUpdate(sort.id, { desc: value === 'desc' })\n                          }\n                        >\n                          <SelectTrigger\n                            aria-controls={operatorListboxId}\n                            aria-label={`Sort direction for ${columnTitle}`}\n                            className=\"h-8\"\n                          >\n                            <SelectValue />\n                          </SelectTrigger>\n                          <SelectContent\n                            id={operatorListboxId}\n                            className=\"min-w-[var(--radix-select-trigger-width)]\"\n                          >\n                            <SelectItem value=\"asc\">Asc</SelectItem>\n                            <SelectItem value=\"desc\">Desc</SelectItem>\n                          </SelectContent>\n                        </Select>\n                        <Button\n                          aria-label={`Remove sort for ${columnTitle}`}\n                          variant=\"outline\"\n                          size=\"icon\"\n                          className=\"size-8 [&_svg]:size-3.5 shrink-0\"\n                          onClick={() => onSortRemove(sort.id)}\n                        >\n                          <Trash2 />\n                        </Button>\n                        <SortableItemHandle asChild>\n                          <Button\n                            aria-label={`Drag to reorder ${columnTitle} sort`}\n                            variant=\"outline\"\n                            size=\"icon\"\n                            className=\"size-8 [&_svg]:size-3.5 shrink-0\"\n                          >\n                            <GripVertical />\n                          </Button>\n                        </SortableItemHandle>\n                      </div>\n                    </SortableItem>\n                  )\n                })}\n              </div>\n            </SortableContent>\n          ) : null}\n          <div className=\"flex items-center gap-2\">\n            <Button\n              aria-label=\"Add new sort\"\n              size=\"sm\"\n              onClick={onSortAdd}\n              disabled={sorting.length >= sortableColumns.length}\n            >\n              Add sort\n            </Button>\n            {sorting.length > 0 && (\n              <Button\n                aria-label=\"Reset all sorting\"\n                size=\"sm\"\n                variant=\"outline\"\n                onClick={() => table.resetSorting()}\n              >\n                Reset\n              </Button>\n            )}\n          </div>\n        </PopoverContent>\n      </Popover>\n      <SortableOverlay>\n        <div className=\"grid grid-cols-[175px_100px_32px_32px] gap-2\">\n          <div className=\"h-8 rounded-md bg-primary/10\" />\n          <div className=\"h-8 rounded-md bg-primary/10\" />\n          <div className=\"h-8 shrink-0 rounded-md bg-primary/10\" />\n          <div className=\"h-8 shrink-0 rounded-md bg-primary/10\" />\n        </div>\n      </SortableOverlay>\n    </Sortable>\n  )\n}\n"
  },
  {
    "path": "examples/react/kitchen-sink-shadcn/src/components/data-table/data-table-view-options.tsx",
    "content": "'use client'\n\nimport * as React from 'react'\nimport { Check, ChevronsUpDown, GripVertical, Settings2 } from 'lucide-react'\nimport type {\n  ColumnOrderState,\n  RowData,\n  Table,\n  TableFeatures,\n} from '@tanstack/react-table'\n\nimport { Button } from '@/components/ui/button'\nimport {\n  Command,\n  CommandEmpty,\n  CommandGroup,\n  CommandInput,\n  CommandItem,\n  CommandList,\n  CommandSeparator,\n} from '@/components/ui/command'\nimport {\n  Popover,\n  PopoverContent,\n  PopoverTrigger,\n} from '@/components/ui/popover'\nimport { cn } from '@/lib/utils'\nimport {\n  Sortable,\n  SortableContent,\n  SortableItem,\n  SortableItemHandle,\n  SortableOverlay,\n} from '@/components/ui/sortable'\n\ninterface DataTableViewOptionsProps<\n  TFeatures extends TableFeatures,\n  TRowData extends RowData,\n> {\n  table: Table<Pick<TFeatures, 'columnVisibilityFeature'>, TRowData>\n  columnOrder: ColumnOrderState\n  onColumnOrderChange: (columnOrder: ColumnOrderState) => void\n}\n\nexport function DataTableViewOptions<\n  TFeatures extends TableFeatures,\n  TRowData extends RowData,\n>({\n  table,\n  columnOrder,\n  onColumnOrderChange,\n}: DataTableViewOptionsProps<TFeatures, TRowData>) {\n  const triggerRef = React.useRef<HTMLButtonElement>(null)\n\n  return (\n    <Sortable value={columnOrder} onValueChange={onColumnOrderChange}>\n      <Popover>\n        <PopoverTrigger asChild>\n          <Button\n            ref={triggerRef}\n            aria-label=\"Toggle columns\"\n            variant=\"outline\"\n            role=\"combobox\"\n            size=\"sm\"\n            className=\"ml-auto hidden h-8 gap-2 focus:outline-none focus:ring-1 focus:ring-ring lg:flex\"\n            onPointerDown={(event) => {\n              // prevent implicit pointer capture\n              // https://www.w3.org/TR/pointerevents3/#implicit-pointer-capture\n              const target = event.target\n              if (!(target instanceof HTMLElement)) return\n              if (target.hasPointerCapture(event.pointerId)) {\n                target.releasePointerCapture(event.pointerId)\n              }\n\n              if (\n                event.button === 0 &&\n                event.ctrlKey === false &&\n                event.pointerType === 'mouse'\n              ) {\n                // prevent trigger from stealing focus from the active item after opening.\n                event.preventDefault()\n              }\n            }}\n          >\n            <Settings2 />\n            View\n            <ChevronsUpDown className=\"ml-auto opacity-50\" />\n          </Button>\n        </PopoverTrigger>\n        <PopoverContent\n          align=\"end\"\n          className=\"w-full max-w-48 p-0\"\n          onCloseAutoFocus={() => triggerRef.current?.focus()}\n        >\n          <Command>\n            <CommandInput placeholder=\"Search columns...\" />\n            <SortableContent asChild>\n              <CommandList>\n                <CommandEmpty>No columns found.</CommandEmpty>\n                <CommandGroup>\n                  {table\n                    .getAllColumns()\n                    .sort((a, b) => {\n                      const aIndex = columnOrder.indexOf(a.id)\n                      const bIndex = columnOrder.indexOf(b.id)\n                      return aIndex - bIndex\n                    })\n                    .filter(\n                      (column) => typeof column.accessorFn !== 'undefined',\n                    )\n                    .map((column) => (\n                      <SortableItem key={column.id} value={column.id} asChild>\n                        <CommandItem\n                          aria-selected={column.getIsVisible()}\n                          data-selected={column.getIsVisible()}\n                          onSelect={() =>\n                            column.toggleVisibility(!column.getIsVisible())\n                          }\n                        >\n                          <Check\n                            className={cn(\n                              'size-4 shrink-0',\n                              column.getIsVisible()\n                                ? 'opacity-100'\n                                : 'opacity-0',\n                            )}\n                          />\n                          <span className=\"truncate\">\n                            {column.columnDef.meta?.label ?? column.id}\n                          </span>\n                          <SortableItemHandle asChild>\n                            <Button\n                              variant=\"ghost\"\n                              size=\"icon\"\n                              className=\"ml-auto size-6\"\n                            >\n                              <GripVertical />\n                            </Button>\n                          </SortableItemHandle>\n                        </CommandItem>\n                      </SortableItem>\n                    ))}\n                </CommandGroup>\n                <CommandSeparator />\n                <CommandGroup>\n                  <div className=\"flex items-center gap-1\">\n                    <CommandItem\n                      onSelect={() => table.toggleAllColumnsVisible(false)}\n                      className=\"w-full justify-center border\"\n                    >\n                      Hide All\n                    </CommandItem>\n                    <CommandItem\n                      onSelect={() => table.toggleAllColumnsVisible(true)}\n                      className=\"w-full justify-center border\"\n                    >\n                      Show All\n                    </CommandItem>\n                  </div>\n                </CommandGroup>\n              </CommandList>\n            </SortableContent>\n          </Command>\n        </PopoverContent>\n      </Popover>\n      <SortableOverlay>\n        <div className=\"bg-primary/10 size-full\" />\n      </SortableOverlay>\n    </Sortable>\n  )\n}\n"
  },
  {
    "path": "examples/react/kitchen-sink-shadcn/src/components/ui/badge.tsx",
    "content": "import * as React from 'react'\nimport { cva } from 'class-variance-authority'\nimport type { VariantProps } from 'class-variance-authority'\n\nimport { cn } from '@/lib/utils'\n\nconst badgeVariants = cva(\n  'inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2',\n  {\n    variants: {\n      variant: {\n        default:\n          'border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80',\n        secondary:\n          'border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80',\n        destructive:\n          'border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80',\n        outline: 'text-foreground',\n      },\n    },\n    defaultVariants: {\n      variant: 'default',\n    },\n  },\n)\n\nexport interface BadgeProps\n  extends\n    React.HTMLAttributes<HTMLDivElement>,\n    VariantProps<typeof badgeVariants> {}\n\nfunction Badge({ className, variant, ...props }: BadgeProps) {\n  return (\n    <div className={cn(badgeVariants({ variant }), className)} {...props} />\n  )\n}\n\nexport { Badge, badgeVariants }\n"
  },
  {
    "path": "examples/react/kitchen-sink-shadcn/src/components/ui/button.tsx",
    "content": "import * as React from 'react'\nimport { Slot } from '@radix-ui/react-slot'\nimport { cva } from 'class-variance-authority'\nimport type { VariantProps } from 'class-variance-authority'\n\nimport { cn } from '@/lib/utils'\n\nconst buttonVariants = cva(\n  'inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',\n  {\n    variants: {\n      variant: {\n        default:\n          'bg-primary text-primary-foreground shadow hover:bg-primary/90',\n        destructive:\n          'bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90',\n        outline:\n          'border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground',\n        secondary:\n          'bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80',\n        ghost: 'hover:bg-accent hover:text-accent-foreground',\n        link: 'text-primary underline-offset-4 hover:underline',\n      },\n      size: {\n        default: 'h-9 px-4 py-2',\n        sm: 'h-8 rounded-md px-3 text-xs',\n        lg: 'h-10 rounded-md px-8',\n        icon: 'h-9 w-9',\n      },\n    },\n    defaultVariants: {\n      variant: 'default',\n      size: 'default',\n    },\n  },\n)\n\nexport interface ButtonProps\n  extends\n    React.ButtonHTMLAttributes<HTMLButtonElement>,\n    VariantProps<typeof buttonVariants> {\n  asChild?: boolean\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n  ({ className, variant, size, asChild = false, ...props }, ref) => {\n    const Comp = asChild ? Slot : 'button'\n    return (\n      <Comp\n        className={cn(buttonVariants({ variant, size, className }))}\n        ref={ref}\n        {...props}\n      />\n    )\n  },\n)\nButton.displayName = 'Button'\n\nexport { Button, buttonVariants }\n"
  },
  {
    "path": "examples/react/kitchen-sink-shadcn/src/components/ui/calendar.tsx",
    "content": "'use client'\n\nimport * as React from 'react'\nimport { ChevronLeft, ChevronRight } from 'lucide-react'\nimport { DayPicker } from 'react-day-picker'\n\nimport { cn } from '@/lib/utils'\nimport { buttonVariants } from '@/components/ui/button'\n\nexport type CalendarProps = React.ComponentProps<typeof DayPicker>\n\nfunction Calendar({\n  className,\n  classNames,\n  showOutsideDays = true,\n  ...props\n}: CalendarProps) {\n  return (\n    <DayPicker\n      showOutsideDays={showOutsideDays}\n      className={cn('p-3', className)}\n      classNames={{\n        months: 'flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0',\n        month: 'space-y-4',\n        caption: 'flex justify-center pt-1 relative items-center',\n        caption_label: 'text-sm font-medium',\n        nav: 'space-x-1 flex items-center',\n        nav_button: cn(\n          buttonVariants({ variant: 'outline' }),\n          'h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100',\n        ),\n        nav_button_previous: 'absolute left-1',\n        nav_button_next: 'absolute right-1',\n        table: 'w-full border-collapse space-y-1',\n        head_row: 'flex',\n        head_cell:\n          'text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]',\n        row: 'flex w-full mt-2',\n        cell: cn(\n          'relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md',\n          props.mode === 'range'\n            ? '[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md'\n            : '[&:has([aria-selected])]:rounded-md',\n        ),\n        day: cn(\n          buttonVariants({ variant: 'ghost' }),\n          'h-8 w-8 p-0 font-normal aria-selected:opacity-100',\n        ),\n        day_range_start: 'day-range-start',\n        day_range_end: 'day-range-end',\n        day_selected:\n          'bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground',\n        day_today: 'bg-accent text-accent-foreground',\n        day_outside:\n          'day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground',\n        day_disabled: 'text-muted-foreground opacity-50',\n        day_range_middle:\n          'aria-selected:bg-accent aria-selected:text-accent-foreground',\n        day_hidden: 'invisible',\n        ...classNames,\n      }}\n      components={{\n        Chevron: ({ orientation, className, ...props }) => {\n          const Icon =\n            orientation === 'left' || orientation === 'right'\n              ? orientation === 'left'\n                ? ChevronLeft\n                : ChevronRight\n              : ChevronLeft\n          return <Icon className={cn('h-4 w-4', className)} {...props} />\n        },\n      }}\n      {...props}\n    />\n  )\n}\nCalendar.displayName = 'Calendar'\n\nexport { Calendar }\n"
  },
  {
    "path": "examples/react/kitchen-sink-shadcn/src/components/ui/checkbox.tsx",
    "content": "import * as React from 'react'\nimport * as CheckboxPrimitive from '@radix-ui/react-checkbox'\nimport { Check } from 'lucide-react'\n\nimport { cn } from '@/lib/utils'\n\nconst Checkbox = React.forwardRef<\n  React.ElementRef<typeof CheckboxPrimitive.Root>,\n  React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>\n>(({ className, ...props }, ref) => (\n  <CheckboxPrimitive.Root\n    ref={ref}\n    className={cn(\n      'peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground',\n      className,\n    )}\n    {...props}\n  >\n    <CheckboxPrimitive.Indicator\n      className={cn('flex items-center justify-center text-current')}\n    >\n      <Check className=\"h-4 w-4\" />\n    </CheckboxPrimitive.Indicator>\n  </CheckboxPrimitive.Root>\n))\nCheckbox.displayName = CheckboxPrimitive.Root.displayName\n\nexport { Checkbox }\n"
  },
  {
    "path": "examples/react/kitchen-sink-shadcn/src/components/ui/command.tsx",
    "content": "import * as React from 'react'\nimport { Command as CommandPrimitive } from 'cmdk'\nimport { Search } from 'lucide-react'\nimport type { DialogProps } from '@radix-ui/react-dialog'\n\nimport { cn } from '@/lib/utils'\nimport { Dialog, DialogContent } from '@/components/ui/dialog'\n\nconst Command = React.forwardRef<\n  React.ElementRef<typeof CommandPrimitive>,\n  React.ComponentPropsWithoutRef<typeof CommandPrimitive>\n>(({ className, ...props }, ref) => (\n  <CommandPrimitive\n    ref={ref}\n    className={cn(\n      'flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground',\n      className,\n    )}\n    {...props}\n  />\n))\nCommand.displayName = CommandPrimitive.displayName\n\nconst CommandDialog = ({ children, ...props }: DialogProps) => {\n  return (\n    <Dialog {...props}>\n      <DialogContent className=\"overflow-hidden p-0\">\n        <Command className=\"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5\">\n          {children}\n        </Command>\n      </DialogContent>\n    </Dialog>\n  )\n}\n\nconst CommandInput = React.forwardRef<\n  React.ElementRef<typeof CommandPrimitive.Input>,\n  React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>\n>(({ className, ...props }, ref) => (\n  <div className=\"flex items-center border-b px-3\" cmdk-input-wrapper=\"\">\n    <Search className=\"mr-2 h-4 w-4 shrink-0 opacity-50\" />\n    <CommandPrimitive.Input\n      ref={ref}\n      className={cn(\n        'flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50',\n        className,\n      )}\n      {...props}\n    />\n  </div>\n))\n\nCommandInput.displayName = CommandPrimitive.Input.displayName\n\nconst CommandList = React.forwardRef<\n  React.ElementRef<typeof CommandPrimitive.List>,\n  React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>\n>(({ className, ...props }, ref) => (\n  <CommandPrimitive.List\n    ref={ref}\n    className={cn('max-h-[300px] overflow-y-auto overflow-x-hidden', className)}\n    {...props}\n  />\n))\n\nCommandList.displayName = CommandPrimitive.List.displayName\n\nconst CommandEmpty = React.forwardRef<\n  React.ElementRef<typeof CommandPrimitive.Empty>,\n  React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>\n>((props, ref) => (\n  <CommandPrimitive.Empty\n    ref={ref}\n    className=\"py-6 text-center text-sm\"\n    {...props}\n  />\n))\n\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName\n\nconst CommandGroup = React.forwardRef<\n  React.ElementRef<typeof CommandPrimitive.Group>,\n  React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>\n>(({ className, ...props }, ref) => (\n  <CommandPrimitive.Group\n    ref={ref}\n    className={cn(\n      'overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground',\n      className,\n    )}\n    {...props}\n  />\n))\n\nCommandGroup.displayName = CommandPrimitive.Group.displayName\n\nconst CommandSeparator = React.forwardRef<\n  React.ElementRef<typeof CommandPrimitive.Separator>,\n  React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n  <CommandPrimitive.Separator\n    ref={ref}\n    className={cn('-mx-1 h-px bg-border', className)}\n    {...props}\n  />\n))\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName\n\nconst CommandItem = React.forwardRef<\n  React.ElementRef<typeof CommandPrimitive.Item>,\n  React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>\n>(({ className, ...props }, ref) => (\n  <CommandPrimitive.Item\n    ref={ref}\n    className={cn(\n      'relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',\n      className,\n    )}\n    {...props}\n  />\n))\n\nCommandItem.displayName = CommandPrimitive.Item.displayName\n\nconst CommandShortcut = ({\n  className,\n  ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n  return (\n    <span\n      className={cn(\n        'ml-auto text-xs tracking-widest text-muted-foreground',\n        className,\n      )}\n      {...props}\n    />\n  )\n}\nCommandShortcut.displayName = 'CommandShortcut'\n\nexport {\n  Command,\n  CommandDialog,\n  CommandInput,\n  CommandList,\n  CommandEmpty,\n  CommandGroup,\n  CommandItem,\n  CommandShortcut,\n  CommandSeparator,\n}\n"
  },
  {
    "path": "examples/react/kitchen-sink-shadcn/src/components/ui/dialog.tsx",
    "content": "'use client'\n\nimport * as React from 'react'\nimport * as DialogPrimitive from '@radix-ui/react-dialog'\nimport { X } from 'lucide-react'\n\nimport { cn } from '@/lib/utils'\n\nconst Dialog = DialogPrimitive.Root\n\nconst DialogTrigger = DialogPrimitive.Trigger\n\nconst DialogPortal = DialogPrimitive.Portal\n\nconst DialogClose = DialogPrimitive.Close\n\nconst DialogOverlay = React.forwardRef<\n  React.ElementRef<typeof DialogPrimitive.Overlay>,\n  React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n  <DialogPrimitive.Overlay\n    ref={ref}\n    className={cn(\n      'fixed inset-0 z-50 bg-black/80  data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',\n      className,\n    )}\n    {...props}\n  />\n))\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName\n\nconst DialogContent = React.forwardRef<\n  React.ElementRef<typeof DialogPrimitive.Content>,\n  React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n  <DialogPortal>\n    <DialogOverlay />\n    <DialogPrimitive.Content\n      ref={ref}\n      className={cn(\n        'fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg',\n        className,\n      )}\n      {...props}\n    >\n      {children}\n      <DialogPrimitive.Close className=\"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground\">\n        <X className=\"h-4 w-4\" />\n        <span className=\"sr-only\">Close</span>\n      </DialogPrimitive.Close>\n    </DialogPrimitive.Content>\n  </DialogPortal>\n))\nDialogContent.displayName = DialogPrimitive.Content.displayName\n\nconst DialogHeader = ({\n  className,\n  ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n  <div\n    className={cn(\n      'flex flex-col space-y-1.5 text-center sm:text-left',\n      className,\n    )}\n    {...props}\n  />\n)\nDialogHeader.displayName = 'DialogHeader'\n\nconst DialogFooter = ({\n  className,\n  ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n  <div\n    className={cn(\n      'flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2',\n      className,\n    )}\n    {...props}\n  />\n)\nDialogFooter.displayName = 'DialogFooter'\n\nconst DialogTitle = React.forwardRef<\n  React.ElementRef<typeof DialogPrimitive.Title>,\n  React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n  <DialogPrimitive.Title\n    ref={ref}\n    className={cn(\n      'text-lg font-semibold leading-none tracking-tight',\n      className,\n    )}\n    {...props}\n  />\n))\nDialogTitle.displayName = DialogPrimitive.Title.displayName\n\nconst DialogDescription = React.forwardRef<\n  React.ElementRef<typeof DialogPrimitive.Description>,\n  React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n  <DialogPrimitive.Description\n    ref={ref}\n    className={cn('text-sm text-muted-foreground', className)}\n    {...props}\n  />\n))\nDialogDescription.displayName = DialogPrimitive.Description.displayName\n\nexport {\n  Dialog,\n  DialogPortal,\n  DialogOverlay,\n  DialogTrigger,\n  DialogClose,\n  DialogContent,\n  DialogHeader,\n  DialogFooter,\n  DialogTitle,\n  DialogDescription,\n}\n"
  },
  {
    "path": "examples/react/kitchen-sink-shadcn/src/components/ui/dropdown-menu.tsx",
    "content": "'use client'\n\nimport * as React from 'react'\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu'\nimport { Check, ChevronRight, Circle } from 'lucide-react'\n\nimport { cn } from '@/lib/utils'\n\nconst DropdownMenu = DropdownMenuPrimitive.Root\n\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger\n\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group\n\nconst DropdownMenuPortal = DropdownMenuPrimitive.Portal\n\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub\n\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup\n\nconst DropdownMenuSubTrigger = React.forwardRef<\n  React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,\n  React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {\n    inset?: boolean\n  }\n>(({ className, inset, children, ...props }, ref) => (\n  <DropdownMenuPrimitive.SubTrigger\n    ref={ref}\n    className={cn(\n      'flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',\n      inset && 'pl-8',\n      className,\n    )}\n    {...props}\n  >\n    {children}\n    <ChevronRight className=\"ml-auto\" />\n  </DropdownMenuPrimitive.SubTrigger>\n))\nDropdownMenuSubTrigger.displayName =\n  DropdownMenuPrimitive.SubTrigger.displayName\n\nconst DropdownMenuSubContent = React.forwardRef<\n  React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,\n  React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n  <DropdownMenuPrimitive.SubContent\n    ref={ref}\n    className={cn(\n      'z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',\n      className,\n    )}\n    {...props}\n  />\n))\nDropdownMenuSubContent.displayName =\n  DropdownMenuPrimitive.SubContent.displayName\n\nconst DropdownMenuContent = React.forwardRef<\n  React.ElementRef<typeof DropdownMenuPrimitive.Content>,\n  React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n  <DropdownMenuPrimitive.Portal>\n    <DropdownMenuPrimitive.Content\n      ref={ref}\n      sideOffset={sideOffset}\n      className={cn(\n        'z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md',\n        'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',\n        className,\n      )}\n      {...props}\n    />\n  </DropdownMenuPrimitive.Portal>\n))\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName\n\nconst DropdownMenuItem = React.forwardRef<\n  React.ElementRef<typeof DropdownMenuPrimitive.Item>,\n  React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {\n    inset?: boolean\n  }\n>(({ className, inset, ...props }, ref) => (\n  <DropdownMenuPrimitive.Item\n    ref={ref}\n    className={cn(\n      'relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0',\n      inset && 'pl-8',\n      className,\n    )}\n    {...props}\n  />\n))\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName\n\nconst DropdownMenuCheckboxItem = React.forwardRef<\n  React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n  React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n  <DropdownMenuPrimitive.CheckboxItem\n    ref={ref}\n    className={cn(\n      'relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n      className,\n    )}\n    checked={checked}\n    {...props}\n  >\n    <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n      <DropdownMenuPrimitive.ItemIndicator>\n        <Check className=\"h-4 w-4\" />\n      </DropdownMenuPrimitive.ItemIndicator>\n    </span>\n    {children}\n  </DropdownMenuPrimitive.CheckboxItem>\n))\nDropdownMenuCheckboxItem.displayName =\n  DropdownMenuPrimitive.CheckboxItem.displayName\n\nconst DropdownMenuRadioItem = React.forwardRef<\n  React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,\n  React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n  <DropdownMenuPrimitive.RadioItem\n    ref={ref}\n    className={cn(\n      'relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n      className,\n    )}\n    {...props}\n  >\n    <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n      <DropdownMenuPrimitive.ItemIndicator>\n        <Circle className=\"h-2 w-2 fill-current\" />\n      </DropdownMenuPrimitive.ItemIndicator>\n    </span>\n    {children}\n  </DropdownMenuPrimitive.RadioItem>\n))\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName\n\nconst DropdownMenuLabel = React.forwardRef<\n  React.ElementRef<typeof DropdownMenuPrimitive.Label>,\n  React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {\n    inset?: boolean\n  }\n>(({ className, inset, ...props }, ref) => (\n  <DropdownMenuPrimitive.Label\n    ref={ref}\n    className={cn(\n      'px-2 py-1.5 text-sm font-semibold',\n      inset && 'pl-8',\n      className,\n    )}\n    {...props}\n  />\n))\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName\n\nconst DropdownMenuSeparator = React.forwardRef<\n  React.ElementRef<typeof DropdownMenuPrimitive.Separator>,\n  React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n  <DropdownMenuPrimitive.Separator\n    ref={ref}\n    className={cn('-mx-1 my-1 h-px bg-muted', className)}\n    {...props}\n  />\n))\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName\n\nconst DropdownMenuShortcut = ({\n  className,\n  ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n  return (\n    <span\n      className={cn('ml-auto text-xs tracking-widest opacity-60', className)}\n      {...props}\n    />\n  )\n}\nDropdownMenuShortcut.displayName = 'DropdownMenuShortcut'\n\nexport {\n  DropdownMenu,\n  DropdownMenuTrigger,\n  DropdownMenuContent,\n  DropdownMenuItem,\n  DropdownMenuCheckboxItem,\n  DropdownMenuRadioItem,\n  DropdownMenuLabel,\n  DropdownMenuSeparator,\n  DropdownMenuShortcut,\n  DropdownMenuGroup,\n  DropdownMenuPortal,\n  DropdownMenuSub,\n  DropdownMenuSubContent,\n  DropdownMenuSubTrigger,\n  DropdownMenuRadioGroup,\n}\n"
  },
  {
    "path": "examples/react/kitchen-sink-shadcn/src/components/ui/faceted.tsx",
    "content": "'use client'\n\nimport { Check, ChevronsUpDown } from 'lucide-react'\nimport * as React from 'react'\n\nimport { Badge } from '@/components/ui/badge'\nimport {\n  Command,\n  CommandEmpty,\n  CommandGroup,\n  CommandInput,\n  CommandItem,\n  CommandList,\n  CommandSeparator,\n} from '@/components/ui/command'\nimport {\n  Popover,\n  PopoverContent,\n  PopoverTrigger,\n} from '@/components/ui/popover'\nimport { composeEventHandlers, useComposedRefs } from '@/lib/composition'\nimport { cn } from '@/lib/utils'\n\nconst FACETED_NAME = 'Faceted'\nconst TRIGGER_NAME = 'FacetedTrigger'\nconst BADGE_LIST_NAME = 'FacetedBadgeList'\nconst CONTENT_NAME = 'FacetedContent'\nconst INPUT_NAME = 'FacetedInput'\nconst LIST_NAME = 'FacetedList'\nconst EMPTY_NAME = 'FacetedEmpty'\nconst GROUP_NAME = 'FacetedGroup'\nconst ITEM_NAME = 'FacetedItem'\nconst SEPARATOR_NAME = 'FacetedSeparator'\n\nconst ERRORS = {\n  [FACETED_NAME]: `\\`${FACETED_NAME}\\` must be used as root component`,\n  [TRIGGER_NAME]: `\\`${TRIGGER_NAME}\\` must be within \\`${FACETED_NAME}\\``,\n  [BADGE_LIST_NAME]: `\\`${BADGE_LIST_NAME}\\` must be within \\`${FACETED_NAME}\\``,\n  [CONTENT_NAME]: `\\`${CONTENT_NAME}\\` must be within \\`${FACETED_NAME}\\``,\n  [INPUT_NAME]: `\\`${INPUT_NAME}\\` must be within \\`${FACETED_NAME}\\``,\n  [LIST_NAME]: `\\`${LIST_NAME}\\` must be within \\`${FACETED_NAME}\\``,\n  [EMPTY_NAME]: `\\`${EMPTY_NAME}\\` must be within \\`${FACETED_NAME}\\``,\n  [GROUP_NAME]: `\\`${GROUP_NAME}\\` must be within \\`${FACETED_NAME}\\``,\n  [ITEM_NAME]: `\\`${ITEM_NAME}\\` must be within \\`${FACETED_NAME}\\``,\n  [SEPARATOR_NAME]: `\\`${SEPARATOR_NAME}\\` must be within \\`${FACETED_NAME}\\``,\n}\n\ntype FacetedValue<Multiple extends boolean> = Multiple extends true\n  ? Array<string>\n  : string\n\ninterface FacetedContextValue<Multiple extends boolean = boolean> {\n  triggerRef: React.RefObject<HTMLButtonElement | null>\n  value?: FacetedValue<Multiple>\n  onItemSelect?: (value: string) => void\n  multiple?: Multiple\n}\n\nconst FacetedContext = React.createContext<FacetedContextValue<boolean> | null>(\n  null,\n)\n\nfunction useFacetedContext(name: keyof typeof ERRORS) {\n  const context = React.useContext(FacetedContext)\n  if (!context) {\n    throw new Error(ERRORS[name])\n  }\n  return context\n}\n\ninterface FacetedProps<\n  Multiple extends boolean = false,\n> extends React.ComponentPropsWithoutRef<typeof Popover> {\n  value?: FacetedValue<Multiple>\n  onValueChange?: (value: FacetedValue<Multiple> | undefined) => void\n  children?: React.ReactNode\n  multiple?: Multiple\n}\n\nfunction Faceted<Multiple extends boolean = false>(\n  props: FacetedProps<Multiple>,\n) {\n  const {\n    value,\n    onValueChange,\n    children,\n    multiple = false as Multiple,\n    ...facetedProps\n  } = props\n  const [open, setOpen] = React.useState(false)\n  const triggerRef = React.useRef<HTMLButtonElement>(null)\n  const onItemSelect = React.useCallback(\n    (selectedValue: string) => {\n      if (!onValueChange) return\n\n      if (multiple) {\n        const currentValue: Array<string> = Array.isArray(value) ? value : []\n        const newValue = currentValue.includes(selectedValue)\n          ? currentValue.filter((v) => v !== selectedValue)\n          : [...currentValue, selectedValue]\n        onValueChange(newValue as FacetedValue<Multiple>)\n      } else {\n        if (value === selectedValue) {\n          onValueChange(undefined)\n        } else {\n          onValueChange(selectedValue as FacetedValue<Multiple>)\n        }\n\n        requestAnimationFrame(() => {\n          setOpen(false)\n        })\n      }\n    },\n    [multiple, onValueChange, value],\n  )\n\n  const contextValue = React.useMemo<FacetedContextValue<Multiple>>(\n    () => ({ value, onItemSelect, multiple, triggerRef }),\n    [value, onItemSelect, multiple],\n  )\n\n  return (\n    <FacetedContext.Provider value={contextValue}>\n      <Popover open={open} onOpenChange={setOpen} {...facetedProps}>\n        {children}\n      </Popover>\n    </FacetedContext.Provider>\n  )\n}\nFaceted.displayName = FACETED_NAME\n\nconst FacetedTrigger = React.forwardRef<\n  React.ComponentRef<typeof PopoverTrigger>,\n  React.ComponentPropsWithoutRef<typeof PopoverTrigger>\n>((props, forwardedRef) => {\n  const { className, children, ...triggerProps } = props\n\n  const context = useFacetedContext(TRIGGER_NAME)\n  const composedRef = useComposedRefs(forwardedRef, context.triggerRef)\n\n  return (\n    <PopoverTrigger\n      {...triggerProps}\n      ref={composedRef}\n      className={cn(\n        'justify-between text-left focus:outline-none focus:ring-1 focus:ring-ring',\n        className,\n      )}\n      onPointerDown={composeEventHandlers(\n        triggerProps.onPointerDown,\n        (event) => {\n          // prevent implicit pointer capture\n          const target = event.target\n          if (!(target instanceof Element)) return\n          if (target.hasPointerCapture(event.pointerId)) {\n            target.releasePointerCapture(event.pointerId)\n          }\n\n          // Only prevent default if we're not clicking on the input\n          // This allows text selection in the input while still preventing focus stealing elsewhere\n          if (\n            event.button === 0 &&\n            event.ctrlKey === false &&\n            event.pointerType === 'mouse' &&\n            !(event.target instanceof HTMLInputElement)\n          ) {\n            event.preventDefault()\n          }\n        },\n      )}\n    >\n      {children}\n    </PopoverTrigger>\n  )\n})\nFacetedTrigger.displayName = TRIGGER_NAME\n\ninterface FacetedBadgeListProps extends React.ComponentPropsWithoutRef<'div'> {\n  options?: Array<{ label: string; value: string }>\n  max?: number\n  badgeClassName?: string\n  placeholder?: string\n}\n\nconst FacetedBadgeList = React.forwardRef<\n  HTMLDivElement,\n  FacetedBadgeListProps\n>((props, forwardedRef) => {\n  const {\n    options = [],\n    max = 2,\n    placeholder = 'Select options...',\n    className,\n    badgeClassName,\n    ...badgeListProps\n  } = props\n\n  const context = useFacetedContext(BADGE_LIST_NAME)\n  const values = Array.isArray(context.value)\n    ? context.value\n    : context.value\n      ? [context.value]\n      : []\n\n  const getLabel = React.useCallback(\n    (value: string) => {\n      const option = options.find((opt) => opt.value === value)\n      return option?.label ?? value\n    },\n    [options],\n  )\n\n  if (values.length === 0) {\n    return (\n      <div\n        {...badgeListProps}\n        ref={forwardedRef}\n        className=\"flex w-full items-center gap-1 text-muted-foreground\"\n      >\n        {placeholder}\n        <ChevronsUpDown className=\"ml-auto size-4 shrink-0 opacity-50\" />\n      </div>\n    )\n  }\n\n  return (\n    <div\n      {...badgeListProps}\n      ref={forwardedRef}\n      className={cn('flex flex-wrap items-center gap-1', className)}\n    >\n      {values.length > max ? (\n        <Badge\n          variant=\"secondary\"\n          className={cn('rounded-sm px-1 font-normal', badgeClassName)}\n        >\n          {values.length} selected\n        </Badge>\n      ) : (\n        values.map((value) => (\n          <Badge\n            key={value}\n            variant=\"secondary\"\n            className={cn('rounded-sm px-1 font-normal', badgeClassName)}\n          >\n            <span className=\"truncate\">{value ? getLabel(value) : ''}</span>\n          </Badge>\n        ))\n      )}\n    </div>\n  )\n})\nFacetedBadgeList.displayName = BADGE_LIST_NAME\n\nconst FacetedContent = React.forwardRef<\n  React.ComponentRef<typeof PopoverContent>,\n  React.ComponentPropsWithoutRef<typeof PopoverContent>\n>((props, forwardedRef) => {\n  const { className, children, ...contentProps } = props\n\n  const context = useFacetedContext(CONTENT_NAME)\n\n  return (\n    <PopoverContent\n      {...contentProps}\n      ref={forwardedRef}\n      align=\"start\"\n      className={cn(\n        'w-[200px] origin-(--radix-popover-content-transform-origin) p-0',\n        className,\n      )}\n      onCloseAutoFocus={composeEventHandlers(\n        contentProps.onCloseAutoFocus,\n        () => context.triggerRef.current?.focus({ preventScroll: true }),\n      )}\n    >\n      <Command>{children}</Command>\n    </PopoverContent>\n  )\n})\nFacetedContent.displayName = CONTENT_NAME\n\nconst FacetedInput = CommandInput\nFacetedInput.displayName = INPUT_NAME\n\nconst FacetedList = CommandList\nFacetedList.displayName = LIST_NAME\n\nconst FacetedEmpty = CommandEmpty\nFacetedEmpty.displayName = EMPTY_NAME\n\nconst FacetedGroup = CommandGroup\nFacetedGroup.displayName = GROUP_NAME\n\ninterface FacetedItemProps extends React.ComponentPropsWithoutRef<\n  typeof CommandItem\n> {\n  value: string\n}\n\nconst FacetedItem = React.forwardRef<\n  React.ComponentRef<typeof CommandItem>,\n  FacetedItemProps\n>((props, ref) => {\n  const { className, children, value, onSelect, ...itemProps } = props\n  const context = useFacetedContext(ITEM_NAME)\n\n  const isSelected = context.multiple\n    ? Array.isArray(context.value) && context.value.includes(value)\n    : context.value === value\n\n  const onItemSelect = React.useCallback(\n    (currentValue: string) => {\n      if (onSelect) {\n        onSelect(currentValue)\n      } else if (context.onItemSelect) {\n        context.onItemSelect(currentValue)\n      }\n    },\n    [onSelect, context.onItemSelect],\n  )\n\n  return (\n    <CommandItem\n      aria-selected={isSelected}\n      data-selected={isSelected}\n      className={cn('gap-2', className)}\n      onSelect={() => onItemSelect(value)}\n      {...itemProps}\n      ref={ref}\n    >\n      <span\n        className={cn(\n          'flex size-4 items-center justify-center rounded-sm border border-primary',\n          isSelected\n            ? 'bg-primary text-primary-foreground'\n            : 'opacity-50 [&_svg]:invisible',\n        )}\n      >\n        <Check className=\"size-4\" />\n      </span>\n      {children}\n    </CommandItem>\n  )\n})\nFacetedItem.displayName = ITEM_NAME\n\nconst FacetedSeparator = CommandSeparator\nFacetedSeparator.displayName = SEPARATOR_NAME\n\nexport {\n  Faceted,\n  FacetedBadgeList,\n  FacetedContent,\n  FacetedEmpty,\n  FacetedGroup,\n  FacetedInput,\n  FacetedItem,\n  FacetedList,\n  FacetedSeparator,\n  FacetedTrigger,\n}\n"
  },
  {
    "path": "examples/react/kitchen-sink-shadcn/src/components/ui/input.tsx",
    "content": "import * as React from 'react'\n\nimport { cn } from '@/lib/utils'\n\nconst Input = React.forwardRef<HTMLInputElement, React.ComponentProps<'input'>>(\n  ({ className, type, ...props }, ref) => {\n    return (\n      <input\n        type={type}\n        className={cn(\n          'flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',\n          className,\n        )}\n        ref={ref}\n        {...props}\n      />\n    )\n  },\n)\nInput.displayName = 'Input'\n\nexport { Input }\n"
  },
  {
    "path": "examples/react/kitchen-sink-shadcn/src/components/ui/popover.tsx",
    "content": "import * as React from 'react'\nimport * as PopoverPrimitive from '@radix-ui/react-popover'\n\nimport { cn } from '@/lib/utils'\n\nconst Popover = PopoverPrimitive.Root\n\nconst PopoverTrigger = PopoverPrimitive.Trigger\n\nconst PopoverAnchor = PopoverPrimitive.Anchor\n\nconst PopoverContent = React.forwardRef<\n  React.ElementRef<typeof PopoverPrimitive.Content>,\n  React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\n>(({ className, align = 'center', sideOffset = 4, ...props }, ref) => (\n  <PopoverPrimitive.Portal>\n    <PopoverPrimitive.Content\n      ref={ref}\n      align={align}\n      sideOffset={sideOffset}\n      className={cn(\n        'z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',\n        className,\n      )}\n      {...props}\n    />\n  </PopoverPrimitive.Portal>\n))\nPopoverContent.displayName = PopoverPrimitive.Content.displayName\n\nexport { Popover, PopoverTrigger, PopoverContent, PopoverAnchor }\n"
  },
  {
    "path": "examples/react/kitchen-sink-shadcn/src/components/ui/progress.tsx",
    "content": "import * as React from 'react'\nimport * as ProgressPrimitive from '@radix-ui/react-progress'\n\nimport { cn } from '@/lib/utils'\n\nconst Progress = React.forwardRef<\n  React.ElementRef<typeof ProgressPrimitive.Root>,\n  React.ComponentPropsWithoutRef<typeof ProgressPrimitive.Root>\n>(({ className, value, ...props }, ref) => (\n  <ProgressPrimitive.Root\n    ref={ref}\n    className={cn(\n      'relative h-2 w-full overflow-hidden rounded-full bg-primary/20',\n      className,\n    )}\n    {...props}\n  >\n    <ProgressPrimitive.Indicator\n      className=\"h-full w-full flex-1 bg-primary transition-all\"\n      style={{ transform: `translateX(-${100 - (value || 0)}%)` }}\n    />\n  </ProgressPrimitive.Root>\n))\nProgress.displayName = ProgressPrimitive.Root.displayName\n\nexport { Progress }\n"
  },
  {
    "path": "examples/react/kitchen-sink-shadcn/src/components/ui/select.tsx",
    "content": "import * as React from 'react'\nimport * as SelectPrimitive from '@radix-ui/react-select'\nimport { Check, ChevronDown, ChevronUp } from 'lucide-react'\n\nimport { cn } from '@/lib/utils'\n\nconst Select = SelectPrimitive.Root\n\nconst SelectGroup = SelectPrimitive.Group\n\nconst SelectValue = SelectPrimitive.Value\n\nconst SelectTrigger = React.forwardRef<\n  React.ElementRef<typeof SelectPrimitive.Trigger>,\n  React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>\n>(({ className, children, ...props }, ref) => (\n  <SelectPrimitive.Trigger\n    ref={ref}\n    className={cn(\n      'flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1',\n      className,\n    )}\n    {...props}\n  >\n    {children}\n    <SelectPrimitive.Icon asChild>\n      <ChevronDown className=\"h-4 w-4 opacity-50\" />\n    </SelectPrimitive.Icon>\n  </SelectPrimitive.Trigger>\n))\nSelectTrigger.displayName = SelectPrimitive.Trigger.displayName\n\nconst SelectScrollUpButton = React.forwardRef<\n  React.ElementRef<typeof SelectPrimitive.ScrollUpButton>,\n  React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>\n>(({ className, ...props }, ref) => (\n  <SelectPrimitive.ScrollUpButton\n    ref={ref}\n    className={cn(\n      'flex cursor-default items-center justify-center py-1',\n      className,\n    )}\n    {...props}\n  >\n    <ChevronUp className=\"h-4 w-4\" />\n  </SelectPrimitive.ScrollUpButton>\n))\nSelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName\n\nconst SelectScrollDownButton = React.forwardRef<\n  React.ElementRef<typeof SelectPrimitive.ScrollDownButton>,\n  React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>\n>(({ className, ...props }, ref) => (\n  <SelectPrimitive.ScrollDownButton\n    ref={ref}\n    className={cn(\n      'flex cursor-default items-center justify-center py-1',\n      className,\n    )}\n    {...props}\n  >\n    <ChevronDown className=\"h-4 w-4\" />\n  </SelectPrimitive.ScrollDownButton>\n))\nSelectScrollDownButton.displayName =\n  SelectPrimitive.ScrollDownButton.displayName\n\nconst SelectContent = React.forwardRef<\n  React.ElementRef<typeof SelectPrimitive.Content>,\n  React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>\n>(({ className, children, position = 'popper', ...props }, ref) => (\n  <SelectPrimitive.Portal>\n    <SelectPrimitive.Content\n      ref={ref}\n      className={cn(\n        'relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',\n        position === 'popper' &&\n          'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1',\n        className,\n      )}\n      position={position}\n      {...props}\n    >\n      <SelectScrollUpButton />\n      <SelectPrimitive.Viewport\n        className={cn(\n          'p-1',\n          position === 'popper' &&\n            'h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]',\n        )}\n      >\n        {children}\n      </SelectPrimitive.Viewport>\n      <SelectScrollDownButton />\n    </SelectPrimitive.Content>\n  </SelectPrimitive.Portal>\n))\nSelectContent.displayName = SelectPrimitive.Content.displayName\n\nconst SelectLabel = React.forwardRef<\n  React.ElementRef<typeof SelectPrimitive.Label>,\n  React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>\n>(({ className, ...props }, ref) => (\n  <SelectPrimitive.Label\n    ref={ref}\n    className={cn('px-2 py-1.5 text-sm font-semibold', className)}\n    {...props}\n  />\n))\nSelectLabel.displayName = SelectPrimitive.Label.displayName\n\nconst SelectItem = React.forwardRef<\n  React.ElementRef<typeof SelectPrimitive.Item>,\n  React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>\n>(({ className, children, ...props }, ref) => (\n  <SelectPrimitive.Item\n    ref={ref}\n    className={cn(\n      'relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n      className,\n    )}\n    {...props}\n  >\n    <span className=\"absolute right-2 flex h-3.5 w-3.5 items-center justify-center\">\n      <SelectPrimitive.ItemIndicator>\n        <Check className=\"h-4 w-4\" />\n      </SelectPrimitive.ItemIndicator>\n    </span>\n    <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n  </SelectPrimitive.Item>\n))\nSelectItem.displayName = SelectPrimitive.Item.displayName\n\nconst SelectSeparator = React.forwardRef<\n  React.ElementRef<typeof SelectPrimitive.Separator>,\n  React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n  <SelectPrimitive.Separator\n    ref={ref}\n    className={cn('-mx-1 my-1 h-px bg-muted', className)}\n    {...props}\n  />\n))\nSelectSeparator.displayName = SelectPrimitive.Separator.displayName\n\nexport {\n  Select,\n  SelectGroup,\n  SelectValue,\n  SelectTrigger,\n  SelectContent,\n  SelectLabel,\n  SelectItem,\n  SelectSeparator,\n  SelectScrollUpButton,\n  SelectScrollDownButton,\n}\n"
  },
  {
    "path": "examples/react/kitchen-sink-shadcn/src/components/ui/sortable.tsx",
    "content": "'use client'\n\nimport * as React from 'react'\nimport * as ReactDOM from 'react-dom'\nimport {\n  DndContext,\n  DragOverlay,\n  KeyboardSensor,\n  MouseSensor,\n  TouchSensor,\n  closestCenter,\n  closestCorners,\n  defaultDropAnimationSideEffects,\n  useSensor,\n  useSensors,\n} from '@dnd-kit/core'\nimport {\n  restrictToHorizontalAxis,\n  restrictToParentElement,\n  restrictToVerticalAxis,\n} from '@dnd-kit/modifiers'\nimport {\n  SortableContext,\n  arrayMove,\n  horizontalListSortingStrategy,\n  sortableKeyboardCoordinates,\n  useSortable,\n  verticalListSortingStrategy,\n} from '@dnd-kit/sortable'\nimport { CSS } from '@dnd-kit/utilities'\nimport { Slot } from '@radix-ui/react-slot'\nimport type {\n  Announcements,\n  DndContextProps,\n  DragEndEvent,\n  DraggableSyntheticListeners,\n  DropAnimation,\n  ScreenReaderInstructions,\n  UniqueIdentifier,\n} from '@dnd-kit/core'\nimport type { SortableContextProps } from '@dnd-kit/sortable'\n\nimport { composeEventHandlers, useComposedRefs } from '@/lib/composition'\nimport { cn } from '@/lib/utils'\n\nconst orientationConfig = {\n  vertical: {\n    modifiers: [restrictToVerticalAxis, restrictToParentElement],\n    strategy: verticalListSortingStrategy,\n    collisionDetection: closestCenter,\n  },\n  horizontal: {\n    modifiers: [restrictToHorizontalAxis, restrictToParentElement],\n    strategy: horizontalListSortingStrategy,\n    collisionDetection: closestCenter,\n  },\n  mixed: {\n    modifiers: [restrictToParentElement],\n    strategy: undefined,\n    collisionDetection: closestCorners,\n  },\n}\n\nconst ROOT_NAME = 'Sortable'\nconst CONTENT_NAME = 'SortableContent'\nconst ITEM_NAME = 'SortableItem'\nconst ITEM_HANDLE_NAME = 'SortableItemHandle'\nconst OVERLAY_NAME = 'SortableOverlay'\n\nconst SORTABLE_ERROR = {\n  [ROOT_NAME]: `\\`${ROOT_NAME}\\` components must be within \\`${ROOT_NAME}\\``,\n  [CONTENT_NAME]: `\\`${CONTENT_NAME}\\` must be within \\`${ROOT_NAME}\\``,\n  [ITEM_NAME]: `\\`${ITEM_NAME}\\` must be within \\`${CONTENT_NAME}\\``,\n  [ITEM_HANDLE_NAME]: `\\`${ITEM_HANDLE_NAME}\\` must be within \\`${ITEM_NAME}\\``,\n  [OVERLAY_NAME]: `\\`${OVERLAY_NAME}\\` must be within \\`${ROOT_NAME}\\``,\n} as const\n\ninterface SortableRootContextValue<T> {\n  id: string\n  items: Array<UniqueIdentifier>\n  modifiers: DndContextProps['modifiers']\n  strategy: SortableContextProps['strategy']\n  activeId: UniqueIdentifier | null\n  setActiveId: (id: UniqueIdentifier | null) => void\n  getItemValue: (item: T) => UniqueIdentifier\n  flatCursor: boolean\n}\n\nconst SortableRootContext =\n  React.createContext<SortableRootContextValue<unknown> | null>(null)\nSortableRootContext.displayName = ROOT_NAME\n\nfunction useSortableContext(name: keyof typeof SORTABLE_ERROR) {\n  const context = React.useContext(SortableRootContext)\n  if (!context) {\n    throw new Error(SORTABLE_ERROR[name])\n  }\n  return context\n}\n\ninterface GetItemValue<T> {\n  /**\n   * Callback that returns a unique identifier for each sortable item. Required for array of objects.\n   * @example getItemValue={(item) => item.id}\n   */\n  getItemValue: (item: T) => UniqueIdentifier\n}\n\ntype SortableProps<T> = DndContextProps & {\n  value: Array<T>\n  onValueChange?: (items: Array<T>) => void\n  onMove?: (\n    event: DragEndEvent & { activeIndex: number; overIndex: number },\n  ) => void\n  strategy?: SortableContextProps['strategy']\n  orientation?: 'vertical' | 'horizontal' | 'mixed'\n  flatCursor?: boolean\n} & (T extends object ? GetItemValue<T> : Partial<GetItemValue<T>>)\n\nfunction Sortable<T>(props: SortableProps<T>) {\n  const {\n    id = React.useId(),\n    value,\n    onValueChange,\n    modifiers,\n    strategy,\n    onMove,\n    orientation = 'vertical',\n    flatCursor = false,\n    getItemValue: getItemValueProp,\n    accessibility,\n    ...sortableProps\n  } = props\n  const [activeId, setActiveId] = React.useState<UniqueIdentifier | null>(null)\n  const sensors = useSensors(\n    useSensor(MouseSensor),\n    useSensor(TouchSensor),\n    useSensor(KeyboardSensor, {\n      coordinateGetter: sortableKeyboardCoordinates,\n    }),\n  )\n  const config = React.useMemo(\n    () => orientationConfig[orientation],\n    [orientation],\n  )\n  const getItemValue = React.useCallback(\n    (item: T): UniqueIdentifier => {\n      if (typeof item === 'object' && !getItemValueProp) {\n        throw new Error('getItemValue is required when using array of objects.')\n      }\n      return getItemValueProp\n        ? getItemValueProp(item)\n        : (item as UniqueIdentifier)\n    },\n    [getItemValueProp],\n  )\n\n  const onDragEnd = React.useCallback(\n    (event: DragEndEvent) => {\n      const { active, over } = event\n      if (over && active.id !== over.id) {\n        const activeIndex = value.findIndex(\n          (item) => getItemValue(item) === active.id,\n        )\n        const overIndex = value.findIndex(\n          (item) => getItemValue(item) === over.id,\n        )\n\n        if (onMove) {\n          onMove({ ...event, activeIndex, overIndex })\n        } else {\n          onValueChange?.(arrayMove(value, activeIndex, overIndex))\n        }\n      }\n      setActiveId(null)\n    },\n    [value, onValueChange, onMove, getItemValue],\n  )\n\n  const announcements: Announcements = {\n    onDragStart({ active }) {\n      const activeValue = active.id.toString()\n      return `Grabbed sortable item \"${activeValue}\". Current position is ${active.data.current?.sortable.index + 1} of ${value.length}. Use arrow keys to move, space to drop.`\n    },\n    onDragOver({ active, over }) {\n      if (over) {\n        const overIndex = over.data.current?.sortable.index ?? 0\n        const activeIndex = active.data.current?.sortable.index ?? 0\n        const moveDirection = overIndex > activeIndex ? 'down' : 'up'\n        const activeValue = active.id.toString()\n        return `Sortable item \"${activeValue}\" moved ${moveDirection} to position ${overIndex + 1} of ${value.length}.`\n      }\n      return 'Sortable item is no longer over a droppable area. Press escape to cancel.'\n    },\n    onDragEnd({ active, over }) {\n      const activeValue = active.id.toString()\n      if (over) {\n        const overIndex = over.data.current?.sortable.index ?? 0\n        return `Sortable item \"${activeValue}\" dropped at position ${overIndex + 1} of ${value.length}.`\n      }\n      return `Sortable item \"${activeValue}\" dropped. No changes were made.`\n    },\n    onDragCancel({ active }) {\n      const activeIndex = active.data.current?.sortable.index ?? 0\n      const activeValue = active.id.toString()\n      return `Sorting cancelled. Sortable item \"${activeValue}\" returned to position ${activeIndex + 1} of ${value.length}.`\n    },\n    onDragMove({ active, over }) {\n      if (over) {\n        const overIndex = over.data.current?.sortable.index ?? 0\n        const activeIndex = active.data.current?.sortable.index ?? 0\n        const moveDirection = overIndex > activeIndex ? 'down' : 'up'\n        const activeValue = active.id.toString()\n        return `Sortable item \"${activeValue}\" is moving ${moveDirection} to position ${overIndex + 1} of ${value.length}.`\n      }\n      return 'Sortable item is no longer over a droppable area. Press escape to cancel.'\n    },\n  }\n\n  const screenReaderInstructions: ScreenReaderInstructions = React.useMemo(\n    () => ({\n      draggable: `\n        To pick up a sortable item, press space or enter.\n        While dragging, use the ${orientation === 'vertical' ? 'up and down' : orientation === 'horizontal' ? 'left and right' : 'arrow'} keys to move the item.\n        Press space or enter again to drop the item in its new position, or press escape to cancel.\n      `,\n    }),\n    [orientation],\n  )\n\n  const items = React.useMemo(() => {\n    return value.map((item) => getItemValue(item))\n  }, [value, getItemValue])\n\n  const contextValue = React.useMemo(\n    () => ({\n      id,\n      items,\n      modifiers: modifiers ?? config.modifiers,\n      strategy: strategy ?? config.strategy,\n      activeId,\n      setActiveId,\n      getItemValue,\n      flatCursor,\n    }),\n    [\n      id,\n      items,\n      modifiers,\n      strategy,\n      config.modifiers,\n      config.strategy,\n      activeId,\n      getItemValue,\n      flatCursor,\n    ],\n  )\n\n  return (\n    <SortableRootContext.Provider\n      value={contextValue as SortableRootContextValue<unknown>}\n    >\n      <DndContext\n        id={id}\n        modifiers={modifiers ?? config.modifiers}\n        sensors={sensors}\n        collisionDetection={config.collisionDetection}\n        onDragStart={composeEventHandlers(\n          sortableProps.onDragStart,\n          ({ active }) => setActiveId(active.id),\n        )}\n        onDragEnd={composeEventHandlers(sortableProps.onDragEnd, onDragEnd)}\n        onDragCancel={composeEventHandlers(sortableProps.onDragCancel, () =>\n          setActiveId(null),\n        )}\n        accessibility={{\n          announcements,\n          screenReaderInstructions,\n          ...accessibility,\n        }}\n        {...sortableProps}\n      />\n    </SortableRootContext.Provider>\n  )\n}\n\nconst SortableContentContext = React.createContext<boolean>(false)\nSortableContentContext.displayName = CONTENT_NAME\n\ninterface SortableContentProps extends React.ComponentPropsWithoutRef<'div'> {\n  strategy?: SortableContextProps['strategy']\n  children: React.ReactNode\n  asChild?: boolean\n  withoutSlot?: boolean\n}\n\nconst SortableContent = React.forwardRef<HTMLDivElement, SortableContentProps>(\n  (props, forwardedRef) => {\n    const {\n      strategy: strategyProp,\n      asChild,\n      withoutSlot,\n      children,\n      ...contentProps\n    } = props\n    const context = useSortableContext(CONTENT_NAME)\n\n    const ContentSlot = asChild ? Slot : 'div'\n\n    return (\n      <SortableContentContext.Provider value={true}>\n        <SortableContext\n          items={context.items}\n          strategy={strategyProp ?? context.strategy}\n        >\n          {withoutSlot ? (\n            children\n          ) : (\n            <ContentSlot {...contentProps} ref={forwardedRef}>\n              {children}\n            </ContentSlot>\n          )}\n        </SortableContext>\n      </SortableContentContext.Provider>\n    )\n  },\n)\nSortableContent.displayName = CONTENT_NAME\n\ninterface SortableItemContextValue {\n  id: string\n  attributes: React.HTMLAttributes<HTMLElement>\n  listeners: DraggableSyntheticListeners | undefined\n  setActivatorNodeRef: (node: HTMLElement | null) => void\n  isDragging?: boolean\n  disabled?: boolean\n}\n\nconst SortableItemContext =\n  React.createContext<SortableItemContextValue | null>(null)\nSortableItemContext.displayName = ITEM_NAME\n\ninterface SortableItemProps extends React.ComponentPropsWithoutRef<'div'> {\n  value: UniqueIdentifier\n  asHandle?: boolean\n  asChild?: boolean\n  disabled?: boolean\n}\n\nconst SortableItem = React.forwardRef<HTMLDivElement, SortableItemProps>(\n  (props, forwardedRef) => {\n    const {\n      value,\n      style,\n      asHandle,\n      asChild,\n      disabled,\n      className,\n      ...itemProps\n    } = props\n    const inSortableContent = React.useContext(SortableContentContext)\n    const inSortableOverlay = React.useContext(SortableOverlayContext)\n\n    if (!inSortableContent && !inSortableOverlay) {\n      throw new Error(SORTABLE_ERROR[ITEM_NAME])\n    }\n\n    if (value === '') {\n      throw new Error(`\\`${ITEM_NAME}\\` value cannot be an empty string`)\n    }\n\n    const context = useSortableContext(ITEM_NAME)\n    const id = React.useId()\n    const {\n      attributes,\n      listeners,\n      setNodeRef,\n      setActivatorNodeRef,\n      transform,\n      transition,\n      isDragging,\n    } = useSortable({ id: value, disabled })\n\n    const composedRef = useComposedRefs(forwardedRef, (node) => {\n      if (disabled) return\n      setNodeRef(node)\n      if (asHandle) setActivatorNodeRef(node)\n    })\n\n    const composedStyle = React.useMemo<React.CSSProperties>(() => {\n      return {\n        transform: CSS.Translate.toString(transform),\n        transition,\n        ...style,\n      }\n    }, [transform, transition, style])\n\n    const itemContext = React.useMemo<SortableItemContextValue>(\n      () => ({\n        id,\n        attributes,\n        listeners,\n        setActivatorNodeRef,\n        isDragging,\n        disabled,\n      }),\n      [id, attributes, listeners, setActivatorNodeRef, isDragging, disabled],\n    )\n\n    const ItemSlot = asChild ? Slot : 'div'\n\n    return (\n      <SortableItemContext.Provider value={itemContext}>\n        <ItemSlot\n          id={id}\n          data-dragging={isDragging ? '' : undefined}\n          {...itemProps}\n          {...(asHandle ? attributes : {})}\n          {...(asHandle ? listeners : {})}\n          tabIndex={disabled ? undefined : 0}\n          ref={composedRef}\n          style={composedStyle}\n          className={cn(\n            'focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1',\n            {\n              'touch-none select-none': asHandle,\n              'cursor-default': context.flatCursor,\n              'data-dragging:cursor-grabbing': !context.flatCursor,\n              'cursor-grab': !isDragging && asHandle && !context.flatCursor,\n              'opacity-50': isDragging,\n              'pointer-events-none opacity-50': disabled,\n            },\n            className,\n          )}\n        />\n      </SortableItemContext.Provider>\n    )\n  },\n)\nSortableItem.displayName = ITEM_NAME\n\ninterface SortableItemHandleProps extends React.ComponentPropsWithoutRef<'button'> {\n  asChild?: boolean\n}\n\nconst SortableItemHandle = React.forwardRef<\n  HTMLButtonElement,\n  SortableItemHandleProps\n>((props, forwardedRef) => {\n  const { asChild, disabled, className, ...itemHandleProps } = props\n  const itemContext = React.useContext(SortableItemContext)\n  if (!itemContext) {\n    throw new Error(SORTABLE_ERROR[ITEM_HANDLE_NAME])\n  }\n  const context = useSortableContext(ITEM_HANDLE_NAME)\n\n  const isDisabled = disabled ?? itemContext.disabled\n\n  const composedRef = useComposedRefs(forwardedRef, (node) => {\n    if (!isDisabled) return\n    itemContext.setActivatorNodeRef(node)\n  })\n\n  const HandleSlot = asChild ? Slot : 'button'\n\n  return (\n    <HandleSlot\n      type=\"button\"\n      aria-controls={itemContext.id}\n      data-dragging={itemContext.isDragging ? '' : undefined}\n      {...itemHandleProps}\n      {...itemContext.attributes}\n      {...itemContext.listeners}\n      ref={composedRef}\n      className={cn(\n        'select-none disabled:pointer-events-none disabled:opacity-50',\n        context.flatCursor\n          ? 'cursor-default'\n          : 'cursor-grab data-dragging:cursor-grabbing',\n        className,\n      )}\n      disabled={isDisabled}\n    />\n  )\n})\nSortableItemHandle.displayName = ITEM_HANDLE_NAME\n\nconst SortableOverlayContext = React.createContext(false)\nSortableOverlayContext.displayName = OVERLAY_NAME\n\nconst dropAnimation: DropAnimation = {\n  sideEffects: defaultDropAnimationSideEffects({\n    styles: {\n      active: {\n        opacity: '0.4',\n      },\n    },\n  }),\n}\n\ninterface SortableOverlayProps extends Omit<\n  React.ComponentPropsWithoutRef<typeof DragOverlay>,\n  'children'\n> {\n  container?: HTMLElement | DocumentFragment | null\n  children?:\n    | ((params: { value: UniqueIdentifier }) => React.ReactNode)\n    | React.ReactNode\n}\n\nfunction SortableOverlay(props: SortableOverlayProps) {\n  const { container: containerProp, children, ...overlayProps } = props\n  const context = useSortableContext(OVERLAY_NAME)\n\n  const [mounted, setMounted] = React.useState(false)\n  React.useLayoutEffect(() => setMounted(true), [])\n\n  const container = containerProp ?? (mounted ? globalThis.document.body : null)\n\n  if (!container) return null\n\n  return ReactDOM.createPortal(\n    <DragOverlay\n      modifiers={context.modifiers}\n      dropAnimation={dropAnimation}\n      className={cn(!context.flatCursor && 'cursor-grabbing')}\n      {...overlayProps}\n    >\n      <SortableOverlayContext.Provider value={true}>\n        {context.activeId\n          ? typeof children === 'function'\n            ? children({ value: context.activeId })\n            : children\n          : null}\n      </SortableOverlayContext.Provider>\n    </DragOverlay>,\n    container,\n  )\n}\n\nconst Root = Sortable\nconst Content = SortableContent\nconst Item = SortableItem\nconst ItemHandle = SortableItemHandle\nconst Overlay = SortableOverlay\n\nexport {\n  Content,\n  Item,\n  ItemHandle,\n  Overlay,\n  //\n  Root,\n  Sortable,\n  SortableContent,\n  SortableItem,\n  SortableItemHandle,\n  SortableOverlay,\n}\n"
  },
  {
    "path": "examples/react/kitchen-sink-shadcn/src/components/ui/table.tsx",
    "content": "import * as React from 'react'\n\nimport { cn } from '@/lib/utils'\n\nconst Table = React.forwardRef<\n  HTMLTableElement,\n  React.HTMLAttributes<HTMLTableElement>\n>(({ className, ...props }, ref) => (\n  <div className=\"relative w-full overflow-auto\">\n    <table\n      ref={ref}\n      className={cn('w-full caption-bottom text-sm', className)}\n      {...props}\n    />\n  </div>\n))\nTable.displayName = 'Table'\n\nconst TableHeader = React.forwardRef<\n  HTMLTableSectionElement,\n  React.HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => (\n  <thead ref={ref} className={cn('[&_tr]:border-b', className)} {...props} />\n))\nTableHeader.displayName = 'TableHeader'\n\nconst TableBody = React.forwardRef<\n  HTMLTableSectionElement,\n  React.HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => (\n  <tbody\n    ref={ref}\n    className={cn('[&_tr:last-child]:border-0', className)}\n    {...props}\n  />\n))\nTableBody.displayName = 'TableBody'\n\nconst TableFooter = React.forwardRef<\n  HTMLTableSectionElement,\n  React.HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => (\n  <tfoot\n    ref={ref}\n    className={cn(\n      'border-t bg-muted/50 font-medium [&>tr]:last:border-b-0',\n      className,\n    )}\n    {...props}\n  />\n))\nTableFooter.displayName = 'TableFooter'\n\nconst TableRow = React.forwardRef<\n  HTMLTableRowElement,\n  React.HTMLAttributes<HTMLTableRowElement>\n>(({ className, ...props }, ref) => (\n  <tr\n    ref={ref}\n    className={cn(\n      'border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted',\n      className,\n    )}\n    {...props}\n  />\n))\nTableRow.displayName = 'TableRow'\n\nconst TableHead = React.forwardRef<\n  HTMLTableCellElement,\n  React.ThHTMLAttributes<HTMLTableCellElement>\n>(({ className, ...props }, ref) => (\n  <th\n    ref={ref}\n    className={cn(\n      'h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]',\n      className,\n    )}\n    {...props}\n  />\n))\nTableHead.displayName = 'TableHead'\n\nconst TableCell = React.forwardRef<\n  HTMLTableCellElement,\n  React.TdHTMLAttributes<HTMLTableCellElement>\n>(({ className, ...props }, ref) => (\n  <td\n    ref={ref}\n    className={cn(\n      'p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]',\n      className,\n    )}\n    {...props}\n  />\n))\nTableCell.displayName = 'TableCell'\n\nconst TableCaption = React.forwardRef<\n  HTMLTableCaptionElement,\n  React.HTMLAttributes<HTMLTableCaptionElement>\n>(({ className, ...props }, ref) => (\n  <caption\n    ref={ref}\n    className={cn('mt-4 text-sm text-muted-foreground', className)}\n    {...props}\n  />\n))\nTableCaption.displayName = 'TableCaption'\n\nexport {\n  Table,\n  TableHeader,\n  TableBody,\n  TableFooter,\n  TableHead,\n  TableRow,\n  TableCell,\n  TableCaption,\n}\n"
  },
  {
    "path": "examples/react/kitchen-sink-shadcn/src/components/ui/tooltip.tsx",
    "content": "import * as React from 'react'\nimport * as TooltipPrimitive from '@radix-ui/react-tooltip'\n\nimport { cn } from '@/lib/utils'\n\nconst TooltipProvider = TooltipPrimitive.Provider\n\nconst Tooltip = TooltipPrimitive.Root\n\nconst TooltipTrigger = TooltipPrimitive.Trigger\n\nconst TooltipContent = React.forwardRef<\n  React.ElementRef<typeof TooltipPrimitive.Content>,\n  React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n  <TooltipPrimitive.Portal>\n    <TooltipPrimitive.Content\n      ref={ref}\n      sideOffset={sideOffset}\n      className={cn(\n        'z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',\n        className,\n      )}\n      {...props}\n    />\n  </TooltipPrimitive.Portal>\n))\nTooltipContent.displayName = TooltipPrimitive.Content.displayName\n\nexport { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider }\n"
  },
  {
    "path": "examples/react/kitchen-sink-shadcn/src/lib/composition.ts",
    "content": "import * as React from 'react'\n\n/**\n * A utility to compose multiple event handlers into a single event handler.\n * Run originalEventHandler first, then ourEventHandler unless prevented.\n */\nfunction composeEventHandlers<E>(\n  originalEventHandler?: (event: E) => void,\n  ourEventHandler?: (event: E) => void,\n  { checkForDefaultPrevented = true } = {},\n) {\n  return function handleEvent(event: E) {\n    originalEventHandler?.(event)\n\n    if (\n      checkForDefaultPrevented === false ||\n      !(event as unknown as Event).defaultPrevented\n    ) {\n      return ourEventHandler?.(event)\n    }\n  }\n}\n\n/**\n * @see https://github.com/radix-ui/primitives/blob/main/packages/react/compose-refs/src/compose-refs.tsx\n */\n\ntype PossibleRef<T> = React.Ref<T> | undefined\n\n/**\n * Set a given ref to a given value.\n * This utility takes care of different types of refs: callback refs and RefObject(s).\n */\nfunction setRef<T>(ref: PossibleRef<T>, value: T) {\n  if (typeof ref === 'function') {\n    return ref(value)\n  }\n\n  if (ref !== null && ref !== undefined) {\n    ref.current = value\n  }\n}\n\n/**\n * A utility to compose multiple refs together.\n * Accepts callback refs and RefObject(s).\n */\nfunction composeRefs<T>(...refs: Array<PossibleRef<T>>): React.RefCallback<T> {\n  return (node) => {\n    let hasCleanup = false\n    const cleanups = refs.map((ref) => {\n      const cleanup = setRef(ref, node)\n      if (!hasCleanup && typeof cleanup === 'function') {\n        hasCleanup = true\n      }\n      return cleanup\n    })\n\n    // React <19 will log an error to the console if a callback ref returns a\n    // value. We don't use ref cleanups internally so this will only happen if a\n    // user's ref callback returns a value, which we only expect if they are\n    // using the cleanup functionality added in React 19.\n    // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n    if (hasCleanup) {\n      return () => {\n        for (let i = 0; i < cleanups.length; i++) {\n          const cleanup = cleanups[i]\n          if (typeof cleanup === 'function') {\n            cleanup()\n          } else {\n            setRef(refs[i], null)\n          }\n        }\n      }\n    }\n  }\n}\n\n/**\n * A custom hook that composes multiple refs.\n * Accepts callback refs and RefObject(s).\n */\nfunction useComposedRefs<T>(\n  ...refs: Array<PossibleRef<T>>\n): React.RefCallback<T> {\n  return React.useCallback(composeRefs(...refs), refs)\n}\n\nexport { composeEventHandlers, composeRefs, useComposedRefs }\n"
  },
  {
    "path": "examples/react/kitchen-sink-shadcn/src/lib/data-table.ts",
    "content": "import {\n  filterFn_arrIncludes,\n  filterFn_equals,\n  filterFn_equalsString,\n  filterFn_greaterThan,\n  filterFn_greaterThanOrEqualTo,\n  filterFn_includesString,\n  filterFn_lessThan,\n  filterFn_lessThanOrEqualTo,\n} from '@tanstack/react-table'\nimport type {\n  ExtendedColumnFilter,\n  FilterOperator,\n  JoinOperator,\n  TableFilterFeatures,\n} from '@/types'\nimport type {\n  FilterFn,\n  Row,\n  RowData,\n  TableFeatures,\n} from '@tanstack/react-table'\n\nfunction isFalsy(val: unknown) {\n  return (\n    val === undefined ||\n    val === null ||\n    val === '' ||\n    (Array.isArray(val) && val.length === 0)\n  )\n}\n\nfunction isValidDate(value: unknown): boolean {\n  if (value instanceof Date) return !isNaN(value.getTime())\n  if (typeof value === 'string') return !isNaN(Date.parse(value))\n  return false\n}\n\nfunction toDate(value: unknown): Date | null {\n  if (value instanceof Date) return value\n  if (typeof value === 'string') {\n    const date = new Date(value)\n    return !isNaN(date.getTime()) ? date : null\n  }\n  return null\n}\n\nfunction isSameDay(date1: Date, date2: Date): boolean {\n  const date1Str = date1.toISOString().split('T')[0]\n  const date2Str = date2.toISOString().split('T')[0]\n  return date1Str === date2Str\n}\n\nconst filterFn_enhancedEquals: FilterFn<any, any> = <\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  row: Row<TFeatures, TData>,\n  columnId: string,\n  filterValue: unknown,\n) => {\n  const rowValue = row.getValue(columnId)\n\n  if (Array.isArray(filterValue)) {\n    return filterFn_arrIncludes(row, columnId, filterValue)\n  }\n\n  if (isValidDate(rowValue) && isValidDate(filterValue)) {\n    const rowDate = toDate(rowValue)\n    const filterDate = toDate(filterValue)\n\n    if (rowDate && filterDate) {\n      return isSameDay(rowDate, filterDate)\n    }\n  }\n\n  return filterFn_equals(row, columnId, filterValue)\n}\n\nfilterFn_enhancedEquals.resolveFilterValue = (val: any) => isFalsy(val)\n\nconst filterFn_enhancedGreaterThan: FilterFn<any, any> = <\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  row: Row<TFeatures, TData>,\n  columnId: string,\n  filterValue: unknown,\n) => {\n  const rowValue = row.getValue(columnId)\n\n  if (isValidDate(rowValue) && isValidDate(filterValue)) {\n    const rowDate = toDate(rowValue)\n    const filterDate = toDate(filterValue)\n\n    if (rowDate && filterDate) {\n      return rowDate.getTime() > filterDate.getTime()\n    }\n  }\n\n  return filterFn_greaterThan(row, columnId, filterValue)\n}\n\nfilterFn_enhancedGreaterThan.resolveFilterValue = (val: any) => isFalsy(val)\n\nconst filterFn_enhancedGreaterThanOrEqualTo: FilterFn<any, any> = <\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  row: Row<TFeatures, TData>,\n  columnId: string,\n  filterValue: unknown,\n) => {\n  const rowValue = row.getValue(columnId)\n\n  if (isValidDate(rowValue) && isValidDate(filterValue)) {\n    const rowDate = toDate(rowValue)\n    const filterDate = toDate(filterValue)\n\n    if (rowDate && filterDate) {\n      return rowDate.getTime() >= filterDate.getTime()\n    }\n  }\n\n  return filterFn_greaterThanOrEqualTo(row, columnId, filterValue)\n}\n\nfilterFn_enhancedGreaterThanOrEqualTo.resolveFilterValue = (val: any) =>\n  isFalsy(val)\n\nconst filterFn_enhancedLessThan: FilterFn<any, any> = <\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  row: Row<TFeatures, TData>,\n  columnId: string,\n  filterValue: unknown,\n) => {\n  const rowValue = row.getValue(columnId)\n\n  if (isValidDate(rowValue) && isValidDate(filterValue)) {\n    const rowDate = toDate(rowValue)\n    const filterDate = toDate(filterValue)\n\n    if (rowDate && filterDate) {\n      return rowDate.getTime() < filterDate.getTime()\n    }\n  }\n\n  return filterFn_lessThan(row, columnId, filterValue)\n}\n\nfilterFn_enhancedLessThan.resolveFilterValue = (val: any) => isFalsy(val)\n\nconst filterFn_enhancedLessThanOrEqualTo: FilterFn<any, any> = <\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  row: Row<TFeatures, TData>,\n  columnId: string,\n  filterValue: unknown,\n) => {\n  const rowValue = row.getValue(columnId)\n\n  if (isValidDate(rowValue) && isValidDate(filterValue)) {\n    const rowDate = toDate(rowValue)\n    const filterDate = toDate(filterValue)\n\n    if (rowDate && filterDate) {\n      return rowDate.getTime() <= filterDate.getTime()\n    }\n  }\n\n  return filterFn_lessThanOrEqualTo(row, columnId, filterValue)\n}\n\nfilterFn_enhancedLessThanOrEqualTo.resolveFilterValue = (val: any) =>\n  isFalsy(val)\n\nconst filterFn_startsWith: FilterFn<any, any> = <\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  row: Row<TFeatures, TData>,\n  columnId: string,\n  filterValue: string,\n) => {\n  const value = String(row.getValue(columnId) ?? '').toLowerCase()\n  return value.startsWith(filterValue.toLowerCase())\n}\n\nfilterFn_startsWith.resolveFilterValue = (val: any) => isFalsy(val)\n\nconst filterFn_endsWith: FilterFn<any, any> = <\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  row: Row<TFeatures, TData>,\n  columnId: string,\n  filterValue: string,\n) => {\n  const value = String(row.getValue(columnId) ?? '').toLowerCase()\n  return value.endsWith(filterValue.toLowerCase())\n}\n\nfilterFn_endsWith.resolveFilterValue = (val: any) => isFalsy(val)\n\nconst filterFn_isEmpty: FilterFn<any, any> = <\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  row: Row<TFeatures, TData>,\n  columnId: string,\n) => {\n  const value = row.getValue(columnId)\n  return (\n    value === undefined ||\n    value === null ||\n    value === '' ||\n    (Array.isArray(value) && value.length === 0)\n  )\n}\n\nfilterFn_isEmpty.resolveFilterValue = (val: any) => isFalsy(val)\n\nconst filterFn_inBetween: FilterFn<any, any> = <\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  row: Row<TFeatures, TData>,\n  columnId: string,\n  filterValue: unknown,\n) => {\n  if (Array.isArray(filterValue)) {\n    const [min, max] = filterValue\n    const rowValue: unknown = row.getValue(columnId)\n\n    if (min === undefined || min === '' || min === null) {\n      return max === undefined || max === '' || max === null\n        ? true\n        : typeof rowValue === 'number' && typeof max === 'number'\n          ? rowValue <= max\n          : String(rowValue) <= String(max)\n    }\n    if (max === undefined || max === '' || max === null) {\n      return typeof rowValue === 'number' && typeof min === 'number'\n        ? rowValue >= min\n        : String(rowValue) >= String(min)\n    }\n\n    if (\n      rowValue instanceof Date ||\n      (typeof rowValue === 'string' && !isNaN(Date.parse(rowValue)))\n    ) {\n      const dateValue = new Date(rowValue).getTime()\n      const minDate = new Date(min as string | Date).getTime()\n      const maxDate = new Date(max as string | Date).getTime()\n      return dateValue >= minDate && dateValue <= maxDate\n    }\n\n    const numValue = Number(rowValue)\n    return (\n      !isNaN(numValue) && numValue >= Number(min) && numValue <= Number(max)\n    )\n  }\n  return true\n}\n\nfilterFn_inBetween.autoRemove = (val: any) => isFalsy(val)\n\nconst filterFn_isRelativeToToday: FilterFn<any, any> = <\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  row: Row<TFeatures, TData>,\n  columnId: string,\n  filterValue: unknown,\n) => {\n  const rowValue = row.getValue(columnId)\n\n  if (!isValidDate(rowValue)) return false\n\n  const rowDate = toDate(rowValue)\n  if (!rowDate) return false\n\n  rowDate.setHours(0, 0, 0, 0)\n\n  const today = new Date()\n  today.setHours(0, 0, 0, 0)\n\n  const diffInDays = Math.floor(\n    (rowDate.getTime() - today.getTime()) / (1000 * 60 * 60 * 24),\n  )\n\n  if (typeof filterValue === 'number') {\n    return diffInDays === filterValue\n  } else if (typeof filterValue === 'string') {\n    const numValue = parseInt(filterValue, 10)\n    if (!isNaN(numValue)) {\n      return diffInDays === numValue\n    }\n  } else if (Array.isArray(filterValue) && filterValue.length === 2) {\n    const [min, max] = filterValue\n    const minDays = typeof min === 'number' ? min : parseInt(min as string, 10)\n    const maxDays = typeof max === 'number' ? max : parseInt(max as string, 10)\n\n    if (!isNaN(minDays) && !isNaN(maxDays)) {\n      return diffInDays >= minDays && diffInDays <= maxDays\n    }\n  }\n\n  return false\n}\n\nfilterFn_isRelativeToToday.autoRemove = (val: any) => isFalsy(val)\n\nexport const dynamicFilterFn: FilterFn<any, any> = <\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  row: Row<TableFilterFeatures<TFeatures>, TData>,\n  columnId: string,\n  filterValue: unknown,\n) => {\n  let operator: FilterOperator = 'includesString'\n  let value = filterValue\n  let joinOperator: JoinOperator = 'and'\n\n  const filters: Array<ExtendedColumnFilter> =\n    row.table.store.state.columnFilters.filter((f) => f.id === columnId)\n\n  if (!filters.length) return true\n\n  if (filters[0].joinOperator) {\n    joinOperator = filters[0].joinOperator\n  }\n\n  return filters.reduce((pass, filter, index) => {\n    operator = filter.operator ?? 'includesString'\n    value = filter.value\n\n    if (isFalsy(value) && operator !== 'isEmpty' && operator !== 'isNotEmpty') {\n      return pass\n    }\n\n    let result: boolean\n    switch (operator) {\n      case 'includesString':\n        result = filterFn_includesString(row, columnId, value)\n        break\n      case 'notIncludesString':\n        result = !filterFn_includesString(row, columnId, value)\n        break\n      case 'equalsString':\n        result = filterFn_equalsString(row, columnId, value)\n        break\n      case 'notEqualsString':\n        result = !filterFn_equalsString(row, columnId, value)\n        break\n      case 'startsWith':\n        result = filterFn_startsWith(row, columnId, value)\n        break\n      case 'endsWith':\n        result = filterFn_endsWith(row, columnId, value)\n        break\n      case 'isEmpty':\n        result = filterFn_isEmpty(row, columnId, '')\n        break\n      case 'isNotEmpty':\n        result = !filterFn_isEmpty(row, columnId, '')\n        break\n      case 'equals':\n        result = filterFn_enhancedEquals(row, columnId, value)\n        break\n      case 'notEquals':\n        result = !filterFn_enhancedEquals(row, columnId, value)\n        break\n      case 'greaterThan':\n        result = filterFn_enhancedGreaterThan(row, columnId, value)\n        break\n      case 'greaterThanOrEqualTo':\n        result = filterFn_enhancedGreaterThanOrEqualTo(row, columnId, value)\n        break\n      case 'lessThan':\n        result = filterFn_enhancedLessThan(row, columnId, value)\n        break\n      case 'lessThanOrEqualTo':\n        result = filterFn_enhancedLessThanOrEqualTo(row, columnId, value)\n        break\n      case 'inRange':\n        result = filterFn_inBetween(row, columnId, value)\n        break\n      case 'isRelativeToToday':\n        result = filterFn_isRelativeToToday(row, columnId, value)\n        break\n      default:\n        result = filterFn_includesString(row, columnId, value)\n        break\n    }\n\n    if (index === 0) return result\n\n    return joinOperator === 'and' ? pass && result : pass || result\n  }, true)\n}\n\nexport function getFilterOperators(type: string): Array<{\n  label: string\n  value: FilterOperator\n}> {\n  switch (type) {\n    case 'text':\n      return [\n        { label: 'contains', value: 'includesString' },\n        { label: 'does not contain', value: 'notIncludesString' },\n        { label: 'starts with', value: 'startsWith' },\n        { label: 'ends with', value: 'endsWith' },\n        { label: 'is', value: 'equalsString' },\n        { label: 'is not', value: 'notEqualsString' },\n        { label: 'is empty', value: 'isEmpty' },\n        { label: 'is not empty', value: 'isNotEmpty' },\n      ]\n    case 'number':\n      return [\n        { label: 'is', value: 'equals' },\n        { label: 'is not', value: 'notEquals' },\n        { label: 'is less than', value: 'lessThan' },\n        { label: 'is less than or equal to', value: 'lessThanOrEqualTo' },\n        { label: 'is greater than', value: 'greaterThan' },\n        { label: 'is greater than or equal to', value: 'greaterThanOrEqualTo' },\n        { label: 'is between', value: 'inRange' },\n      ]\n    case 'date':\n      return [\n        { label: 'is', value: 'equals' },\n        { label: 'is not', value: 'notEquals' },\n        { label: 'is before', value: 'lessThan' },\n        { label: 'is on or before', value: 'lessThanOrEqualTo' },\n        { label: 'is after', value: 'greaterThan' },\n        { label: 'is on or after', value: 'greaterThanOrEqualTo' },\n        { label: 'is between', value: 'inRange' },\n        { label: 'is relative to today', value: 'isRelativeToToday' },\n        { label: 'is empty', value: 'isEmpty' },\n        { label: 'is not empty', value: 'isNotEmpty' },\n      ]\n    case 'select':\n    case 'multi-select':\n      return [\n        { label: 'is', value: 'equals' },\n        { label: 'is not', value: 'notEquals' },\n        { label: 'is empty', value: 'isEmpty' },\n        { label: 'is not empty', value: 'isNotEmpty' },\n      ]\n    default:\n      return [\n        { label: 'contains', value: 'includesString' },\n        { label: 'does not contain', value: 'notIncludesString' },\n        { label: 'is', value: 'equalsString' },\n        { label: 'is not', value: 'notEqualsString' },\n      ]\n  }\n}\n"
  },
  {
    "path": "examples/react/kitchen-sink-shadcn/src/lib/make-data.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport const statuses = ['active', 'inactive', 'pending'] as const\nexport const departments = [\n  'engineering',\n  'marketing',\n  'finance',\n  'sales',\n  'hr',\n] as const\n\nexport interface Person {\n  id: string\n  firstName: string\n  lastName: string\n  age: number\n  email: string\n  status: (typeof statuses)[number]\n  department: (typeof departments)[number]\n  joinDate: Date\n  subRows?: Array<Person>\n}\n\nfunction range(len: number) {\n  const arr: Array<number> = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nfunction newPerson(): Person {\n  return {\n    id: faker.string.uuid(),\n    firstName: faker.person.firstName(),\n    lastName: faker.person.lastName(),\n    age: faker.number.int({ min: 20, max: 65 }),\n    email: faker.internet.email(),\n    status: faker.helpers.arrayElement(statuses),\n    department: faker.helpers.arrayElement(departments),\n    joinDate: faker.date.past({ years: 5 }),\n  }\n}\n\nexport function makeData(...lens: Array<number>) {\n  const makeDataLevel = (depth = 0): Array<Person> => {\n    const len = lens[depth]\n    return range(len).map((_d): Person => {\n      return {\n        ...newPerson(),\n        subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined,\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n"
  },
  {
    "path": "examples/react/kitchen-sink-shadcn/src/lib/utils.ts",
    "content": "import { clsx } from 'clsx'\nimport { twMerge } from 'tailwind-merge'\nimport type { ClassValue } from 'clsx'\n\nexport function cn(...inputs: Array<ClassValue>) {\n  return twMerge(clsx(inputs))\n}\n\nexport function formatDate(\n  date: Date | string | number,\n  opts: Intl.DateTimeFormatOptions = {},\n) {\n  return new Intl.DateTimeFormat('en-US', {\n    month: opts.month ?? 'long',\n    day: opts.day ?? 'numeric',\n    year: opts.year ?? 'numeric',\n    ...opts,\n  }).format(new Date(date))\n}\n\nexport function toSentenceCase(str: string) {\n  return str\n    .replace(/_/g, ' ')\n    .replace(/([A-Z])/g, ' $1')\n    .toLowerCase()\n    .replace(/^\\w/, (c) => c.toUpperCase())\n    .replace(/\\s+/g, ' ')\n    .trim()\n}\n"
  },
  {
    "path": "examples/react/kitchen-sink-shadcn/src/main.tsx",
    "content": "'use client'\n\nimport * as React from 'react'\nimport * as ReactDOM from 'react-dom/client'\nimport '@/styles/globals.css'\n\nimport {\n  CheckCircle,\n  ChevronDown,\n  ChevronUp,\n  Clock,\n  Code,\n  CreditCard,\n  Megaphone,\n  MoreHorizontal,\n  ShoppingCart,\n  Users,\n  XCircle,\n} from 'lucide-react'\nimport {\n  columnFacetingFeature,\n  columnFilteringFeature,\n  columnOrderingFeature,\n  columnResizingFeature,\n  columnSizingFeature,\n  columnVisibilityFeature,\n  createCoreRowModel,\n  createFacetedRowModel,\n  createFacetedUniqueValues,\n  createFilteredRowModel,\n  createPaginatedRowModel,\n  createSortedRowModel,\n  filterFns,\n  rowPaginationFeature,\n  rowSelectionFeature,\n  rowSortingFeature,\n  sortFns,\n  tableFeatures,\n  useTable,\n} from '@tanstack/react-table'\nimport type { Person } from '@/lib/make-data'\nimport type {\n  CellData,\n  ColumnDef,\n  ColumnSizingState,\n  RowData,\n  SortingState,\n  TableFeatures,\n} from '@tanstack/react-table'\nimport type { ExtendedColumnFilter } from '@/types'\nimport { Button } from '@/components/ui/button'\nimport { Checkbox } from '@/components/ui/checkbox'\nimport {\n  Table,\n  TableBody,\n  TableCell,\n  TableHead,\n  TableHeader,\n  TableRow,\n} from '@/components/ui/table'\n\nimport { departments, makeData, statuses } from '@/lib/make-data'\nimport { DataTablePagination } from '@/components/data-table/data-table-pagination'\nimport { DataTableViewOptions } from '@/components/data-table/data-table-view-options'\n\nimport { Badge } from '@/components/ui/badge'\nimport {\n  DropdownMenu,\n  DropdownMenuContent,\n  DropdownMenuItem,\n  DropdownMenuLabel,\n  DropdownMenuSeparator,\n  DropdownMenuTrigger,\n} from '@/components/ui/dropdown-menu'\nimport { cn, formatDate, toSentenceCase } from '@/lib/utils'\nimport { DataTableSortList } from '@/components/data-table/data-table-sort-list'\nimport { DataTableFilterList } from '@/components/data-table/data-table-filter-list'\nimport { dynamicFilterFn } from '@/lib/data-table'\n\ndeclare module '@tanstack/react-table' {\n  interface ColumnMeta<\n    TFeatures extends TableFeatures,\n    TData extends RowData,\n    TValue extends CellData = CellData,\n  > {\n    label?: string\n    variant?: 'text' | 'number' | 'date' | 'boolean' | 'select' | 'multi-select'\n    options?: Array<{ label: string; value: string; count?: number }>\n  }\n}\n\nconst _features = tableFeatures({\n  rowSortingFeature,\n  rowPaginationFeature,\n  rowSelectionFeature,\n  columnFilteringFeature,\n  columnFacetingFeature,\n  columnOrderingFeature,\n  columnVisibilityFeature,\n  columnSizingFeature,\n  columnResizingFeature,\n})\n\nfunction App() {\n  const rerender = React.useReducer(() => ({}), {})[1]\n\n  const [rowSelection, setRowSelection] = React.useState({})\n  const [sorting, setSorting] = React.useState<SortingState>([])\n  const [columnFilters, setColumnFilters] = React.useState<\n    Array<ExtendedColumnFilter>\n  >([])\n  const [columnVisibility, setColumnVisibility] = React.useState({})\n  const [columnSizing, setColumnSizing] = React.useState<ColumnSizingState>({})\n\n  const columns = React.useMemo<Array<ColumnDef<typeof _features, Person>>>(\n    () => [\n      {\n        id: 'select',\n        header: ({ table }) => (\n          <Checkbox\n            checked={\n              table.getIsAllPageRowsSelected() ||\n              (table.getIsSomePageRowsSelected() && 'indeterminate')\n            }\n            onCheckedChange={(value) =>\n              table.toggleAllPageRowsSelected(!!value)\n            }\n            aria-label=\"Select all\"\n            className=\"translate-y-0.5\"\n          />\n        ),\n        cell: ({ row }) => (\n          <Checkbox\n            checked={row.getIsSelected()}\n            onCheckedChange={(value) => row.toggleSelected(!!value)}\n            aria-label=\"Select row\"\n            className=\"translate-y-0.5\"\n          />\n        ),\n        maxSize: 30,\n        enableSorting: false,\n        enableHiding: false,\n        enableResizing: false,\n      },\n      {\n        id: 'firstName',\n        accessorKey: 'firstName',\n        header: 'First Name',\n        cell: (info) => String(info.getValue()),\n        meta: {\n          label: 'First Name',\n          variant: 'text',\n        },\n      },\n      {\n        id: 'lastName',\n        accessorFn: (row) => row.lastName,\n        header: 'Last Name',\n        cell: (info) => String(info.getValue()),\n        meta: {\n          label: 'Last Name',\n          variant: 'text',\n        },\n      },\n      {\n        id: 'age',\n        accessorKey: 'age',\n        header: 'Age',\n        cell: (info) => <span>{String(info.getValue())}</span>,\n        meta: {\n          label: 'Age',\n          variant: 'number',\n        },\n      },\n      {\n        id: 'email',\n        accessorKey: 'email',\n        header: 'Email',\n        cell: (info) => info.cell.getValue<string>(),\n        meta: {\n          label: 'Email',\n          variant: 'text',\n        },\n      },\n      {\n        id: 'status',\n        accessorKey: 'status',\n        header: 'Status',\n        cell: (info) => {\n          const status = info.getValue<Person['status']>()\n          const icons: Record<Person['status'], React.ReactNode> = {\n            active: <CheckCircle />,\n            inactive: <XCircle />,\n            pending: <Clock />,\n          }\n\n          return (\n            <Badge\n              variant=\"outline\"\n              className=\"gap-1 w-fit [&>svg]:size-3.5 px-3 py-1 [&>svg]:shrink-0 rounded-full\"\n            >\n              {icons[status]}\n              <span className=\"truncate\">{toSentenceCase(status)}</span>\n            </Badge>\n          )\n        },\n        meta: {\n          label: 'Status',\n          variant: 'select',\n          options: statuses.map((status) => ({\n            label: toSentenceCase(status),\n            value: status,\n          })),\n        },\n      },\n      {\n        id: 'department',\n        accessorKey: 'department',\n        header: 'Department',\n        cell: (info) => {\n          const department = info.getValue<Person['department']>()\n          const icons: Record<Person['department'], React.ReactNode> = {\n            engineering: <Code />,\n            marketing: <Megaphone />,\n            sales: <ShoppingCart />,\n            hr: <Users />,\n            finance: <CreditCard />,\n          }\n\n          return (\n            <Badge\n              variant=\"outline\"\n              className=\"gap-1 w-fit [&>svg]:size-3.5 px-3 py-1 [&>svg]:shrink-0 rounded-full\"\n            >\n              {icons[department]}\n              <span className=\"truncate\">{toSentenceCase(department)}</span>\n            </Badge>\n          )\n        },\n        meta: {\n          label: 'Department',\n          variant: 'multi-select',\n          options: departments.map((department) => ({\n            label: toSentenceCase(department),\n            value: department,\n          })),\n        },\n      },\n      {\n        id: 'joinDate',\n        accessorKey: 'joinDate',\n        header: 'Join Date',\n        cell: (info) => formatDate(info.getValue<string>()),\n        meta: {\n          label: 'Join Date',\n          variant: 'date',\n        },\n      },\n      {\n        id: 'actions',\n        enableHiding: false,\n        cell: ({ row }) => {\n          const person = row.original\n          return (\n            <DropdownMenu>\n              <DropdownMenuTrigger asChild>\n                <Button variant=\"ghost\" className=\"h-8 w-8 p-0\">\n                  <span className=\"sr-only\">Open menu</span>\n                  <MoreHorizontal className=\"h-4 w-4\" />\n                </Button>\n              </DropdownMenuTrigger>\n              <DropdownMenuContent align=\"end\">\n                <DropdownMenuLabel>Actions</DropdownMenuLabel>\n                <DropdownMenuItem\n                  onClick={() => navigator.clipboard.writeText(person.id)}\n                >\n                  Copy ID\n                </DropdownMenuItem>\n                <DropdownMenuSeparator />\n                <DropdownMenuItem>View details</DropdownMenuItem>\n                <DropdownMenuItem>View profile</DropdownMenuItem>\n              </DropdownMenuContent>\n            </DropdownMenu>\n          )\n        },\n        maxSize: 30,\n        enableResizing: false,\n      },\n    ],\n    [],\n  )\n\n  const [data, setData] = React.useState(() => makeData(1_000))\n  const [columnOrder, setColumnOrder] = React.useState<Array<string>>(() =>\n    columns.map((c) => c.id ?? ''),\n  )\n\n  const refreshData = () => setData(() => makeData(100_000)) // stress test\n\n  const table = useTable(\n    {\n      _features,\n      _rowModels: {\n        coreRowModel: createCoreRowModel(),\n        filteredRowModel: createFilteredRowModel(filterFns),\n        facetedRowModel: createFacetedRowModel(),\n        facetedUniqueValues: createFacetedUniqueValues(),\n        paginatedRowModel: createPaginatedRowModel(),\n        sortedRowModel: createSortedRowModel(sortFns),\n      },\n      columns,\n      data,\n      defaultColumn: {\n        minSize: 60,\n        maxSize: 800,\n        filterFn: dynamicFilterFn,\n      },\n      state: {\n        rowSelection,\n        sorting,\n        columnVisibility,\n        columnOrder,\n        columnSizing,\n        columnFilters,\n      },\n      onSortingChange: setSorting,\n      onColumnVisibilityChange: setColumnVisibility,\n      onColumnOrderChange: setColumnOrder,\n      onColumnSizingChange: setColumnSizing,\n      onColumnFiltersChange: setColumnFilters,\n      getRowId: (row) => row.id,\n      enableRowSelection: true,\n      onRowSelectionChange: setRowSelection,\n      columnResizeMode: 'onChange',\n      debugTable: true,\n    },\n    (state) => state, // subscribe to all re-renders\n  )\n\n  const columnSizeVars = React.useMemo(() => {\n    const headers = table.getFlatHeaders()\n    const colSizes: { [key: string]: number } = {}\n    for (const header of headers) {\n      colSizes[`--header-${header.id}-size`] = header.getSize()\n      colSizes[`--col-${header.column.id}-size`] = header.column.getSize()\n    }\n    return colSizes\n  }, [table.store.state.columnSizing])\n\n  return (\n    <div className=\"container mx-auto p-4 flex flex-col gap-4\">\n      <div className=\"flex items-center justify-end gap-2\">\n        <Button variant=\"outline\" size=\"sm\" onClick={() => refreshData()}>\n          Refresh Data\n        </Button>\n        <Button variant=\"outline\" size=\"sm\" onClick={() => rerender()}>\n          Force Rerender\n        </Button>\n        <Button\n          variant=\"outline\"\n          size=\"sm\"\n          onClick={() =>\n            console.info(\n              'table.getSelectedRowModel().flatRows',\n              table.getSelectedRowModel().flatRows,\n            )\n          }\n        >\n          Log Selected Rows\n        </Button>\n      </div>\n      <div className=\"flex flex-col gap-4\">\n        <div className=\"flex items-center gap-2\">\n          <DataTableFilterList\n            table={table}\n            columnFilters={columnFilters}\n            onColumnFiltersChange={setColumnFilters}\n          />\n          <DataTableSortList\n            table={table}\n            sorting={sorting}\n            onSortingChange={setSorting}\n          />\n          <DataTableViewOptions\n            table={table}\n            columnOrder={columnOrder}\n            onColumnOrderChange={setColumnOrder}\n          />\n        </div>\n        <div className=\"rounded-md border\">\n          <Table style={{ ...columnSizeVars }}>\n            <TableHeader>\n              {table.getHeaderGroups().map((headerGroup) => (\n                <TableRow key={headerGroup.id}>\n                  {headerGroup.headers\n                    .filter((header) => header.column.getIsVisible())\n                    .map((header) => {\n                      return (\n                        <TableHead\n                          colSpan={header.colSpan}\n                          className={cn('relative', {\n                            'border-r': header.id !== 'actions',\n                          })}\n                          style={{\n                            width: `calc(var(--header-${header.id}-size) * 1px)`,\n                          }}\n                        >\n                          {header.isPlaceholder ? null : (\n                            <div\n                              className={cn(\n                                'flex items-center justify-between gap-2 cursor-pointer select-none',\n                                header.column.getCanSort() && 'cursor-pointer',\n                              )}\n                              onClick={header.column.getToggleSortingHandler()}\n                            >\n                              <table.FlexRender header={header} />\n                              {header.column.getIsSorted() && (\n                                <>\n                                  {header.column.getIsSorted() === 'asc' ? (\n                                    <ChevronUp className=\"size-4\" />\n                                  ) : (\n                                    <ChevronDown className=\"size-4\" />\n                                  )}\n                                </>\n                              )}\n                            </div>\n                          )}\n                          {header.column.getCanResize() && (\n                            <div\n                              onDoubleClick={() => header.column.resetSize()}\n                              onMouseDown={header.getResizeHandler()}\n                              onTouchStart={header.getResizeHandler()}\n                              className={cn(\n                                'absolute right-[-2px] z-10 top-1/2 h-6 w-[3px] -translate-y-1/2 cursor-e-resize select-none touch-none rounded-md transition-colors hover:bg-blue-600 before:absolute before:left-[-4px] before:right-[-4px] before:top-0 before:h-full before:content-[\"\"]',\n                                header.column.getIsResizing() && 'bg-blue-600',\n                              )}\n                            />\n                          )}\n                        </TableHead>\n                      )\n                    })}\n                </TableRow>\n              ))}\n            </TableHeader>\n            <TableBody>\n              {table.getRowModel().rows.map((row) => {\n                return (\n                  <TableRow key={row.id}>\n                    {row.getVisibleCells().map((cell) => {\n                      return (\n                        <TableCell\n                          key={cell.id}\n                          className={\n                            cell.column.id === 'actions' ? '' : 'border-r'\n                          }\n                          style={{\n                            width: `calc(var(--col-${cell.column.id}-size) * 1px)`,\n                          }}\n                        >\n                          <table.FlexRender cell={cell} />\n                        </TableCell>\n                      )\n                    })}\n                  </TableRow>\n                )\n              })}\n            </TableBody>\n          </Table>\n        </div>\n        <DataTablePagination table={table} />\n      </div>\n    </div>\n  )\n}\n\nconst rootElement = document.getElementById('root')\nif (!rootElement) throw new Error('Failed to find the root element')\n\nReactDOM.createRoot(rootElement).render(\n  <React.StrictMode>\n    <App />\n  </React.StrictMode>,\n)\n"
  },
  {
    "path": "examples/react/kitchen-sink-shadcn/src/styles/globals.css",
    "content": "@import 'tailwindcss' source('../');\n\n@plugin 'tailwindcss-animate';\n\n@custom-variant dark (&:is(.dark *));\n\n@theme inline {\n  --color-background: hsl(var(--background));\n  --color-foreground: hsl(var(--foreground));\n  --color-card: hsl(var(--card));\n  --color-card-foreground: hsl(var(--card-foreground));\n  --color-popover: hsl(var(--popover));\n  --color-popover-foreground: hsl(var(--popover-foreground));\n  --color-primary: hsl(var(--primary));\n  --color-primary-foreground: hsl(var(--primary-foreground));\n  --color-secondary: hsl(var(--secondary));\n  --color-secondary-foreground: hsl(var(--secondary-foreground));\n  --color-muted: hsl(var(--muted));\n  --color-muted-foreground: hsl(var(--muted-foreground));\n  --color-accent: hsl(var(--accent));\n  --color-accent-foreground: hsl(var(--accent-foreground));\n  --color-destructive: hsl(var(--destructive));\n  --color-destructive-foreground: hsl(var(--destructive-foreground));\n  --color-border: hsl(var(--border));\n  --color-input: hsl(var(--input));\n  --color-ring: hsl(var(--ring));\n  --color-chart-1: hsl(var(--chart-1));\n  --color-chart-2: hsl(var(--chart-2));\n  --color-chart-3: hsl(var(--chart-3));\n  --color-chart-4: hsl(var(--chart-4));\n  --color-chart-5: hsl(var(--chart-5));\n  --radius-sm: calc(var(--radius) - 4px);\n  --radius-md: calc(var(--radius) - 2px);\n  --radius-lg: var(--radius);\n  --radius-xl: calc(var(--radius) + 4px);\n}\n\n@layer base {\n  :root {\n    --background: hsl(0 0% 100%);\n    --foreground: hsl(240 10% 3.9%);\n    --card: hsl(0 0% 100%);\n    --card-foreground: hsl(240 10% 3.9%);\n    --popover: hsl(0 0% 100%);\n    --popover-foreground: hsl(240 10% 3.9%);\n    --primary: hsl(240 5.9% 10%);\n    --primary-foreground: hsl(0 0% 98%);\n    --secondary: hsl(240 4.8% 95.9%);\n    --secondary-foreground: hsl(240 5.9% 10%);\n    --muted: hsl(240 4.8% 95.9%);\n    --muted-foreground: hsl(240 3.8% 46.1%);\n    --accent: hsl(240 4.8% 95.9%);\n    --accent-foreground: hsl(240 5.9% 10%);\n    --destructive: hsl(0 84.2% 60.2%);\n    --destructive-foreground: hsl(0 0% 98%);\n    --border: hsl(240 5.9% 90%);\n    --input: hsl(240 5.9% 90%);\n    --ring: hsl(240 10% 3.9%);\n    --chart-1: hsl(12 76% 61%);\n    --chart-2: hsl(173 58% 39%);\n    --chart-3: hsl(197 37% 24%);\n    --chart-4: hsl(43 74% 66%);\n    --chart-5: hsl(27 87% 67%);\n    --radius: 0.5rem;\n  }\n\n  .dark {\n    --background: hsl(240 10% 3.9%);\n    --foreground: hsl(0 0% 98%);\n    --card: hsl(240 10% 3.9%);\n    --card-foreground: hsl(0 0% 98%);\n    --popover: hsl(240 10% 3.9%);\n    --popover-foreground: hsl(0 0% 98%);\n    --primary: hsl(0 0% 98%);\n    --primary-foreground: hsl(240 5.9% 10%);\n    --secondary: hsl(240 3.7% 15.9%);\n    --secondary-foreground: hsl(0 0% 98%);\n    --muted: hsl(240 3.7% 15.9%);\n    --muted-foreground: hsl(240 5% 64.9%);\n    --accent: hsl(240 3.7% 15.9%);\n    --accent-foreground: hsl(0 0% 98%);\n    --destructive: hsl(0 62.8% 30.6%);\n    --destructive-foreground: hsl(0 0% 98%);\n    --border: hsl(240 3.7% 15.9%);\n    --input: hsl(240 3.7% 15.9%);\n    --ring: hsl(240 4.9% 83.9%);\n    --chart-1: hsl(220 70% 50%);\n    --chart-2: hsl(160 60% 45%);\n    --chart-3: hsl(30 80% 55%);\n    --chart-4: hsl(280 65% 60%);\n    --chart-5: hsl(340 75% 55%);\n  }\n}\n\n@layer base {\n  * {\n    @apply border-border outline-ring/50;\n  }\n  body {\n    @apply bg-background text-foreground;\n  }\n}\n"
  },
  {
    "path": "examples/react/kitchen-sink-shadcn/src/types/index.ts",
    "content": "import type {\n  ColumnFilter,\n  TableFeatures,\n  filterFns,\n} from '@tanstack/react-table'\n\nexport type TableFilterFeatures<TFeatures extends TableFeatures> = Pick<\n  TFeatures,\n  'columnFilteringFeature' | 'columnFacetingFeature'\n>\n\nexport type FilterOperator =\n  | keyof typeof filterFns\n  | 'notIncludesString'\n  | 'notEqualsString'\n  | 'notEquals'\n  | 'greaterThan'\n  | 'notGreaterThan'\n  | 'greaterThanOrEqualTo'\n  | 'notGreaterThanOrEqualTo'\n  | 'lessThan'\n  | 'notLessThan'\n  | 'lessThanOrEqualTo'\n  | 'notLessThanOrEqualTo'\n  | 'isRelativeToToday'\n  | 'inRange'\n  | 'startsWith'\n  | 'endsWith'\n  | 'isEmpty'\n  | 'isNotEmpty'\n\nexport type JoinOperator = 'and' | 'or'\n\nexport interface ExtendedColumnFilter extends ColumnFilter {\n  filterId?: string\n  operator?: FilterOperator\n  joinOperator?: JoinOperator\n}\n"
  },
  {
    "path": "examples/react/kitchen-sink-shadcn/tailwind.config.ts",
    "content": "import type { Config } from 'tailwindcss'\n\nexport default {\n  darkMode: 'class',\n  content: ['./index.html', './src/**/*.{js,ts,jsx,tsx}'],\n  theme: {\n    extend: {\n      borderRadius: {\n        lg: 'var(--radius)',\n        md: 'calc(var(--radius) - 2px)',\n        sm: 'calc(var(--radius) - 4px)',\n      },\n      colors: {\n        background: 'hsl(var(--background))',\n        foreground: 'hsl(var(--foreground))',\n        card: {\n          DEFAULT: 'hsl(var(--card))',\n          foreground: 'hsl(var(--card-foreground))',\n        },\n        popover: {\n          DEFAULT: 'hsl(var(--popover))',\n          foreground: 'hsl(var(--popover-foreground))',\n        },\n        primary: {\n          DEFAULT: 'hsl(var(--primary))',\n          foreground: 'hsl(var(--primary-foreground))',\n        },\n        secondary: {\n          DEFAULT: 'hsl(var(--secondary))',\n          foreground: 'hsl(var(--secondary-foreground))',\n        },\n        muted: {\n          DEFAULT: 'hsl(var(--muted))',\n          foreground: 'hsl(var(--muted-foreground))',\n        },\n        accent: {\n          DEFAULT: 'hsl(var(--accent))',\n          foreground: 'hsl(var(--accent-foreground))',\n        },\n        destructive: {\n          DEFAULT: 'hsl(var(--destructive))',\n          foreground: 'hsl(var(--destructive-foreground))',\n        },\n        border: 'hsl(var(--border))',\n        input: 'hsl(var(--input))',\n        ring: 'hsl(var(--ring))',\n        chart: {\n          '1': 'hsl(var(--chart-1))',\n          '2': 'hsl(var(--chart-2))',\n          '3': 'hsl(var(--chart-3))',\n          '4': 'hsl(var(--chart-4))',\n          '5': 'hsl(var(--chart-5))',\n        },\n      },\n    },\n  },\n  // eslint-disable-next-line import/no-commonjs\n  plugins: [require('tailwindcss-animate')],\n} satisfies Config\n"
  },
  {
    "path": "examples/react/kitchen-sink-shadcn/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"module\": \"ESNext\",\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"react-jsx\",\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true,\n\n    /* Paths */\n    \"baseUrl\": \".\",\n    \"paths\": {\n      \"@/*\": [\"./src/*\"]\n    }\n  },\n  \"include\": [\"src\", \"tailwind.config.ts\", \"vite.config.js\"]\n}\n"
  },
  {
    "path": "examples/react/kitchen-sink-shadcn/vite.config.js",
    "content": "import path from 'node:path'\nimport { defineConfig } from 'vite'\nimport react from '@vitejs/plugin-react'\nimport rollupReplace from '@rollup/plugin-replace'\nimport tailwindcss from '@tailwindcss/vite'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [\n    rollupReplace({\n      preventAssignment: true,\n      values: {\n        __DEV__: JSON.stringify(true),\n        'process.env.NODE_ENV': JSON.stringify('development'),\n      },\n    }),\n    react(),\n    tailwindcss(),\n  ],\n  resolve: {\n    alias: {\n      '@': path.resolve(__dirname, './src'),\n    },\n  },\n})\n"
  },
  {
    "path": "examples/react/pagination/.gitignore",
    "content": "node_modules\n.DS_Store\ndist\ndist-ssr\n*.local\n"
  },
  {
    "path": "examples/react/pagination/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run start` or `yarn start`\n"
  },
  {
    "path": "examples/react/pagination/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite App</title>\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n    <script src=\"https://unpkg.com/react-scan/dist/auto.global.js\"></script>\n  </head>\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.tsx\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/react/pagination/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-pagination\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"start\": \"vite\",\n    \"lint\": \"eslint ./src\",\n    \"test:types\": \"tsc\"\n  },\n  \"dependencies\": {\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"@tanstack/react-store\": \"^0.9.2\",\n    \"@tanstack/react-table\": \"^9.0.0-alpha.19\",\n    \"react\": \"^19.2.4\",\n    \"react-dom\": \"^19.2.4\"\n  },\n  \"devDependencies\": {\n    \"@rollup/plugin-replace\": \"^6.0.3\",\n    \"@types/react\": \"^19.2.10\",\n    \"@types/react-dom\": \"^19.2.3\",\n    \"@vitejs/plugin-react\": \"^5.1.2\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\"\n  }\n}\n"
  },
  {
    "path": "examples/react/pagination/src/index.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n\nbutton:disabled {\n  opacity: 0.5;\n}\n"
  },
  {
    "path": "examples/react/pagination/src/main.tsx",
    "content": "import React from 'react'\nimport ReactDOM from 'react-dom/client'\nimport './index.css'\nimport {\n  columnFilteringFeature,\n  createColumnHelper,\n  createFilteredRowModel,\n  createPaginatedRowModel,\n  createSortedRowModel,\n  filterFns,\n  rowPaginationFeature,\n  rowSortingFeature,\n  sortFns,\n  tableFeatures,\n  useTable,\n} from '@tanstack/react-table'\nimport { makeData } from './makeData'\nimport type { Column, ReactTable } from '@tanstack/react-table'\nimport type { Person } from './makeData'\n\nconst _features = tableFeatures({\n  columnFilteringFeature,\n  rowPaginationFeature,\n  rowSortingFeature,\n})\n\nconst columnHelper = createColumnHelper<typeof _features, Person>()\n\nfunction App() {\n  const rerender = React.useReducer(() => ({}), {})[1]\n\n  const columns = React.useMemo(\n    () =>\n      columnHelper.columns([\n        columnHelper.accessor('firstName', {\n          cell: (info) => info.getValue(),\n          footer: (props) => props.column.id,\n        }),\n        columnHelper.accessor((row) => row.lastName, {\n          id: 'lastName',\n          cell: (info) => info.getValue(),\n          header: () => <span>Last Name</span>,\n          footer: (props) => props.column.id,\n        }),\n        columnHelper.accessor('age', {\n          header: () => 'Age',\n          footer: (props) => props.column.id,\n        }),\n        columnHelper.accessor('visits', {\n          header: () => <span>Visits</span>,\n          footer: (props) => props.column.id,\n        }),\n        columnHelper.accessor('status', {\n          header: 'Status',\n          footer: (props) => props.column.id,\n        }),\n        columnHelper.accessor('progress', {\n          header: 'Profile Progress',\n          footer: (props) => props.column.id,\n        }),\n      ]),\n    [],\n  )\n\n  const [data, setData] = React.useState(() => makeData(1_000))\n  const refreshData = () => setData(() => makeData(100_000)) // stress test\n\n  return (\n    <>\n      <MyTable data={data} columns={columns} />\n      <hr />\n      <div>\n        <button onClick={() => rerender()}>Force Rerender</button>\n      </div>\n      <div>\n        <button onClick={() => refreshData()}>Refresh Data</button>\n      </div>\n    </>\n  )\n}\n\nfunction MyTable({\n  data,\n  columns,\n}: {\n  data: Array<Person>\n  columns: ReturnType<typeof columnHelper.columns>\n}) {\n  const table = useTable({\n    _features,\n    _rowModels: {\n      sortedRowModel: createSortedRowModel(sortFns),\n      filteredRowModel: createFilteredRowModel(filterFns),\n      paginatedRowModel: createPaginatedRowModel(),\n    },\n    columns,\n    data,\n    debugTable: true,\n    // no need to pass pageCount or rowCount with client-side pagination as it is calculated automatically\n    // autoResetPageIndex: false, // turn off page index reset when sorting or filtering\n  })\n\n  return (\n    <table.Subscribe\n      selector={(state) => ({\n        pagination: state.pagination,\n        sorting: state.sorting,\n        columnFilters: state.columnFilters,\n      })}\n    >\n      {(state) => (\n        <div className=\"p-2\">\n          <div className=\"h-2\" />\n          <table>\n            <thead>\n              {table.getHeaderGroups().map((headerGroup) => (\n                <tr key={headerGroup.id}>\n                  {headerGroup.headers.map((header) => {\n                    return (\n                      <th key={header.id} colSpan={header.colSpan}>\n                        <div\n                          className={\n                            header.column.getCanSort()\n                              ? 'cursor-pointer select-none'\n                              : ''\n                          }\n                          onClick={header.column.getToggleSortingHandler()}\n                        >\n                          <table.FlexRender header={header} />\n                          {{\n                            asc: ' 🔼',\n                            desc: ' 🔽',\n                          }[header.column.getIsSorted() as string] ?? null}\n                          {header.column.getCanFilter() ? (\n                            <div>\n                              <Filter column={header.column} table={table} />\n                            </div>\n                          ) : null}\n                        </div>\n                      </th>\n                    )\n                  })}\n                </tr>\n              ))}\n            </thead>\n            <tbody>\n              {table.getRowModel().rows.map((row) => {\n                return (\n                  <tr key={row.id}>\n                    {row.getAllCells().map((cell) => {\n                      return (\n                        <td key={cell.id}>\n                          <table.FlexRender cell={cell} />\n                        </td>\n                      )\n                    })}\n                  </tr>\n                )\n              })}\n            </tbody>\n          </table>\n          <div className=\"h-2\" />\n          <div className=\"flex items-center gap-2\">\n            <button\n              className=\"border rounded p-1\"\n              onClick={() => table.firstPage()}\n              disabled={!table.getCanPreviousPage()}\n            >\n              {'<<'}\n            </button>\n            <button\n              className=\"border rounded p-1\"\n              onClick={() => table.previousPage()}\n              disabled={!table.getCanPreviousPage()}\n            >\n              {'<'}\n            </button>\n            <button\n              className=\"border rounded p-1\"\n              onClick={() => table.nextPage()}\n              disabled={!table.getCanNextPage()}\n            >\n              {'>'}\n            </button>\n            <button\n              className=\"border rounded p-1\"\n              onClick={() => table.lastPage()}\n              disabled={!table.getCanNextPage()}\n            >\n              {'>>'}\n            </button>\n            <span className=\"flex items-center gap-1\">\n              <div>Page</div>\n              <strong>\n                {state.pagination.pageIndex + 1} of{' '}\n                {table.getPageCount().toLocaleString()}\n              </strong>\n            </span>\n            <span className=\"flex items-center gap-1\">\n              | Go to page:\n              <input\n                type=\"number\"\n                min=\"1\"\n                max={table.getPageCount()}\n                defaultValue={state.pagination.pageIndex + 1}\n                onChange={(e) => {\n                  const page = e.target.value ? Number(e.target.value) - 1 : 0\n                  table.setPageIndex(page)\n                }}\n                className=\"border p-1 rounded w-16\"\n              />\n            </span>\n            <select\n              value={state.pagination.pageSize}\n              onChange={(e) => {\n                table.setPageSize(Number(e.target.value))\n              }}\n            >\n              {[10, 20, 30, 40, 50].map((pageSize) => (\n                <option key={pageSize} value={pageSize}>\n                  Show {pageSize}\n                </option>\n              ))}\n            </select>\n          </div>\n          <div>\n            Showing {table.getRowModel().rows.length.toLocaleString()} of{' '}\n            {table.getRowCount().toLocaleString()} Rows\n          </div>\n          <table.Subscribe selector={(state) => state}>\n            {(state) => <pre>{JSON.stringify(state, null, 2)}</pre>}\n          </table.Subscribe>\n        </div>\n      )}\n    </table.Subscribe>\n  )\n}\n\nfunction Filter({\n  column,\n  table,\n}: {\n  column: Column<typeof _features, Person>\n  table: ReactTable<typeof _features, Person>\n}) {\n  const firstValue = table\n    .getPreFilteredRowModel()\n    .flatRows[0]?.getValue(column.id)\n\n  const columnFilterValue = column.getFilterValue()\n\n  return typeof firstValue === 'number' ? (\n    <div className=\"flex space-x-2\" onClick={(e) => e.stopPropagation()}>\n      <input\n        type=\"number\"\n        value={(columnFilterValue as [number, number] | undefined)?.[0] ?? ''}\n        onChange={(e) =>\n          column.setFilterValue((old: [number, number]) => [\n            e.target.value,\n            old[1],\n          ])\n        }\n        placeholder={`Min`}\n        className=\"w-24 border shadow rounded\"\n      />\n      <input\n        type=\"number\"\n        value={(columnFilterValue as [number, number] | undefined)?.[1] ?? ''}\n        onChange={(e) =>\n          column.setFilterValue((old: [number, number]) => [\n            old[0],\n            e.target.value,\n          ])\n        }\n        placeholder={`Max`}\n        className=\"w-24 border shadow rounded\"\n      />\n    </div>\n  ) : (\n    <input\n      className=\"w-36 border shadow rounded\"\n      onChange={(e) => column.setFilterValue(e.target.value)}\n      onClick={(e) => e.stopPropagation()}\n      placeholder={`Search...`}\n      type=\"text\"\n      value={(columnFilterValue ?? '') as string}\n    />\n  )\n}\n\nconst rootElement = document.getElementById('root')\nif (!rootElement) throw new Error('Failed to find the root element')\n\nReactDOM.createRoot(rootElement).render(\n  <React.StrictMode>\n    <App />\n  </React.StrictMode>,\n)\n"
  },
  {
    "path": "examples/react/pagination/src/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  subRows?: Array<Person>\n}\n\nconst range = (len: number) => {\n  const arr: Array<number> = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (): Person => {\n  return {\n    firstName: faker.person.firstName(),\n    lastName: faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: faker.number.int(1000),\n    progress: faker.number.int(100),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0],\n  }\n}\n\nexport function makeData(...lens: Array<number>) {\n  const makeDataLevel = (depth = 0): Array<Person> => {\n    const len = lens[depth]\n    return range(len).map((_d): Person => {\n      return {\n        ...newPerson(),\n        subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined,\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n"
  },
  {
    "path": "examples/react/pagination/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"module\": \"ESNext\",\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"react-jsx\",\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "examples/react/pagination/vite.config.js",
    "content": "import { defineConfig } from 'vite'\nimport react from '@vitejs/plugin-react'\nimport rollupReplace from '@rollup/plugin-replace'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [\n    rollupReplace({\n      preventAssignment: true,\n      values: {\n        __DEV__: JSON.stringify(true),\n        'process.env.NODE_ENV': JSON.stringify('development'),\n      },\n    }),\n    react(),\n  ],\n})\n"
  },
  {
    "path": "examples/react/row-dnd/.gitignore",
    "content": "node_modules\n.DS_Store\ndist\ndist-ssr\n*.local\n"
  },
  {
    "path": "examples/react/row-dnd/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run start` or `yarn start`\n"
  },
  {
    "path": "examples/react/row-dnd/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite App</title>\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n    <script src=\"https://unpkg.com/react-scan/dist/auto.global.js\"></script>\n  </head>\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.tsx\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/react/row-dnd/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-row-dnd\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"start\": \"vite\",\n    \"lint\": \"eslint ./src\",\n    \"test:types\": \"tsc\"\n  },\n  \"dependencies\": {\n    \"@dnd-kit/core\": \"^6.3.1\",\n    \"@dnd-kit/modifiers\": \"^9.0.0\",\n    \"@dnd-kit/sortable\": \"^10.0.0\",\n    \"@dnd-kit/utilities\": \"^3.2.2\",\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"@tanstack/react-table\": \"^9.0.0-alpha.19\",\n    \"react\": \"^19.2.4\",\n    \"react-dom\": \"^19.2.4\"\n  },\n  \"devDependencies\": {\n    \"@rollup/plugin-replace\": \"^6.0.3\",\n    \"@types/react\": \"^19.2.10\",\n    \"@types/react-dom\": \"^19.2.3\",\n    \"@vitejs/plugin-react\": \"^5.1.2\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\"\n  }\n}\n"
  },
  {
    "path": "examples/react/row-dnd/src/index.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntd {\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n  background-color: white;\n}\n\ntd button {\n  padding: 1px 1rem;\n  cursor: grab;\n}\n\ntd:last-child {\n  border-right: 0;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n"
  },
  {
    "path": "examples/react/row-dnd/src/main.tsx",
    "content": "import React from 'react'\nimport ReactDOM from 'react-dom/client'\nimport {\n  FlexRender,\n  columnSizingFeature,\n  createTableHook,\n} from '@tanstack/react-table'\nimport {\n  DndContext,\n  KeyboardSensor,\n  MouseSensor,\n  TouchSensor,\n  closestCenter,\n  useSensor,\n  useSensors,\n} from '@dnd-kit/core'\nimport { restrictToVerticalAxis } from '@dnd-kit/modifiers'\nimport {\n  SortableContext,\n  arrayMove,\n  useSortable,\n  verticalListSortingStrategy,\n} from '@dnd-kit/sortable'\nimport { CSS } from '@dnd-kit/utilities'\nimport { makeData } from './makeData'\nimport type { DragEndEvent, UniqueIdentifier } from '@dnd-kit/core'\nimport type { CSSProperties } from 'react'\nimport type { Person } from './makeData'\nimport type { Row } from '@tanstack/react-table'\nimport './index.css'\n\nconst { appFeatures, useAppTable, createAppColumnHelper } = createTableHook({\n  _features: { columnSizingFeature },\n  _rowModels: {},\n  debugTable: true,\n  debugHeaders: true,\n  debugColumns: true,\n})\n\nconst columnHelper = createAppColumnHelper<Person>()\n\n// Cell Component\nconst RowDragHandleCell = ({ rowId }: { rowId: string }) => {\n  const { attributes, listeners } = useSortable({\n    id: rowId,\n  })\n  return (\n    // Alternatively, you could set these attributes on the rows themselves\n    <button {...attributes} {...listeners}>\n      🟰\n    </button>\n  )\n}\n\n// Row Component\nconst DraggableRow = ({ row }: { row: Row<typeof appFeatures, Person> }) => {\n  const { transform, transition, setNodeRef, isDragging } = useSortable({\n    id: row.original.userId,\n  })\n\n  const style: CSSProperties = {\n    transform: CSS.Translate.toString(transform), // translate instead of transform to avoid squishing\n    transition: transition,\n    opacity: isDragging ? 0.8 : 1,\n    zIndex: isDragging ? 1 : 0,\n    position: 'relative',\n  }\n  return (\n    // connect row ref to dnd-kit, apply important styles\n    <tr ref={setNodeRef} style={style}>\n      {row.getAllCells().map((cell) => (\n        <td key={cell.id} style={{ width: cell.column.getSize() }}>\n          <FlexRender cell={cell} />\n        </td>\n      ))}\n    </tr>\n  )\n}\n\n// Table Component\nfunction App() {\n  const columns = React.useMemo(\n    () =>\n      columnHelper.columns([\n        // Create a dedicated drag handle column. Alternatively, you could just set up dnd events on the rows themselves.\n        columnHelper.display({\n          id: 'drag-handle',\n          header: 'Move',\n          cell: ({ row }) => <RowDragHandleCell rowId={row.id} />,\n          size: 60,\n        }),\n        columnHelper.accessor('firstName', {\n          cell: (info) => info.getValue(),\n          id: 'firstName',\n        }),\n        columnHelper.accessor((row) => row.lastName, {\n          cell: (info) => info.getValue(),\n          header: () => <span>Last Name</span>,\n          id: 'lastName',\n        }),\n        columnHelper.accessor('age', {\n          header: () => 'Age',\n          id: 'age',\n        }),\n        columnHelper.accessor('visits', {\n          header: () => <span>Visits</span>,\n          id: 'visits',\n        }),\n        columnHelper.accessor('status', {\n          header: 'Status',\n          id: 'status',\n        }),\n        columnHelper.accessor('progress', {\n          header: 'Profile Progress',\n          id: 'progress',\n        }),\n      ]),\n    [],\n  )\n  const [data, setData] = React.useState(() => makeData(20))\n\n  const dataIds = React.useMemo<Array<UniqueIdentifier>>(\n    () => data.map(({ userId }) => userId),\n    [data],\n  )\n\n  const rerender = () => setData(() => makeData(20))\n\n  const table = useAppTable(\n    {\n      columns,\n      data,\n      getRowId: (row) => row.userId, // required because row indexes will change\n    },\n    (state) => state,\n  )\n\n  // reorder rows after drag & drop\n  function handleDragEnd(event: DragEndEvent) {\n    const { active, over } = event\n    if (over && active.id !== over.id) {\n      setData((data) => {\n        const oldIndex = dataIds.indexOf(active.id)\n        const newIndex = dataIds.indexOf(over.id)\n        return arrayMove(data, oldIndex, newIndex) // this is just a splice util\n      })\n    }\n  }\n\n  const sensors = useSensors(\n    useSensor(MouseSensor, {}),\n    useSensor(TouchSensor, {}),\n    useSensor(KeyboardSensor, {}),\n  )\n\n  return (\n    // NOTE: This provider creates div elements, so don't nest inside of <table> elements\n    <DndContext\n      collisionDetection={closestCenter}\n      modifiers={[restrictToVerticalAxis]}\n      onDragEnd={handleDragEnd}\n      sensors={sensors}\n    >\n      <div className=\"p-2\">\n        <div className=\"h-4\" />\n        <div className=\"flex flex-wrap gap-2\">\n          <button onClick={() => rerender()} className=\"border p-1\">\n            Regenerate\n          </button>\n        </div>\n        <div className=\"h-4\" />\n        <table>\n          <thead>\n            {table.getHeaderGroups().map((headerGroup) => (\n              <tr key={headerGroup.id}>\n                {headerGroup.headers.map((header) => (\n                  <th key={header.id} colSpan={header.colSpan}>\n                    {header.isPlaceholder ? null : (\n                      <FlexRender header={header} />\n                    )}\n                  </th>\n                ))}\n              </tr>\n            ))}\n          </thead>\n          <tbody>\n            <SortableContext\n              items={dataIds}\n              strategy={verticalListSortingStrategy}\n            >\n              {table.getRowModel().rows.map((row) => (\n                <DraggableRow key={row.id} row={row} />\n              ))}\n            </SortableContext>\n          </tbody>\n        </table>\n        <table.Subscribe selector={(state) => state}>\n          {(state) => <pre>{JSON.stringify(state, null, 2)}</pre>}\n        </table.Subscribe>\n      </div>\n    </DndContext>\n  )\n}\n\nconst rootElement = document.getElementById('root')\nif (!rootElement) throw new Error('Failed to find the root element')\n\nReactDOM.createRoot(rootElement).render(\n  <React.StrictMode>\n    <App />\n  </React.StrictMode>,\n)\n"
  },
  {
    "path": "examples/react/row-dnd/src/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = {\n  userId: string\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  subRows?: Array<Person>\n}\n\nconst range = (len: number) => {\n  const arr: Array<number> = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (): Person => {\n  return {\n    userId: faker.string.uuid(),\n    firstName: faker.person.firstName(),\n    lastName: faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: faker.number.int(1000),\n    progress: faker.number.int(100),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0],\n  }\n}\n\nexport function makeData(...lens: Array<number>) {\n  const makeDataLevel = (depth = 0): Array<Person> => {\n    const len = lens[depth]\n    return range(len).map((_d): Person => {\n      return {\n        ...newPerson(),\n        subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined,\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n"
  },
  {
    "path": "examples/react/row-dnd/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"module\": \"ESNext\",\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"react-jsx\",\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "examples/react/row-dnd/vite.config.js",
    "content": "import { defineConfig } from 'vite'\nimport react from '@vitejs/plugin-react'\nimport rollupReplace from '@rollup/plugin-replace'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [\n    rollupReplace({\n      preventAssignment: true,\n      values: {\n        __DEV__: JSON.stringify(true),\n        'process.env.NODE_ENV': JSON.stringify('development'),\n      },\n    }),\n    react(),\n  ],\n})\n"
  },
  {
    "path": "examples/react/row-pinning/.gitignore",
    "content": "node_modules\n.DS_Store\ndist\ndist-ssr\n*.local\n"
  },
  {
    "path": "examples/react/row-pinning/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run start` or `yarn start`\n"
  },
  {
    "path": "examples/react/row-pinning/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite App</title>\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n    <script src=\"https://unpkg.com/react-scan/dist/auto.global.js\"></script>\n  </head>\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.tsx\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/react/row-pinning/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-row-pinning\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"start\": \"vite\",\n    \"lint\": \"eslint ./src\",\n    \"test:types\": \"tsc\"\n  },\n  \"dependencies\": {\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"@tanstack/react-table\": \"^9.0.0-alpha.19\",\n    \"react\": \"^19.2.4\",\n    \"react-dom\": \"^19.2.4\"\n  },\n  \"devDependencies\": {\n    \"@rollup/plugin-replace\": \"^6.0.3\",\n    \"@types/react\": \"^19.2.10\",\n    \"@types/react-dom\": \"^19.2.3\",\n    \"@vitejs/plugin-react\": \"^5.1.2\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\"\n  }\n}\n"
  },
  {
    "path": "examples/react/row-pinning/src/index.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\nthead {\n  background: lightgray;\n  margin: 0;\n  position: sticky;\n  top: 0;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntd {\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntd:last-child {\n  border-right: 0;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n\n.container {\n  border: 1px solid lightgray;\n  height: 500px;\n  max-width: 900px !important;\n  overflow: auto;\n}\n"
  },
  {
    "path": "examples/react/row-pinning/src/main.tsx",
    "content": "import React from 'react'\nimport ReactDOM from 'react-dom/client'\nimport {\n  columnFilteringFeature,\n  createExpandedRowModel,\n  createFilteredRowModel,\n  createPaginatedRowModel,\n  filterFns,\n  rowExpandingFeature,\n  rowPaginationFeature,\n  rowPinningFeature,\n  tableFeatures,\n  useTable,\n} from '@tanstack/react-table'\nimport { makeData } from './makeData'\nimport type { Person } from './makeData'\nimport type {\n  Column,\n  ColumnDef,\n  ExpandedState,\n  ReactTable,\n  Row,\n  RowPinningState,\n} from '@tanstack/react-table'\nimport './index.css'\n\nconst _features = tableFeatures({\n  rowPinningFeature,\n  rowExpandingFeature,\n  columnFilteringFeature,\n  rowPaginationFeature,\n})\n\nfunction App() {\n  const rerender = React.useReducer(() => ({}), {})[1]\n\n  // table states\n  const [rowPinning, setRowPinning] = React.useState<RowPinningState>({\n    top: [],\n    bottom: [],\n  })\n  const [expanded, setExpanded] = React.useState<ExpandedState>({})\n\n  // demo states\n  const [keepPinnedRows, setKeepPinnedRows] = React.useState(true)\n  const [includeLeafRows, setIncludeLeafRows] = React.useState(true)\n  const [includeParentRows, setIncludeParentRows] = React.useState(false)\n  const [copyPinnedRows, setCopyPinnedRows] = React.useState(false)\n\n  const columns = React.useMemo<Array<ColumnDef<typeof _features, Person>>>(\n    () => [\n      {\n        id: 'pin',\n        header: () => 'Pin',\n        cell: ({ row }) =>\n          row.getIsPinned() ? (\n            <button\n              onClick={() => row.pin(false, includeLeafRows, includeParentRows)}\n            >\n              ❌\n            </button>\n          ) : (\n            <div style={{ display: 'flex', gap: '4px' }}>\n              <button\n                onClick={() =>\n                  row.pin('top', includeLeafRows, includeParentRows)\n                }\n              >\n                ⬆️\n              </button>\n              <button\n                onClick={() =>\n                  row.pin('bottom', includeLeafRows, includeParentRows)\n                }\n              >\n                ⬇️\n              </button>\n            </div>\n          ),\n      },\n      {\n        accessorKey: 'firstName',\n        header: ({ table }) => (\n          <>\n            <button onClick={table.getToggleAllRowsExpandedHandler()}>\n              {table.getIsAllRowsExpanded() ? '👇' : '👉'}\n            </button>{' '}\n            First Name\n          </>\n        ),\n        cell: ({ row, getValue }) => (\n          <div\n            style={{\n              // Since rows are flattened by default,\n              // we can use the row.depth property\n              // and paddingLeft to visually indicate the depth\n              // of the row\n              paddingLeft: `${row.depth * 2}rem`,\n            }}\n          >\n            <>\n              {row.getCanExpand() ? (\n                <button\n                  onClick={row.getToggleExpandedHandler()}\n                  style={{ cursor: 'pointer' }}\n                >\n                  {row.getIsExpanded() ? '👇' : '👉'}\n                </button>\n              ) : (\n                '🔵'\n              )}{' '}\n              {getValue()}\n            </>\n          </div>\n        ),\n        footer: (props) => props.column.id,\n      },\n      {\n        accessorFn: (row) => row.lastName,\n        id: 'lastName',\n        cell: (info) => info.getValue(),\n        header: () => <span>Last Name</span>,\n      },\n      {\n        accessorKey: 'age',\n        header: () => 'Age',\n        size: 50,\n      },\n      {\n        accessorKey: 'visits',\n        header: () => <span>Visits</span>,\n        size: 50,\n      },\n      {\n        accessorKey: 'status',\n        header: 'Status',\n      },\n      {\n        accessorKey: 'progress',\n        header: 'Profile Progress',\n        size: 80,\n      },\n    ],\n    [includeLeafRows, includeParentRows],\n  )\n\n  const [data, setData] = React.useState(() => makeData(1000, 2, 2))\n  const refreshData = () => setData(() => makeData(1000, 2, 2))\n\n  const table = useTable(\n    {\n      _features,\n      _rowModels: {\n        filteredRowModel: createFilteredRowModel(filterFns),\n        expandedRowModel: createExpandedRowModel(),\n        paginatedRowModel: createPaginatedRowModel(),\n      },\n      columns,\n      data,\n      initialState: { pagination: { pageSize: 20, pageIndex: 0 } },\n      state: {\n        expanded,\n        rowPinning,\n      },\n      onExpandedChange: setExpanded,\n      onRowPinningChange: setRowPinning,\n      getSubRows: (row) => row.subRows,\n      keepPinnedRows,\n      debugAll: true,\n    },\n    (state) => state, // subscribe to all re-renders\n  )\n\n  // console.log(table.getBottomRows)\n  // React.useEffect(() => {\n  //   console.log(table.getBottomRows())\n  // }, [table.getBottomRows()])\n\n  return (\n    <div className=\"app\">\n      <div className=\"p-2 container\">\n        <div className=\"h-2\" />\n        <table>\n          <thead>\n            {table.getHeaderGroups().map((headerGroup) => (\n              <tr key={headerGroup.id}>\n                {headerGroup.headers.map((header) => {\n                  return (\n                    <th key={header.id} colSpan={header.colSpan}>\n                      {header.isPlaceholder ? null : (\n                        <>\n                          <table.FlexRender header={header} />\n                          {header.column.getCanFilter() ? (\n                            <div>\n                              <Filter column={header.column} table={table} />\n                            </div>\n                          ) : null}\n                        </>\n                      )}\n                    </th>\n                  )\n                })}\n              </tr>\n            ))}\n          </thead>\n          <tbody>\n            {table.getTopRows().map((row) => (\n              <PinnedRow key={row.id} row={row} table={table} />\n            ))}\n            {(copyPinnedRows\n              ? table.getRowModel().rows\n              : table.getCenterRows()\n            ).map((row) => {\n              return (\n                <tr key={row.id}>\n                  {row.getAllCells().map((cell) => {\n                    return (\n                      <td key={cell.id}>\n                        <table.FlexRender cell={cell} />\n                      </td>\n                    )\n                  })}\n                </tr>\n              )\n            })}\n            {table.getBottomRows().map((row) => (\n              <PinnedRow key={row.id} row={row} table={table} />\n            ))}\n          </tbody>\n        </table>\n      </div>\n\n      <div className=\"h-2\" />\n      <div className=\"flex items-center gap-2\">\n        <button\n          className=\"border rounded p-1\"\n          onClick={() => table.setPageIndex(0)}\n          disabled={!table.getCanPreviousPage()}\n        >\n          {'<<'}\n        </button>\n        <button\n          className=\"border rounded p-1\"\n          onClick={() => table.previousPage()}\n          disabled={!table.getCanPreviousPage()}\n        >\n          {'<'}\n        </button>\n        <button\n          className=\"border rounded p-1\"\n          onClick={() => table.nextPage()}\n          disabled={!table.getCanNextPage()}\n        >\n          {'>'}\n        </button>\n        <button\n          className=\"border rounded p-1\"\n          onClick={() => table.setPageIndex(table.getPageCount() - 1)}\n          disabled={!table.getCanNextPage()}\n        >\n          {'>>'}\n        </button>\n        <span className=\"flex items-center gap-1\">\n          <div>Page</div>\n          <strong>\n            {table.store.state.pagination.pageIndex + 1} of{' '}\n            {table.getPageCount()}\n          </strong>\n        </span>\n        <span className=\"flex items-center gap-1\">\n          | Go to page:\n          <input\n            type=\"number\"\n            min=\"1\"\n            max={table.getPageCount()}\n            defaultValue={table.store.state.pagination.pageIndex + 1}\n            onChange={(e) => {\n              const page = e.target.value ? Number(e.target.value) - 1 : 0\n              table.setPageIndex(page)\n            }}\n            className=\"border p-1 rounded w-16\"\n          />\n        </span>\n        <select\n          value={table.store.state.pagination.pageSize}\n          onChange={(e) => {\n            table.setPageSize(Number(e.target.value))\n          }}\n        >\n          {[10, 20, 30, 40, 50].map((pageSize) => (\n            <option key={pageSize} value={pageSize}>\n              Show {pageSize}\n            </option>\n          ))}\n        </select>\n      </div>\n      <div className=\"h-2\" />\n      <hr />\n      <br />\n      <div className=\"flex flex-col gap-2 align-center vertical\">\n        <div>\n          <input\n            type=\"checkbox\"\n            checked={keepPinnedRows}\n            onChange={() => setKeepPinnedRows(!keepPinnedRows)}\n          />\n          <label className=\"ml-2\">\n            Keep/Persist Pinned Rows across Pagination and Filtering\n          </label>\n        </div>\n        <div>\n          <input\n            type=\"checkbox\"\n            checked={includeLeafRows}\n            onChange={() => setIncludeLeafRows(!includeLeafRows)}\n          />\n          <label className=\"ml-2\">Include Leaf Rows When Pinning Parent</label>\n        </div>\n        <div>\n          <input\n            type=\"checkbox\"\n            checked={includeParentRows}\n            onChange={() => setIncludeParentRows(!includeParentRows)}\n          />\n          <label className=\"ml-2\">Include Parent Rows When Pinning Child</label>\n        </div>\n        <div>\n          <input\n            type=\"checkbox\"\n            checked={copyPinnedRows}\n            onChange={() => setCopyPinnedRows(!copyPinnedRows)}\n          />\n          <label className=\"ml-2\">\n            Duplicate/Keep Pinned Rows in main table\n          </label>\n        </div>\n      </div>\n      <div>\n        <button className=\"border rounded p-2 mb-2\" onClick={() => rerender()}>\n          Force Rerender\n        </button>\n      </div>\n      <div>\n        <button\n          className=\"border rounded p-2 mb-2\"\n          onClick={() => refreshData()}\n        >\n          Refresh Data\n        </button>\n      </div>\n      <div>{JSON.stringify(rowPinning, null, 2)}</div>\n    </div>\n  )\n}\n\nfunction PinnedRow({\n  row,\n  table,\n}: {\n  row: Row<typeof _features, Person>\n  table: ReactTable<typeof _features, Person>\n}) {\n  return (\n    <tr\n      style={{\n        backgroundColor: 'lightblue',\n        position: 'sticky',\n        top:\n          row.getIsPinned() === 'top'\n            ? `${row.getPinnedIndex() * 26 + 48}px`\n            : undefined,\n        bottom:\n          row.getIsPinned() === 'bottom'\n            ? `${\n                (table.getBottomRows().length - 1 - row.getPinnedIndex()) * 26\n              }px`\n            : undefined,\n      }}\n    >\n      {row.getAllCells().map((cell) => {\n        return (\n          <td key={cell.id}>\n            <table.FlexRender cell={cell} />\n          </td>\n        )\n      })}\n    </tr>\n  )\n}\n\nfunction Filter({\n  column,\n  table,\n}: {\n  column: Column<typeof _features, Person>\n  table: ReactTable<typeof _features, Person>\n}) {\n  const firstValue = table\n    .getPreFilteredRowModel()\n    .flatRows[0]?.getValue(column.id)\n\n  return typeof firstValue === 'number' ? (\n    <div className=\"flex space-x-2\">\n      <input\n        type=\"number\"\n        value={((column.getFilterValue() as any)?.[0] ?? '') as string}\n        onChange={(e) =>\n          column.setFilterValue((old: any) => [e.target.value, old?.[1]])\n        }\n        placeholder={`Min`}\n        className=\"w-24 border shadow rounded\"\n      />\n      <input\n        type=\"number\"\n        value={((column.getFilterValue() as any)?.[1] ?? '') as string}\n        onChange={(e) =>\n          column.setFilterValue((old: any) => [old?.[0], e.target.value])\n        }\n        placeholder={`Max`}\n        className=\"w-24 border shadow rounded\"\n      />\n    </div>\n  ) : (\n    <input\n      type=\"text\"\n      value={(column.getFilterValue() ?? '') as string}\n      onChange={(e) => column.setFilterValue(e.target.value)}\n      placeholder={`Search...`}\n      className=\"w-36 border shadow rounded\"\n    />\n  )\n}\n\nconst rootElement = document.getElementById('root')\nif (!rootElement) throw new Error('Failed to find the root element')\n\nReactDOM.createRoot(rootElement).render(\n  <React.StrictMode>\n    <App />\n  </React.StrictMode>,\n)\n"
  },
  {
    "path": "examples/react/row-pinning/src/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  subRows?: Array<Person>\n}\n\nconst range = (len: number) => {\n  const arr: Array<number> = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (): Person => {\n  return {\n    firstName: faker.person.firstName(),\n    lastName: faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: faker.number.int(1000),\n    progress: faker.number.int(100),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0],\n  }\n}\n\nexport function makeData(...lens: Array<number>) {\n  const makeDataLevel = (depth = 0): Array<Person> => {\n    const len = lens[depth]\n    return range(len).map((_d): Person => {\n      return {\n        ...newPerson(),\n        subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined,\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n"
  },
  {
    "path": "examples/react/row-pinning/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"module\": \"ESNext\",\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"react-jsx\",\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "examples/react/row-pinning/vite.config.js",
    "content": "import { defineConfig } from 'vite'\nimport react from '@vitejs/plugin-react'\nimport rollupReplace from '@rollup/plugin-replace'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [\n    rollupReplace({\n      preventAssignment: true,\n      values: {\n        __DEV__: JSON.stringify(true),\n        'process.env.NODE_ENV': JSON.stringify('development'),\n      },\n    }),\n    react(),\n  ],\n})\n"
  },
  {
    "path": "examples/react/row-selection/.gitignore",
    "content": "node_modules\n.DS_Store\ndist\ndist-ssr\n*.local\n"
  },
  {
    "path": "examples/react/row-selection/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run start` or `yarn start`\n"
  },
  {
    "path": "examples/react/row-selection/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite App</title>\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n    <script src=\"https://unpkg.com/react-scan/dist/auto.global.js\"></script>\n  </head>\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.tsx\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/react/row-selection/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-row-selection\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"start\": \"vite\",\n    \"lint\": \"eslint ./src\",\n    \"test:types\": \"tsc\"\n  },\n  \"dependencies\": {\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"@tanstack/react-store\": \"^0.9.2\",\n    \"@tanstack/react-table\": \"^9.0.0-alpha.19\",\n    \"react\": \"^19.2.4\",\n    \"react-dom\": \"^19.2.4\"\n  },\n  \"devDependencies\": {\n    \"@rollup/plugin-replace\": \"^6.0.3\",\n    \"@tanstack/react-devtools\": \"0.9.6\",\n    \"@tanstack/react-table-devtools\": \"9.0.0-alpha.11\",\n    \"@types/react\": \"^19.2.10\",\n    \"@types/react-dom\": \"^19.2.3\",\n    \"@vitejs/plugin-react\": \"^5.1.2\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\"\n  }\n}\n"
  },
  {
    "path": "examples/react/row-selection/src/index.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n\nbutton:disabled,\nbutton[disabled] {\n  opacity: 0.5;\n  cursor: not-allowed;\n  pointer-events: none;\n}\n"
  },
  {
    "path": "examples/react/row-selection/src/main.tsx",
    "content": "import React from 'react'\nimport ReactDOM from 'react-dom/client'\nimport {\n  columnFilteringFeature,\n  createColumnHelper,\n  createFilteredRowModel,\n  createPaginatedRowModel,\n  filterFns,\n  globalFilteringFeature,\n  rowPaginationFeature,\n  rowSelectionFeature,\n  tableFeatures,\n  useTable,\n} from '@tanstack/react-table'\nimport { tableDevtoolsPlugin } from '@tanstack/react-table-devtools'\nimport { TanStackDevtools } from '@tanstack/react-devtools'\nimport { makeData } from './makeData'\nimport type { HTMLProps } from 'react'\nimport type { Person } from './makeData'\nimport type { Column, Table } from '@tanstack/react-table'\nimport './index.css'\n\nconst _features = tableFeatures({\n  rowPaginationFeature,\n  rowSelectionFeature,\n  columnFilteringFeature,\n  globalFilteringFeature,\n})\n\nconst columnHelper = createColumnHelper<typeof _features, Person>()\n\nfunction App() {\n  const rerender = React.useReducer(() => ({}), {})[1]\n\n  const columns = React.useMemo(\n    () =>\n      columnHelper.columns([\n        columnHelper.display({\n          id: 'select',\n          header: () => {\n            return (\n              <table.Subscribe selector={(state) => state.rowSelection}>\n                {() => (\n                  <IndeterminateCheckbox\n                    checked={table.getIsAllRowsSelected()}\n                    indeterminate={table.getIsSomeRowsSelected()}\n                    onChange={table.getToggleAllRowsSelectedHandler()}\n                  />\n                )}\n              </table.Subscribe>\n            )\n          },\n          cell: ({ row }) => (\n            <div className=\"px-1\">\n              <IndeterminateCheckbox\n                checked={row.getIsSelected()}\n                disabled={!row.getCanSelect()}\n                indeterminate={row.getIsSomeSelected()}\n                onChange={row.getToggleSelectedHandler()}\n              />\n            </div>\n          ),\n        }),\n        columnHelper.accessor('firstName', {\n          header: 'First Name',\n          cell: (info) => info.getValue(),\n          footer: (props) => props.column.id,\n        }),\n        columnHelper.accessor((row) => row.lastName, {\n          id: 'lastName',\n          header: () => <span>Last Name</span>,\n          cell: (info) => info.getValue(),\n          footer: (props) => props.column.id,\n        }),\n        columnHelper.accessor('age', {\n          header: () => 'Age',\n          footer: (props) => props.column.id,\n        }),\n        columnHelper.accessor('visits', {\n          header: () => <span>Visits</span>,\n          footer: (props) => props.column.id,\n        }),\n        columnHelper.accessor('status', {\n          header: 'Status',\n          footer: (props) => props.column.id,\n        }),\n        columnHelper.accessor('progress', {\n          header: 'Profile Progress',\n          footer: (props) => props.column.id,\n        }),\n      ]),\n    [],\n  )\n\n  const [data, setData] = React.useState(() => makeData(1_000))\n  const refreshData = () => setData(() => makeData(100_000)) // stress test\n\n  const table = useTable(\n    {\n      _features,\n      _rowModels: {\n        filteredRowModel: createFilteredRowModel(filterFns),\n        paginatedRowModel: createPaginatedRowModel(),\n      },\n      columns,\n      data,\n      getRowId: (row) => row.id,\n      enableRowSelection: true, // enable row selection for all rows\n      // enableRowSelection: row => row.original.age > 18, // or enable row selection conditionally per row\n      debugTable: true,\n    },\n    // (state) => state, // uncomment to subscribe to the entire table state (this is how v8 used to work by default)\n  )\n\n  return (\n    <>\n      <table.Subscribe\n        selector={(state) => ({\n          // don't include row selection state to optimize re-renders\n          columnFilters: state.columnFilters,\n          globalFilter: state.globalFilter,\n          pagination: state.pagination,\n        })}\n      >\n        {(state) => (\n          <div className=\"p-2\">\n            <div>\n              <input\n                value={state.globalFilter ?? ''}\n                onChange={(e) => table.setGlobalFilter(e.target.value)}\n                className=\"p-2 font-lg shadow border border-block\"\n                placeholder=\"Search all columns...\"\n              />\n            </div>\n            <div className=\"h-2\" />\n            <table>\n              <thead>\n                {table.getHeaderGroups().map((headerGroup) => (\n                  <tr key={headerGroup.id}>\n                    {headerGroup.headers.map((header) => {\n                      return (\n                        <th key={header.id} colSpan={header.colSpan}>\n                          {header.isPlaceholder ? null : (\n                            <>\n                              <table.FlexRender header={header} />\n                              {header.column.getCanFilter() ? (\n                                <div>\n                                  <Filter\n                                    column={header.column}\n                                    table={table}\n                                  />\n                                </div>\n                              ) : null}\n                            </>\n                          )}\n                        </th>\n                      )\n                    })}\n                  </tr>\n                ))}\n              </thead>\n              <tbody>\n                {table.getRowModel().rows.map((row) => {\n                  return (\n                    <table.Subscribe\n                      key={row.id}\n                      selector={(state) => state.rowSelection[row.id]} // only re-render row when row selection changes (could down move to cell render too)\n                    >\n                      {() => (\n                        <tr key={row.id}>\n                          {row.getAllCells().map((cell) => {\n                            return (\n                              <td key={cell.id}>\n                                <table.FlexRender cell={cell} />\n                              </td>\n                            )\n                          })}\n                        </tr>\n                      )}\n                    </table.Subscribe>\n                  )\n                })}\n              </tbody>\n              <tfoot>\n                <tr>\n                  <td className=\"p-1\">\n                    <table.Subscribe selector={(state) => state.rowSelection}>\n                      {() => (\n                        <IndeterminateCheckbox\n                          checked={table.getIsAllPageRowsSelected()}\n                          indeterminate={table.getIsSomePageRowsSelected()}\n                          onChange={table.getToggleAllPageRowsSelectedHandler()}\n                        />\n                      )}\n                    </table.Subscribe>\n                  </td>\n                  <td colSpan={20}>\n                    Page Rows ({table.getRowModel().rows.length})\n                  </td>\n                </tr>\n              </tfoot>\n            </table>\n            <div className=\"h-2\" />\n            <div className=\"flex items-center gap-2\">\n              <button\n                className=\"border rounded p-1\"\n                onClick={() => table.setPageIndex(0)}\n                disabled={!table.getCanPreviousPage()}\n              >\n                {'<<'}\n              </button>\n              <button\n                className=\"border rounded p-1\"\n                onClick={() => table.previousPage()}\n                disabled={!table.getCanPreviousPage()}\n              >\n                {'<'}\n              </button>\n              <button\n                className=\"border rounded p-1\"\n                onClick={() => table.nextPage()}\n                disabled={!table.getCanNextPage()}\n              >\n                {'>'}\n              </button>\n              <button\n                className=\"border rounded p-1\"\n                onClick={() => table.setPageIndex(table.getPageCount() - 1)}\n                disabled={!table.getCanNextPage()}\n              >\n                {'>>'}\n              </button>\n              <span className=\"flex items-center gap-1\">\n                <div>Page</div>\n                <strong>\n                  {table.store.state.pagination.pageIndex + 1} of{' '}\n                  {table.getPageCount()}\n                </strong>\n              </span>\n              <span className=\"flex items-center gap-1\">\n                | Go to page:\n                <input\n                  type=\"number\"\n                  min=\"1\"\n                  max={table.getPageCount()}\n                  defaultValue={table.store.state.pagination.pageIndex + 1}\n                  onChange={(e) => {\n                    const page = e.target.value ? Number(e.target.value) - 1 : 0\n                    table.setPageIndex(page)\n                  }}\n                  className=\"border p-1 rounded w-16\"\n                />\n              </span>\n              <select\n                value={table.store.state.pagination.pageSize}\n                onChange={(e) => {\n                  table.setPageSize(Number(e.target.value))\n                }}\n              >\n                {[10, 20, 30, 40, 50].map((pageSize) => (\n                  <option key={pageSize} value={pageSize}>\n                    Show {pageSize}\n                  </option>\n                ))}\n              </select>\n            </div>\n            <br />\n            <div>\n              <table.Subscribe\n                selector={(state) => ({\n                  numSelected: Object.keys(state.rowSelection).length,\n                })}\n              >\n                {({ numSelected }) => <>{numSelected} of </>}\n              </table.Subscribe>\n              {table.getPreFilteredRowModel().rows.length} Total Rows Selected\n            </div>\n            <hr />\n            <br />\n            <div>\n              <button\n                className=\"border rounded p-2 mb-2\"\n                onClick={() => rerender()}\n              >\n                Force Rerender\n              </button>\n            </div>\n            <div>\n              <button\n                className=\"border rounded p-2 mb-2\"\n                onClick={() => refreshData()}\n              >\n                Refresh Data\n              </button>\n            </div>\n            <div>\n              <button\n                className=\"border rounded p-2 mb-2\"\n                onClick={() =>\n                  console.info(\n                    'table.getSelectedRowModel().flatRows',\n                    table.getSelectedRowModel().flatRows,\n                  )\n                }\n              >\n                Log table.getSelectedRowModel().flatRows\n              </button>\n            </div>\n            <div>\n              <label>Row Selection State:</label>\n              <table.Subscribe selector={(state) => state}>\n                {(state) => <pre>{JSON.stringify(state, null, 2)}</pre>}\n              </table.Subscribe>\n            </div>\n          </div>\n        )}\n      </table.Subscribe>\n      <TanStackDevtools plugins={[tableDevtoolsPlugin({ table })]} />\n    </>\n  )\n}\n\nfunction Filter({\n  column,\n  table,\n}: {\n  column: Column<typeof _features, Person>\n  table: Table<typeof _features, Person>\n}) {\n  const firstValue = table\n    .getPreFilteredRowModel()\n    .flatRows[0]?.getValue(column.id)\n\n  return typeof firstValue === 'number' ? (\n    <div className=\"flex space-x-2\">\n      <input\n        type=\"number\"\n        value={((column.getFilterValue() as any)?.[0] ?? '') as string}\n        onChange={(e) =>\n          column.setFilterValue((old: any) => [e.target.value, old?.[1]])\n        }\n        placeholder={`Min`}\n        className=\"w-24 border shadow rounded\"\n      />\n      <input\n        type=\"number\"\n        value={((column.getFilterValue() as any)?.[1] ?? '') as string}\n        onChange={(e) =>\n          column.setFilterValue((old: any) => [old?.[0], e.target.value])\n        }\n        placeholder={`Max`}\n        className=\"w-24 border shadow rounded\"\n      />\n    </div>\n  ) : (\n    <input\n      type=\"text\"\n      value={(column.getFilterValue() ?? '') as string}\n      onChange={(e) => column.setFilterValue(e.target.value)}\n      placeholder={`Search...`}\n      className=\"w-36 border shadow rounded\"\n    />\n  )\n}\n\nfunction IndeterminateCheckbox({\n  indeterminate,\n  className = '',\n  ...rest\n}: { indeterminate?: boolean } & HTMLProps<HTMLInputElement>) {\n  const ref = React.useRef<HTMLInputElement>(null!)\n\n  React.useEffect(() => {\n    if (typeof indeterminate === 'boolean') {\n      ref.current.indeterminate = !rest.checked && indeterminate\n    }\n  }, [ref, indeterminate])\n\n  return (\n    <input\n      type=\"checkbox\"\n      ref={ref}\n      className={className + ' cursor-pointer'}\n      {...rest}\n    />\n  )\n}\n\nconst rootElement = document.getElementById('root')\nif (!rootElement) throw new Error('Failed to find the root element')\n\nReactDOM.createRoot(rootElement).render(\n  <React.StrictMode>\n    <App />\n  </React.StrictMode>,\n)\n"
  },
  {
    "path": "examples/react/row-selection/src/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = {\n  id: string\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  subRows?: Array<Person>\n}\n\nconst range = (len: number) => {\n  const arr: Array<number> = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (): Person => {\n  return {\n    id: faker.string.uuid(),\n    firstName: faker.person.firstName(),\n    lastName: faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: faker.number.int(1000),\n    progress: faker.number.int(100),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0],\n  }\n}\n\nexport function makeData(...lens: Array<number>) {\n  const makeDataLevel = (depth = 0): Array<Person> => {\n    const len = lens[depth]\n    return range(len).map((_d): Person => {\n      return {\n        ...newPerson(),\n        subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined,\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n"
  },
  {
    "path": "examples/react/row-selection/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"module\": \"ESNext\",\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"react-jsx\",\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "examples/react/row-selection/vite.config.js",
    "content": "import { defineConfig } from 'vite'\nimport react from '@vitejs/plugin-react'\nimport rollupReplace from '@rollup/plugin-replace'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [\n    rollupReplace({\n      preventAssignment: true,\n      values: {\n        __DEV__: JSON.stringify(true),\n        'process.env.NODE_ENV': JSON.stringify('development'),\n      },\n    }),\n    react(),\n  ],\n})\n"
  },
  {
    "path": "examples/react/sorting/.gitignore",
    "content": "node_modules\n.DS_Store\ndist\ndist-ssr\n*.local\n"
  },
  {
    "path": "examples/react/sorting/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run start` or `yarn start`\n"
  },
  {
    "path": "examples/react/sorting/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite App</title>\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n    <script src=\"https://unpkg.com/react-scan/dist/auto.global.js\"></script>\n  </head>\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.tsx\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/react/sorting/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-sorting\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"start\": \"vite\",\n    \"lint\": \"eslint ./src\",\n    \"test:types\": \"tsc\"\n  },\n  \"dependencies\": {\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"@tanstack/react-table\": \"^9.0.0-alpha.19\",\n    \"react\": \"^19.2.4\",\n    \"react-dom\": \"^19.2.4\"\n  },\n  \"devDependencies\": {\n    \"@rollup/plugin-replace\": \"^6.0.3\",\n    \"@types/react\": \"^19.2.10\",\n    \"@types/react-dom\": \"^19.2.3\",\n    \"@vitejs/plugin-react\": \"^5.1.2\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\"\n  }\n}\n"
  },
  {
    "path": "examples/react/sorting/src/index.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n"
  },
  {
    "path": "examples/react/sorting/src/main.tsx",
    "content": "import React from 'react'\nimport ReactDOM from 'react-dom/client'\nimport './index.css'\nimport {\n  createColumnHelper,\n  createSortedRowModel,\n  rowSortingFeature,\n  sortFns,\n  tableFeatures,\n  useTable,\n} from '@tanstack/react-table'\nimport { makeData } from './makeData'\nimport type { SortFn } from '@tanstack/react-table'\nimport type { Person } from './makeData'\n\nconst _features = tableFeatures({\n  rowSortingFeature,\n})\n\nconst columnHelper = createColumnHelper<typeof _features, Person>()\n\n// custom sorting logic for one of our enum columns\nconst sortStatusFn: SortFn<any, any> = (rowA, rowB, _columnId) => {\n  const statusA = rowA.original.status\n  const statusB = rowB.original.status\n  const statusOrder = ['single', 'complicated', 'relationship']\n  return statusOrder.indexOf(statusA) - statusOrder.indexOf(statusB)\n}\n\nfunction App() {\n  const rerender = React.useReducer(() => ({}), {})[1]\n\n  const columns = React.useMemo(\n    () =>\n      columnHelper.columns([\n        columnHelper.accessor('firstName', {\n          cell: (info) => info.getValue(),\n          // this column will sort in ascending order by default since it is a string column\n        }),\n        columnHelper.accessor((row) => row.lastName, {\n          id: 'lastName',\n          cell: (info) => info.getValue(),\n          header: () => <span>Last Name</span>,\n          sortUndefined: 'last', // force undefined values to the end\n          sortDescFirst: false, // first sort order will be ascending (nullable values can mess up auto detection of sort order)\n        }),\n        columnHelper.accessor('age', {\n          header: () => 'Age',\n          // this column will sort in descending order by default since it is a number column\n        }),\n        columnHelper.accessor('visits', {\n          header: () => <span>Visits</span>,\n          sortUndefined: 'last', // force undefined values to the end\n        }),\n        columnHelper.accessor('status', {\n          header: 'Status',\n          sortFn: sortStatusFn, // use our custom sorting function for this enum column\n        }),\n        columnHelper.accessor('progress', {\n          header: 'Profile Progress',\n          // enableSorting: false, //disable sorting for this column\n        }),\n        columnHelper.accessor('rank', {\n          header: 'Rank',\n          invertSorting: true, // invert the sorting order (golf score-like where smaller is better)\n        }),\n        columnHelper.accessor('createdAt', {\n          header: 'Created At',\n          // sortFn: 'datetime' //make sure table knows this is a datetime column (usually can detect if no null values)\n        }),\n      ]),\n    [],\n  )\n\n  const [data, setData] = React.useState(() => makeData(1_000))\n  const refreshData = () => setData(() => makeData(100_000)) // stress test with 100k rows\n\n  const table = useTable(\n    {\n      _features,\n      _rowModels: {\n        sortedRowModel: createSortedRowModel(sortFns), // client-side sorting\n      },\n      columns,\n      data,\n      debugTable: true,\n      // no need to pass pageCount or rowCount with client-side pagination as it is calculated automatically\n      // autoResetPageIndex: false, // turn off page index reset when sorting or filtering - default on/true\n      // enableMultiSort: false, //Don't allow shift key to sort multiple columns - default on/true\n      // enableSorting: false, // - default on/true\n      // enableSortingRemoval: false, //Don't allow - default on/true\n      // isMultiSortEvent: (e) => true, //Make all clicks multi-sort - default requires `shift` key\n      // maxMultiSortColCount: 3, // only allow 3 columns to be sorted at once - default is Infinity\n    },\n    // (state) => state, // uncomment to subscribe to the entire table state (this is how v8 used to work by default)\n  )\n\n  return (\n    <table.Subscribe selector={(state) => ({ sorting: state.sorting })}>\n      {(_state) => (\n        <div className=\"p-2\">\n          <div className=\"h-2\" />\n          <table>\n            <thead>\n              {table.getHeaderGroups().map((headerGroup) => (\n                <tr key={headerGroup.id}>\n                  {headerGroup.headers.map((header) => {\n                    return (\n                      <th key={header.id} colSpan={header.colSpan}>\n                        {header.isPlaceholder ? null : (\n                          <div\n                            className={\n                              header.column.getCanSort()\n                                ? 'cursor-pointer select-none'\n                                : ''\n                            }\n                            onClick={header.column.getToggleSortingHandler()}\n                            title={\n                              header.column.getCanSort()\n                                ? header.column.getNextSortingOrder() === 'asc'\n                                  ? 'Sort ascending'\n                                  : header.column.getNextSortingOrder() ===\n                                      'desc'\n                                    ? 'Sort descending'\n                                    : 'Clear sort'\n                                : undefined\n                            }\n                          >\n                            <table.FlexRender header={header} />\n                            {{\n                              asc: ' 🔼',\n                              desc: ' 🔽',\n                            }[header.column.getIsSorted() as string] ?? null}\n                          </div>\n                        )}\n                      </th>\n                    )\n                  })}\n                </tr>\n              ))}\n            </thead>\n            <tbody>\n              {table\n                .getRowModel()\n                .rows.slice(0, 10)\n                .map((row) => {\n                  return (\n                    <tr key={row.id}>\n                      {row.getAllCells().map((cell) => {\n                        return (\n                          <td key={cell.id}>\n                            <table.FlexRender cell={cell} />\n                          </td>\n                        )\n                      })}\n                    </tr>\n                  )\n                })}\n            </tbody>\n          </table>\n          <div>{table.getRowModel().rows.length.toLocaleString()} Rows</div>\n          <div>\n            <button onClick={() => rerender()}>Force Rerender</button>\n          </div>\n          <div>\n            <button onClick={() => refreshData()}>Refresh Data</button>\n          </div>\n          <table.Subscribe selector={(state) => state}>\n            {(state) => <pre>{JSON.stringify(state, null, 2)}</pre>}\n          </table.Subscribe>\n        </div>\n      )}\n    </table.Subscribe>\n  )\n}\n\nconst rootElement = document.getElementById('root')\n\nif (!rootElement) throw new Error('Failed to find the root element')\n\nReactDOM.createRoot(rootElement).render(\n  // <React.StrictMode>\n  <App />,\n  // </React.StrictMode>,\n)\n"
  },
  {
    "path": "examples/react/sorting/src/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = {\n  firstName: string\n  lastName: string | undefined\n  age: number\n  visits: number | undefined\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  rank: number\n  createdAt: Date\n  subRows?: Array<Person>\n}\n\nconst range = (len: number) => {\n  const arr: Array<number> = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (): Person => {\n  return {\n    firstName: faker.person.firstName(),\n    lastName: Math.random() < 0.1 ? undefined : faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: Math.random() < 0.1 ? undefined : faker.number.int(1000),\n    progress: faker.number.int(100),\n    createdAt: faker.date.anytime(),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0],\n    rank: faker.number.int(100),\n  }\n}\n\nexport function makeData(...lens: Array<number>) {\n  const makeDataLevel = (depth = 0): Array<Person> => {\n    const len = lens[depth]\n    return range(len).map((_d): Person => {\n      return {\n        ...newPerson(),\n        subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined,\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n"
  },
  {
    "path": "examples/react/sorting/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"module\": \"ESNext\",\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"react-jsx\",\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "examples/react/sorting/vite.config.js",
    "content": "import { defineConfig } from 'vite'\nimport react from '@vitejs/plugin-react'\nimport rollupReplace from '@rollup/plugin-replace'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [\n    rollupReplace({\n      preventAssignment: true,\n      values: {\n        __DEV__: JSON.stringify(true),\n        'process.env.NODE_ENV': JSON.stringify('development'),\n      },\n    }),\n    react(),\n  ],\n})\n"
  },
  {
    "path": "examples/react/sub-components/.gitignore",
    "content": "node_modules\n.DS_Store\ndist\ndist-ssr\n*.local\n"
  },
  {
    "path": "examples/react/sub-components/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run start` or `yarn start`\n"
  },
  {
    "path": "examples/react/sub-components/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite App</title>\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n    <script src=\"https://unpkg.com/react-scan/dist/auto.global.js\"></script>\n  </head>\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.tsx\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/react/sub-components/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-sub-components\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"start\": \"vite\",\n    \"lint\": \"eslint ./src\",\n    \"test:types\": \"tsc\"\n  },\n  \"dependencies\": {\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"@tanstack/react-table\": \"^9.0.0-alpha.19\",\n    \"react\": \"^19.2.4\",\n    \"react-dom\": \"^19.2.4\"\n  },\n  \"devDependencies\": {\n    \"@rollup/plugin-replace\": \"^6.0.3\",\n    \"@types/react\": \"^19.2.10\",\n    \"@types/react-dom\": \"^19.2.3\",\n    \"@vitejs/plugin-react\": \"^5.1.2\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\"\n  }\n}\n"
  },
  {
    "path": "examples/react/sub-components/src/index.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n"
  },
  {
    "path": "examples/react/sub-components/src/main.tsx",
    "content": "import React, { Fragment } from 'react'\nimport ReactDOM from 'react-dom/client'\nimport './index.css'\nimport {\n  createColumnHelper,\n  createExpandedRowModel,\n  rowExpandingFeature,\n  tableFeatures,\n  useTable,\n} from '@tanstack/react-table'\nimport { makeData } from './makeData'\nimport type {\n  ColumnDef,\n  Row,\n  RowData,\n  TableFeatures,\n} from '@tanstack/react-table'\nimport type { Person } from './makeData'\n\nconst _features = tableFeatures({\n  rowExpandingFeature,\n})\n\nconst columnHelper = createColumnHelper<typeof _features, Person>()\n\nconst columns = columnHelper.columns([\n  columnHelper.display({\n    id: 'expander',\n    header: () => null,\n    cell: ({ row }) => {\n      return row.getCanExpand() ? (\n        <button\n          onClick={row.getToggleExpandedHandler()}\n          style={{ cursor: 'pointer' }}\n        >\n          {row.getIsExpanded() ? '👇' : '👉'}\n        </button>\n      ) : (\n        '🔵'\n      )\n    },\n  }),\n  columnHelper.accessor('firstName', {\n    header: 'First Name',\n    cell: ({ row, getValue }) => (\n      <div\n        style={{\n          paddingLeft: `${row.depth * 2}rem`,\n        }}\n      >\n        {getValue<string>()}\n      </div>\n    ),\n    footer: (props) => props.column.id,\n  }),\n  columnHelper.accessor((row) => row.lastName, {\n    id: 'lastName',\n    cell: (info) => info.getValue(),\n    header: () => <span>Last Name</span>,\n    footer: (props) => props.column.id,\n  }),\n  columnHelper.accessor('age', {\n    header: () => 'Age',\n    footer: (props) => props.column.id,\n  }),\n  columnHelper.accessor('visits', {\n    header: () => <span>Visits</span>,\n    footer: (props) => props.column.id,\n  }),\n  columnHelper.accessor('status', {\n    header: 'Status',\n    footer: (props) => props.column.id,\n  }),\n  columnHelper.accessor('progress', {\n    header: 'Profile Progress',\n    footer: (props) => props.column.id,\n  }),\n])\n\ntype TableProps<TFeatures extends TableFeatures, TData extends RowData> = {\n  data: Array<TData>\n  columns: Array<ColumnDef<TFeatures, TData>>\n  renderSubComponent: (props: {\n    row: Row<TFeatures, TData>\n  }) => React.ReactElement\n  getRowCanExpand: (row: Row<TFeatures, TData>) => boolean\n}\n\nfunction Table({\n  columns,\n  data,\n  getRowCanExpand,\n  renderSubComponent,\n}: TableProps<typeof _features, Person>): React.JSX.Element {\n  const table = useTable({\n    _features,\n    _rowModels: {\n      expandedRowModel: createExpandedRowModel(),\n    },\n    columns,\n    data,\n    getRowCanExpand,\n  })\n\n  return (\n    <table.Subscribe selector={(state) => state}>\n      {() => (\n        <div className=\"p-2\">\n          <div className=\"h-2\" />\n          <table>\n            <thead>\n              {table.getHeaderGroups().map((headerGroup) => (\n                <tr key={headerGroup.id}>\n                  {headerGroup.headers.map((header) => {\n                    return (\n                      <th key={header.id} colSpan={header.colSpan}>\n                        {header.isPlaceholder ? null : (\n                          <div>\n                            <table.FlexRender header={header} />\n                          </div>\n                        )}\n                      </th>\n                    )\n                  })}\n                </tr>\n              ))}\n            </thead>\n            <tbody>\n              {table.getRowModel().rows.map((row) => {\n                return (\n                  <Fragment key={row.id}>\n                    <tr>\n                      {/* first row is a normal row */}\n                      {row.getAllCells().map((cell) => {\n                        return (\n                          <td key={cell.id}>\n                            <table.FlexRender cell={cell} />\n                          </td>\n                        )\n                      })}\n                    </tr>\n                    {row.getIsExpanded() && (\n                      <tr>\n                        {/* 2nd row is a custom 1 cell row */}\n                        <td colSpan={row.getAllCells().length}>\n                          {renderSubComponent({ row })}\n                        </td>\n                      </tr>\n                    )}\n                  </Fragment>\n                )\n              })}\n            </tbody>\n          </table>\n          <div className=\"h-2\" />\n          <div>{table.getRowModel().rows.length} Rows</div>\n        </div>\n      )}\n    </table.Subscribe>\n  )\n}\n\nconst renderSubComponent = ({\n  row,\n}: {\n  row: Row<typeof _features, Person>\n}) => {\n  return (\n    <pre style={{ fontSize: '10px' }}>\n      <code>{JSON.stringify(row.original, null, 2)}</code>\n    </pre>\n  )\n}\n\nfunction App() {\n  const [data] = React.useState(() => makeData(10))\n\n  return (\n    <Table\n      columns={columns}\n      data={data}\n      getRowCanExpand={() => true}\n      renderSubComponent={renderSubComponent}\n    />\n  )\n}\n\nconst rootElement = document.getElementById('root')\nif (!rootElement) throw new Error('Failed to find the root element')\n\nReactDOM.createRoot(rootElement).render(\n  <React.StrictMode>\n    <App />\n  </React.StrictMode>,\n)\n"
  },
  {
    "path": "examples/react/sub-components/src/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  subRows?: Array<Person>\n}\n\nconst range = (len: number) => {\n  const arr: Array<number> = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (): Person => {\n  return {\n    firstName: faker.person.firstName(),\n    lastName: faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: faker.number.int(1000),\n    progress: faker.number.int(100),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0],\n  }\n}\n\nexport function makeData(...lens: Array<number>) {\n  const makeDataLevel = (depth = 0): Array<Person> => {\n    const len = lens[depth]\n    return range(len).map((_d): Person => {\n      return {\n        ...newPerson(),\n        subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined,\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n"
  },
  {
    "path": "examples/react/sub-components/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"module\": \"ESNext\",\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"react-jsx\",\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "examples/react/sub-components/vite.config.js",
    "content": "import { defineConfig } from 'vite'\nimport react from '@vitejs/plugin-react'\nimport rollupReplace from '@rollup/plugin-replace'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [\n    rollupReplace({\n      preventAssignment: true,\n      values: {\n        __DEV__: JSON.stringify(true),\n        'process.env.NODE_ENV': JSON.stringify('development'),\n      },\n    }),\n    react(),\n  ],\n})\n"
  },
  {
    "path": "examples/react/virtualized-columns/.gitignore",
    "content": "node_modules\n.DS_Store\ndist\ndist-ssr\n*.local\n"
  },
  {
    "path": "examples/react/virtualized-columns/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run start` or `yarn start`\n"
  },
  {
    "path": "examples/react/virtualized-columns/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite App</title>\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n    <script src=\"https://unpkg.com/react-scan/dist/auto.global.js\"></script>\n  </head>\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.tsx\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/react/virtualized-columns/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-virtualized-columns\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"start\": \"vite\",\n    \"lint\": \"eslint ./src\",\n    \"test:types\": \"tsc\"\n  },\n  \"dependencies\": {\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"@tanstack/react-table\": \"^9.0.0-alpha.19\",\n    \"@tanstack/react-virtual\": \"^3.13.18\",\n    \"react\": \"^19.2.4\",\n    \"react-dom\": \"^19.2.4\"\n  },\n  \"devDependencies\": {\n    \"@rollup/plugin-replace\": \"^6.0.3\",\n    \"@types/react\": \"^19.2.10\",\n    \"@types/react-dom\": \"^19.2.3\",\n    \"@vitejs/plugin-react\": \"^5.1.2\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\"\n  }\n}\n"
  },
  {
    "path": "examples/react/virtualized-columns/src/index.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border-collapse: collapse;\n  border-spacing: 0;\n  font-family: arial, sans-serif;\n  table-layout: fixed;\n}\n\nthead {\n  background: lightgray;\n}\n\ntr {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n  text-align: left;\n}\n\ntd {\n  padding: 6px;\n}\n\n.container {\n  border: 1px solid lightgray;\n  margin: 1rem auto;\n}\n\n.app {\n  margin: 1rem auto;\n  text-align: center;\n}\n"
  },
  {
    "path": "examples/react/virtualized-columns/src/main.tsx",
    "content": "import React from 'react'\nimport ReactDOM from 'react-dom/client'\nimport './index.css'\nimport {\n  columnSizingFeature,\n  createSortedRowModel,\n  rowSortingFeature,\n  sortFns,\n  useTable,\n} from '@tanstack/react-table'\nimport { useVirtualizer } from '@tanstack/react-virtual'\nimport { makeColumns, makeData } from './makeData'\nimport type {\n  Cell,\n  ColumnDef,\n  Header,\n  HeaderGroup,\n  ReactTable,\n  Row,\n} from '@tanstack/react-table'\nimport type { VirtualItem, Virtualizer } from '@tanstack/react-virtual'\nimport type { Person } from './makeData'\n\nconst features = { columnSizingFeature, rowSortingFeature }\n\nfunction App() {\n  const columns = React.useMemo<Array<ColumnDef<typeof features, Person>>>(\n    () => makeColumns(1_000),\n    [],\n  )\n\n  const [data, setData] = React.useState(() => makeData(1_000, columns))\n\n  const refreshData = React.useCallback(() => {\n    setData(makeData(1_000, columns))\n  }, [columns])\n\n  const table = useTable({\n    _features: features,\n    _rowModels: { sortedRowModel: createSortedRowModel(sortFns) },\n    columns,\n    data,\n    debugTable: true,\n  })\n\n  // All important CSS styles are included as inline styles for this example. This is not recommended for your code.\n  return (\n    <div className=\"app\">\n      {process.env.NODE_ENV === 'development' ? (\n        <p>\n          <strong>Notice:</strong> You are currently running React in\n          development mode. Virtualized rendering performance will be slightly\n          degraded until this application is built for production.\n        </p>\n      ) : null}\n      <div>({columns.length.toLocaleString()} columns)</div>\n      <div>({data.length.toLocaleString()} rows)</div>\n      <button onClick={refreshData}>Refresh Data</button>\n      <TableContainer table={table} />\n    </div>\n  )\n}\n\ninterface TableContainerProps {\n  table: ReactTable<any, Person>\n}\n\nfunction TableContainer({ table }: TableContainerProps) {\n  const visibleColumns = table.getVisibleLeafColumns()\n\n  // The virtualizers need to know the scrollable container element\n  const tableContainerRef = React.useRef<HTMLDivElement>(null)\n\n  // we are using a slightly different virtualization strategy for columns (compared to virtual rows) in order to support dynamic row heights\n  const columnVirtualizer = useVirtualizer<\n    HTMLDivElement,\n    HTMLTableCellElement\n  >({\n    count: visibleColumns.length,\n    estimateSize: (index) => visibleColumns[index].getSize(), // estimate width of each column for accurate scrollbar dragging\n    getScrollElement: () => tableContainerRef.current,\n    horizontal: true,\n    overscan: 3, // how many columns to render on each side off screen each way (adjust this for performance)\n  })\n\n  const virtualColumns = columnVirtualizer.getVirtualItems()\n\n  // different virtualization strategy for columns - instead of absolute and translateY, we add empty columns to the left and right\n  let virtualPaddingLeft: number | undefined\n  let virtualPaddingRight: number | undefined\n\n  if (virtualColumns.length) {\n    virtualPaddingLeft = virtualColumns[0]?.start ?? 0\n    virtualPaddingRight =\n      columnVirtualizer.getTotalSize() -\n      (virtualColumns[virtualColumns.length - 1]?.end ?? 0)\n  }\n\n  return (\n    <div\n      className=\"container\"\n      ref={tableContainerRef}\n      style={{\n        overflow: 'auto', // our scrollable table container\n        position: 'relative', // needed for sticky header\n        height: '800px', // should be a fixed height\n      }}\n    >\n      {/* Even though we're still using sematic table tags, we must use CSS grid and flexbox for dynamic row heights */}\n      <table style={{ display: 'grid' }}>\n        <TableHead\n          columnVirtualizer={columnVirtualizer}\n          table={table}\n          virtualPaddingLeft={virtualPaddingLeft}\n          virtualPaddingRight={virtualPaddingRight}\n        />\n        <TableBody\n          columnVirtualizer={columnVirtualizer}\n          table={table}\n          tableContainerRef={tableContainerRef}\n          virtualPaddingLeft={virtualPaddingLeft}\n          virtualPaddingRight={virtualPaddingRight}\n        />\n      </table>\n    </div>\n  )\n}\n\ninterface TableHeadProps {\n  columnVirtualizer: Virtualizer<HTMLDivElement, HTMLTableCellElement>\n  table: ReactTable<typeof features, Person>\n  virtualPaddingLeft: number | undefined\n  virtualPaddingRight: number | undefined\n}\n\nfunction TableHead({\n  columnVirtualizer,\n  table,\n  virtualPaddingLeft,\n  virtualPaddingRight,\n}: TableHeadProps) {\n  return (\n    <thead\n      style={{\n        display: 'grid',\n        position: 'sticky',\n        top: 0,\n        zIndex: 1,\n      }}\n    >\n      {table.getHeaderGroups().map((headerGroup) => (\n        <TableHeadRow\n          columnVirtualizer={columnVirtualizer}\n          headerGroup={headerGroup}\n          key={headerGroup.id}\n          virtualPaddingLeft={virtualPaddingLeft}\n          virtualPaddingRight={virtualPaddingRight}\n          table={table}\n        />\n      ))}\n    </thead>\n  )\n}\n\ninterface TableHeadRowProps {\n  columnVirtualizer: Virtualizer<HTMLDivElement, HTMLTableCellElement>\n  headerGroup: HeaderGroup<any, Person>\n  virtualPaddingLeft: number | undefined\n  virtualPaddingRight: number | undefined\n  table: ReactTable<typeof features, Person>\n}\n\nfunction TableHeadRow({\n  columnVirtualizer,\n  headerGroup,\n  virtualPaddingLeft,\n  virtualPaddingRight,\n  table,\n}: TableHeadRowProps) {\n  const virtualColumns = columnVirtualizer.getVirtualItems()\n  return (\n    <tr key={headerGroup.id} style={{ display: 'flex', width: '100%' }}>\n      {virtualPaddingLeft ? (\n        // fake empty column to the left for virtualization scroll padding\n        <th style={{ display: 'flex', width: virtualPaddingLeft }} />\n      ) : null}\n      {virtualColumns.map((virtualColumn) => {\n        const header = headerGroup.headers[virtualColumn.index]\n        return <TableHeadCell key={header.id} header={header} table={table} />\n      })}\n      {virtualPaddingRight ? (\n        // fake empty column to the right for virtualization scroll padding\n        <th style={{ display: 'flex', width: virtualPaddingRight }} />\n      ) : null}\n    </tr>\n  )\n}\n\ninterface TableHeadCellProps {\n  header: Header<typeof features, Person, unknown>\n  table: ReactTable<typeof features, Person>\n}\n\nfunction TableHeadCell({ header, table }: TableHeadCellProps) {\n  return (\n    <th\n      key={header.id}\n      style={{\n        display: 'flex',\n        width: header.getSize(),\n      }}\n    >\n      <div\n        {...{\n          className: header.column.getCanSort()\n            ? 'cursor-pointer select-none'\n            : '',\n          onClick: header.column.getToggleSortingHandler(),\n        }}\n      >\n        <table.FlexRender header={header} />\n        {{\n          asc: ' 🔼',\n          desc: ' 🔽',\n        }[header.column.getIsSorted() as string] ?? null}\n      </div>\n    </th>\n  )\n}\n\ninterface TableBodyProps {\n  columnVirtualizer: Virtualizer<HTMLDivElement, HTMLTableCellElement>\n  table: ReactTable<typeof features, Person>\n  tableContainerRef: React.RefObject<HTMLDivElement | null>\n  virtualPaddingLeft: number | undefined\n  virtualPaddingRight: number | undefined\n}\n\nfunction TableBody({\n  columnVirtualizer,\n  table,\n  tableContainerRef,\n  virtualPaddingLeft,\n  virtualPaddingRight,\n}: TableBodyProps) {\n  const { rows } = table.getRowModel()\n\n  // dynamic row height virtualization - alternatively you could use a simpler fixed row height strategy without the need for `measureElement`\n  const rowVirtualizer = useVirtualizer<HTMLDivElement, HTMLTableRowElement>({\n    count: rows.length,\n    estimateSize: () => 33, // estimate row height for accurate scrollbar dragging\n    getScrollElement: () => tableContainerRef.current,\n    // measure dynamic row height, except in firefox because it measures table border height incorrectly\n    measureElement:\n      typeof window !== 'undefined' &&\n      navigator.userAgent.indexOf('Firefox') === -1\n        ? (element) => element.getBoundingClientRect().height\n        : undefined,\n    overscan: 5,\n  })\n\n  const virtualRows = rowVirtualizer.getVirtualItems()\n\n  return (\n    <tbody\n      style={{\n        display: 'grid',\n        height: `${rowVirtualizer.getTotalSize()}px`, // tells scrollbar how big the table is\n        position: 'relative', // needed for absolute positioning of rows\n      }}\n    >\n      {virtualRows.map((virtualRow) => {\n        const row = rows[virtualRow.index]\n\n        return (\n          <TableBodyRow\n            columnVirtualizer={columnVirtualizer}\n            key={row.id}\n            row={row}\n            rowVirtualizer={rowVirtualizer}\n            virtualPaddingLeft={virtualPaddingLeft}\n            virtualPaddingRight={virtualPaddingRight}\n            virtualRow={virtualRow}\n            table={table}\n          />\n        )\n      })}\n    </tbody>\n  )\n}\n\ninterface TableBodyRowProps {\n  columnVirtualizer: Virtualizer<HTMLDivElement, HTMLTableCellElement>\n  row: Row<any, Person>\n  rowVirtualizer: Virtualizer<HTMLDivElement, HTMLTableRowElement>\n  virtualPaddingLeft: number | undefined\n  virtualPaddingRight: number | undefined\n  virtualRow: VirtualItem\n  table: ReactTable<typeof features, Person>\n}\n\nfunction TableBodyRow({\n  columnVirtualizer,\n  row,\n  rowVirtualizer,\n  virtualPaddingLeft,\n  virtualPaddingRight,\n  virtualRow,\n  table,\n}: TableBodyRowProps) {\n  const visibleCells = row.getVisibleCells()\n  const virtualColumns = columnVirtualizer.getVirtualItems()\n  return (\n    <tr\n      data-index={virtualRow.index} // needed for dynamic row height measurement\n      ref={(node) => rowVirtualizer.measureElement(node)} // measure dynamic row height\n      key={row.id}\n      style={{\n        display: 'flex',\n        position: 'absolute',\n        transform: `translateY(${virtualRow.start}px)`, // this should always be a `style` as it changes on scroll\n        width: '100%',\n      }}\n    >\n      {virtualPaddingLeft ? (\n        // fake empty column to the left for virtualization scroll padding\n        <td style={{ display: 'flex', width: virtualPaddingLeft }} />\n      ) : null}\n      {virtualColumns.map((vc) => {\n        const cell = visibleCells[vc.index]\n        return <TableBodyCell key={cell.id} cell={cell} table={table} />\n      })}\n      {virtualPaddingRight ? (\n        // fake empty column to the right for virtualization scroll padding\n        <td style={{ display: 'flex', width: virtualPaddingRight }} />\n      ) : null}\n    </tr>\n  )\n}\n\ninterface TableBodyCellProps {\n  cell: Cell<any, Person, unknown>\n  table: ReactTable<typeof features, Person>\n}\n\nfunction TableBodyCell({ cell, table }: TableBodyCellProps) {\n  return (\n    <td\n      key={cell.id}\n      style={{\n        display: 'flex',\n        width: cell.column.getSize(),\n      }}\n    >\n      <table.FlexRender cell={cell} />\n    </td>\n  )\n}\n\nconst rootElement = document.getElementById('root')\n\nif (!rootElement) throw new Error('Failed to find the root element')\n\nReactDOM.createRoot(rootElement).render(\n  <React.StrictMode>\n    <App />\n  </React.StrictMode>,\n)\n"
  },
  {
    "path": "examples/react/virtualized-columns/src/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport const makeColumns = (num: number) =>\n  [...Array(num)].map((_, i) => {\n    return {\n      accessorKey: i.toString(),\n      header: 'Column ' + i.toString(),\n      size: Math.floor(Math.random() * 150) + 100,\n    }\n  })\n\nexport const makeData = (num: number, columns: Array<any>) =>\n  [...Array(num)].map(() => ({\n    ...Object.fromEntries(\n      columns.map((col: any) => [col.accessorKey, faker.person.firstName()]),\n    ),\n  }))\n\nexport type Person = ReturnType<typeof makeData>[0]\n"
  },
  {
    "path": "examples/react/virtualized-columns/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"module\": \"ESNext\",\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"react-jsx\",\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "examples/react/virtualized-columns/vite.config.js",
    "content": "import { defineConfig } from 'vite'\nimport react from '@vitejs/plugin-react'\nimport rollupReplace from '@rollup/plugin-replace'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [\n    rollupReplace({\n      preventAssignment: true,\n      values: {\n        __DEV__: JSON.stringify(true),\n        'process.env.NODE_ENV': JSON.stringify('development'),\n      },\n    }),\n    react(),\n  ],\n})\n"
  },
  {
    "path": "examples/react/virtualized-columns-experimental/.gitignore",
    "content": "node_modules\n.DS_Store\ndist\ndist-ssr\n*.local\n"
  },
  {
    "path": "examples/react/virtualized-columns-experimental/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run start` or `yarn start`\n"
  },
  {
    "path": "examples/react/virtualized-columns-experimental/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite App</title>\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n    <script src=\"https://unpkg.com/react-scan/dist/auto.global.js\"></script>\n  </head>\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.tsx\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/react/virtualized-columns-experimental/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-virtualized-columns-experimental\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"start\": \"vite\",\n    \"test:types\": \"tsc\"\n  },\n  \"dependencies\": {\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"@tanstack/react-table\": \"^9.0.0-alpha.19\",\n    \"@tanstack/react-virtual\": \"^3.13.18\",\n    \"react\": \"^19.2.4\",\n    \"react-dom\": \"^19.2.4\"\n  },\n  \"devDependencies\": {\n    \"@rollup/plugin-replace\": \"^6.0.3\",\n    \"@types/react\": \"^19.2.10\",\n    \"@types/react-dom\": \"^19.2.3\",\n    \"@vitejs/plugin-react\": \"^5.1.2\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\"\n  }\n}\n"
  },
  {
    "path": "examples/react/virtualized-columns-experimental/src/index.css",
    "content": ":root {\n  --virtual-padding-left: 0px;\n  --virtual-padding-right: 0px;\n}\n\nhtml {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border-collapse: collapse;\n  border-spacing: 0;\n  font-family: arial, sans-serif;\n  table-layout: fixed;\n}\n\nthead {\n  background: lightgray;\n}\n\ntr {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n  text-align: left;\n}\n\ntd {\n  padding: 6px;\n}\n\n.container {\n  border: 1px solid lightgray;\n  margin: 1rem auto;\n}\n\n.app {\n  margin: 1rem auto;\n  text-align: center;\n}\n\n.left-column-spacer {\n  width: var(--virtual-padding-left);\n}\n\n.right-column-spacer {\n  width: var(--virtual-padding-right);\n}\n"
  },
  {
    "path": "examples/react/virtualized-columns-experimental/src/main.tsx",
    "content": "import React from 'react'\nimport ReactDOM from 'react-dom/client'\nimport './index.css'\nimport {\n  FlexRender,\n  columnSizingFeature,\n  createSortedRowModel,\n  rowSortingFeature,\n  sortFns,\n  useTable,\n} from '@tanstack/react-table'\nimport { useVirtualizer } from '@tanstack/react-virtual'\nimport { makeColumns, makeData } from './makeData'\nimport type {\n  Cell,\n  ColumnDef,\n  Header,\n  HeaderGroup,\n  ReactTable,\n  Row,\n} from '@tanstack/react-table'\nimport type { Virtualizer } from '@tanstack/react-virtual'\nimport type { Person } from './makeData'\n\nconst _features = {\n  columnSizingFeature,\n  rowSortingFeature,\n}\n\n// All important CSS styles are included as inline styles for this example. This is not recommended for your code.\nfunction App() {\n  const columns = React.useMemo<Array<ColumnDef<typeof _features, Person>>>(\n    () => makeColumns(1_000),\n    [],\n  )\n\n  const [data, setData] = React.useState(() => makeData(1_000, columns))\n\n  const refreshData = React.useCallback(() => {\n    setData(makeData(1_000, columns))\n  }, [columns])\n\n  // refresh data every 5 seconds\n  React.useEffect(() => {\n    const interval = setInterval(() => {\n      refreshData()\n    }, 5000)\n    return () => clearInterval(interval)\n  }, [refreshData])\n\n  // The table does not live in the same scope as the virtualizers\n  const table = useTable({\n    _features,\n    _rowModels: { sortedRowModel: createSortedRowModel(sortFns) },\n    columns,\n    data,\n    debugTable: true,\n  })\n\n  return (\n    <div className=\"app\">\n      {process.env.NODE_ENV === 'development' ? (\n        <p>\n          <strong>Notice:</strong> You are currently running React in\n          development mode. Virtualized rendering performance will be slightly\n          degraded until this application is built for production.\n        </p>\n      ) : null}\n      <div>({columns.length.toLocaleString()} columns)</div>\n      <div>({data.length.toLocaleString()} rows)</div>\n      <button onClick={refreshData}>Refresh Data</button>\n      <TableContainer table={table} />\n    </div>\n  )\n}\n\ninterface TableContainerProps {\n  table: ReactTable<typeof _features, Person>\n}\n\nfunction TableContainer({ table }: TableContainerProps) {\n  const visibleColumns = table.getAllLeafColumns()\n\n  // The virtualizers need to know the scrollable container element\n  const tableContainerRef = React.useRef<HTMLDivElement>(null)\n\n  // we are using a slightly different virtualization strategy for columns (compared to virtual rows) in order to support dynamic row heights\n  const columnVirtualizer = useVirtualizer<\n    HTMLDivElement,\n    HTMLTableCellElement\n  >({\n    count: visibleColumns.length,\n    estimateSize: (index) => visibleColumns[index].getSize(), // estimate width of each column for accurate scrollbar dragging\n    getScrollElement: () => tableContainerRef.current,\n    horizontal: true,\n    overscan: 3, // how many columns to render on each side off screen each way (adjust this for performance)\n    onChange: (instance) => {\n      // requestAnimationFrame(() => {\n      const virtualColumns = instance.getVirtualItems()\n      // different virtualization strategy for columns - instead of absolute and translateY, we add empty columns to the left and right\n      const virtualPaddingLeft = virtualColumns[0]?.start ?? 0\n      const virtualPaddingRight =\n        instance.getTotalSize() -\n        (virtualColumns[virtualColumns.length - 1]?.end ?? 0)\n\n      tableContainerRef.current?.style.setProperty(\n        '--virtual-padding-left',\n        `${virtualPaddingLeft}px`,\n      )\n      tableContainerRef.current?.style.setProperty(\n        '--virtual-padding-right',\n        `${virtualPaddingRight}px`,\n      )\n      // })\n    },\n  })\n\n  return (\n    <div\n      className=\"container\"\n      ref={tableContainerRef}\n      style={{\n        overflow: 'auto', // our scrollable table container\n        position: 'relative', // needed for sticky header\n        height: '800px', // should be a fixed height\n      }}\n    >\n      <table.Subscribe selector={(state) => ({ sorting: state.sorting })}>\n        {() => (\n          // Even though we're still using sematic table tags, we must use CSS grid and flexbox for dynamic row heights\n          <table style={{ display: 'grid' }}>\n            <TableHead table={table} columnVirtualizer={columnVirtualizer} />\n            <TableBody\n              columnVirtualizer={columnVirtualizer}\n              table={table}\n              tableContainerRef={tableContainerRef}\n            />\n          </table>\n        )}\n      </table.Subscribe>\n    </div>\n  )\n}\n\ninterface TableHeadProps {\n  columnVirtualizer: Virtualizer<HTMLDivElement, HTMLTableCellElement>\n  table: ReactTable<typeof _features, Person>\n}\n\nfunction TableHead({ table, columnVirtualizer }: TableHeadProps) {\n  return (\n    <thead\n      style={{\n        display: 'grid',\n        position: 'sticky',\n        top: 0,\n        zIndex: 1,\n      }}\n    >\n      {table.getHeaderGroups().map((headerGroup) => (\n        <TableHeadRow\n          columnVirtualizer={columnVirtualizer}\n          key={headerGroup.id}\n          headerGroup={headerGroup}\n        />\n      ))}\n    </thead>\n  )\n}\n\ninterface TableHeadRowProps {\n  columnVirtualizer: Virtualizer<HTMLDivElement, HTMLTableCellElement>\n  headerGroup: HeaderGroup<typeof _features, Person>\n}\n\nfunction TableHeadRow({ columnVirtualizer, headerGroup }: TableHeadRowProps) {\n  const virtualColumnIndexes = columnVirtualizer.getVirtualIndexes()\n\n  return (\n    <tr key={headerGroup.id} style={{ display: 'flex', width: '100%' }}>\n      {/* fake empty column to the left for virtualization scroll padding */}\n      <th className=\"left-column-spacer\" />\n      {virtualColumnIndexes.map((virtualColumnIndex) => {\n        const header = headerGroup.headers[virtualColumnIndex]\n        return (\n          <TableHeadCellMemo\n            columnVirtualizer={columnVirtualizer}\n            key={header.id}\n            header={header}\n          />\n        )\n      })}\n      {/* fake empty column to the right for virtualization scroll padding */}\n      <th className=\"right-column-spacer\" />\n    </tr>\n  )\n}\n\ninterface TableHeadCellProps {\n  columnVirtualizer: Virtualizer<HTMLDivElement, HTMLTableCellElement>\n  header: Header<typeof _features, Person, unknown>\n}\n\nfunction TableHeadCell({\n  columnVirtualizer: _columnVirtualizer,\n  header,\n}: TableHeadCellProps) {\n  return (\n    <th\n      key={header.id}\n      style={{\n        display: 'flex',\n        width: header.getSize(),\n      }}\n    >\n      <div\n        className={\n          header.column.getCanSort() ? 'cursor-pointer select-none' : ''\n        }\n        onClick={header.column.getToggleSortingHandler()}\n        title={\n          header.column.getCanSort()\n            ? header.column.getNextSortingOrder() === 'asc'\n              ? 'Sort ascending'\n              : header.column.getNextSortingOrder() === 'desc'\n                ? 'Sort descending'\n                : 'Clear sort'\n            : undefined\n        }\n      >\n        <FlexRender header={header} />\n        {{\n          asc: ' 🔼',\n          desc: ' 🔽',\n        }[header.column.getIsSorted() as string] ?? null}\n      </div>\n    </th>\n  )\n}\n\nconst TableHeadCellMemo = React.memo(\n  TableHeadCell,\n  (_prev, next) => next.columnVirtualizer.isScrolling,\n) as typeof TableHeadCell\n\ninterface TableBodyProps {\n  columnVirtualizer: Virtualizer<HTMLDivElement, HTMLTableCellElement>\n  table: ReactTable<typeof _features, Person>\n  tableContainerRef: React.RefObject<HTMLDivElement | null>\n}\n\nfunction TableBody({\n  columnVirtualizer,\n  table,\n  tableContainerRef,\n}: TableBodyProps) {\n  const tableBodyRef = React.useRef<HTMLTableSectionElement>(null)\n  const rowRefsMap = React.useRef<Map<number, HTMLTableRowElement>>(new Map())\n\n  const { rows } = table.getRowModel()\n\n  // dynamic row height virtualization - alternatively you could use a simpler fixed row height strategy without the need for `measureElement`\n  const rowVirtualizer = useVirtualizer<HTMLDivElement, HTMLTableRowElement>({\n    count: rows.length,\n    estimateSize: () => 33, // estimate row height for accurate scrollbar dragging\n    getScrollElement: () => tableContainerRef.current,\n    // measure dynamic row height, except in firefox because it measures table border height incorrectly\n    measureElement:\n      typeof window !== 'undefined' &&\n      navigator.userAgent.indexOf('Firefox') === -1\n        ? (element) => element.getBoundingClientRect().height\n        : undefined,\n    overscan: 5,\n    onChange: (instance) => {\n      // requestAnimationFrame(() => {\n      tableBodyRef.current!.style.height = `${instance.getTotalSize()}px`\n      instance.getVirtualItems().forEach((virtualRow) => {\n        const rowRef = rowRefsMap.current.get(virtualRow.index)\n        if (!rowRef) return\n        rowRef.style.transform = `translateY(${virtualRow.start}px)`\n      })\n      // })\n    },\n  })\n\n  React.useLayoutEffect(() => {\n    rowVirtualizer.measure()\n  }, [table.store.state])\n\n  const virtualRowIndexes = rowVirtualizer.getVirtualIndexes()\n\n  return (\n    <tbody\n      ref={tableBodyRef}\n      style={{\n        display: 'grid',\n        position: 'relative', // needed for absolute positioning of rows\n      }}\n    >\n      {virtualRowIndexes.map((virtualRowIndex) => {\n        const row = rows[virtualRowIndex]\n\n        return (\n          <TableBodyRow\n            columnVirtualizer={columnVirtualizer}\n            key={row.id}\n            row={row}\n            rowRefsMap={rowRefsMap}\n            rowVirtualizer={rowVirtualizer}\n            virtualRowIndex={virtualRowIndex}\n          />\n        )\n      })}\n    </tbody>\n  )\n}\n\ninterface TableBodyRowProps {\n  columnVirtualizer: Virtualizer<HTMLDivElement, HTMLTableCellElement>\n  row: Row<typeof _features, Person>\n  rowVirtualizer: Virtualizer<HTMLDivElement, HTMLTableRowElement>\n  virtualRowIndex: number\n  rowRefsMap: React.RefObject<Map<number, HTMLTableRowElement>>\n}\n\nfunction TableBodyRow({\n  columnVirtualizer,\n  row,\n  rowVirtualizer,\n  virtualRowIndex,\n  rowRefsMap,\n}: TableBodyRowProps) {\n  const visibleCells = row.getAllCells()\n  const virtualColumnIndexes = columnVirtualizer.getVirtualIndexes()\n\n  return (\n    <tr\n      data-index={virtualRowIndex} // needed for dynamic row height measurement\n      ref={(node) => {\n        if (node && typeof virtualRowIndex !== 'undefined') {\n          rowVirtualizer.measureElement(node)\n          rowRefsMap.current.set(virtualRowIndex, node)\n        }\n      }} // measure dynamic row height\n      key={row.id}\n      style={{\n        display: 'flex',\n        position: 'absolute',\n        width: '100%',\n      }}\n    >\n      {/* fake empty column to the left for virtualization scroll padding */}\n      <td className=\"left-column-spacer\" />\n      {virtualColumnIndexes.map((virtualColumnIndex) => {\n        const cell = visibleCells[virtualColumnIndex]\n        return (\n          <TableBodyCellMemo\n            key={cell.id}\n            cell={cell}\n            columnVirtualizer={columnVirtualizer}\n          />\n        )\n      })}\n      {/* fake empty column to the right for virtualization scroll padding */}\n      <td className=\"right-column-spacer\" />\n    </tr>\n  )\n}\n\n// TODO: Can rows be memoized in any way without breaking column virtualization?\n// const TableBodyRowMemo = React.memo(\n//   TableBodyRow,\n//   (_prev, next) => next.rowVirtualizer.isScrolling\n// )\n\ninterface TableBodyCellProps {\n  cell: Cell<typeof _features, Person, unknown>\n  columnVirtualizer: Virtualizer<HTMLDivElement, HTMLTableCellElement>\n}\n\nfunction TableBodyCell({\n  cell,\n  columnVirtualizer: _columnVirtualizer,\n}: TableBodyCellProps) {\n  return (\n    <td\n      key={cell.id}\n      style={{\n        display: 'flex',\n        width: cell.column.getSize(),\n      }}\n    >\n      <FlexRender cell={cell} />\n    </td>\n  )\n}\n\nconst TableBodyCellMemo = React.memo(\n  TableBodyCell,\n  (_prev, next) => next.columnVirtualizer.isScrolling,\n) as typeof TableBodyCell\n\nconst rootElement = document.getElementById('root')\n\nif (!rootElement) throw new Error('Failed to find the root element')\n\nReactDOM.createRoot(rootElement).render(\n  <React.StrictMode>\n    <App />\n  </React.StrictMode>,\n)\n"
  },
  {
    "path": "examples/react/virtualized-columns-experimental/src/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = Record<string, string>\n\nexport const makeColumns = (num: number) =>\n  [...Array(num)].map((_, i) => {\n    return {\n      accessorKey: i.toString(),\n      header: 'Column ' + i.toString(),\n      size: Math.floor(Math.random() * 150) + 100,\n    }\n  })\n\nexport const makeData = (num: number, columns: Array<unknown>): Array<Person> =>\n  [...Array(num)].map(() => ({\n    ...Object.fromEntries(\n      columns.map((col) => [\n        (col as { accessorKey?: string }).accessorKey,\n        faker.person.firstName(),\n      ]),\n    ),\n  }))\n"
  },
  {
    "path": "examples/react/virtualized-columns-experimental/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"module\": \"ESNext\",\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"react-jsx\",\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "examples/react/virtualized-columns-experimental/vite.config.js",
    "content": "import { defineConfig } from 'vite'\nimport react from '@vitejs/plugin-react'\nimport rollupReplace from '@rollup/plugin-replace'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [\n    rollupReplace({\n      preventAssignment: true,\n      values: {\n        __DEV__: JSON.stringify(true),\n        'process.env.NODE_ENV': JSON.stringify('development'),\n      },\n    }),\n    react(),\n  ],\n})\n"
  },
  {
    "path": "examples/react/virtualized-infinite-scrolling/.gitignore",
    "content": "node_modules\n.DS_Store\ndist\ndist-ssr\n*.local\n"
  },
  {
    "path": "examples/react/virtualized-infinite-scrolling/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run start` or `yarn start`\n"
  },
  {
    "path": "examples/react/virtualized-infinite-scrolling/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite App</title>\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n    <script src=\"https://unpkg.com/react-scan/dist/auto.global.js\"></script>\n  </head>\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.tsx\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/react/virtualized-infinite-scrolling/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-virtualized-infinite-scrolling\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"start\": \"vite\",\n    \"lint\": \"eslint ./src\",\n    \"test:types\": \"tsc\"\n  },\n  \"dependencies\": {\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"@tanstack/react-query\": \"^5.90.20\",\n    \"@tanstack/react-table\": \"^9.0.0-alpha.19\",\n    \"@tanstack/react-virtual\": \"^3.13.18\",\n    \"react\": \"^19.2.4\",\n    \"react-dom\": \"^19.2.4\"\n  },\n  \"devDependencies\": {\n    \"@rollup/plugin-replace\": \"^6.0.3\",\n    \"@types/react\": \"^19.2.10\",\n    \"@types/react-dom\": \"^19.2.3\",\n    \"@vitejs/plugin-react\": \"^5.1.2\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\"\n  }\n}\n"
  },
  {
    "path": "examples/react/virtualized-infinite-scrolling/src/index.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border-collapse: collapse;\n  border-spacing: 0;\n  font-family: arial, sans-serif;\n  table-layout: fixed;\n}\n\nthead {\n  background: lightgray;\n}\n\ntr {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n  text-align: left;\n}\n\ntd {\n  padding: 6px;\n}\n\n.container {\n  border: 1px solid lightgray;\n  margin: 1rem auto;\n}\n\n.app {\n  margin: 1rem auto;\n  text-align: center;\n}\n"
  },
  {
    "path": "examples/react/virtualized-infinite-scrolling/src/main.tsx",
    "content": "import React from 'react'\nimport ReactDOM from 'react-dom/client'\nimport './index.css'\n\n// 3 TanStack Libraries!!!\nimport {\n  columnSizingFeature,\n  createColumnHelper,\n  createSortedRowModel,\n  rowSortingFeature,\n  sortFns,\n  tableFeatures,\n  useTable,\n} from '@tanstack/react-table'\nimport {\n  QueryClient,\n  QueryClientProvider,\n  keepPreviousData,\n  useInfiniteQuery,\n} from '@tanstack/react-query'\nimport { useVirtualizer } from '@tanstack/react-virtual'\nimport { fetchData } from './makeData'\nimport type { Person, PersonApiResponse } from './makeData'\nimport type { OnChangeFn, SortingState } from '@tanstack/react-table'\n\nconst fetchSize = 50\n\nconst _features = tableFeatures({ columnSizingFeature, rowSortingFeature })\n\nconst columnHelper = createColumnHelper<typeof _features, Person>()\n\nfunction App() {\n  // we need a reference to the scrolling element for logic down below\n  const tableContainerRef = React.useRef<HTMLDivElement>(null)\n\n  const [sorting, setSorting] = React.useState<SortingState>([])\n\n  const columns = React.useMemo(\n    () =>\n      columnHelper.columns([\n        columnHelper.accessor('id', {\n          header: 'ID',\n          size: 60,\n        }),\n        columnHelper.accessor('firstName', {\n          cell: (info) => info.getValue(),\n        }),\n        columnHelper.accessor((row) => row.lastName, {\n          id: 'lastName',\n          cell: (info) => info.getValue(),\n          header: () => <span>Last Name</span>,\n        }),\n        columnHelper.accessor('age', {\n          header: () => 'Age',\n          size: 50,\n        }),\n        columnHelper.accessor('visits', {\n          header: () => <span>Visits</span>,\n          size: 50,\n        }),\n        columnHelper.accessor('status', {\n          header: 'Status',\n        }),\n        columnHelper.accessor('progress', {\n          header: 'Profile Progress',\n          size: 80,\n        }),\n        columnHelper.accessor('createdAt', {\n          header: 'Created At',\n          cell: (info) => info.getValue<Date>().toLocaleString(),\n          size: 200,\n        }),\n      ]),\n    [],\n  )\n\n  // react-query has a useInfiniteQuery hook that is perfect for this use case\n  const { data, fetchNextPage, isFetching, isLoading } =\n    useInfiniteQuery<PersonApiResponse>({\n      queryKey: [\n        'people',\n        sorting, // refetch when sorting changes\n      ],\n      queryFn: async ({ pageParam = 0 }) => {\n        const start = (pageParam as number) * fetchSize\n        const fetchedData = await fetchData(start, fetchSize, sorting) // pretend api call\n        return fetchedData\n      },\n      initialPageParam: 0,\n      getNextPageParam: (_lastGroup, groups) => groups.length,\n      refetchOnWindowFocus: false,\n      placeholderData: keepPreviousData,\n    })\n\n  // flatten the array of arrays from the useInfiniteQuery hook\n  const flatData = React.useMemo(\n    () => data?.pages.flatMap((page) => page.data) ?? [],\n    [data],\n  )\n  const totalDBRowCount = data?.pages[0]?.meta?.totalRowCount ?? 0\n  const totalFetched = flatData.length\n\n  // called on scroll and possibly on mount to fetch more data as the user scrolls and reaches bottom of table\n  const fetchMoreOnBottomReached = React.useCallback(\n    (containerRefElement?: HTMLDivElement | null) => {\n      if (containerRefElement) {\n        const { scrollHeight, scrollTop, clientHeight } = containerRefElement\n        // once the user has scrolled within 500px of the bottom of the table, fetch more data if we can\n        if (\n          scrollHeight - scrollTop - clientHeight < 500 &&\n          !isFetching &&\n          totalFetched < totalDBRowCount\n        ) {\n          fetchNextPage()\n        }\n      }\n    },\n    [fetchNextPage, isFetching, totalFetched, totalDBRowCount],\n  )\n\n  // a check on mount and after a fetch to see if the table is already scrolled to the bottom and immediately needs to fetch more data\n  React.useEffect(() => {\n    fetchMoreOnBottomReached(tableContainerRef.current)\n  }, [fetchMoreOnBottomReached])\n\n  const table = useTable({\n    _features,\n    _rowModels: { sortedRowModel: createSortedRowModel(sortFns) },\n    data: flatData,\n    columns,\n    state: {\n      sorting,\n    },\n    manualSorting: true,\n    debugTable: true,\n  })\n\n  // scroll to top of table when sorting changes\n  const handleSortingChange: OnChangeFn<SortingState> = (updater) => {\n    setSorting(updater)\n    if (table.getRowModel().rows.length) {\n      rowVirtualizer.scrollToIndex(0)\n    }\n  }\n\n  // since this table option is derived from table row model state, we're using the table.setOptions utility\n  table.setOptions((prev) => ({\n    ...prev,\n    onSortingChange: handleSortingChange,\n  }))\n\n  const { rows } = table.getRowModel()\n\n  const rowVirtualizer = useVirtualizer({\n    count: rows.length,\n    estimateSize: () => 33, // estimate row height for accurate scrollbar dragging\n    getScrollElement: () => tableContainerRef.current,\n    // measure dynamic row height, except in firefox because it measures table border height incorrectly\n    measureElement:\n      typeof window !== 'undefined' &&\n      navigator.userAgent.indexOf('Firefox') === -1\n        ? (element) => element.getBoundingClientRect().height\n        : undefined,\n    overscan: 5,\n  })\n\n  if (isLoading) {\n    return <>Loading...</>\n  }\n\n  return (\n    <div className=\"app\">\n      {process.env.NODE_ENV === 'development' ? (\n        <p>\n          <strong>Notice:</strong> You are currently running React in\n          development mode. Virtualized rendering performance will be slightly\n          degraded until this application is built for production.\n        </p>\n      ) : null}\n      ({flatData.length} of {totalDBRowCount} rows fetched)\n      <div\n        className=\"container\"\n        onScroll={(e) => fetchMoreOnBottomReached(e.currentTarget)}\n        ref={tableContainerRef}\n        style={{\n          overflow: 'auto', // our scrollable table container\n          position: 'relative', // needed for sticky header\n          height: '600px', // should be a fixed height\n        }}\n      >\n        {/* Even though we're still using sematic table tags, we must use CSS grid and flexbox for dynamic row heights */}\n        <table style={{ display: 'grid' }}>\n          <thead\n            style={{\n              display: 'grid',\n              position: 'sticky',\n              top: 0,\n              zIndex: 1,\n            }}\n          >\n            {table.getHeaderGroups().map((headerGroup) => (\n              <tr\n                key={headerGroup.id}\n                style={{ display: 'flex', width: '100%' }}\n              >\n                {headerGroup.headers.map((header) => {\n                  return (\n                    <th\n                      key={header.id}\n                      style={{\n                        display: 'flex',\n                        width: header.getSize(),\n                      }}\n                    >\n                      <div\n                        className={\n                          header.column.getCanSort()\n                            ? 'cursor-pointer select-none'\n                            : ''\n                        }\n                        onClick={header.column.getToggleSortingHandler()}\n                      >\n                        <table.FlexRender header={header} />\n                        {{\n                          asc: ' 🔼',\n                          desc: ' 🔽',\n                        }[header.column.getIsSorted() as string] ?? null}\n                      </div>\n                    </th>\n                  )\n                })}\n              </tr>\n            ))}\n          </thead>\n          <tbody\n            style={{\n              display: 'grid',\n              height: `${rowVirtualizer.getTotalSize()}px`, // tells scrollbar how big the table is\n              position: 'relative', // needed for absolute positioning of rows\n            }}\n          >\n            {rowVirtualizer.getVirtualItems().map((virtualRow) => {\n              const row = rows[virtualRow.index]\n              return (\n                <tr\n                  data-index={virtualRow.index} // needed for dynamic row height measurement\n                  ref={(node) => rowVirtualizer.measureElement(node)} // measure dynamic row height\n                  key={row.id}\n                  style={{\n                    display: 'flex',\n                    position: 'absolute',\n                    transform: `translateY(${virtualRow.start}px)`, // this should always be a `style` as it changes on scroll\n                    width: '100%',\n                  }}\n                >\n                  {row.getAllCells().map((cell) => {\n                    return (\n                      <td\n                        key={cell.id}\n                        style={{\n                          display: 'flex',\n                          width: cell.column.getSize(),\n                        }}\n                      >\n                        <table.FlexRender cell={cell} />\n                      </td>\n                    )\n                  })}\n                </tr>\n              )\n            })}\n          </tbody>\n        </table>\n      </div>\n      {isFetching && <div>Fetching More...</div>}\n    </div>\n  )\n}\n\nconst rootElement = document.getElementById('root')\n\nif (!rootElement) throw new Error('Failed to find the root element')\n\nconst queryClient = new QueryClient()\n\nReactDOM.createRoot(rootElement).render(\n  <React.StrictMode>\n    <QueryClientProvider client={queryClient}>\n      <App />\n    </QueryClientProvider>\n  </React.StrictMode>,\n)\n"
  },
  {
    "path": "examples/react/virtualized-infinite-scrolling/src/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\nimport type { SortingState } from '@tanstack/react-table'\n\nexport type Person = {\n  id: number\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  createdAt: Date\n}\n\nexport type PersonApiResponse = {\n  data: Array<Person>\n  meta: {\n    totalRowCount: number\n  }\n}\n\nconst range = (len: number) => {\n  const arr: Array<number> = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (index: number): Person => {\n  return {\n    id: index + 1,\n    firstName: faker.person.firstName(),\n    lastName: faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: faker.number.int(1000),\n    progress: faker.number.int(100),\n    createdAt: faker.date.anytime(),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0],\n  }\n}\n\nexport function makeData(...lens: Array<number>) {\n  const makeDataLevel = (depth = 0): Array<Person> => {\n    const len = lens[depth]\n    return range(len).map((d): Person => {\n      return {\n        ...newPerson(d),\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n\nconst data = makeData(1000)\n\n// simulates a backend api\nexport const fetchData = async (\n  start: number,\n  size: number,\n  sorting: SortingState,\n) => {\n  const dbData = [...data]\n  if (sorting.length) {\n    const sort = sorting[0]\n    const { id, desc } = sort as { id: keyof Person; desc: boolean }\n    dbData.sort((a, b) => {\n      if (desc) {\n        return a[id] < b[id] ? 1 : -1\n      }\n      return a[id] > b[id] ? 1 : -1\n    })\n  }\n\n  // simulate a backend api\n  await new Promise((resolve) => setTimeout(resolve, 200))\n\n  return {\n    data: dbData.slice(start, start + size),\n    meta: {\n      totalRowCount: dbData.length,\n    },\n  }\n}\n"
  },
  {
    "path": "examples/react/virtualized-infinite-scrolling/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"module\": \"ESNext\",\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"react-jsx\",\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "examples/react/virtualized-infinite-scrolling/vite.config.js",
    "content": "import { defineConfig } from 'vite'\nimport react from '@vitejs/plugin-react'\nimport rollupReplace from '@rollup/plugin-replace'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [\n    rollupReplace({\n      preventAssignment: true,\n      values: {\n        __DEV__: JSON.stringify(true),\n        'process.env.NODE_ENV': JSON.stringify('development'),\n      },\n    }),\n    react(),\n  ],\n})\n"
  },
  {
    "path": "examples/react/virtualized-rows/.gitignore",
    "content": "node_modules\n.DS_Store\ndist\ndist-ssr\n*.local\n"
  },
  {
    "path": "examples/react/virtualized-rows/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run start` or `yarn start`\n"
  },
  {
    "path": "examples/react/virtualized-rows/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite App</title>\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n    <script src=\"https://unpkg.com/react-scan/dist/auto.global.js\"></script>\n  </head>\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.tsx\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/react/virtualized-rows/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-virtualized-rows\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"start\": \"vite\",\n    \"lint\": \"eslint ./src\",\n    \"test:types\": \"tsc\"\n  },\n  \"dependencies\": {\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"@tanstack/react-table\": \"^9.0.0-alpha.19\",\n    \"@tanstack/react-virtual\": \"^3.13.18\",\n    \"react\": \"^19.2.4\",\n    \"react-dom\": \"^19.2.4\"\n  },\n  \"devDependencies\": {\n    \"@rollup/plugin-replace\": \"^6.0.3\",\n    \"@types/react\": \"^19.2.10\",\n    \"@types/react-dom\": \"^19.2.3\",\n    \"@vitejs/plugin-react\": \"^5.1.2\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\"\n  }\n}\n"
  },
  {
    "path": "examples/react/virtualized-rows/src/index.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border-collapse: collapse;\n  border-spacing: 0;\n  font-family: arial, sans-serif;\n  table-layout: fixed;\n}\n\nthead {\n  background: lightgray;\n}\n\ntr {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n  text-align: left;\n}\n\ntd {\n  padding: 6px;\n}\n\n.container {\n  border: 1px solid lightgray;\n  margin: 1rem auto;\n}\n\n.app {\n  margin: 1rem auto;\n  text-align: center;\n}\n"
  },
  {
    "path": "examples/react/virtualized-rows/src/main.tsx",
    "content": "import React, { useEffect } from 'react'\nimport ReactDOM from 'react-dom/client'\n\nimport './index.css'\n\nimport {\n  columnSizingFeature,\n  createSortedRowModel,\n  rowSortingFeature,\n  sortFns,\n  useTable,\n} from '@tanstack/react-table'\nimport { useVirtualizer } from '@tanstack/react-virtual'\nimport { makeData } from './makeData'\nimport type { ColumnDef, ReactTable, Row } from '@tanstack/react-table'\nimport type { VirtualItem, Virtualizer } from '@tanstack/react-virtual'\nimport type { Person } from './makeData'\n\nconst features = {\n  columnSizingFeature,\n  rowSortingFeature,\n}\n\n// This is a dynamic row height example, which is more complicated, but allows for a more realistic table.\n// See https://tanstack.com/virtual/v3/docs/examples/react/table for a simpler fixed row height example.\nfunction App() {\n  const columns = React.useMemo<Array<ColumnDef<typeof features, Person>>>(\n    () => [\n      {\n        accessorKey: 'id',\n        header: 'ID',\n        size: 60,\n      },\n      {\n        accessorKey: 'firstName',\n        cell: (info) => info.getValue(),\n      },\n      {\n        accessorFn: (row) => row.lastName,\n        id: 'lastName',\n        cell: (info) => info.getValue(),\n        header: () => <span>Last Name</span>,\n      },\n      {\n        accessorKey: 'age',\n        header: () => 'Age',\n        size: 50,\n      },\n      {\n        accessorKey: 'visits',\n        header: () => <span>Visits</span>,\n        size: 50,\n      },\n      {\n        accessorKey: 'status',\n        header: 'Status',\n      },\n      {\n        accessorKey: 'progress',\n        header: 'Profile Progress',\n        size: 80,\n      },\n      {\n        accessorKey: 'createdAt',\n        header: 'Created At',\n        cell: (info) => info.getValue<Date>().toLocaleString(),\n        size: 250,\n      },\n    ],\n    [],\n  )\n\n  // The virtualizer will need a reference to the scrollable container element\n  const tableContainerRef = React.useRef<HTMLDivElement>(null)\n\n  const [data, setData] = React.useState(() => makeData(100_000))\n\n  const refreshData = React.useCallback(() => {\n    setData(makeData(100_000))\n  }, [])\n\n  const table = useTable({\n    _features: features,\n    _rowModels: { sortedRowModel: createSortedRowModel(sortFns) },\n    columns,\n    data,\n    debugTable: true,\n  })\n\n  // All important CSS styles are included as inline styles for this example. This is not recommended for your code.\n  return (\n    <>\n      <div className=\"app\">\n        {process.env.NODE_ENV === 'development' ? (\n          <p>\n            <strong>Notice:</strong> You are currently running React in\n            development mode. Virtualized rendering performance will be slightly\n            degraded until this application is built for production.\n          </p>\n        ) : null}\n        ({data.length.toLocaleString()} rows)\n        <button onClick={refreshData}>Refresh Data</button>\n        <div\n          className=\"container\"\n          ref={tableContainerRef}\n          style={{\n            overflow: 'auto', // our scrollable table container\n            position: 'relative', // needed for sticky header\n            height: '800px', // should be a fixed height\n          }}\n        >\n          <table.Subscribe selector={(state) => state}>\n            {() => (\n              // Even though we're still using sematic table tags, we must use CSS grid and flexbox for dynamic row heights\n              <table style={{ display: 'grid' }}>\n                <thead\n                  style={{\n                    display: 'grid',\n                    position: 'sticky',\n                    top: 0,\n                    zIndex: 1,\n                  }}\n                >\n                  {table.getHeaderGroups().map((headerGroup) => (\n                    <tr\n                      key={headerGroup.id}\n                      style={{ display: 'flex', width: '100%' }}\n                    >\n                      {headerGroup.headers.map((header) => {\n                        return (\n                          <th\n                            key={header.id}\n                            style={{\n                              display: 'flex',\n                              width: header.getSize(),\n                            }}\n                          >\n                            <div\n                              {...{\n                                className: header.column.getCanSort()\n                                  ? 'cursor-pointer select-none'\n                                  : '',\n                                onClick:\n                                  header.column.getToggleSortingHandler(),\n                              }}\n                            >\n                              <table.FlexRender header={header} />\n                              {{\n                                asc: ' 🔼',\n                                desc: ' 🔽',\n                              }[header.column.getIsSorted() as string] ?? null}\n                            </div>\n                          </th>\n                        )\n                      })}\n                    </tr>\n                  ))}\n                </thead>\n                <TableBody\n                  table={table}\n                  tableContainerRef={tableContainerRef}\n                />\n              </table>\n            )}\n          </table.Subscribe>\n        </div>\n      </div>\n      <table.Subscribe selector={(state) => state}>\n        {(state) => <pre>{JSON.stringify(state, null, 2)}</pre>}\n      </table.Subscribe>\n    </>\n  )\n}\n\ninterface TableBodyProps {\n  table: ReactTable<typeof features, Person>\n  tableContainerRef: React.RefObject<HTMLDivElement | null>\n}\n\nfunction TableBody({ table, tableContainerRef }: TableBodyProps) {\n  const { rows } = table.getRowModel()\n\n  // Important: Keep the row virtualizer in the lowest component possible to avoid unnecessary re-renders.\n  const rowVirtualizer = useVirtualizer<HTMLDivElement, HTMLTableRowElement>({\n    count: rows.length,\n    estimateSize: () => 33, // estimate row height for accurate scrollbar dragging\n    getScrollElement: () => tableContainerRef.current,\n    // measure dynamic row height, except in firefox because it measures table border height incorrectly\n    measureElement:\n      typeof window !== 'undefined' &&\n      navigator.userAgent.indexOf('Firefox') === -1\n        ? (element) => element.getBoundingClientRect().height\n        : undefined,\n    overscan: 5,\n  })\n\n  useEffect(() => {\n    rowVirtualizer.measure()\n  }, [])\n\n  return (\n    <tbody\n      style={{\n        display: 'grid',\n        height: `${rowVirtualizer.getTotalSize()}px`, // tells scrollbar how big the table is\n        position: 'relative', // needed for absolute positioning of rows\n      }}\n    >\n      {rowVirtualizer.getVirtualItems().map((virtualRow) => {\n        const row = rows[virtualRow.index]\n        return (\n          <TableBodyRow\n            key={row.id}\n            row={row}\n            virtualRow={virtualRow}\n            rowVirtualizer={rowVirtualizer}\n            table={table}\n          />\n        )\n      })}\n    </tbody>\n  )\n}\n\ninterface TableBodyRowProps {\n  row: Row<typeof features, Person>\n  virtualRow: VirtualItem\n  rowVirtualizer: Virtualizer<HTMLDivElement, HTMLTableRowElement>\n  table: ReactTable<typeof features, Person>\n}\n\nfunction TableBodyRow({\n  row,\n  virtualRow,\n  rowVirtualizer,\n  table,\n}: TableBodyRowProps) {\n  return (\n    <tr\n      data-index={virtualRow.index} // needed for dynamic row height measurement\n      ref={(node) => rowVirtualizer.measureElement(node)} // measure dynamic row height\n      key={row.id}\n      style={{\n        display: 'flex',\n        position: 'absolute',\n        transform: `translateY(${virtualRow.start}px)`, // this should always be a `style` as it changes on scroll\n        width: '100%',\n      }}\n    >\n      {row.getAllCells().map((cell) => {\n        return (\n          <td\n            key={cell.id}\n            style={{\n              display: 'flex',\n              width: cell.column.getSize(),\n            }}\n          >\n            <table.FlexRender cell={cell} />\n          </td>\n        )\n      })}\n    </tr>\n  )\n}\n\nconst rootElement = document.getElementById('root')\n\nif (!rootElement) throw new Error('Failed to find the root element')\n\nReactDOM.createRoot(rootElement).render(\n  <React.StrictMode>\n    <App />\n  </React.StrictMode>,\n)\n"
  },
  {
    "path": "examples/react/virtualized-rows/src/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = {\n  id: number\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  createdAt: Date\n}\n\nconst range = (len: number) => {\n  const arr: Array<number> = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (index: number): Person => {\n  return {\n    id: index + 1,\n    firstName: faker.person.firstName(),\n    lastName: faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: faker.number.int(1000),\n    progress: faker.number.int(100),\n    createdAt: faker.date.anytime(),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0],\n  }\n}\n\nexport function makeData(...lens: Array<number>) {\n  const makeDataLevel = (depth = 0): Array<Person> => {\n    const len = lens[depth]\n    return range(len).map((d): Person => {\n      return {\n        ...newPerson(d),\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n"
  },
  {
    "path": "examples/react/virtualized-rows/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"module\": \"ESNext\",\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"react-jsx\",\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "examples/react/virtualized-rows/vite.config.js",
    "content": "import { defineConfig } from 'vite'\nimport react from '@vitejs/plugin-react'\nimport rollupReplace from '@rollup/plugin-replace'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [\n    rollupReplace({\n      preventAssignment: true,\n      values: {\n        __DEV__: JSON.stringify(true),\n        'process.env.NODE_ENV': JSON.stringify('development'),\n      },\n    }),\n    react(),\n  ],\n})\n"
  },
  {
    "path": "examples/react/virtualized-rows-experimental/.gitignore",
    "content": "node_modules\n.DS_Store\ndist\ndist-ssr\n*.local\n"
  },
  {
    "path": "examples/react/virtualized-rows-experimental/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run start` or `yarn start`\n"
  },
  {
    "path": "examples/react/virtualized-rows-experimental/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite App</title>\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n    <script src=\"https://unpkg.com/react-scan/dist/auto.global.js\"></script>\n  </head>\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.tsx\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/react/virtualized-rows-experimental/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-virtualized-rows-experimental\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"start\": \"vite\",\n    \"test:types\": \"tsc\"\n  },\n  \"dependencies\": {\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"@tanstack/react-table\": \"^9.0.0-alpha.19\",\n    \"@tanstack/react-virtual\": \"^3.13.18\",\n    \"react\": \"^19.2.4\",\n    \"react-dom\": \"^19.2.4\"\n  },\n  \"devDependencies\": {\n    \"@rollup/plugin-replace\": \"^6.0.3\",\n    \"@types/react\": \"^19.2.10\",\n    \"@types/react-dom\": \"^19.2.3\",\n    \"@vitejs/plugin-react\": \"^5.1.2\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\"\n  }\n}\n"
  },
  {
    "path": "examples/react/virtualized-rows-experimental/src/index.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border-collapse: collapse;\n  border-spacing: 0;\n  font-family: arial, sans-serif;\n  table-layout: fixed;\n}\n\nthead {\n  background: lightgray;\n}\n\ntr {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n  text-align: left;\n}\n\ntd {\n  padding: 6px;\n}\n\n.container {\n  border: 1px solid lightgray;\n  margin: 1rem auto;\n}\n\n.app {\n  margin: 1rem auto;\n  text-align: center;\n}\n"
  },
  {
    "path": "examples/react/virtualized-rows-experimental/src/main.tsx",
    "content": "import React from 'react'\nimport ReactDOM from 'react-dom/client'\nimport {\n  FlexRender,\n  columnSizingFeature,\n  createSortedRowModel,\n  rowSortingFeature,\n  sortFns,\n  useTable,\n} from '@tanstack/react-table'\nimport { useVirtualizer } from '@tanstack/react-virtual'\nimport { makeData } from './makeData'\nimport type { ColumnDef, Row, Table } from '@tanstack/react-table'\nimport type { Virtualizer } from '@tanstack/react-virtual'\nimport type { Person } from './makeData'\nimport './index.css'\n\nconst _features = {\n  columnSizingFeature,\n  rowSortingFeature,\n}\n\n// This is a dynamic row height example, which is more complicated, but allows for a more realistic table.\n// See https://tanstack.com/virtual/v3/docs/examples/react/table for a simpler fixed row height example.\nfunction App() {\n  const columns = React.useMemo<Array<ColumnDef<typeof _features, Person>>>(\n    () => [\n      {\n        accessorKey: 'id',\n        header: 'ID',\n        size: 60,\n      },\n      {\n        accessorKey: 'firstName',\n        cell: (info) => info.getValue(),\n      },\n      {\n        accessorFn: (row) => row.lastName,\n        id: 'lastName',\n        cell: (info) => info.getValue(),\n        header: () => <span>Last Name</span>,\n      },\n      {\n        accessorKey: 'age',\n        header: () => 'Age',\n        size: 50,\n      },\n      {\n        accessorKey: 'visits',\n        header: () => <span>Visits</span>,\n        size: 50,\n      },\n      {\n        accessorKey: 'status',\n        header: 'Status',\n      },\n      {\n        accessorKey: 'progress',\n        header: 'Profile Progress',\n        size: 80,\n      },\n      {\n        accessorKey: 'createdAt',\n        header: 'Created At',\n        cell: (info) => info.getValue<Date>().toLocaleString(),\n        size: 250,\n      },\n    ],\n    [],\n  )\n\n  const [data, _setData] = React.useState(() => makeData(50_000))\n\n  const refreshData = React.useCallback(() => {\n    _setData(makeData(50_000))\n  }, [])\n\n  // refresh data every 5 seconds\n  React.useEffect(() => {\n    const interval = setInterval(() => {\n      refreshData()\n    }, 5000)\n    return () => clearInterval(interval)\n  }, [refreshData])\n\n  console.log('data', data[0].firstName)\n\n  const table = useTable({\n    _features,\n    _rowModels: { sortedRowModel: createSortedRowModel(sortFns) },\n    columns,\n    data,\n    debugTable: true,\n  })\n\n  // The virtualizer needs to know the scrollable container element\n  const tableContainerRef = React.useRef<HTMLDivElement>(null)\n\n  // All important CSS styles are included as inline styles for this example. This is not recommended for your code.\n  return (\n    <div className=\"app\">\n      {process.env.NODE_ENV === 'development' ? (\n        <p>\n          <strong>Notice:</strong> You are currently running React in\n          development mode. Virtualized rendering performance will be slightly\n          degraded until this application is built for production.\n        </p>\n      ) : null}\n      ({data.length} rows)\n      <button onClick={refreshData}>Refresh Data</button>\n      <div\n        className=\"container\"\n        ref={tableContainerRef}\n        style={{\n          overflow: 'auto', // our scrollable table container\n          position: 'relative', // needed for sticky header\n          height: '800px', // should be a fixed height\n        }}\n      >\n        <table.Subscribe selector={(state) => ({ sorting: state.sorting })}>\n          {() => (\n            // Even though we're still using sematic table tags, we must use CSS grid and flexbox for dynamic row heights\n            <table style={{ display: 'grid' }}>\n              <thead\n                style={{\n                  display: 'grid',\n                  position: 'sticky',\n                  top: 0,\n                  zIndex: 1,\n                }}\n              >\n                {table.getHeaderGroups().map((headerGroup) => (\n                  <tr\n                    key={headerGroup.id}\n                    style={{ display: 'flex', width: '100%' }}\n                  >\n                    {headerGroup.headers.map((header) => {\n                      return (\n                        <th\n                          key={header.id}\n                          style={{\n                            display: 'flex',\n                            width: header.getSize(),\n                          }}\n                        >\n                          <div\n                            className={\n                              header.column.getCanSort()\n                                ? 'cursor-pointer select-none'\n                                : ''\n                            }\n                            onClick={header.column.getToggleSortingHandler()}\n                            title={\n                              header.column.getCanSort()\n                                ? header.column.getNextSortingOrder() === 'asc'\n                                  ? 'Sort ascending'\n                                  : header.column.getNextSortingOrder() ===\n                                      'desc'\n                                    ? 'Sort descending'\n                                    : 'Clear sort'\n                                : undefined\n                            }\n                          >\n                            <FlexRender header={header} />\n                            {{\n                              asc: ' 🔼',\n                              desc: ' 🔽',\n                            }[header.column.getIsSorted() as string] ?? null}\n                          </div>\n                        </th>\n                      )\n                    })}\n                  </tr>\n                ))}\n              </thead>\n              <TableBodyWrapper\n                table={table}\n                tableContainerRef={tableContainerRef}\n              />\n            </table>\n          )}\n        </table.Subscribe>\n      </div>\n    </div>\n  )\n}\n\ninterface TableBodyWrapperProps {\n  table: Table<typeof _features, Person>\n  tableContainerRef: React.RefObject<HTMLDivElement | null>\n}\n\nfunction TableBodyWrapper({ table, tableContainerRef }: TableBodyWrapperProps) {\n  const rowRefsMap = React.useRef<Map<number, HTMLTableRowElement>>(new Map())\n\n  const { rows } = table.getRowModel()\n\n  const rowVirtualizer = useVirtualizer<HTMLDivElement, HTMLTableRowElement>({\n    count: rows.length,\n    estimateSize: () => 33, // estimate row height for accurate scrollbar dragging\n    getScrollElement: () => tableContainerRef.current,\n    // measure dynamic row height, except in firefox because it measures table border height incorrectly\n    measureElement:\n      typeof window !== 'undefined' &&\n      navigator.userAgent.indexOf('Firefox') === -1\n        ? (element) => element.getBoundingClientRect().height\n        : undefined,\n    overscan: 5,\n    onChange: (instance) => {\n      // requestAnimationFrame(() => {\n      instance.getVirtualItems().forEach((virtualRow) => {\n        const rowRef = rowRefsMap.current.get(virtualRow.index)\n        if (!rowRef) return\n        rowRef.style.transform = `translateY(${virtualRow.start}px)`\n      })\n      // })\n    },\n  })\n\n  React.useLayoutEffect(() => {\n    rowVirtualizer.measure()\n  }, [table.store.state])\n\n  return (\n    <TableBody\n      rowRefsMap={rowRefsMap}\n      rowVirtualizer={rowVirtualizer}\n      table={table}\n    />\n  )\n}\n\ninterface TableBodyProps {\n  table: Table<typeof _features, Person>\n  rowVirtualizer: Virtualizer<HTMLDivElement, HTMLTableRowElement>\n  rowRefsMap: React.MutableRefObject<Map<number, HTMLTableRowElement>>\n}\n\nfunction TableBody({ rowVirtualizer, table, rowRefsMap }: TableBodyProps) {\n  const { rows } = table.getRowModel()\n  const virtualRowIndexes = rowVirtualizer.getVirtualIndexes()\n\n  return (\n    <tbody\n      style={{\n        display: 'grid',\n        height: `${rowVirtualizer.getTotalSize()}px`, // tells scrollbar how big the table is\n        position: 'relative', // needed for absolute positioning of rows\n      }}\n    >\n      {virtualRowIndexes.map((virtualRowIndex) => {\n        const row = rows[virtualRowIndex]\n        return (\n          <TableBodyRowMemo\n            key={row.id}\n            row={row}\n            rowRefsMap={rowRefsMap}\n            rowVirtualizer={rowVirtualizer}\n            virtualRowIndex={virtualRowIndex}\n          />\n        )\n      })}\n    </tbody>\n  )\n}\n\ninterface TableBodyRowProps {\n  row: Row<typeof _features, Person>\n  rowRefsMap: React.MutableRefObject<Map<number, HTMLTableRowElement>>\n  rowVirtualizer: Virtualizer<HTMLDivElement, HTMLTableRowElement>\n  virtualRowIndex: number\n}\n\nfunction TableBodyRow({\n  row,\n  rowRefsMap,\n  rowVirtualizer,\n  virtualRowIndex,\n}: TableBodyRowProps) {\n  return (\n    <tr\n      data-index={virtualRowIndex} // needed for dynamic row height measurement\n      ref={(node) => {\n        if (node && typeof virtualRowIndex !== 'undefined') {\n          rowVirtualizer.measureElement(node) // measure dynamic row height\n          rowRefsMap.current.set(virtualRowIndex, node) // store ref for virtualizer to apply scrolling transforms\n        }\n      }}\n      key={row.id}\n      style={{\n        display: 'flex',\n        position: 'absolute',\n        width: '100%',\n      }}\n    >\n      {row.getAllCells().map((cell) => {\n        return (\n          <td\n            key={cell.id}\n            style={{\n              display: 'flex',\n              width: cell.column.getSize(),\n            }}\n          >\n            <FlexRender cell={cell} />\n          </td>\n        )\n      })}\n    </tr>\n  )\n}\n\n// test out when rows don't re-render at all (future TanStack Virtual release can make this unnecessary)\nconst TableBodyRowMemo = React.memo(\n  TableBodyRow,\n  (_prev, next) => next.rowVirtualizer.isScrolling,\n) as typeof TableBodyRow\n\nconst rootElement = document.getElementById('root')\n\nif (!rootElement) throw new Error('Failed to find the root element')\n\nReactDOM.createRoot(rootElement).render(\n  // <React.StrictMode>\n  <App />,\n  // </React.StrictMode>,\n)\n"
  },
  {
    "path": "examples/react/virtualized-rows-experimental/src/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = {\n  id: number\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  createdAt: Date\n}\n\nconst range = (len: number) => {\n  const arr: number[] = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (index: number): Person => {\n  return {\n    id: index + 1,\n    firstName: faker.person.firstName(),\n    lastName: faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: faker.number.int(1000),\n    progress: faker.number.int(100),\n    createdAt: faker.date.anytime(),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0]!,\n  }\n}\n\nexport function makeData(...lens: number[]) {\n  const makeDataLevel = (depth = 0): Person[] => {\n    const len = lens[depth]!\n    return range(len).map((d): Person => {\n      return {\n        ...newPerson(d),\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n"
  },
  {
    "path": "examples/react/virtualized-rows-experimental/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"module\": \"ESNext\",\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"react-jsx\",\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "examples/react/virtualized-rows-experimental/vite.config.js",
    "content": "import { defineConfig } from 'vite'\nimport react from '@vitejs/plugin-react'\nimport rollupReplace from '@rollup/plugin-replace'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [\n    rollupReplace({\n      preventAssignment: true,\n      values: {\n        __DEV__: JSON.stringify(true),\n        'process.env.NODE_ENV': JSON.stringify('development'),\n      },\n    }),\n    react(),\n  ],\n})\n"
  },
  {
    "path": "examples/react/with-tanstack-form/.gitignore",
    "content": "node_modules\n.DS_Store\ndist\ndist-ssr\n*.local\n"
  },
  {
    "path": "examples/react/with-tanstack-form/README.md",
    "content": "# Editable Data with TanStack Form\n\nThis example demonstrates integrating TanStack Form with TanStack Table for editable data management.\n\n## Features\n\n- **Form-based editing**: Each table cell is a form field managed by TanStack Form\n- **Array field management**: Table data is stored as a form array with indexed field access\n- **Validation**: Per-field Zod validation with error display\n- **Form state tracking**: Dirty/pristine and valid/invalid indicators\n- **Pagination & Filtering**: Full table features work with form-managed data\n\n## Key Patterns\n\n- `useAppForm` with `defaultValues: { data: [...] }` for array data\n- `form.AppField name=\"data[${row.index}].fieldName\"` for cell editing\n- `table.Subscribe` for reactive table state\n- `table.FlexRender` for cell rendering\n\n## Running the Example\n\n```bash\npnpm install\npnpm dev\n```\n"
  },
  {
    "path": "examples/react/with-tanstack-form/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite App</title>\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n    <script src=\"https://unpkg.com/react-scan/dist/auto.global.js\"></script>\n  </head>\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.tsx\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/react/with-tanstack-form/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-with-tanstack-form\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"start\": \"vite\",\n    \"lint\": \"eslint ./src\",\n    \"test:types\": \"tsc\"\n  },\n  \"dependencies\": {\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"@tanstack/react-form\": \"^1.28.0\",\n    \"@tanstack/react-table\": \"^9.0.0-alpha.19\",\n    \"react\": \"^19.2.4\",\n    \"react-dom\": \"^19.2.4\",\n    \"zod\": \"^4.3.6\"\n  },\n  \"devDependencies\": {\n    \"@rollup/plugin-replace\": \"^6.0.3\",\n    \"@types/react\": \"^19.2.10\",\n    \"@types/react-dom\": \"^19.2.3\",\n    \"@vitejs/plugin-react\": \"^5.1.2\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\"\n  }\n}\n"
  },
  {
    "path": "examples/react/with-tanstack-form/src/form.tsx",
    "content": "import {\n  createFormHook,\n  createFormHookContexts,\n  useStore,\n} from '@tanstack/react-form'\n\n// Create form and field contexts\nexport const { fieldContext, useFieldContext, formContext, useFormContext } =\n  createFormHookContexts()\n\n// TextField component for string inputs\nfunction TextField() {\n  const field = useFieldContext<string>()\n  const errors = useStore(field.store, (state) => state.meta.errors)\n\n  return (\n    <div>\n      <input\n        className=\"border rounded px-1 w-full\"\n        value={field.state.value}\n        onChange={(e) => field.handleChange(e.target.value)}\n        onBlur={field.handleBlur}\n      />\n      {errors.length > 0 && (\n        <div className=\"text-red-500 text-xs\">{errors.join(', ')}</div>\n      )}\n    </div>\n  )\n}\n\n// NumberField component for numeric inputs\nfunction NumberField() {\n  const field = useFieldContext<number>()\n  const errors = useStore(field.store, (state) => state.meta.errors)\n\n  return (\n    <div>\n      <input\n        type=\"number\"\n        className=\"border rounded px-1 w-20\"\n        value={field.state.value}\n        onChange={(e) => field.handleChange(Number(e.target.value))}\n        onBlur={field.handleBlur}\n      />\n      {errors.length > 0 && (\n        <div className=\"text-red-500 text-xs\">{errors.join(', ')}</div>\n      )}\n    </div>\n  )\n}\n\n// SelectField component for status dropdown\nconst statusOptions = ['relationship', 'complicated', 'single'] as const\n\nfunction SelectField() {\n  const field = useFieldContext<string>()\n  const errors = useStore(field.store, (state) => state.meta.errors)\n\n  return (\n    <div>\n      <select\n        className=\"border rounded px-1\"\n        value={field.state.value}\n        onChange={(e) => field.handleChange(e.target.value)}\n        onBlur={field.handleBlur}\n      >\n        {statusOptions.map((status) => (\n          <option key={status} value={status}>\n            {status}\n          </option>\n        ))}\n      </select>\n      {errors.length > 0 && (\n        <div className=\"text-red-500 text-xs\">{errors.join(', ')}</div>\n      )}\n    </div>\n  )\n}\n\n// SubmitButton component that shows form state\nfunction SubmitButton({ label }: { label: string }) {\n  const form = useFormContext()\n  return (\n    <form.Subscribe selector={(state) => [state.isSubmitting, state.canSubmit]}>\n      {([isSubmitting, canSubmit]) => (\n        <button\n          type=\"submit\"\n          disabled={!canSubmit || isSubmitting}\n          className=\"border rounded px-4 py-2 bg-blue-500 text-white disabled:opacity-50\"\n        >\n          {isSubmitting ? 'Submitting...' : label}\n        </button>\n      )}\n    </form.Subscribe>\n  )\n}\n\n// FormStateIndicator component to show dirty/valid state\nfunction FormStateIndicator() {\n  const form = useFormContext()\n  return (\n    <form.Subscribe\n      selector={(state) => ({\n        isDirty: state.isDirty,\n        isValid: state.isValid,\n        errorMap: state.errorMap,\n      })}\n    >\n      {({ isDirty, isValid, errorMap }) => (\n        <div className=\"flex gap-4 text-sm\">\n          <span className={isDirty ? 'text-yellow-600' : 'text-gray-400'}>\n            {isDirty ? '● Modified' : '○ Pristine'}\n          </span>\n          <span className={isValid ? 'text-green-600' : 'text-red-600'}>\n            {isValid ? '✓ Valid' : '✗ Invalid'}\n          </span>\n          {Object.keys(errorMap).length > 0 && (\n            <span className=\"text-red-600\">\n              Errors: {JSON.stringify(errorMap)}\n            </span>\n          )}\n        </div>\n      )}\n    </form.Subscribe>\n  )\n}\n\n// Create the form hook with all components\nexport const { useAppForm, withForm } = createFormHook({\n  fieldComponents: {\n    TextField,\n    NumberField,\n    SelectField,\n  },\n  formComponents: {\n    SubmitButton,\n    FormStateIndicator,\n  },\n  fieldContext,\n  formContext,\n})\n"
  },
  {
    "path": "examples/react/with-tanstack-form/src/index.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n"
  },
  {
    "path": "examples/react/with-tanstack-form/src/main.tsx",
    "content": "import React from 'react'\nimport ReactDOM from 'react-dom/client'\nimport {\n  columnFilteringFeature,\n  createColumnHelper,\n  createFilteredRowModel,\n  createPaginatedRowModel,\n  filterFns,\n  rowPaginationFeature,\n  tableFeatures,\n  useTable,\n} from '@tanstack/react-table'\nimport { useStore } from '@tanstack/react-form'\nimport { z } from 'zod'\nimport { makeData } from './makeData'\nimport { useAppForm } from './form'\nimport type { Column, Table } from '@tanstack/react-table'\nimport type { Person } from './makeData'\nimport './index.css'\n\n// Define table features\nconst _features = tableFeatures({\n  rowPaginationFeature,\n  columnFilteringFeature,\n})\n\n// Create column helper with features and Person type\nconst columnHelper = createColumnHelper<typeof _features, Person>()\n\n// Zod validation schema for a person\nconst personSchema = z.object({\n  firstName: z.string().min(1, 'First name is required'),\n  lastName: z.string().min(1, 'Last name is required'),\n  age: z\n    .number()\n    .min(0, 'Age must be positive')\n    .max(150, 'Age must be realistic'),\n  visits: z.number().min(0, 'Visits must be positive'),\n  progress: z\n    .number()\n    .min(0, 'Progress must be 0-100')\n    .max(100, 'Progress must be 0-100'),\n  status: z.enum(['relationship', 'complicated', 'single']),\n})\n\n// Form data schema\nconst formSchema = z.object({\n  data: z.array(personSchema),\n})\n\ntype FormData = z.infer<typeof formSchema>\n\nfunction App() {\n  // Initialize form with makeData\n  const form = useAppForm({\n    defaultValues: {\n      data: makeData(100),\n    } as FormData,\n    onSubmit: ({ value }) => {\n      alert(\n        `Submitted ${value.data.length} records!\\n\\nFirst record: ${JSON.stringify(value.data[0], null, 2)}`,\n      )\n    },\n    validators: {\n      onChange: formSchema,\n    },\n  })\n\n  // Create columns with form fields for editing\n  const columns = React.useMemo(\n    () =>\n      columnHelper.columns([\n        columnHelper.accessor('firstName', {\n          header: 'First Name',\n          footer: (props) => props.column.id,\n          cell: ({ row }) => (\n            <form.AppField\n              name={`data[${row.index}].firstName`}\n              validators={{\n                onChange: z.string().min(1, 'Required'),\n              }}\n            >\n              {(field) => <field.TextField />}\n            </form.AppField>\n          ),\n        }),\n        columnHelper.accessor('lastName', {\n          header: () => <span>Last Name</span>,\n          footer: (props) => props.column.id,\n          cell: ({ row }) => (\n            <form.AppField\n              name={`data[${row.index}].lastName`}\n              validators={{\n                onChange: z.string().min(1, 'Required'),\n              }}\n            >\n              {(field) => <field.TextField />}\n            </form.AppField>\n          ),\n        }),\n        columnHelper.accessor('age', {\n          header: () => 'Age',\n          footer: (props) => props.column.id,\n          cell: ({ row }) => (\n            <form.AppField\n              name={`data[${row.index}].age`}\n              validators={{\n                onChange: z.number().min(0, 'Must be positive'),\n              }}\n            >\n              {(field) => <field.NumberField />}\n            </form.AppField>\n          ),\n        }),\n        columnHelper.accessor('visits', {\n          header: () => <span>Visits</span>,\n          footer: (props) => props.column.id,\n          cell: ({ row }) => (\n            <form.AppField\n              name={`data[${row.index}].visits`}\n              validators={{\n                onChange: z.number().min(0, 'Must be positive'),\n              }}\n            >\n              {(field) => <field.NumberField />}\n            </form.AppField>\n          ),\n        }),\n        columnHelper.accessor('status', {\n          header: 'Status',\n          footer: (props) => props.column.id,\n          cell: ({ row }) => (\n            <form.AppField name={`data[${row.index}].status`}>\n              {(field) => <field.SelectField />}\n            </form.AppField>\n          ),\n        }),\n        columnHelper.accessor('progress', {\n          header: 'Profile Progress',\n          footer: (props) => props.column.id,\n          cell: ({ row }) => (\n            <form.AppField\n              name={`data[${row.index}].progress`}\n              validators={{\n                onChange: z.number().min(0).max(100, 'Must be 0-100'),\n              }}\n            >\n              {(field) => <field.NumberField />}\n            </form.AppField>\n          ),\n        }),\n      ]),\n    [form],\n  )\n\n  // Subscribe only to array length to trigger re-renders when rows are added/removed\n  // This avoids infinite loops from subscribing to the entire data array\n  const dataLength = useStore(form.store, (state) => state.values.data.length)\n  void dataLength // Used to trigger re-renders, value not needed\n\n  // Create table using form state as data source\n  // The table gets fresh data on each render, cells handle their own field state\n  const table = useTable({\n    _features,\n    _rowModels: {\n      filteredRowModel: createFilteredRowModel(filterFns),\n      paginatedRowModel: createPaginatedRowModel(),\n    },\n    columns,\n    data: form.state.values.data,\n    debugTable: true,\n  })\n\n  const refreshData = () => {\n    form.reset({ data: makeData(100) })\n  }\n\n  const addRow = () => {\n    form.pushFieldValue('data', {\n      firstName: '',\n      lastName: '',\n      age: 0,\n      visits: 0,\n      progress: 0,\n      status: 'single',\n    })\n  }\n\n  return (\n    <div className=\"p-2\">\n      <form\n        onSubmit={(e) => {\n          e.preventDefault()\n          e.stopPropagation()\n          form.handleSubmit()\n        }}\n      >\n        {/* Form state indicators */}\n        <div className=\"mb-4 flex items-center gap-4\">\n          <form.AppForm>\n            <form.FormStateIndicator />\n          </form.AppForm>\n          <form.AppForm>\n            <form.SubmitButton label=\"Save All Changes\" />\n          </form.AppForm>\n          <button\n            type=\"button\"\n            onClick={addRow}\n            className=\"border rounded px-4 py-2 bg-green-500 text-white\"\n          >\n            Add Row\n          </button>\n          <button\n            type=\"button\"\n            onClick={refreshData}\n            className=\"border rounded px-4 py-2 bg-gray-500 text-white\"\n          >\n            Reset Data\n          </button>\n        </div>\n\n        {/* Table */}\n        <table.Subscribe\n          selector={(state) => ({\n            pagination: state.pagination,\n            columnFilters: state.columnFilters,\n          })}\n        >\n          {(tableState) => (\n            <>\n              <div className=\"h-2\" />\n              <table>\n                <thead>\n                  {table.getHeaderGroups().map((headerGroup) => (\n                    <tr key={headerGroup.id}>\n                      {headerGroup.headers.map((header) => {\n                        return (\n                          <th key={header.id} colSpan={header.colSpan}>\n                            {header.isPlaceholder ? null : (\n                              <div>\n                                <table.FlexRender header={header} />\n                                {header.column.getCanFilter() ? (\n                                  <div>\n                                    <Filter\n                                      column={header.column}\n                                      table={table}\n                                    />\n                                  </div>\n                                ) : null}\n                              </div>\n                            )}\n                          </th>\n                        )\n                      })}\n                    </tr>\n                  ))}\n                </thead>\n                <tbody>\n                  {table.getRowModel().rows.map((row) => {\n                    return (\n                      <tr key={row.id}>\n                        {row.getAllCells().map((cell) => {\n                          return (\n                            <td key={cell.id}>\n                              <table.FlexRender cell={cell} />\n                            </td>\n                          )\n                        })}\n                      </tr>\n                    )\n                  })}\n                </tbody>\n              </table>\n\n              {/* Pagination controls */}\n              <div className=\"h-2\" />\n              <div className=\"flex items-center gap-2\">\n                <button\n                  type=\"button\"\n                  className=\"border rounded p-1\"\n                  onClick={() => table.firstPage()}\n                  disabled={!table.getCanPreviousPage()}\n                >\n                  {'<<'}\n                </button>\n                <button\n                  type=\"button\"\n                  className=\"border rounded p-1\"\n                  onClick={() => table.previousPage()}\n                  disabled={!table.getCanPreviousPage()}\n                >\n                  {'<'}\n                </button>\n                <button\n                  type=\"button\"\n                  className=\"border rounded p-1\"\n                  onClick={() => table.nextPage()}\n                  disabled={!table.getCanNextPage()}\n                >\n                  {'>'}\n                </button>\n                <button\n                  type=\"button\"\n                  className=\"border rounded p-1\"\n                  onClick={() => table.lastPage()}\n                  disabled={!table.getCanNextPage()}\n                >\n                  {'>>'}\n                </button>\n                <span className=\"flex items-center gap-1\">\n                  <div>Page</div>\n                  <strong>\n                    {tableState.pagination.pageIndex + 1} of{' '}\n                    {table.getPageCount().toLocaleString()}\n                  </strong>\n                </span>\n                <span className=\"flex items-center gap-1\">\n                  | Go to page:\n                  <input\n                    type=\"number\"\n                    min=\"1\"\n                    max={table.getPageCount()}\n                    defaultValue={tableState.pagination.pageIndex + 1}\n                    onChange={(e) => {\n                      const page = e.target.value\n                        ? Number(e.target.value) - 1\n                        : 0\n                      table.setPageIndex(page)\n                    }}\n                    className=\"border p-1 rounded w-16\"\n                  />\n                </span>\n                <select\n                  value={tableState.pagination.pageSize}\n                  onChange={(e) => {\n                    table.setPageSize(Number(e.target.value))\n                  }}\n                >\n                  {[10, 20, 30, 40, 50].map((pageSize) => (\n                    <option key={pageSize} value={pageSize}>\n                      Show {pageSize}\n                    </option>\n                  ))}\n                </select>\n              </div>\n              <div>\n                Showing {table.getRowModel().rows.length.toLocaleString()} of{' '}\n                {table.getRowCount().toLocaleString()} Rows\n              </div>\n            </>\n          )}\n        </table.Subscribe>\n      </form>\n    </div>\n  )\n}\n\nfunction Filter({\n  column,\n  table,\n}: {\n  column: Column<typeof _features, Person>\n  table: Table<typeof _features, Person>\n}) {\n  const firstValue = table\n    .getPreFilteredRowModel()\n    .flatRows[0]?.getValue(column.id)\n\n  const columnFilterValue = column.getFilterValue()\n\n  return typeof firstValue === 'number' ? (\n    <div className=\"flex space-x-2\">\n      <input\n        type=\"number\"\n        value={(columnFilterValue as [number, number] | undefined)?.[0] ?? ''}\n        onChange={(e) =>\n          column.setFilterValue((old: [number, number]) => [\n            e.target.value,\n            old[1],\n          ])\n        }\n        placeholder={`Min`}\n        className=\"w-24 border shadow rounded\"\n      />\n      <input\n        type=\"number\"\n        value={(columnFilterValue as [number, number] | undefined)?.[1] ?? ''}\n        onChange={(e) =>\n          column.setFilterValue((old: [number, number]) => [\n            old[0],\n            e.target.value,\n          ])\n        }\n        placeholder={`Max`}\n        className=\"w-24 border shadow rounded\"\n      />\n    </div>\n  ) : (\n    <input\n      type=\"text\"\n      value={(columnFilterValue ?? '') as string}\n      onChange={(e) => column.setFilterValue(e.target.value)}\n      placeholder={`Search...`}\n      className=\"w-36 border shadow rounded\"\n    />\n  )\n}\n\nconst rootElement = document.getElementById('root')\nif (!rootElement) throw new Error('Failed to find the root element')\n\nReactDOM.createRoot(rootElement).render(\n  <React.StrictMode>\n    <App />\n  </React.StrictMode>,\n)\n"
  },
  {
    "path": "examples/react/with-tanstack-form/src/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  subRows?: Array<Person>\n}\n\nconst range = (len: number) => {\n  const arr: Array<number> = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (): Person => {\n  return {\n    firstName: faker.person.firstName(),\n    lastName: faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: faker.number.int(1000),\n    progress: faker.number.int(100),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0],\n  }\n}\n\nexport function makeData(...lens: Array<number>) {\n  const makeDataLevel = (depth = 0): Array<Person> => {\n    const len = lens[depth]\n    return range(len).map((_d): Person => {\n      return {\n        ...newPerson(),\n        subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined,\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n"
  },
  {
    "path": "examples/react/with-tanstack-form/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"module\": \"ESNext\",\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"react-jsx\",\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "examples/react/with-tanstack-form/vite.config.js",
    "content": "import { defineConfig } from 'vite'\nimport react from '@vitejs/plugin-react'\nimport rollupReplace from '@rollup/plugin-replace'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [\n    rollupReplace({\n      preventAssignment: true,\n      values: {\n        __DEV__: JSON.stringify(true),\n        'process.env.NODE_ENV': JSON.stringify('development'),\n      },\n    }),\n    react(),\n  ],\n})\n"
  },
  {
    "path": "examples/react/with-tanstack-query/.gitignore",
    "content": "node_modules\n.DS_Store\ndist\ndist-ssr\n*.local\n"
  },
  {
    "path": "examples/react/with-tanstack-query/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run start` or `yarn start`\n"
  },
  {
    "path": "examples/react/with-tanstack-query/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite App</title>\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n    <script src=\"https://unpkg.com/react-scan/dist/auto.global.js\"></script>\n  </head>\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.tsx\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/react/with-tanstack-query/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-with-tanstack-query\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"start\": \"vite\",\n    \"lint\": \"eslint ./src\",\n    \"test:types\": \"tsc\"\n  },\n  \"dependencies\": {\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"@tanstack/react-query\": \"^5.90.20\",\n    \"@tanstack/react-store\": \"^0.9.2\",\n    \"@tanstack/react-table\": \"^9.0.0-alpha.19\",\n    \"react\": \"^19.2.4\",\n    \"react-dom\": \"^19.2.4\"\n  },\n  \"devDependencies\": {\n    \"@rollup/plugin-replace\": \"^6.0.3\",\n    \"@types/react\": \"^19.2.10\",\n    \"@types/react-dom\": \"^19.2.3\",\n    \"@vitejs/plugin-react\": \"^5.1.2\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\"\n  }\n}\n"
  },
  {
    "path": "examples/react/with-tanstack-query/src/fetchData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  subRows?: Array<Person>\n}\n\nconst range = (len: number) => {\n  const arr: Array<number> = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (): Person => {\n  return {\n    firstName: faker.person.firstName(),\n    lastName: faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: faker.number.int(1000),\n    progress: faker.number.int(100),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0],\n  }\n}\n\nexport function makeData(...lens: Array<number>) {\n  const makeDataLevel = (depth = 0): Array<Person> => {\n    const len = lens[depth]\n    return range(len).map((_d): Person => {\n      return {\n        ...newPerson(),\n        subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined,\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n\nconst data = makeData(10000)\n\nexport async function fetchData(options: {\n  pageIndex: number\n  pageSize: number\n}) {\n  // Simulate some network latency\n  await new Promise((r) => setTimeout(r, 500))\n\n  return {\n    rows: data.slice(\n      options.pageIndex * options.pageSize,\n      (options.pageIndex + 1) * options.pageSize,\n    ),\n    pageCount: Math.ceil(data.length / options.pageSize),\n    rowCount: data.length,\n  }\n}\n"
  },
  {
    "path": "examples/react/with-tanstack-query/src/index.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n\nbutton:disabled {\n  opacity: 0.5;\n}\n"
  },
  {
    "path": "examples/react/with-tanstack-query/src/main.tsx",
    "content": "import React from 'react'\nimport ReactDOM from 'react-dom/client'\nimport {\n  QueryClient,\n  QueryClientProvider,\n  keepPreviousData,\n  useQuery,\n} from '@tanstack/react-query'\nimport { createStore, useStore } from '@tanstack/react-store'\nimport './index.css'\nimport {\n  createColumnHelper,\n  getInitialTableState,\n  rowPaginationFeature,\n  tableFeatures,\n  useTable,\n} from '@tanstack/react-table'\nimport { fetchData } from './fetchData'\nimport type { Person } from './fetchData'\n\nconst queryClient = new QueryClient()\n\nconst _features = tableFeatures({\n  rowPaginationFeature,\n})\n\nconst columnHelper = createColumnHelper<typeof _features, Person>()\n\nconst columns = columnHelper.columns([\n  columnHelper.accessor('firstName', {\n    header: 'First Name',\n    cell: (info) => info.getValue(),\n  }),\n  columnHelper.accessor('lastName', {\n    header: 'Last Name',\n    cell: (info) => info.getValue(),\n  }),\n  columnHelper.accessor('age', {\n    header: 'Age',\n  }),\n  columnHelper.accessor('visits', {\n    header: 'Visits',\n  }),\n  columnHelper.accessor('status', {\n    header: 'Status',\n  }),\n  columnHelper.accessor('progress', {\n    header: 'Profile Progress',\n  }),\n])\n\nconst myTableStore = createStore(\n  getInitialTableState(_features, {\n    pagination: { pageIndex: 0, pageSize: 10 },\n  }),\n)\n\nfunction App() {\n  const rerender = React.useReducer(() => ({}), {})[1]\n\n  // Subscribe to store state for reactive updates\n  const state = useStore(myTableStore, (state) => state)\n\n  const dataQuery = useQuery({\n    queryKey: ['data', state.pagination],\n    queryFn: () => fetchData(state.pagination),\n    placeholderData: keepPreviousData, // don't have 0 rows flash while changing pages/loading next page\n  })\n\n  const defaultData = React.useMemo(() => [], [])\n\n  const table = useTable({\n    _features,\n    _rowModels: {},\n    columns,\n    data: dataQuery.data?.rows ?? defaultData,\n    rowCount: dataQuery.data?.rowCount,\n    store: myTableStore,\n    manualPagination: true, // we're doing manual \"server-side\" pagination\n    debugTable: true,\n  })\n\n  return (\n    <div className=\"p-2\">\n      <div className=\"h-2\" />\n      <table>\n        <thead>\n          {table.getHeaderGroups().map((headerGroup) => (\n            <tr key={headerGroup.id}>\n              {headerGroup.headers.map((header) => (\n                <th key={header.id} colSpan={header.colSpan}>\n                  {header.isPlaceholder ? null : (\n                    <table.FlexRender header={header} />\n                  )}\n                </th>\n              ))}\n            </tr>\n          ))}\n        </thead>\n        <tbody>\n          {table.getRowModel().rows.map((row) => (\n            <tr key={row.id}>\n              {row.getAllCells().map((cell) => (\n                <td key={cell.id}>\n                  <table.FlexRender cell={cell} />\n                </td>\n              ))}\n            </tr>\n          ))}\n        </tbody>\n      </table>\n      <div className=\"h-2\" />\n      <div className=\"flex items-center gap-2\">\n        <button\n          className=\"border rounded p-1\"\n          onClick={() => table.firstPage()}\n          disabled={!table.getCanPreviousPage()}\n        >\n          {'<<'}\n        </button>\n        <button\n          className=\"border rounded p-1\"\n          onClick={() => table.previousPage()}\n          disabled={!table.getCanPreviousPage()}\n        >\n          {'<'}\n        </button>\n        <button\n          className=\"border rounded p-1\"\n          onClick={() => table.nextPage()}\n          disabled={!table.getCanNextPage()}\n        >\n          {'>'}\n        </button>\n        <button\n          className=\"border rounded p-1\"\n          onClick={() => table.lastPage()}\n          disabled={!table.getCanNextPage()}\n        >\n          {'>>'}\n        </button>\n        <span className=\"flex items-center gap-1\">\n          <div>Page</div>\n          <strong>\n            {state.pagination.pageIndex + 1} of{' '}\n            {table.getPageCount().toLocaleString()}\n          </strong>\n        </span>\n        <span className=\"flex items-center gap-1\">\n          | Go to page:\n          <input\n            type=\"number\"\n            min=\"1\"\n            max={table.getPageCount()}\n            defaultValue={state.pagination.pageIndex + 1}\n            onChange={(e) => {\n              const page = e.target.value ? Number(e.target.value) - 1 : 0\n              table.setPageIndex(page)\n            }}\n            className=\"border p-1 rounded w-16\"\n          />\n        </span>\n        <select\n          value={state.pagination.pageSize}\n          onChange={(e) => {\n            table.setPageSize(Number(e.target.value))\n          }}\n        >\n          {[10, 20, 30, 40, 50].map((pageSize) => (\n            <option key={pageSize} value={pageSize}>\n              Show {pageSize}\n            </option>\n          ))}\n        </select>\n        {dataQuery.isFetching ? 'Loading...' : null}\n      </div>\n      <div>\n        Showing {table.getRowModel().rows.length.toLocaleString()} of{' '}\n        {dataQuery.data?.rowCount.toLocaleString()} Rows\n      </div>\n      <div>\n        <button onClick={() => rerender()}>Force Rerender</button>\n      </div>\n      <pre>{JSON.stringify(state, null, 2)}</pre>\n    </div>\n  )\n}\n\nconst rootElement = document.getElementById('root')\nif (!rootElement) throw new Error('Failed to find the root element')\n\nReactDOM.createRoot(rootElement).render(\n  <React.StrictMode>\n    <QueryClientProvider client={queryClient}>\n      <App />\n    </QueryClientProvider>\n  </React.StrictMode>,\n)\n"
  },
  {
    "path": "examples/react/with-tanstack-query/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"module\": \"ESNext\",\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"react-jsx\",\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "examples/react/with-tanstack-query/vite.config.js",
    "content": "import { defineConfig } from 'vite'\nimport react from '@vitejs/plugin-react'\nimport rollupReplace from '@rollup/plugin-replace'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [\n    rollupReplace({\n      preventAssignment: true,\n      values: {\n        __DEV__: JSON.stringify(true),\n        'process.env.NODE_ENV': JSON.stringify('development'),\n      },\n    }),\n    react(),\n  ],\n})\n"
  },
  {
    "path": "examples/react/with-tanstack-router/.gitignore",
    "content": "node_modules\n.DS_Store\ndist\ndist-ssr\n*.local\n"
  },
  {
    "path": "examples/react/with-tanstack-router/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run start` or `yarn start`\n"
  },
  {
    "path": "examples/react/with-tanstack-router/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite App</title>\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n    <script src=\"https://unpkg.com/react-scan/dist/auto.global.js\"></script>\n  </head>\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.tsx\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/react/with-tanstack-router/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-with-tanstack-router\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"start\": \"vite\",\n    \"lint\": \"eslint ./src\",\n    \"test:types\": \"tsc\"\n  },\n  \"dependencies\": {\n    \"@tanstack/react-query\": \"^5.90.20\",\n    \"@tanstack/react-router\": \"^1.157.16\",\n    \"@tanstack/react-table\": \"^9.0.0-alpha.19\",\n    \"react\": \"^19.2.4\",\n    \"react-dom\": \"^19.2.4\"\n  },\n  \"devDependencies\": {\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"@rollup/plugin-replace\": \"^6.0.3\",\n    \"@tanstack/router-vite-plugin\": \"^1.157.16\",\n    \"@types/react\": \"^19.2.10\",\n    \"@types/react-dom\": \"^19.2.3\",\n    \"@vitejs/plugin-react\": \"^5.1.2\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\"\n  }\n}\n"
  },
  {
    "path": "examples/react/with-tanstack-router/src/App.tsx",
    "content": "import { QueryClient, QueryClientProvider } from '@tanstack/react-query'\nimport { RouterProvider, createRouter } from '@tanstack/react-router'\nimport { routeTree } from './routeTree.gen'\n\nconst router = createRouter({ routeTree })\n\ndeclare module '@tanstack/react-router' {\n  interface Register {\n    router: typeof router\n  }\n}\n\nconst queryClient = new QueryClient()\n\nexport default function App() {\n  return (\n    <QueryClientProvider client={queryClient}>\n      <RouterProvider router={router} />\n    </QueryClientProvider>\n  )\n}\n"
  },
  {
    "path": "examples/react/with-tanstack-router/src/api/data.json",
    "content": "[\n  {\n    \"id\": 1,\n    \"firstName\": \"Luz\",\n    \"lastName\": \"Flatley\",\n    \"age\": 13\n  },\n  {\n    \"id\": 2,\n    \"firstName\": \"Buford\",\n    \"lastName\": \"Zemlak\",\n    \"age\": 10\n  },\n  {\n    \"id\": 3,\n    \"firstName\": \"Ivah\",\n    \"lastName\": \"Schoen\",\n    \"age\": 7\n  },\n  {\n    \"id\": 4,\n    \"firstName\": \"Rowena\",\n    \"lastName\": \"Green\",\n    \"age\": 5\n  },\n  {\n    \"id\": 5,\n    \"firstName\": \"Laurel\",\n    \"lastName\": \"Boehm\",\n    \"age\": 30\n  },\n  {\n    \"id\": 6,\n    \"firstName\": \"Markus\",\n    \"lastName\": \"Moore\",\n    \"age\": 29\n  },\n  {\n    \"id\": 7,\n    \"firstName\": \"Anne\",\n    \"lastName\": \"Hegmann\",\n    \"age\": 33\n  },\n  {\n    \"id\": 8,\n    \"firstName\": \"Jefferey\",\n    \"lastName\": \"Rodriguez\",\n    \"age\": 25\n  },\n  {\n    \"id\": 9,\n    \"firstName\": \"Albertha\",\n    \"lastName\": \"Reilly\",\n    \"age\": 7\n  },\n  {\n    \"id\": 10,\n    \"firstName\": \"Adalberto\",\n    \"lastName\": \"Von-Keeling\",\n    \"age\": 20\n  },\n  {\n    \"id\": 11,\n    \"firstName\": \"Junius\",\n    \"lastName\": \"Robel\",\n    \"age\": 31\n  },\n  {\n    \"id\": 12,\n    \"firstName\": \"Haskell\",\n    \"lastName\": \"Armstrong-Smith\",\n    \"age\": 22\n  },\n  {\n    \"id\": 13,\n    \"firstName\": \"Kariane\",\n    \"lastName\": \"Wolff\",\n    \"age\": 13\n  },\n  {\n    \"id\": 14,\n    \"firstName\": \"Devon\",\n    \"lastName\": \"Schoen\",\n    \"age\": 3\n  },\n  {\n    \"id\": 15,\n    \"firstName\": \"Rocio\",\n    \"lastName\": \"Macejkovic\",\n    \"age\": 34\n  },\n  {\n    \"id\": 16,\n    \"firstName\": \"Brennan\",\n    \"lastName\": \"King\",\n    \"age\": 15\n  },\n  {\n    \"id\": 17,\n    \"firstName\": \"Zella\",\n    \"lastName\": \"Blick\",\n    \"age\": 19\n  },\n  {\n    \"id\": 18,\n    \"firstName\": \"Columbus\",\n    \"lastName\": \"Hessel\",\n    \"age\": 34\n  },\n  {\n    \"id\": 19,\n    \"firstName\": \"Maiya\",\n    \"lastName\": \"Boyle-Daugherty\",\n    \"age\": 32\n  },\n  {\n    \"id\": 20,\n    \"firstName\": \"Kennedy\",\n    \"lastName\": \"Effertz\",\n    \"age\": 14\n  },\n  {\n    \"id\": 21,\n    \"firstName\": \"Walker\",\n    \"lastName\": \"Satterfield-Lemke\",\n    \"age\": 6\n  },\n  {\n    \"id\": 22,\n    \"firstName\": \"Barney\",\n    \"lastName\": \"Homenick\",\n    \"age\": 27\n  },\n  {\n    \"id\": 23,\n    \"firstName\": \"Eliezer\",\n    \"lastName\": \"Bahringer\",\n    \"age\": 28\n  },\n  {\n    \"id\": 24,\n    \"firstName\": \"Flossie\",\n    \"lastName\": \"Adams\",\n    \"age\": 35\n  },\n  {\n    \"id\": 25,\n    \"firstName\": \"Miguel\",\n    \"lastName\": \"Kautzer\",\n    \"age\": 38\n  },\n  {\n    \"id\": 26,\n    \"firstName\": \"Gunner\",\n    \"lastName\": \"Ritchie\",\n    \"age\": 22\n  },\n  {\n    \"id\": 27,\n    \"firstName\": \"Domenica\",\n    \"lastName\": \"Boyer\",\n    \"age\": 24\n  },\n  {\n    \"id\": 28,\n    \"firstName\": \"Valentine\",\n    \"lastName\": \"Zemlak\",\n    \"age\": 21\n  },\n  {\n    \"id\": 29,\n    \"firstName\": \"Ike\",\n    \"lastName\": \"Grady\",\n    \"age\": 0\n  },\n  {\n    \"id\": 30,\n    \"firstName\": \"Jalon\",\n    \"lastName\": \"Kunze\",\n    \"age\": 37\n  },\n  {\n    \"id\": 31,\n    \"firstName\": \"Laisha\",\n    \"lastName\": \"Casper\",\n    \"age\": 26\n  },\n  {\n    \"id\": 32,\n    \"firstName\": \"Jaren\",\n    \"lastName\": \"Gutkowski\",\n    \"age\": 38\n  },\n  {\n    \"id\": 33,\n    \"firstName\": \"Jeffery\",\n    \"lastName\": \"King\",\n    \"age\": 14\n  },\n  {\n    \"id\": 34,\n    \"firstName\": \"Gunner\",\n    \"lastName\": \"Batz\",\n    \"age\": 1\n  },\n  {\n    \"id\": 35,\n    \"firstName\": \"Reyes\",\n    \"lastName\": \"Kiehn\",\n    \"age\": 19\n  },\n  {\n    \"id\": 36,\n    \"firstName\": \"Miracle\",\n    \"lastName\": \"Bergstrom\",\n    \"age\": 19\n  },\n  {\n    \"id\": 37,\n    \"firstName\": \"Lempi\",\n    \"lastName\": \"Towne\",\n    \"age\": 26\n  },\n  {\n    \"id\": 38,\n    \"firstName\": \"Ignacio\",\n    \"lastName\": \"Kutch\",\n    \"age\": 20\n  },\n  {\n    \"id\": 39,\n    \"firstName\": \"Arthur\",\n    \"lastName\": \"Doyle\",\n    \"age\": 18\n  },\n  {\n    \"id\": 40,\n    \"firstName\": \"Julianne\",\n    \"lastName\": \"Trantow\",\n    \"age\": 25\n  },\n  {\n    \"id\": 41,\n    \"firstName\": \"Meredith\",\n    \"lastName\": \"Waters\",\n    \"age\": 28\n  },\n  {\n    \"id\": 42,\n    \"firstName\": \"Hilma\",\n    \"lastName\": \"Stark-Kiehn\",\n    \"age\": 15\n  },\n  {\n    \"id\": 43,\n    \"firstName\": \"Helena\",\n    \"lastName\": \"Funk\",\n    \"age\": 20\n  },\n  {\n    \"id\": 44,\n    \"firstName\": \"Buddy\",\n    \"lastName\": \"Runte\",\n    \"age\": 20\n  },\n  {\n    \"id\": 45,\n    \"firstName\": \"Wilton\",\n    \"lastName\": \"Boyer\",\n    \"age\": 33\n  },\n  {\n    \"id\": 46,\n    \"firstName\": \"Bailee\",\n    \"lastName\": \"Deckow\",\n    \"age\": 34\n  },\n  {\n    \"id\": 47,\n    \"firstName\": \"Rhett\",\n    \"lastName\": \"Schuppe\",\n    \"age\": 36\n  },\n  {\n    \"id\": 48,\n    \"firstName\": \"Florida\",\n    \"lastName\": \"Hodkiewicz\",\n    \"age\": 3\n  },\n  {\n    \"id\": 49,\n    \"firstName\": \"Edmond\",\n    \"lastName\": \"Jones-Powlowski\",\n    \"age\": 33\n  },\n  {\n    \"id\": 50,\n    \"firstName\": \"Winfield\",\n    \"lastName\": \"Hoeger\",\n    \"age\": 20\n  },\n  {\n    \"id\": 51,\n    \"firstName\": \"Jade\",\n    \"lastName\": \"Dicki\",\n    \"age\": 19\n  },\n  {\n    \"id\": 52,\n    \"firstName\": \"Lula\",\n    \"lastName\": \"Huel\",\n    \"age\": 8\n  },\n  {\n    \"id\": 53,\n    \"firstName\": \"Lane\",\n    \"lastName\": \"Baumbach\",\n    \"age\": 28\n  },\n  {\n    \"id\": 54,\n    \"firstName\": \"Garrett\",\n    \"lastName\": \"Ratke\",\n    \"age\": 23\n  },\n  {\n    \"id\": 55,\n    \"firstName\": \"Tierra\",\n    \"lastName\": \"Grimes\",\n    \"age\": 14\n  },\n  {\n    \"id\": 56,\n    \"firstName\": \"Jena\",\n    \"lastName\": \"Ferry\",\n    \"age\": 40\n  },\n  {\n    \"id\": 57,\n    \"firstName\": \"Elliot\",\n    \"lastName\": \"Beahan\",\n    \"age\": 38\n  },\n  {\n    \"id\": 58,\n    \"firstName\": \"Tanner\",\n    \"lastName\": \"Moen\",\n    \"age\": 21\n  },\n  {\n    \"id\": 59,\n    \"firstName\": \"Jarret\",\n    \"lastName\": \"Von\",\n    \"age\": 15\n  },\n  {\n    \"id\": 60,\n    \"firstName\": \"Ransom\",\n    \"lastName\": \"Schowalter\",\n    \"age\": 22\n  },\n  {\n    \"id\": 61,\n    \"firstName\": \"Patience\",\n    \"lastName\": \"Lind\",\n    \"age\": 34\n  },\n  {\n    \"id\": 62,\n    \"firstName\": \"Jessyca\",\n    \"lastName\": \"Gorczany\",\n    \"age\": 35\n  },\n  {\n    \"id\": 63,\n    \"firstName\": \"Anna\",\n    \"lastName\": \"Ebert\",\n    \"age\": 32\n  },\n  {\n    \"id\": 64,\n    \"firstName\": \"Fern\",\n    \"lastName\": \"Jaskolski\",\n    \"age\": 13\n  },\n  {\n    \"id\": 65,\n    \"firstName\": \"Ray\",\n    \"lastName\": \"Reynolds\",\n    \"age\": 26\n  },\n  {\n    \"id\": 66,\n    \"firstName\": \"Merle\",\n    \"lastName\": \"Bashirian\",\n    \"age\": 6\n  },\n  {\n    \"id\": 67,\n    \"firstName\": \"Eldora\",\n    \"lastName\": \"Schuppe\",\n    \"age\": 16\n  },\n  {\n    \"id\": 68,\n    \"firstName\": \"Josue\",\n    \"lastName\": \"Weissnat\",\n    \"age\": 24\n  },\n  {\n    \"id\": 69,\n    \"firstName\": \"Antoinette\",\n    \"lastName\": \"Wintheiser\",\n    \"age\": 6\n  },\n  {\n    \"id\": 70,\n    \"firstName\": \"Edgar\",\n    \"lastName\": \"Swaniawski\",\n    \"age\": 18\n  },\n  {\n    \"id\": 71,\n    \"firstName\": \"Eulalia\",\n    \"lastName\": \"Cole\",\n    \"age\": 19\n  },\n  {\n    \"id\": 72,\n    \"firstName\": \"Maximilian\",\n    \"lastName\": \"Klocko\",\n    \"age\": 39\n  },\n  {\n    \"id\": 73,\n    \"firstName\": \"Isabell\",\n    \"lastName\": \"Grant\",\n    \"age\": 4\n  },\n  {\n    \"id\": 74,\n    \"firstName\": \"Adella\",\n    \"lastName\": \"Stokes\",\n    \"age\": 34\n  },\n  {\n    \"id\": 75,\n    \"firstName\": \"Jerad\",\n    \"lastName\": \"Lakin-Lang\",\n    \"age\": 28\n  },\n  {\n    \"id\": 76,\n    \"firstName\": \"Blaze\",\n    \"lastName\": \"McClure\",\n    \"age\": 29\n  },\n  {\n    \"id\": 77,\n    \"firstName\": \"Darron\",\n    \"lastName\": \"Littel\",\n    \"age\": 8\n  },\n  {\n    \"id\": 78,\n    \"firstName\": \"Tre\",\n    \"lastName\": \"Boehm\",\n    \"age\": 6\n  },\n  {\n    \"id\": 79,\n    \"firstName\": \"Mikayla\",\n    \"lastName\": \"Wilderman\",\n    \"age\": 33\n  },\n  {\n    \"id\": 80,\n    \"firstName\": \"Lee\",\n    \"lastName\": \"Parker\",\n    \"age\": 28\n  },\n  {\n    \"id\": 81,\n    \"firstName\": \"Mckenzie\",\n    \"lastName\": \"Tremblay-McClure\",\n    \"age\": 30\n  },\n  {\n    \"id\": 82,\n    \"firstName\": \"Frankie\",\n    \"lastName\": \"Marquardt\",\n    \"age\": 36\n  },\n  {\n    \"id\": 83,\n    \"firstName\": \"Melany\",\n    \"lastName\": \"Schamberger\",\n    \"age\": 9\n  },\n  {\n    \"id\": 84,\n    \"firstName\": \"Gerald\",\n    \"lastName\": \"Lynch\",\n    \"age\": 28\n  },\n  {\n    \"id\": 85,\n    \"firstName\": \"Jaunita\",\n    \"lastName\": \"Armstrong\",\n    \"age\": 0\n  },\n  {\n    \"id\": 86,\n    \"firstName\": \"Ruthie\",\n    \"lastName\": \"Bradtke\",\n    \"age\": 11\n  },\n  {\n    \"id\": 87,\n    \"firstName\": \"Jennie\",\n    \"lastName\": \"Douglas\",\n    \"age\": 26\n  },\n  {\n    \"id\": 88,\n    \"firstName\": \"Ellen\",\n    \"lastName\": \"Pacocha\",\n    \"age\": 20\n  },\n  {\n    \"id\": 89,\n    \"firstName\": \"Gaston\",\n    \"lastName\": \"Carroll\",\n    \"age\": 12\n  },\n  {\n    \"id\": 90,\n    \"firstName\": \"Rowan\",\n    \"lastName\": \"Heller\",\n    \"age\": 20\n  },\n  {\n    \"id\": 91,\n    \"firstName\": \"Kamren\",\n    \"lastName\": \"Mitchell\",\n    \"age\": 4\n  },\n  {\n    \"id\": 92,\n    \"firstName\": \"Kody\",\n    \"lastName\": \"Kiehn\",\n    \"age\": 2\n  },\n  {\n    \"id\": 93,\n    \"firstName\": \"Alexie\",\n    \"lastName\": \"Kshlerin\",\n    \"age\": 24\n  },\n  {\n    \"id\": 94,\n    \"firstName\": \"Ariel\",\n    \"lastName\": \"Stanton\",\n    \"age\": 8\n  },\n  {\n    \"id\": 95,\n    \"firstName\": \"Assunta\",\n    \"lastName\": \"Kilback\",\n    \"age\": 39\n  },\n  {\n    \"id\": 96,\n    \"firstName\": \"Raymundo\",\n    \"lastName\": \"Russel\",\n    \"age\": 5\n  },\n  {\n    \"id\": 97,\n    \"firstName\": \"Jaquelin\",\n    \"lastName\": \"Grimes\",\n    \"age\": 2\n  },\n  {\n    \"id\": 98,\n    \"firstName\": \"Nola\",\n    \"lastName\": \"Wolff\",\n    \"age\": 0\n  },\n  {\n    \"id\": 99,\n    \"firstName\": \"Macy\",\n    \"lastName\": \"Heidenreich\",\n    \"age\": 13\n  },\n  {\n    \"id\": 100,\n    \"firstName\": \"Sam\",\n    \"lastName\": \"Hintz\",\n    \"age\": 26\n  },\n  {\n    \"id\": 101,\n    \"firstName\": \"Nya\",\n    \"lastName\": \"Dietrich\",\n    \"age\": 22\n  },\n  {\n    \"id\": 102,\n    \"firstName\": \"Julio\",\n    \"lastName\": \"Ruecker\",\n    \"age\": 18\n  },\n  {\n    \"id\": 103,\n    \"firstName\": \"Carter\",\n    \"lastName\": \"Dooley\",\n    \"age\": 2\n  },\n  {\n    \"id\": 104,\n    \"firstName\": \"Don\",\n    \"lastName\": \"Herman\",\n    \"age\": 9\n  },\n  {\n    \"id\": 105,\n    \"firstName\": \"Wyman\",\n    \"lastName\": \"Bednar\",\n    \"age\": 32\n  },\n  {\n    \"id\": 106,\n    \"firstName\": \"Elise\",\n    \"lastName\": \"Metz\",\n    \"age\": 1\n  },\n  {\n    \"id\": 107,\n    \"firstName\": \"Rashawn\",\n    \"lastName\": \"Bednar\",\n    \"age\": 0\n  },\n  {\n    \"id\": 108,\n    \"firstName\": \"Terrance\",\n    \"lastName\": \"Hickle\",\n    \"age\": 20\n  },\n  {\n    \"id\": 109,\n    \"firstName\": \"Savanna\",\n    \"lastName\": \"Bogan\",\n    \"age\": 5\n  },\n  {\n    \"id\": 110,\n    \"firstName\": \"Giovanna\",\n    \"lastName\": \"Dare\",\n    \"age\": 2\n  },\n  {\n    \"id\": 111,\n    \"firstName\": \"Yvonne\",\n    \"lastName\": \"Schuster\",\n    \"age\": 29\n  },\n  {\n    \"id\": 112,\n    \"firstName\": \"Alize\",\n    \"lastName\": \"Cassin\",\n    \"age\": 19\n  },\n  {\n    \"id\": 113,\n    \"firstName\": \"Rhiannon\",\n    \"lastName\": \"Thompson\",\n    \"age\": 34\n  },\n  {\n    \"id\": 114,\n    \"firstName\": \"Olin\",\n    \"lastName\": \"Schulist\",\n    \"age\": 10\n  },\n  {\n    \"id\": 115,\n    \"firstName\": \"Savannah\",\n    \"lastName\": \"Simonis\",\n    \"age\": 1\n  },\n  {\n    \"id\": 116,\n    \"firstName\": \"Calista\",\n    \"lastName\": \"Pacocha\",\n    \"age\": 12\n  },\n  {\n    \"id\": 117,\n    \"firstName\": \"Felicia\",\n    \"lastName\": \"Wolf\",\n    \"age\": 8\n  },\n  {\n    \"id\": 118,\n    \"firstName\": \"Werner\",\n    \"lastName\": \"Swift\",\n    \"age\": 22\n  },\n  {\n    \"id\": 119,\n    \"firstName\": \"John\",\n    \"lastName\": \"Lynch\",\n    \"age\": 6\n  },\n  {\n    \"id\": 120,\n    \"firstName\": \"Joaquin\",\n    \"lastName\": \"Hegmann\",\n    \"age\": 30\n  },\n  {\n    \"id\": 121,\n    \"firstName\": \"Citlalli\",\n    \"lastName\": \"Bernier\",\n    \"age\": 23\n  },\n  {\n    \"id\": 122,\n    \"firstName\": \"Carrie\",\n    \"lastName\": \"Waters\",\n    \"age\": 14\n  },\n  {\n    \"id\": 123,\n    \"firstName\": \"Alexanne\",\n    \"lastName\": \"Rutherford\",\n    \"age\": 8\n  },\n  {\n    \"id\": 124,\n    \"firstName\": \"Evelyn\",\n    \"lastName\": \"Halvorson\",\n    \"age\": 3\n  },\n  {\n    \"id\": 125,\n    \"firstName\": \"Janelle\",\n    \"lastName\": \"Blanda\",\n    \"age\": 36\n  },\n  {\n    \"id\": 126,\n    \"firstName\": \"Amiya\",\n    \"lastName\": \"Kihn\",\n    \"age\": 22\n  },\n  {\n    \"id\": 127,\n    \"firstName\": \"Hilbert\",\n    \"lastName\": \"Upton\",\n    \"age\": 39\n  },\n  {\n    \"id\": 128,\n    \"firstName\": \"Janick\",\n    \"lastName\": \"Pollich\",\n    \"age\": 37\n  },\n  {\n    \"id\": 129,\n    \"firstName\": \"Eleazar\",\n    \"lastName\": \"Toy\",\n    \"age\": 13\n  },\n  {\n    \"id\": 130,\n    \"firstName\": \"Josiah\",\n    \"lastName\": \"Doyle\",\n    \"age\": 22\n  },\n  {\n    \"id\": 131,\n    \"firstName\": \"Kelley\",\n    \"lastName\": \"Armstrong\",\n    \"age\": 2\n  },\n  {\n    \"id\": 132,\n    \"firstName\": \"Shawn\",\n    \"lastName\": \"Wehner-Kassulke\",\n    \"age\": 18\n  },\n  {\n    \"id\": 133,\n    \"firstName\": \"Rosemarie\",\n    \"lastName\": \"Homenick\",\n    \"age\": 29\n  },\n  {\n    \"id\": 134,\n    \"firstName\": \"Tressie\",\n    \"lastName\": \"Glover\",\n    \"age\": 8\n  },\n  {\n    \"id\": 135,\n    \"firstName\": \"Enos\",\n    \"lastName\": \"Hoeger\",\n    \"age\": 5\n  },\n  {\n    \"id\": 136,\n    \"firstName\": \"Nels\",\n    \"lastName\": \"Shanahan\",\n    \"age\": 24\n  },\n  {\n    \"id\": 137,\n    \"firstName\": \"Margie\",\n    \"lastName\": \"Rogahn\",\n    \"age\": 13\n  },\n  {\n    \"id\": 138,\n    \"firstName\": \"Kayden\",\n    \"lastName\": \"Daniel\",\n    \"age\": 21\n  },\n  {\n    \"id\": 139,\n    \"firstName\": \"Darian\",\n    \"lastName\": \"O'Hara\",\n    \"age\": 6\n  },\n  {\n    \"id\": 140,\n    \"firstName\": \"Duncan\",\n    \"lastName\": \"Kovacek\",\n    \"age\": 18\n  },\n  {\n    \"id\": 141,\n    \"firstName\": \"Arnulfo\",\n    \"lastName\": \"Shields\",\n    \"age\": 23\n  },\n  {\n    \"id\": 142,\n    \"firstName\": \"Bryon\",\n    \"lastName\": \"Reynolds\",\n    \"age\": 22\n  },\n  {\n    \"id\": 143,\n    \"firstName\": \"Kayleigh\",\n    \"lastName\": \"Barton\",\n    \"age\": 14\n  },\n  {\n    \"id\": 144,\n    \"firstName\": \"Jolie\",\n    \"lastName\": \"Heidenreich\",\n    \"age\": 30\n  },\n  {\n    \"id\": 145,\n    \"firstName\": \"Angelina\",\n    \"lastName\": \"Lehner\",\n    \"age\": 1\n  },\n  {\n    \"id\": 146,\n    \"firstName\": \"Luz\",\n    \"lastName\": \"Walker-Dach\",\n    \"age\": 24\n  },\n  {\n    \"id\": 147,\n    \"firstName\": \"Annamae\",\n    \"lastName\": \"Yundt\",\n    \"age\": 21\n  },\n  {\n    \"id\": 148,\n    \"firstName\": \"Lois\",\n    \"lastName\": \"Schiller-Gibson\",\n    \"age\": 3\n  },\n  {\n    \"id\": 149,\n    \"firstName\": \"Macey\",\n    \"lastName\": \"Green\",\n    \"age\": 37\n  },\n  {\n    \"id\": 150,\n    \"firstName\": \"Luciano\",\n    \"lastName\": \"Walter\",\n    \"age\": 0\n  },\n  {\n    \"id\": 151,\n    \"firstName\": \"Eva\",\n    \"lastName\": \"Fadel\",\n    \"age\": 16\n  },\n  {\n    \"id\": 152,\n    \"firstName\": \"Dawn\",\n    \"lastName\": \"Morissette\",\n    \"age\": 35\n  },\n  {\n    \"id\": 153,\n    \"firstName\": \"Thelma\",\n    \"lastName\": \"Denesik\",\n    \"age\": 17\n  },\n  {\n    \"id\": 154,\n    \"firstName\": \"Clark\",\n    \"lastName\": \"Roberts\",\n    \"age\": 3\n  },\n  {\n    \"id\": 155,\n    \"firstName\": \"Otto\",\n    \"lastName\": \"Keeling\",\n    \"age\": 28\n  },\n  {\n    \"id\": 156,\n    \"firstName\": \"Michale\",\n    \"lastName\": \"Mohr\",\n    \"age\": 26\n  },\n  {\n    \"id\": 157,\n    \"firstName\": \"Eldridge\",\n    \"lastName\": \"Bartoletti\",\n    \"age\": 2\n  },\n  {\n    \"id\": 158,\n    \"firstName\": \"Luciano\",\n    \"lastName\": \"Casper\",\n    \"age\": 1\n  },\n  {\n    \"id\": 159,\n    \"firstName\": \"Arden\",\n    \"lastName\": \"Hills\",\n    \"age\": 1\n  },\n  {\n    \"id\": 160,\n    \"firstName\": \"Julia\",\n    \"lastName\": \"Ullrich\",\n    \"age\": 36\n  },\n  {\n    \"id\": 161,\n    \"firstName\": \"Geraldine\",\n    \"lastName\": \"Schamberger\",\n    \"age\": 27\n  },\n  {\n    \"id\": 162,\n    \"firstName\": \"Emily\",\n    \"lastName\": \"Pacocha\",\n    \"age\": 9\n  },\n  {\n    \"id\": 163,\n    \"firstName\": \"Wilburn\",\n    \"lastName\": \"Bogisich\",\n    \"age\": 29\n  },\n  {\n    \"id\": 164,\n    \"firstName\": \"Krystina\",\n    \"lastName\": \"Dicki\",\n    \"age\": 12\n  },\n  {\n    \"id\": 165,\n    \"firstName\": \"Pasquale\",\n    \"lastName\": \"Douglas\",\n    \"age\": 21\n  },\n  {\n    \"id\": 166,\n    \"firstName\": \"Horace\",\n    \"lastName\": \"Jacobson\",\n    \"age\": 21\n  },\n  {\n    \"id\": 167,\n    \"firstName\": \"Adelle\",\n    \"lastName\": \"Schulist\",\n    \"age\": 16\n  },\n  {\n    \"id\": 168,\n    \"firstName\": \"Monserrate\",\n    \"lastName\": \"Skiles\",\n    \"age\": 3\n  },\n  {\n    \"id\": 169,\n    \"firstName\": \"Salvador\",\n    \"lastName\": \"Weimann\",\n    \"age\": 17\n  },\n  {\n    \"id\": 170,\n    \"firstName\": \"Marcelle\",\n    \"lastName\": \"Runte\",\n    \"age\": 5\n  },\n  {\n    \"id\": 171,\n    \"firstName\": \"Sylvia\",\n    \"lastName\": \"Cole\",\n    \"age\": 8\n  },\n  {\n    \"id\": 172,\n    \"firstName\": \"Ressie\",\n    \"lastName\": \"Hessel\",\n    \"age\": 31\n  },\n  {\n    \"id\": 173,\n    \"firstName\": \"Kim\",\n    \"lastName\": \"Kutch\",\n    \"age\": 19\n  },\n  {\n    \"id\": 174,\n    \"firstName\": \"Loyal\",\n    \"lastName\": \"Schumm\",\n    \"age\": 3\n  },\n  {\n    \"id\": 175,\n    \"firstName\": \"Curt\",\n    \"lastName\": \"Langosh\",\n    \"age\": 22\n  },\n  {\n    \"id\": 176,\n    \"firstName\": \"Lupe\",\n    \"lastName\": \"Beier\",\n    \"age\": 24\n  },\n  {\n    \"id\": 177,\n    \"firstName\": \"Estell\",\n    \"lastName\": \"Emmerich\",\n    \"age\": 26\n  },\n  {\n    \"id\": 178,\n    \"firstName\": \"Katarina\",\n    \"lastName\": \"Jast\",\n    \"age\": 11\n  },\n  {\n    \"id\": 179,\n    \"firstName\": \"Mollie\",\n    \"lastName\": \"Emard\",\n    \"age\": 32\n  },\n  {\n    \"id\": 180,\n    \"firstName\": \"Santa\",\n    \"lastName\": \"Pollich\",\n    \"age\": 6\n  },\n  {\n    \"id\": 181,\n    \"firstName\": \"Art\",\n    \"lastName\": \"O'Conner\",\n    \"age\": 20\n  },\n  {\n    \"id\": 182,\n    \"firstName\": \"Reanna\",\n    \"lastName\": \"Mayert\",\n    \"age\": 18\n  },\n  {\n    \"id\": 183,\n    \"firstName\": \"Ellie\",\n    \"lastName\": \"Mayert\",\n    \"age\": 8\n  },\n  {\n    \"id\": 184,\n    \"firstName\": \"Keyon\",\n    \"lastName\": \"Connelly\",\n    \"age\": 9\n  },\n  {\n    \"id\": 185,\n    \"firstName\": \"Alvina\",\n    \"lastName\": \"Padberg\",\n    \"age\": 3\n  },\n  {\n    \"id\": 186,\n    \"firstName\": \"Kane\",\n    \"lastName\": \"Stehr\",\n    \"age\": 6\n  },\n  {\n    \"id\": 187,\n    \"firstName\": \"Jeffrey\",\n    \"lastName\": \"Baumbach\",\n    \"age\": 13\n  },\n  {\n    \"id\": 188,\n    \"firstName\": \"Angelo\",\n    \"lastName\": \"Koelpin\",\n    \"age\": 17\n  },\n  {\n    \"id\": 189,\n    \"firstName\": \"Nicola\",\n    \"lastName\": \"Nader\",\n    \"age\": 17\n  },\n  {\n    \"id\": 190,\n    \"firstName\": \"Edwina\",\n    \"lastName\": \"Bernhard\",\n    \"age\": 35\n  },\n  {\n    \"id\": 191,\n    \"firstName\": \"Francisco\",\n    \"lastName\": \"Cartwright\",\n    \"age\": 25\n  },\n  {\n    \"id\": 192,\n    \"firstName\": \"Sigrid\",\n    \"lastName\": \"Johns\",\n    \"age\": 28\n  },\n  {\n    \"id\": 193,\n    \"firstName\": \"Columbus\",\n    \"lastName\": \"Ortiz\",\n    \"age\": 16\n  },\n  {\n    \"id\": 194,\n    \"firstName\": \"Bell\",\n    \"lastName\": \"Beatty\",\n    \"age\": 31\n  },\n  {\n    \"id\": 195,\n    \"firstName\": \"Austyn\",\n    \"lastName\": \"Feeney\",\n    \"age\": 21\n  },\n  {\n    \"id\": 196,\n    \"firstName\": \"Jessika\",\n    \"lastName\": \"Brakus\",\n    \"age\": 30\n  },\n  {\n    \"id\": 197,\n    \"firstName\": \"Bernita\",\n    \"lastName\": \"McKenzie\",\n    \"age\": 11\n  },\n  {\n    \"id\": 198,\n    \"firstName\": \"Jerry\",\n    \"lastName\": \"Marks\",\n    \"age\": 12\n  },\n  {\n    \"id\": 199,\n    \"firstName\": \"Annamae\",\n    \"lastName\": \"Pfeffer\",\n    \"age\": 36\n  },\n  {\n    \"id\": 200,\n    \"firstName\": \"Leopold\",\n    \"lastName\": \"Harris\",\n    \"age\": 3\n  },\n  {\n    \"id\": 201,\n    \"firstName\": \"Maximillia\",\n    \"lastName\": \"Schiller\",\n    \"age\": 9\n  },\n  {\n    \"id\": 202,\n    \"firstName\": \"Joaquin\",\n    \"lastName\": \"Torphy\",\n    \"age\": 28\n  },\n  {\n    \"id\": 203,\n    \"firstName\": \"Minnie\",\n    \"lastName\": \"Doyle-Stracke\",\n    \"age\": 25\n  },\n  {\n    \"id\": 204,\n    \"firstName\": \"Johan\",\n    \"lastName\": \"Corkery\",\n    \"age\": 35\n  },\n  {\n    \"id\": 205,\n    \"firstName\": \"Gabe\",\n    \"lastName\": \"Stark\",\n    \"age\": 29\n  },\n  {\n    \"id\": 206,\n    \"firstName\": \"Lily\",\n    \"lastName\": \"McLaughlin\",\n    \"age\": 17\n  },\n  {\n    \"id\": 207,\n    \"firstName\": \"Aubree\",\n    \"lastName\": \"Quigley\",\n    \"age\": 25\n  },\n  {\n    \"id\": 208,\n    \"firstName\": \"Marshall\",\n    \"lastName\": \"Howe\",\n    \"age\": 16\n  },\n  {\n    \"id\": 209,\n    \"firstName\": \"Fanny\",\n    \"lastName\": \"Flatley\",\n    \"age\": 20\n  },\n  {\n    \"id\": 210,\n    \"firstName\": \"Kelton\",\n    \"lastName\": \"Simonis\",\n    \"age\": 38\n  },\n  {\n    \"id\": 211,\n    \"firstName\": \"Dolores\",\n    \"lastName\": \"Reilly\",\n    \"age\": 8\n  },\n  {\n    \"id\": 212,\n    \"firstName\": \"Filomena\",\n    \"lastName\": \"Raynor\",\n    \"age\": 6\n  },\n  {\n    \"id\": 213,\n    \"firstName\": \"Jaden\",\n    \"lastName\": \"Jones\",\n    \"age\": 37\n  },\n  {\n    \"id\": 214,\n    \"firstName\": \"Alexanne\",\n    \"lastName\": \"Macejkovic\",\n    \"age\": 31\n  },\n  {\n    \"id\": 215,\n    \"firstName\": \"Vilma\",\n    \"lastName\": \"Herman\",\n    \"age\": 21\n  },\n  {\n    \"id\": 216,\n    \"firstName\": \"Oswaldo\",\n    \"lastName\": \"Grant\",\n    \"age\": 10\n  },\n  {\n    \"id\": 217,\n    \"firstName\": \"Lexus\",\n    \"lastName\": \"Gusikowski\",\n    \"age\": 28\n  },\n  {\n    \"id\": 218,\n    \"firstName\": \"Isaias\",\n    \"lastName\": \"Doyle\",\n    \"age\": 15\n  },\n  {\n    \"id\": 219,\n    \"firstName\": \"Hosea\",\n    \"lastName\": \"Hayes\",\n    \"age\": 33\n  },\n  {\n    \"id\": 220,\n    \"firstName\": \"Santino\",\n    \"lastName\": \"Schoen\",\n    \"age\": 23\n  },\n  {\n    \"id\": 221,\n    \"firstName\": \"Furman\",\n    \"lastName\": \"Farrell\",\n    \"age\": 31\n  },\n  {\n    \"id\": 222,\n    \"firstName\": \"Rebeca\",\n    \"lastName\": \"Hammes\",\n    \"age\": 37\n  },\n  {\n    \"id\": 223,\n    \"firstName\": \"Alycia\",\n    \"lastName\": \"Emmerich\",\n    \"age\": 2\n  },\n  {\n    \"id\": 224,\n    \"firstName\": \"Camila\",\n    \"lastName\": \"Feeney\",\n    \"age\": 29\n  },\n  {\n    \"id\": 225,\n    \"firstName\": \"Haylee\",\n    \"lastName\": \"Smith\",\n    \"age\": 33\n  },\n  {\n    \"id\": 226,\n    \"firstName\": \"Margaretta\",\n    \"lastName\": \"Hamill\",\n    \"age\": 22\n  },\n  {\n    \"id\": 227,\n    \"firstName\": \"Frederic\",\n    \"lastName\": \"Heaney\",\n    \"age\": 20\n  },\n  {\n    \"id\": 228,\n    \"firstName\": \"Fanny\",\n    \"lastName\": \"Goodwin\",\n    \"age\": 23\n  },\n  {\n    \"id\": 229,\n    \"firstName\": \"Akeem\",\n    \"lastName\": \"Sipes\",\n    \"age\": 32\n  },\n  {\n    \"id\": 230,\n    \"firstName\": \"Isac\",\n    \"lastName\": \"Mosciski-Ruecker\",\n    \"age\": 15\n  },\n  {\n    \"id\": 231,\n    \"firstName\": \"Annie\",\n    \"lastName\": \"Corwin\",\n    \"age\": 36\n  },\n  {\n    \"id\": 232,\n    \"firstName\": \"Zion\",\n    \"lastName\": \"Bernhard\",\n    \"age\": 22\n  },\n  {\n    \"id\": 233,\n    \"firstName\": \"Joe\",\n    \"lastName\": \"Rippin\",\n    \"age\": 35\n  },\n  {\n    \"id\": 234,\n    \"firstName\": \"Libbie\",\n    \"lastName\": \"Considine\",\n    \"age\": 37\n  },\n  {\n    \"id\": 235,\n    \"firstName\": \"Eldridge\",\n    \"lastName\": \"Ortiz\",\n    \"age\": 21\n  },\n  {\n    \"id\": 236,\n    \"firstName\": \"Julius\",\n    \"lastName\": \"Murazik\",\n    \"age\": 19\n  },\n  {\n    \"id\": 237,\n    \"firstName\": \"Freida\",\n    \"lastName\": \"Block\",\n    \"age\": 11\n  },\n  {\n    \"id\": 238,\n    \"firstName\": \"Winfield\",\n    \"lastName\": \"Pfeffer\",\n    \"age\": 21\n  },\n  {\n    \"id\": 239,\n    \"firstName\": \"Armando\",\n    \"lastName\": \"Krajcik\",\n    \"age\": 30\n  },\n  {\n    \"id\": 240,\n    \"firstName\": \"Aubree\",\n    \"lastName\": \"Waters\",\n    \"age\": 19\n  },\n  {\n    \"id\": 241,\n    \"firstName\": \"Sebastian\",\n    \"lastName\": \"Reilly\",\n    \"age\": 29\n  },\n  {\n    \"id\": 242,\n    \"firstName\": \"Dillon\",\n    \"lastName\": \"Littel\",\n    \"age\": 5\n  },\n  {\n    \"id\": 243,\n    \"firstName\": \"Danny\",\n    \"lastName\": \"Hegmann\",\n    \"age\": 35\n  },\n  {\n    \"id\": 244,\n    \"firstName\": \"Alexandra\",\n    \"lastName\": \"Halvorson\",\n    \"age\": 9\n  },\n  {\n    \"id\": 245,\n    \"firstName\": \"Esteban\",\n    \"lastName\": \"Champlin\",\n    \"age\": 2\n  },\n  {\n    \"id\": 246,\n    \"firstName\": \"Theo\",\n    \"lastName\": \"Mann\",\n    \"age\": 40\n  },\n  {\n    \"id\": 247,\n    \"firstName\": \"Justen\",\n    \"lastName\": \"Bernhard\",\n    \"age\": 10\n  },\n  {\n    \"id\": 248,\n    \"firstName\": \"Pinkie\",\n    \"lastName\": \"Hessel\",\n    \"age\": 30\n  },\n  {\n    \"id\": 249,\n    \"firstName\": \"Nicholaus\",\n    \"lastName\": \"Ortiz\",\n    \"age\": 27\n  },\n  {\n    \"id\": 250,\n    \"firstName\": \"Zechariah\",\n    \"lastName\": \"Grady\",\n    \"age\": 29\n  },\n  {\n    \"id\": 251,\n    \"firstName\": \"Newton\",\n    \"lastName\": \"Quitzon\",\n    \"age\": 8\n  },\n  {\n    \"id\": 252,\n    \"firstName\": \"Mary\",\n    \"lastName\": \"Collins\",\n    \"age\": 27\n  },\n  {\n    \"id\": 253,\n    \"firstName\": \"Jonathon\",\n    \"lastName\": \"Boyer-Kozey\",\n    \"age\": 36\n  },\n  {\n    \"id\": 254,\n    \"firstName\": \"Burley\",\n    \"lastName\": \"Collier\",\n    \"age\": 5\n  },\n  {\n    \"id\": 255,\n    \"firstName\": \"Brooklyn\",\n    \"lastName\": \"Nikolaus\",\n    \"age\": 13\n  },\n  {\n    \"id\": 256,\n    \"firstName\": \"Charlotte\",\n    \"lastName\": \"Olson\",\n    \"age\": 0\n  },\n  {\n    \"id\": 257,\n    \"firstName\": \"Pasquale\",\n    \"lastName\": \"Jenkins\",\n    \"age\": 5\n  },\n  {\n    \"id\": 258,\n    \"firstName\": \"Reagan\",\n    \"lastName\": \"Gleichner\",\n    \"age\": 22\n  },\n  {\n    \"id\": 259,\n    \"firstName\": \"Anais\",\n    \"lastName\": \"Denesik\",\n    \"age\": 33\n  },\n  {\n    \"id\": 260,\n    \"firstName\": \"Anastacio\",\n    \"lastName\": \"Nikolaus\",\n    \"age\": 28\n  },\n  {\n    \"id\": 261,\n    \"firstName\": \"Zachery\",\n    \"lastName\": \"Bashirian\",\n    \"age\": 40\n  },\n  {\n    \"id\": 262,\n    \"firstName\": \"Mario\",\n    \"lastName\": \"Ernser\",\n    \"age\": 15\n  },\n  {\n    \"id\": 263,\n    \"firstName\": \"Desiree\",\n    \"lastName\": \"Smitham\",\n    \"age\": 17\n  },\n  {\n    \"id\": 264,\n    \"firstName\": \"Meredith\",\n    \"lastName\": \"Bartell-Romaguera\",\n    \"age\": 4\n  },\n  {\n    \"id\": 265,\n    \"firstName\": \"Quentin\",\n    \"lastName\": \"Stokes\",\n    \"age\": 37\n  },\n  {\n    \"id\": 266,\n    \"firstName\": \"Kathleen\",\n    \"lastName\": \"Huels\",\n    \"age\": 1\n  },\n  {\n    \"id\": 267,\n    \"firstName\": \"Yoshiko\",\n    \"lastName\": \"O'Conner\",\n    \"age\": 1\n  },\n  {\n    \"id\": 268,\n    \"firstName\": \"Marley\",\n    \"lastName\": \"Emard\",\n    \"age\": 5\n  },\n  {\n    \"id\": 269,\n    \"firstName\": \"Mitchel\",\n    \"lastName\": \"Leffler\",\n    \"age\": 11\n  },\n  {\n    \"id\": 270,\n    \"firstName\": \"Myles\",\n    \"lastName\": \"Borer\",\n    \"age\": 25\n  },\n  {\n    \"id\": 271,\n    \"firstName\": \"Treva\",\n    \"lastName\": \"Schultz\",\n    \"age\": 1\n  },\n  {\n    \"id\": 272,\n    \"firstName\": \"Reginald\",\n    \"lastName\": \"Kshlerin\",\n    \"age\": 18\n  },\n  {\n    \"id\": 273,\n    \"firstName\": \"Ila\",\n    \"lastName\": \"Koepp\",\n    \"age\": 26\n  },\n  {\n    \"id\": 274,\n    \"firstName\": \"Lily\",\n    \"lastName\": \"Quigley\",\n    \"age\": 24\n  },\n  {\n    \"id\": 275,\n    \"firstName\": \"Arnulfo\",\n    \"lastName\": \"Beatty\",\n    \"age\": 11\n  },\n  {\n    \"id\": 276,\n    \"firstName\": \"Cierra\",\n    \"lastName\": \"Jerde\",\n    \"age\": 18\n  },\n  {\n    \"id\": 277,\n    \"firstName\": \"Rodolfo\",\n    \"lastName\": \"Rath-Kuhn\",\n    \"age\": 39\n  },\n  {\n    \"id\": 278,\n    \"firstName\": \"Gwen\",\n    \"lastName\": \"Rowe\",\n    \"age\": 6\n  },\n  {\n    \"id\": 279,\n    \"firstName\": \"Tre\",\n    \"lastName\": \"Balistreri\",\n    \"age\": 5\n  },\n  {\n    \"id\": 280,\n    \"firstName\": \"Kaci\",\n    \"lastName\": \"Hettinger\",\n    \"age\": 7\n  },\n  {\n    \"id\": 281,\n    \"firstName\": \"Marilyne\",\n    \"lastName\": \"Stroman\",\n    \"age\": 5\n  },\n  {\n    \"id\": 282,\n    \"firstName\": \"Orlando\",\n    \"lastName\": \"Rodriguez-Beatty\",\n    \"age\": 4\n  },\n  {\n    \"id\": 283,\n    \"firstName\": \"Trey\",\n    \"lastName\": \"Schuster\",\n    \"age\": 16\n  },\n  {\n    \"id\": 284,\n    \"firstName\": \"Jenifer\",\n    \"lastName\": \"Romaguera\",\n    \"age\": 38\n  },\n  {\n    \"id\": 285,\n    \"firstName\": \"Dexter\",\n    \"lastName\": \"Williamson\",\n    \"age\": 33\n  },\n  {\n    \"id\": 286,\n    \"firstName\": \"Dawn\",\n    \"lastName\": \"Armstrong\",\n    \"age\": 20\n  },\n  {\n    \"id\": 287,\n    \"firstName\": \"Elenora\",\n    \"lastName\": \"Prosacco\",\n    \"age\": 24\n  },\n  {\n    \"id\": 288,\n    \"firstName\": \"Margarete\",\n    \"lastName\": \"Stokes\",\n    \"age\": 26\n  },\n  {\n    \"id\": 289,\n    \"firstName\": \"Hank\",\n    \"lastName\": \"Spencer\",\n    \"age\": 13\n  },\n  {\n    \"id\": 290,\n    \"firstName\": \"Litzy\",\n    \"lastName\": \"Miller\",\n    \"age\": 25\n  },\n  {\n    \"id\": 291,\n    \"firstName\": \"Noelia\",\n    \"lastName\": \"Becker\",\n    \"age\": 37\n  },\n  {\n    \"id\": 292,\n    \"firstName\": \"Mac\",\n    \"lastName\": \"Bartell\",\n    \"age\": 5\n  },\n  {\n    \"id\": 293,\n    \"firstName\": \"Jadyn\",\n    \"lastName\": \"Moen\",\n    \"age\": 38\n  },\n  {\n    \"id\": 294,\n    \"firstName\": \"Garland\",\n    \"lastName\": \"Hayes\",\n    \"age\": 31\n  },\n  {\n    \"id\": 295,\n    \"firstName\": \"Myriam\",\n    \"lastName\": \"Rutherford\",\n    \"age\": 29\n  },\n  {\n    \"id\": 296,\n    \"firstName\": \"Alicia\",\n    \"lastName\": \"Rosenbaum-Hudson\",\n    \"age\": 36\n  },\n  {\n    \"id\": 297,\n    \"firstName\": \"Madge\",\n    \"lastName\": \"Schmidt\",\n    \"age\": 22\n  },\n  {\n    \"id\": 298,\n    \"firstName\": \"Destini\",\n    \"lastName\": \"Littel\",\n    \"age\": 35\n  },\n  {\n    \"id\": 299,\n    \"firstName\": \"Ellis\",\n    \"lastName\": \"Brakus\",\n    \"age\": 30\n  },\n  {\n    \"id\": 300,\n    \"firstName\": \"Yasmin\",\n    \"lastName\": \"Renner-Baumbach\",\n    \"age\": 23\n  },\n  {\n    \"id\": 301,\n    \"firstName\": \"Mittie\",\n    \"lastName\": \"O'Hara\",\n    \"age\": 13\n  },\n  {\n    \"id\": 302,\n    \"firstName\": \"Alejandra\",\n    \"lastName\": \"Stehr\",\n    \"age\": 10\n  },\n  {\n    \"id\": 303,\n    \"firstName\": \"Pat\",\n    \"lastName\": \"Berge\",\n    \"age\": 24\n  },\n  {\n    \"id\": 304,\n    \"firstName\": \"Dorris\",\n    \"lastName\": \"Daugherty\",\n    \"age\": 17\n  },\n  {\n    \"id\": 305,\n    \"firstName\": \"Ashtyn\",\n    \"lastName\": \"Windler\",\n    \"age\": 28\n  },\n  {\n    \"id\": 306,\n    \"firstName\": \"Guadalupe\",\n    \"lastName\": \"Treutel\",\n    \"age\": 3\n  },\n  {\n    \"id\": 307,\n    \"firstName\": \"Melody\",\n    \"lastName\": \"Lemke\",\n    \"age\": 34\n  },\n  {\n    \"id\": 308,\n    \"firstName\": \"Elmer\",\n    \"lastName\": \"Moen\",\n    \"age\": 38\n  },\n  {\n    \"id\": 309,\n    \"firstName\": \"Kobe\",\n    \"lastName\": \"Bode\",\n    \"age\": 16\n  },\n  {\n    \"id\": 310,\n    \"firstName\": \"Nicolette\",\n    \"lastName\": \"Abshire\",\n    \"age\": 26\n  },\n  {\n    \"id\": 311,\n    \"firstName\": \"Evans\",\n    \"lastName\": \"Daniel\",\n    \"age\": 7\n  },\n  {\n    \"id\": 312,\n    \"firstName\": \"Fabian\",\n    \"lastName\": \"Farrell\",\n    \"age\": 4\n  },\n  {\n    \"id\": 313,\n    \"firstName\": \"Kiel\",\n    \"lastName\": \"Cormier\",\n    \"age\": 24\n  },\n  {\n    \"id\": 314,\n    \"firstName\": \"Brandon\",\n    \"lastName\": \"Pollich\",\n    \"age\": 5\n  },\n  {\n    \"id\": 315,\n    \"firstName\": \"Gerry\",\n    \"lastName\": \"Champlin\",\n    \"age\": 28\n  },\n  {\n    \"id\": 316,\n    \"firstName\": \"Lavina\",\n    \"lastName\": \"Lehner\",\n    \"age\": 21\n  },\n  {\n    \"id\": 317,\n    \"firstName\": \"Keyshawn\",\n    \"lastName\": \"Wolff\",\n    \"age\": 38\n  },\n  {\n    \"id\": 318,\n    \"firstName\": \"Eileen\",\n    \"lastName\": \"Kreiger\",\n    \"age\": 16\n  },\n  {\n    \"id\": 319,\n    \"firstName\": \"Justine\",\n    \"lastName\": \"King\",\n    \"age\": 26\n  },\n  {\n    \"id\": 320,\n    \"firstName\": \"Earl\",\n    \"lastName\": \"Wisozk\",\n    \"age\": 31\n  },\n  {\n    \"id\": 321,\n    \"firstName\": \"Adrianna\",\n    \"lastName\": \"Brown\",\n    \"age\": 9\n  },\n  {\n    \"id\": 322,\n    \"firstName\": \"Susana\",\n    \"lastName\": \"Gutkowski\",\n    \"age\": 6\n  },\n  {\n    \"id\": 323,\n    \"firstName\": \"Ashtyn\",\n    \"lastName\": \"Reynolds\",\n    \"age\": 5\n  },\n  {\n    \"id\": 324,\n    \"firstName\": \"Brad\",\n    \"lastName\": \"Murazik\",\n    \"age\": 14\n  },\n  {\n    \"id\": 325,\n    \"firstName\": \"Zaria\",\n    \"lastName\": \"Kreiger\",\n    \"age\": 7\n  },\n  {\n    \"id\": 326,\n    \"firstName\": \"Ariane\",\n    \"lastName\": \"Satterfield\",\n    \"age\": 31\n  },\n  {\n    \"id\": 327,\n    \"firstName\": \"Terrell\",\n    \"lastName\": \"Beer\",\n    \"age\": 32\n  },\n  {\n    \"id\": 328,\n    \"firstName\": \"Keven\",\n    \"lastName\": \"Moen\",\n    \"age\": 34\n  },\n  {\n    \"id\": 329,\n    \"firstName\": \"Adella\",\n    \"lastName\": \"Williamson\",\n    \"age\": 32\n  },\n  {\n    \"id\": 330,\n    \"firstName\": \"Conrad\",\n    \"lastName\": \"Heaney\",\n    \"age\": 19\n  },\n  {\n    \"id\": 331,\n    \"firstName\": \"Alexis\",\n    \"lastName\": \"Ratke\",\n    \"age\": 29\n  },\n  {\n    \"id\": 332,\n    \"firstName\": \"Clotilde\",\n    \"lastName\": \"Rohan\",\n    \"age\": 38\n  },\n  {\n    \"id\": 333,\n    \"firstName\": \"Harry\",\n    \"lastName\": \"Block\",\n    \"age\": 0\n  },\n  {\n    \"id\": 334,\n    \"firstName\": \"Caroline\",\n    \"lastName\": \"Wilkinson\",\n    \"age\": 34\n  },\n  {\n    \"id\": 335,\n    \"firstName\": \"Theresia\",\n    \"lastName\": \"Sawayn\",\n    \"age\": 9\n  },\n  {\n    \"id\": 336,\n    \"firstName\": \"Cody\",\n    \"lastName\": \"Erdman\",\n    \"age\": 32\n  },\n  {\n    \"id\": 337,\n    \"firstName\": \"Newell\",\n    \"lastName\": \"Cummerata\",\n    \"age\": 3\n  },\n  {\n    \"id\": 338,\n    \"firstName\": \"Chauncey\",\n    \"lastName\": \"Keebler\",\n    \"age\": 9\n  },\n  {\n    \"id\": 339,\n    \"firstName\": \"Armando\",\n    \"lastName\": \"Grant\",\n    \"age\": 3\n  },\n  {\n    \"id\": 340,\n    \"firstName\": \"Yasmeen\",\n    \"lastName\": \"Olson\",\n    \"age\": 24\n  },\n  {\n    \"id\": 341,\n    \"firstName\": \"Vena\",\n    \"lastName\": \"Dickinson\",\n    \"age\": 22\n  },\n  {\n    \"id\": 342,\n    \"firstName\": \"Deron\",\n    \"lastName\": \"Dicki\",\n    \"age\": 31\n  },\n  {\n    \"id\": 343,\n    \"firstName\": \"Adriel\",\n    \"lastName\": \"Zboncak\",\n    \"age\": 7\n  },\n  {\n    \"id\": 344,\n    \"firstName\": \"Ona\",\n    \"lastName\": \"Lindgren\",\n    \"age\": 35\n  },\n  {\n    \"id\": 345,\n    \"firstName\": \"Dorothea\",\n    \"lastName\": \"Bosco\",\n    \"age\": 40\n  },\n  {\n    \"id\": 346,\n    \"firstName\": \"Graham\",\n    \"lastName\": \"Spencer\",\n    \"age\": 34\n  },\n  {\n    \"id\": 347,\n    \"firstName\": \"Amelie\",\n    \"lastName\": \"Bogan\",\n    \"age\": 26\n  },\n  {\n    \"id\": 348,\n    \"firstName\": \"Ayla\",\n    \"lastName\": \"Willms\",\n    \"age\": 33\n  },\n  {\n    \"id\": 349,\n    \"firstName\": \"Alfred\",\n    \"lastName\": \"Pfannerstill\",\n    \"age\": 20\n  },\n  {\n    \"id\": 350,\n    \"firstName\": \"Jodie\",\n    \"lastName\": \"Armstrong\",\n    \"age\": 21\n  },\n  {\n    \"id\": 351,\n    \"firstName\": \"Juliet\",\n    \"lastName\": \"Lubowitz\",\n    \"age\": 2\n  },\n  {\n    \"id\": 352,\n    \"firstName\": \"Bennett\",\n    \"lastName\": \"Wiegand\",\n    \"age\": 0\n  },\n  {\n    \"id\": 353,\n    \"firstName\": \"Shaylee\",\n    \"lastName\": \"Ullrich\",\n    \"age\": 0\n  },\n  {\n    \"id\": 354,\n    \"firstName\": \"Madeline\",\n    \"lastName\": \"Reinger-Wilderman\",\n    \"age\": 0\n  },\n  {\n    \"id\": 355,\n    \"firstName\": \"Violette\",\n    \"lastName\": \"Mann\",\n    \"age\": 13\n  },\n  {\n    \"id\": 356,\n    \"firstName\": \"Vincent\",\n    \"lastName\": \"Armstrong\",\n    \"age\": 12\n  },\n  {\n    \"id\": 357,\n    \"firstName\": \"Brycen\",\n    \"lastName\": \"Runolfsson\",\n    \"age\": 4\n  },\n  {\n    \"id\": 358,\n    \"firstName\": \"Aurelia\",\n    \"lastName\": \"Trantow\",\n    \"age\": 10\n  },\n  {\n    \"id\": 359,\n    \"firstName\": \"Velma\",\n    \"lastName\": \"Crooks\",\n    \"age\": 38\n  },\n  {\n    \"id\": 360,\n    \"firstName\": \"Germaine\",\n    \"lastName\": \"Lemke\",\n    \"age\": 20\n  },\n  {\n    \"id\": 361,\n    \"firstName\": \"Heaven\",\n    \"lastName\": \"Kreiger\",\n    \"age\": 2\n  },\n  {\n    \"id\": 362,\n    \"firstName\": \"Rosario\",\n    \"lastName\": \"Beier\",\n    \"age\": 14\n  },\n  {\n    \"id\": 363,\n    \"firstName\": \"Bell\",\n    \"lastName\": \"Beahan\",\n    \"age\": 39\n  },\n  {\n    \"id\": 364,\n    \"firstName\": \"Ashlee\",\n    \"lastName\": \"Bailey\",\n    \"age\": 28\n  },\n  {\n    \"id\": 365,\n    \"firstName\": \"Jan\",\n    \"lastName\": \"Wyman\",\n    \"age\": 2\n  },\n  {\n    \"id\": 366,\n    \"firstName\": \"River\",\n    \"lastName\": \"King\",\n    \"age\": 34\n  },\n  {\n    \"id\": 367,\n    \"firstName\": \"Jalen\",\n    \"lastName\": \"Labadie\",\n    \"age\": 28\n  },\n  {\n    \"id\": 368,\n    \"firstName\": \"Hertha\",\n    \"lastName\": \"Klocko\",\n    \"age\": 29\n  },\n  {\n    \"id\": 369,\n    \"firstName\": \"Jaiden\",\n    \"lastName\": \"Braun\",\n    \"age\": 11\n  },\n  {\n    \"id\": 370,\n    \"firstName\": \"Bailee\",\n    \"lastName\": \"Ortiz\",\n    \"age\": 30\n  },\n  {\n    \"id\": 371,\n    \"firstName\": \"Garth\",\n    \"lastName\": \"Murray\",\n    \"age\": 30\n  },\n  {\n    \"id\": 372,\n    \"firstName\": \"Alexandra\",\n    \"lastName\": \"Satterfield\",\n    \"age\": 22\n  },\n  {\n    \"id\": 373,\n    \"firstName\": \"Misty\",\n    \"lastName\": \"Leffler\",\n    \"age\": 4\n  },\n  {\n    \"id\": 374,\n    \"firstName\": \"Samara\",\n    \"lastName\": \"Heller\",\n    \"age\": 13\n  },\n  {\n    \"id\": 375,\n    \"firstName\": \"Claud\",\n    \"lastName\": \"Keeling\",\n    \"age\": 15\n  },\n  {\n    \"id\": 376,\n    \"firstName\": \"Kaley\",\n    \"lastName\": \"Terry\",\n    \"age\": 38\n  },\n  {\n    \"id\": 377,\n    \"firstName\": \"Juliana\",\n    \"lastName\": \"Hagenes\",\n    \"age\": 0\n  },\n  {\n    \"id\": 378,\n    \"firstName\": \"Madie\",\n    \"lastName\": \"Stehr\",\n    \"age\": 40\n  },\n  {\n    \"id\": 379,\n    \"firstName\": \"Enrico\",\n    \"lastName\": \"Schulist\",\n    \"age\": 40\n  },\n  {\n    \"id\": 380,\n    \"firstName\": \"Theodore\",\n    \"lastName\": \"Dibbert\",\n    \"age\": 25\n  },\n  {\n    \"id\": 381,\n    \"firstName\": \"Marty\",\n    \"lastName\": \"Wunsch\",\n    \"age\": 29\n  },\n  {\n    \"id\": 382,\n    \"firstName\": \"Ramona\",\n    \"lastName\": \"Zulauf\",\n    \"age\": 6\n  },\n  {\n    \"id\": 383,\n    \"firstName\": \"Willard\",\n    \"lastName\": \"Stark\",\n    \"age\": 0\n  },\n  {\n    \"id\": 384,\n    \"firstName\": \"Karine\",\n    \"lastName\": \"Windler\",\n    \"age\": 29\n  },\n  {\n    \"id\": 385,\n    \"firstName\": \"Geovanni\",\n    \"lastName\": \"McDermott\",\n    \"age\": 35\n  },\n  {\n    \"id\": 386,\n    \"firstName\": \"Jannie\",\n    \"lastName\": \"Berge\",\n    \"age\": 4\n  },\n  {\n    \"id\": 387,\n    \"firstName\": \"Alberto\",\n    \"lastName\": \"Kulas\",\n    \"age\": 29\n  },\n  {\n    \"id\": 388,\n    \"firstName\": \"Zora\",\n    \"lastName\": \"Hackett\",\n    \"age\": 21\n  },\n  {\n    \"id\": 389,\n    \"firstName\": \"Brandi\",\n    \"lastName\": \"Reinger\",\n    \"age\": 0\n  },\n  {\n    \"id\": 390,\n    \"firstName\": \"Ophelia\",\n    \"lastName\": \"Maggio\",\n    \"age\": 36\n  },\n  {\n    \"id\": 391,\n    \"firstName\": \"Ardith\",\n    \"lastName\": \"Hegmann\",\n    \"age\": 14\n  },\n  {\n    \"id\": 392,\n    \"firstName\": \"Maverick\",\n    \"lastName\": \"Bergstrom\",\n    \"age\": 35\n  },\n  {\n    \"id\": 393,\n    \"firstName\": \"Rosalia\",\n    \"lastName\": \"Lesch\",\n    \"age\": 11\n  },\n  {\n    \"id\": 394,\n    \"firstName\": \"Neil\",\n    \"lastName\": \"Wiza\",\n    \"age\": 15\n  },\n  {\n    \"id\": 395,\n    \"firstName\": \"Kenton\",\n    \"lastName\": \"Bailey\",\n    \"age\": 29\n  },\n  {\n    \"id\": 396,\n    \"firstName\": \"Elyse\",\n    \"lastName\": \"McDermott\",\n    \"age\": 22\n  },\n  {\n    \"id\": 397,\n    \"firstName\": \"Hilbert\",\n    \"lastName\": \"Walsh\",\n    \"age\": 12\n  },\n  {\n    \"id\": 398,\n    \"firstName\": \"Lennie\",\n    \"lastName\": \"Simonis-Pollich\",\n    \"age\": 7\n  },\n  {\n    \"id\": 399,\n    \"firstName\": \"Orville\",\n    \"lastName\": \"Bashirian\",\n    \"age\": 35\n  },\n  {\n    \"id\": 400,\n    \"firstName\": \"Einar\",\n    \"lastName\": \"Rempel\",\n    \"age\": 4\n  },\n  {\n    \"id\": 401,\n    \"firstName\": \"Destany\",\n    \"lastName\": \"Boehm\",\n    \"age\": 13\n  },\n  {\n    \"id\": 402,\n    \"firstName\": \"Baby\",\n    \"lastName\": \"Witting\",\n    \"age\": 29\n  },\n  {\n    \"id\": 403,\n    \"firstName\": \"Columbus\",\n    \"lastName\": \"Berge\",\n    \"age\": 10\n  },\n  {\n    \"id\": 404,\n    \"firstName\": \"Delphia\",\n    \"lastName\": \"Ledner\",\n    \"age\": 18\n  },\n  {\n    \"id\": 405,\n    \"firstName\": \"Margarett\",\n    \"lastName\": \"Dach\",\n    \"age\": 0\n  },\n  {\n    \"id\": 406,\n    \"firstName\": \"Henriette\",\n    \"lastName\": \"Rath\",\n    \"age\": 16\n  },\n  {\n    \"id\": 407,\n    \"firstName\": \"Coleman\",\n    \"lastName\": \"VonRueden\",\n    \"age\": 13\n  },\n  {\n    \"id\": 408,\n    \"firstName\": \"Kayley\",\n    \"lastName\": \"Wuckert\",\n    \"age\": 6\n  },\n  {\n    \"id\": 409,\n    \"firstName\": \"Rusty\",\n    \"lastName\": \"Yundt\",\n    \"age\": 35\n  },\n  {\n    \"id\": 410,\n    \"firstName\": \"Gabrielle\",\n    \"lastName\": \"McClure\",\n    \"age\": 10\n  },\n  {\n    \"id\": 411,\n    \"firstName\": \"Madie\",\n    \"lastName\": \"Roberts\",\n    \"age\": 7\n  },\n  {\n    \"id\": 412,\n    \"firstName\": \"Jarrell\",\n    \"lastName\": \"Bayer\",\n    \"age\": 13\n  },\n  {\n    \"id\": 413,\n    \"firstName\": \"Elva\",\n    \"lastName\": \"Dickinson\",\n    \"age\": 24\n  },\n  {\n    \"id\": 414,\n    \"firstName\": \"Icie\",\n    \"lastName\": \"Ryan\",\n    \"age\": 7\n  },\n  {\n    \"id\": 415,\n    \"firstName\": \"Katherine\",\n    \"lastName\": \"Satterfield\",\n    \"age\": 8\n  },\n  {\n    \"id\": 416,\n    \"firstName\": \"Merlin\",\n    \"lastName\": \"Bergstrom\",\n    \"age\": 17\n  },\n  {\n    \"id\": 417,\n    \"firstName\": \"Columbus\",\n    \"lastName\": \"Auer\",\n    \"age\": 5\n  },\n  {\n    \"id\": 418,\n    \"firstName\": \"Gregoria\",\n    \"lastName\": \"Olson\",\n    \"age\": 6\n  },\n  {\n    \"id\": 419,\n    \"firstName\": \"Laurine\",\n    \"lastName\": \"Luettgen-O'Hara\",\n    \"age\": 38\n  },\n  {\n    \"id\": 420,\n    \"firstName\": \"Monty\",\n    \"lastName\": \"Emard\",\n    \"age\": 15\n  },\n  {\n    \"id\": 421,\n    \"firstName\": \"Eli\",\n    \"lastName\": \"Dibbert\",\n    \"age\": 1\n  },\n  {\n    \"id\": 422,\n    \"firstName\": \"Kiana\",\n    \"lastName\": \"Johnston\",\n    \"age\": 32\n  },\n  {\n    \"id\": 423,\n    \"firstName\": \"Genevieve\",\n    \"lastName\": \"Rau-Frami\",\n    \"age\": 15\n  },\n  {\n    \"id\": 424,\n    \"firstName\": \"Agustin\",\n    \"lastName\": \"Ferry\",\n    \"age\": 10\n  },\n  {\n    \"id\": 425,\n    \"firstName\": \"Abel\",\n    \"lastName\": \"Rosenbaum\",\n    \"age\": 14\n  },\n  {\n    \"id\": 426,\n    \"firstName\": \"Ryan\",\n    \"lastName\": \"Bradtke\",\n    \"age\": 2\n  },\n  {\n    \"id\": 427,\n    \"firstName\": \"Max\",\n    \"lastName\": \"Johnston\",\n    \"age\": 29\n  },\n  {\n    \"id\": 428,\n    \"firstName\": \"Ethan\",\n    \"lastName\": \"Breitenberg\",\n    \"age\": 16\n  },\n  {\n    \"id\": 429,\n    \"firstName\": \"Caitlyn\",\n    \"lastName\": \"Kovacek\",\n    \"age\": 24\n  },\n  {\n    \"id\": 430,\n    \"firstName\": \"Keyon\",\n    \"lastName\": \"Spencer\",\n    \"age\": 2\n  },\n  {\n    \"id\": 431,\n    \"firstName\": \"Jaden\",\n    \"lastName\": \"Hoppe\",\n    \"age\": 31\n  },\n  {\n    \"id\": 432,\n    \"firstName\": \"Olaf\",\n    \"lastName\": \"VonRueden\",\n    \"age\": 4\n  },\n  {\n    \"id\": 433,\n    \"firstName\": \"Kariane\",\n    \"lastName\": \"Ankunding\",\n    \"age\": 3\n  },\n  {\n    \"id\": 434,\n    \"firstName\": \"Baron\",\n    \"lastName\": \"Abernathy\",\n    \"age\": 37\n  },\n  {\n    \"id\": 435,\n    \"firstName\": \"Abigail\",\n    \"lastName\": \"Bins\",\n    \"age\": 29\n  },\n  {\n    \"id\": 436,\n    \"firstName\": \"Parker\",\n    \"lastName\": \"Hammes\",\n    \"age\": 20\n  },\n  {\n    \"id\": 437,\n    \"firstName\": \"Summer\",\n    \"lastName\": \"Kub\",\n    \"age\": 2\n  },\n  {\n    \"id\": 438,\n    \"firstName\": \"Lucio\",\n    \"lastName\": \"Powlowski\",\n    \"age\": 8\n  },\n  {\n    \"id\": 439,\n    \"firstName\": \"Nicholaus\",\n    \"lastName\": \"Harris\",\n    \"age\": 0\n  },\n  {\n    \"id\": 440,\n    \"firstName\": \"Terry\",\n    \"lastName\": \"Schamberger\",\n    \"age\": 2\n  },\n  {\n    \"id\": 441,\n    \"firstName\": \"Joseph\",\n    \"lastName\": \"McClure\",\n    \"age\": 1\n  },\n  {\n    \"id\": 442,\n    \"firstName\": \"Rogelio\",\n    \"lastName\": \"Goyette\",\n    \"age\": 33\n  },\n  {\n    \"id\": 443,\n    \"firstName\": \"Vidal\",\n    \"lastName\": \"Hauck\",\n    \"age\": 38\n  },\n  {\n    \"id\": 444,\n    \"firstName\": \"Julie\",\n    \"lastName\": \"Ebert\",\n    \"age\": 34\n  },\n  {\n    \"id\": 445,\n    \"firstName\": \"Ashtyn\",\n    \"lastName\": \"Hahn\",\n    \"age\": 11\n  },\n  {\n    \"id\": 446,\n    \"firstName\": \"Orlando\",\n    \"lastName\": \"Nicolas\",\n    \"age\": 21\n  },\n  {\n    \"id\": 447,\n    \"firstName\": \"Mabelle\",\n    \"lastName\": \"Krajcik\",\n    \"age\": 12\n  },\n  {\n    \"id\": 448,\n    \"firstName\": \"Jerrod\",\n    \"lastName\": \"Dicki\",\n    \"age\": 14\n  },\n  {\n    \"id\": 449,\n    \"firstName\": \"Jeff\",\n    \"lastName\": \"Stanton\",\n    \"age\": 9\n  },\n  {\n    \"id\": 450,\n    \"firstName\": \"Alanis\",\n    \"lastName\": \"Stoltenberg\",\n    \"age\": 17\n  },\n  {\n    \"id\": 451,\n    \"firstName\": \"Nathaniel\",\n    \"lastName\": \"Pagac\",\n    \"age\": 26\n  },\n  {\n    \"id\": 452,\n    \"firstName\": \"Dillan\",\n    \"lastName\": \"Nitzsche\",\n    \"age\": 12\n  },\n  {\n    \"id\": 453,\n    \"firstName\": \"Alanis\",\n    \"lastName\": \"Stoltenberg\",\n    \"age\": 28\n  },\n  {\n    \"id\": 454,\n    \"firstName\": \"Casimer\",\n    \"lastName\": \"Swaniawski\",\n    \"age\": 7\n  },\n  {\n    \"id\": 455,\n    \"firstName\": \"Devin\",\n    \"lastName\": \"Marvin\",\n    \"age\": 39\n  },\n  {\n    \"id\": 456,\n    \"firstName\": \"Nikolas\",\n    \"lastName\": \"McGlynn-Hyatt\",\n    \"age\": 34\n  },\n  {\n    \"id\": 457,\n    \"firstName\": \"Montana\",\n    \"lastName\": \"Christiansen\",\n    \"age\": 20\n  },\n  {\n    \"id\": 458,\n    \"firstName\": \"Jevon\",\n    \"lastName\": \"Hilpert\",\n    \"age\": 25\n  },\n  {\n    \"id\": 459,\n    \"firstName\": \"Delia\",\n    \"lastName\": \"White\",\n    \"age\": 26\n  },\n  {\n    \"id\": 460,\n    \"firstName\": \"Alena\",\n    \"lastName\": \"Koelpin\",\n    \"age\": 10\n  },\n  {\n    \"id\": 461,\n    \"firstName\": \"Gracie\",\n    \"lastName\": \"Lesch\",\n    \"age\": 12\n  },\n  {\n    \"id\": 462,\n    \"firstName\": \"Forest\",\n    \"lastName\": \"Schmidt\",\n    \"age\": 18\n  },\n  {\n    \"id\": 463,\n    \"firstName\": \"Karley\",\n    \"lastName\": \"Carroll\",\n    \"age\": 32\n  },\n  {\n    \"id\": 464,\n    \"firstName\": \"Sydnee\",\n    \"lastName\": \"Huels\",\n    \"age\": 40\n  },\n  {\n    \"id\": 465,\n    \"firstName\": \"Anissa\",\n    \"lastName\": \"Hettinger\",\n    \"age\": 26\n  },\n  {\n    \"id\": 466,\n    \"firstName\": \"Sylvia\",\n    \"lastName\": \"Kassulke\",\n    \"age\": 10\n  },\n  {\n    \"id\": 467,\n    \"firstName\": \"Cleve\",\n    \"lastName\": \"Hackett\",\n    \"age\": 30\n  },\n  {\n    \"id\": 468,\n    \"firstName\": \"Yoshiko\",\n    \"lastName\": \"Lynch\",\n    \"age\": 18\n  },\n  {\n    \"id\": 469,\n    \"firstName\": \"Vesta\",\n    \"lastName\": \"Feil\",\n    \"age\": 36\n  },\n  {\n    \"id\": 470,\n    \"firstName\": \"Dejuan\",\n    \"lastName\": \"Block-Wisozk\",\n    \"age\": 16\n  },\n  {\n    \"id\": 471,\n    \"firstName\": \"Camden\",\n    \"lastName\": \"Ankunding\",\n    \"age\": 29\n  },\n  {\n    \"id\": 472,\n    \"firstName\": \"Tyrese\",\n    \"lastName\": \"Hermann-Stehr\",\n    \"age\": 27\n  },\n  {\n    \"id\": 473,\n    \"firstName\": \"Marlee\",\n    \"lastName\": \"Champlin\",\n    \"age\": 22\n  },\n  {\n    \"id\": 474,\n    \"firstName\": \"Everardo\",\n    \"lastName\": \"Nienow\",\n    \"age\": 29\n  },\n  {\n    \"id\": 475,\n    \"firstName\": \"Wayne\",\n    \"lastName\": \"Schuppe\",\n    \"age\": 25\n  },\n  {\n    \"id\": 476,\n    \"firstName\": \"Don\",\n    \"lastName\": \"Medhurst\",\n    \"age\": 26\n  },\n  {\n    \"id\": 477,\n    \"firstName\": \"Ilene\",\n    \"lastName\": \"Ankunding\",\n    \"age\": 2\n  },\n  {\n    \"id\": 478,\n    \"firstName\": \"Arjun\",\n    \"lastName\": \"Hauck\",\n    \"age\": 33\n  },\n  {\n    \"id\": 479,\n    \"firstName\": \"Herbert\",\n    \"lastName\": \"Macejkovic\",\n    \"age\": 26\n  },\n  {\n    \"id\": 480,\n    \"firstName\": \"Giovanna\",\n    \"lastName\": \"Glover\",\n    \"age\": 24\n  },\n  {\n    \"id\": 481,\n    \"firstName\": \"Karelle\",\n    \"lastName\": \"Ziemann-Lowe\",\n    \"age\": 13\n  },\n  {\n    \"id\": 482,\n    \"firstName\": \"Rico\",\n    \"lastName\": \"Kshlerin\",\n    \"age\": 10\n  },\n  {\n    \"id\": 483,\n    \"firstName\": \"Dean\",\n    \"lastName\": \"Lueilwitz\",\n    \"age\": 29\n  },\n  {\n    \"id\": 484,\n    \"firstName\": \"Curt\",\n    \"lastName\": \"Rohan\",\n    \"age\": 19\n  },\n  {\n    \"id\": 485,\n    \"firstName\": \"Ed\",\n    \"lastName\": \"Collier\",\n    \"age\": 12\n  },\n  {\n    \"id\": 486,\n    \"firstName\": \"Mariam\",\n    \"lastName\": \"Krajcik\",\n    \"age\": 37\n  },\n  {\n    \"id\": 487,\n    \"firstName\": \"Keyon\",\n    \"lastName\": \"Sporer\",\n    \"age\": 27\n  },\n  {\n    \"id\": 488,\n    \"firstName\": \"Ike\",\n    \"lastName\": \"Gerhold\",\n    \"age\": 17\n  },\n  {\n    \"id\": 489,\n    \"firstName\": \"Tierra\",\n    \"lastName\": \"Bahringer\",\n    \"age\": 13\n  },\n  {\n    \"id\": 490,\n    \"firstName\": \"Carolanne\",\n    \"lastName\": \"Botsford\",\n    \"age\": 36\n  },\n  {\n    \"id\": 491,\n    \"firstName\": \"Obie\",\n    \"lastName\": \"Bogan\",\n    \"age\": 0\n  },\n  {\n    \"id\": 492,\n    \"firstName\": \"Elmore\",\n    \"lastName\": \"Franecki\",\n    \"age\": 30\n  },\n  {\n    \"id\": 493,\n    \"firstName\": \"Jonathon\",\n    \"lastName\": \"Farrell\",\n    \"age\": 10\n  },\n  {\n    \"id\": 494,\n    \"firstName\": \"Ashlynn\",\n    \"lastName\": \"Hilpert\",\n    \"age\": 19\n  },\n  {\n    \"id\": 495,\n    \"firstName\": \"Lamont\",\n    \"lastName\": \"Blick\",\n    \"age\": 21\n  },\n  {\n    \"id\": 496,\n    \"firstName\": \"Retta\",\n    \"lastName\": \"Hansen\",\n    \"age\": 35\n  },\n  {\n    \"id\": 497,\n    \"firstName\": \"Oda\",\n    \"lastName\": \"Ratke\",\n    \"age\": 32\n  },\n  {\n    \"id\": 498,\n    \"firstName\": \"Colton\",\n    \"lastName\": \"Schinner\",\n    \"age\": 34\n  },\n  {\n    \"id\": 499,\n    \"firstName\": \"Domenic\",\n    \"lastName\": \"Denesik\",\n    \"age\": 9\n  },\n  {\n    \"id\": 500,\n    \"firstName\": \"Chaim\",\n    \"lastName\": \"Cronin\",\n    \"age\": 32\n  },\n  {\n    \"id\": 501,\n    \"firstName\": \"Carroll\",\n    \"lastName\": \"Zulauf\",\n    \"age\": 34\n  },\n  {\n    \"id\": 502,\n    \"firstName\": \"Cheyanne\",\n    \"lastName\": \"Rippin\",\n    \"age\": 0\n  },\n  {\n    \"id\": 503,\n    \"firstName\": \"Olaf\",\n    \"lastName\": \"Zulauf\",\n    \"age\": 6\n  },\n  {\n    \"id\": 504,\n    \"firstName\": \"Chanelle\",\n    \"lastName\": \"Jakubowski\",\n    \"age\": 16\n  },\n  {\n    \"id\": 505,\n    \"firstName\": \"Lavina\",\n    \"lastName\": \"Fay\",\n    \"age\": 20\n  },\n  {\n    \"id\": 506,\n    \"firstName\": \"Maud\",\n    \"lastName\": \"Wunsch\",\n    \"age\": 25\n  },\n  {\n    \"id\": 507,\n    \"firstName\": \"Nels\",\n    \"lastName\": \"Windler\",\n    \"age\": 14\n  },\n  {\n    \"id\": 508,\n    \"firstName\": \"Brionna\",\n    \"lastName\": \"Mohr\",\n    \"age\": 2\n  },\n  {\n    \"id\": 509,\n    \"firstName\": \"Esperanza\",\n    \"lastName\": \"Daugherty\",\n    \"age\": 23\n  },\n  {\n    \"id\": 510,\n    \"firstName\": \"Candace\",\n    \"lastName\": \"Langworth\",\n    \"age\": 18\n  },\n  {\n    \"id\": 511,\n    \"firstName\": \"Verna\",\n    \"lastName\": \"Osinski\",\n    \"age\": 16\n  },\n  {\n    \"id\": 512,\n    \"firstName\": \"Dakota\",\n    \"lastName\": \"Rippin\",\n    \"age\": 29\n  },\n  {\n    \"id\": 513,\n    \"firstName\": \"Karen\",\n    \"lastName\": \"Kohler\",\n    \"age\": 25\n  },\n  {\n    \"id\": 514,\n    \"firstName\": \"Coralie\",\n    \"lastName\": \"Farrell\",\n    \"age\": 38\n  },\n  {\n    \"id\": 515,\n    \"firstName\": \"Myah\",\n    \"lastName\": \"Hermiston\",\n    \"age\": 24\n  },\n  {\n    \"id\": 516,\n    \"firstName\": \"Green\",\n    \"lastName\": \"Kulas\",\n    \"age\": 37\n  },\n  {\n    \"id\": 517,\n    \"firstName\": \"Myah\",\n    \"lastName\": \"Olson\",\n    \"age\": 29\n  },\n  {\n    \"id\": 518,\n    \"firstName\": \"Cynthia\",\n    \"lastName\": \"Bartoletti\",\n    \"age\": 10\n  },\n  {\n    \"id\": 519,\n    \"firstName\": \"Lea\",\n    \"lastName\": \"Treutel\",\n    \"age\": 29\n  },\n  {\n    \"id\": 520,\n    \"firstName\": \"Pierre\",\n    \"lastName\": \"Marvin\",\n    \"age\": 17\n  },\n  {\n    \"id\": 521,\n    \"firstName\": \"Abbie\",\n    \"lastName\": \"Prosacco\",\n    \"age\": 36\n  },\n  {\n    \"id\": 522,\n    \"firstName\": \"Rosa\",\n    \"lastName\": \"Lueilwitz\",\n    \"age\": 32\n  },\n  {\n    \"id\": 523,\n    \"firstName\": \"Edna\",\n    \"lastName\": \"Kertzmann\",\n    \"age\": 12\n  },\n  {\n    \"id\": 524,\n    \"firstName\": \"Ignatius\",\n    \"lastName\": \"Von\",\n    \"age\": 7\n  },\n  {\n    \"id\": 525,\n    \"firstName\": \"Freeman\",\n    \"lastName\": \"Russel\",\n    \"age\": 34\n  },\n  {\n    \"id\": 526,\n    \"firstName\": \"Cullen\",\n    \"lastName\": \"Wilkinson\",\n    \"age\": 8\n  },\n  {\n    \"id\": 527,\n    \"firstName\": \"Liliana\",\n    \"lastName\": \"Anderson\",\n    \"age\": 30\n  },\n  {\n    \"id\": 528,\n    \"firstName\": \"Edgardo\",\n    \"lastName\": \"Wiegand\",\n    \"age\": 39\n  },\n  {\n    \"id\": 529,\n    \"firstName\": \"Molly\",\n    \"lastName\": \"Lemke\",\n    \"age\": 13\n  },\n  {\n    \"id\": 530,\n    \"firstName\": \"Tara\",\n    \"lastName\": \"Pacocha\",\n    \"age\": 25\n  },\n  {\n    \"id\": 531,\n    \"firstName\": \"Hannah\",\n    \"lastName\": \"Crist\",\n    \"age\": 35\n  },\n  {\n    \"id\": 532,\n    \"firstName\": \"Myriam\",\n    \"lastName\": \"Kassulke\",\n    \"age\": 20\n  },\n  {\n    \"id\": 533,\n    \"firstName\": \"Gregoria\",\n    \"lastName\": \"Rice\",\n    \"age\": 3\n  },\n  {\n    \"id\": 534,\n    \"firstName\": \"Yazmin\",\n    \"lastName\": \"Spencer\",\n    \"age\": 35\n  },\n  {\n    \"id\": 535,\n    \"firstName\": \"Harrison\",\n    \"lastName\": \"McGlynn\",\n    \"age\": 12\n  },\n  {\n    \"id\": 536,\n    \"firstName\": \"Nelson\",\n    \"lastName\": \"Effertz-McKenzie\",\n    \"age\": 22\n  },\n  {\n    \"id\": 537,\n    \"firstName\": \"Myrtis\",\n    \"lastName\": \"Gutkowski\",\n    \"age\": 17\n  },\n  {\n    \"id\": 538,\n    \"firstName\": \"Zita\",\n    \"lastName\": \"Larson\",\n    \"age\": 32\n  },\n  {\n    \"id\": 539,\n    \"firstName\": \"Myriam\",\n    \"lastName\": \"Barton\",\n    \"age\": 30\n  },\n  {\n    \"id\": 540,\n    \"firstName\": \"Lew\",\n    \"lastName\": \"Volkman\",\n    \"age\": 11\n  },\n  {\n    \"id\": 541,\n    \"firstName\": \"Concepcion\",\n    \"lastName\": \"Lynch\",\n    \"age\": 18\n  },\n  {\n    \"id\": 542,\n    \"firstName\": \"Josefina\",\n    \"lastName\": \"Stanton\",\n    \"age\": 25\n  },\n  {\n    \"id\": 543,\n    \"firstName\": \"Abagail\",\n    \"lastName\": \"Robel\",\n    \"age\": 0\n  },\n  {\n    \"id\": 544,\n    \"firstName\": \"Amara\",\n    \"lastName\": \"Wilkinson\",\n    \"age\": 29\n  },\n  {\n    \"id\": 545,\n    \"firstName\": \"Bria\",\n    \"lastName\": \"Simonis\",\n    \"age\": 10\n  },\n  {\n    \"id\": 546,\n    \"firstName\": \"Jaycee\",\n    \"lastName\": \"Thiel\",\n    \"age\": 20\n  },\n  {\n    \"id\": 547,\n    \"firstName\": \"Furman\",\n    \"lastName\": \"Bins\",\n    \"age\": 39\n  },\n  {\n    \"id\": 548,\n    \"firstName\": \"Granville\",\n    \"lastName\": \"Schultz\",\n    \"age\": 27\n  },\n  {\n    \"id\": 549,\n    \"firstName\": \"Layla\",\n    \"lastName\": \"Kovacek\",\n    \"age\": 2\n  },\n  {\n    \"id\": 550,\n    \"firstName\": \"Naomi\",\n    \"lastName\": \"Jaskolski\",\n    \"age\": 31\n  },\n  {\n    \"id\": 551,\n    \"firstName\": \"Nikolas\",\n    \"lastName\": \"Jerde\",\n    \"age\": 20\n  },\n  {\n    \"id\": 552,\n    \"firstName\": \"Herta\",\n    \"lastName\": \"Klein\",\n    \"age\": 13\n  },\n  {\n    \"id\": 553,\n    \"firstName\": \"Orpha\",\n    \"lastName\": \"Upton\",\n    \"age\": 37\n  },\n  {\n    \"id\": 554,\n    \"firstName\": \"Lucile\",\n    \"lastName\": \"Osinski\",\n    \"age\": 4\n  },\n  {\n    \"id\": 555,\n    \"firstName\": \"Sim\",\n    \"lastName\": \"Morissette\",\n    \"age\": 26\n  },\n  {\n    \"id\": 556,\n    \"firstName\": \"Hailey\",\n    \"lastName\": \"Mraz\",\n    \"age\": 13\n  },\n  {\n    \"id\": 557,\n    \"firstName\": \"Rex\",\n    \"lastName\": \"Kutch\",\n    \"age\": 14\n  },\n  {\n    \"id\": 558,\n    \"firstName\": \"Lorena\",\n    \"lastName\": \"Gerhold\",\n    \"age\": 21\n  },\n  {\n    \"id\": 559,\n    \"firstName\": \"Cletus\",\n    \"lastName\": \"Haag\",\n    \"age\": 36\n  },\n  {\n    \"id\": 560,\n    \"firstName\": \"Maynard\",\n    \"lastName\": \"Parker\",\n    \"age\": 40\n  },\n  {\n    \"id\": 561,\n    \"firstName\": \"Weldon\",\n    \"lastName\": \"Rodriguez\",\n    \"age\": 15\n  },\n  {\n    \"id\": 562,\n    \"firstName\": \"Willy\",\n    \"lastName\": \"Cassin\",\n    \"age\": 9\n  },\n  {\n    \"id\": 563,\n    \"firstName\": \"Lavina\",\n    \"lastName\": \"Murphy\",\n    \"age\": 33\n  },\n  {\n    \"id\": 564,\n    \"firstName\": \"Pearlie\",\n    \"lastName\": \"Fahey\",\n    \"age\": 28\n  },\n  {\n    \"id\": 565,\n    \"firstName\": \"Heidi\",\n    \"lastName\": \"Haag-Conroy\",\n    \"age\": 6\n  },\n  {\n    \"id\": 566,\n    \"firstName\": \"Jacklyn\",\n    \"lastName\": \"Waters\",\n    \"age\": 20\n  },\n  {\n    \"id\": 567,\n    \"firstName\": \"Arno\",\n    \"lastName\": \"Hartmann\",\n    \"age\": 8\n  },\n  {\n    \"id\": 568,\n    \"firstName\": \"Theo\",\n    \"lastName\": \"Watsica\",\n    \"age\": 13\n  },\n  {\n    \"id\": 569,\n    \"firstName\": \"John\",\n    \"lastName\": \"Von\",\n    \"age\": 10\n  },\n  {\n    \"id\": 570,\n    \"firstName\": \"Christina\",\n    \"lastName\": \"Ebert\",\n    \"age\": 13\n  },\n  {\n    \"id\": 571,\n    \"firstName\": \"Milford\",\n    \"lastName\": \"Keebler\",\n    \"age\": 27\n  },\n  {\n    \"id\": 572,\n    \"firstName\": \"Cristobal\",\n    \"lastName\": \"Watsica\",\n    \"age\": 32\n  },\n  {\n    \"id\": 573,\n    \"firstName\": \"Patricia\",\n    \"lastName\": \"Bauch\",\n    \"age\": 0\n  },\n  {\n    \"id\": 574,\n    \"firstName\": \"Dorian\",\n    \"lastName\": \"Lubowitz\",\n    \"age\": 24\n  },\n  {\n    \"id\": 575,\n    \"firstName\": \"Antwan\",\n    \"lastName\": \"Kuvalis\",\n    \"age\": 21\n  },\n  {\n    \"id\": 576,\n    \"firstName\": \"Krystal\",\n    \"lastName\": \"Kirlin\",\n    \"age\": 22\n  },\n  {\n    \"id\": 577,\n    \"firstName\": \"Eleazar\",\n    \"lastName\": \"Bergstrom\",\n    \"age\": 14\n  },\n  {\n    \"id\": 578,\n    \"firstName\": \"Abel\",\n    \"lastName\": \"Abernathy\",\n    \"age\": 14\n  },\n  {\n    \"id\": 579,\n    \"firstName\": \"Cindy\",\n    \"lastName\": \"Gerlach\",\n    \"age\": 27\n  },\n  {\n    \"id\": 580,\n    \"firstName\": \"Angus\",\n    \"lastName\": \"Brakus\",\n    \"age\": 5\n  },\n  {\n    \"id\": 581,\n    \"firstName\": \"Nelle\",\n    \"lastName\": \"Gleason\",\n    \"age\": 27\n  },\n  {\n    \"id\": 582,\n    \"firstName\": \"Sylvan\",\n    \"lastName\": \"Schmeler\",\n    \"age\": 14\n  },\n  {\n    \"id\": 583,\n    \"firstName\": \"Etha\",\n    \"lastName\": \"Kris\",\n    \"age\": 19\n  },\n  {\n    \"id\": 584,\n    \"firstName\": \"Eloise\",\n    \"lastName\": \"Swift\",\n    \"age\": 18\n  },\n  {\n    \"id\": 585,\n    \"firstName\": \"Kris\",\n    \"lastName\": \"Stehr\",\n    \"age\": 21\n  },\n  {\n    \"id\": 586,\n    \"firstName\": \"Jarret\",\n    \"lastName\": \"Gerlach\",\n    \"age\": 9\n  },\n  {\n    \"id\": 587,\n    \"firstName\": \"Letha\",\n    \"lastName\": \"Rowe\",\n    \"age\": 23\n  },\n  {\n    \"id\": 588,\n    \"firstName\": \"Anais\",\n    \"lastName\": \"Balistreri\",\n    \"age\": 39\n  },\n  {\n    \"id\": 589,\n    \"firstName\": \"Armand\",\n    \"lastName\": \"Towne\",\n    \"age\": 2\n  },\n  {\n    \"id\": 590,\n    \"firstName\": \"Ransom\",\n    \"lastName\": \"Hermiston-Heaney\",\n    \"age\": 18\n  },\n  {\n    \"id\": 591,\n    \"firstName\": \"Vivien\",\n    \"lastName\": \"Waelchi\",\n    \"age\": 36\n  },\n  {\n    \"id\": 592,\n    \"firstName\": \"Everette\",\n    \"lastName\": \"Kerluke\",\n    \"age\": 3\n  },\n  {\n    \"id\": 593,\n    \"firstName\": \"Alden\",\n    \"lastName\": \"Batz\",\n    \"age\": 7\n  },\n  {\n    \"id\": 594,\n    \"firstName\": \"Marco\",\n    \"lastName\": \"Cremin\",\n    \"age\": 3\n  },\n  {\n    \"id\": 595,\n    \"firstName\": \"Virgil\",\n    \"lastName\": \"Kub\",\n    \"age\": 38\n  },\n  {\n    \"id\": 596,\n    \"firstName\": \"Horace\",\n    \"lastName\": \"Monahan\",\n    \"age\": 10\n  },\n  {\n    \"id\": 597,\n    \"firstName\": \"Megane\",\n    \"lastName\": \"Hayes\",\n    \"age\": 12\n  },\n  {\n    \"id\": 598,\n    \"firstName\": \"Barbara\",\n    \"lastName\": \"Cummings\",\n    \"age\": 36\n  },\n  {\n    \"id\": 599,\n    \"firstName\": \"Estell\",\n    \"lastName\": \"Kshlerin\",\n    \"age\": 4\n  },\n  {\n    \"id\": 600,\n    \"firstName\": \"Price\",\n    \"lastName\": \"Keeling\",\n    \"age\": 14\n  },\n  {\n    \"id\": 601,\n    \"firstName\": \"Nelson\",\n    \"lastName\": \"Veum\",\n    \"age\": 10\n  },\n  {\n    \"id\": 602,\n    \"firstName\": \"Benjamin\",\n    \"lastName\": \"Treutel\",\n    \"age\": 14\n  },\n  {\n    \"id\": 603,\n    \"firstName\": \"Keyshawn\",\n    \"lastName\": \"DuBuque\",\n    \"age\": 12\n  },\n  {\n    \"id\": 604,\n    \"firstName\": \"Yasmine\",\n    \"lastName\": \"Pollich\",\n    \"age\": 34\n  },\n  {\n    \"id\": 605,\n    \"firstName\": \"Connie\",\n    \"lastName\": \"Padberg\",\n    \"age\": 36\n  },\n  {\n    \"id\": 606,\n    \"firstName\": \"Pearl\",\n    \"lastName\": \"Adams\",\n    \"age\": 34\n  },\n  {\n    \"id\": 607,\n    \"firstName\": \"Sammie\",\n    \"lastName\": \"Berge\",\n    \"age\": 32\n  },\n  {\n    \"id\": 608,\n    \"firstName\": \"Annetta\",\n    \"lastName\": \"Predovic\",\n    \"age\": 34\n  },\n  {\n    \"id\": 609,\n    \"firstName\": \"Rodger\",\n    \"lastName\": \"Murazik\",\n    \"age\": 25\n  },\n  {\n    \"id\": 610,\n    \"firstName\": \"Devon\",\n    \"lastName\": \"Borer\",\n    \"age\": 32\n  },\n  {\n    \"id\": 611,\n    \"firstName\": \"Tre\",\n    \"lastName\": \"Murray\",\n    \"age\": 3\n  },\n  {\n    \"id\": 612,\n    \"firstName\": \"Tevin\",\n    \"lastName\": \"Krajcik\",\n    \"age\": 28\n  },\n  {\n    \"id\": 613,\n    \"firstName\": \"Nickolas\",\n    \"lastName\": \"Hilpert\",\n    \"age\": 22\n  },\n  {\n    \"id\": 614,\n    \"firstName\": \"Horacio\",\n    \"lastName\": \"Schumm\",\n    \"age\": 20\n  },\n  {\n    \"id\": 615,\n    \"firstName\": \"Jeffry\",\n    \"lastName\": \"Zemlak\",\n    \"age\": 0\n  },\n  {\n    \"id\": 616,\n    \"firstName\": \"Rachael\",\n    \"lastName\": \"Greenholt\",\n    \"age\": 3\n  },\n  {\n    \"id\": 617,\n    \"firstName\": \"Arno\",\n    \"lastName\": \"Hegmann\",\n    \"age\": 2\n  },\n  {\n    \"id\": 618,\n    \"firstName\": \"Mariah\",\n    \"lastName\": \"Berge\",\n    \"age\": 29\n  },\n  {\n    \"id\": 619,\n    \"firstName\": \"Tessie\",\n    \"lastName\": \"Hayes\",\n    \"age\": 22\n  },\n  {\n    \"id\": 620,\n    \"firstName\": \"Mandy\",\n    \"lastName\": \"Klein\",\n    \"age\": 11\n  },\n  {\n    \"id\": 621,\n    \"firstName\": \"Fae\",\n    \"lastName\": \"Corwin\",\n    \"age\": 20\n  },\n  {\n    \"id\": 622,\n    \"firstName\": \"Hellen\",\n    \"lastName\": \"Runolfsdottir\",\n    \"age\": 12\n  },\n  {\n    \"id\": 623,\n    \"firstName\": \"Beulah\",\n    \"lastName\": \"Yundt\",\n    \"age\": 17\n  },\n  {\n    \"id\": 624,\n    \"firstName\": \"Jarred\",\n    \"lastName\": \"Langosh\",\n    \"age\": 16\n  },\n  {\n    \"id\": 625,\n    \"firstName\": \"Myron\",\n    \"lastName\": \"Corkery\",\n    \"age\": 31\n  },\n  {\n    \"id\": 626,\n    \"firstName\": \"Miles\",\n    \"lastName\": \"Kessler\",\n    \"age\": 40\n  },\n  {\n    \"id\": 627,\n    \"firstName\": \"Sophie\",\n    \"lastName\": \"Osinski\",\n    \"age\": 3\n  },\n  {\n    \"id\": 628,\n    \"firstName\": \"Orlando\",\n    \"lastName\": \"Stehr\",\n    \"age\": 7\n  },\n  {\n    \"id\": 629,\n    \"firstName\": \"Mohammed\",\n    \"lastName\": \"Mann\",\n    \"age\": 26\n  },\n  {\n    \"id\": 630,\n    \"firstName\": \"Ephraim\",\n    \"lastName\": \"Wilderman\",\n    \"age\": 2\n  },\n  {\n    \"id\": 631,\n    \"firstName\": \"Loyal\",\n    \"lastName\": \"Waelchi\",\n    \"age\": 3\n  },\n  {\n    \"id\": 632,\n    \"firstName\": \"Mavis\",\n    \"lastName\": \"Harris\",\n    \"age\": 25\n  },\n  {\n    \"id\": 633,\n    \"firstName\": \"Orin\",\n    \"lastName\": \"Lowe\",\n    \"age\": 14\n  },\n  {\n    \"id\": 634,\n    \"firstName\": \"Una\",\n    \"lastName\": \"Hodkiewicz\",\n    \"age\": 30\n  },\n  {\n    \"id\": 635,\n    \"firstName\": \"Khalid\",\n    \"lastName\": \"Harvey\",\n    \"age\": 14\n  },\n  {\n    \"id\": 636,\n    \"firstName\": \"Lazaro\",\n    \"lastName\": \"Doyle\",\n    \"age\": 37\n  },\n  {\n    \"id\": 637,\n    \"firstName\": \"Skyla\",\n    \"lastName\": \"Raynor\",\n    \"age\": 24\n  },\n  {\n    \"id\": 638,\n    \"firstName\": \"Esmeralda\",\n    \"lastName\": \"Towne\",\n    \"age\": 21\n  },\n  {\n    \"id\": 639,\n    \"firstName\": \"Alberta\",\n    \"lastName\": \"Bednar\",\n    \"age\": 35\n  },\n  {\n    \"id\": 640,\n    \"firstName\": \"Josh\",\n    \"lastName\": \"Kassulke\",\n    \"age\": 39\n  },\n  {\n    \"id\": 641,\n    \"firstName\": \"Madge\",\n    \"lastName\": \"Ernser\",\n    \"age\": 31\n  },\n  {\n    \"id\": 642,\n    \"firstName\": \"Alanna\",\n    \"lastName\": \"Reynolds\",\n    \"age\": 14\n  },\n  {\n    \"id\": 643,\n    \"firstName\": \"Elroy\",\n    \"lastName\": \"Balistreri\",\n    \"age\": 8\n  },\n  {\n    \"id\": 644,\n    \"firstName\": \"Percival\",\n    \"lastName\": \"Heaney\",\n    \"age\": 23\n  },\n  {\n    \"id\": 645,\n    \"firstName\": \"Quinten\",\n    \"lastName\": \"Bradtke\",\n    \"age\": 13\n  },\n  {\n    \"id\": 646,\n    \"firstName\": \"Aubrey\",\n    \"lastName\": \"Will\",\n    \"age\": 28\n  },\n  {\n    \"id\": 647,\n    \"firstName\": \"Violet\",\n    \"lastName\": \"Hirthe\",\n    \"age\": 19\n  },\n  {\n    \"id\": 648,\n    \"firstName\": \"Nels\",\n    \"lastName\": \"Leffler\",\n    \"age\": 14\n  },\n  {\n    \"id\": 649,\n    \"firstName\": \"Florian\",\n    \"lastName\": \"Stiedemann\",\n    \"age\": 27\n  },\n  {\n    \"id\": 650,\n    \"firstName\": \"Javier\",\n    \"lastName\": \"Ritchie\",\n    \"age\": 12\n  },\n  {\n    \"id\": 651,\n    \"firstName\": \"Eriberto\",\n    \"lastName\": \"Herzog\",\n    \"age\": 0\n  },\n  {\n    \"id\": 652,\n    \"firstName\": \"Jaycee\",\n    \"lastName\": \"Kerluke\",\n    \"age\": 21\n  },\n  {\n    \"id\": 653,\n    \"firstName\": \"Eino\",\n    \"lastName\": \"Lemke\",\n    \"age\": 17\n  },\n  {\n    \"id\": 654,\n    \"firstName\": \"Sofia\",\n    \"lastName\": \"Schimmel\",\n    \"age\": 17\n  },\n  {\n    \"id\": 655,\n    \"firstName\": \"Dahlia\",\n    \"lastName\": \"Nolan-Wilkinson\",\n    \"age\": 38\n  },\n  {\n    \"id\": 656,\n    \"firstName\": \"Jaquan\",\n    \"lastName\": \"Conn\",\n    \"age\": 10\n  },\n  {\n    \"id\": 657,\n    \"firstName\": \"Louisa\",\n    \"lastName\": \"Murazik\",\n    \"age\": 3\n  },\n  {\n    \"id\": 658,\n    \"firstName\": \"Brittany\",\n    \"lastName\": \"Conn\",\n    \"age\": 17\n  },\n  {\n    \"id\": 659,\n    \"firstName\": \"Madisen\",\n    \"lastName\": \"Johns\",\n    \"age\": 0\n  },\n  {\n    \"id\": 660,\n    \"firstName\": \"Jaren\",\n    \"lastName\": \"Erdman\",\n    \"age\": 27\n  },\n  {\n    \"id\": 661,\n    \"firstName\": \"Maya\",\n    \"lastName\": \"Boehm\",\n    \"age\": 38\n  },\n  {\n    \"id\": 662,\n    \"firstName\": \"Vladimir\",\n    \"lastName\": \"Mante\",\n    \"age\": 18\n  },\n  {\n    \"id\": 663,\n    \"firstName\": \"Rosalinda\",\n    \"lastName\": \"Kuhlman\",\n    \"age\": 30\n  },\n  {\n    \"id\": 664,\n    \"firstName\": \"Ulices\",\n    \"lastName\": \"Luettgen\",\n    \"age\": 15\n  },\n  {\n    \"id\": 665,\n    \"firstName\": \"Therese\",\n    \"lastName\": \"Leffler\",\n    \"age\": 23\n  },\n  {\n    \"id\": 666,\n    \"firstName\": \"Clinton\",\n    \"lastName\": \"Mayer\",\n    \"age\": 40\n  },\n  {\n    \"id\": 667,\n    \"firstName\": \"Flavie\",\n    \"lastName\": \"Borer\",\n    \"age\": 21\n  },\n  {\n    \"id\": 668,\n    \"firstName\": \"Mariah\",\n    \"lastName\": \"Buckridge\",\n    \"age\": 36\n  },\n  {\n    \"id\": 669,\n    \"firstName\": \"Estelle\",\n    \"lastName\": \"Gulgowski\",\n    \"age\": 31\n  },\n  {\n    \"id\": 670,\n    \"firstName\": \"Cayla\",\n    \"lastName\": \"Ledner\",\n    \"age\": 24\n  },\n  {\n    \"id\": 671,\n    \"firstName\": \"Franco\",\n    \"lastName\": \"Pollich\",\n    \"age\": 25\n  },\n  {\n    \"id\": 672,\n    \"firstName\": \"Abigayle\",\n    \"lastName\": \"Herzog\",\n    \"age\": 17\n  },\n  {\n    \"id\": 673,\n    \"firstName\": \"Ellie\",\n    \"lastName\": \"Ziemann\",\n    \"age\": 24\n  },\n  {\n    \"id\": 674,\n    \"firstName\": \"Lenore\",\n    \"lastName\": \"Beier\",\n    \"age\": 27\n  },\n  {\n    \"id\": 675,\n    \"firstName\": \"William\",\n    \"lastName\": \"Boyer\",\n    \"age\": 27\n  },\n  {\n    \"id\": 676,\n    \"firstName\": \"Marlon\",\n    \"lastName\": \"Dicki\",\n    \"age\": 17\n  },\n  {\n    \"id\": 677,\n    \"firstName\": \"Vance\",\n    \"lastName\": \"Monahan\",\n    \"age\": 14\n  },\n  {\n    \"id\": 678,\n    \"firstName\": \"Rosina\",\n    \"lastName\": \"McCullough\",\n    \"age\": 3\n  },\n  {\n    \"id\": 679,\n    \"firstName\": \"Muriel\",\n    \"lastName\": \"Walker\",\n    \"age\": 4\n  },\n  {\n    \"id\": 680,\n    \"firstName\": \"Troy\",\n    \"lastName\": \"Parisian\",\n    \"age\": 14\n  },\n  {\n    \"id\": 681,\n    \"firstName\": \"Julia\",\n    \"lastName\": \"Feest\",\n    \"age\": 2\n  },\n  {\n    \"id\": 682,\n    \"firstName\": \"Branson\",\n    \"lastName\": \"Ratke\",\n    \"age\": 27\n  },\n  {\n    \"id\": 683,\n    \"firstName\": \"Rhett\",\n    \"lastName\": \"Reichert-Torp\",\n    \"age\": 24\n  },\n  {\n    \"id\": 684,\n    \"firstName\": \"Destin\",\n    \"lastName\": \"Bode\",\n    \"age\": 7\n  },\n  {\n    \"id\": 685,\n    \"firstName\": \"Demetrius\",\n    \"lastName\": \"Dare-Auer\",\n    \"age\": 10\n  },\n  {\n    \"id\": 686,\n    \"firstName\": \"Tyrique\",\n    \"lastName\": \"Hammes\",\n    \"age\": 30\n  },\n  {\n    \"id\": 687,\n    \"firstName\": \"Aurelie\",\n    \"lastName\": \"Kilback\",\n    \"age\": 20\n  },\n  {\n    \"id\": 688,\n    \"firstName\": \"Margot\",\n    \"lastName\": \"Hahn\",\n    \"age\": 11\n  },\n  {\n    \"id\": 689,\n    \"firstName\": \"Briana\",\n    \"lastName\": \"Hoeger\",\n    \"age\": 5\n  },\n  {\n    \"id\": 690,\n    \"firstName\": \"Kennith\",\n    \"lastName\": \"Murazik\",\n    \"age\": 9\n  },\n  {\n    \"id\": 691,\n    \"firstName\": \"Amani\",\n    \"lastName\": \"Kemmer\",\n    \"age\": 27\n  },\n  {\n    \"id\": 692,\n    \"firstName\": \"Gerry\",\n    \"lastName\": \"Wilderman\",\n    \"age\": 5\n  },\n  {\n    \"id\": 693,\n    \"firstName\": \"Abdiel\",\n    \"lastName\": \"Wiegand\",\n    \"age\": 35\n  },\n  {\n    \"id\": 694,\n    \"firstName\": \"Emmalee\",\n    \"lastName\": \"Konopelski\",\n    \"age\": 13\n  },\n  {\n    \"id\": 695,\n    \"firstName\": \"Stewart\",\n    \"lastName\": \"Mitchell\",\n    \"age\": 4\n  },\n  {\n    \"id\": 696,\n    \"firstName\": \"Garfield\",\n    \"lastName\": \"Ondricka\",\n    \"age\": 40\n  },\n  {\n    \"id\": 697,\n    \"firstName\": \"Zakary\",\n    \"lastName\": \"Little\",\n    \"age\": 19\n  },\n  {\n    \"id\": 698,\n    \"firstName\": \"Vesta\",\n    \"lastName\": \"Koch\",\n    \"age\": 30\n  },\n  {\n    \"id\": 699,\n    \"firstName\": \"Mohamed\",\n    \"lastName\": \"Rolfson-Prohaska\",\n    \"age\": 14\n  },\n  {\n    \"id\": 700,\n    \"firstName\": \"Sabryna\",\n    \"lastName\": \"Langworth\",\n    \"age\": 7\n  },\n  {\n    \"id\": 701,\n    \"firstName\": \"Chaz\",\n    \"lastName\": \"Erdman\",\n    \"age\": 34\n  },\n  {\n    \"id\": 702,\n    \"firstName\": \"Annabel\",\n    \"lastName\": \"Larkin\",\n    \"age\": 15\n  },\n  {\n    \"id\": 703,\n    \"firstName\": \"Casper\",\n    \"lastName\": \"Runolfsdottir\",\n    \"age\": 28\n  },\n  {\n    \"id\": 704,\n    \"firstName\": \"Hoyt\",\n    \"lastName\": \"Effertz\",\n    \"age\": 9\n  },\n  {\n    \"id\": 705,\n    \"firstName\": \"Nicolette\",\n    \"lastName\": \"Hansen\",\n    \"age\": 35\n  },\n  {\n    \"id\": 706,\n    \"firstName\": \"Ima\",\n    \"lastName\": \"Brown\",\n    \"age\": 16\n  },\n  {\n    \"id\": 707,\n    \"firstName\": \"Merl\",\n    \"lastName\": \"Volkman\",\n    \"age\": 27\n  },\n  {\n    \"id\": 708,\n    \"firstName\": \"Pamela\",\n    \"lastName\": \"Gibson\",\n    \"age\": 22\n  },\n  {\n    \"id\": 709,\n    \"firstName\": \"Susanna\",\n    \"lastName\": \"Strosin\",\n    \"age\": 10\n  },\n  {\n    \"id\": 710,\n    \"firstName\": \"Bradford\",\n    \"lastName\": \"Wisozk\",\n    \"age\": 30\n  },\n  {\n    \"id\": 711,\n    \"firstName\": \"Jaydon\",\n    \"lastName\": \"Muller\",\n    \"age\": 37\n  },\n  {\n    \"id\": 712,\n    \"firstName\": \"Annetta\",\n    \"lastName\": \"Kreiger\",\n    \"age\": 28\n  },\n  {\n    \"id\": 713,\n    \"firstName\": \"Geraldine\",\n    \"lastName\": \"Hahn\",\n    \"age\": 2\n  },\n  {\n    \"id\": 714,\n    \"firstName\": \"Rosalind\",\n    \"lastName\": \"Bauch\",\n    \"age\": 15\n  },\n  {\n    \"id\": 715,\n    \"firstName\": \"Eveline\",\n    \"lastName\": \"Legros\",\n    \"age\": 27\n  },\n  {\n    \"id\": 716,\n    \"firstName\": \"Enoch\",\n    \"lastName\": \"Witting\",\n    \"age\": 4\n  },\n  {\n    \"id\": 717,\n    \"firstName\": \"Ralph\",\n    \"lastName\": \"Grady\",\n    \"age\": 7\n  },\n  {\n    \"id\": 718,\n    \"firstName\": \"Jeanne\",\n    \"lastName\": \"Predovic\",\n    \"age\": 22\n  },\n  {\n    \"id\": 719,\n    \"firstName\": \"Camden\",\n    \"lastName\": \"Turcotte\",\n    \"age\": 19\n  },\n  {\n    \"id\": 720,\n    \"firstName\": \"Cleveland\",\n    \"lastName\": \"Gleichner\",\n    \"age\": 7\n  },\n  {\n    \"id\": 721,\n    \"firstName\": \"Remington\",\n    \"lastName\": \"Predovic\",\n    \"age\": 2\n  },\n  {\n    \"id\": 722,\n    \"firstName\": \"Kyra\",\n    \"lastName\": \"Mertz\",\n    \"age\": 22\n  },\n  {\n    \"id\": 723,\n    \"firstName\": \"Ephraim\",\n    \"lastName\": \"Anderson\",\n    \"age\": 9\n  },\n  {\n    \"id\": 724,\n    \"firstName\": \"Vincent\",\n    \"lastName\": \"Rippin\",\n    \"age\": 15\n  },\n  {\n    \"id\": 725,\n    \"firstName\": \"Dianna\",\n    \"lastName\": \"Rowe\",\n    \"age\": 8\n  },\n  {\n    \"id\": 726,\n    \"firstName\": \"Jefferey\",\n    \"lastName\": \"Spencer\",\n    \"age\": 12\n  },\n  {\n    \"id\": 727,\n    \"firstName\": \"Sim\",\n    \"lastName\": \"Dach\",\n    \"age\": 35\n  },\n  {\n    \"id\": 728,\n    \"firstName\": \"Bradly\",\n    \"lastName\": \"Reynolds\",\n    \"age\": 37\n  },\n  {\n    \"id\": 729,\n    \"firstName\": \"Annabell\",\n    \"lastName\": \"Cummings\",\n    \"age\": 5\n  },\n  {\n    \"id\": 730,\n    \"firstName\": \"Gaetano\",\n    \"lastName\": \"Becker\",\n    \"age\": 2\n  },\n  {\n    \"id\": 731,\n    \"firstName\": \"Jacquelyn\",\n    \"lastName\": \"Hilll\",\n    \"age\": 26\n  },\n  {\n    \"id\": 732,\n    \"firstName\": \"Cielo\",\n    \"lastName\": \"Huels\",\n    \"age\": 31\n  },\n  {\n    \"id\": 733,\n    \"firstName\": \"Lucie\",\n    \"lastName\": \"Bechtelar\",\n    \"age\": 10\n  },\n  {\n    \"id\": 734,\n    \"firstName\": \"Tiara\",\n    \"lastName\": \"Mosciski\",\n    \"age\": 31\n  },\n  {\n    \"id\": 735,\n    \"firstName\": \"Retha\",\n    \"lastName\": \"Langworth\",\n    \"age\": 37\n  },\n  {\n    \"id\": 736,\n    \"firstName\": \"Katarina\",\n    \"lastName\": \"Douglas\",\n    \"age\": 2\n  },\n  {\n    \"id\": 737,\n    \"firstName\": \"Herbert\",\n    \"lastName\": \"Hyatt\",\n    \"age\": 32\n  },\n  {\n    \"id\": 738,\n    \"firstName\": \"Gerhard\",\n    \"lastName\": \"Torphy-Mraz\",\n    \"age\": 34\n  },\n  {\n    \"id\": 739,\n    \"firstName\": \"Jerrell\",\n    \"lastName\": \"Schumm\",\n    \"age\": 6\n  },\n  {\n    \"id\": 740,\n    \"firstName\": \"Dashawn\",\n    \"lastName\": \"VonRueden\",\n    \"age\": 13\n  },\n  {\n    \"id\": 741,\n    \"firstName\": \"Jake\",\n    \"lastName\": \"Klocko\",\n    \"age\": 19\n  },\n  {\n    \"id\": 742,\n    \"firstName\": \"Erin\",\n    \"lastName\": \"Kuhn\",\n    \"age\": 35\n  },\n  {\n    \"id\": 743,\n    \"firstName\": \"Kyleigh\",\n    \"lastName\": \"Renner\",\n    \"age\": 19\n  },\n  {\n    \"id\": 744,\n    \"firstName\": \"Joana\",\n    \"lastName\": \"Fisher\",\n    \"age\": 22\n  },\n  {\n    \"id\": 745,\n    \"firstName\": \"Seamus\",\n    \"lastName\": \"Rohan\",\n    \"age\": 26\n  },\n  {\n    \"id\": 746,\n    \"firstName\": \"Karli\",\n    \"lastName\": \"Lindgren\",\n    \"age\": 11\n  },\n  {\n    \"id\": 747,\n    \"firstName\": \"Haleigh\",\n    \"lastName\": \"Murray\",\n    \"age\": 37\n  },\n  {\n    \"id\": 748,\n    \"firstName\": \"Alisa\",\n    \"lastName\": \"Rau\",\n    \"age\": 7\n  },\n  {\n    \"id\": 749,\n    \"firstName\": \"Carolanne\",\n    \"lastName\": \"Hoeger\",\n    \"age\": 1\n  },\n  {\n    \"id\": 750,\n    \"firstName\": \"Hans\",\n    \"lastName\": \"Grant\",\n    \"age\": 20\n  },\n  {\n    \"id\": 751,\n    \"firstName\": \"Providenci\",\n    \"lastName\": \"Breitenberg\",\n    \"age\": 5\n  },\n  {\n    \"id\": 752,\n    \"firstName\": \"Sally\",\n    \"lastName\": \"Romaguera\",\n    \"age\": 11\n  },\n  {\n    \"id\": 753,\n    \"firstName\": \"Beryl\",\n    \"lastName\": \"Hills\",\n    \"age\": 3\n  },\n  {\n    \"id\": 754,\n    \"firstName\": \"Meagan\",\n    \"lastName\": \"Kozey\",\n    \"age\": 35\n  },\n  {\n    \"id\": 755,\n    \"firstName\": \"Maxime\",\n    \"lastName\": \"Schaefer\",\n    \"age\": 18\n  },\n  {\n    \"id\": 756,\n    \"firstName\": \"Christop\",\n    \"lastName\": \"Collier\",\n    \"age\": 4\n  },\n  {\n    \"id\": 757,\n    \"firstName\": \"Nathaniel\",\n    \"lastName\": \"Stokes\",\n    \"age\": 19\n  },\n  {\n    \"id\": 758,\n    \"firstName\": \"Rolando\",\n    \"lastName\": \"White\",\n    \"age\": 14\n  },\n  {\n    \"id\": 759,\n    \"firstName\": \"Millie\",\n    \"lastName\": \"Upton\",\n    \"age\": 31\n  },\n  {\n    \"id\": 760,\n    \"firstName\": \"Alessandro\",\n    \"lastName\": \"Wehner\",\n    \"age\": 36\n  },\n  {\n    \"id\": 761,\n    \"firstName\": \"Abagail\",\n    \"lastName\": \"Mitchell\",\n    \"age\": 28\n  },\n  {\n    \"id\": 762,\n    \"firstName\": \"Loy\",\n    \"lastName\": \"Bradtke\",\n    \"age\": 11\n  },\n  {\n    \"id\": 763,\n    \"firstName\": \"Kendall\",\n    \"lastName\": \"Rolfson\",\n    \"age\": 35\n  },\n  {\n    \"id\": 764,\n    \"firstName\": \"Alisa\",\n    \"lastName\": \"Cassin\",\n    \"age\": 18\n  },\n  {\n    \"id\": 765,\n    \"firstName\": \"Larue\",\n    \"lastName\": \"Fay\",\n    \"age\": 25\n  },\n  {\n    \"id\": 766,\n    \"firstName\": \"Kianna\",\n    \"lastName\": \"Bins\",\n    \"age\": 3\n  },\n  {\n    \"id\": 767,\n    \"firstName\": \"Rhiannon\",\n    \"lastName\": \"Hansen-Brekke\",\n    \"age\": 35\n  },\n  {\n    \"id\": 768,\n    \"firstName\": \"Baron\",\n    \"lastName\": \"Schaefer\",\n    \"age\": 33\n  },\n  {\n    \"id\": 769,\n    \"firstName\": \"Ernest\",\n    \"lastName\": \"Spencer-Terry\",\n    \"age\": 6\n  },\n  {\n    \"id\": 770,\n    \"firstName\": \"Else\",\n    \"lastName\": \"Stroman\",\n    \"age\": 35\n  },\n  {\n    \"id\": 771,\n    \"firstName\": \"Johnathon\",\n    \"lastName\": \"Littel\",\n    \"age\": 4\n  },\n  {\n    \"id\": 772,\n    \"firstName\": \"Delores\",\n    \"lastName\": \"Stehr\",\n    \"age\": 5\n  },\n  {\n    \"id\": 773,\n    \"firstName\": \"Eldon\",\n    \"lastName\": \"Walter\",\n    \"age\": 36\n  },\n  {\n    \"id\": 774,\n    \"firstName\": \"Marilie\",\n    \"lastName\": \"Torphy\",\n    \"age\": 24\n  },\n  {\n    \"id\": 775,\n    \"firstName\": \"Neva\",\n    \"lastName\": \"Hartmann\",\n    \"age\": 13\n  },\n  {\n    \"id\": 776,\n    \"firstName\": \"Morris\",\n    \"lastName\": \"Thiel\",\n    \"age\": 14\n  },\n  {\n    \"id\": 777,\n    \"firstName\": \"Carlee\",\n    \"lastName\": \"Tillman\",\n    \"age\": 9\n  },\n  {\n    \"id\": 778,\n    \"firstName\": \"Ericka\",\n    \"lastName\": \"Kessler\",\n    \"age\": 21\n  },\n  {\n    \"id\": 779,\n    \"firstName\": \"Jazlyn\",\n    \"lastName\": \"Parisian\",\n    \"age\": 23\n  },\n  {\n    \"id\": 780,\n    \"firstName\": \"Demetrius\",\n    \"lastName\": \"Johnston\",\n    \"age\": 32\n  },\n  {\n    \"id\": 781,\n    \"firstName\": \"Irwin\",\n    \"lastName\": \"Nikolaus\",\n    \"age\": 23\n  },\n  {\n    \"id\": 782,\n    \"firstName\": \"Julien\",\n    \"lastName\": \"Veum\",\n    \"age\": 31\n  },\n  {\n    \"id\": 783,\n    \"firstName\": \"Estel\",\n    \"lastName\": \"Cremin\",\n    \"age\": 13\n  },\n  {\n    \"id\": 784,\n    \"firstName\": \"Edwin\",\n    \"lastName\": \"Luettgen\",\n    \"age\": 9\n  },\n  {\n    \"id\": 785,\n    \"firstName\": \"Rudy\",\n    \"lastName\": \"Walker\",\n    \"age\": 25\n  },\n  {\n    \"id\": 786,\n    \"firstName\": \"Lisa\",\n    \"lastName\": \"Metz\",\n    \"age\": 8\n  },\n  {\n    \"id\": 787,\n    \"firstName\": \"Kelsi\",\n    \"lastName\": \"Howell\",\n    \"age\": 6\n  },\n  {\n    \"id\": 788,\n    \"firstName\": \"Alexa\",\n    \"lastName\": \"Kemmer\",\n    \"age\": 5\n  },\n  {\n    \"id\": 789,\n    \"firstName\": \"Paxton\",\n    \"lastName\": \"Schmeler\",\n    \"age\": 9\n  },\n  {\n    \"id\": 790,\n    \"firstName\": \"Sarai\",\n    \"lastName\": \"McKenzie\",\n    \"age\": 2\n  },\n  {\n    \"id\": 791,\n    \"firstName\": \"Ryann\",\n    \"lastName\": \"Schinner\",\n    \"age\": 36\n  },\n  {\n    \"id\": 792,\n    \"firstName\": \"Isobel\",\n    \"lastName\": \"Cartwright\",\n    \"age\": 32\n  },\n  {\n    \"id\": 793,\n    \"firstName\": \"Myah\",\n    \"lastName\": \"O'Conner\",\n    \"age\": 29\n  },\n  {\n    \"id\": 794,\n    \"firstName\": \"Ericka\",\n    \"lastName\": \"Marvin\",\n    \"age\": 0\n  },\n  {\n    \"id\": 795,\n    \"firstName\": \"Devyn\",\n    \"lastName\": \"Fisher\",\n    \"age\": 27\n  },\n  {\n    \"id\": 796,\n    \"firstName\": \"Orval\",\n    \"lastName\": \"Franey\",\n    \"age\": 16\n  },\n  {\n    \"id\": 797,\n    \"firstName\": \"Augusta\",\n    \"lastName\": \"Runte\",\n    \"age\": 19\n  },\n  {\n    \"id\": 798,\n    \"firstName\": \"Flossie\",\n    \"lastName\": \"Walker\",\n    \"age\": 19\n  },\n  {\n    \"id\": 799,\n    \"firstName\": \"Sydney\",\n    \"lastName\": \"Swaniawski\",\n    \"age\": 37\n  },\n  {\n    \"id\": 800,\n    \"firstName\": \"Leanna\",\n    \"lastName\": \"Greenfelder\",\n    \"age\": 14\n  },\n  {\n    \"id\": 801,\n    \"firstName\": \"Caesar\",\n    \"lastName\": \"Franey\",\n    \"age\": 37\n  },\n  {\n    \"id\": 802,\n    \"firstName\": \"Tyree\",\n    \"lastName\": \"Ledner\",\n    \"age\": 2\n  },\n  {\n    \"id\": 803,\n    \"firstName\": \"Joe\",\n    \"lastName\": \"Schiller\",\n    \"age\": 3\n  },\n  {\n    \"id\": 804,\n    \"firstName\": \"Elijah\",\n    \"lastName\": \"Metz-O'Kon\",\n    \"age\": 29\n  },\n  {\n    \"id\": 805,\n    \"firstName\": \"Kenya\",\n    \"lastName\": \"Harber\",\n    \"age\": 19\n  },\n  {\n    \"id\": 806,\n    \"firstName\": \"Brody\",\n    \"lastName\": \"Grant\",\n    \"age\": 37\n  },\n  {\n    \"id\": 807,\n    \"firstName\": \"Vince\",\n    \"lastName\": \"Ruecker\",\n    \"age\": 30\n  },\n  {\n    \"id\": 808,\n    \"firstName\": \"Sigurd\",\n    \"lastName\": \"VonRueden\",\n    \"age\": 31\n  },\n  {\n    \"id\": 809,\n    \"firstName\": \"Ryan\",\n    \"lastName\": \"Weissnat\",\n    \"age\": 16\n  },\n  {\n    \"id\": 810,\n    \"firstName\": \"Fernando\",\n    \"lastName\": \"Boehm-Heaney\",\n    \"age\": 10\n  },\n  {\n    \"id\": 811,\n    \"firstName\": \"Creola\",\n    \"lastName\": \"Rempel-Schaefer\",\n    \"age\": 19\n  },\n  {\n    \"id\": 812,\n    \"firstName\": \"Edmund\",\n    \"lastName\": \"Rohan\",\n    \"age\": 7\n  },\n  {\n    \"id\": 813,\n    \"firstName\": \"Trace\",\n    \"lastName\": \"Romaguera\",\n    \"age\": 5\n  },\n  {\n    \"id\": 814,\n    \"firstName\": \"Nathaniel\",\n    \"lastName\": \"Runolfsdottir-Marks\",\n    \"age\": 26\n  },\n  {\n    \"id\": 815,\n    \"firstName\": \"Donny\",\n    \"lastName\": \"Romaguera\",\n    \"age\": 27\n  },\n  {\n    \"id\": 816,\n    \"firstName\": \"Sheridan\",\n    \"lastName\": \"Corkery\",\n    \"age\": 40\n  },\n  {\n    \"id\": 817,\n    \"firstName\": \"Rhianna\",\n    \"lastName\": \"Pouros\",\n    \"age\": 16\n  },\n  {\n    \"id\": 818,\n    \"firstName\": \"Gerry\",\n    \"lastName\": \"Bartell\",\n    \"age\": 10\n  },\n  {\n    \"id\": 819,\n    \"firstName\": \"Finn\",\n    \"lastName\": \"Hessel\",\n    \"age\": 30\n  },\n  {\n    \"id\": 820,\n    \"firstName\": \"Graham\",\n    \"lastName\": \"Wintheiser-Kirlin\",\n    \"age\": 39\n  },\n  {\n    \"id\": 821,\n    \"firstName\": \"Tod\",\n    \"lastName\": \"O'Kon\",\n    \"age\": 19\n  },\n  {\n    \"id\": 822,\n    \"firstName\": \"Mathilde\",\n    \"lastName\": \"Rutherford\",\n    \"age\": 21\n  },\n  {\n    \"id\": 823,\n    \"firstName\": \"Orin\",\n    \"lastName\": \"Beier\",\n    \"age\": 39\n  },\n  {\n    \"id\": 824,\n    \"firstName\": \"Keara\",\n    \"lastName\": \"Hayes\",\n    \"age\": 2\n  },\n  {\n    \"id\": 825,\n    \"firstName\": \"Zelda\",\n    \"lastName\": \"Braun\",\n    \"age\": 14\n  },\n  {\n    \"id\": 826,\n    \"firstName\": \"Myrtice\",\n    \"lastName\": \"Auer\",\n    \"age\": 15\n  },\n  {\n    \"id\": 827,\n    \"firstName\": \"Anahi\",\n    \"lastName\": \"Stoltenberg\",\n    \"age\": 35\n  },\n  {\n    \"id\": 828,\n    \"firstName\": \"Colin\",\n    \"lastName\": \"Bergstrom\",\n    \"age\": 22\n  },\n  {\n    \"id\": 829,\n    \"firstName\": \"Dangelo\",\n    \"lastName\": \"Greenfelder\",\n    \"age\": 27\n  },\n  {\n    \"id\": 830,\n    \"firstName\": \"Salvador\",\n    \"lastName\": \"Borer\",\n    \"age\": 24\n  },\n  {\n    \"id\": 831,\n    \"firstName\": \"Lawson\",\n    \"lastName\": \"King\",\n    \"age\": 33\n  },\n  {\n    \"id\": 832,\n    \"firstName\": \"Blanca\",\n    \"lastName\": \"Schaden\",\n    \"age\": 26\n  },\n  {\n    \"id\": 833,\n    \"firstName\": \"Maude\",\n    \"lastName\": \"Hammes\",\n    \"age\": 31\n  },\n  {\n    \"id\": 834,\n    \"firstName\": \"Bertha\",\n    \"lastName\": \"Hoeger\",\n    \"age\": 35\n  },\n  {\n    \"id\": 835,\n    \"firstName\": \"Grover\",\n    \"lastName\": \"Bednar\",\n    \"age\": 40\n  },\n  {\n    \"id\": 836,\n    \"firstName\": \"Geovany\",\n    \"lastName\": \"Rohan\",\n    \"age\": 38\n  },\n  {\n    \"id\": 837,\n    \"firstName\": \"Antonette\",\n    \"lastName\": \"D'Amore\",\n    \"age\": 25\n  },\n  {\n    \"id\": 838,\n    \"firstName\": \"Audrey\",\n    \"lastName\": \"O'Hara\",\n    \"age\": 25\n  },\n  {\n    \"id\": 839,\n    \"firstName\": \"Ezequiel\",\n    \"lastName\": \"VonRueden\",\n    \"age\": 33\n  },\n  {\n    \"id\": 840,\n    \"firstName\": \"Alyson\",\n    \"lastName\": \"Weissnat\",\n    \"age\": 16\n  },\n  {\n    \"id\": 841,\n    \"firstName\": \"Scottie\",\n    \"lastName\": \"Bogan\",\n    \"age\": 14\n  },\n  {\n    \"id\": 842,\n    \"firstName\": \"Drake\",\n    \"lastName\": \"Crona\",\n    \"age\": 34\n  },\n  {\n    \"id\": 843,\n    \"firstName\": \"Donald\",\n    \"lastName\": \"Dooley\",\n    \"age\": 5\n  },\n  {\n    \"id\": 844,\n    \"firstName\": \"Arvilla\",\n    \"lastName\": \"Metz\",\n    \"age\": 21\n  },\n  {\n    \"id\": 845,\n    \"firstName\": \"Amie\",\n    \"lastName\": \"Schaden\",\n    \"age\": 14\n  },\n  {\n    \"id\": 846,\n    \"firstName\": \"Verdie\",\n    \"lastName\": \"Christiansen\",\n    \"age\": 5\n  },\n  {\n    \"id\": 847,\n    \"firstName\": \"Annetta\",\n    \"lastName\": \"Labadie\",\n    \"age\": 5\n  },\n  {\n    \"id\": 848,\n    \"firstName\": \"Lesly\",\n    \"lastName\": \"Kirlin\",\n    \"age\": 14\n  },\n  {\n    \"id\": 849,\n    \"firstName\": \"Gaston\",\n    \"lastName\": \"Toy-Larkin\",\n    \"age\": 19\n  },\n  {\n    \"id\": 850,\n    \"firstName\": \"Nathanael\",\n    \"lastName\": \"Durgan\",\n    \"age\": 17\n  },\n  {\n    \"id\": 851,\n    \"firstName\": \"Louie\",\n    \"lastName\": \"Torp\",\n    \"age\": 4\n  },\n  {\n    \"id\": 852,\n    \"firstName\": \"Armani\",\n    \"lastName\": \"Kertzmann\",\n    \"age\": 13\n  },\n  {\n    \"id\": 853,\n    \"firstName\": \"Jayde\",\n    \"lastName\": \"Lakin\",\n    \"age\": 1\n  },\n  {\n    \"id\": 854,\n    \"firstName\": \"Autumn\",\n    \"lastName\": \"Wiza\",\n    \"age\": 20\n  },\n  {\n    \"id\": 855,\n    \"firstName\": \"Guido\",\n    \"lastName\": \"Kulas\",\n    \"age\": 22\n  },\n  {\n    \"id\": 856,\n    \"firstName\": \"Bud\",\n    \"lastName\": \"Runte\",\n    \"age\": 10\n  },\n  {\n    \"id\": 857,\n    \"firstName\": \"Maxime\",\n    \"lastName\": \"Funk\",\n    \"age\": 23\n  },\n  {\n    \"id\": 858,\n    \"firstName\": \"Dylan\",\n    \"lastName\": \"Jenkins\",\n    \"age\": 31\n  },\n  {\n    \"id\": 859,\n    \"firstName\": \"Yesenia\",\n    \"lastName\": \"Ruecker-Wehner\",\n    \"age\": 5\n  },\n  {\n    \"id\": 860,\n    \"firstName\": \"Zion\",\n    \"lastName\": \"Schmeler\",\n    \"age\": 38\n  },\n  {\n    \"id\": 861,\n    \"firstName\": \"Zola\",\n    \"lastName\": \"Wiegand\",\n    \"age\": 38\n  },\n  {\n    \"id\": 862,\n    \"firstName\": \"Abdullah\",\n    \"lastName\": \"Bogan\",\n    \"age\": 11\n  },\n  {\n    \"id\": 863,\n    \"firstName\": \"Issac\",\n    \"lastName\": \"Monahan\",\n    \"age\": 14\n  },\n  {\n    \"id\": 864,\n    \"firstName\": \"Patrick\",\n    \"lastName\": \"Baumbach\",\n    \"age\": 40\n  },\n  {\n    \"id\": 865,\n    \"firstName\": \"Josefa\",\n    \"lastName\": \"Heller\",\n    \"age\": 25\n  },\n  {\n    \"id\": 866,\n    \"firstName\": \"Bulah\",\n    \"lastName\": \"Hayes\",\n    \"age\": 15\n  },\n  {\n    \"id\": 867,\n    \"firstName\": \"Brannon\",\n    \"lastName\": \"Hahn-Abshire\",\n    \"age\": 13\n  },\n  {\n    \"id\": 868,\n    \"firstName\": \"Corrine\",\n    \"lastName\": \"Huels\",\n    \"age\": 38\n  },\n  {\n    \"id\": 869,\n    \"firstName\": \"Nils\",\n    \"lastName\": \"Botsford\",\n    \"age\": 28\n  },\n  {\n    \"id\": 870,\n    \"firstName\": \"Shaylee\",\n    \"lastName\": \"Windler\",\n    \"age\": 29\n  },\n  {\n    \"id\": 871,\n    \"firstName\": \"Matteo\",\n    \"lastName\": \"Pagac\",\n    \"age\": 2\n  },\n  {\n    \"id\": 872,\n    \"firstName\": \"Kyla\",\n    \"lastName\": \"Fritsch\",\n    \"age\": 35\n  },\n  {\n    \"id\": 873,\n    \"firstName\": \"Freeman\",\n    \"lastName\": \"Spencer\",\n    \"age\": 15\n  },\n  {\n    \"id\": 874,\n    \"firstName\": \"Casimir\",\n    \"lastName\": \"Cassin\",\n    \"age\": 15\n  },\n  {\n    \"id\": 875,\n    \"firstName\": \"Waylon\",\n    \"lastName\": \"Gleichner\",\n    \"age\": 39\n  },\n  {\n    \"id\": 876,\n    \"firstName\": \"Lina\",\n    \"lastName\": \"Skiles\",\n    \"age\": 16\n  },\n  {\n    \"id\": 877,\n    \"firstName\": \"Augustine\",\n    \"lastName\": \"Konopelski\",\n    \"age\": 30\n  },\n  {\n    \"id\": 878,\n    \"firstName\": \"Shawn\",\n    \"lastName\": \"Herzog\",\n    \"age\": 3\n  },\n  {\n    \"id\": 879,\n    \"firstName\": \"Chadd\",\n    \"lastName\": \"Kautzer\",\n    \"age\": 38\n  },\n  {\n    \"id\": 880,\n    \"firstName\": \"Marisol\",\n    \"lastName\": \"Collins\",\n    \"age\": 31\n  },\n  {\n    \"id\": 881,\n    \"firstName\": \"Niko\",\n    \"lastName\": \"Rippin\",\n    \"age\": 2\n  },\n  {\n    \"id\": 882,\n    \"firstName\": \"Derrick\",\n    \"lastName\": \"Klocko\",\n    \"age\": 10\n  },\n  {\n    \"id\": 883,\n    \"firstName\": \"Sofia\",\n    \"lastName\": \"Cremin\",\n    \"age\": 23\n  },\n  {\n    \"id\": 884,\n    \"firstName\": \"Josianne\",\n    \"lastName\": \"Roob\",\n    \"age\": 2\n  },\n  {\n    \"id\": 885,\n    \"firstName\": \"Emery\",\n    \"lastName\": \"Ryan-Stroman\",\n    \"age\": 28\n  },\n  {\n    \"id\": 886,\n    \"firstName\": \"Bobby\",\n    \"lastName\": \"Kuhlman\",\n    \"age\": 9\n  },\n  {\n    \"id\": 887,\n    \"firstName\": \"Rhea\",\n    \"lastName\": \"Kilback\",\n    \"age\": 25\n  },\n  {\n    \"id\": 888,\n    \"firstName\": \"Tyshawn\",\n    \"lastName\": \"Lockman\",\n    \"age\": 0\n  },\n  {\n    \"id\": 889,\n    \"firstName\": \"Sheila\",\n    \"lastName\": \"West\",\n    \"age\": 37\n  },\n  {\n    \"id\": 890,\n    \"firstName\": \"Queenie\",\n    \"lastName\": \"Farrell\",\n    \"age\": 16\n  },\n  {\n    \"id\": 891,\n    \"firstName\": \"Alexane\",\n    \"lastName\": \"Wisoky\",\n    \"age\": 9\n  },\n  {\n    \"id\": 892,\n    \"firstName\": \"Rasheed\",\n    \"lastName\": \"Roob\",\n    \"age\": 33\n  },\n  {\n    \"id\": 893,\n    \"firstName\": \"Era\",\n    \"lastName\": \"Lehner\",\n    \"age\": 31\n  },\n  {\n    \"id\": 894,\n    \"firstName\": \"Stephany\",\n    \"lastName\": \"Renner\",\n    \"age\": 8\n  },\n  {\n    \"id\": 895,\n    \"firstName\": \"Tia\",\n    \"lastName\": \"Grimes-Howe\",\n    \"age\": 30\n  },\n  {\n    \"id\": 896,\n    \"firstName\": \"Yadira\",\n    \"lastName\": \"Witting\",\n    \"age\": 31\n  },\n  {\n    \"id\": 897,\n    \"firstName\": \"Rosanna\",\n    \"lastName\": \"Haley\",\n    \"age\": 36\n  },\n  {\n    \"id\": 898,\n    \"firstName\": \"Bria\",\n    \"lastName\": \"Wiegand\",\n    \"age\": 21\n  },\n  {\n    \"id\": 899,\n    \"firstName\": \"Crystal\",\n    \"lastName\": \"Cruickshank\",\n    \"age\": 14\n  },\n  {\n    \"id\": 900,\n    \"firstName\": \"Evert\",\n    \"lastName\": \"Walker\",\n    \"age\": 9\n  },\n  {\n    \"id\": 901,\n    \"firstName\": \"Mckenna\",\n    \"lastName\": \"Rohan\",\n    \"age\": 19\n  },\n  {\n    \"id\": 902,\n    \"firstName\": \"Bradford\",\n    \"lastName\": \"Murazik\",\n    \"age\": 2\n  },\n  {\n    \"id\": 903,\n    \"firstName\": \"Rocio\",\n    \"lastName\": \"Jakubowski\",\n    \"age\": 38\n  },\n  {\n    \"id\": 904,\n    \"firstName\": \"Fredrick\",\n    \"lastName\": \"Daniel\",\n    \"age\": 17\n  },\n  {\n    \"id\": 905,\n    \"firstName\": \"Ewell\",\n    \"lastName\": \"Douglas\",\n    \"age\": 8\n  },\n  {\n    \"id\": 906,\n    \"firstName\": \"Darryl\",\n    \"lastName\": \"Considine\",\n    \"age\": 3\n  },\n  {\n    \"id\": 907,\n    \"firstName\": \"Cordia\",\n    \"lastName\": \"Parisian\",\n    \"age\": 15\n  },\n  {\n    \"id\": 908,\n    \"firstName\": \"Burnice\",\n    \"lastName\": \"Veum\",\n    \"age\": 19\n  },\n  {\n    \"id\": 909,\n    \"firstName\": \"Trenton\",\n    \"lastName\": \"Lakin-Abbott\",\n    \"age\": 3\n  },\n  {\n    \"id\": 910,\n    \"firstName\": \"Mittie\",\n    \"lastName\": \"Kuhn\",\n    \"age\": 6\n  },\n  {\n    \"id\": 911,\n    \"firstName\": \"Dylan\",\n    \"lastName\": \"Bashirian\",\n    \"age\": 38\n  },\n  {\n    \"id\": 912,\n    \"firstName\": \"Columbus\",\n    \"lastName\": \"Langosh\",\n    \"age\": 9\n  },\n  {\n    \"id\": 913,\n    \"firstName\": \"Gregorio\",\n    \"lastName\": \"Schimmel\",\n    \"age\": 22\n  },\n  {\n    \"id\": 914,\n    \"firstName\": \"Fletcher\",\n    \"lastName\": \"Rempel\",\n    \"age\": 24\n  },\n  {\n    \"id\": 915,\n    \"firstName\": \"Lincoln\",\n    \"lastName\": \"Rowe\",\n    \"age\": 11\n  },\n  {\n    \"id\": 916,\n    \"firstName\": \"Rogelio\",\n    \"lastName\": \"Koch\",\n    \"age\": 38\n  },\n  {\n    \"id\": 917,\n    \"firstName\": \"Rosemary\",\n    \"lastName\": \"Jerde\",\n    \"age\": 17\n  },\n  {\n    \"id\": 918,\n    \"firstName\": \"Maximus\",\n    \"lastName\": \"Quitzon\",\n    \"age\": 16\n  },\n  {\n    \"id\": 919,\n    \"firstName\": \"Robert\",\n    \"lastName\": \"Botsford\",\n    \"age\": 22\n  },\n  {\n    \"id\": 920,\n    \"firstName\": \"Brant\",\n    \"lastName\": \"Pfannerstill\",\n    \"age\": 25\n  },\n  {\n    \"id\": 921,\n    \"firstName\": \"Maud\",\n    \"lastName\": \"Boyle\",\n    \"age\": 21\n  },\n  {\n    \"id\": 922,\n    \"firstName\": \"Sophia\",\n    \"lastName\": \"Schmitt\",\n    \"age\": 13\n  },\n  {\n    \"id\": 923,\n    \"firstName\": \"Sibyl\",\n    \"lastName\": \"Kub\",\n    \"age\": 25\n  },\n  {\n    \"id\": 924,\n    \"firstName\": \"Myrna\",\n    \"lastName\": \"Shields\",\n    \"age\": 34\n  },\n  {\n    \"id\": 925,\n    \"firstName\": \"Melody\",\n    \"lastName\": \"Robel\",\n    \"age\": 7\n  },\n  {\n    \"id\": 926,\n    \"firstName\": \"Myah\",\n    \"lastName\": \"Sauer\",\n    \"age\": 18\n  },\n  {\n    \"id\": 927,\n    \"firstName\": \"Salvatore\",\n    \"lastName\": \"Breitenberg\",\n    \"age\": 30\n  },\n  {\n    \"id\": 928,\n    \"firstName\": \"Casimir\",\n    \"lastName\": \"Volkman\",\n    \"age\": 15\n  },\n  {\n    \"id\": 929,\n    \"firstName\": \"Otilia\",\n    \"lastName\": \"Littel\",\n    \"age\": 14\n  },\n  {\n    \"id\": 930,\n    \"firstName\": \"Curtis\",\n    \"lastName\": \"Hand\",\n    \"age\": 35\n  },\n  {\n    \"id\": 931,\n    \"firstName\": \"Misael\",\n    \"lastName\": \"Kling\",\n    \"age\": 29\n  },\n  {\n    \"id\": 932,\n    \"firstName\": \"Laurianne\",\n    \"lastName\": \"Sipes\",\n    \"age\": 25\n  },\n  {\n    \"id\": 933,\n    \"firstName\": \"Jennifer\",\n    \"lastName\": \"Ortiz\",\n    \"age\": 9\n  },\n  {\n    \"id\": 934,\n    \"firstName\": \"Audreanne\",\n    \"lastName\": \"Schamberger\",\n    \"age\": 1\n  },\n  {\n    \"id\": 935,\n    \"firstName\": \"Kiel\",\n    \"lastName\": \"Bernier\",\n    \"age\": 26\n  },\n  {\n    \"id\": 936,\n    \"firstName\": \"Aglae\",\n    \"lastName\": \"Osinski\",\n    \"age\": 0\n  },\n  {\n    \"id\": 937,\n    \"firstName\": \"Tod\",\n    \"lastName\": \"Kuhlman\",\n    \"age\": 20\n  },\n  {\n    \"id\": 938,\n    \"firstName\": \"Verner\",\n    \"lastName\": \"Hartmann\",\n    \"age\": 17\n  },\n  {\n    \"id\": 939,\n    \"firstName\": \"Jessyca\",\n    \"lastName\": \"Schamberger\",\n    \"age\": 12\n  },\n  {\n    \"id\": 940,\n    \"firstName\": \"Ludwig\",\n    \"lastName\": \"Hoppe\",\n    \"age\": 38\n  },\n  {\n    \"id\": 941,\n    \"firstName\": \"Ozella\",\n    \"lastName\": \"Kozey\",\n    \"age\": 19\n  },\n  {\n    \"id\": 942,\n    \"firstName\": \"Rebeka\",\n    \"lastName\": \"Ledner\",\n    \"age\": 7\n  },\n  {\n    \"id\": 943,\n    \"firstName\": \"Lane\",\n    \"lastName\": \"Ratke\",\n    \"age\": 26\n  },\n  {\n    \"id\": 944,\n    \"firstName\": \"Ashtyn\",\n    \"lastName\": \"Beer\",\n    \"age\": 21\n  },\n  {\n    \"id\": 945,\n    \"firstName\": \"Jessyca\",\n    \"lastName\": \"Baumbach\",\n    \"age\": 17\n  },\n  {\n    \"id\": 946,\n    \"firstName\": \"Jorge\",\n    \"lastName\": \"Roberts\",\n    \"age\": 38\n  },\n  {\n    \"id\": 947,\n    \"firstName\": \"Jacey\",\n    \"lastName\": \"Zboncak\",\n    \"age\": 18\n  },\n  {\n    \"id\": 948,\n    \"firstName\": \"Demarco\",\n    \"lastName\": \"Nicolas\",\n    \"age\": 4\n  },\n  {\n    \"id\": 949,\n    \"firstName\": \"Nathan\",\n    \"lastName\": \"Mueller\",\n    \"age\": 21\n  },\n  {\n    \"id\": 950,\n    \"firstName\": \"Francis\",\n    \"lastName\": \"Grimes\",\n    \"age\": 26\n  },\n  {\n    \"id\": 951,\n    \"firstName\": \"Eloisa\",\n    \"lastName\": \"Nicolas\",\n    \"age\": 37\n  },\n  {\n    \"id\": 952,\n    \"firstName\": \"Harley\",\n    \"lastName\": \"Pfannerstill\",\n    \"age\": 2\n  },\n  {\n    \"id\": 953,\n    \"firstName\": \"Gabrielle\",\n    \"lastName\": \"Lockman-Conroy\",\n    \"age\": 8\n  },\n  {\n    \"id\": 954,\n    \"firstName\": \"Ignacio\",\n    \"lastName\": \"Abernathy\",\n    \"age\": 12\n  },\n  {\n    \"id\": 955,\n    \"firstName\": \"Lexi\",\n    \"lastName\": \"Toy\",\n    \"age\": 17\n  },\n  {\n    \"id\": 956,\n    \"firstName\": \"Marietta\",\n    \"lastName\": \"Jones\",\n    \"age\": 40\n  },\n  {\n    \"id\": 957,\n    \"firstName\": \"Eliane\",\n    \"lastName\": \"Roob\",\n    \"age\": 40\n  },\n  {\n    \"id\": 958,\n    \"firstName\": \"Milan\",\n    \"lastName\": \"Corkery\",\n    \"age\": 10\n  },\n  {\n    \"id\": 959,\n    \"firstName\": \"Hubert\",\n    \"lastName\": \"D'Amore\",\n    \"age\": 36\n  },\n  {\n    \"id\": 960,\n    \"firstName\": \"Alison\",\n    \"lastName\": \"Koelpin\",\n    \"age\": 2\n  },\n  {\n    \"id\": 961,\n    \"firstName\": \"Garrick\",\n    \"lastName\": \"Buckridge\",\n    \"age\": 23\n  },\n  {\n    \"id\": 962,\n    \"firstName\": \"Maynard\",\n    \"lastName\": \"Ruecker\",\n    \"age\": 30\n  },\n  {\n    \"id\": 963,\n    \"firstName\": \"Charles\",\n    \"lastName\": \"Skiles\",\n    \"age\": 7\n  },\n  {\n    \"id\": 964,\n    \"firstName\": \"Jules\",\n    \"lastName\": \"Lindgren\",\n    \"age\": 13\n  },\n  {\n    \"id\": 965,\n    \"firstName\": \"Shawn\",\n    \"lastName\": \"Stokes\",\n    \"age\": 14\n  },\n  {\n    \"id\": 966,\n    \"firstName\": \"Morgan\",\n    \"lastName\": \"Connelly\",\n    \"age\": 15\n  },\n  {\n    \"id\": 967,\n    \"firstName\": \"Mary\",\n    \"lastName\": \"Schmidt\",\n    \"age\": 33\n  },\n  {\n    \"id\": 968,\n    \"firstName\": \"Halie\",\n    \"lastName\": \"Emmerich\",\n    \"age\": 40\n  },\n  {\n    \"id\": 969,\n    \"firstName\": \"Aubrey\",\n    \"lastName\": \"Lynch\",\n    \"age\": 31\n  },\n  {\n    \"id\": 970,\n    \"firstName\": \"Angelita\",\n    \"lastName\": \"Blanda-Torphy\",\n    \"age\": 13\n  },\n  {\n    \"id\": 971,\n    \"firstName\": \"Hilbert\",\n    \"lastName\": \"Botsford\",\n    \"age\": 31\n  },\n  {\n    \"id\": 972,\n    \"firstName\": \"Shakira\",\n    \"lastName\": \"Jakubowski\",\n    \"age\": 37\n  },\n  {\n    \"id\": 973,\n    \"firstName\": \"Montana\",\n    \"lastName\": \"Marvin\",\n    \"age\": 31\n  },\n  {\n    \"id\": 974,\n    \"firstName\": \"Eino\",\n    \"lastName\": \"Wunsch\",\n    \"age\": 25\n  },\n  {\n    \"id\": 975,\n    \"firstName\": \"Quinten\",\n    \"lastName\": \"Berge\",\n    \"age\": 14\n  },\n  {\n    \"id\": 976,\n    \"firstName\": \"Napoleon\",\n    \"lastName\": \"Luettgen\",\n    \"age\": 13\n  },\n  {\n    \"id\": 977,\n    \"firstName\": \"Arno\",\n    \"lastName\": \"Pagac\",\n    \"age\": 25\n  },\n  {\n    \"id\": 978,\n    \"firstName\": \"Kaden\",\n    \"lastName\": \"Mertz\",\n    \"age\": 3\n  },\n  {\n    \"id\": 979,\n    \"firstName\": \"Frank\",\n    \"lastName\": \"Jakubowski\",\n    \"age\": 16\n  },\n  {\n    \"id\": 980,\n    \"firstName\": \"Elissa\",\n    \"lastName\": \"Skiles\",\n    \"age\": 35\n  },\n  {\n    \"id\": 981,\n    \"firstName\": \"Reinhold\",\n    \"lastName\": \"Leannon\",\n    \"age\": 4\n  },\n  {\n    \"id\": 982,\n    \"firstName\": \"Kurtis\",\n    \"lastName\": \"Dare\",\n    \"age\": 35\n  },\n  {\n    \"id\": 983,\n    \"firstName\": \"Tyrel\",\n    \"lastName\": \"Stiedemann\",\n    \"age\": 9\n  },\n  {\n    \"id\": 984,\n    \"firstName\": \"Turner\",\n    \"lastName\": \"Connelly\",\n    \"age\": 18\n  },\n  {\n    \"id\": 985,\n    \"firstName\": \"Katherine\",\n    \"lastName\": \"Stamm\",\n    \"age\": 19\n  },\n  {\n    \"id\": 986,\n    \"firstName\": \"Buck\",\n    \"lastName\": \"Runolfsdottir\",\n    \"age\": 19\n  },\n  {\n    \"id\": 987,\n    \"firstName\": \"Gerald\",\n    \"lastName\": \"Gibson\",\n    \"age\": 33\n  },\n  {\n    \"id\": 988,\n    \"firstName\": \"Janie\",\n    \"lastName\": \"Jacobson\",\n    \"age\": 2\n  },\n  {\n    \"id\": 989,\n    \"firstName\": \"Collin\",\n    \"lastName\": \"Heller\",\n    \"age\": 9\n  },\n  {\n    \"id\": 990,\n    \"firstName\": \"Merlin\",\n    \"lastName\": \"Crist\",\n    \"age\": 34\n  },\n  {\n    \"id\": 991,\n    \"firstName\": \"Rachael\",\n    \"lastName\": \"Quigley\",\n    \"age\": 0\n  },\n  {\n    \"id\": 992,\n    \"firstName\": \"Letha\",\n    \"lastName\": \"Greenholt\",\n    \"age\": 6\n  },\n  {\n    \"id\": 993,\n    \"firstName\": \"Elvis\",\n    \"lastName\": \"Willms\",\n    \"age\": 25\n  },\n  {\n    \"id\": 994,\n    \"firstName\": \"Sherwood\",\n    \"lastName\": \"Johnson\",\n    \"age\": 12\n  },\n  {\n    \"id\": 995,\n    \"firstName\": \"Ana\",\n    \"lastName\": \"Koch\",\n    \"age\": 33\n  }\n]\n"
  },
  {
    "path": "examples/react/with-tanstack-router/src/api/types.ts",
    "content": "import type { PaginationState } from '@tanstack/react-table'\n\nexport type PaginatedData<T> = {\n  result: Array<T>\n  rowCount: number\n}\n\nexport type PaginationParams = PaginationState\nexport type SortParams = { sortBy: `${string}.${'asc' | 'desc'}` }\nexport type Filters<T> = Partial<T & PaginationParams & SortParams>\n"
  },
  {
    "path": "examples/react/with-tanstack-router/src/api/user.ts",
    "content": "import { faker } from '@faker-js/faker'\nimport type { Filters, PaginatedData } from './types'\n\nconst DEFAULT_PAGE = 0\nconst DEFAULT_PAGE_SIZE = 10\n\nexport type User = {\n  id: number\n  firstName: string\n  lastName: string\n  age: number\n}\n\nexport type UserFilters = Filters<User>\n\nfunction makeData(amount: number): Array<User> {\n  return Array(amount)\n    .fill(0)\n    .map((_, index) => {\n      return {\n        id: index + 1,\n        firstName: faker.person.firstName(),\n        lastName: faker.person.lastName(),\n        age: faker.number.int(40),\n      }\n    })\n}\n\nconst data = makeData(1000)\n\nexport async function fetchUsers(\n  filtersAndPagination: UserFilters,\n): Promise<PaginatedData<User>> {\n  console.log('fetchUsers', filtersAndPagination)\n  const {\n    pageIndex = DEFAULT_PAGE,\n    pageSize = DEFAULT_PAGE_SIZE,\n    sortBy,\n    ...filters\n  } = filtersAndPagination\n  const requestedData = data.slice()\n\n  if (sortBy) {\n    const [field, order] = sortBy.split('.')\n    requestedData.sort((a, b) => {\n      const aValue = a[field as keyof User]\n      const bValue = b[field as keyof User]\n\n      if (aValue === bValue) return 0\n      if (order === 'asc') return aValue > bValue ? 1 : -1\n      return aValue < bValue ? 1 : -1\n    })\n  }\n\n  const filteredData = requestedData.filter((user) => {\n    return Object.keys(filters).every((key) => {\n      const filter = filters[key as keyof User]\n      if (filter === undefined || filter === '') return true\n\n      const value = user[key as keyof User]\n      if (typeof value === 'number') return value === +filter\n\n      return value.toLowerCase().includes(`${filter}`.toLowerCase())\n    })\n  })\n\n  await new Promise((resolve) => setTimeout(resolve, 100))\n\n  return {\n    result: filteredData.slice(\n      pageIndex * pageSize,\n      (pageIndex + 1) * pageSize,\n    ),\n    rowCount: filteredData.length,\n  }\n}\n"
  },
  {
    "path": "examples/react/with-tanstack-router/src/components/debouncedInput.tsx",
    "content": "import { useEffect, useState } from 'react'\nimport type { InputHTMLAttributes } from 'react'\n\nexport function DebouncedInput({\n  value: initialValue,\n  onChange,\n  debounce = 200,\n  ...props\n}: {\n  value: string | number\n  onChange: (value: string | number) => void\n  debounce?: number\n} & Omit<InputHTMLAttributes<HTMLInputElement>, 'onChange'>) {\n  const [value, setValue] = useState<string | number>(initialValue)\n\n  useEffect(() => {\n    setValue(initialValue)\n  }, [initialValue])\n\n  useEffect(() => {\n    const timeout = setTimeout(() => {\n      onChange(value)\n    }, debounce)\n\n    return () => clearTimeout(timeout)\n  }, [value])\n\n  return (\n    <input\n      {...props}\n      value={value}\n      onChange={(e) => {\n        if (e.target.value === '') return setValue('')\n        if (props.type === 'number') {\n          setValue(e.target.valueAsNumber)\n        } else {\n          setValue(e.target.value)\n        }\n      }}\n    />\n  )\n}\n"
  },
  {
    "path": "examples/react/with-tanstack-router/src/components/table.tsx",
    "content": "import {\n  columnFilteringFeature,\n  rowPaginationFeature,\n  rowSelectionFeature,\n  rowSortingFeature,\n  tableFeatures,\n  useTable,\n} from '@tanstack/react-table'\nimport { useEffect } from 'react'\nimport { DebouncedInput } from './debouncedInput'\nimport type {\n  ColumnDef,\n  OnChangeFn,\n  PaginationState,\n  SortingState,\n  TableOptions_RowPagination,\n} from '@tanstack/react-table'\nimport type { Filters } from '../api/types'\n\nexport const _features = tableFeatures({\n  columnFilteringFeature,\n  rowPaginationFeature,\n  rowSelectionFeature,\n  rowSortingFeature,\n})\n\nexport const DEFAULT_PAGE_INDEX = 0\nexport const DEFAULT_PAGE_SIZE = 10\n\ntype Props<TData extends Record<string, string | number>> = {\n  data: Array<TData>\n  columns: Array<ColumnDef<typeof _features, TData>>\n  pagination: PaginationState\n  paginationOptions: Pick<\n    TableOptions_RowPagination,\n    'onPaginationChange' | 'rowCount'\n  >\n  filters: Filters<TData>\n  onFilterChange: (dataFilters: Partial<TData>) => void\n  sorting: SortingState\n  onSortingChange: OnChangeFn<SortingState>\n}\n\nexport default function Table<T extends Record<string, string | number>>({\n  columns,\n  data,\n  filters,\n  onFilterChange,\n  onSortingChange,\n  pagination,\n  paginationOptions,\n  sorting,\n}: Props<T>) {\n  const table = useTable(\n    {\n      _features,\n      _rowModels: {}, // no client-side row models since we're doing server-side sorting, filtering, and pagination\n      columns,\n      data,\n      manualFiltering: true,\n      manualPagination: true,\n      manualSorting: true,\n      onSortingChange,\n      ...paginationOptions,\n    },\n    (state) => state,\n  )\n\n  // Sync controlled state with table store\n  useEffect(() => {\n    table.baseStore.setState((prev) => ({\n      ...prev,\n      pagination,\n      sorting,\n    }))\n  }, [table, pagination, sorting])\n\n  return (\n    <div>\n      <table>\n        <thead>\n          {table.getHeaderGroups().map((headerGroup) => (\n            <tr key={headerGroup.id}>\n              {headerGroup.headers.map((header) => {\n                const fieldMeta = header.column.columnDef.meta\n                return (\n                  <th key={header.id} colSpan={header.colSpan}>\n                    {header.isPlaceholder ? null : (\n                      <>\n                        <div\n                          className={\n                            header.column.getCanSort()\n                              ? 'cursor-pointer select-none'\n                              : ''\n                          }\n                          onClick={header.column.getToggleSortingHandler()}\n                        >\n                          <table.FlexRender header={header} />\n                          {{\n                            asc: ' 🔼',\n                            desc: ' 🔽',\n                            false: ' 🔃',\n                          }[header.column.getIsSorted() as string] ?? null}\n                        </div>\n                        {header.column.getCanFilter() &&\n                        fieldMeta?.filterKey !== undefined ? (\n                          <DebouncedInput\n                            className=\"w-36 border shadow rounded\"\n                            onChange={(value) => {\n                              onFilterChange({\n                                [fieldMeta.filterKey as keyof T]: value,\n                              } as Partial<T>)\n                            }}\n                            placeholder=\"Search...\"\n                            type={\n                              fieldMeta.filterVariant === 'number'\n                                ? 'number'\n                                : 'text'\n                            }\n                            value={filters[fieldMeta.filterKey] ?? ''}\n                          />\n                        ) : null}\n                      </>\n                    )}\n                  </th>\n                )\n              })}\n            </tr>\n          ))}\n        </thead>\n        <tbody>\n          {table.getRowModel().rows.map((row) => {\n            return (\n              <tr key={row.id}>\n                {row.getAllCells().map((cell) => {\n                  return (\n                    <td key={cell.id}>\n                      <table.FlexRender cell={cell} />\n                    </td>\n                  )\n                })}\n              </tr>\n            )\n          })}\n        </tbody>\n      </table>\n      <div className=\"flex items-center gap-2 my-2\">\n        <button\n          className=\"border rounded p-1 disabled:text-gray-500 disabled:cursor-not-allowed\"\n          onClick={() => table.setPageIndex(0)}\n          disabled={!table.getCanPreviousPage()}\n        >\n          {'<<'}\n        </button>\n        <button\n          className=\"border rounded p-1 disabled:text-gray-500 disabled:cursor-not-allowed\"\n          onClick={() => table.previousPage()}\n          disabled={!table.getCanPreviousPage()}\n        >\n          {'<'}\n        </button>\n        <button\n          className=\"border rounded p-1 disabled:text-gray-500 disabled:cursor-not-allowed\"\n          onClick={() => table.nextPage()}\n          disabled={!table.getCanNextPage()}\n        >\n          {'>'}\n        </button>\n        <button\n          className=\"border rounded p-1 disabled:text-gray-500 disabled:cursor-not-allowed\"\n          onClick={() => table.setPageIndex(table.getPageCount() - 1)}\n          disabled={!table.getCanNextPage()}\n        >\n          {'>>'}\n        </button>\n        <span className=\"flex items-center gap-1\">\n          <div>Page</div>\n          <strong>\n            {table.store.state.pagination.pageIndex + 1} of{' '}\n            {table.getPageCount()}\n          </strong>\n        </span>\n        <span className=\"flex items-center gap-1\">\n          | Go to page:\n          <input\n            type=\"number\"\n            value={table.store.state.pagination.pageIndex + 1}\n            onChange={(e) => {\n              const page = e.target.value ? Number(e.target.value) - 1 : 0\n              table.setPageIndex(page)\n            }}\n            className=\"border p-1 rounded w-16\"\n          />\n        </span>\n        <select\n          value={table.store.state.pagination.pageSize}\n          onChange={(e) => {\n            table.setPageSize(Number(e.target.value))\n          }}\n        >\n          {[10, 20, 30, 40, 50].map((pageSize) => (\n            <option key={pageSize} value={pageSize}>\n              Show {pageSize}\n            </option>\n          ))}\n        </select>\n      </div>\n    </div>\n  )\n}\n"
  },
  {
    "path": "examples/react/with-tanstack-router/src/hooks/useFilters.ts",
    "content": "import { getRouteApi } from '@tanstack/react-router'\nimport { cleanEmptyParams } from '../utils/cleanEmptyParams'\nimport type { RegisteredRouter, RouteIds } from '@tanstack/react-router'\n\nexport function useFilters<T extends RouteIds<RegisteredRouter['routeTree']>>(\n  routeId: T,\n) {\n  const routeApi = getRouteApi<T>(routeId)\n  const navigate = routeApi.useNavigate()\n  const filters = routeApi.useSearch()\n\n  const setFilters = (partialFilters: Partial<typeof filters>) =>\n    navigate({\n      search: (prev) => cleanEmptyParams({ ...prev, ...partialFilters }),\n      replace: true,\n    } as Parameters<typeof navigate>[0])\n\n  const resetFilters = () => {\n    navigate({\n      search: {},\n      replace: true,\n    } as Parameters<typeof navigate>[0])\n  }\n\n  return { filters, setFilters, resetFilters }\n}\n"
  },
  {
    "path": "examples/react/with-tanstack-router/src/index.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n"
  },
  {
    "path": "examples/react/with-tanstack-router/src/main.tsx",
    "content": "import React from 'react'\nimport ReactDOM from 'react-dom/client'\nimport App from './App'\nimport './index.css'\n\nconst rootElement = document.getElementById('root')\nif (!rootElement) throw new Error('Failed to find the root element')\n\nReactDOM.createRoot(rootElement).render(\n  <React.StrictMode>\n    <App />\n  </React.StrictMode>,\n)\n"
  },
  {
    "path": "examples/react/with-tanstack-router/src/routeTree.gen.ts",
    "content": "/* eslint-disable */\n\n// @ts-nocheck\n\n// noinspection JSUnusedGlobalSymbols\n\n// This file was automatically generated by TanStack Router.\n// You should NOT make any changes in this file as it will be overwritten.\n// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.\n\nimport { Route as rootRouteImport } from './routes/__root'\nimport { Route as AnotherRouteRouteImport } from './routes/anotherRoute'\nimport { Route as IndexRouteImport } from './routes/index'\n\nconst AnotherRouteRoute = AnotherRouteRouteImport.update({\n  id: '/anotherRoute',\n  path: '/anotherRoute',\n  getParentRoute: () => rootRouteImport,\n} as any)\nconst IndexRoute = IndexRouteImport.update({\n  id: '/',\n  path: '/',\n  getParentRoute: () => rootRouteImport,\n} as any)\n\nexport interface FileRoutesByFullPath {\n  '/': typeof IndexRoute\n  '/anotherRoute': typeof AnotherRouteRoute\n}\nexport interface FileRoutesByTo {\n  '/': typeof IndexRoute\n  '/anotherRoute': typeof AnotherRouteRoute\n}\nexport interface FileRoutesById {\n  __root__: typeof rootRouteImport\n  '/': typeof IndexRoute\n  '/anotherRoute': typeof AnotherRouteRoute\n}\nexport interface FileRouteTypes {\n  fileRoutesByFullPath: FileRoutesByFullPath\n  fullPaths: '/' | '/anotherRoute'\n  fileRoutesByTo: FileRoutesByTo\n  to: '/' | '/anotherRoute'\n  id: '__root__' | '/' | '/anotherRoute'\n  fileRoutesById: FileRoutesById\n}\nexport interface RootRouteChildren {\n  IndexRoute: typeof IndexRoute\n  AnotherRouteRoute: typeof AnotherRouteRoute\n}\n\ndeclare module '@tanstack/react-router' {\n  interface FileRoutesByPath {\n    '/anotherRoute': {\n      id: '/anotherRoute'\n      path: '/anotherRoute'\n      fullPath: '/anotherRoute'\n      preLoaderRoute: typeof AnotherRouteRouteImport\n      parentRoute: typeof rootRouteImport\n    }\n    '/': {\n      id: '/'\n      path: '/'\n      fullPath: '/'\n      preLoaderRoute: typeof IndexRouteImport\n      parentRoute: typeof rootRouteImport\n    }\n  }\n}\n\nconst rootRouteChildren: RootRouteChildren = {\n  IndexRoute: IndexRoute,\n  AnotherRouteRoute: AnotherRouteRoute,\n}\nexport const routeTree = rootRouteImport\n  ._addFileChildren(rootRouteChildren)\n  ._addFileTypes<FileRouteTypes>()\n"
  },
  {
    "path": "examples/react/with-tanstack-router/src/routes/__root.tsx",
    "content": "import { Outlet, createRootRoute } from '@tanstack/react-router'\n\nexport const Route = createRootRoute({\n  component: Outlet,\n})\n"
  },
  {
    "path": "examples/react/with-tanstack-router/src/routes/anotherRoute.tsx",
    "content": "import { createFileRoute } from '@tanstack/react-router'\n\n// This just exists to validate types are working\nexport const Route = createFileRoute('/anotherRoute')({\n  validateSearch: () => ({}) as { foo: string; bar: number },\n})\n"
  },
  {
    "path": "examples/react/with-tanstack-router/src/routes/index.tsx",
    "content": "import { keepPreviousData, useQuery } from '@tanstack/react-query'\nimport { createFileRoute } from '@tanstack/react-router'\nimport { useMemo } from 'react'\nimport { fetchUsers } from '../api/user'\nimport Table, {\n  DEFAULT_PAGE_INDEX,\n  DEFAULT_PAGE_SIZE,\n} from '../components/table'\nimport { useFilters } from '../hooks/useFilters'\nimport { sortByToState, stateToSortBy } from '../utils/tableSortMapper'\nimport { USER_COLUMNS } from '../utils/userColumns'\nimport type { UserFilters } from '../api/user'\n\nexport const Route = createFileRoute('/')({\n  component: UsersPage,\n  validateSearch: () => ({}) as UserFilters,\n})\n\nfunction UsersPage() {\n  const { filters, resetFilters, setFilters } = useFilters(Route.fullPath)\n\n  const { data } = useQuery({\n    queryKey: ['users', filters],\n    queryFn: () => fetchUsers(filters),\n    placeholderData: keepPreviousData,\n  })\n\n  const paginationState = {\n    pageIndex: filters.pageIndex ?? DEFAULT_PAGE_INDEX,\n    pageSize: filters.pageSize ?? DEFAULT_PAGE_SIZE,\n  }\n  const sortingState = sortByToState(filters.sortBy)\n  const columns = useMemo(() => USER_COLUMNS, [])\n\n  return (\n    <div className=\"flex flex-col gap-2 p-2\">\n      <h1 className=\"text-2xl font-semibold mb-1\">\n        TanStack Table + Query + Router\n      </h1>\n      <Table\n        data={data?.result ?? []}\n        columns={columns}\n        pagination={paginationState}\n        paginationOptions={{\n          onPaginationChange: (pagination) => {\n            setFilters(\n              typeof pagination === 'function'\n                ? pagination(paginationState)\n                : pagination,\n            )\n          },\n          rowCount: data?.rowCount,\n        }}\n        filters={filters}\n        onFilterChange={(filters) =>\n          setFilters({ ...filters, pageIndex: DEFAULT_PAGE_INDEX })\n        }\n        sorting={sortingState}\n        onSortingChange={(updaterOrValue) => {\n          const newSortingState =\n            typeof updaterOrValue === 'function'\n              ? updaterOrValue(sortingState)\n              : updaterOrValue\n          return setFilters({\n            sortBy: stateToSortBy(newSortingState),\n            pageIndex: DEFAULT_PAGE_INDEX,\n          })\n        }}\n      />\n      <div className=\"flex items-center gap-2\">\n        {data?.rowCount} users found\n        <button\n          className=\"border rounded p-1 disabled:text-gray-500 disabled:cursor-not-allowed\"\n          onClick={resetFilters}\n          disabled={Object.keys(filters).length === 0}\n        >\n          Reset Filters\n        </button>\n      </div>\n      <pre>{JSON.stringify(filters, null, 2)}</pre>\n    </div>\n  )\n}\n"
  },
  {
    "path": "examples/react/with-tanstack-router/src/utils/cleanEmptyParams.ts",
    "content": "import { DEFAULT_PAGE_INDEX, DEFAULT_PAGE_SIZE } from '../components/table'\n\nexport const cleanEmptyParams = <T extends Record<string, unknown>>(\n  search: T,\n): T => {\n  const newSearch = { ...search }\n  Object.keys(newSearch).forEach((key) => {\n    const value = newSearch[key]\n    if (\n      value === undefined ||\n      value === '' ||\n      (typeof value === 'number' && isNaN(value))\n    )\n      delete newSearch[key]\n  })\n\n  if (search.pageIndex === DEFAULT_PAGE_INDEX) delete newSearch.pageIndex\n  if (search.pageSize === DEFAULT_PAGE_SIZE) delete newSearch.pageSize\n\n  return newSearch\n}\n"
  },
  {
    "path": "examples/react/with-tanstack-router/src/utils/tableSortMapper.ts",
    "content": "import type { SortingState } from '@tanstack/react-table'\nimport type { SortParams } from '../api/types'\n\nexport const stateToSortBy = (sorting: SortingState | undefined) => {\n  if (!sorting || sorting.length == 0) return undefined\n\n  const sort = sorting[0]\n\n  return `${sort.id}.${sort.desc ? 'desc' : 'asc'}` as const\n}\n\nexport const sortByToState = (sortBy: SortParams['sortBy'] | undefined) => {\n  if (!sortBy) return []\n\n  const [id, desc] = sortBy.split('.')\n  return [{ id, desc: desc === 'desc' }]\n}\n"
  },
  {
    "path": "examples/react/with-tanstack-router/src/utils/userColumns.tsx",
    "content": "import type {\n  CellData,\n  ColumnDef,\n  RowData,\n  TableFeatures,\n} from '@tanstack/react-table'\nimport type { User } from '../api/user'\n\ndeclare module '@tanstack/react-table' {\n  interface ColumnMeta<\n    TFeatures extends TableFeatures,\n    TData extends RowData,\n    TValue extends CellData = CellData,\n  > {\n    filterKey?: keyof TData\n    filterVariant?: 'text' | 'number'\n  }\n}\n\nexport const USER_COLUMNS: Array<ColumnDef<any, User>> = [\n  {\n    accessorKey: 'id',\n    header: () => <span>ID</span>,\n    meta: { filterKey: 'id', filterVariant: 'number' },\n  },\n  {\n    accessorKey: 'firstName',\n    header: () => <span>First Name</span>,\n    meta: { filterKey: 'firstName' },\n  },\n  {\n    accessorKey: 'lastName',\n    header: () => <span>Last Name</span>,\n    meta: { filterKey: 'lastName' },\n  },\n  {\n    accessorKey: 'age',\n    header: () => 'Age',\n    meta: { filterKey: 'age', filterVariant: 'number' },\n  },\n]\n"
  },
  {
    "path": "examples/react/with-tanstack-router/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"module\": \"ESNext\",\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"react-jsx\",\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "examples/react/with-tanstack-router/vite.config.js",
    "content": "import { defineConfig } from 'vite'\nimport react from '@vitejs/plugin-react'\nimport rollupReplace from '@rollup/plugin-replace'\nimport { TanStackRouterVite } from '@tanstack/router-vite-plugin'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [\n    rollupReplace({\n      preventAssignment: true,\n      values: {\n        __DEV__: JSON.stringify(true),\n        'process.env.NODE_ENV': JSON.stringify('development'),\n      },\n    }),\n    react(),\n    TanStackRouterVite(),\n  ],\n})\n"
  },
  {
    "path": "examples/solid/basic-app-table/.gitignore",
    "content": "node_modules\ndist"
  },
  {
    "path": "examples/solid/basic-app-table/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run start` or `yarn start`\n"
  },
  {
    "path": "examples/solid/basic-app-table/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"utf-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n    <meta name=\"theme-color\" content=\"#000000\" />\n    <link rel=\"shortcut icon\" type=\"image/ico\" href=\"/src/assets/favicon.ico\" />\n    <title>Solid App</title>\n  </head>\n  <body>\n    <noscript>You need to enable JavaScript to run this app.</noscript>\n    <div id=\"root\"></div>\n\n    <script src=\"/src/index.tsx\" type=\"module\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/solid/basic-app-table/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-solid-basic-app-table\",\n  \"version\": \"0.0.0\",\n  \"description\": \"\",\n  \"scripts\": {\n    \"start\": \"vite\",\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"lint\": \"eslint ./src\"\n  },\n  \"license\": \"MIT\",\n  \"devDependencies\": {\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\",\n    \"vite-plugin-solid\": \"^2.11.10\"\n  },\n  \"dependencies\": {\n    \"@tanstack/solid-table\": \"^9.0.0-alpha.10\",\n    \"solid-js\": \"^1.9.11\"\n  }\n}\n"
  },
  {
    "path": "examples/solid/basic-app-table/src/App.tsx",
    "content": "import { createTableHook } from '@tanstack/solid-table'\nimport { For, createSignal } from 'solid-js'\n\n// This example uses the new `createTableHook` method to create a re-usable table hook factory instead of independently using the standalone `useTable` hook and `createColumnHelper` method. You can choose to use either way.\n\n// 1. Define what the shape of your data will be for each row\ntype Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  status: string\n  progress: number\n}\n\n// 2. Create some dummy data with a stable reference (this could be an API response stored in useState or similar)\nconst defaultData: Array<Person> = [\n  {\n    firstName: 'tanner',\n    lastName: 'linsley',\n    age: 24,\n    visits: 100,\n    status: 'In Relationship',\n    progress: 50,\n  },\n  {\n    firstName: 'tandy',\n    lastName: 'miller',\n    age: 40,\n    visits: 40,\n    status: 'Single',\n    progress: 80,\n  },\n  {\n    firstName: 'joe',\n    lastName: 'dirte',\n    age: 45,\n    visits: 20,\n    status: 'Complicated',\n    progress: 10,\n  },\n  {\n    firstName: 'kevin',\n    lastName: 'vandy',\n    age: 28,\n    visits: 100,\n    status: 'Single',\n    progress: 70,\n  },\n]\n\n// 3. New in V9! Tell the table which features and row models we want to use. In this case, this will be a basic table with no additional features\nconst { createAppTable, createAppColumnHelper } = createTableHook({\n  _features: {},\n  _rowModels: {}, // client-side row models. `Core` row model is now included by default, but you can still override it here\n  debugTable: true,\n})\n\n// 4. Create a helper object to help define our columns\nconst columnHelper = createAppColumnHelper<Person>()\n\n// 5. Define the columns for your table with a stable reference (in this case, defined statically outside of a react component)\nconst columns = columnHelper.columns([\n  // accessorKey method (most common for simple use-cases)\n  columnHelper.accessor('firstName', {\n    cell: (info) => info.getValue(),\n    footer: (info) => info.column.id,\n  }),\n  // accessorFn used (alternative) along with a custom id\n  columnHelper.accessor((row) => row.lastName, {\n    id: 'lastName',\n    cell: (info) => <i>{info.getValue()}</i>,\n    header: () => <span>Last Name</span>,\n    footer: (info) => info.column.id,\n  }),\n  // accessorFn used to transform the data\n  columnHelper.accessor((row) => Number(row.age), {\n    id: 'age',\n    header: () => 'Age',\n    cell: (info) => info.renderValue(),\n    footer: (info) => info.column.id,\n  }),\n  columnHelper.accessor('visits', {\n    header: () => <span>Visits</span>,\n    footer: (info) => info.column.id,\n  }),\n  columnHelper.accessor('status', {\n    header: 'Status',\n    footer: (info) => info.column.id,\n  }),\n  columnHelper.accessor('progress', {\n    header: 'Profile Progress',\n    footer: (info) => info.column.id,\n  }),\n])\n\nexport function App() {\n  // 6. Store data with a stable reference\n  const [data, setData] = createSignal([...defaultData])\n\n  // Helper to rerender with sorted data (by age ascending)\n  function rerender() {\n    setData((prev) =>\n      prev.slice().sort((a: Person, b: Person) => a.age - b.age),\n    )\n  }\n\n  // 7. Create the table instance with the required columns and data.\n  // Features and row models are already defined in the createTableHook call above\n  const table = createAppTable({\n    columns,\n    get data() {\n      return data()\n    },\n    // add additional table options here or in the createTableHook call above\n  })\n\n  // 8. Render your table markup from the table instance APIs\n  return (\n    <div class=\"p-2\">\n      <table>\n        <thead>\n          <For each={table.getHeaderGroups()}>\n            {(headerGroup) => (\n              <tr>\n                <For each={headerGroup.headers}>\n                  {(header) => (\n                    <th>\n                      <table.FlexRender header={header} />\n                    </th>\n                  )}\n                </For>\n              </tr>\n            )}\n          </For>\n        </thead>\n        <tbody>\n          <For each={table.getRowModel().rows}>\n            {(row) => (\n              <tr>\n                <For each={row.getAllCells()}>\n                  {(cell) => (\n                    <td>\n                      <table.FlexRender cell={cell} />\n                    </td>\n                  )}\n                </For>\n              </tr>\n            )}\n          </For>\n        </tbody>\n        <tfoot>\n          <For each={table.getFooterGroups()}>\n            {(footerGroup) => (\n              <tr>\n                <For each={footerGroup.headers}>\n                  {(header) => (\n                    <th>\n                      <table.FlexRender footer={header} />\n                    </th>\n                  )}\n                </For>\n              </tr>\n            )}\n          </For>\n        </tfoot>\n      </table>\n      <div class=\"h-4\" />\n      <button onClick={rerender} class=\"border p-2\">\n        Rerender (sort by age)\n      </button>\n    </div>\n  )\n}\n"
  },
  {
    "path": "examples/solid/basic-app-table/src/index.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n"
  },
  {
    "path": "examples/solid/basic-app-table/src/index.tsx",
    "content": "import { render } from 'solid-js/web'\nimport './index.css'\nimport { App } from './App'\n\nrender(() => <App />, document.getElementById('root') as HTMLElement)\n"
  },
  {
    "path": "examples/solid/basic-app-table/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"module\": \"ESNext\",\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"preserve\",\n    \"jsxImportSource\": \"solid-js\",\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "examples/solid/basic-app-table/vite.config.ts",
    "content": "import { defineConfig } from 'vite'\nimport solidPlugin from 'vite-plugin-solid'\n\nexport default defineConfig({\n  plugins: [solidPlugin()],\n  build: {\n    target: 'esnext',\n    polyfillDynamicImport: false,\n  },\n})\n"
  },
  {
    "path": "examples/solid/basic-external-state/.gitignore",
    "content": "node_modules\ndist"
  },
  {
    "path": "examples/solid/basic-external-state/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run start` or `yarn start`\n"
  },
  {
    "path": "examples/solid/basic-external-state/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"utf-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n    <meta name=\"theme-color\" content=\"#000000\" />\n    <link rel=\"shortcut icon\" type=\"image/ico\" href=\"/src/assets/favicon.ico\" />\n    <title>Solid App</title>\n  </head>\n  <body>\n    <noscript>You need to enable JavaScript to run this app.</noscript>\n    <div id=\"root\"></div>\n\n    <script src=\"/src/index.tsx\" type=\"module\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/solid/basic-external-state/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-solid-basic-external-state\",\n  \"version\": \"0.0.0\",\n  \"description\": \"\",\n  \"scripts\": {\n    \"start\": \"vite\",\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"lint\": \"eslint ./src\"\n  },\n  \"license\": \"MIT\",\n  \"devDependencies\": {\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\",\n    \"vite-plugin-solid\": \"^2.11.10\"\n  },\n  \"dependencies\": {\n    \"@tanstack/solid-table\": \"^9.0.0-alpha.10\",\n    \"solid-js\": \"^1.9.11\"\n  }\n}\n"
  },
  {
    "path": "examples/solid/basic-external-state/src/App.tsx",
    "content": "import {\n  createColumnHelper,\n  createPaginatedRowModel,\n  createSortedRowModel,\n  flexRender,\n  rowPaginationFeature,\n  rowSortingFeature,\n  sortFns,\n  tableFeatures,\n  createTable,\n} from '@tanstack/solid-table'\nimport { For, createSignal } from 'solid-js'\nimport { makeData } from './makeData'\nimport type { PaginationState, SortingState } from '@tanstack/solid-table'\nimport type { Person } from './makeData'\n\nconst _features = tableFeatures({\n  rowPaginationFeature,\n  rowSortingFeature,\n})\n\nconst columnHelper = createColumnHelper<typeof _features, Person>()\n\nconst columns = columnHelper.columns([\n  columnHelper.accessor('firstName', {\n    header: 'First Name',\n    cell: (info) => info.getValue(),\n  }),\n  columnHelper.accessor('lastName', {\n    header: 'Last Name',\n    cell: (info) => info.getValue(),\n  }),\n  columnHelper.accessor('age', {\n    header: 'Age',\n  }),\n  columnHelper.accessor('visits', {\n    header: 'Visits',\n  }),\n  columnHelper.accessor('status', {\n    header: 'Status',\n  }),\n  columnHelper.accessor('progress', {\n    header: 'Profile Progress',\n  }),\n])\n\nfunction App() {\n  const [data] = createSignal(makeData(1000))\n  const [sorting, setSorting] = createSignal<SortingState>([])\n  const [pagination, setPagination] = createSignal<PaginationState>({\n    pageIndex: 0,\n    pageSize: 10,\n  })\n\n  const table = createTable({\n    _features,\n    _rowModels: {\n      sortedRowModel: createSortedRowModel(sortFns),\n      paginatedRowModel: createPaginatedRowModel(),\n    },\n    columns,\n    get data() {\n      return data()\n    },\n    state: {\n      get sorting() {\n        return sorting()\n      },\n      get pagination() {\n        return pagination()\n      },\n    },\n    onSortingChange: setSorting,\n    onPaginationChange: setPagination,\n  })\n\n  return (\n    <div class=\"p-2\">\n      <table>\n        <thead>\n          <For each={table.getHeaderGroups()}>\n            {(headerGroup) => (\n              <tr>\n                <For each={headerGroup.headers}>\n                  {(header) => (\n                    <th colSpan={header.colSpan}>\n                      {header.isPlaceholder ? null : (\n                        <div\n                          class={\n                            header.column.getCanSort()\n                              ? 'cursor-pointer select-none'\n                              : ''\n                          }\n                          onClick={header.column.getToggleSortingHandler()}\n                        >\n                          {flexRender(\n                            header.column.columnDef.header,\n                            header.getContext(),\n                          )}\n                          {{\n                            asc: ' 🔼',\n                            desc: ' 🔽',\n                          }[header.column.getIsSorted() as string] ?? null}\n                        </div>\n                      )}\n                    </th>\n                  )}\n                </For>\n              </tr>\n            )}\n          </For>\n        </thead>\n        <tbody>\n          <For each={table.getRowModel().rows}>\n            {(row) => (\n              <tr>\n                <For each={row.getAllCells()}>\n                  {(cell) => (\n                    <td>\n                      {flexRender(\n                        cell.column.columnDef.cell,\n                        cell.getContext(),\n                      )}\n                    </td>\n                  )}\n                </For>\n              </tr>\n            )}\n          </For>\n        </tbody>\n      </table>\n      <div class=\"h-2\" />\n      <div class=\"flex items-center gap-2\">\n        <button\n          class=\"border rounded p-1\"\n          onClick={() => table.setPageIndex(0)}\n          disabled={!table.getCanPreviousPage()}\n        >\n          {'<<'}\n        </button>\n        <button\n          class=\"border rounded p-1\"\n          onClick={() => table.previousPage()}\n          disabled={!table.getCanPreviousPage()}\n        >\n          {'<'}\n        </button>\n        <button\n          class=\"border rounded p-1\"\n          onClick={() => table.nextPage()}\n          disabled={!table.getCanNextPage()}\n        >\n          {'>'}\n        </button>\n        <button\n          class=\"border rounded p-1\"\n          onClick={() => table.setPageIndex(table.getPageCount() - 1)}\n          disabled={!table.getCanNextPage()}\n        >\n          {'>>'}\n        </button>\n        <span class=\"flex items-center gap-1\">\n          <div>Page</div>\n          <strong>\n            {pagination().pageIndex + 1} of {table.getPageCount()}\n          </strong>\n        </span>\n        <span class=\"flex items-center gap-1\">\n          | Go to page:\n          <input\n            type=\"number\"\n            min=\"1\"\n            max={table.getPageCount()}\n            value={pagination().pageIndex + 1}\n            onInput={(e) => {\n              const page = e.currentTarget.value\n                ? Number(e.currentTarget.value) - 1\n                : 0\n              table.setPageIndex(page)\n            }}\n            class=\"border p-1 rounded w-16\"\n          />\n        </span>\n        <select\n          value={pagination().pageSize}\n          onChange={(e) => {\n            table.setPageSize(Number(e.currentTarget.value))\n          }}\n        >\n          {[10, 20, 30, 40, 50].map((pageSize) => (\n            <option value={pageSize}>Show {pageSize}</option>\n          ))}\n        </select>\n      </div>\n      <div class=\"h-4\" />\n      <pre>\n        {JSON.stringify(\n          { sorting: sorting(), pagination: pagination() },\n          null,\n          2,\n        )}\n      </pre>\n    </div>\n  )\n}\n\nexport default App\n"
  },
  {
    "path": "examples/solid/basic-external-state/src/index.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n"
  },
  {
    "path": "examples/solid/basic-external-state/src/index.tsx",
    "content": "/* @refresh reload */\nimport { render } from 'solid-js/web'\nimport './index.css'\nimport App from './App'\n\nrender(() => <App />, document.getElementById('root') as HTMLElement)\n"
  },
  {
    "path": "examples/solid/basic-external-state/src/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  subRows?: Array<Person>\n}\n\nconst range = (len: number) => {\n  const arr: Array<number> = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (): Person => {\n  return {\n    firstName: faker.person.firstName(),\n    lastName: faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: faker.number.int(1000),\n    progress: faker.number.int(100),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0],\n  }\n}\n\nexport function makeData(...lens: Array<number>) {\n  const makeDataLevel = (depth = 0): Array<Person> => {\n    const len = lens[depth]\n    return range(len).map((): Person => {\n      return {\n        ...newPerson(),\n        subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined,\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n"
  },
  {
    "path": "examples/solid/basic-external-state/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"module\": \"ESNext\",\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"preserve\",\n    \"jsxImportSource\": \"solid-js\",\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "examples/solid/basic-external-state/vite.config.ts",
    "content": "import { defineConfig } from 'vite'\nimport solidPlugin from 'vite-plugin-solid'\n\nexport default defineConfig({\n  plugins: [solidPlugin()],\n  build: {\n    target: 'esnext',\n    polyfillDynamicImport: false,\n  },\n})\n"
  },
  {
    "path": "examples/solid/basic-external-store/.gitignore",
    "content": "node_modules\ndist"
  },
  {
    "path": "examples/solid/basic-external-store/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run start` or `yarn start`\n"
  },
  {
    "path": "examples/solid/basic-external-store/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"utf-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n    <meta name=\"theme-color\" content=\"#000000\" />\n    <link rel=\"shortcut icon\" type=\"image/ico\" href=\"/src/assets/favicon.ico\" />\n    <title>Solid App</title>\n  </head>\n  <body>\n    <noscript>You need to enable JavaScript to run this app.</noscript>\n    <div id=\"root\"></div>\n\n    <script src=\"/src/index.tsx\" type=\"module\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/solid/basic-external-store/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-solid-basic-external-store\",\n  \"version\": \"0.0.0\",\n  \"description\": \"\",\n  \"scripts\": {\n    \"start\": \"vite\",\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"lint\": \"eslint ./src\"\n  },\n  \"license\": \"MIT\",\n  \"devDependencies\": {\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\",\n    \"vite-plugin-solid\": \"^2.11.10\"\n  },\n  \"dependencies\": {\n    \"@tanstack/solid-table\": \"^9.0.0-alpha.10\",\n    \"solid-js\": \"^1.9.11\"\n  }\n}\n"
  },
  {
    "path": "examples/solid/basic-external-store/src/App.tsx",
    "content": "import {\n  createColumnHelper,\n  createPaginatedRowModel,\n  createSortedRowModel,\n  createTable,\n  flexRender,\n  getInitialTableState,\n  rowPaginationFeature,\n  rowSortingFeature,\n  sortFns,\n  tableFeatures,\n} from '@tanstack/solid-table'\nimport { For, createSignal } from 'solid-js'\nimport { makeData } from './makeData'\nimport type { Person } from './makeData'\nimport type { PaginationState, SortingState } from '@tanstack/solid-table'\n\nconst _features = tableFeatures({\n  rowPaginationFeature,\n  rowSortingFeature,\n})\n\nconst columnHelper = createColumnHelper<typeof _features, Person>()\n\nconst columns = columnHelper.columns([\n  columnHelper.accessor('firstName', {\n    header: 'First Name',\n    cell: (info) => info.getValue(),\n  }),\n  columnHelper.accessor('lastName', {\n    header: 'Last Name',\n    cell: (info) => info.getValue(),\n  }),\n  columnHelper.accessor('age', {\n    header: 'Age',\n  }),\n  columnHelper.accessor('visits', {\n    header: 'Visits',\n  }),\n  columnHelper.accessor('status', {\n    header: 'Status',\n  }),\n  columnHelper.accessor('progress', {\n    header: 'Profile Progress',\n  }),\n])\n\nfunction App() {\n  const [data] = createSignal(makeData(1000))\n  const [tableState, setTableState] = createSignal(\n    getInitialTableState(_features, {\n      sorting: [] as SortingState,\n      pagination: { pageIndex: 0, pageSize: 10 } as PaginationState,\n    }),\n  )\n\n  const table = createTable({\n    _features,\n    _rowModels: {\n      sortedRowModel: createSortedRowModel(sortFns),\n      paginatedRowModel: createPaginatedRowModel(),\n    },\n    columns,\n    get data() {\n      return data()\n    },\n    state: {\n      get sorting() {\n        return tableState().sorting\n      },\n      get pagination() {\n        return tableState().pagination\n      },\n    },\n    onSortingChange: (updater) =>\n      setTableState((prev) => ({\n        ...prev,\n        sorting:\n          typeof updater === 'function' ? updater(prev.sorting) : updater,\n      })),\n    onPaginationChange: (updater) =>\n      setTableState((prev) => ({\n        ...prev,\n        pagination:\n          typeof updater === 'function' ? updater(prev.pagination) : updater,\n      })),\n    debugTable: true,\n  })\n\n  return (\n    <div class=\"p-2\">\n      <table>\n        <thead>\n          <For each={table.getHeaderGroups()}>\n            {(headerGroup) => (\n              <tr>\n                <For each={headerGroup.headers}>\n                  {(header) => (\n                    <th colSpan={header.colSpan}>\n                      {header.isPlaceholder ? null : (\n                        <div\n                          class={\n                            header.column.getCanSort()\n                              ? 'cursor-pointer select-none'\n                              : ''\n                          }\n                          onClick={header.column.getToggleSortingHandler()}\n                        >\n                          {flexRender(\n                            header.column.columnDef.header,\n                            header.getContext(),\n                          )}\n                          {{\n                            asc: ' 🔼',\n                            desc: ' 🔽',\n                          }[header.column.getIsSorted() as string] ?? null}\n                        </div>\n                      )}\n                    </th>\n                  )}\n                </For>\n              </tr>\n            )}\n          </For>\n        </thead>\n        <tbody>\n          <For each={table.getRowModel().rows}>\n            {(row) => (\n              <tr>\n                <For each={row.getAllCells()}>\n                  {(cell) => (\n                    <td>\n                      {flexRender(\n                        cell.column.columnDef.cell,\n                        cell.getContext(),\n                      )}\n                    </td>\n                  )}\n                </For>\n              </tr>\n            )}\n          </For>\n        </tbody>\n      </table>\n      <div class=\"h-2\" />\n      <div class=\"flex items-center gap-2\">\n        <button\n          class=\"border rounded p-1\"\n          onClick={() => table.setPageIndex(0)}\n          disabled={!table.getCanPreviousPage()}\n        >\n          {'<<'}\n        </button>\n        <button\n          class=\"border rounded p-1\"\n          onClick={() => table.previousPage()}\n          disabled={!table.getCanPreviousPage()}\n        >\n          {'<'}\n        </button>\n        <button\n          class=\"border rounded p-1\"\n          onClick={() => table.nextPage()}\n          disabled={!table.getCanNextPage()}\n        >\n          {'>'}\n        </button>\n        <button\n          class=\"border rounded p-1\"\n          onClick={() => table.setPageIndex(table.getPageCount() - 1)}\n          disabled={!table.getCanNextPage()}\n        >\n          {'>>'}\n        </button>\n        <span class=\"flex items-center gap-1\">\n          <div>Page</div>\n          <strong>\n            {tableState().pagination.pageIndex + 1} of {table.getPageCount()}\n          </strong>\n        </span>\n        <span class=\"flex items-center gap-1\">\n          | Go to page:\n          <input\n            type=\"number\"\n            min=\"1\"\n            max={table.getPageCount()}\n            value={tableState().pagination.pageIndex + 1}\n            onInput={(e) => {\n              const page = e.currentTarget.value\n                ? Number(e.currentTarget.value) - 1\n                : 0\n              table.setPageIndex(page)\n            }}\n            class=\"border p-1 rounded w-16\"\n          />\n        </span>\n        <select\n          value={tableState().pagination.pageSize}\n          onChange={(e) => {\n            table.setPageSize(Number(e.currentTarget.value))\n          }}\n        >\n          {[10, 20, 30, 40, 50].map((pageSize) => (\n            <option value={pageSize}>Show {pageSize}</option>\n          ))}\n        </select>\n      </div>\n      <div class=\"h-4\" />\n      <pre>{JSON.stringify(tableState(), null, 2)}</pre>\n    </div>\n  )\n}\n\nexport default App\n"
  },
  {
    "path": "examples/solid/basic-external-store/src/index.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n"
  },
  {
    "path": "examples/solid/basic-external-store/src/index.tsx",
    "content": "/* @refresh reload */\nimport { render } from 'solid-js/web'\nimport './index.css'\nimport App from './App'\n\nrender(() => <App />, document.getElementById('root') as HTMLElement)\n"
  },
  {
    "path": "examples/solid/basic-external-store/src/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  subRows?: Array<Person>\n}\n\nconst range = (len: number) => {\n  const arr: Array<number> = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (): Person => {\n  return {\n    firstName: faker.person.firstName(),\n    lastName: faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: faker.number.int(1000),\n    progress: faker.number.int(100),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0],\n  }\n}\n\nexport function makeData(...lens: Array<number>) {\n  const makeDataLevel = (depth = 0): Array<Person> => {\n    const len = lens[depth]\n    return range(len).map((): Person => {\n      return {\n        ...newPerson(),\n        subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined,\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n"
  },
  {
    "path": "examples/solid/basic-external-store/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"module\": \"ESNext\",\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"preserve\",\n    \"jsxImportSource\": \"solid-js\",\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "examples/solid/basic-external-store/vite.config.ts",
    "content": "import { defineConfig } from 'vite'\nimport solidPlugin from 'vite-plugin-solid'\n\nexport default defineConfig({\n  plugins: [solidPlugin()],\n  build: {\n    target: 'esnext',\n    polyfillDynamicImport: false,\n  },\n})\n"
  },
  {
    "path": "examples/solid/basic-use-table/.gitignore",
    "content": "node_modules\ndist"
  },
  {
    "path": "examples/solid/basic-use-table/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run start` or `yarn start`\n"
  },
  {
    "path": "examples/solid/basic-use-table/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"utf-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n    <meta name=\"theme-color\" content=\"#000000\" />\n    <link rel=\"shortcut icon\" type=\"image/ico\" href=\"/src/assets/favicon.ico\" />\n    <title>Solid App</title>\n  </head>\n  <body>\n    <noscript>You need to enable JavaScript to run this app.</noscript>\n    <div id=\"root\"></div>\n\n    <script src=\"/src/index.tsx\" type=\"module\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/solid/basic-use-table/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-solid-basic-use-table\",\n  \"version\": \"0.0.0\",\n  \"description\": \"\",\n  \"scripts\": {\n    \"start\": \"vite\",\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"lint\": \"eslint ./src\"\n  },\n  \"license\": \"MIT\",\n  \"devDependencies\": {\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\",\n    \"vite-plugin-solid\": \"^2.11.10\"\n  },\n  \"dependencies\": {\n    \"@tanstack/solid-table\": \"^9.0.0-alpha.10\",\n    \"solid-js\": \"^1.9.11\"\n  }\n}\n"
  },
  {
    "path": "examples/solid/basic-use-table/src/App.tsx",
    "content": "import { createTable, flexRender, tableFeatures } from '@tanstack/solid-table'\nimport { For, createSignal } from 'solid-js'\nimport type { ColumnDef } from '@tanstack/solid-table'\n\ntype Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  status: string\n  progress: number\n}\n\nconst defaultData: Array<Person> = [\n  {\n    firstName: 'tanner',\n    lastName: 'linsley',\n    age: 24,\n    visits: 100,\n    status: 'In Relationship',\n    progress: 50,\n  },\n  {\n    firstName: 'tandy',\n    lastName: 'miller',\n    age: 40,\n    visits: 40,\n    status: 'Single',\n    progress: 80,\n  },\n  {\n    firstName: 'joe',\n    lastName: 'dirte',\n    age: 45,\n    visits: 20,\n    status: 'Complicated',\n    progress: 10,\n  },\n  {\n    firstName: 'kevin',\n    lastName: 'vandy',\n    age: 12,\n    visits: 100,\n    status: 'Single',\n    progress: 70,\n  },\n]\n\nconst _features = tableFeatures({})\n\nconst columns: Array<ColumnDef<typeof _features, Person>> = [\n  {\n    accessorKey: 'firstName',\n    header: 'First Name',\n    cell: (info) => info.getValue(),\n  },\n  {\n    accessorFn: (row) => row.lastName,\n    id: 'lastName',\n    header: () => <span>Last Name</span>,\n    cell: (info) => <i>{info.getValue<string>()}</i>,\n  },\n  {\n    accessorFn: (row) => Number(row.age),\n    id: 'age',\n    header: () => 'Age',\n    cell: (info) => info.renderValue(),\n  },\n  {\n    accessorKey: 'visits',\n    header: () => <span>Visits</span>,\n  },\n  {\n    accessorKey: 'status',\n    header: 'Status',\n  },\n  {\n    accessorKey: 'progress',\n    header: 'Profile Progress',\n  },\n]\n\nfunction App() {\n  const [data, setData] = createSignal([...defaultData])\n  const rerender = () => setData([...defaultData])\n\n  const table = createTable({\n    _features,\n    _rowModels: {},\n    columns,\n    get data() {\n      return data()\n    },\n  })\n\n  return (\n    <div class=\"p-2\">\n      <table>\n        <thead>\n          <For each={table.getHeaderGroups()}>\n            {(headerGroup) => (\n              <tr>\n                <For each={headerGroup.headers}>\n                  {(header) => (\n                    <th>\n                      {header.isPlaceholder\n                        ? null\n                        : flexRender(\n                            header.column.columnDef.header,\n                            header.getContext(),\n                          )}\n                    </th>\n                  )}\n                </For>\n              </tr>\n            )}\n          </For>\n        </thead>\n        <tbody>\n          <For each={table.getRowModel().rows}>\n            {(row) => (\n              <tr>\n                <For each={row.getAllCells()}>\n                  {(cell) => (\n                    <td>\n                      {flexRender(\n                        cell.column.columnDef.cell,\n                        cell.getContext(),\n                      )}\n                    </td>\n                  )}\n                </For>\n              </tr>\n            )}\n          </For>\n        </tbody>\n        <tfoot>\n          <For each={table.getFooterGroups()}>\n            {(footerGroup) => (\n              <tr>\n                <For each={footerGroup.headers}>\n                  {(header) => (\n                    <th>\n                      {header.isPlaceholder\n                        ? null\n                        : flexRender(\n                            header.column.columnDef.footer,\n                            header.getContext(),\n                          )}\n                    </th>\n                  )}\n                </For>\n              </tr>\n            )}\n          </For>\n        </tfoot>\n      </table>\n      <div class=\"h-4\" />\n      <button onClick={rerender} class=\"border p-2\">\n        Rerender\n      </button>\n    </div>\n  )\n}\n\nexport default App\n"
  },
  {
    "path": "examples/solid/basic-use-table/src/index.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n"
  },
  {
    "path": "examples/solid/basic-use-table/src/index.tsx",
    "content": "/* @refresh reload */\nimport { render } from 'solid-js/web'\nimport './index.css'\nimport App from './App'\n\nrender(() => <App />, document.getElementById('root') as HTMLElement)\n"
  },
  {
    "path": "examples/solid/basic-use-table/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"module\": \"ESNext\",\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"preserve\",\n    \"jsxImportSource\": \"solid-js\",\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "examples/solid/basic-use-table/vite.config.ts",
    "content": "import { defineConfig } from 'vite'\nimport solidPlugin from 'vite-plugin-solid'\n\nexport default defineConfig({\n  plugins: [solidPlugin()],\n  build: {\n    target: 'esnext',\n    polyfillDynamicImport: false,\n  },\n})\n"
  },
  {
    "path": "examples/solid/column-groups/.gitignore",
    "content": "node_modules\ndist"
  },
  {
    "path": "examples/solid/column-groups/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run start` or `yarn start`\n"
  },
  {
    "path": "examples/solid/column-groups/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"utf-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n    <meta name=\"theme-color\" content=\"#000000\" />\n    <link rel=\"shortcut icon\" type=\"image/ico\" href=\"/src/assets/favicon.ico\" />\n    <title>Solid App</title>\n  </head>\n  <body>\n    <noscript>You need to enable JavaScript to run this app.</noscript>\n    <div id=\"root\"></div>\n\n    <script src=\"/src/index.tsx\" type=\"module\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/solid/column-groups/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-solid-column-groups\",\n  \"version\": \"0.0.0\",\n  \"description\": \"\",\n  \"scripts\": {\n    \"start\": \"vite\",\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"lint\": \"eslint ./src\"\n  },\n  \"license\": \"MIT\",\n  \"devDependencies\": {\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\",\n    \"vite-plugin-solid\": \"^2.11.10\"\n  },\n  \"dependencies\": {\n    \"@tanstack/solid-table\": \"^9.0.0-alpha.10\",\n    \"solid-js\": \"^1.9.11\"\n  }\n}\n"
  },
  {
    "path": "examples/solid/column-groups/src/App.tsx",
    "content": "import { For, createSignal } from 'solid-js'\nimport { createTable, flexRender, tableFeatures } from '@tanstack/solid-table'\nimport type { ColumnDef } from '@tanstack/solid-table'\n\ntype Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  status: string\n  progress: number\n}\n\nconst defaultData: Array<Person> = [\n  {\n    firstName: 'tanner',\n    lastName: 'linsley',\n    age: 24,\n    visits: 100,\n    status: 'In Relationship',\n    progress: 50,\n  },\n  {\n    firstName: 'tandy',\n    lastName: 'miller',\n    age: 40,\n    visits: 40,\n    status: 'Single',\n    progress: 80,\n  },\n  {\n    firstName: 'joe',\n    lastName: 'dirte',\n    age: 45,\n    visits: 20,\n    status: 'Complicated',\n    progress: 10,\n  },\n]\n\nconst _features = tableFeatures({})\n\nconst defaultColumns: Array<ColumnDef<typeof _features, Person>> = [\n  {\n    header: 'Name',\n    footer: (props) => props.column.id,\n    columns: [\n      {\n        accessorKey: 'firstName',\n        cell: (info) => info.getValue(),\n        footer: (props) => props.column.id,\n      },\n      {\n        accessorFn: (row) => row.lastName,\n        id: 'lastName',\n        cell: (info) => info.getValue(),\n        header: () => <span>Last Name</span>,\n        footer: (props) => props.column.id,\n      },\n    ],\n  },\n  {\n    header: 'Info',\n    footer: (props) => props.column.id,\n    columns: [\n      {\n        accessorKey: 'age',\n        header: () => 'Age',\n        footer: (props) => props.column.id,\n      },\n      {\n        header: 'More Info',\n        columns: [\n          {\n            accessorKey: 'visits',\n            header: () => <span>Visits</span>,\n            footer: (props) => props.column.id,\n          },\n          {\n            accessorKey: 'status',\n            header: 'Status',\n            footer: (props) => props.column.id,\n          },\n          {\n            accessorKey: 'progress',\n            header: 'Profile Progress',\n            footer: (props) => props.column.id,\n          },\n        ],\n      },\n    ],\n  },\n]\n\nfunction App() {\n  const [data, setData] = createSignal(defaultData)\n  const rerender = () => setData(defaultData)\n\n  const table = createTable({\n    _features,\n    get data() {\n      return data()\n    },\n    columns: defaultColumns,\n  })\n\n  return (\n    <div class=\"p-2\">\n      <table>\n        <thead>\n          <For each={table.getHeaderGroups()}>\n            {(headerGroup) => (\n              <tr>\n                <For each={headerGroup.headers}>\n                  {(header) => (\n                    <th colSpan={header.colSpan}>\n                      {header.isPlaceholder\n                        ? null\n                        : flexRender(\n                            header.column.columnDef.header,\n                            header.getContext(),\n                          )}\n                    </th>\n                  )}\n                </For>\n              </tr>\n            )}\n          </For>\n        </thead>\n        <tbody>\n          <For each={table.getRowModel().rows}>\n            {(row) => (\n              <tr>\n                <For each={row.getAllCells()}>\n                  {(cell) => (\n                    <td>\n                      {flexRender(\n                        cell.column.columnDef.cell,\n                        cell.getContext(),\n                      )}\n                    </td>\n                  )}\n                </For>\n              </tr>\n            )}\n          </For>\n        </tbody>\n        <tfoot>\n          <For each={table.getFooterGroups()}>\n            {(footerGroup) => (\n              <tr>\n                <For each={footerGroup.headers}>\n                  {(header) => (\n                    <th colSpan={header.colSpan}>\n                      {header.isPlaceholder\n                        ? null\n                        : flexRender(\n                            header.column.columnDef.footer,\n                            header.getContext(),\n                          )}\n                    </th>\n                  )}\n                </For>\n              </tr>\n            )}\n          </For>\n        </tfoot>\n      </table>\n      <div class=\"h-4\" />\n      <button onClick={() => rerender()} class=\"border p-2\">\n        Rerender\n      </button>\n    </div>\n  )\n}\n\nexport default App\n"
  },
  {
    "path": "examples/solid/column-groups/src/index.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n"
  },
  {
    "path": "examples/solid/column-groups/src/index.tsx",
    "content": "/* @refresh reload */\nimport { render } from 'solid-js/web'\nimport './index.css'\nimport App from './App'\n\nrender(() => <App />, document.getElementById('root') as HTMLElement)\n"
  },
  {
    "path": "examples/solid/column-groups/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"module\": \"ESNext\",\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"preserve\",\n    \"jsxImportSource\": \"solid-js\",\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "examples/solid/column-groups/vite.config.ts",
    "content": "import { defineConfig } from 'vite'\nimport solidPlugin from 'vite-plugin-solid'\n\nexport default defineConfig({\n  plugins: [solidPlugin()],\n  build: {\n    target: 'esnext',\n    polyfillDynamicImport: false,\n  },\n})\n"
  },
  {
    "path": "examples/solid/column-ordering/.gitignore",
    "content": "node_modules\ndist"
  },
  {
    "path": "examples/solid/column-ordering/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run start` or `yarn start`\n"
  },
  {
    "path": "examples/solid/column-ordering/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"utf-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n    <meta name=\"theme-color\" content=\"#000000\" />\n    <link rel=\"shortcut icon\" type=\"image/ico\" href=\"/src/assets/favicon.ico\" />\n    <title>Solid App</title>\n  </head>\n  <body>\n    <noscript>You need to enable JavaScript to run this app.</noscript>\n    <div id=\"root\"></div>\n\n    <script src=\"/src/index.tsx\" type=\"module\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/solid/column-ordering/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-solid-column-ordering\",\n  \"version\": \"0.0.0\",\n  \"description\": \"\",\n  \"scripts\": {\n    \"start\": \"vite\",\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"lint\": \"eslint ./src\"\n  },\n  \"license\": \"MIT\",\n  \"devDependencies\": {\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\",\n    \"vite-plugin-solid\": \"^2.11.10\"\n  },\n  \"dependencies\": {\n    \"@tanstack/solid-table\": \"^9.0.0-alpha.10\",\n    \"solid-js\": \"^1.9.11\"\n  }\n}\n"
  },
  {
    "path": "examples/solid/column-ordering/src/App.tsx",
    "content": "import { For, Show, createSignal } from 'solid-js'\nimport { faker } from '@faker-js/faker'\nimport {\n  columnOrderingFeature,\n  columnVisibilityFeature,\n  createTable,\n  flexRender,\n  tableFeatures,\n} from '@tanstack/solid-table'\nimport { makeData } from './makeData'\nimport type { Person } from './makeData'\nimport type { ColumnDef } from '@tanstack/solid-table'\n\nconst _features = tableFeatures({\n  columnOrderingFeature,\n  columnVisibilityFeature,\n})\n\nconst defaultColumns: Array<ColumnDef<typeof _features, Person>> = [\n  {\n    header: 'Name',\n    footer: (props) => props.column.id,\n    columns: [\n      {\n        accessorKey: 'firstName',\n        cell: (info) => info.getValue(),\n        footer: (props) => props.column.id,\n      },\n      {\n        accessorFn: (row) => row.lastName,\n        id: 'lastName',\n        cell: (info) => info.getValue(),\n        header: () => <span>Last Name</span>,\n        footer: (props) => props.column.id,\n      },\n    ],\n  },\n  {\n    header: 'Info',\n    footer: (props) => props.column.id,\n    columns: [\n      {\n        accessorKey: 'age',\n        header: () => 'Age',\n        footer: (props) => props.column.id,\n      },\n      {\n        header: 'More Info',\n        columns: [\n          {\n            accessorKey: 'visits',\n            header: () => <span>Visits</span>,\n            footer: (props) => props.column.id,\n          },\n          {\n            accessorKey: 'status',\n            header: 'Status',\n            footer: (props) => props.column.id,\n          },\n          {\n            accessorKey: 'progress',\n            header: 'Profile Progress',\n            footer: (props) => props.column.id,\n          },\n        ],\n      },\n    ],\n  },\n]\n\nfunction App() {\n  const [data, setData] = createSignal(makeData(20))\n  const rerender = () => setData(() => makeData(20))\n\n  const table = createTable({\n    _features,\n    get data() {\n      return data()\n    },\n    columns: defaultColumns,\n  })\n\n  const randomizeColumns = () => {\n    table.setColumnOrder(\n      faker.helpers.shuffle(table.getAllLeafColumns().map((d) => d.id)),\n    )\n  }\n\n  return (\n    <table.Subscribe\n      selector={(state) => ({\n        columnOrder: state.columnOrder,\n        columnVisibility: state.columnVisibility,\n      })}\n    >\n      {(_state) => (\n        <div class=\"p-2\">\n          <div class=\"inline-block border border-black shadow rounded\">\n            <div class=\"px-1 border-b border-black\">\n              <label>\n                <input\n                  checked={table.getIsAllColumnsVisible()}\n                  onChange={table.getToggleAllColumnsVisibilityHandler()}\n                  type=\"checkbox\"\n                />{' '}\n                Toggle All\n              </label>\n            </div>\n            <For each={table.getAllLeafColumns()}>\n              {(column) => (\n                <div class=\"px-1\">\n                  <label>\n                    <input\n                      checked={column.getIsVisible()}\n                      onChange={column.getToggleVisibilityHandler()}\n                      type=\"checkbox\"\n                    />{' '}\n                    {column.id}\n                  </label>\n                </div>\n              )}\n            </For>\n          </div>\n          <div class=\"h-4\" />\n          <div class=\"flex flex-wrap gap-2\">\n            <button onClick={() => rerender()} class=\"border p-1\">\n              Regenerate\n            </button>\n            <button onClick={() => randomizeColumns()} class=\"border p-1\">\n              Shuffle Columns\n            </button>\n          </div>\n          <div class=\"h-4\" />\n          <table>\n            <thead>\n              <For each={table.getHeaderGroups()}>\n                {(headerGroup) => (\n                  <tr>\n                    <For each={headerGroup.headers}>\n                      {(header) => (\n                        <th colSpan={header.colSpan}>\n                          <Show when={!header.isPlaceholder}>\n                            {flexRender(\n                              header.column.columnDef.header,\n                              header.getContext(),\n                            )}\n                          </Show>\n                        </th>\n                      )}\n                    </For>\n                  </tr>\n                )}\n              </For>\n            </thead>\n            <tbody>\n              <For each={table.getRowModel().rows}>\n                {(row) => (\n                  <tr>\n                    <For each={row.getVisibleCells()}>\n                      {(cell) => (\n                        <td>\n                          {flexRender(\n                            cell.column.columnDef.cell,\n                            cell.getContext(),\n                          )}\n                        </td>\n                      )}\n                    </For>\n                  </tr>\n                )}\n              </For>\n            </tbody>\n            <tfoot>\n              <For each={table.getFooterGroups()}>\n                {(footerGroup) => (\n                  <tr>\n                    <For each={footerGroup.headers}>\n                      {(header) => (\n                        <th colSpan={header.colSpan}>\n                          <Show when={!header.isPlaceholder}>\n                            {flexRender(\n                              header.column.columnDef.footer,\n                              header.getContext(),\n                            )}\n                          </Show>\n                        </th>\n                      )}\n                    </For>\n                  </tr>\n                )}\n              </For>\n            </tfoot>\n          </table>\n          <div class=\"h-4\" />\n          <table.Subscribe selector={(state) => state}>\n            {(state) => <pre>{JSON.stringify(state(), null, 2)}</pre>}\n          </table.Subscribe>\n        </div>\n      )}\n    </table.Subscribe>\n  )\n}\n\nexport default App\n"
  },
  {
    "path": "examples/solid/column-ordering/src/index.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntd {\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntd:last-child {\n  border-right: 0;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n"
  },
  {
    "path": "examples/solid/column-ordering/src/index.tsx",
    "content": "/* @refresh reload */\nimport { render } from 'solid-js/web'\nimport './index.css'\nimport App from './App'\n\nrender(() => <App />, document.getElementById('root') as HTMLElement)\n"
  },
  {
    "path": "examples/solid/column-ordering/src/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  subRows?: Array<Person>\n}\n\nconst range = (len: number) => {\n  const arr: Array<number> = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (): Person => {\n  return {\n    firstName: faker.person.firstName(),\n    lastName: faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: faker.number.int(1000),\n    progress: faker.number.int(100),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0],\n  }\n}\n\nexport function makeData(...lens: Array<number>) {\n  const makeDataLevel = (depth = 0): Array<Person> => {\n    const len = lens[depth]\n    return range(len).map((d): Person => {\n      return {\n        ...newPerson(),\n        subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined,\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n"
  },
  {
    "path": "examples/solid/column-ordering/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"module\": \"ESNext\",\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"preserve\",\n    \"jsxImportSource\": \"solid-js\",\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "examples/solid/column-ordering/vite.config.ts",
    "content": "import { defineConfig } from 'vite'\nimport solidPlugin from 'vite-plugin-solid'\n\nexport default defineConfig({\n  plugins: [solidPlugin()],\n  build: {\n    target: 'esnext',\n    polyfillDynamicImport: false,\n  },\n})\n"
  },
  {
    "path": "examples/solid/column-visibility/.gitignore",
    "content": "node_modules\ndist"
  },
  {
    "path": "examples/solid/column-visibility/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run start` or `yarn start`\n"
  },
  {
    "path": "examples/solid/column-visibility/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"utf-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n    <meta name=\"theme-color\" content=\"#000000\" />\n    <link rel=\"shortcut icon\" type=\"image/ico\" href=\"/src/assets/favicon.ico\" />\n    <title>Solid App</title>\n  </head>\n  <body>\n    <noscript>You need to enable JavaScript to run this app.</noscript>\n    <div id=\"root\"></div>\n\n    <script src=\"/src/index.tsx\" type=\"module\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/solid/column-visibility/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-solid-column-visibility\",\n  \"version\": \"0.0.0\",\n  \"description\": \"\",\n  \"scripts\": {\n    \"start\": \"vite\",\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"lint\": \"eslint ./src\"\n  },\n  \"license\": \"MIT\",\n  \"devDependencies\": {\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\",\n    \"vite-plugin-solid\": \"^2.11.10\"\n  },\n  \"dependencies\": {\n    \"@tanstack/solid-table\": \"^9.0.0-alpha.10\",\n    \"solid-js\": \"^1.9.11\"\n  }\n}\n"
  },
  {
    "path": "examples/solid/column-visibility/src/App.tsx",
    "content": "import {\n  columnVisibilityFeature,\n  createTable,\n  flexRender,\n  tableFeatures,\n} from '@tanstack/solid-table'\nimport { For, Show, createSignal } from 'solid-js'\nimport type { ColumnDef } from '@tanstack/solid-table'\n\ntype Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  status: string\n  progress: number\n}\n\nconst defaultData: Array<Person> = [\n  {\n    firstName: 'tanner',\n    lastName: 'linsley',\n    age: 24,\n    visits: 100,\n    status: 'In Relationship',\n    progress: 50,\n  },\n  {\n    firstName: 'tandy',\n    lastName: 'miller',\n    age: 40,\n    visits: 40,\n    status: 'Single',\n    progress: 80,\n  },\n  {\n    firstName: 'joe',\n    lastName: 'dirte',\n    age: 45,\n    visits: 20,\n    status: 'Complicated',\n    progress: 10,\n  },\n]\n\nconst _features = tableFeatures({ columnVisibilityFeature })\n\nconst defaultColumns: Array<ColumnDef<typeof _features, Person>> = [\n  {\n    header: 'Name',\n    footer: (props) => props.column.id,\n    columns: [\n      {\n        accessorKey: 'firstName',\n        cell: (info) => info.getValue(),\n        footer: (props) => props.column.id,\n      },\n      {\n        accessorFn: (row) => row.lastName,\n        id: 'lastName',\n        cell: (info) => info.getValue(),\n        header: () => <span>Last Name</span>,\n        footer: (props) => props.column.id,\n      },\n    ],\n  },\n  {\n    header: 'Info',\n    footer: (props) => props.column.id,\n    columns: [\n      {\n        accessorKey: 'age',\n        header: () => 'Age',\n        footer: (props) => props.column.id,\n      },\n      {\n        header: 'More Info',\n        columns: [\n          {\n            accessorKey: 'visits',\n            header: () => <span>Visits</span>,\n            footer: (props) => props.column.id,\n          },\n          {\n            accessorKey: 'status',\n            header: 'Status',\n            footer: (props) => props.column.id,\n          },\n          {\n            accessorKey: 'progress',\n            header: 'Profile Progress',\n            footer: (props) => props.column.id,\n          },\n        ],\n      },\n    ],\n  },\n]\n\nfunction App() {\n  const [data, setData] = createSignal(defaultData)\n  const rerender = () => setData(defaultData)\n\n  const table = createTable({\n    _features,\n    get data() {\n      return data()\n    },\n    columns: defaultColumns,\n  })\n\n  return (\n    <table.Subscribe\n      selector={(state) => ({ columnVisibility: state.columnVisibility })}\n    >\n      {(state) => (\n        <div class=\"p-2\">\n          <div class=\"inline-block border border-black shadow rounded\">\n            <div class=\"px-1 border-b border-black\">\n              <label>\n                <input\n                  checked={table.getIsAllColumnsVisible()}\n                  onChange={table.getToggleAllColumnsVisibilityHandler()}\n                  type=\"checkbox\"\n                />{' '}\n                Toggle All\n              </label>\n            </div>\n            <For each={table.getAllLeafColumns()}>\n              {(column) => (\n                <div class=\"px-1\">\n                  <label>\n                    <input\n                      checked={column.getIsVisible()}\n                      onChange={column.getToggleVisibilityHandler()}\n                      type=\"checkbox\"\n                    />{' '}\n                    {column.id}\n                  </label>\n                </div>\n              )}\n            </For>\n          </div>\n          <div class=\"h-4\" />\n          <table>\n            <thead>\n              <For each={table.getHeaderGroups()}>\n                {(headerGroup) => (\n                  <tr>\n                    <For each={headerGroup.headers}>\n                      {(header) => (\n                        <th colSpan={header.colSpan}>\n                          <Show when={!header.isPlaceholder}>\n                            {flexRender(\n                              header.column.columnDef.header,\n                              header.getContext(),\n                            )}\n                          </Show>\n                        </th>\n                      )}\n                    </For>\n                  </tr>\n                )}\n              </For>\n            </thead>\n            <tbody>\n              <For each={table.getRowModel().rows}>\n                {(row) => (\n                  <tr>\n                    <For each={row.getVisibleCells()}>\n                      {(cell) => (\n                        <td>\n                          {flexRender(\n                            cell.column.columnDef.cell,\n                            cell.getContext(),\n                          )}\n                        </td>\n                      )}\n                    </For>\n                  </tr>\n                )}\n              </For>\n            </tbody>\n            <tfoot>\n              <For each={table.getFooterGroups()}>\n                {(footerGroup) => (\n                  <tr>\n                    <For each={footerGroup.headers}>\n                      {(header) => (\n                        <th colSpan={header.colSpan}>\n                          <Show when={!header.isPlaceholder}>\n                            {flexRender(\n                              header.column.columnDef.footer,\n                              header.getContext(),\n                            )}\n                          </Show>\n                        </th>\n                      )}\n                    </For>\n                  </tr>\n                )}\n              </For>\n            </tfoot>\n          </table>\n          <div class=\"h-4\" />\n          <button onClick={() => rerender()} class=\"border p-2\">\n            Rerender\n          </button>\n          <div class=\"h-4\" />\n          <table.Subscribe selector={(state) => state}>\n            {(state) => <pre>{JSON.stringify(state(), null, 2)}</pre>}\n          </table.Subscribe>\n        </div>\n      )}\n    </table.Subscribe>\n  )\n}\n\nexport default App\n"
  },
  {
    "path": "examples/solid/column-visibility/src/index.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n"
  },
  {
    "path": "examples/solid/column-visibility/src/index.tsx",
    "content": "/* @refresh reload */\nimport { render } from 'solid-js/web'\nimport './index.css'\nimport App from './App'\n\nrender(() => <App />, document.getElementById('root') as HTMLElement)\n"
  },
  {
    "path": "examples/solid/column-visibility/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"module\": \"ESNext\",\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"preserve\",\n    \"jsxImportSource\": \"solid-js\",\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "examples/solid/column-visibility/vite.config.ts",
    "content": "import { defineConfig } from 'vite'\nimport solidPlugin from 'vite-plugin-solid'\n\nexport default defineConfig({\n  plugins: [solidPlugin()],\n  build: {\n    target: 'esnext',\n    polyfillDynamicImport: false,\n  },\n})\n"
  },
  {
    "path": "examples/solid/composable-tables/.gitignore",
    "content": "node_modules\ndist\n"
  },
  {
    "path": "examples/solid/composable-tables/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run start` or `yarn start`\n"
  },
  {
    "path": "examples/solid/composable-tables/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"utf-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n    <meta name=\"theme-color\" content=\"#000000\" />\n    <link rel=\"shortcut icon\" type=\"image/ico\" href=\"/src/assets/favicon.ico\" />\n    <title>Solid App</title>\n  </head>\n  <body>\n    <noscript>You need to enable JavaScript to run this app.</noscript>\n    <div id=\"root\"></div>\n\n    <script src=\"/src/index.tsx\" type=\"module\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/solid/composable-tables/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-solid-composable-tables\",\n  \"version\": \"0.0.0\",\n  \"description\": \"\",\n  \"scripts\": {\n    \"start\": \"vite\",\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"lint\": \"eslint ./src\"\n  },\n  \"license\": \"MIT\",\n  \"devDependencies\": {\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\",\n    \"vite-plugin-solid\": \"^2.11.10\"\n  },\n  \"dependencies\": {\n    \"@tanstack/solid-table\": \"^9.0.0-alpha.10\",\n    \"solid-js\": \"^1.9.11\"\n  }\n}\n"
  },
  {
    "path": "examples/solid/composable-tables/src/App.tsx",
    "content": "import { For, createSignal } from 'solid-js'\nimport { createAppColumnHelper, createAppTable } from './hooks/table'\nimport { makeData, makeProductData } from './makeData'\nimport type { Person, Product } from './makeData'\n// Import cell components directly - they use useCellContext internally\n\n// Create column helpers with TFeatures already bound - only need TData!\nconst personColumnHelper = createAppColumnHelper<Person>()\nconst productColumnHelper = createAppColumnHelper<Product>()\n\n// Users Table Component - Original implementation\nfunction UsersTable() {\n  // Data state\n  const [data, setData] = createSignal(makeData(1000))\n\n  // Refresh data callback\n  const refreshData = () => {\n    setData(() => makeData(1000))\n  }\n\n  // Define columns using the column helper\n  const columns =\n    // NOTE: You must use `createAppColumnHelper` instead of `createColumnHelper` when using pre-bound components like <cell.TextCell />\n    personColumnHelper.columns([\n      personColumnHelper.accessor('firstName', {\n        header: 'First Name',\n        footer: (props) => props.column.id,\n        cell: ({ cell }) => <cell.TextCell />,\n      }),\n      personColumnHelper.accessor('lastName', {\n        header: 'Last Name',\n        footer: (props) => props.column.id,\n        cell: ({ cell }) => <cell.TextCell />,\n      }),\n      personColumnHelper.accessor('age', {\n        header: 'Age',\n        footer: (props) => props.column.id,\n        cell: ({ cell }) => <cell.NumberCell />,\n      }),\n      personColumnHelper.accessor('visits', {\n        header: 'Visits',\n        footer: (props) => props.column.id,\n        cell: ({ cell }) => <cell.NumberCell />,\n      }),\n      personColumnHelper.accessor('status', {\n        header: 'Status',\n        footer: (props) => props.column.id,\n        cell: ({ cell }) => <cell.StatusCell />,\n      }),\n      personColumnHelper.accessor('progress', {\n        header: 'Progress',\n        footer: (props) => props.column.id,\n        cell: ({ cell }) => <cell.ProgressCell />,\n      }),\n      personColumnHelper.display({\n        id: 'actions',\n        header: 'Actions',\n        cell: ({ cell }) => <cell.RowActionsCell />,\n      }),\n    ])\n\n  // Create the table - _features and _rowModels are already configured!\n  const table = createAppTable({\n    columns,\n    get data() {\n      return data()\n    },\n    debugTable: true,\n    // more table options\n  })\n\n  return (\n    // Main selector on AppTable - selects all needed state in one place\n    <table.AppTable\n      selector={(state) => ({\n        // subscribe to specific states for re-rendering if you are optimizing for maximum performance\n        pagination: state.pagination,\n        sorting: state.sorting,\n        columnFilters: state.columnFilters,\n      })}\n    >\n      {(state) => {\n        const sorting = () => state().sorting\n        const columnFilters = () => state().columnFilters\n        return (\n          <div class=\"table-container\">\n            {/* Table toolbar using pre-bound component */}\n            <table.TableToolbar title=\"Users Table\" onRefresh={refreshData} />\n\n            {/* Table element */}\n            <table>\n              <thead>\n                <For each={table.getHeaderGroups()}>\n                  {(headerGroup) => (\n                    <tr>\n                      <For each={headerGroup.headers}>\n                        {(h) => (\n                          <table.AppHeader header={h}>\n                            {(header) => (\n                              <th\n                                colSpan={header.colSpan}\n                                class={\n                                  header.column.getCanSort()\n                                    ? 'sortable-header'\n                                    : ''\n                                }\n                                onClick={header.column.getToggleSortingHandler()}\n                              >\n                                {header.isPlaceholder ? null : (\n                                  <>\n                                    <header.FlexRender />\n                                    <header.SortIndicator />\n                                    <header.ColumnFilter />\n                                    {/* Show sort order number when multiple columns sorted */}\n                                    {sorting().length > 1 &&\n                                      sorting().findIndex(\n                                        (s) => s.id === header.column.id,\n                                      ) > -1 && (\n                                        <span class=\"sort-order\">\n                                          {sorting().findIndex(\n                                            (s) => s.id === header.column.id,\n                                          ) + 1}\n                                        </span>\n                                      )}\n                                  </>\n                                )}\n                              </th>\n                            )}\n                          </table.AppHeader>\n                        )}\n                      </For>\n                    </tr>\n                  )}\n                </For>\n              </thead>\n              <tbody>\n                <For each={table.getRowModel().rows}>\n                  {(row) => (\n                    <tr>\n                      <For each={row.getAllCells()}>\n                        {(c) => (\n                          <table.AppCell cell={c}>\n                            {(cell) => (\n                              <td>\n                                {/* Cell components are pre-bound via AppCell */}\n                                <cell.FlexRender />\n                              </td>\n                            )}\n                          </table.AppCell>\n                        )}\n                      </For>\n                    </tr>\n                  )}\n                </For>\n              </tbody>\n              <tfoot>\n                <For each={table.getFooterGroups()}>\n                  {(footerGroup) => (\n                    <tr>\n                      <For each={footerGroup.headers}>\n                        {(f) => (\n                          <table.AppFooter header={f}>\n                            {(footer) => {\n                              const columnId = footer.column.id\n                              const hasFilter = () =>\n                                columnFilters().some((cf) => cf.id === columnId)\n\n                              return (\n                                <td colSpan={footer.colSpan}>\n                                  {footer.isPlaceholder ? null : (\n                                    <>\n                                      {/* Use FooterSum for numeric columns, FooterColumnId for others */}\n                                      {columnId === 'age' ||\n                                      columnId === 'visits' ||\n                                      columnId === 'progress' ? (\n                                        <>\n                                          <footer.FooterSum />\n                                          {hasFilter() && (\n                                            <span class=\"filtered-indicator\">\n                                              {' '}\n                                              (filtered)\n                                            </span>\n                                          )}\n                                        </>\n                                      ) : columnId === 'actions' ? null : (\n                                        <>\n                                          <footer.FooterColumnId />\n                                          {hasFilter() && (\n                                            <span class=\"filtered-indicator\">\n                                              {' '}\n                                              ✓\n                                            </span>\n                                          )}\n                                        </>\n                                      )}\n                                    </>\n                                  )}\n                                </td>\n                              )\n                            }}\n                          </table.AppFooter>\n                        )}\n                      </For>\n                    </tr>\n                  )}\n                </For>\n              </tfoot>\n            </table>\n\n            {/* Pagination using pre-bound component */}\n            <table.PaginationControls />\n\n            {/* Row count using pre-bound component */}\n            <table.RowCount />\n          </div>\n        )\n      }}\n    </table.AppTable>\n  )\n}\n\n// Products Table Component - New implementation using same hook and components\nfunction ProductsTable() {\n  // Data state\n  const [data, setData] = createSignal(makeProductData(500))\n\n  // Refresh data callback\n  const refreshData = () => {\n    setData(makeProductData(500))\n  }\n\n  // Define columns using the column helper - different structure than Users table\n  const columns = productColumnHelper.columns([\n    productColumnHelper.accessor('name', {\n      header: 'Product Name',\n      footer: (props) => props.column.id,\n      cell: ({ cell }) => <cell.TextCell />,\n    }),\n    productColumnHelper.accessor('category', {\n      header: 'Category',\n      footer: (props) => props.column.id,\n      cell: ({ cell }) => <cell.CategoryCell />,\n    }),\n    productColumnHelper.accessor('price', {\n      header: 'Price',\n      footer: (props) => props.column.id,\n      cell: ({ cell }) => <cell.PriceCell />,\n    }),\n    productColumnHelper.accessor('stock', {\n      header: 'In Stock',\n      footer: (props) => props.column.id,\n      cell: ({ cell }) => <cell.NumberCell />,\n    }),\n    productColumnHelper.accessor('rating', {\n      header: 'Rating',\n      footer: (props) => props.column.id,\n      cell: ({ cell }) => <cell.ProgressCell />,\n    }),\n  ])\n\n  // Create the table using the same createAppTable hook\n  const table = createAppTable({\n    columns,\n    get data() {\n      return data()\n    },\n    getRowId: (row) => row.id,\n  })\n\n  return (\n    <table.AppTable\n      selector={(state) => ({\n        pagination: state.pagination,\n        sorting: state.sorting,\n        columnFilters: state.columnFilters,\n      })}\n    >\n      {(state) => {\n        const sorting = () => state().sorting\n        const columnFilters = () => state().columnFilters\n        return (\n          <div class=\"table-container\">\n            {/* Table toolbar using the same pre-bound component */}\n            <table.TableToolbar\n              title=\"Products Table\"\n              onRefresh={refreshData}\n            />\n\n            {/* Table element */}\n            <table>\n              <thead>\n                <For each={table.getHeaderGroups()}>\n                  {(headerGroup) => (\n                    <tr>\n                      <For each={headerGroup.headers}>\n                        {(h) => (\n                          <table.AppHeader header={h}>\n                            {(header) => (\n                              <th\n                                colSpan={header.colSpan}\n                                class={\n                                  header.column.getCanSort()\n                                    ? 'sortable-header'\n                                    : ''\n                                }\n                                onClick={header.column.getToggleSortingHandler()}\n                              >\n                                {header.isPlaceholder ? null : (\n                                  <>\n                                    <header.FlexRender />\n                                    <header.SortIndicator />\n                                    <header.ColumnFilter />\n                                    {sorting().length > 1 &&\n                                      sorting().findIndex(\n                                        (s) => s.id === header.column.id,\n                                      ) > -1 && (\n                                        <span class=\"sort-order\">\n                                          {sorting().findIndex(\n                                            (s) => s.id === header.column.id,\n                                          ) + 1}\n                                        </span>\n                                      )}\n                                  </>\n                                )}\n                              </th>\n                            )}\n                          </table.AppHeader>\n                        )}\n                      </For>\n                    </tr>\n                  )}\n                </For>\n              </thead>\n              <tbody>\n                <For each={table.getRowModel().rows}>\n                  {(row) => (\n                    <tr>\n                      <For each={row.getAllCells()}>\n                        {(c) => (\n                          <table.AppCell cell={c}>\n                            {(cell) => (\n                              <td>\n                                {/* Cell components are pre-bound via AppCell */}\n                                <cell.FlexRender />\n                              </td>\n                            )}\n                          </table.AppCell>\n                        )}\n                      </For>\n                    </tr>\n                  )}\n                </For>\n              </tbody>\n              <tfoot>\n                <For each={table.getFooterGroups()}>\n                  {(footerGroup) => (\n                    <tr>\n                      <For each={footerGroup.headers}>\n                        {(f) => (\n                          <table.AppFooter header={f}>\n                            {(footer) => {\n                              const columnId = footer.column.id\n                              const hasFilter = () =>\n                                columnFilters().some((cf) => cf.id === columnId)\n\n                              return (\n                                <td colSpan={footer.colSpan}>\n                                  {footer.isPlaceholder ? null : (\n                                    <>\n                                      {/* Use FooterSum for numeric columns, FooterColumnId for others */}\n                                      {columnId === 'price' ||\n                                      columnId === 'stock' ||\n                                      columnId === 'rating' ? (\n                                        <>\n                                          <footer.FooterSum />\n                                          {hasFilter() && (\n                                            <span class=\"filtered-indicator\">\n                                              {' '}\n                                              (filtered)\n                                            </span>\n                                          )}\n                                        </>\n                                      ) : (\n                                        <>\n                                          <footer.FooterColumnId />\n                                          {hasFilter() && (\n                                            <span class=\"filtered-indicator\">\n                                              {' '}\n                                              ✓\n                                            </span>\n                                          )}\n                                        </>\n                                      )}\n                                    </>\n                                  )}\n                                </td>\n                              )\n                            }}\n                          </table.AppFooter>\n                        )}\n                      </For>\n                    </tr>\n                  )}\n                </For>\n              </tfoot>\n            </table>\n\n            {/* Pagination using the same pre-bound component */}\n            <table.PaginationControls />\n\n            {/* Row count using the same pre-bound component */}\n            <table.RowCount />\n          </div>\n        )\n      }}\n    </table.AppTable>\n  )\n}\n\nfunction App() {\n  return (\n    <div class=\"app\">\n      <h1>Composable Tables Example</h1>\n      <p class=\"description\">\n        Both tables below use the same <code>createAppTable</code> hook and\n        shareable components, but with different data types and column\n        configurations.\n      </p>\n\n      {/* Original Users Table */}\n      <UsersTable />\n\n      <div class=\"table-divider\" />\n\n      {/* New Products Table */}\n      <ProductsTable />\n    </div>\n  )\n}\n\nexport default App\n"
  },
  {
    "path": "examples/solid/composable-tables/src/components/cell-components.tsx",
    "content": "/**\n * Cell-level components that use useCellContext\n *\n * These components can be used via the pre-bound cellComponents\n * in AppCell children, e.g., <cell.TextCell />\n */\nimport { useCellContext } from '../hooks/table'\n\n/**\n * Generic text cell renderer\n */\nexport function TextCell() {\n  const cell = useCellContext<string>()\n  return <span>{cell.getValue()}</span>\n}\n\n/**\n * Number cell with locale formatting\n */\nexport function NumberCell() {\n  const cell = useCellContext<number>()\n  return <span>{cell.getValue().toLocaleString()}</span>\n}\n\n/**\n * Status badge cell for status column\n */\nexport function StatusCell() {\n  const cell = useCellContext<'relationship' | 'complicated' | 'single'>()\n  const status = cell.getValue()\n  return <span class={`status-badge ${status}`}>{status}</span>\n}\n\n/**\n * Progress bar cell\n */\nexport function ProgressCell() {\n  const cell = useCellContext<number>()\n  const progress = cell.getValue()\n  return (\n    <div class=\"progress-bar\">\n      <div class=\"progress-bar-fill\" style={{ width: `${progress}%` }} />\n    </div>\n  )\n}\n\n/**\n * Row actions cell - actions for the current row\n */\nexport function RowActionsCell() {\n  const cell = useCellContext()\n  const row = cell.row\n\n  return (\n    <div class=\"row-actions\">\n      <button\n        onClick={() =>\n          alert(`View: ${row.original.firstName} ${row.original.lastName}`)\n        }\n        title=\"View\"\n      >\n        👁️\n      </button>\n      <button\n        onClick={() =>\n          alert(`Edit: ${row.original.firstName} ${row.original.lastName}`)\n        }\n        title=\"Edit\"\n      >\n        ✏️\n      </button>\n      <button\n        onClick={() =>\n          alert(`Delete: ${row.original.firstName} ${row.original.lastName}`)\n        }\n        title=\"Delete\"\n      >\n        🗑️\n      </button>\n    </div>\n  )\n}\n\n/**\n * Price cell with currency formatting\n */\nexport function PriceCell() {\n  const cell = useCellContext<number>()\n  return (\n    <span class=\"price\">\n      $\n      {cell.getValue().toLocaleString(undefined, {\n        minimumFractionDigits: 2,\n        maximumFractionDigits: 2,\n      })}\n    </span>\n  )\n}\n\n/**\n * Category badge cell\n */\nexport function CategoryCell() {\n  const cell = useCellContext<'electronics' | 'clothing' | 'food' | 'books'>()\n  const category = cell.getValue()\n  return <span class={`category-badge ${category}`}>{category}</span>\n}\n"
  },
  {
    "path": "examples/solid/composable-tables/src/components/header-components.tsx",
    "content": "/**\n * Header-level components that use useHeaderContext\n *\n * These components can be used via the pre-bound headerComponents\n * in AppHeader children, e.g., <header.SortIndicator />\n */\nimport { Show } from 'solid-js'\nimport { useHeaderContext } from '../hooks/table'\n\n/**\n * Sort indicator showing current sort direction\n */\nexport function SortIndicator() {\n  const header = useHeaderContext()\n  const sorted = () => header.column.getIsSorted()\n\n  return (\n    <Show when={sorted()}>\n      {(sorted) => (\n        <span class=\"sort-indicator\">{sorted() === 'asc' ? '🔼' : '🔽'}</span>\n      )}\n    </Show>\n  )\n}\n\n/**\n * Column filter input\n */\nexport function ColumnFilter() {\n  const header = useHeaderContext()\n  const canFilter = () => header.column.getCanFilter()\n\n  const columnFilterValue = () =>\n    (header.column.getFilterValue() ?? '') as string\n\n  return (\n    <Show when={canFilter()}>\n      <div class=\"column-filter\" onClick={(e) => e.stopPropagation()}>\n        <input\n          type=\"text\"\n          value={columnFilterValue()}\n          onChange={(e) => header.column.setFilterValue(e.target.value)}\n          placeholder={`Filter ${header.column.id}...`}\n        />\n      </div>\n    </Show>\n  )\n}\n\n/**\n * Footer showing the column ID\n */\nexport function FooterColumnId() {\n  const header = useHeaderContext()\n  return <span class=\"footer-column-id\">{header.column.id}</span>\n}\n\n/**\n * Footer showing a summary/aggregation for numeric columns\n */\nexport function FooterSum() {\n  const header = useHeaderContext()\n  const table = header.getContext().table\n  const rows = table.getFilteredRowModel().rows\n\n  // Calculate sum for numeric columns\n  const sum = () =>\n    rows.reduce((acc, row) => {\n      const value = row.getValue(header.column.id)\n      return acc + (typeof value === 'number' ? value : 0)\n    }, 0)\n\n  return (\n    <span class=\"footer-sum\">{sum() > 0 ? sum().toLocaleString() : '—'}</span>\n  )\n}\n"
  },
  {
    "path": "examples/solid/composable-tables/src/components/table-components.tsx",
    "content": "/**\n * Table-level components that use useTableContext\n *\n * These components can be used via the pre-bound tableComponents\n * directly on the table object, e.g., <table.PaginationControls />\n */\nimport { For, createMemo } from 'solid-js'\nimport { useTableContext } from '../hooks/table'\n\n/**\n * Pagination controls for the table\n */\nexport function PaginationControls() {\n  const table = useTableContext()\n\n  const pagination = createMemo(() => table.store.state.pagination)\n\n  return (\n    <div class=\"pagination\">\n      <button\n        onClick={() => table.firstPage()}\n        disabled={!table.getCanPreviousPage()}\n      >\n        {'<<'}\n      </button>\n      <button\n        onClick={() => table.previousPage()}\n        disabled={!table.getCanPreviousPage()}\n      >\n        {'<'}\n      </button>\n      <button\n        onClick={() => table.nextPage()}\n        disabled={!table.getCanNextPage()}\n      >\n        {'>'}\n      </button>\n      <button\n        onClick={() => table.lastPage()}\n        disabled={!table.getCanNextPage()}\n      >\n        {'>>'}\n      </button>\n      <span>\n        Page{' '}\n        <strong>\n          {pagination().pageIndex + 1} of{' '}\n          {table.getPageCount().toLocaleString()}\n        </strong>\n      </span>\n      <span>\n        | Go to page:\n        <input\n          type=\"number\"\n          min=\"1\"\n          max={table.getPageCount()}\n          value={pagination().pageIndex + 1}\n          onChange={(e) => {\n            const page = e.target.value ? Number(e.target.value) - 1 : 0\n            table.setPageIndex(page)\n          }}\n        />\n      </span>\n      <select\n        value={pagination().pageSize}\n        onChange={(e) => {\n          table.setPageSize(Number(e.target.value))\n        }}\n      >\n        <For each={[10, 20, 30, 40, 50]}>\n          {(pageSize) => <option value={pageSize}>Show {pageSize}</option>}\n        </For>\n      </select>\n    </div>\n  )\n}\n\n/**\n * Row count display\n */\nexport function RowCount() {\n  const table = useTableContext()\n\n  return (\n    <div class=\"row-count\">\n      Showing {table.getRowModel().rows.length.toLocaleString()} of{' '}\n      {table.getRowCount().toLocaleString()} rows\n    </div>\n  )\n}\n\n/**\n * Table toolbar with title and actions\n */\nexport function TableToolbar({\n  title,\n  onRefresh,\n}: {\n  title: string\n  onRefresh?: () => void\n}) {\n  const table = useTableContext()\n\n  return (\n    <div class=\"table-toolbar\">\n      <h2>{title}</h2>\n      <div>\n        <button onClick={() => table.resetColumnFilters()}>\n          Clear Filters\n        </button>\n        <button onClick={() => table.resetSorting()}>Clear Sorting</button>\n        {onRefresh && <button onClick={onRefresh}>Refresh Data</button>}\n      </div>\n    </div>\n  )\n}\n"
  },
  {
    "path": "examples/solid/composable-tables/src/hooks/table.ts",
    "content": "/**\n * Custom table hook setup using createTableHook\n *\n * This file creates a custom useAppTable hook with pre-bound components.\n * Features, row models, and default options are defined once here and shared across all tables.\n * Context hooks and a pre-bound createAppColumnHelper are also exported.\n */\nimport {\n  columnFilteringFeature,\n  createFilteredRowModel,\n  createPaginatedRowModel,\n  createSortedRowModel,\n  createTableHook,\n  filterFns,\n  rowPaginationFeature,\n  rowSortingFeature,\n  sortFns,\n  tableFeatures,\n} from '@tanstack/solid-table'\n\n// Import table-level components\nimport {\n  PaginationControls,\n  RowCount,\n  TableToolbar,\n} from '../components/table-components'\n\n// Import cell-level components\nimport {\n  CategoryCell,\n  NumberCell,\n  PriceCell,\n  ProgressCell,\n  RowActionsCell,\n  StatusCell,\n  TextCell,\n} from '../components/cell-components'\n\n// Import header/footer-level components (both use useHeaderContext)\nimport {\n  ColumnFilter,\n  FooterColumnId,\n  FooterSum,\n  SortIndicator,\n} from '../components/header-components'\n\n/**\n * Create the custom table hook with all pre-bound components.\n * This exports:\n * - createAppColumnHelper: Create column definitions with TFeatures already bound\n * - useAppTable: Hook for creating tables with TFeatures baked in\n * - useTableContext: Access table instance in tableComponents\n * - useCellContext: Access cell instance in cellComponents\n * - useHeaderContext: Access header instance in headerComponents\n */\nexport const {\n  createAppColumnHelper,\n  createAppTable,\n  useTableContext,\n  useCellContext,\n  useHeaderContext,\n} = createTableHook({\n  // Features are set once here and shared across all tables\n  _features: tableFeatures({\n    columnFilteringFeature,\n    rowPaginationFeature,\n    rowSortingFeature,\n  }),\n\n  // Row models are set once here\n  _rowModels: {\n    sortedRowModel: createSortedRowModel(sortFns),\n    filteredRowModel: createFilteredRowModel(filterFns),\n    paginatedRowModel: createPaginatedRowModel(),\n  },\n\n  // set any default table options here too\n  getRowId: (row) => row.id,\n\n  // Register table-level components (accessible via table.ComponentName)\n  tableComponents: {\n    PaginationControls,\n    RowCount,\n    TableToolbar,\n  },\n\n  // Register cell-level components (accessible via cell.ComponentName in AppCell)\n  cellComponents: {\n    TextCell,\n    NumberCell,\n    StatusCell,\n    ProgressCell,\n    RowActionsCell,\n    PriceCell,\n    CategoryCell,\n  },\n\n  // Register header/footer-level components (accessible via header.ComponentName in AppHeader/AppFooter)\n  headerComponents: {\n    SortIndicator,\n    ColumnFilter,\n    FooterColumnId,\n    FooterSum,\n  },\n})\n"
  },
  {
    "path": "examples/solid/composable-tables/src/index.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n  border-collapse: collapse;\n  width: 100%;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth,\ntd {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 8px 12px;\n  text-align: left;\n}\n\nth {\n  background-color: #f5f5f5;\n  font-weight: 600;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n\n.table-container {\n  padding: 16px;\n  max-width: 1200px;\n  margin: 0 auto;\n}\n\n.pagination {\n  display: flex;\n  align-items: center;\n  gap: 8px;\n  margin-top: 16px;\n  flex-wrap: wrap;\n}\n\n.pagination button {\n  border: 1px solid #ccc;\n  border-radius: 4px;\n  padding: 4px 8px;\n  cursor: pointer;\n  background: white;\n}\n\n.pagination button:disabled {\n  opacity: 0.5;\n  cursor: not-allowed;\n}\n\n.pagination input {\n  border: 1px solid #ccc;\n  border-radius: 4px;\n  padding: 4px;\n  width: 64px;\n}\n\n.pagination select {\n  border: 1px solid #ccc;\n  border-radius: 4px;\n  padding: 4px;\n}\n\n.sort-indicator {\n  margin-left: 4px;\n}\n\n.column-filter {\n  margin-top: 4px;\n}\n\n.column-filter input {\n  border: 1px solid #ccc;\n  border-radius: 4px;\n  padding: 4px;\n  width: 100%;\n  font-size: 12px;\n}\n\n.sortable-header {\n  cursor: pointer;\n  user-select: none;\n}\n\n.sortable-header:hover {\n  background-color: #e8e8e8;\n}\n\n.row-actions {\n  display: flex;\n  gap: 4px;\n}\n\n.row-actions button {\n  border: 1px solid #ccc;\n  border-radius: 4px;\n  padding: 2px 8px;\n  cursor: pointer;\n  background: white;\n  font-size: 12px;\n}\n\n.row-actions button:hover {\n  background-color: #f0f0f0;\n}\n\n.status-badge {\n  display: inline-block;\n  padding: 2px 8px;\n  border-radius: 12px;\n  font-size: 12px;\n  font-weight: 500;\n}\n\n.status-badge.relationship {\n  background-color: #d4edda;\n  color: #155724;\n}\n\n.status-badge.complicated {\n  background-color: #fff3cd;\n  color: #856404;\n}\n\n.status-badge.single {\n  background-color: #cce5ff;\n  color: #004085;\n}\n\n.progress-bar {\n  width: 100%;\n  height: 8px;\n  background-color: #e9ecef;\n  border-radius: 4px;\n  overflow: hidden;\n}\n\n.progress-bar-fill {\n  height: 100%;\n  background-color: #007bff;\n  transition: width 0.2s;\n}\n\n.table-toolbar {\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  margin-bottom: 16px;\n  flex-wrap: wrap;\n  gap: 8px;\n}\n\n.table-toolbar h2 {\n  margin: 0;\n}\n\n.table-toolbar button {\n  border: 1px solid #ccc;\n  border-radius: 4px;\n  padding: 8px 16px;\n  cursor: pointer;\n  background: white;\n}\n\n.table-toolbar button:hover {\n  background-color: #f0f0f0;\n}\n\n.row-count {\n  color: #666;\n  font-size: 14px;\n  margin-top: 8px;\n}\n\n.app {\n  padding: 16px;\n}\n\n.app h1 {\n  text-align: center;\n  margin-bottom: 8px;\n}\n\n.description {\n  text-align: center;\n  color: #666;\n  margin-bottom: 32px;\n}\n\n.description code {\n  background-color: #f5f5f5;\n  padding: 2px 6px;\n  border-radius: 4px;\n  font-size: 13px;\n}\n\n.table-divider {\n  height: 48px;\n  border-bottom: 1px solid #e0e0e0;\n  margin: 32px auto;\n  max-width: 1200px;\n}\n\n.category-badge {\n  display: inline-block;\n  padding: 2px 8px;\n  border-radius: 12px;\n  font-size: 12px;\n  font-weight: 500;\n  text-transform: capitalize;\n}\n\n.category-badge.electronics {\n  background-color: #e3f2fd;\n  color: #1565c0;\n}\n\n.category-badge.clothing {\n  background-color: #fce4ec;\n  color: #c2185b;\n}\n\n.category-badge.food {\n  background-color: #e8f5e9;\n  color: #2e7d32;\n}\n\n.category-badge.books {\n  background-color: #fff8e1;\n  color: #f57c00;\n}\n\n.price {\n  font-weight: 600;\n  color: #2e7d32;\n}\n"
  },
  {
    "path": "examples/solid/composable-tables/src/index.tsx",
    "content": "/* @refresh reload */\nimport { render } from 'solid-js/web'\nimport './index.css'\nimport App from './App'\n\nrender(() => <App />, document.getElementById('root') as HTMLElement)\n"
  },
  {
    "path": "examples/solid/composable-tables/src/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  subRows?: Array<Person>\n}\n\nexport type Product = {\n  id: string\n  name: string\n  category: 'electronics' | 'clothing' | 'food' | 'books'\n  price: number\n  stock: number\n  rating: number\n}\n\nconst range = (len: number) => {\n  const arr: Array<number> = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (): Person => {\n  return {\n    firstName: faker.person.firstName(),\n    lastName: faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: faker.number.int(1000),\n    progress: faker.number.int(100),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0],\n  }\n}\n\nconst newProduct = (): Product => {\n  return {\n    id: faker.string.uuid(),\n    name: faker.commerce.productName(),\n    category: faker.helpers.shuffle<Product['category']>([\n      'electronics',\n      'clothing',\n      'food',\n      'books',\n    ])[0],\n    price: parseFloat(faker.commerce.price({ min: 5, max: 500 })),\n    stock: faker.number.int({ min: 0, max: 200 }),\n    rating: faker.number.int({ min: 0, max: 100 }),\n  }\n}\n\nexport function makeData(...lens: Array<number>) {\n  const makeDataLevel = (depth = 0): Array<Person> => {\n    const len = lens[depth]\n    return range(len).map((): Person => {\n      return {\n        ...newPerson(),\n        subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined,\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n\nexport function makeProductData(count: number): Array<Product> {\n  return range(count).map(() => newProduct())\n}\n"
  },
  {
    "path": "examples/solid/composable-tables/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"module\": \"ESNext\",\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"preserve\",\n    \"jsxImportSource\": \"solid-js\",\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "examples/solid/composable-tables/vite.config.ts",
    "content": "import { defineConfig } from 'vite'\nimport solidPlugin from 'vite-plugin-solid'\n\nexport default defineConfig({\n  plugins: [solidPlugin()],\n  build: {\n    target: 'esnext',\n    polyfillDynamicImport: false,\n  },\n})\n"
  },
  {
    "path": "examples/solid/filters/.gitignore",
    "content": "node_modules\ndist"
  },
  {
    "path": "examples/solid/filters/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run start` or `yarn start`\n"
  },
  {
    "path": "examples/solid/filters/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"utf-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n    <meta name=\"theme-color\" content=\"#000000\" />\n    <link rel=\"shortcut icon\" type=\"image/ico\" href=\"/src/assets/favicon.ico\" />\n    <title>Solid App</title>\n  </head>\n  <body>\n    <noscript>You need to enable JavaScript to run this app.</noscript>\n    <div id=\"root\"></div>\n\n    <script src=\"/src/index.tsx\" type=\"module\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/solid/filters/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-solid-filters\",\n  \"version\": \"0.0.0\",\n  \"description\": \"\",\n  \"scripts\": {\n    \"start\": \"vite\",\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"lint\": \"eslint ./src\"\n  },\n  \"license\": \"MIT\",\n  \"devDependencies\": {\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\",\n    \"vite-plugin-solid\": \"^2.11.10\"\n  },\n  \"dependencies\": {\n    \"@solid-primitives/scheduled\": \"^1.5.2\",\n    \"@tanstack/solid-table\": \"^9.0.0-alpha.10\",\n    \"solid-js\": \"^1.9.11\"\n  }\n}\n"
  },
  {
    "path": "examples/solid/filters/src/App.tsx",
    "content": "import {\n  columnFacetingFeature,\n  columnFilteringFeature,\n  createFacetedMinMaxValues,\n  createFacetedRowModel,\n  createFacetedUniqueValues,\n  createFilteredRowModel,\n  createTable,\n  filterFns,\n  flexRender,\n  globalFilteringFeature,\n  tableFeatures,\n} from '@tanstack/solid-table'\nimport { debounce } from '@solid-primitives/scheduled'\nimport { For, createSignal } from 'solid-js'\nimport { makeData } from './makeData'\nimport ColumnFilter from './ColumnFilter'\nimport type { Person } from './makeData'\nimport type { ColumnDef } from '@tanstack/solid-table'\n\nexport const _features = tableFeatures({\n  columnFilteringFeature,\n  globalFilteringFeature,\n  columnFacetingFeature,\n})\n\nconst columns: Array<ColumnDef<typeof _features, Person>> = [\n  {\n    header: 'Name',\n    footer: (props) => props.column.id,\n    columns: [\n      {\n        accessorKey: 'firstName',\n        cell: (info) => info.getValue(),\n        footer: (props) => props.column.id,\n      },\n      {\n        accessorFn: (row) => row.lastName,\n        id: 'lastName',\n        cell: (info) => info.getValue(),\n        header: () => <span>Last Name</span>,\n        footer: (props) => props.column.id,\n      },\n    ],\n  },\n  {\n    header: 'Info',\n    footer: (props) => props.column.id,\n    columns: [\n      {\n        accessorKey: 'age',\n        header: () => 'Age',\n        footer: (props) => props.column.id,\n        filterFn: 'inNumberRange',\n      },\n      {\n        header: 'More Info',\n        columns: [\n          {\n            accessorKey: 'visits',\n            header: () => <span>Visits</span>,\n            footer: (props) => props.column.id,\n            filterFn: 'inNumberRange',\n          },\n          {\n            accessorKey: 'status',\n            header: 'Status',\n            footer: (props) => props.column.id,\n          },\n          {\n            accessorKey: 'progress',\n            header: 'Profile Progress',\n            footer: (props) => props.column.id,\n            filterFn: 'inNumberRange',\n          },\n        ],\n      },\n    ],\n  },\n]\n\nfunction App() {\n  const [data, setData] = createSignal(makeData(1_000))\n  const refreshData = () => setData(makeData(50_000)) // stress test\n\n  const table = createTable({\n    _features,\n    _rowModels: {\n      facetedRowModel: createFacetedRowModel(),\n      facetedMinMaxValues: createFacetedMinMaxValues(),\n      facetedUniqueValues: createFacetedUniqueValues(),\n      filteredRowModel: createFilteredRowModel(filterFns),\n    },\n    get data() {\n      return data()\n    },\n    columns,\n    globalFilterFn: 'includesString',\n    debugTable: true,\n    debugHeaders: true,\n    debugColumns: false,\n  })\n\n  const debounceSetGlobalFilter = debounce((value: string) => {\n    table.setGlobalFilter(value)\n  }, 500)\n\n  return (\n    <table.Subscribe\n      selector={(state) => ({\n        columnFilters: state.columnFilters,\n        globalFilter: state.globalFilter,\n      })}\n    >\n      {(state) => (\n        <div class=\"p-2\">\n          <input\n            class=\"p-2 font-lg shadow border border-block\"\n            value={state().globalFilter ?? ''}\n            onInput={(e) => debounceSetGlobalFilter(e.currentTarget.value)}\n            placeholder=\"Search all columns...\"\n          />\n          <div class=\"h-2\" />\n          <table>\n            <thead>\n              <For each={table.getHeaderGroups()}>\n                {(headerGroup) => (\n                  <tr>\n                    <For each={headerGroup.headers}>\n                      {(header) => (\n                        <th colSpan={header.colSpan}>\n                          {header.isPlaceholder ? null : (\n                            <>\n                              {flexRender(\n                                header.column.columnDef.header,\n                                header.getContext(),\n                              )}\n                              {header.column.getCanFilter() ? (\n                                <div>\n                                  <ColumnFilter\n                                    column={header.column}\n                                    table={table as any}\n                                  />\n                                </div>\n                              ) : null}\n                            </>\n                          )}\n                        </th>\n                      )}\n                    </For>\n                  </tr>\n                )}\n              </For>\n            </thead>\n            <tbody>\n              <For each={table.getRowModel().rows.slice(0, 10)}>\n                {(row) => (\n                  <tr>\n                    <For each={row.getAllCells()}>\n                      {(cell) => (\n                        <td>\n                          {flexRender(\n                            cell.column.columnDef.cell,\n                            cell.getContext(),\n                          )}\n                        </td>\n                      )}\n                    </For>\n                  </tr>\n                )}\n              </For>\n            </tbody>\n          </table>\n          <div>{table.getRowModel().rows.length} Rows</div>\n          <div>\n            <button onClick={() => refreshData()}>Refresh Data</button>\n          </div>\n          <table.Subscribe selector={(state) => state}>\n            {(state) => <pre>{JSON.stringify(state(), null, 2)}</pre>}\n          </table.Subscribe>\n        </div>\n      )}\n    </table.Subscribe>\n  )\n}\n\nexport default App\n"
  },
  {
    "path": "examples/solid/filters/src/ColumnFilter.tsx",
    "content": "import { debounce } from '@solid-primitives/scheduled'\nimport { Show } from 'solid-js'\nimport type { Person } from './makeData'\nimport type { _features } from './App'\nimport type { Column, Table } from '@tanstack/solid-table'\n\nfunction ColumnFilter(props: {\n  column: Column<typeof _features, Person, unknown>\n  table: Table<typeof _features, Person>\n}) {\n  const firstValue = props.table\n    .getPreFilteredRowModel()\n    .flatRows[0]?.getValue(props.column.id)\n\n  const columnFilterValue = () => props.column.getFilterValue()\n\n  return (\n    <Show\n      when={typeof firstValue === 'number'}\n      fallback={\n        <div>\n          <input\n            type=\"text\"\n            value={(columnFilterValue() ?? '') as string}\n            onInput={debounce(\n              (e) => props.column.setFilterValue(e.target.value),\n              500,\n            )}\n            placeholder={`Search...`}\n            class=\"w-36 border shadow rounded\"\n            list={`${props.column.id}list`}\n          />\n        </div>\n      }\n    >\n      <div>\n        <div class=\"flex space-x-2\">\n          <input\n            type=\"number\"\n            min={0}\n            max={100}\n            value={\n              (columnFilterValue() as [number, number] | undefined)?.[0] ?? ''\n            }\n            onInput={debounce(\n              (e) =>\n                props.column.setFilterValue(\n                  (old: [number, number] | undefined) => [\n                    e.target.value,\n                    old?.[1] ?? '',\n                  ],\n                ),\n              500,\n            )}\n            placeholder={`Min`}\n            class=\"w-24 border shadow rounded\"\n          />\n          <input\n            type=\"number\"\n            min={0}\n            max={100}\n            value={\n              (columnFilterValue() as [number, number] | undefined)?.[1] ?? ''\n            }\n            onInput={debounce(\n              (e) =>\n                props.column.setFilterValue(\n                  (old: [number, number] | undefined) => [\n                    old?.[0] ?? '',\n                    e.target.value,\n                  ],\n                ),\n              500,\n            )}\n            placeholder={`Max`}\n            class=\"w-24 border shadow rounded\"\n          />\n        </div>\n      </div>\n    </Show>\n  )\n}\n\nexport default ColumnFilter\n"
  },
  {
    "path": "examples/solid/filters/src/index.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n"
  },
  {
    "path": "examples/solid/filters/src/index.tsx",
    "content": "/* @refresh reload */\nimport { render } from 'solid-js/web'\nimport './index.css'\nimport App from './App'\n\nrender(() => <App />, document.getElementById('root') as HTMLElement)\n"
  },
  {
    "path": "examples/solid/filters/src/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  subRows?: Array<Person>\n}\n\nconst range = (len: number) => {\n  const arr: Array<number> = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (): Person => {\n  return {\n    firstName: faker.person.firstName(),\n    lastName: faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: faker.number.int(1000),\n    progress: faker.number.int(100),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0],\n  }\n}\n\nexport function makeData(...lens: Array<number>) {\n  const makeDataLevel = (depth = 0): Array<Person> => {\n    const len = lens[depth]\n    return range(len).map((d): Person => {\n      return {\n        ...newPerson(),\n        subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined,\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n"
  },
  {
    "path": "examples/solid/filters/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"module\": \"ESNext\",\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"preserve\",\n    \"jsxImportSource\": \"solid-js\",\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "examples/solid/filters/vite.config.ts",
    "content": "import { defineConfig } from 'vite'\nimport solidPlugin from 'vite-plugin-solid'\n\nexport default defineConfig({\n  plugins: [solidPlugin()],\n  build: {\n    target: 'esnext',\n    polyfillDynamicImport: false,\n  },\n})\n"
  },
  {
    "path": "examples/solid/filters-faceted/.gitignore",
    "content": "node_modules\ndist"
  },
  {
    "path": "examples/solid/filters-faceted/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run start` or `yarn start`\n"
  },
  {
    "path": "examples/solid/filters-faceted/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"utf-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n    <meta name=\"theme-color\" content=\"#000000\" />\n    <link rel=\"shortcut icon\" type=\"image/ico\" href=\"/src/assets/favicon.ico\" />\n    <title>Solid App</title>\n  </head>\n  <body>\n    <noscript>You need to enable JavaScript to run this app.</noscript>\n    <div id=\"root\"></div>\n\n    <script src=\"/src/index.tsx\" type=\"module\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/solid/filters-faceted/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-solid-filters-faceted\",\n  \"version\": \"0.0.0\",\n  \"description\": \"\",\n  \"scripts\": {\n    \"start\": \"vite\",\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"lint\": \"eslint ./src\"\n  },\n  \"license\": \"MIT\",\n  \"devDependencies\": {\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\",\n    \"vite-plugin-solid\": \"^2.11.10\"\n  },\n  \"dependencies\": {\n    \"@solid-primitives/scheduled\": \"^1.5.2\",\n    \"@tanstack/solid-table\": \"^9.0.0-alpha.10\",\n    \"solid-js\": \"^1.9.11\"\n  }\n}\n"
  },
  {
    "path": "examples/solid/filters-faceted/src/App.tsx",
    "content": "import {\n  columnFacetingFeature,\n  columnFilteringFeature,\n  createFacetedMinMaxValues,\n  createFacetedRowModel,\n  createFacetedUniqueValues,\n  createFilteredRowModel,\n  createTable,\n  filterFns,\n  flexRender,\n  globalFilteringFeature,\n  tableFeatures,\n} from '@tanstack/solid-table'\nimport { debounce } from '@solid-primitives/scheduled'\nimport { For, createSignal } from 'solid-js'\nimport { makeData } from './makeData'\nimport ColumnFilter from './ColumnFilter'\nimport type { Person } from './makeData'\nimport type { ColumnDef } from '@tanstack/solid-table'\n\nexport const _features = tableFeatures({\n  columnFilteringFeature,\n  globalFilteringFeature,\n  columnFacetingFeature,\n})\n\nconst columns: Array<ColumnDef<typeof _features, Person>> = [\n  {\n    header: 'Name',\n    footer: (props) => props.column.id,\n    columns: [\n      {\n        accessorKey: 'firstName',\n        cell: (info) => info.getValue(),\n        footer: (props) => props.column.id,\n      },\n      {\n        accessorFn: (row) => row.lastName,\n        id: 'lastName',\n        cell: (info) => info.getValue(),\n        header: () => <span>Last Name</span>,\n        footer: (props) => props.column.id,\n      },\n    ],\n  },\n  {\n    header: 'Info',\n    footer: (props) => props.column.id,\n    columns: [\n      {\n        accessorKey: 'age',\n        header: () => 'Age',\n        footer: (props) => props.column.id,\n      },\n      {\n        header: 'More Info',\n        columns: [\n          {\n            accessorKey: 'visits',\n            header: () => <span>Visits</span>,\n            footer: (props) => props.column.id,\n          },\n          {\n            accessorKey: 'status',\n            header: 'Status',\n            footer: (props) => props.column.id,\n          },\n          {\n            accessorKey: 'progress',\n            header: 'Profile Progress',\n            footer: (props) => props.column.id,\n          },\n        ],\n      },\n    ],\n  },\n]\n\nfunction App() {\n  const [data, setData] = createSignal(makeData(1_000))\n  const refreshData = () => setData(makeData(50_000)) // stress test\n\n  const table = createTable({\n    _features,\n    _rowModels: {\n      facetedRowModel: createFacetedRowModel(),\n      facetedMinMaxValues: createFacetedMinMaxValues(),\n      facetedUniqueValues: createFacetedUniqueValues(),\n      filteredRowModel: createFilteredRowModel(filterFns),\n    },\n    get data() {\n      return data()\n    },\n    columns,\n    globalFilterFn: 'includesString',\n    debugTable: true,\n    debugHeaders: true,\n    debugColumns: false,\n  })\n\n  const debounceSetGlobalFilter = debounce((value: string) => {\n    table.setGlobalFilter(value)\n  }, 500)\n\n  return (\n    <table.Subscribe\n      selector={(state) => ({\n        columnFilters: state.columnFilters,\n        globalFilter: state.globalFilter,\n      })}\n    >\n      {(state) => (\n        <div class=\"p-2\">\n          <input\n            class=\"p-2 font-lg shadow border border-block\"\n            value={state().globalFilter ?? ''}\n            onInput={(e) => debounceSetGlobalFilter(e.currentTarget.value)}\n            placeholder=\"Search all columns...\"\n          />\n          <div class=\"h-2\" />\n          <table>\n            <thead>\n              <For each={table.getHeaderGroups()}>\n                {(headerGroup) => (\n                  <tr>\n                    <For each={headerGroup.headers}>\n                      {(header) => (\n                        <th colSpan={header.colSpan}>\n                          {header.isPlaceholder ? null : (\n                            <>\n                              {flexRender(\n                                header.column.columnDef.header,\n                                header.getContext(),\n                              )}\n                              {header.column.getCanFilter() ? (\n                                <div>\n                                  <ColumnFilter\n                                    column={header.column}\n                                    table={table as any}\n                                  />\n                                </div>\n                              ) : null}\n                            </>\n                          )}\n                        </th>\n                      )}\n                    </For>\n                  </tr>\n                )}\n              </For>\n            </thead>\n            <tbody>\n              <For each={table.getRowModel().rows.slice(0, 10)}>\n                {(row) => (\n                  <tr>\n                    <For each={row.getAllCells()}>\n                      {(cell) => (\n                        <td>\n                          {flexRender(\n                            cell.column.columnDef.cell,\n                            cell.getContext(),\n                          )}\n                        </td>\n                      )}\n                    </For>\n                  </tr>\n                )}\n              </For>\n            </tbody>\n          </table>\n          <div>{table.getRowModel().rows.length} Rows</div>\n          <div>\n            <button onClick={() => refreshData()}>Refresh Data</button>\n          </div>\n          <table.Subscribe selector={(state) => state}>\n            {(state) => <pre>{JSON.stringify(state(), null, 2)}</pre>}\n          </table.Subscribe>\n        </div>\n      )}\n    </table.Subscribe>\n  )\n}\n\nexport default App\n"
  },
  {
    "path": "examples/solid/filters-faceted/src/ColumnFilter.tsx",
    "content": "import { debounce } from '@solid-primitives/scheduled'\nimport { For, Show, createMemo } from 'solid-js'\nimport type { Person } from './makeData'\nimport type { _features } from './App'\nimport type { Column, Table } from '@tanstack/solid-table'\n\nfunction ColumnFilter(props: {\n  column: Column<typeof _features, Person>\n  table: Table<typeof _features, Person>\n}) {\n  const firstValue = props.table\n    .getPreFilteredRowModel()\n    .flatRows[0]?.getValue(props.column.id)\n\n  const columnFilterValue = () => props.column.getFilterValue()\n\n  const sortedUniqueValues = createMemo(() =>\n    typeof firstValue === 'number'\n      ? []\n      : Array.from(props.column.getFacetedUniqueValues().keys()).sort(),\n  )\n\n  return (\n    <Show\n      when={typeof firstValue === 'number'}\n      fallback={\n        <div>\n          <datalist id={`${props.column.id}list`}>\n            <For each={sortedUniqueValues().slice(0, 5000)}>\n              {(value: string) => <option value={value} />}\n            </For>\n          </datalist>\n          <input\n            type=\"text\"\n            value={(columnFilterValue() ?? '') as string}\n            onInput={debounce(\n              (e) => props.column.setFilterValue(e.target.value),\n              500,\n            )}\n            placeholder={`Search... (${props.column.getFacetedUniqueValues().size})`}\n            class=\"w-36 border shadow rounded\"\n            list={`${props.column.id}list`}\n          />\n        </div>\n      }\n    >\n      <div>\n        <div class=\"flex space-x-2\">\n          <input\n            type=\"number\"\n            min={Number(props.column.getFacetedMinMaxValues()?.[0] ?? '')}\n            max={Number(props.column.getFacetedMinMaxValues()?.[1] ?? '')}\n            value={\n              (columnFilterValue() as [number, number] | undefined)?.[0] ?? ''\n            }\n            onInput={debounce(\n              (e) =>\n                props.column.setFilterValue((old: [number, number]) => [\n                  e.target.value,\n                  old[1],\n                ]),\n              500,\n            )}\n            placeholder={`Min ${\n              props.column.getFacetedMinMaxValues()?.[0]\n                ? `(${props.column.getFacetedMinMaxValues()?.[0]})`\n                : ''\n            }`}\n            class=\"w-24 border shadow rounded\"\n          />\n          <input\n            type=\"number\"\n            min={Number(props.column.getFacetedMinMaxValues()?.[0] ?? '')}\n            max={Number(props.column.getFacetedMinMaxValues()?.[1] ?? '')}\n            value={\n              (columnFilterValue() as [number, number] | undefined)?.[1] ?? ''\n            }\n            onInput={debounce(\n              (e) =>\n                props.column.setFilterValue((old: [number, number]) => [\n                  old[0],\n                  e.target.value,\n                ]),\n              500,\n            )}\n            placeholder={`Max ${\n              props.column.getFacetedMinMaxValues()?.[1]\n                ? `(${props.column.getFacetedMinMaxValues()?.[1]})`\n                : ''\n            }`}\n            class=\"w-24 border shadow rounded\"\n          />\n        </div>\n      </div>\n    </Show>\n  )\n}\n\nexport default ColumnFilter\n"
  },
  {
    "path": "examples/solid/filters-faceted/src/index.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n"
  },
  {
    "path": "examples/solid/filters-faceted/src/index.tsx",
    "content": "/* @refresh reload */\nimport { render } from 'solid-js/web'\nimport './index.css'\nimport App from './App'\n\nrender(() => <App />, document.getElementById('root') as HTMLElement)\n"
  },
  {
    "path": "examples/solid/filters-faceted/src/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  subRows?: Array<Person>\n}\n\nconst range = (len: number) => {\n  const arr: Array<number> = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (): Person => {\n  return {\n    firstName: faker.person.firstName(),\n    lastName: faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: faker.number.int(1000),\n    progress: faker.number.int(100),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0],\n  }\n}\n\nexport function makeData(...lens: Array<number>) {\n  const makeDataLevel = (depth = 0): Array<Person> => {\n    const len = lens[depth]\n    return range(len).map((d): Person => {\n      return {\n        ...newPerson(),\n        subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined,\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n"
  },
  {
    "path": "examples/solid/filters-faceted/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"module\": \"ESNext\",\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"preserve\",\n    \"jsxImportSource\": \"solid-js\",\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "examples/solid/filters-faceted/vite.config.ts",
    "content": "import { defineConfig } from 'vite'\nimport solidPlugin from 'vite-plugin-solid'\n\nexport default defineConfig({\n  plugins: [solidPlugin()],\n  build: {\n    target: 'esnext',\n    polyfillDynamicImport: false,\n  },\n})\n"
  },
  {
    "path": "examples/solid/row-selection/README.md",
    "content": "# Row Selection Example\n\nThis example demonstrates row selection functionality with TanStack Table in SolidJS.\n\n## Features\n\n- Row selection with checkboxes\n- Select all / deselect all functionality\n- Page-level row selection\n- Filtering and pagination with row selection\n- Fine-grained reactivity using `table.Subscribe` for optimal performance\n\n## Running the Example\n\n- `npm install` or `yarn`\n- `npm run start` or `yarn start`\n"
  },
  {
    "path": "examples/solid/row-selection/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"utf-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n    <meta name=\"theme-color\" content=\"#000000\" />\n    <title>Solid Row Selection Example</title>\n  </head>\n  <body>\n    <noscript>You need to enable JavaScript to run this app.</noscript>\n    <div id=\"root\"></div>\n\n    <script src=\"/src/index.tsx\" type=\"module\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/solid/row-selection/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-solid-row-selection\",\n  \"version\": \"0.0.0\",\n  \"description\": \"\",\n  \"scripts\": {\n    \"start\": \"vite\",\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"lint\": \"eslint ./src\"\n  },\n  \"license\": \"MIT\",\n  \"devDependencies\": {\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\",\n    \"vite-plugin-solid\": \"^2.11.10\"\n  },\n  \"dependencies\": {\n    \"@tanstack/solid-devtools\": \"^0.7.26\",\n    \"@tanstack/solid-table\": \"^9.0.0-alpha.10\",\n    \"@tanstack/solid-table-devtools\": \"workspace:*\",\n    \"solid-js\": \"^1.9.11\"\n  }\n}\n"
  },
  {
    "path": "examples/solid/row-selection/src/App.tsx",
    "content": "import type {\n  Column,\n  ColumnDef,\n  SolidTable,\n  Table,\n} from '@tanstack/solid-table'\nimport {\n  columnFilteringFeature,\n  createFilteredRowModel,\n  createPaginatedRowModel,\n  createTable,\n  filterFns,\n  flexRender,\n  globalFilteringFeature,\n  rowPaginationFeature,\n  rowSelectionFeature,\n  tableFeatures,\n} from '@tanstack/solid-table'\nimport { For, Show, createEffect, createSignal } from 'solid-js'\nimport type { Person } from './makeData'\nimport { makeData } from './makeData'\nimport './index.css'\nimport { TanStackDevtools } from '@tanstack/solid-devtools'\nimport { tableDevtoolsPlugin } from '@tanstack/solid-table-devtools'\n\nexport const _features = tableFeatures({\n  rowPaginationFeature,\n  rowSelectionFeature,\n  columnFilteringFeature,\n  globalFilteringFeature,\n})\n\nfunction App() {\n  const [data, setData] = createSignal(makeData(1_000))\n  const refreshData = () => setData(makeData(100_000)) // stress test\n  const [enableRowSelection, setEnableRowSelection] = createSignal(true)\n\n  // Create table first with a placeholder for columns\n  let table: SolidTable<typeof _features, Person>\n\n  const columns: Array<ColumnDef<typeof _features, Person>> = [\n    {\n      id: 'select',\n      header: () => {\n        return (\n          <table.Subscribe selector={(state) => state.rowSelection}>\n            {() => (\n              <IndeterminateCheckbox\n                checked={table.getIsAllRowsSelected()}\n                indeterminate={table.getIsSomeRowsSelected()}\n                onChange={table.getToggleAllRowsSelectedHandler()}\n              />\n            )}\n          </table.Subscribe>\n        )\n      },\n      cell: ({ row }) => {\n        return (\n          <div class=\"px-1\">\n            <IndeterminateCheckbox\n              checked={row.getIsSelected()}\n              disabled={!row.getCanSelect()}\n              indeterminate={row.getIsSomeSelected()}\n              onChange={row.getToggleSelectedHandler()}\n            />\n          </div>\n        )\n      },\n    },\n    {\n      header: 'Name',\n      footer: (props) => props.column.id,\n      columns: [\n        {\n          accessorKey: 'firstName',\n          cell: (info) => info.getValue(),\n          footer: (props) => props.column.id,\n        },\n        {\n          accessorFn: (row) => row.lastName,\n          id: 'lastName',\n          cell: (info) => info.getValue(),\n          header: () => <span>Last Name</span>,\n          footer: (props) => props.column.id,\n        },\n      ],\n    },\n    {\n      header: 'Info',\n      footer: (props) => props.column.id,\n      columns: [\n        {\n          accessorKey: 'age',\n          header: () => 'Age',\n          footer: (props) => props.column.id,\n        },\n        {\n          header: 'More Info',\n          columns: [\n            {\n              accessorKey: 'visits',\n              header: () => <span>Visits</span>,\n              footer: (props) => props.column.id,\n            },\n            {\n              accessorKey: 'status',\n              header: 'Status',\n              footer: (props) => props.column.id,\n            },\n            {\n              accessorKey: 'progress',\n              header: 'Profile Progress',\n              footer: (props) => props.column.id,\n            },\n          ],\n        },\n      ],\n    },\n  ]\n\n  table = createTable({\n    _features,\n    _rowModels: {\n      filteredRowModel: createFilteredRowModel(filterFns),\n      paginatedRowModel: createPaginatedRowModel(),\n    },\n    get data() {\n      return data()\n    },\n    columns,\n    getRowId: (row) => row.id,\n    get enableRowSelection() {\n      return enableRowSelection()\n    },\n    debugTable: true,\n  })\n\n  return (\n    // <table.Subscribe\n    //   selector={(state) => ({\n    //     // don't include row selection state to optimize re-renders\n    //     columnFilters: state.columnFilters,\n    //     globalFilter: state.globalFilter,\n    //     pagination: state.pagination,\n    //   })}\n    // >\n    //   {(state) => (\n    <div class=\"p-2\">\n      <TanStackDevtools plugins={[tableDevtoolsPlugin({ table })]} />\n\n      <div>\n        <table.Subscribe\n          selector={(state) => ({ globalFilter: state.globalFilter })}\n        >\n          {(state) => (\n            <input\n              value={state().globalFilter ?? ''}\n              onInput={(e) => table.setGlobalFilter(e.target.value)}\n              class=\"p-2 font-lg shadow border border-block\"\n              placeholder=\"Search all columns...\"\n            />\n          )}\n        </table.Subscribe>\n      </div>\n      <div class=\"h-2\" />\n      <table>\n        <thead>\n          <For each={table.getHeaderGroups()}>\n            {(headerGroup) => (\n              <tr>\n                <For each={headerGroup.headers}>\n                  {(header) => (\n                    <th colSpan={header.colSpan}>\n                      <Show when={!header.isPlaceholder}>\n                        <>\n                          {flexRender(\n                            header.column.columnDef.header,\n                            header.getContext(),\n                          )}\n                          <Show when={header.column.getCanFilter()}>\n                            <div>\n                              <Filter column={header.column} table={table} />\n                            </div>\n                          </Show>\n                        </>\n                      </Show>\n                    </th>\n                  )}\n                </For>\n              </tr>\n            )}\n          </For>\n        </thead>\n        <tbody>\n          <For each={table.getRowModel().rows}>\n            {(row) => (\n              <table.Subscribe\n                selector={(state) => state.rowSelection[row.id]} // only re-render row when row selection changes (could down move to cell render too)\n              >\n                {() => (\n                  <tr>\n                    <For each={row.getAllCells()}>\n                      {(cell) => (\n                        <td>\n                          {flexRender(\n                            cell.column.columnDef.cell,\n                            cell.getContext(),\n                          )}\n                        </td>\n                      )}\n                    </For>\n                  </tr>\n                )}\n              </table.Subscribe>\n            )}\n          </For>\n        </tbody>\n        <tfoot>\n          <tr>\n            <td class=\"p-1\">\n              <table.Subscribe selector={(state) => state.rowSelection}>\n                {() => (\n                  <IndeterminateCheckbox\n                    checked={table.getIsAllPageRowsSelected()}\n                    indeterminate={table.getIsSomePageRowsSelected()}\n                    onChange={table.getToggleAllPageRowsSelectedHandler()}\n                  />\n                )}\n              </table.Subscribe>\n            </td>\n            <td colSpan={20}>Page Rows ({table.getRowModel().rows.length})</td>\n          </tr>\n        </tfoot>\n      </table>\n      <div class=\"h-2\" />\n      <div class=\"flex items-center gap-2\">\n        <button\n          class=\"border rounded p-1\"\n          onClick={() => table.setPageIndex(0)}\n          disabled={!table.getCanPreviousPage()}\n        >\n          {'<<'}\n        </button>\n        <button\n          class=\"border rounded p-1\"\n          onClick={() => table.previousPage()}\n          disabled={!table.getCanPreviousPage()}\n        >\n          {'<'}\n        </button>\n        <button\n          class=\"border rounded p-1\"\n          onClick={() => table.nextPage()}\n          disabled={!table.getCanNextPage()}\n        >\n          {'>'}\n        </button>\n        <button\n          class=\"border rounded p-1\"\n          onClick={() => table.setPageIndex(table.getPageCount() - 1)}\n          disabled={!table.getCanNextPage()}\n        >\n          {'>>'}\n        </button>\n        <table.Subscribe\n          selector={(state) => ({ pagination: state.pagination })}\n        >\n          {(state) => (\n            <>\n              <span class=\"flex items-center gap-1\">\n                <div>Page</div>\n                <strong>\n                  {state().pagination.pageIndex + 1} of {table.getPageCount()}\n                </strong>\n              </span>\n              <span class=\"flex items-center gap-1\">\n                | Go to page:\n                <input\n                  type=\"number\"\n                  min=\"1\"\n                  max={table.getPageCount()}\n                  value={state().pagination.pageIndex + 1}\n                  onInput={(e) => {\n                    const page = e.target.value ? Number(e.target.value) - 1 : 0\n                    table.setPageIndex(page)\n                  }}\n                  class=\"border p-1 rounded w-16\"\n                />\n              </span>\n              <select\n                value={state().pagination.pageSize}\n                onChange={(e) => {\n                  table.setPageSize(\n                    Number((e.target as HTMLSelectElement).value),\n                  )\n                }}\n              >\n                {[10, 20, 30, 40, 50].map((pageSize) => (\n                  <option value={pageSize}>Show {pageSize}</option>\n                ))}\n              </select>\n            </>\n          )}\n        </table.Subscribe>\n      </div>\n      <br />\n      <div>\n        <table.Subscribe\n          selector={(state) => ({\n            numSelected: Object.keys(state.rowSelection).length,\n          })}\n        >\n          {(state) => <>{state().numSelected} of </>}\n        </table.Subscribe>\n        {table.getPreFilteredRowModel().rows.length} Total Rows Selected\n      </div>\n      <hr />\n      <br />\n      <div>\n        <button class=\"border rounded p-2 mb-2\" onClick={() => refreshData()}>\n          Refresh Data\n        </button>\n      </div>\n      <div>\n        <button\n          class=\"border rounded p-2 mb-2\"\n          onClick={() =>\n            console.info(\n              'table.getSelectedRowModel().flatRows',\n              table.getSelectedRowModel().flatRows,\n            )\n          }\n        >\n          Log table.getSelectedRowModel().flatRows\n        </button>\n        <button\n          class=\"border rounded p-2 mb-2\"\n          onClick={() => setEnableRowSelection((prev) => !prev)}\n        >\n          {enableRowSelection() ? 'Disable' : 'Enable'} Row Selection\n        </button>\n      </div>\n      <div>\n        <label>Row Selection State:</label>\n        <table.Subscribe selector={(state) => state}>\n          {(state) => <pre>{JSON.stringify(state(), null, 2)}</pre>}\n        </table.Subscribe>\n      </div>\n    </div>\n  )\n}\n\nfunction Filter(props: {\n  column: Column<typeof _features, Person>\n  table: Table<typeof _features, Person>\n}) {\n  const firstValue = props.table\n    .getPreFilteredRowModel()\n    .flatRows[0]?.getValue(props.column.id)\n\n  return typeof firstValue === 'number' ? (\n    <div class=\"flex space-x-2\">\n      <input\n        type=\"number\"\n        value={((props.column.getFilterValue() as any)?.[0] ?? '') as string}\n        onInput={(e) =>\n          props.column.setFilterValue((old: any) => [e.target.value, old?.[1]])\n        }\n        placeholder={`Min`}\n        class=\"w-24 border shadow rounded\"\n      />\n      <input\n        type=\"number\"\n        value={((props.column.getFilterValue() as any)?.[1] ?? '') as string}\n        onInput={(e) =>\n          props.column.setFilterValue((old: any) => [old?.[0], e.target.value])\n        }\n        placeholder={`Max`}\n        class=\"w-24 border shadow rounded\"\n      />\n    </div>\n  ) : (\n    <input\n      type=\"text\"\n      value={(props.column.getFilterValue() ?? '') as string}\n      onInput={(e) => props.column.setFilterValue(e.target.value)}\n      placeholder={`Search...`}\n      class=\"w-36 border shadow rounded\"\n    />\n  )\n}\n\nfunction IndeterminateCheckbox(props: {\n  indeterminate?: boolean\n  class?: string\n  checked?: boolean\n  disabled?: boolean\n  onChange?: (event: Event) => void\n}) {\n  let ref: HTMLInputElement | undefined\n\n  createEffect(() => {\n    if (typeof props.indeterminate === 'boolean' && ref) {\n      ref.indeterminate = !props.checked && props.indeterminate\n    }\n  })\n\n  return (\n    <input\n      type=\"checkbox\"\n      ref={ref}\n      class={(props.class ?? '') + ' cursor-pointer'}\n      checked={props.checked}\n      disabled={props.disabled}\n      onChange={props.onChange}\n    />\n  )\n}\n\nexport default App\n"
  },
  {
    "path": "examples/solid/row-selection/src/index.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n"
  },
  {
    "path": "examples/solid/row-selection/src/index.tsx",
    "content": "/* @refresh reload */\nimport { render } from 'solid-js/web'\nimport './index.css'\nimport App from './App'\n\nrender(() => <App />, document.getElementById('root') as HTMLElement)\n"
  },
  {
    "path": "examples/solid/row-selection/src/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = {\n  id: string\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  subRows?: Array<Person>\n}\n\nconst range = (len: number) => {\n  const arr: Array<number> = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (): Person => {\n  return {\n    id: faker.string.uuid(),\n    firstName: faker.person.firstName(),\n    lastName: faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: faker.number.int(1000),\n    progress: faker.number.int(100),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0],\n  }\n}\n\nexport function makeData(...lens: Array<number>) {\n  const makeDataLevel = (depth = 0): Array<Person> => {\n    const len = lens[depth]\n    return range(len).map((_d): Person => {\n      return {\n        ...newPerson(),\n        subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined,\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n"
  },
  {
    "path": "examples/solid/row-selection/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"module\": \"ESNext\",\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"preserve\",\n    \"jsxImportSource\": \"solid-js\",\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "examples/solid/row-selection/vite.config.ts",
    "content": "import { defineConfig } from 'vite'\nimport solidPlugin from 'vite-plugin-solid'\n\nexport default defineConfig({\n  plugins: [solidPlugin()],\n  build: {\n    target: 'esnext',\n    polyfillDynamicImport: false,\n  },\n})\n"
  },
  {
    "path": "examples/solid/sorting/.gitignore",
    "content": "node_modules\ndist"
  },
  {
    "path": "examples/solid/sorting/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run start` or `yarn start`\n"
  },
  {
    "path": "examples/solid/sorting/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"utf-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n    <meta name=\"theme-color\" content=\"#000000\" />\n    <link rel=\"shortcut icon\" type=\"image/ico\" href=\"/src/assets/favicon.ico\" />\n    <title>Solid App</title>\n  </head>\n  <body>\n    <noscript>You need to enable JavaScript to run this app.</noscript>\n    <div id=\"root\"></div>\n\n    <script src=\"/src/index.tsx\" type=\"module\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/solid/sorting/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-solid-sorting\",\n  \"version\": \"0.0.0\",\n  \"description\": \"\",\n  \"scripts\": {\n    \"start\": \"vite\",\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"lint\": \"eslint ./src\"\n  },\n  \"license\": \"MIT\",\n  \"devDependencies\": {\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\",\n    \"vite-plugin-solid\": \"^2.11.10\"\n  },\n  \"dependencies\": {\n    \"@tanstack/solid-table\": \"^9.0.0-alpha.10\",\n    \"solid-js\": \"^1.9.11\"\n  }\n}\n"
  },
  {
    "path": "examples/solid/sorting/src/App.tsx",
    "content": "import {\n  createSortedRowModel,\n  createTable,\n  flexRender,\n  rowSortingFeature,\n  sortFns,\n  tableFeatures,\n} from '@tanstack/solid-table'\nimport { For, Show, createSignal } from 'solid-js'\nimport { makeData } from './makeData'\nimport type { ColumnDef } from '@tanstack/solid-table'\nimport type { Person } from './makeData'\n\nconst _features = tableFeatures({ rowSortingFeature })\n\nfunction App() {\n  const [data, setData] = createSignal(makeData(1_000))\n  const refreshData = () => setData(makeData(100_000)) // stress test\n\n  const columns: Array<ColumnDef<typeof _features, Person>> = [\n    {\n      header: 'Name',\n      footer: (props) => props.column.id,\n      columns: [\n        {\n          accessorKey: 'firstName',\n          cell: (info) => info.getValue(),\n          footer: (props) => props.column.id,\n        },\n        {\n          accessorFn: (row) => row.lastName,\n          id: 'lastName',\n          cell: (info) => info.getValue(),\n          header: () => <span>Last Name</span>,\n          footer: (props) => props.column.id,\n        },\n      ],\n    },\n    {\n      header: 'Info',\n      footer: (props) => props.column.id,\n      columns: [\n        {\n          accessorKey: 'age',\n          header: () => 'Age',\n          footer: (props) => props.column.id,\n        },\n        {\n          header: 'More Info',\n          columns: [\n            {\n              accessorKey: 'visits',\n              header: () => <span>Visits</span>,\n              footer: (props) => props.column.id,\n            },\n            {\n              accessorKey: 'status',\n              header: 'Status',\n              footer: (props) => props.column.id,\n            },\n            {\n              accessorKey: 'progress',\n              header: 'Profile Progress',\n              footer: (props) => props.column.id,\n            },\n          ],\n        },\n      ],\n    },\n  ]\n\n  const table = createTable({\n    _features,\n    _rowModels: {\n      sortedRowModel: createSortedRowModel(sortFns),\n    },\n    get data() {\n      return data()\n    },\n    columns,\n    debugTable: true,\n  })\n\n  return (\n    <table.Subscribe selector={(state) => ({ sorting: state.sorting })}>\n      {(_state) => (\n        <div class=\"p-2\">\n          <table>\n            <thead>\n              <For each={table.getHeaderGroups()}>\n                {(headerGroup) => (\n                  <tr>\n                    <For each={headerGroup.headers}>\n                      {(header) => (\n                        <th colSpan={header.colSpan}>\n                          <Show when={!header.isPlaceholder}>\n                            <div\n                              class={\n                                header.column.getCanSort()\n                                  ? 'cursor-pointer select-none'\n                                  : undefined\n                              }\n                              onClick={header.column.getToggleSortingHandler()}\n                            >\n                              {flexRender(\n                                header.column.columnDef.header,\n                                header.getContext(),\n                              )}\n                              {{\n                                asc: ' 🔼',\n                                desc: ' 🔽',\n                              }[header.column.getIsSorted() as string] ?? null}\n                            </div>\n                          </Show>\n                        </th>\n                      )}\n                    </For>\n                  </tr>\n                )}\n              </For>\n            </thead>\n            <tbody>\n              <For each={table.getRowModel().rows.slice(0, 10)}>\n                {(row) => (\n                  <tr>\n                    <For each={row.getAllCells()}>\n                      {(cell) => (\n                        <td>\n                          {flexRender(\n                            cell.column.columnDef.cell,\n                            cell.getContext(),\n                          )}\n                        </td>\n                      )}\n                    </For>\n                  </tr>\n                )}\n              </For>\n            </tbody>\n          </table>\n          <div>{table.getRowModel().rows.length} Rows</div>\n          <div>\n            <button onClick={() => refreshData()}>Refresh Data</button>\n          </div>\n          <table.Subscribe selector={(state) => state}>\n            {(state) => <pre>{JSON.stringify(state(), null, 2)}</pre>}\n          </table.Subscribe>\n        </div>\n      )}\n    </table.Subscribe>\n  )\n}\n\nexport default App\n"
  },
  {
    "path": "examples/solid/sorting/src/index.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n"
  },
  {
    "path": "examples/solid/sorting/src/index.tsx",
    "content": "/* @refresh reload */\nimport { render } from 'solid-js/web'\nimport './index.css'\nimport App from './App'\n\nrender(() => <App />, document.getElementById('root') as HTMLElement)\n"
  },
  {
    "path": "examples/solid/sorting/src/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  subRows?: Array<Person>\n}\n\nconst range = (len: number) => {\n  const arr: Array<number> = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (): Person => {\n  return {\n    firstName: faker.person.firstName(),\n    lastName: faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: faker.number.int(1000),\n    progress: faker.number.int(100),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0],\n  }\n}\n\nexport function makeData(...lens: Array<number>) {\n  const makeDataLevel = (depth = 0): Array<Person> => {\n    const len = lens[depth]\n    return range(len).map((d): Person => {\n      return {\n        ...newPerson(),\n        subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined,\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n"
  },
  {
    "path": "examples/solid/sorting/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"module\": \"ESNext\",\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"preserve\",\n    \"jsxImportSource\": \"solid-js\",\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "examples/solid/sorting/vite.config.ts",
    "content": "import { defineConfig } from 'vite'\nimport solidPlugin from 'vite-plugin-solid'\n\nexport default defineConfig({\n  plugins: [solidPlugin()],\n  build: {\n    target: 'esnext',\n    polyfillDynamicImport: false,\n  },\n})\n"
  },
  {
    "path": "examples/solid/with-tanstack-query/.gitignore",
    "content": "node_modules\ndist"
  },
  {
    "path": "examples/solid/with-tanstack-query/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run start` or `yarn start`\n"
  },
  {
    "path": "examples/solid/with-tanstack-query/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"utf-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n    <meta name=\"theme-color\" content=\"#000000\" />\n    <link rel=\"shortcut icon\" type=\"image/ico\" href=\"/src/assets/favicon.ico\" />\n    <title>Solid App</title>\n  </head>\n  <body>\n    <noscript>You need to enable JavaScript to run this app.</noscript>\n    <div id=\"root\"></div>\n\n    <script src=\"/src/index.tsx\" type=\"module\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/solid/with-tanstack-query/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-solid-with-tanstack-query\",\n  \"version\": \"0.0.0\",\n  \"description\": \"\",\n  \"scripts\": {\n    \"start\": \"vite\",\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"lint\": \"eslint ./src\"\n  },\n  \"license\": \"MIT\",\n  \"devDependencies\": {\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\",\n    \"vite-plugin-solid\": \"^2.11.10\"\n  },\n  \"dependencies\": {\n    \"@tanstack/solid-query\": \"^5.90.20\",\n    \"@tanstack/solid-store\": \"^0.9.2\",\n    \"@tanstack/solid-table\": \"^9.0.0-alpha.10\",\n    \"solid-js\": \"^1.9.11\"\n  }\n}\n"
  },
  {
    "path": "examples/solid/with-tanstack-query/src/App.tsx",
    "content": "import { keepPreviousData, useQuery } from '@tanstack/solid-query'\nimport { createStore, useStore } from '@tanstack/solid-store'\nimport {\n  createColumnHelper,\n  createTable,\n  flexRender,\n  getInitialTableState,\n  rowPaginationFeature,\n  tableFeatures,\n} from '@tanstack/solid-table'\nimport { For } from 'solid-js'\nimport { fetchData } from './fetchData'\nimport type { Person } from './fetchData'\n\nconst _features = tableFeatures({\n  rowPaginationFeature,\n})\n\nconst columnHelper = createColumnHelper<typeof _features, Person>()\n\nconst columns = columnHelper.columns([\n  columnHelper.accessor('firstName', {\n    header: 'First Name',\n    cell: (info) => info.getValue(),\n  }),\n  columnHelper.accessor('lastName', {\n    header: 'Last Name',\n    cell: (info) => info.getValue(),\n  }),\n  columnHelper.accessor('age', {\n    header: 'Age',\n  }),\n  columnHelper.accessor('visits', {\n    header: 'Visits',\n  }),\n  columnHelper.accessor('status', {\n    header: 'Status',\n  }),\n  columnHelper.accessor('progress', {\n    header: 'Profile Progress',\n  }),\n])\n\nconst myTableStore = createStore(\n  getInitialTableState(_features, {\n    pagination: { pageIndex: 0, pageSize: 10 },\n  }),\n)\n\nfunction App() {\n  const state = useStore(myTableStore)\n\n  const dataQuery = useQuery(() => ({\n    queryKey: ['data', state().pagination],\n    queryFn: () => fetchData(state().pagination),\n    placeholderData: keepPreviousData,\n  }))\n\n  const defaultData: Array<Person> = []\n\n  const table = createTable({\n    _features,\n    _rowModels: {},\n    columns,\n    get data() {\n      return dataQuery.data?.rows ?? defaultData\n    },\n    get rowCount() {\n      return dataQuery.data?.rowCount\n    },\n    store: myTableStore,\n    manualPagination: true,\n    debugTable: true,\n  })\n\n  return (\n    <div class=\"p-2\">\n      <div class=\"h-2\" />\n      <table>\n        <thead>\n          <For each={table.getHeaderGroups()}>\n            {(headerGroup) => (\n              <tr>\n                <For each={headerGroup.headers}>\n                  {(header) => (\n                    <th colSpan={header.colSpan}>\n                      {header.isPlaceholder\n                        ? null\n                        : flexRender(\n                            header.column.columnDef.header,\n                            header.getContext(),\n                          )}\n                    </th>\n                  )}\n                </For>\n              </tr>\n            )}\n          </For>\n        </thead>\n        <tbody>\n          <For each={table.getRowModel().rows}>\n            {(row) => (\n              <tr>\n                <For each={row.getAllCells()}>\n                  {(cell) => (\n                    <td>\n                      {flexRender(\n                        cell.column.columnDef.cell,\n                        cell.getContext(),\n                      )}\n                    </td>\n                  )}\n                </For>\n              </tr>\n            )}\n          </For>\n        </tbody>\n      </table>\n      <div class=\"h-2\" />\n      <div class=\"flex items-center gap-2\">\n        <button\n          class=\"border rounded p-1\"\n          onClick={() => table.firstPage()}\n          disabled={!table.getCanPreviousPage()}\n        >\n          {'<<'}\n        </button>\n        <button\n          class=\"border rounded p-1\"\n          onClick={() => table.previousPage()}\n          disabled={!table.getCanPreviousPage()}\n        >\n          {'<'}\n        </button>\n        <button\n          class=\"border rounded p-1\"\n          onClick={() => table.nextPage()}\n          disabled={!table.getCanNextPage()}\n        >\n          {'>'}\n        </button>\n        <button\n          class=\"border rounded p-1\"\n          onClick={() => table.lastPage()}\n          disabled={!table.getCanNextPage()}\n        >\n          {'>>'}\n        </button>\n        <span class=\"flex items-center gap-1\">\n          <div>Page</div>\n          <strong>\n            {state().pagination.pageIndex + 1} of{' '}\n            {table.getPageCount().toLocaleString()}\n          </strong>\n        </span>\n        <span class=\"flex items-center gap-1\">\n          | Go to page:\n          <input\n            type=\"number\"\n            min=\"1\"\n            max={table.getPageCount()}\n            value={state().pagination.pageIndex + 1}\n            onInput={(e) => {\n              const page = e.currentTarget.value\n                ? Number(e.currentTarget.value) - 1\n                : 0\n              table.setPageIndex(page)\n            }}\n            class=\"border p-1 rounded w-16\"\n          />\n        </span>\n        <select\n          value={state().pagination.pageSize}\n          onChange={(e) => {\n            table.setPageSize(Number(e.currentTarget.value))\n          }}\n        >\n          {[10, 20, 30, 40, 50].map((pageSize) => (\n            <option value={pageSize}>Show {pageSize}</option>\n          ))}\n        </select>\n        {dataQuery.isFetching ? 'Loading...' : null}\n      </div>\n      <div>\n        Showing {table.getRowModel().rows.length.toLocaleString()} of{' '}\n        {dataQuery.data?.rowCount.toLocaleString()} Rows\n      </div>\n      <pre>{JSON.stringify(state(), null, 2)}</pre>\n    </div>\n  )\n}\n\nexport default App\n"
  },
  {
    "path": "examples/solid/with-tanstack-query/src/fetchData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  subRows?: Array<Person>\n}\n\nconst range = (len: number) => {\n  const arr: Array<number> = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (): Person => {\n  return {\n    firstName: faker.person.firstName(),\n    lastName: faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: faker.number.int(1000),\n    progress: faker.number.int(100),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0],\n  }\n}\n\nfunction makeData(...lens: Array<number>) {\n  const makeDataLevel = (depth = 0): Array<Person> => {\n    const len = lens[depth]\n    return range(len).map((): Person => {\n      return {\n        ...newPerson(),\n        subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined,\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n\nconst data = makeData(10000)\n\nexport async function fetchData(options: {\n  pageIndex: number\n  pageSize: number\n}) {\n  await new Promise((resolve) => setTimeout(resolve, 500))\n\n  return {\n    rows: data.slice(\n      options.pageIndex * options.pageSize,\n      (options.pageIndex + 1) * options.pageSize,\n    ),\n    pageCount: Math.ceil(data.length / options.pageSize),\n    rowCount: data.length,\n  }\n}\n"
  },
  {
    "path": "examples/solid/with-tanstack-query/src/index.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n"
  },
  {
    "path": "examples/solid/with-tanstack-query/src/index.tsx",
    "content": "import { render } from 'solid-js/web'\nimport { QueryClient, QueryClientProvider } from '@tanstack/solid-query'\nimport './index.css'\nimport App from './App'\n\nconst queryClient = new QueryClient()\n\nrender(\n  () => (\n    <QueryClientProvider client={queryClient}>\n      <App />\n    </QueryClientProvider>\n  ),\n  document.getElementById('root') as HTMLElement,\n)\n"
  },
  {
    "path": "examples/solid/with-tanstack-query/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"module\": \"ESNext\",\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"preserve\",\n    \"jsxImportSource\": \"solid-js\",\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "examples/solid/with-tanstack-query/vite.config.ts",
    "content": "import { defineConfig } from 'vite'\nimport solidPlugin from 'vite-plugin-solid'\n\nexport default defineConfig({\n  plugins: [solidPlugin()],\n  build: {\n    target: 'esnext',\n  },\n})\n"
  },
  {
    "path": "examples/svelte/basic/.gitignore",
    "content": "node_modules\n.DS_Store\ndist\ndist-ssr\n*.local\n\nsrc/**/*.d.ts\nsrc/**/*.map"
  },
  {
    "path": "examples/svelte/basic/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run start` or `yarn start`\n"
  },
  {
    "path": "examples/svelte/basic/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite App</title>\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n  </head>\n\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.ts\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/svelte/basic/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-svelte-basic\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"type\": \"module\",\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"test:types\": \"svelte-check --tsconfig ./tsconfig.json\",\n    \"lint\": \"eslint ./src\"\n  },\n  \"devDependencies\": {\n    \"@rollup/plugin-replace\": \"^6.0.3\",\n    \"@sveltejs/vite-plugin-svelte\": \"^6.2.4\",\n    \"@tanstack/svelte-table\": \"^9.0.0-alpha.10\",\n    \"@tsconfig/svelte\": \"^5.0.6\",\n    \"svelte\": \"^5.48.5\",\n    \"svelte-check\": \"^4.3.5\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\"\n  }\n}\n"
  },
  {
    "path": "examples/svelte/basic/src/App.svelte",
    "content": "<script lang=\"ts\">\n  import type { ColumnDef } from '@tanstack/svelte-table'\n  import {\n    createTable,\n    FlexRender,\n    tableFeatures,\n  } from '@tanstack/svelte-table'\n  import './index.css'\n\n  /**\n   * This `svelte-table` example demonstrates the following:\n   * - Creating a basic table with no additional features (sorting, filtering,\n   *   grouping, etc),\n   * - Creating and using a `table helper`,\n   * - Defining columns with custom headers, cells, and footers, and\n   * - Rendering a table with the instance APIs.\n   */\n\n  // 1. Define what the shape of your data will be for each row\n  type Person = {\n    firstName: string\n    lastName: string\n    age: number\n    visits: number\n    status: string\n    progress: number\n  }\n\n  // 2. Create some dummy data with a stable reference (this could be an API\n  //    response stored in useState or similar)\n  const data: Person[] = [\n    {\n      firstName: 'tanner',\n      lastName: 'linsley',\n      age: 24,\n      visits: 100,\n      status: 'In Relationship',\n      progress: 50,\n    },\n    {\n      firstName: 'tandy',\n      lastName: 'miller',\n      age: 40,\n      visits: 40,\n      status: 'Single',\n      progress: 80,\n    },\n    {\n      firstName: 'joe',\n      lastName: 'dirte',\n      age: 45,\n      visits: 20,\n      status: 'Complicated',\n      progress: 10,\n    },\n  ]\n\n  // 3. New in V9! Tell the table which features and row models we want to use.\n  //    In this case, this will be a basic table with no additional features.\n  const _features = tableFeatures({})\n\n  // 4. Define the columns for your table. This uses the new `ColumnDef` type to\n  //    define columns. Alternatively, check out the\n  //    createTableHelper/createColumnHelper util for an even more type-safe way\n  //    to define columns.\n  const columns: ColumnDef<typeof _features, Person>[] = [\n    {\n      accessorKey: 'firstName',\n      cell: (info) => info.getValue(),\n      footer: (info) => info.column.id,\n    },\n    {\n      accessorFn: (row) => row.lastName,\n      id: 'lastName',\n      cell: (info) => info.getValue(),\n      header: () => 'Last Name',\n      footer: (info) => info.column.id,\n    },\n    {\n      accessorKey: 'age',\n      header: () => 'Age',\n      footer: (info) => info.column.id,\n    },\n    {\n      accessorKey: 'visits',\n      header: () => 'Visits',\n      footer: (info) => info.column.id,\n    },\n    {\n      accessorKey: 'status',\n      header: 'Status',\n      footer: (info) => info.column.id,\n    },\n    {\n      accessorKey: 'progress',\n      header: 'Profile Progress',\n      footer: (info) => info.column.id,\n    },\n  ]\n\n  // 5. Create the table instance with required _features, columns, and data\n  const table = createTable({\n    // 5a. New required option in V9. Tell the table which features you are\n    //     importing and using (better tree-shaking).\n    _features,\n    // 5b. `Core` row model is now included by default, but you can still\n    //     override it here.\n    _rowModels: {},\n    columns,\n    data,\n    // ...add additional table options here\n  })\n</script>\n\n<!-- 6. Render the table in markup using the Instance APIs. -->\n<div class=\"p-2\">\n  <table>\n    <thead>\n      {#each table.getHeaderGroups() as headerGroup}\n        <tr>\n          {#each headerGroup.headers as header}\n            <th>\n              {#if !header.isPlaceholder}\n                <FlexRender\n                  content={header.column.columnDef.header}\n                  context={header.getContext()}\n                />\n              {/if}\n            </th>\n          {/each}\n        </tr>\n      {/each}\n    </thead>\n    <tbody>\n      {#each table.getRowModel().rows as row}\n        <tr>\n          {#each row.getAllCells() as cell}\n            <td>\n              <FlexRender\n                content={cell.column.columnDef.cell}\n                context={cell.getContext()}\n              />\n            </td>\n          {/each}\n        </tr>\n      {/each}\n    </tbody>\n    <tfoot>\n      {#each table.getFooterGroups() as footerGroup}\n        <tr>\n          {#each footerGroup.headers as header}\n            <th>\n              {#if !header.isPlaceholder}\n                <FlexRender\n                  content={header.column.columnDef.footer}\n                  context={header.getContext()}\n                />\n              {/if}\n            </th>\n          {/each}\n        </tr>\n      {/each}\n    </tfoot>\n  </table>\n  <div class=\"h-4\"></div>\n</div>\n"
  },
  {
    "path": "examples/svelte/basic/src/index.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n"
  },
  {
    "path": "examples/svelte/basic/src/main.ts",
    "content": "// @ts-ignore - Svelte type definitions are not properly recognized\nimport { mount } from 'svelte'\nimport App from './App.svelte'\n\nconst app = mount(App, {\n  target: document.getElementById('root')!,\n})\n\nexport default app\n"
  },
  {
    "path": "examples/svelte/basic/src/vite-env.d.ts",
    "content": "/// <reference types=\"svelte\" />\n/// <reference types=\"vite/client\" />\n"
  },
  {
    "path": "examples/svelte/basic/svelte.config.js",
    "content": "import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'\n\nexport default {\n  preprocess: vitePreprocess(),\n}\n"
  },
  {
    "path": "examples/svelte/basic/tsconfig.json",
    "content": "{\n  \"extends\": \"@tsconfig/svelte/tsconfig.json\",\n  \"compilerOptions\": {\n    \"target\": \"esnext\",\n    \"useDefineForClassFields\": true,\n    \"module\": \"esnext\",\n    \"resolveJsonModule\": true,\n    \"allowJs\": true,\n    \"checkJs\": true,\n    \"isolatedModules\": true\n  },\n  \"include\": [\"src/**/*.ts\", \"src/**/*.js\", \"src/**/*.svelte\"]\n}\n"
  },
  {
    "path": "examples/svelte/basic/vite.config.js",
    "content": "import { defineConfig } from 'vite'\nimport { svelte } from '@sveltejs/vite-plugin-svelte'\nimport rollupReplace from '@rollup/plugin-replace'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [\n    rollupReplace({\n      preventAssignment: true,\n      values: {\n        __DEV__: JSON.stringify(true),\n        'process.env.NODE_ENV': JSON.stringify('development'),\n      },\n    }),\n    svelte(),\n  ],\n})\n"
  },
  {
    "path": "examples/svelte/basic-snippets/.gitignore",
    "content": "node_modules\n.DS_Store\ndist\ndist-ssr\n*.local\n\nsrc/**/*.d.ts\nsrc/**/*.map"
  },
  {
    "path": "examples/svelte/basic-snippets/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run start` or `yarn start`\n"
  },
  {
    "path": "examples/svelte/basic-snippets/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite App</title>\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n  </head>\n\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.ts\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/svelte/basic-snippets/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-svelte-basic-snippets\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"type\": \"module\",\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"test:types\": \"svelte-check --tsconfig ./tsconfig.json\",\n    \"lint\": \"eslint ./src\"\n  },\n  \"devDependencies\": {\n    \"@rollup/plugin-replace\": \"^6.0.3\",\n    \"@sveltejs/vite-plugin-svelte\": \"^6.2.4\",\n    \"@tanstack/svelte-table\": \"^9.0.0-alpha.10\",\n    \"@tsconfig/svelte\": \"^5.0.6\",\n    \"svelte\": \"^5.48.5\",\n    \"svelte-check\": \"^4.3.5\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\"\n  }\n}\n"
  },
  {
    "path": "examples/svelte/basic-snippets/src/App.svelte",
    "content": "<script lang=\"ts\">\n  import {\n    createTableHelper,\n    FlexRender,\n    renderSnippet,\n  } from '@tanstack/svelte-table'\n  import { capitalized, countup, spectrum } from './snippets.svelte'\n  import './index.css'\n\n  /**\n   * This `svelte-table` example demonstrates the following:\n   * - Creating a basic table with no additional features (sorting, filtering,\n   *   grouping, etc),\n   * - Creating and using a `table helper`,\n   * - Defining columns with custom headers, cells, and footers using the table\n   *   helper, and\n   * - Rendering a table with the instance APIs.\n   */\n\n  // 1. Define what the shape of your data will be for each row\n  type Person = {\n    firstName: string\n    lastName: string\n    age: number\n    visits: number\n    status: string\n    progress: number\n  }\n\n  // 2. Create some dummy data with a stable reference (this could be an API\n  //    response stored in a rune).\n  const data: Person[] = [\n    {\n      firstName: 'tanner',\n      lastName: 'linsley',\n      age: 24,\n      visits: 100,\n      status: 'In Relationship',\n      progress: 50,\n    },\n    {\n      firstName: 'tandy',\n      lastName: 'miller',\n      age: 40,\n      visits: 40,\n      status: 'Single',\n      progress: 80,\n    },\n    {\n      firstName: 'joe',\n      lastName: 'dirte',\n      age: 45,\n      visits: 20,\n      status: 'Complicated',\n      progress: 10,\n    },\n  ]\n\n  // 3. New in V9! Tell the table which features and row models we want to use.\n  //    In this case, this will be a basic table with no additional features\n  const tableHelper = createTableHelper({\n    _features: {},\n    // 3a. `_rowModels` defines client-side row models. `Core` row model is now\n    //     included by default, but you can still override it here.\n    _rowModels: {},\n    // 3b. Optionally, set the `TData` type. Omit TData is this table helper\n    //     will be used to create multiple tables with different data types.\n    TData: {} as Person,\n  })\n\n  // 4. For convenience, destructure the desired utilities from `tableHelper`\n  const { columnHelper, createTable } = tableHelper\n\n  // 5. Define the columns for your table with a stable reference (in this case,\n  //    defined statically).\n  const columns = columnHelper.columns([\n    columnHelper.accessor('firstName', {\n      header: 'First Name',\n      // 5a. Use the `renderSnippet` utility to render the snippet in the cell.\n      cell: (info) => renderSnippet(capitalized, info.getValue()),\n    }),\n    columnHelper.accessor('lastName', {\n      header: 'Last Name',\n      cell: (info) => renderSnippet(capitalized, info.getValue()),\n    }),\n    columnHelper.accessor('age', {\n      header: 'Age',\n      cell: (info) => renderSnippet(countup, info.getValue()),\n    }),\n    columnHelper.accessor('visits', {\n      header: 'Visits',\n      cell: (info) => renderSnippet(countup, info.getValue()),\n    }),\n    columnHelper.accessor('status', {\n      header: 'Status',\n    }),\n    columnHelper.accessor('progress', {\n      header: 'Profile Progress',\n      cell(info) {\n        return renderSnippet(spectrum, {\n          value: info.getValue(),\n          min: 0,\n          max: 100,\n        })\n      },\n    }),\n  ])\n\n  // 6. Create the table instance with columns and data. Features and row\n  //    models are already defined in the `tableHelper` object that\n  //    `createTable` was destructured from.\n  const table = createTable({\n    columns,\n    data,\n  })\n</script>\n\n<!-- 7. Render the table in markup using the Instance APIs. -->\n<div class=\"p-2\">\n  <table>\n    <thead>\n      {#each table.getHeaderGroups() as headerGroup}\n        <tr>\n          {#each headerGroup.headers as header}\n            <th>\n              {#if !header.isPlaceholder}\n                <FlexRender\n                  content={header.column.columnDef.header}\n                  context={header.getContext()}\n                />\n              {/if}\n            </th>\n          {/each}\n        </tr>\n      {/each}\n    </thead>\n    <tbody>\n      {#each table.getRowModel().rows as row}\n        <tr>\n          {#each row.getAllCells() as cell}\n            <td>\n              <FlexRender\n                content={cell.column.columnDef.cell}\n                context={cell.getContext()}\n              />\n            </td>\n          {/each}\n        </tr>\n      {/each}\n    </tbody>\n  </table>\n</div>\n"
  },
  {
    "path": "examples/svelte/basic-snippets/src/index.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n  font-weight: normal;\n}\n"
  },
  {
    "path": "examples/svelte/basic-snippets/src/main.ts",
    "content": "// @ts-ignore - Svelte type definitions are not properly recognized\nimport { mount } from 'svelte'\nimport App from './App.svelte'\n\nconst app = mount(App, {\n  target: document.getElementById('root')!,\n})\n\nexport default app\n"
  },
  {
    "path": "examples/svelte/basic-snippets/src/snippets.svelte",
    "content": "<script module lang=\"ts\">\n  import { createRawSnippet } from 'svelte'\n\n  export { capitalized, spectrum, countup }\n\n  function getColor(value: number, min: number, max: number) {\n    console.log(value, min, max)\n    const ratio = (value - min) / (max - min)\n    console.log(value - min, max - min, ratio)\n    const hue = Math.floor(120 * ratio) // 0 (red) to 120 (green)\n    return `hsl(${hue}, 100%, 50%)`\n  }\n\n  type SpectrumParams = {\n    value: number\n    min: number\n    max: number\n  }\n\n  const countup = createRawSnippet<[value: number]>((value) => {\n    return {\n      render() {\n        return `<p>0</p>`\n      },\n      setup(element) {\n        let count = 0\n        const interval = setInterval(() => {\n          count++\n          element.textContent = `${count}`\n\n          if (count === value()) {\n            clearInterval(interval)\n          }\n        }, 1000 / value())\n\n        return () => {\n          clearInterval(interval)\n        }\n      },\n    }\n  })\n</script>\n\n{#snippet capitalized(value: string)}\n  <p class=\"text-capitalize\">{value}</p>\n{/snippet}\n\n{#snippet spectrum({ value, min, max }: SpectrumParams)}\n  <div\n    class=\"text-center font-semibold\"\n    style=\"background-color: {getColor(value, min, max)}\"\n  >\n    {value}\n  </div>\n{/snippet}\n"
  },
  {
    "path": "examples/svelte/basic-snippets/svelte.config.js",
    "content": "import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'\n\nexport default {\n  preprocess: vitePreprocess(),\n}\n"
  },
  {
    "path": "examples/svelte/basic-snippets/tsconfig.json",
    "content": "{\n  \"extends\": \"@tsconfig/svelte/tsconfig.json\",\n  \"compilerOptions\": {\n    \"target\": \"esnext\",\n    \"useDefineForClassFields\": true,\n    \"module\": \"esnext\",\n    \"resolveJsonModule\": true,\n    \"allowJs\": true,\n    \"checkJs\": true,\n    \"isolatedModules\": true\n  },\n  \"include\": [\n    \"../basic-snippets/src/**/*.ts\",\n    \"../basic-snippets/src/**/*.js\",\n    \"../basic-snippets/src/**/*.svelte\"\n  ]\n}\n"
  },
  {
    "path": "examples/svelte/basic-snippets/vite.config.js",
    "content": "import { defineConfig } from 'vite'\nimport { svelte } from '@sveltejs/vite-plugin-svelte'\nimport rollupReplace from '@rollup/plugin-replace'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [\n    rollupReplace({\n      preventAssignment: true,\n      values: {\n        __DEV__: JSON.stringify(true),\n        'process.env.NODE_ENV': JSON.stringify('development'),\n      },\n    }),\n    svelte(),\n  ],\n})\n"
  },
  {
    "path": "examples/svelte/basic-table-helper/.gitignore",
    "content": "node_modules\n.DS_Store\ndist\ndist-ssr\n*.local\n\nsrc/**/*.d.ts\nsrc/**/*.map"
  },
  {
    "path": "examples/svelte/basic-table-helper/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run start` or `yarn start`\n"
  },
  {
    "path": "examples/svelte/basic-table-helper/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite App</title>\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n  </head>\n\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.ts\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/svelte/basic-table-helper/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-svelte-basic-table-helper\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"type\": \"module\",\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"test:types\": \"svelte-check --tsconfig ./tsconfig.json\",\n    \"lint\": \"eslint ./src\"\n  },\n  \"devDependencies\": {\n    \"@rollup/plugin-replace\": \"^6.0.3\",\n    \"@sveltejs/vite-plugin-svelte\": \"^6.2.4\",\n    \"@tanstack/svelte-table\": \"^9.0.0-alpha.10\",\n    \"@tsconfig/svelte\": \"^5.0.6\",\n    \"svelte\": \"^5.48.5\",\n    \"svelte-check\": \"^4.3.5\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\"\n  }\n}\n"
  },
  {
    "path": "examples/svelte/basic-table-helper/src/App.svelte",
    "content": "<script lang=\"ts\">\n  import { createTableHelper, FlexRender } from '@tanstack/svelte-table'\n  import './index.css'\n\n  /**\n   * This `svelte-table` example demonstrates the following:\n   * - Creating a basic table with no additional features (sorting, filtering,\n   *   grouping, etc),\n   * - Creating and using a `table helper`,\n   * - Defining columns with custom headers, cells, and footers using the table\n   *   helper, and\n   * - Rendering a table with the instance APIs.\n   */\n\n  // 1. Define what the shape of your data will be for each row\n  type Person = {\n    firstName: string\n    lastName: string\n    age: number\n    visits: number\n    status: string\n    progress: number\n  }\n\n  // 2. Create some dummy data with a stable reference (this could be an API\n  //    response stored in a rune).\n  const data: Person[] = [\n    {\n      firstName: 'tanner',\n      lastName: 'linsley',\n      age: 24,\n      visits: 100,\n      status: 'In Relationship',\n      progress: 50,\n    },\n    {\n      firstName: 'tandy',\n      lastName: 'miller',\n      age: 40,\n      visits: 40,\n      status: 'Single',\n      progress: 80,\n    },\n    {\n      firstName: 'joe',\n      lastName: 'dirte',\n      age: 45,\n      visits: 20,\n      status: 'Complicated',\n      progress: 10,\n    },\n  ]\n\n  // 3. New in V9! Tell the table which features and row models we want to use.\n  //    In this case, this will be a basic table with no additional features\n  const tableHelper = createTableHelper({\n    _features: {},\n    // 3a. `_rowModels` defines client-side row models. `Core` row model is now\n    //     included by default, but you can still override it here.\n    _rowModels: {},\n    // 3b. Optionally, set the `TData` type. Omit TData is this table helper\n    //     will be used to create multiple tables with different data types.\n    TData: {} as Person,\n  })\n\n  // 4. For convenience, destructure the desired utilities from `tableHelper`\n  const { columnHelper, createTable } = tableHelper\n\n  // 5. Define the columns for your table with a stable reference (in this case,\n  //    defined statically outside of a react component)\n  const columns = columnHelper.columns([\n    columnHelper.accessor('firstName', {\n      cell: (info) => info.getValue(),\n      footer: (info) => info.column.id,\n    }),\n    columnHelper.accessor('lastName', {\n      header: () => 'Last Name',\n      cell: (info) => info.getValue(),\n      footer: (info) => info.column.id,\n    }),\n    columnHelper.accessor('age', {\n      header: () => 'Age',\n      footer: (info) => info.column.id,\n    }),\n    columnHelper.accessor('visits', {\n      header: () => 'Visits',\n      footer: (info) => info.column.id,\n    }),\n    columnHelper.accessor('status', {\n      header: 'Status',\n      footer: (info) => info.column.id,\n    }),\n    columnHelper.accessor('progress', {\n      header: 'Profile Progress',\n      footer: (info) => info.column.id,\n    }),\n  ])\n\n  // 6. Create the table instance with columns and data. Featufres and row\n  //    models are already defined in the `tableHelper` object that\n  //    `createTable` was destructured from.\n  const table = createTable({\n    columns,\n    data,\n  })\n</script>\n\n<!-- 7. Render the table in markup using the Instance APIs. -->\n<div class=\"p-2\">\n  <table>\n    <thead>\n      {#each table.getHeaderGroups() as headerGroup}\n        <tr>\n          {#each headerGroup.headers as header}\n            <th>\n              {#if !header.isPlaceholder}\n                <FlexRender\n                  content={header.column.columnDef.header}\n                  context={header.getContext()}\n                />\n              {/if}\n            </th>\n          {/each}\n        </tr>\n      {/each}\n    </thead>\n    <tbody>\n      {#each table.getRowModel().rows as row}\n        <tr>\n          {#each row.getAllCells() as cell}\n            <td>\n              <FlexRender\n                content={cell.column.columnDef.cell}\n                context={cell.getContext()}\n              />\n            </td>\n          {/each}\n        </tr>\n      {/each}\n    </tbody>\n    <tfoot>\n      {#each table.getFooterGroups() as footerGroup}\n        <tr>\n          {#each footerGroup.headers as header}\n            <th>\n              {#if !header.isPlaceholder}\n                <FlexRender\n                  content={header.column.columnDef.footer}\n                  context={header.getContext()}\n                />\n              {/if}\n            </th>\n          {/each}\n        </tr>\n      {/each}\n    </tfoot>\n  </table>\n  <div class=\"h-4\"></div>\n</div>\n"
  },
  {
    "path": "examples/svelte/basic-table-helper/src/index.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n"
  },
  {
    "path": "examples/svelte/basic-table-helper/src/main.ts",
    "content": "// @ts-ignore - Svelte mount types not properly recognized\nimport { mount } from 'svelte'\nimport App from './App.svelte'\n\nconst app = mount(App, {\n  target: document.getElementById('root')!,\n})\n\nexport default app\n"
  },
  {
    "path": "examples/svelte/basic-table-helper/svelte.config.js",
    "content": "import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'\n\nexport default {\n  preprocess: vitePreprocess(),\n}\n"
  },
  {
    "path": "examples/svelte/basic-table-helper/tsconfig.json",
    "content": "{\n  \"extends\": \"@tsconfig/svelte/tsconfig.json\",\n  \"compilerOptions\": {\n    \"target\": \"esnext\",\n    \"useDefineForClassFields\": true,\n    \"module\": \"esnext\",\n    \"resolveJsonModule\": true,\n    \"allowJs\": true,\n    \"checkJs\": true,\n    \"isolatedModules\": true\n  },\n  \"include\": [\"src/**/*.ts\", \"src/**/*.js\", \"src/**/*.svelte\"]\n}\n"
  },
  {
    "path": "examples/svelte/basic-table-helper/vite.config.js",
    "content": "import { defineConfig } from 'vite'\nimport { svelte } from '@sveltejs/vite-plugin-svelte'\nimport rollupReplace from '@rollup/plugin-replace'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [\n    rollupReplace({\n      preventAssignment: true,\n      values: {\n        __DEV__: JSON.stringify(true),\n        'process.env.NODE_ENV': JSON.stringify('development'),\n      },\n    }),\n    svelte(),\n  ],\n})\n"
  },
  {
    "path": "examples/svelte/column-groups/.gitignore",
    "content": "node_modules\n.DS_Store\ndist\ndist-ssr\n*.local\n\nsrc/**/*.d.ts\nsrc/**/*.map"
  },
  {
    "path": "examples/svelte/column-groups/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run start` or `yarn start`\n"
  },
  {
    "path": "examples/svelte/column-groups/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite App</title>\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n  </head>\n\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.ts\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/svelte/column-groups/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-svelte-column-groups\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"type\": \"module\",\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"test:types\": \"svelte-check --tsconfig ./tsconfig.json\",\n    \"lint\": \"eslint ./src\"\n  },\n  \"devDependencies\": {\n    \"@rollup/plugin-replace\": \"^6.0.3\",\n    \"@sveltejs/vite-plugin-svelte\": \"^6.2.4\",\n    \"@tanstack/svelte-table\": \"^9.0.0-alpha.10\",\n    \"@tsconfig/svelte\": \"^5.0.6\",\n    \"svelte\": \"^5.48.5\",\n    \"svelte-check\": \"^4.3.5\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\"\n  }\n}\n"
  },
  {
    "path": "examples/svelte/column-groups/src/App.svelte",
    "content": "<script lang=\"ts\">\n  import type { ColumnDef } from '@tanstack/svelte-table'\n  import {\n    FlexRender,\n    createTable,\n    tableFeatures,\n  } from '@tanstack/svelte-table'\n  import './index.css'\n\n  type Person = {\n    firstName: string\n    lastName: string\n    age: number\n    visits: number\n    status: string\n    progress: number\n  }\n\n  const defaultData: Person[] = [\n    {\n      firstName: 'tanner',\n      lastName: 'linsley',\n      age: 24,\n      visits: 100,\n      status: 'In Relationship',\n      progress: 50,\n    },\n    {\n      firstName: 'tandy',\n      lastName: 'miller',\n      age: 40,\n      visits: 40,\n      status: 'Single',\n      progress: 80,\n    },\n    {\n      firstName: 'joe',\n      lastName: 'dirte',\n      age: 45,\n      visits: 20,\n      status: 'Complicated',\n      progress: 10,\n    },\n  ]\n\n  const _features = tableFeatures({})\n\n  const defaultColumns: ColumnDef<typeof _features, Person>[] = [\n    {\n      header: 'Name',\n      footer: (props) => props.column.id,\n      columns: [\n        {\n          accessorKey: 'firstName',\n          cell: (info) => info.getValue(),\n          footer: (props) => props.column.id,\n        },\n        {\n          accessorFn: (row) => row.lastName,\n          id: 'lastName',\n          cell: (info) => info.getValue(),\n          header: () => 'Last Name',\n          footer: (props) => props.column.id,\n        },\n      ],\n    },\n    {\n      header: 'Info',\n      footer: (props) => props.column.id,\n      columns: [\n        {\n          accessorKey: 'age',\n          header: () => 'Age',\n          footer: (props) => props.column.id,\n        },\n        {\n          header: 'More Info',\n          columns: [\n            {\n              accessorKey: 'visits',\n              header: () => 'Visits',\n              footer: (props) => props.column.id,\n            },\n            {\n              accessorKey: 'status',\n              header: 'Status',\n              footer: (props) => props.column.id,\n            },\n            {\n              accessorKey: 'progress',\n              header: 'Profile Progress',\n              footer: (props) => props.column.id,\n            },\n          ],\n        },\n      ],\n    },\n  ]\n\n  const table = createTable({\n    _features,\n    _rowModels: {},\n    data: defaultData,\n    columns: defaultColumns,\n  })\n</script>\n\n<div class=\"p-2\">\n  <table>\n    <thead>\n      {#each table.getHeaderGroups() as headerGroup}\n        <tr>\n          {#each headerGroup.headers as header}\n            <th colSpan={header.colSpan}>\n              {#if !header.isPlaceholder}\n                <FlexRender\n                  content={header.column.columnDef.header}\n                  context={header.getContext()}\n                />\n              {/if}\n            </th>\n          {/each}\n        </tr>\n      {/each}\n    </thead>\n    <tbody>\n      {#each table.getRowModel().rows as row}\n        <tr>\n          {#each row.getAllCells() as cell}\n            <td>\n              <FlexRender\n                content={cell.column.columnDef.cell}\n                context={cell.getContext()}\n              />\n            </td>\n          {/each}\n        </tr>\n      {/each}\n    </tbody>\n    <tfoot>\n      {#each table.getFooterGroups() as footerGroup}\n        <tr>\n          {#each footerGroup.headers as header}\n            <th colSpan={header.colSpan}>\n              {#if !header.isPlaceholder}\n                <FlexRender\n                  content={header.column.columnDef.footer}\n                  context={header.getContext()}\n                />\n              {/if}\n            </th>\n          {/each}\n        </tr>\n      {/each}\n    </tfoot>\n  </table>\n  <div class=\"h-4\"></div>\n</div>\n"
  },
  {
    "path": "examples/svelte/column-groups/src/index.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n"
  },
  {
    "path": "examples/svelte/column-groups/src/main.ts",
    "content": "// @ts-ignore\nimport { mount } from 'svelte'\nimport App from './App.svelte'\n\nconst app = mount(App, {\n  target: document.getElementById('root')!,\n})\n\nexport default app\n"
  },
  {
    "path": "examples/svelte/column-groups/svelte.config.js",
    "content": "import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'\n\nexport default {\n  preprocess: vitePreprocess(),\n}\n"
  },
  {
    "path": "examples/svelte/column-groups/tsconfig.json",
    "content": "{\n  \"extends\": \"@tsconfig/svelte/tsconfig.json\",\n  \"compilerOptions\": {\n    \"target\": \"esnext\",\n    \"useDefineForClassFields\": true,\n    \"module\": \"esnext\",\n    \"resolveJsonModule\": true,\n    \"allowJs\": true,\n    \"checkJs\": true,\n    \"isolatedModules\": true\n  },\n  \"include\": [\"src/**/*.ts\", \"src/**/*.js\", \"src/**/*.svelte\"]\n}\n"
  },
  {
    "path": "examples/svelte/column-groups/vite.config.js",
    "content": "import { defineConfig } from 'vite'\nimport { svelte } from '@sveltejs/vite-plugin-svelte'\nimport rollupReplace from '@rollup/plugin-replace'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [\n    rollupReplace({\n      preventAssignment: true,\n      values: {\n        __DEV__: JSON.stringify(true),\n        'process.env.NODE_ENV': JSON.stringify('development'),\n      },\n    }),\n    svelte(),\n  ],\n})\n"
  },
  {
    "path": "examples/svelte/column-ordering/.gitignore",
    "content": "node_modules\n.DS_Store\ndist\ndist-ssr\n*.local\n\nsrc/**/*.d.ts\nsrc/**/*.map"
  },
  {
    "path": "examples/svelte/column-ordering/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run start` or `yarn start`\n"
  },
  {
    "path": "examples/svelte/column-ordering/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite App</title>\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n  </head>\n\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.ts\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/svelte/column-ordering/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-svelte-column-ordering\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"type\": \"module\",\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"test:types\": \"svelte-check --tsconfig ./tsconfig.json\",\n    \"lint\": \"eslint ./src\"\n  },\n  \"devDependencies\": {\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"@rollup/plugin-replace\": \"^6.0.3\",\n    \"@sveltejs/vite-plugin-svelte\": \"^6.2.4\",\n    \"@tanstack/svelte-table\": \"^9.0.0-alpha.10\",\n    \"@tsconfig/svelte\": \"^5.0.6\",\n    \"svelte\": \"^5.48.5\",\n    \"svelte-check\": \"^4.3.5\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\"\n  }\n}\n"
  },
  {
    "path": "examples/svelte/column-ordering/src/App.svelte",
    "content": "<script lang=\"ts\">\n  import { faker } from '@faker-js/faker'\n  import type {\n    ColumnDef,\n    ColumnOrderState,\n    ColumnVisibilityState,\n  } from '@tanstack/svelte-table'\n  import {\n    columnOrderingFeature,\n    columnVisibilityFeature,\n    FlexRender,\n    createTable,\n    createTableState,\n    tableFeatures,\n  } from '@tanstack/svelte-table'\n  import './index.css'\n  import { makeData, type Person } from './makeData'\n\n  const _features = tableFeatures({\n    columnOrderingFeature,\n    columnVisibilityFeature,\n  })\n\n  const columns: ColumnDef<typeof _features, Person>[] = [\n    {\n      header: 'Name',\n      footer: (props) => props.column.id,\n      columns: [\n        {\n          accessorKey: 'firstName',\n          cell: (info) => info.getValue(),\n          footer: (props) => props.column.id,\n        },\n        {\n          accessorFn: (row) => row.lastName,\n          id: 'lastName',\n          cell: (info) => info.getValue(),\n          header: () => 'Last Name',\n          footer: (props) => props.column.id,\n        },\n      ],\n    },\n    {\n      header: 'Info',\n      footer: (props) => props.column.id,\n      columns: [\n        {\n          accessorKey: 'age',\n          header: () => 'Age',\n          footer: (props) => props.column.id,\n        },\n        {\n          header: 'More Info',\n          columns: [\n            {\n              accessorKey: 'visits',\n              header: () => 'Visits',\n              footer: (props) => props.column.id,\n            },\n            {\n              accessorKey: 'status',\n              header: 'Status',\n              footer: (props) => props.column.id,\n            },\n            {\n              accessorKey: 'progress',\n              header: 'Profile Progress',\n              footer: (props) => props.column.id,\n            },\n          ],\n        },\n      ],\n    },\n  ]\n\n  let data = $state(makeData(5000))\n\n  const [columnOrder, setColumnOrder] = createTableState<ColumnOrderState>([])\n  const [columnVisibility, setColumnVisibility] =\n    createTableState<ColumnVisibilityState>({})\n\n  const randomizeColumns = () => {\n    table.setColumnOrder((_updater) =>\n      faker.helpers.shuffle(table.getAllLeafColumns().map((d) => d.id)),\n    )\n  }\n\n  const table = createTable({\n    _features,\n    _rowModels: {},\n    get data() {\n      return data\n    },\n    columns,\n    state: {\n      get columnOrder() {\n        return columnOrder()\n      },\n      get columnVisibility() {\n        return columnVisibility()\n      },\n    },\n    onColumnOrderChange: setColumnOrder,\n    onColumnVisibilityChange: setColumnVisibility,\n    debugTable: true,\n  })\n</script>\n\n<div class=\"p-2\">\n  <div class=\"inline-block border border-black shadow rounded\">\n    <div class=\"px-1 border-b border-black\">\n      <label>\n        <input\n          checked={table.getIsAllColumnsVisible()}\n          onchange={(e) => {\n            console.info(table.getToggleAllColumnsVisibilityHandler()(e))\n          }}\n          type=\"checkbox\"\n        />{' '}\n        Toggle All\n      </label>\n    </div>\n    {#each table.getAllLeafColumns() as column}\n      <div class=\"px-1\">\n        <label>\n          <input\n            checked={column.getIsVisible()}\n            onchange={column.getToggleVisibilityHandler()}\n            type=\"checkbox\"\n          />{' '}\n          {column.id}\n        </label>\n      </div>\n    {/each}\n  </div>\n  <div class=\"h-4\"></div>\n  <div class=\"flex flex-wrap gap-2\">\n    <button\n      onclick={() => {\n        data = makeData(5000)\n      }}\n      class=\"border p-1\"\n    >\n      Refresh Data\n    </button>\n    <button onclick={() => randomizeColumns()} class=\"border p-1\">\n      Shuffle Columns\n    </button>\n  </div>\n  <div class=\"h-4\"></div>\n  <table class=\"border-2 border-black\">\n    <thead>\n      {#each table.getHeaderGroups() as headerGroup}\n        <tr>\n          {#each headerGroup.headers as header}\n            <th colSpan={header.colSpan}>\n              {#if !header.isPlaceholder}\n                <FlexRender\n                  content={header.column.columnDef.header}\n                  context={header.getContext()}\n                />\n              {/if}\n            </th>\n          {/each}\n        </tr>\n      {/each}\n    </thead>\n    <tbody>\n      {#each table.getCoreRowModel().rows.slice(0, 20) as row}\n        <tr>\n          {#each row.getVisibleCells() as cell}\n            <td>\n              <FlexRender\n                content={cell.column.columnDef.cell}\n                context={cell.getContext()}\n              />\n            </td>\n          {/each}\n        </tr>\n      {/each}\n    </tbody>\n  </table>\n  <pre>{JSON.stringify(table.store.state.columnOrder, null, 2)}</pre>\n</div>\n"
  },
  {
    "path": "examples/svelte/column-ordering/src/index.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntd {\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntd:last-child {\n  border-right: 0;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n"
  },
  {
    "path": "examples/svelte/column-ordering/src/main.ts",
    "content": "// @ts-ignore\nimport { mount } from 'svelte'\nimport App from './App.svelte'\n\nconst app = mount(App, {\n  target: document.getElementById('root')!,\n})\n\nexport default app\n"
  },
  {
    "path": "examples/svelte/column-ordering/src/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  subRows?: Array<Person>\n}\n\nconst range = (len: number) => {\n  const arr: Array<number> = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (): Person => {\n  return {\n    firstName: faker.person.firstName(),\n    lastName: faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: faker.number.int(1000),\n    progress: faker.number.int(100),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0],\n  }\n}\n\nexport function makeData(...lens: Array<number>) {\n  const makeDataLevel = (depth = 0): Array<Person> => {\n    const len = lens[depth]\n    return range(len).map((d): Person => {\n      return {\n        ...newPerson(),\n        subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined,\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n"
  },
  {
    "path": "examples/svelte/column-ordering/svelte.config.js",
    "content": "import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'\n\nexport default {\n  preprocess: vitePreprocess(),\n}\n"
  },
  {
    "path": "examples/svelte/column-ordering/tsconfig.json",
    "content": "{\n  \"extends\": \"@tsconfig/svelte/tsconfig.json\",\n  \"compilerOptions\": {\n    \"target\": \"esnext\",\n    \"useDefineForClassFields\": true,\n    \"module\": \"esnext\",\n    \"resolveJsonModule\": true,\n    \"allowJs\": true,\n    \"checkJs\": true,\n    \"isolatedModules\": true\n  },\n  \"include\": [\"src/**/*.ts\", \"src/**/*.js\", \"src/**/*.svelte\"]\n}\n"
  },
  {
    "path": "examples/svelte/column-ordering/vite.config.js",
    "content": "import { defineConfig } from 'vite'\nimport { svelte } from '@sveltejs/vite-plugin-svelte'\nimport rollupReplace from '@rollup/plugin-replace'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [\n    rollupReplace({\n      preventAssignment: true,\n      values: {\n        __DEV__: JSON.stringify(true),\n        'process.env.NODE_ENV': JSON.stringify('development'),\n      },\n    }),\n    svelte(),\n  ],\n})\n"
  },
  {
    "path": "examples/svelte/column-pinning/.gitignore",
    "content": "node_modules\n.DS_Store\ndist\ndist-ssr\n*.local\n\nsrc/**/*.d.ts\nsrc/**/*.map"
  },
  {
    "path": "examples/svelte/column-pinning/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run start` or `yarn start`\n"
  },
  {
    "path": "examples/svelte/column-pinning/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite App</title>\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n  </head>\n\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.ts\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/svelte/column-pinning/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-svelte-column-pinning\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"type\": \"module\",\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"test:types\": \"svelte-check --tsconfig ./tsconfig.json\",\n    \"lint\": \"eslint ./src\"\n  },\n  \"devDependencies\": {\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"@rollup/plugin-replace\": \"^6.0.3\",\n    \"@sveltejs/vite-plugin-svelte\": \"^6.2.4\",\n    \"@tanstack/svelte-table\": \"^9.0.0-alpha.10\",\n    \"@tsconfig/svelte\": \"^5.0.6\",\n    \"svelte\": \"^5.48.5\",\n    \"svelte-check\": \"^4.3.5\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\"\n  }\n}\n"
  },
  {
    "path": "examples/svelte/column-pinning/src/App.svelte",
    "content": "<script lang=\"ts\">\n  import { faker } from '@faker-js/faker'\n  import type {\n    ColumnDef,\n    ColumnOrderState,\n    ColumnPinningState,\n    ColumnVisibilityState,\n    Header,\n  } from '@tanstack/svelte-table'\n  import {\n    columnPinningFeature,\n    columnVisibilityFeature,\n    FlexRender,\n    columnOrderingFeature,\n    rowSortingFeature,\n    createSortedRowModel,\n    createTable,\n    createTableState,\n    tableFeatures,\n    sortFns,\n  } from '@tanstack/svelte-table'\n  import './index.css'\n  import { makeData, type Person } from './makeData'\n\n  const _features = tableFeatures({\n    columnOrderingFeature,\n    columnPinningFeature,\n    columnVisibilityFeature,\n    rowSortingFeature,\n  })\n\n  const columns: ColumnDef<typeof _features, Person>[] = [\n    {\n      header: 'Name',\n      footer: (props) => props.column.id,\n      columns: [\n        {\n          accessorKey: 'firstName',\n          cell: (info) => info.getValue(),\n          footer: (props) => props.column.id,\n        },\n        {\n          accessorFn: (row) => row.lastName,\n          id: 'lastName',\n          cell: (info) => info.getValue(),\n          header: () => 'Last Name',\n          footer: (props) => props.column.id,\n        },\n      ],\n    },\n    {\n      header: 'Info',\n      footer: (props) => props.column.id,\n      columns: [\n        {\n          accessorKey: 'age',\n          header: () => 'Age',\n          footer: (props) => props.column.id,\n        },\n        {\n          header: 'More Info',\n          columns: [\n            {\n              accessorKey: 'visits',\n              header: () => 'Visits',\n              footer: (props) => props.column.id,\n            },\n            {\n              accessorKey: 'status',\n              header: 'Status',\n              footer: (props) => props.column.id,\n            },\n            {\n              accessorKey: 'progress',\n              header: 'Profile Progress',\n              footer: (props) => props.column.id,\n            },\n          ],\n        },\n      ],\n    },\n  ]\n\n  let data = $state(makeData(5000))\n  let isSplit = $state(false)\n\n  const [columnOrder, setColumnOrder] = createTableState<ColumnOrderState>([])\n  const [columnPinning, setColumnPinning] =\n    createTableState<ColumnPinningState>({ left: [], right: [] })\n  const [columnVisibility, setColumnVisibility] =\n    createTableState<ColumnVisibilityState>({})\n\n  const randomizeColumns = () => {\n    table.setColumnOrder((_updater) =>\n      faker.helpers.shuffle(table.getAllLeafColumns().map((d) => d.id)),\n    )\n  }\n\n  const table = createTable({\n    _features,\n    _rowModels: {\n      sortedRowModel: createSortedRowModel(sortFns),\n    },\n    get data() {\n      return data\n    },\n    columns,\n    state: {\n      get columnOrder() {\n        return columnOrder()\n      },\n      get columnPinning() {\n        return columnPinning()\n      },\n      get columnVisibility() {\n        return columnVisibility()\n      },\n    },\n    onColumnOrderChange: setColumnOrder,\n    onColumnPinningChange: setColumnPinning,\n    onColumnVisibilityChange: setColumnVisibility,\n    debugTable: true,\n  })\n</script>\n\n{#snippet headerCell(header: Header<typeof _features, Person, unknown>)}\n  <th colSpan={header.colSpan}>\n    <div class=\"whitespace-nowrap\">\n      {#if !header.isPlaceholder}\n        <FlexRender\n          content={header.column.columnDef.header}\n          context={header.getContext()}\n        />\n      {/if}\n    </div>\n    {#if !header.isPlaceholder && header.column.getCanPin()}\n      <div class=\"flex gap-1 justify-center\">\n        {#if header.column.getIsPinned() !== 'left'}\n          <button\n            class=\"border rounded px-2\"\n            onclick={() => {\n              header.column.pin('left')\n            }}\n          >\n            {'<='}\n          </button>\n        {/if}\n        {#if header.column.getIsPinned()}\n          <button\n            class=\"border rounded px-2\"\n            onclick={() => {\n              header.column.pin(false)\n            }}\n          >\n            X\n          </button>\n        {/if}\n        {#if header.column.getIsPinned() !== 'right'}\n          <button\n            class=\"border rounded px-2\"\n            onclick={() => {\n              header.column.pin('right')\n            }}\n          >\n            {'=>'}\n          </button>\n        {/if}\n      </div>\n    {/if}\n  </th>\n{/snippet}\n\n<div class=\"p-2\">\n  <div class=\"inline-block border border-black shadow rounded\">\n    <div class=\"px-1 border-b border-black\">\n      <label>\n        <input\n          checked={table.getIsAllColumnsVisible()}\n          onchange={(e) => {\n            console.info(table.getToggleAllColumnsVisibilityHandler()(e))\n          }}\n          type=\"checkbox\"\n        />{' '}\n        Toggle All\n      </label>\n    </div>\n    {#each table.getAllLeafColumns() as column}\n      <div class=\"px-1\">\n        <label>\n          <input\n            checked={column.getIsVisible()}\n            onchange={column.getToggleVisibilityHandler()}\n            type=\"checkbox\"\n          />{' '}\n          {column.id}\n        </label>\n      </div>\n    {/each}\n  </div>\n  <div class=\"h-4\"></div>\n  <div class=\"flex flex-wrap gap-2\">\n    <button\n      onclick={() => {\n        data = makeData(5000)\n      }}\n      class=\"border p-1\"\n    >\n      Refresh Data\n    </button>\n    <button onclick={() => randomizeColumns()} class=\"border p-1\">\n      Shuffle Columns\n    </button>\n  </div>\n  <div class=\"h-4\"></div>\n  <div>\n    <label>\n      <input\n        type=\"checkbox\"\n        checked={isSplit}\n        onchange={(e) => (isSplit = e.currentTarget.checked)}\n      />{' '}\n      Split Mode\n    </label>\n  </div>\n  <div class={`flex ${isSplit ? 'gap-4' : ''}`}>\n    {#if isSplit}\n      <table class=\"border-2 border-black\">\n        <thead>\n          {#each table.getLeftHeaderGroups() as headerGroup}\n            <tr>\n              {#each headerGroup.headers as header}\n                {@render headerCell(header)}\n              {/each}\n            </tr>\n          {/each}\n        </thead>\n        <tbody>\n          {#each table.getCoreRowModel().rows.slice(0, 20) as row}\n            <tr>\n              {#each row.getLeftVisibleCells() as cell}\n                <td>\n                  <FlexRender\n                    content={cell.column.columnDef.cell}\n                    context={cell.getContext()}\n                  />\n                </td>\n              {/each}\n            </tr>\n          {/each}\n        </tbody>\n      </table>\n    {/if}\n    <table class=\"border-2 border-black\">\n      <thead>\n        {#each isSplit ? table.getCenterHeaderGroups() : table.getHeaderGroups() as headerGroup}\n          <tr>\n            {#each headerGroup.headers as header}\n              {@render headerCell(header)}\n            {/each}\n          </tr>\n        {/each}\n      </thead>\n      <tbody>\n        {#each table.getCoreRowModel().rows.slice(0, 20) as row}\n          <tr>\n            {#each isSplit ? row.getCenterVisibleCells() : row.getVisibleCells() as cell}\n              <td>\n                <FlexRender\n                  content={cell.column.columnDef.cell}\n                  context={cell.getContext()}\n                />\n              </td>\n            {/each}\n          </tr>\n        {/each}\n      </tbody>\n    </table>\n    {#if isSplit}\n      <table class=\"border-2 border-black\">\n        <thead>\n          {#each table.getRightHeaderGroups() as headerGroup}\n            <tr>\n              {#each headerGroup.headers as header}\n                {@render headerCell(header)}\n              {/each}\n            </tr>\n          {/each}\n        </thead>\n        <tbody>\n          {#each table.getRowModel().rows.slice(0, 20) as row}\n            <tr>\n              {#each row.getRightVisibleCells() as cell}\n                <td>\n                  <FlexRender\n                    content={cell.column.columnDef.cell}\n                    context={cell.getContext()}\n                  />\n                </td>\n              {/each}\n            </tr>\n          {/each}\n        </tbody>\n      </table>\n    {/if}\n  </div>\n  <br />\n  <pre>{JSON.stringify(table.store.state.columnPinning, null, 2)}</pre>\n</div>\n"
  },
  {
    "path": "examples/svelte/column-pinning/src/index.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntd {\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntd:last-child {\n  border-right: 0;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n"
  },
  {
    "path": "examples/svelte/column-pinning/src/main.ts",
    "content": "import { mount } from 'svelte'\nimport App from './App.svelte'\n\nconst app = mount(App, {\n  target: document.getElementById('root')!,\n})\n\nexport default app\n"
  },
  {
    "path": "examples/svelte/column-pinning/src/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  subRows?: Array<Person>\n}\n\nconst range = (len: number) => {\n  const arr: Array<number> = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (): Person => {\n  return {\n    firstName: faker.person.firstName(),\n    lastName: faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: faker.number.int(1000),\n    progress: faker.number.int(100),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0],\n  }\n}\n\nexport function makeData(...lens: Array<number>) {\n  const makeDataLevel = (depth = 0): Array<Person> => {\n    const len = lens[depth]\n    return range(len).map((d): Person => {\n      return {\n        ...newPerson(),\n        subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined,\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n"
  },
  {
    "path": "examples/svelte/column-pinning/svelte.config.js",
    "content": "import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'\n\nexport default {\n  preprocess: vitePreprocess(),\n}\n"
  },
  {
    "path": "examples/svelte/column-pinning/tsconfig.json",
    "content": "{\n  \"extends\": \"@tsconfig/svelte/tsconfig.json\",\n  \"compilerOptions\": {\n    \"target\": \"esnext\",\n    \"useDefineForClassFields\": true,\n    \"module\": \"esnext\",\n    \"resolveJsonModule\": true,\n    \"allowJs\": true,\n    \"checkJs\": true,\n    \"isolatedModules\": true\n  },\n  \"include\": [\"src/**/*.ts\", \"src/**/*.js\", \"src/**/*.svelte\"]\n}\n"
  },
  {
    "path": "examples/svelte/column-pinning/vite.config.js",
    "content": "import { defineConfig } from 'vite'\nimport { svelte } from '@sveltejs/vite-plugin-svelte'\nimport rollupReplace from '@rollup/plugin-replace'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [\n    rollupReplace({\n      preventAssignment: true,\n      values: {\n        __DEV__: JSON.stringify(true),\n        'process.env.NODE_ENV': JSON.stringify('development'),\n      },\n    }),\n    svelte(),\n  ],\n})\n"
  },
  {
    "path": "examples/svelte/column-visibility/.gitignore",
    "content": "node_modules\n.DS_Store\ndist\ndist-ssr\n*.local\n\nsrc/**/*.d.ts\nsrc/**/*.map"
  },
  {
    "path": "examples/svelte/column-visibility/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run start` or `yarn start`\n"
  },
  {
    "path": "examples/svelte/column-visibility/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite App</title>\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n  </head>\n\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.ts\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/svelte/column-visibility/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-svelte-column-visibility\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"type\": \"module\",\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"test:types\": \"svelte-check --tsconfig ./tsconfig.json\",\n    \"lint\": \"eslint ./src\"\n  },\n  \"devDependencies\": {\n    \"@rollup/plugin-replace\": \"^6.0.3\",\n    \"@sveltejs/vite-plugin-svelte\": \"^6.2.4\",\n    \"@tanstack/svelte-table\": \"^9.0.0-alpha.10\",\n    \"@tsconfig/svelte\": \"^5.0.6\",\n    \"svelte\": \"^5.48.5\",\n    \"svelte-check\": \"^4.3.5\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\"\n  }\n}\n"
  },
  {
    "path": "examples/svelte/column-visibility/src/App.svelte",
    "content": "<script lang=\"ts\">\n  import type {\n    ColumnDef,\n    ColumnVisibilityState,\n    Updater,\n  } from '@tanstack/svelte-table'\n  import {\n    columnVisibilityFeature,\n    FlexRender,\n    createTable,\n    isFunction,\n    tableFeatures,\n  } from '@tanstack/svelte-table'\n  import './index.css'\n\n  type Person = {\n    firstName: string\n    lastName: string\n    age: number\n    visits: number\n    status: string\n    progress: number\n  }\n\n  const defaultData: Person[] = [\n    {\n      firstName: 'tanner',\n      lastName: 'linsley',\n      age: 24,\n      visits: 100,\n      status: 'In Relationship',\n      progress: 50,\n    },\n    {\n      firstName: 'tandy',\n      lastName: 'miller',\n      age: 40,\n      visits: 40,\n      status: 'Single',\n      progress: 80,\n    },\n    {\n      firstName: 'joe',\n      lastName: 'dirte',\n      age: 45,\n      visits: 20,\n      status: 'Complicated',\n      progress: 10,\n    },\n  ]\n\n  const columns: ColumnDef<typeof _features, Person>[] = [\n    {\n      header: 'Name',\n      footer: (props) => props.column.id,\n      columns: [\n        {\n          accessorKey: 'firstName',\n          cell: (info) => info.getValue(),\n          footer: (props) => props.column.id,\n        },\n        {\n          accessorFn: (row) => row.lastName,\n          id: 'lastName',\n          cell: (info) => info.getValue(),\n          header: () => 'Last Name',\n          footer: (props) => props.column.id,\n        },\n      ],\n    },\n    {\n      header: 'Info',\n      footer: (props) => props.column.id,\n      columns: [\n        {\n          accessorKey: 'age',\n          header: () => 'Age',\n          footer: (props) => props.column.id,\n        },\n        {\n          header: 'More Info',\n          columns: [\n            {\n              accessorKey: 'visits',\n              header: () => 'Visits',\n              footer: (props) => props.column.id,\n            },\n            {\n              accessorKey: 'status',\n              header: 'Status',\n              footer: (props) => props.column.id,\n            },\n            {\n              accessorKey: 'progress',\n              header: 'Profile Progress',\n              footer: (props) => props.column.id,\n            },\n          ],\n        },\n      ],\n    },\n  ]\n\n  const _features = tableFeatures({ columnVisibilityFeature })\n\n  let columnVisibility = $state<ColumnVisibilityState>({})\n\n  function setColumnVisibility(updater: Updater<ColumnVisibilityState>) {\n    if (isFunction(updater)) {\n      columnVisibility = updater(columnVisibility)\n    } else columnVisibility = updater\n  }\n\n  const table = createTable({\n    _features,\n    _rowModels: {},\n    data: defaultData,\n    columns,\n    state: {\n      get columnVisibility() {\n        return columnVisibility\n      },\n    },\n    onColumnVisibilityChange: setColumnVisibility,\n    debugTable: true,\n  })\n</script>\n\n<div class=\"p-2\">\n  <div class=\"inline-block border border-black shadow rounded\">\n    <div class=\"px-1 border-b border-black\">\n      <label>\n        <input\n          checked={table.getIsAllColumnsVisible()}\n          onchange={(e) => {\n            console.info(table.getToggleAllColumnsVisibilityHandler()(e))\n          }}\n          type=\"checkbox\"\n        />{' '}\n        Toggle All\n      </label>\n    </div>\n    {#each table.getAllLeafColumns() as column}\n      <div class=\"px-1\">\n        <label>\n          <input\n            checked={column.getIsVisible()}\n            onchange={column.getToggleVisibilityHandler()}\n            type=\"checkbox\"\n          />{' '}\n          {column.id}\n        </label>\n      </div>\n    {/each}\n  </div>\n  <div class=\"h-4\"></div>\n  <table>\n    <thead>\n      {#each table.getHeaderGroups() as headerGroup}\n        <tr>\n          {#each headerGroup.headers as header}\n            <th colSpan={header.colSpan}>\n              {#if !header.isPlaceholder}\n                <FlexRender\n                  content={header.column.columnDef.header}\n                  context={header.getContext()}\n                />\n              {/if}\n            </th>\n          {/each}\n        </tr>\n      {/each}\n    </thead>\n    <tbody>\n      {#each table.getCoreRowModel().rows.slice(0, 20) as row}\n        <tr>\n          {#each row.getVisibleCells() as cell}\n            <td>\n              <FlexRender\n                content={cell.column.columnDef.cell}\n                context={cell.getContext()}\n              />\n            </td>\n          {/each}\n        </tr>\n      {/each}\n    </tbody>\n    <tfoot>\n      {#each table.getFooterGroups() as footerGroup}\n        <tr>\n          {#each footerGroup.headers as header}\n            <th colSpan={header.colSpan}>\n              {#if !header.isPlaceholder}\n                <FlexRender\n                  content={header.column.columnDef.header}\n                  context={header.getContext()}\n                />\n              {/if}\n            </th>\n          {/each}\n        </tr>\n      {/each}\n    </tfoot>\n  </table>\n  <div class=\"h-4\"></div>\n  <pre>{JSON.stringify(table.store.state.columnVisibility, null, 2)}</pre>\n</div>\n"
  },
  {
    "path": "examples/svelte/column-visibility/src/index.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n"
  },
  {
    "path": "examples/svelte/column-visibility/src/main.ts",
    "content": "// @ts-ignore\nimport { mount } from 'svelte'\nimport App from './App.svelte'\n\nconst app = mount(App, {\n  target: document.getElementById('root')!,\n})\n\nexport default app\n"
  },
  {
    "path": "examples/svelte/column-visibility/svelte.config.js",
    "content": "import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'\n\nexport default {\n  preprocess: vitePreprocess(),\n}\n"
  },
  {
    "path": "examples/svelte/column-visibility/tsconfig.json",
    "content": "{\n  \"extends\": \"@tsconfig/svelte/tsconfig.json\",\n  \"compilerOptions\": {\n    \"target\": \"esnext\",\n    \"useDefineForClassFields\": true,\n    \"module\": \"esnext\",\n    \"resolveJsonModule\": true,\n    \"allowJs\": true,\n    \"checkJs\": true,\n    \"isolatedModules\": true\n  },\n  \"include\": [\"src/**/*.ts\", \"src/**/*.js\", \"src/**/*.svelte\"]\n}\n"
  },
  {
    "path": "examples/svelte/column-visibility/vite.config.js",
    "content": "import { defineConfig } from 'vite'\nimport { svelte } from '@sveltejs/vite-plugin-svelte'\nimport rollupReplace from '@rollup/plugin-replace'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [\n    rollupReplace({\n      preventAssignment: true,\n      values: {\n        __DEV__: JSON.stringify(true),\n        'process.env.NODE_ENV': JSON.stringify('development'),\n      },\n    }),\n    svelte(),\n  ],\n})\n"
  },
  {
    "path": "examples/svelte/filtering/.gitignore",
    "content": "node_modules\n.DS_Store\ndist\ndist-ssr\n*.local\n\nsrc/**/*.d.ts\nsrc/**/*.map"
  },
  {
    "path": "examples/svelte/filtering/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run start` or `yarn start`\n"
  },
  {
    "path": "examples/svelte/filtering/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite App</title>\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n  </head>\n\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.ts\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/svelte/filtering/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-svelte-filtering\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"type\": \"module\",\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"test:types\": \"svelte-check --tsconfig ./tsconfig.json\",\n    \"lint\": \"eslint ./src\"\n  },\n  \"devDependencies\": {\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"@rollup/plugin-replace\": \"^6.0.3\",\n    \"@sveltejs/vite-plugin-svelte\": \"^6.2.4\",\n    \"@tanstack/match-sorter-utils\": \"^9.0.0-alpha.4\",\n    \"@tanstack/svelte-table\": \"^9.0.0-alpha.10\",\n    \"@tsconfig/svelte\": \"^5.0.6\",\n    \"svelte\": \"^5.48.5\",\n    \"svelte-check\": \"^4.3.5\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\"\n  }\n}\n"
  },
  {
    "path": "examples/svelte/filtering/src/App.svelte",
    "content": "<script lang=\"ts\">\n  import { rankItem } from '@tanstack/match-sorter-utils'\n  import type { ColumnDef, FilterFn } from '@tanstack/svelte-table'\n  import {\n    FlexRender,\n    columnFilteringFeature,\n    columnVisibilityFeature,\n    createFilteredRowModel,\n    createPaginatedRowModel,\n    createTable,\n    filterFns,\n    globalFilteringFeature,\n    tableFeatures,\n  } from '@tanstack/svelte-table'\n  import './index.css'\n  import { makeData, type Person } from './makeData'\n\n  const _features = tableFeatures({\n    columnVisibilityFeature,\n    globalFilteringFeature,\n    columnFilteringFeature,\n  })\n\n  const fuzzyFilter: FilterFn<typeof _features, Person> = (\n    row,\n    columnId,\n    value,\n    addMeta,\n  ) => {\n    // Rank the item\n    const itemRank = rankItem(row.getValue(columnId), value)\n\n    // Store the itemRank info\n    addMeta?.({ itemRank })\n\n    // Return if the item should be filtered in/out\n    return itemRank.passed\n  }\n\n  const columns: ColumnDef<typeof _features, Person>[] = [\n    {\n      accessorFn: (row) => `${row.firstName} ${row.lastName}`,\n      id: 'fullName',\n      header: 'Name',\n      cell: (info) => info.getValue(),\n      footer: (props) => props.column.id,\n      filterFn: 'fuzzy',\n    },\n  ]\n\n  const table = createTable(\n    {\n      _features,\n      _rowModels: {\n        filteredRowModel: createFilteredRowModel({\n          ...filterFns,\n          fuzzy: fuzzyFilter,\n        }),\n        paginatedRowModel: createPaginatedRowModel(),\n      },\n      data: makeData(25),\n      columns,\n      globalFilterFn: fuzzyFilter,\n    },\n    (state) => ({\n      globalFilter: state.globalFilter,\n    }),\n  )\n\n  // Access selected state reactively\n  $effect(() => {\n    // Access table.state to create reactive dependency\n    table.state\n  })\n</script>\n\n<input\n  type=\"text\"\n  placeholder=\"Global filter\"\n  class=\"border w-full p-1\"\n  value={table.state.globalFilter ?? ''}\n  oninput={(e) => table.setGlobalFilter(e.target.value)}\n/>\n<div class=\"h-2\"></div>\n<table class=\"w-full\">\n  <thead>\n    {#each table.getHeaderGroups() as headerGroup}\n      <tr>\n        {#each headerGroup.headers as header, idx}\n          <th scope=\"col\">\n            {#if !header.isPlaceholder}\n              <FlexRender\n                content={header.column.columnDef.header}\n                context={header.getContext()}\n              />\n            {/if}\n          </th>\n        {/each}\n      </tr>\n    {/each}\n  </thead>\n  <tbody>\n    {#each table.getRowModel().rows as row}\n      <tr>\n        {#each row.getVisibleCells() as cell}\n          <td>\n            <FlexRender\n              content={cell.column.columnDef.cell}\n              context={cell.getContext()}\n            />\n          </td>\n        {/each}\n      </tr>\n    {/each}\n  </tbody>\n</table>\n<div class=\"h-2\"></div>\n<pre>\"globalFilter\": \"{table.state.globalFilter}\"</pre>\n"
  },
  {
    "path": "examples/svelte/filtering/src/index.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n"
  },
  {
    "path": "examples/svelte/filtering/src/main.ts",
    "content": "// @ts-ignore\nimport { mount } from 'svelte'\nimport App from './App.svelte'\nimport type { FilterFn } from '@tanstack/svelte-table'\nimport type { RankingInfo } from '@tanstack/match-sorter-utils'\n\ndeclare module '@tanstack/svelte-table' {\n  interface FilterFns {\n    fuzzy: FilterFn<unknown>\n  }\n  interface FilterMeta {\n    itemRank: RankingInfo\n  }\n}\n\nconst app = mount(App, {\n  target: document.getElementById('root')!,\n})\n\nexport default app\n"
  },
  {
    "path": "examples/svelte/filtering/src/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  subRows?: Array<Person>\n}\n\nconst range = (len: number) => {\n  const arr: Array<number> = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (): Person => {\n  return {\n    firstName: faker.person.firstName(),\n    lastName: faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: faker.number.int(1000),\n    progress: faker.number.int(100),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0],\n  }\n}\n\nexport function makeData(...lens: Array<number>) {\n  const makeDataLevel = (depth = 0): Array<Person> => {\n    const len = lens[depth]\n    return range(len).map((d): Person => {\n      return {\n        ...newPerson(),\n        subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined,\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n"
  },
  {
    "path": "examples/svelte/filtering/svelte.config.js",
    "content": "import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'\n\nexport default {\n  preprocess: vitePreprocess(),\n}\n"
  },
  {
    "path": "examples/svelte/filtering/tsconfig.json",
    "content": "{\n  \"extends\": \"@tsconfig/svelte/tsconfig.json\",\n  \"compilerOptions\": {\n    \"target\": \"esnext\",\n    \"useDefineForClassFields\": true,\n    \"module\": \"esnext\",\n    \"resolveJsonModule\": true,\n    \"allowJs\": true,\n    \"checkJs\": true,\n    \"isolatedModules\": true\n  },\n  \"include\": [\"src/**/*.ts\", \"src/**/*.js\", \"src/**/*.svelte\"]\n}\n"
  },
  {
    "path": "examples/svelte/filtering/vite.config.js",
    "content": "import { defineConfig } from 'vite'\nimport { svelte } from '@sveltejs/vite-plugin-svelte'\nimport rollupReplace from '@rollup/plugin-replace'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [\n    rollupReplace({\n      preventAssignment: true,\n      values: {\n        __DEV__: JSON.stringify(true),\n        'process.env.NODE_ENV': JSON.stringify('development'),\n      },\n    }),\n    svelte(),\n  ],\n})\n"
  },
  {
    "path": "examples/svelte/row-selection/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Svelte Row Selection Example</title>\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n  </head>\n\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.ts\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/svelte/row-selection/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-svelte-row-selection\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"type\": \"module\",\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"test:types\": \"svelte-check --tsconfig ./tsconfig.json\",\n    \"lint\": \"eslint ./src\"\n  },\n  \"devDependencies\": {\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"@rollup/plugin-replace\": \"^6.0.3\",\n    \"@sveltejs/vite-plugin-svelte\": \"^6.2.4\",\n    \"@tanstack/svelte-table\": \"^9.0.0-alpha.10\",\n    \"@tsconfig/svelte\": \"^5.0.6\",\n    \"svelte\": \"^5.48.5\",\n    \"svelte-check\": \"^4.3.5\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\"\n  }\n}\n"
  },
  {
    "path": "examples/svelte/row-selection/src/App.svelte",
    "content": "<script lang=\"ts\">\n  import {\n    columnFilteringFeature,\n    createFilteredRowModel,\n    createPaginatedRowModel,\n    createTable,\n    filterFns,\n    flexRender,\n    globalFilteringFeature,\n    rowPaginationFeature,\n    rowSelectionFeature,\n    tableFeatures,\n  } from '@tanstack/svelte-table'\n  import { makeData } from './makeData'\n  import type { Person } from './makeData'\n  import type {\n    Column,\n    ColumnDef,\n    SvelteTable,\n  } from '@tanstack/svelte-table'\n  import './index.css'\n\n  const _features = tableFeatures({\n    rowPaginationFeature,\n    rowSelectionFeature,\n    columnFilteringFeature,\n    globalFilteringFeature,\n  })\n\n  let data = $state(makeData(1_000))\n  const refreshData = () => {\n    data = makeData(100_000) // stress test\n  }\n\n  // Create table with selector to track specific state\n  const table = createTable(\n    {\n      _features,\n      _rowModels: {\n        filteredRowModel: createFilteredRowModel(filterFns),\n        paginatedRowModel: createPaginatedRowModel(),\n      },\n      get data() {\n        return data\n      },\n      columns: [\n        {\n          id: 'select',\n          header: () => 'select',\n          cell: ({ row }) => row.getIsSelected(),\n        },\n        {\n          header: 'Name',\n          footer: (props) => props.column.id,\n          columns: [\n            {\n              accessorKey: 'firstName',\n              cell: (info) => info.getValue(),\n              footer: (props) => props.column.id,\n            },\n            {\n              accessorFn: (row) => row.lastName,\n              id: 'lastName',\n              cell: (info) => info.getValue(),\n              header: () => 'Last Name',\n              footer: (props) => props.column.id,\n            },\n          ],\n        },\n        {\n          header: 'Info',\n          footer: (props) => props.column.id,\n          columns: [\n            {\n              accessorKey: 'age',\n              header: () => 'Age',\n              footer: (props) => props.column.id,\n            },\n            {\n              header: 'More Info',\n              columns: [\n                {\n                  accessorKey: 'visits',\n                  header: () => 'Visits',\n                  footer: (props) => props.column.id,\n                },\n                {\n                  accessorKey: 'status',\n                  header: 'Status',\n                  footer: (props) => props.column.id,\n                },\n                {\n                  accessorKey: 'progress',\n                  header: 'Profile Progress',\n                  footer: (props) => props.column.id,\n                },\n              ],\n            },\n          ],\n        },\n      ],\n      getRowId: (row) => row.id,\n      enableRowSelection: true,\n      debugTable: true,\n    },\n    (state) => ({\n      rowSelection: state.rowSelection,\n      globalFilter: state.globalFilter,\n      pagination: state.pagination,\n    }),\n  )\n\n  // Access selected state reactively\n  $effect(() => {\n    // Access table.state to create reactive dependency\n    table.state\n  })\n</script>\n\n<div class=\"p-2\">\n  <div>\n    <input\n      value={table.state.globalFilter ?? ''}\n      oninput={(e) => table.setGlobalFilter(e.target.value)}\n      class=\"p-2 font-lg shadow border border-block\"\n      placeholder=\"Search all columns...\"\n    />\n  </div>\n  <div class=\"h-2\" />\n  <table>\n    <thead>\n      {#each table.getHeaderGroups() as headerGroup}\n        <tr>\n          {#each headerGroup.headers as header}\n            <th colSpan={header.colSpan}>\n              {#if !header.isPlaceholder}\n                {#if header.id === 'select'}\n                  <IndeterminateCheckbox\n                    checked={table.getIsAllRowsSelected()}\n                    indeterminate={table.getIsSomeRowsSelected()}\n                    onChange={table.getToggleAllRowsSelectedHandler()}\n                  />\n                {:else}\n                  <flexRender\n                    content={header.column.columnDef.header}\n                    context={header.getContext()}\n                  />\n                {/if}\n                {#if header.column.getCanFilter()}\n                  <div>\n                    <Filter column={header.column} {table} />\n                  </div>\n                {/if}\n              {/if}\n            </th>\n          {/each}\n        </tr>\n      {/each}\n    </thead>\n    <tbody>\n      {#each table.getRowModel().rows as row}\n        <tr>\n          {#each row.getAllCells() as cell}\n            <td>\n              {#if cell.column.id === 'select'}\n                <IndeterminateCheckbox\n                  checked={row.getIsSelected()}\n                  disabled={!row.getCanSelect()}\n                  indeterminate={row.getIsSomeSelected()}\n                  onChange={row.getToggleSelectedHandler()}\n                />\n              {:else}\n                <flexRender\n                  content={cell.column.columnDef.cell}\n                  context={cell.getContext()}\n                />\n              {/if}\n            </td>\n          {/each}\n        </tr>\n      {/each}\n    </tbody>\n    <tfoot>\n      <tr>\n        <td class=\"p-1\">\n          <IndeterminateCheckbox\n            checked={table.getIsAllPageRowsSelected()}\n            indeterminate={table.getIsSomePageRowsSelected()}\n            onChange={table.getToggleAllPageRowsSelectedHandler()}\n          />\n        </td>\n        <td colSpan={20}>Page Rows ({table.getRowModel().rows.length})</td>\n      </tr>\n    </tfoot>\n  </table>\n  <div class=\"h-2\" />\n  <div class=\"flex items-center gap-2\">\n    <button\n      class=\"border rounded p-1\"\n      onclick={() => table.setPageIndex(0)}\n      disabled={!table.getCanPreviousPage()}\n    >\n      {'<<'}\n    </button>\n    <button\n      class=\"border rounded p-1\"\n      onclick={() => table.previousPage()}\n      disabled={!table.getCanPreviousPage()}\n    >\n      {'<'}\n    </button>\n    <button\n      class=\"border rounded p-1\"\n      onclick={() => table.nextPage()}\n      disabled={!table.getCanNextPage()}\n    >\n      {'>'}\n    </button>\n    <button\n      class=\"border rounded p-1\"\n      onclick={() => table.setPageIndex(table.getPageCount() - 1)}\n      disabled={!table.getCanNextPage()}\n    >\n      {'>>'}\n    </button>\n    <span class=\"flex items-center gap-1\">\n      <div>Page</div>\n      <strong>\n        {table.state.pagination.pageIndex + 1} of {table.getPageCount()}\n      </strong>\n    </span>\n    <span class=\"flex items-center gap-1\">\n      | Go to page:\n      <input\n        type=\"number\"\n        min=\"1\"\n        max={table.getPageCount()}\n        value={table.state.pagination.pageIndex + 1}\n        oninput={(e) => {\n          const page = e.target.value ? Number(e.target.value) - 1 : 0\n          table.setPageIndex(page)\n        }}\n        class=\"border p-1 rounded w-16\"\n      />\n    </span>\n    <select\n      value={table.state.pagination.pageSize}\n      onchange={(e) => {\n        table.setPageSize(Number(e.target.value))\n      }}\n    >\n      {#each [10, 20, 30, 40, 50] as pageSize}\n        <option value={pageSize}>Show {pageSize}</option>\n      {/each}\n    </select>\n  </div>\n  <br />\n  <div>\n    {Object.keys(table.state.rowSelection).length} of{' '}\n    {table.getPreFilteredRowModel().rows.length} Total Rows Selected\n  </div>\n  <hr />\n  <br />\n  <div>\n    <button class=\"border rounded p-2 mb-2\" onclick={() => refreshData()}>\n      Refresh Data\n    </button>\n  </div>\n  <div>\n    <button\n      class=\"border rounded p-2 mb-2\"\n      onclick={() =>\n        console.info(\n          'table.getSelectedRowModel().flatRows',\n          table.getSelectedRowModel().flatRows,\n        )\n      }\n    >\n      Log table.getSelectedRowModel().flatRows\n    </button>\n  </div>\n  <div>\n    <label>Row Selection State:</label>\n    <pre>{JSON.stringify(table.state, null, 2)}</pre>\n  </div>\n</div>\n\n{#snippet Filter({ column, table }: { column: Column<typeof _features, Person>; table: SvelteTable<typeof _features, Person> })}\n  {@const firstValue = table\n    .getPreFilteredRowModel()\n    .flatRows[0]?.getValue(column.id)}\n\n  {#if typeof firstValue === 'number'}\n    <div class=\"flex space-x-2\">\n      <input\n        type=\"number\"\n        value={((column.getFilterValue() as any)?.[0] ?? '') as string}\n        oninput={(e) =>\n          column.setFilterValue((old: any) => [e.target.value, old?.[1]])\n        }\n        placeholder={`Min`}\n        class=\"w-24 border shadow rounded\"\n      />\n      <input\n        type=\"number\"\n        value={((column.getFilterValue() as any)?.[1] ?? '') as string}\n        oninput={(e) =>\n          column.setFilterValue((old: any) => [old?.[0], e.target.value])\n        }\n        placeholder={`Max`}\n        class=\"w-24 border shadow rounded\"\n      />\n    </div>\n  {:else}\n    <input\n      type=\"text\"\n      value={(column.getFilterValue() ?? '') as string}\n      oninput={(e) => column.setFilterValue(e.target.value)}\n      placeholder={`Search...`}\n      class=\"w-36 border shadow rounded\"\n    />\n  {/if}\n{/snippet}\n\n{#snippet IndeterminateCheckbox({ indeterminate, class: className = '', checked, disabled, onChange }: { indeterminate?: boolean; class?: string; checked?: boolean; disabled?: boolean; onChange?: (event: Event) => void })}\n  {@const ref = $state<HTMLInputElement | null>(null)}\n\n  $effect(() => {\n    if (typeof indeterminate === 'boolean' && ref) {\n      ref.indeterminate = !checked && indeterminate\n    }\n  })\n\n  <input\n    type=\"checkbox\"\n    bind:this={ref}\n    class={className + ' cursor-pointer'}\n    {checked}\n    {disabled}\n    {onChange}\n  />\n{/snippet}\n"
  },
  {
    "path": "examples/svelte/row-selection/src/index.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n"
  },
  {
    "path": "examples/svelte/row-selection/src/main.ts",
    "content": "import App from './App.svelte'\n\nconst rootElement = document.getElementById('root')\nif (!rootElement) throw new Error('Failed to find the root element')\n\nnew App({\n  target: rootElement,\n})\n"
  },
  {
    "path": "examples/svelte/row-selection/src/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = {\n  id: string\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  subRows?: Array<Person>\n}\n\nconst range = (len: number) => {\n  const arr: Array<number> = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (): Person => {\n  return {\n    id: faker.string.uuid(),\n    firstName: faker.person.firstName(),\n    lastName: faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: faker.number.int(1000),\n    progress: faker.number.int(100),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0],\n  }\n}\n\nexport function makeData(...lens: Array<number>) {\n  const makeDataLevel = (depth = 0): Array<Person> => {\n    const len = lens[depth]\n    return range(len).map((_d): Person => {\n      return {\n        ...newPerson(),\n        subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined,\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n"
  },
  {
    "path": "examples/svelte/row-selection/svelte.config.js",
    "content": "import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'\n\nexport default {\n  preprocess: vitePreprocess(),\n}\n"
  },
  {
    "path": "examples/svelte/row-selection/tsconfig.json",
    "content": "{\n  \"extends\": \"@tsconfig/svelte/tsconfig.json\",\n  \"compilerOptions\": {\n    \"target\": \"ESNext\",\n    \"useDefineForClassFields\": true,\n    \"module\": \"ESNext\",\n    \"lib\": [\"ESNext\", \"DOM\"],\n    \"moduleResolution\": \"bundler\",\n    \"resolveJsonModule\": true,\n    \"allowJs\": true,\n    \"checkJs\": true,\n    \"isolatedModules\": true,\n    \"strict\": true\n  },\n  \"include\": [\"src/**/*.ts\", \"src/**/*.svelte\"],\n  \"references\": [{ \"path\": \"./tsconfig.node.json\" }]\n}\n"
  },
  {
    "path": "examples/svelte/row-selection/vite.config.js",
    "content": "import { defineConfig } from 'vite'\nimport { svelte } from '@sveltejs/vite-plugin-svelte'\nimport rollupReplace from '@rollup/plugin-replace'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [\n    rollupReplace({\n      preventAssignment: true,\n      values: {\n        __DEV__: JSON.stringify(true),\n        'process.env.NODE_ENV': JSON.stringify('development'),\n      },\n    }),\n    svelte(),\n  ],\n})\n"
  },
  {
    "path": "examples/svelte/sorting/.gitignore",
    "content": "node_modules\n.DS_Store\ndist\ndist-ssr\n*.local\n\nsrc/**/*.d.ts\nsrc/**/*.map"
  },
  {
    "path": "examples/svelte/sorting/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run start` or `yarn start`\n"
  },
  {
    "path": "examples/svelte/sorting/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite App</title>\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n  </head>\n\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.ts\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/svelte/sorting/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-svelte-sorting\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"type\": \"module\",\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"test:types\": \"svelte-check --tsconfig ./tsconfig.json\",\n    \"lint\": \"eslint ./src\"\n  },\n  \"devDependencies\": {\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"@rollup/plugin-replace\": \"^6.0.3\",\n    \"@sveltejs/vite-plugin-svelte\": \"^6.2.4\",\n    \"@tanstack/svelte-table\": \"^9.0.0-alpha.10\",\n    \"@tsconfig/svelte\": \"^5.0.6\",\n    \"svelte\": \"^5.48.5\",\n    \"svelte-check\": \"^4.3.5\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\"\n  }\n}\n"
  },
  {
    "path": "examples/svelte/sorting/src/App.svelte",
    "content": "<script lang=\"ts\">\n  import type { ColumnDef } from '@tanstack/svelte-table'\n  import {\n    FlexRender,\n    Subscribe,\n    createSortedRowModel,\n    createTable,\n    rowSortingFeature,\n    renderComponent,\n    sortFns,\n    tableFeatures,\n  } from '@tanstack/svelte-table'\n  import Header from './Header.svelte'\n  import './index.css'\n  import { makeData, type Person } from './makeData'\n\n  const _features = tableFeatures({\n    rowSortingFeature,\n  })\n\n  const columns: ColumnDef<typeof _features, Person>[] = [\n    {\n      header: 'Name',\n      footer: (props) => props.column.id,\n      columns: [\n        {\n          accessorKey: 'firstName',\n          header: ({ header }) => renderComponent(Header, { header }),\n          cell: (info) => info.getValue(),\n          footer: (props) => props.column.id,\n        },\n        {\n          accessorFn: (row) => row.lastName,\n          id: 'lastName',\n          cell: (info) => info.getValue(),\n          header: ({ header }) =>\n            renderComponent(Header, { label: 'Last Name', header }),\n          footer: (props) => props.column.id,\n        },\n      ],\n    },\n    {\n      header: 'Info',\n      footer: (props) => props.column.id,\n      columns: [\n        {\n          accessorKey: 'age',\n          header: ({ header }) =>\n            renderComponent(Header, { label: 'Age', header }),\n          footer: (props) => props.column.id,\n        },\n        {\n          header: 'More Info',\n          columns: [\n            {\n              accessorKey: 'visits',\n              header: ({ header }) =>\n                renderComponent(Header, { label: 'Visits', header }),\n              footer: (props) => props.column.id,\n            },\n            {\n              accessorKey: 'status',\n              header: ({ header }) =>\n                renderComponent(Header, { label: 'Status', header }),\n              footer: (props) => props.column.id,\n            },\n            {\n              accessorKey: 'progress',\n              header: ({ header }) =>\n                renderComponent(Header, { label: 'Progress', header }),\n              footer: (props) => props.column.id,\n            },\n          ],\n        },\n      ],\n    },\n  ]\n\n  let data = $state(makeData(1_000))\n\n  const refreshData = () => {\n    console.info('refresh')\n    data = makeData(100_000) // stress test\n  }\n\n  const table = createTable(\n    {\n      _features,\n      _rowModels: {\n        sortedRowModel: createSortedRowModel(sortFns),\n      },\n      get data() {\n        return data\n      },\n      columns,\n      debugTable: true,\n    },\n    (state) => state, // Select all state for reactivity\n  )\n</script>\n\n<div class=\"p-2\">\n  <div class=\"h-2\"></div>\n  <table>\n    <thead>\n      {#each table.getHeaderGroups() as headerGroup}\n        <tr>\n          {#each headerGroup.headers as header}\n            <th colSpan={header.colSpan}>\n              {#if !header.isPlaceholder}\n                <FlexRender\n                  content={header.column.columnDef.header}\n                  context={header.getContext()}\n                />\n              {/if}\n            </th>\n          {/each}\n        </tr>\n      {/each}\n    </thead>\n    <tbody>\n      {#each table.getRowModel().rows.slice(0, 10) as row}\n        <tr>\n          {#each row.getAllCells() as cell}\n            <td>\n              <FlexRender\n                content={cell.column.columnDef.cell}\n                context={cell.getContext()}\n              />\n            </td>\n          {/each}\n        </tr>\n      {/each}\n    </tbody>\n    <tfoot>\n      {#each table.getFooterGroups() as footerGroup}\n        <tr>\n          {#each footerGroup.headers as header}\n            <th colSpan={header.colSpan}>\n              {#if !header.isPlaceholder}\n                <FlexRender\n                  content={header.column.columnDef.footer}\n                  context={header.getContext()}\n                />\n              {/if}\n            </th>\n          {/each}\n        </tr>\n      {/each}\n    </tfoot>\n  </table>\n  <div>{table.getRowModel().rows.length} Rows</div>\n  <div>\n    <button onclick={() => refreshData()}>Refresh Data</button>\n  </div>\n  <Subscribe selector={(state) => state} {table}>\n    {#snippet children(state)}\n      <pre>{JSON.stringify(state, null, 2)}</pre>\n    {/snippet}\n  </Subscribe>\n</div>\n"
  },
  {
    "path": "examples/svelte/sorting/src/Header.svelte",
    "content": "<script lang=\"ts\">\n  import type { Header, TableFeatures } from '@tanstack/svelte-table'\n  import type { Person } from './makeData'\n\n  type Props<TFeatures extends TableFeatures> = {\n    label?: string\n    header?: Header<TFeatures, Person, unknown>\n  }\n\n  const { label, header }: Props<any> = $props()\n</script>\n\n{#if header && header.column}\n  <button\n    class:cursor-pointer={header.column.getCanSort()}\n    class:select-none={header.column.getCanSort()}\n    onclick={header.column.getToggleSortingHandler()}\n  >\n    {label ?? header.column.id}\n    {#if header.column.getIsSorted().toString() === 'asc'}\n      🔼\n    {:else if header.column.getIsSorted().toString() === 'desc'}\n      🔽\n    {/if}\n  </button>\n{:else}\n  {label ?? ''}\n{/if}\n\n<style>\n  button {\n    padding-left: 4px;\n    padding-right: 4px;\n    font-weight: bold;\n  }\n</style>\n"
  },
  {
    "path": "examples/svelte/sorting/src/index.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n"
  },
  {
    "path": "examples/svelte/sorting/src/main.ts",
    "content": "// @ts-ignore\nimport { mount } from 'svelte'\nimport App from './App.svelte'\n\nconst app = mount(App, {\n  target: document.getElementById('root')!,\n})\n\nexport default app\n"
  },
  {
    "path": "examples/svelte/sorting/src/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  subRows?: Array<Person>\n}\n\nconst range = (len: number) => {\n  const arr: Array<number> = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (): Person => {\n  return {\n    firstName: faker.person.firstName(),\n    lastName: faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: faker.number.int(1000),\n    progress: faker.number.int(100),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0],\n  }\n}\n\nexport function makeData(...lens: Array<number>) {\n  const makeDataLevel = (depth = 0): Array<Person> => {\n    const len = lens[depth]\n    return range(len).map((d): Person => {\n      return {\n        ...newPerson(),\n        subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined,\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n"
  },
  {
    "path": "examples/svelte/sorting/src/tableHelper.svelte.ts",
    "content": "import { rowSortingFeature, tableFeatures } from '@tanstack/svelte-table'\n\nexport const _features = tableFeatures({\n  rowSortingFeature,\n})\n"
  },
  {
    "path": "examples/svelte/sorting/src/vite-env.d.ts",
    "content": "/// <reference types=\"svelte\" />\n/// <reference types=\"vite/client\" />\n"
  },
  {
    "path": "examples/svelte/sorting/svelte.config.js",
    "content": "import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'\n\nexport default {\n  preprocess: vitePreprocess(),\n}\n"
  },
  {
    "path": "examples/svelte/sorting/tsconfig.json",
    "content": "{\n  \"extends\": \"@tsconfig/svelte/tsconfig.json\",\n  \"compilerOptions\": {\n    \"target\": \"esnext\",\n    \"useDefineForClassFields\": true,\n    \"module\": \"esnext\",\n    \"resolveJsonModule\": true,\n    \"allowJs\": true,\n    \"checkJs\": true,\n    \"isolatedModules\": true\n  },\n  \"include\": [\"src/**/*.ts\", \"src/**/*.js\", \"src/**/*.svelte\"]\n}\n"
  },
  {
    "path": "examples/svelte/sorting/vite.config.js",
    "content": "import { defineConfig } from 'vite'\nimport { svelte } from '@sveltejs/vite-plugin-svelte'\nimport rollupReplace from '@rollup/plugin-replace'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [\n    rollupReplace({\n      preventAssignment: true,\n      values: {\n        __DEV__: JSON.stringify(true),\n        'process.env.NODE_ENV': JSON.stringify('development'),\n      },\n    }),\n    svelte(),\n  ],\n})\n"
  },
  {
    "path": "examples/vanilla/basic/.gitignore",
    "content": "node_modules\n.DS_Store\ndist\ndist-ssr\n*.local\n"
  },
  {
    "path": "examples/vanilla/basic/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run start` or `yarn start`\n"
  },
  {
    "path": "examples/vanilla/basic/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite + TS</title>\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n  </head>\n  <body>\n    <div id=\"root\" class=\"p-2\">\n      <div id=\"wrapper\"></div>\n    </div>\n    <script type=\"module\" src=\"/src/main.ts\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/vanilla/basic/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-vanilla-basic\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"start\": \"vite\"\n  },\n  \"devDependencies\": {\n    \"@rollup/plugin-replace\": \"^6.0.3\",\n    \"@types/node\": \"^25.0.10\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\"\n  },\n  \"dependencies\": {\n    \"@tanstack/table-core\": \"^9.0.0-alpha.16\",\n    \"nanostores\": \"^1.1.0\"\n  }\n}\n"
  },
  {
    "path": "examples/vanilla/basic/src/createTable.ts",
    "content": "import { atom } from 'nanostores'\nimport {\n  constructTable,\n  coreFeatures,\n  getInitialTableState,\n} from '@tanstack/table-core'\nimport type {\n  RowData,\n  Table,\n  TableFeatures,\n  TableOptions,\n  TableState,\n} from '@tanstack/table-core'\n\nexport const flexRender = <TProps extends object>(comp: any, props: TProps) => {\n  if (typeof comp === 'function') {\n    return comp(props)\n  }\n  return comp\n}\n\nexport const createTable = <\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  tableOptions: TableOptions<TFeatures, TData>,\n): Table<TFeatures, TData> => {\n  const _features = { ...coreFeatures, ...tableOptions._features }\n\n  // const initialState = getInitialTableState(_features)\n  const state = atom(getInitialTableState(_features, tableOptions.initialState))\n\n  // Compose in the generic options to the user options\n  const statefulOptions: TableOptions<TFeatures, TData> = {\n    ...tableOptions,\n    _features,\n    state: { ...state, ...tableOptions.state },\n  }\n\n  // Create a new table\n  const table = constructTable(statefulOptions)\n\n  // Subscribe to state changes\n  state.subscribe((currentState) => {\n    table.setOptions((prev) => ({\n      ...prev,\n      ...tableOptions,\n      state: {\n        ...(currentState as TableState<TFeatures>),\n        ...tableOptions.state,\n      },\n      // Similarly, we'll maintain both our internal state and any user-provided state\n      onStateChange: (updater) => {\n        if (typeof updater === 'function') {\n          const newState = updater(currentState as TableState<TFeatures>)\n          state.set(newState)\n        } else {\n          state.set(updater)\n        }\n        tableOptions.onStateChange?.(updater)\n      },\n    }))\n  })\n\n  return table\n}\n"
  },
  {
    "path": "examples/vanilla/basic/src/index.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n"
  },
  {
    "path": "examples/vanilla/basic/src/main.ts",
    "content": "import './index.css'\nimport { createColumnHelper, tableFeatures } from '@tanstack/table-core'\nimport { createTable, flexRender } from './createTable'\n\ntype Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  status: string\n  progress: number\n}\n\nconst data: Array<Person> = [\n  {\n    firstName: 'tanner',\n    lastName: 'linsley',\n    age: 24,\n    visits: 100,\n    status: 'In Relationship',\n    progress: 50,\n  },\n  {\n    firstName: 'tandy',\n    lastName: 'miller',\n    age: 40,\n    visits: 40,\n    status: 'Single',\n    progress: 80,\n  },\n  {\n    firstName: 'joe',\n    lastName: 'dirte',\n    age: 45,\n    visits: 20,\n    status: 'Complicated',\n    progress: 10,\n  },\n]\n\nconst _features = tableFeatures({})\n\nconst columnHelper = createColumnHelper<typeof _features, Person>()\n\nconst columns = columnHelper.columns([\n  columnHelper.accessor('firstName', {\n    cell: (info) => info.getValue(),\n    footer: (info) => info.column.id,\n  }),\n  columnHelper.accessor((row) => row.lastName, {\n    id: 'lastName',\n    cell: (info) => `<i>${info.getValue()}</i>`,\n    header: () => '<span>Last Name</span>',\n    footer: (info) => info.column.id,\n  }),\n  columnHelper.accessor('age', {\n    header: () => 'Age',\n    cell: (info) => info.renderValue(),\n    footer: (info) => info.column.id,\n  }),\n  columnHelper.accessor('visits', {\n    header: () => '<span>Visits</span>',\n    footer: (info) => info.column.id,\n  }),\n  columnHelper.accessor('status', {\n    header: 'Status',\n    footer: (info) => info.column.id,\n  }),\n  columnHelper.accessor('progress', {\n    header: 'Profile Progress',\n    footer: (info) => info.column.id,\n  }),\n])\n\nconst renderTable = () => {\n  // Create table elements\n  const tableElement = document.createElement('table')\n  const theadElement = document.createElement('thead')\n  const tbodyElement = document.createElement('tbody')\n  const tfootElement = document.createElement('tfoot')\n\n  tableElement.appendChild(theadElement)\n  tableElement.appendChild(tbodyElement)\n  tableElement.appendChild(tfootElement)\n\n  // Render table headers\n  table.getHeaderGroups().forEach((headerGroup) => {\n    const trElement = document.createElement('tr')\n    headerGroup.headers.forEach((header) => {\n      const thElement = document.createElement('th')\n      thElement.innerHTML = header.isPlaceholder\n        ? ''\n        : flexRender(header.column.columnDef.header, header.getContext())\n      trElement.appendChild(thElement)\n    })\n    theadElement.appendChild(trElement)\n  })\n\n  // Render table rows\n  table.getRowModel().rows.forEach((row) => {\n    const trElement = document.createElement('tr')\n    row.getAllCells().forEach((cell) => {\n      const tdElement = document.createElement('td')\n      tdElement.innerHTML = flexRender(\n        cell.column.columnDef.cell,\n        cell.getContext(),\n      )\n      trElement.appendChild(tdElement)\n    })\n    tbodyElement.appendChild(trElement)\n  })\n\n  // Render table footers\n  table.getFooterGroups().forEach((footerGroup) => {\n    const trElement = document.createElement('tr')\n    footerGroup.headers.forEach((header) => {\n      const thElement = document.createElement('th')\n      thElement.innerHTML = header.isPlaceholder\n        ? ''\n        : flexRender(header.column.columnDef.footer, header.getContext())\n      trElement.appendChild(thElement)\n    })\n    tfootElement.appendChild(trElement)\n  })\n\n  // Clear previous content and append new content\n  const wrapperElement = document.getElementById('wrapper') as HTMLDivElement\n  wrapperElement.innerHTML = ''\n  wrapperElement.appendChild(tableElement)\n}\n\nconst table = createTable({\n  _features,\n  _rowModels: {},\n  columns,\n  data,\n  debugAll: true,\n})\n\nrenderTable()\n"
  },
  {
    "path": "examples/vanilla/basic/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"module\": \"ESNext\",\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"emitDecoratorMetadata\": true,\n    \"noEmit\": true,\n    \"jsx\": \"react-jsx\",\n    \"experimentalDecorators\": true,\n    \"useDefineForClassFields\": false,\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": false,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "examples/vanilla/basic/vite.config.js",
    "content": "import { defineConfig } from 'vite'\nimport rollupReplace from '@rollup/plugin-replace'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [\n    rollupReplace({\n      preventAssignment: true,\n      values: {\n        __DEV__: JSON.stringify(true),\n        'process.env.NODE_ENV': JSON.stringify('development'),\n      },\n    }),\n  ],\n})\n"
  },
  {
    "path": "examples/vanilla/pagination/.gitignore",
    "content": "node_modules\n.DS_Store\ndist\ndist-ssr\n*.local\n"
  },
  {
    "path": "examples/vanilla/pagination/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run start` or `yarn start`\n"
  },
  {
    "path": "examples/vanilla/pagination/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite + TS</title>\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n  </head>\n  <body>\n    <div id=\"root\" class=\"p-2\">\n      <div id=\"wrapper\"></div>\n    </div>\n    <script type=\"module\" src=\"/src/main.ts\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/vanilla/pagination/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-vanilla-pagination\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"start\": \"vite\"\n  },\n  \"devDependencies\": {\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"@rollup/plugin-replace\": \"^6.0.3\",\n    \"@types/node\": \"^25.0.10\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\"\n  },\n  \"dependencies\": {\n    \"@tanstack/table-core\": \"^9.0.0-alpha.16\",\n    \"nanostores\": \"^1.1.0\"\n  }\n}\n"
  },
  {
    "path": "examples/vanilla/pagination/src/createTable.ts",
    "content": "import { atom } from 'nanostores'\nimport {\n  constructTable,\n  coreFeatures,\n  getInitialTableState,\n} from '@tanstack/table-core'\nimport type {\n  RowData,\n  Table,\n  TableFeatures,\n  TableOptions,\n  TableState,\n} from '@tanstack/table-core'\n\nexport const flexRender = <TProps extends object>(comp: any, props: TProps) => {\n  if (typeof comp === 'function') {\n    return comp(props)\n  }\n  return comp\n}\n\nexport const createTable = <\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  tableOptions: TableOptions<TFeatures, TData>,\n): Table<TFeatures, TData> => {\n  const _features = { ...coreFeatures, ...tableOptions._features }\n\n  // const initialState = getInitialTableState(_features)\n  const state = atom(getInitialTableState(_features, tableOptions.initialState))\n\n  // Compose in the generic options to the user options\n  const statefulOptions: TableOptions<TFeatures, TData> = {\n    ...tableOptions,\n    _features,\n    state: { ...state, ...tableOptions.state },\n  }\n\n  // Create a new table\n  const table = constructTable(statefulOptions)\n\n  // Subscribe to state changes\n  state.subscribe((currentState) => {\n    table.setOptions((prev) => ({\n      ...prev,\n      ...tableOptions,\n      state: {\n        ...(currentState as TableState<TFeatures>),\n        ...tableOptions.state,\n      },\n      // Similarly, we'll maintain both our internal state and any user-provided state\n      onStateChange: (updater) => {\n        if (typeof updater === 'function') {\n          const newState = updater(currentState as TableState<TFeatures>)\n          state.set(newState)\n        } else {\n          state.set(updater)\n        }\n        tableOptions.onStateChange?.(updater)\n      },\n    }))\n  })\n\n  return table\n}\n"
  },
  {
    "path": "examples/vanilla/pagination/src/index.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n\nbutton:disabled {\n  opacity: 0.5;\n}\n"
  },
  {
    "path": "examples/vanilla/pagination/src/main.ts",
    "content": "import './index.css'\n\nimport {\n  createColumnHelper,\n  createPaginatedRowModel,\n  createSortedRowModel,\n  rowPaginationFeature,\n  rowSortingFeature,\n  sortFns,\n  tableFeatures,\n} from '@tanstack/table-core'\nimport { makeData } from './makeData'\nimport { createTable, flexRender } from './createTable'\nimport type { Person } from './makeData'\nimport type { Table } from '@tanstack/table-core'\n\nconst data = makeData(100000)\n\nconst _features = tableFeatures({\n  rowPaginationFeature,\n  rowSortingFeature,\n})\n\nconst columnHelper = createColumnHelper<typeof _features, Person>()\n\nconst columns = columnHelper.columns([\n  columnHelper.accessor('firstName', {\n    cell: (info) => info.getValue(),\n    footer: (info) => info.column.id,\n  }),\n  columnHelper.accessor((row) => row.lastName, {\n    id: 'lastName',\n    cell: (info) => `<i>${info.getValue()}</i>`,\n    header: () => '<span>Last Name</span>',\n    footer: (info) => info.column.id,\n  }),\n  columnHelper.accessor('age', {\n    header: () => 'Age',\n    cell: (info) => info.renderValue(),\n    footer: (info) => info.column.id,\n  }),\n  columnHelper.accessor('visits', {\n    header: () => '<span>Visits</span>',\n    footer: (info) => info.column.id,\n  }),\n  columnHelper.accessor('status', {\n    header: 'Status',\n    footer: (info) => info.column.id,\n  }),\n  columnHelper.accessor('progress', {\n    header: 'Profile Progress',\n    footer: (info) => info.column.id,\n  }),\n])\n\nconst renderTable = (table: Table<typeof _features, Person>) => {\n  // Create table elements\n  const tableElement = document.createElement('table')\n  const theadElement = document.createElement('thead')\n  const tbodyElement = document.createElement('tbody')\n\n  tableElement.classList.add('mb-2')\n\n  tableElement.appendChild(theadElement)\n  tableElement.appendChild(tbodyElement)\n\n  // Render table headers\n  table.getHeaderGroups().forEach((headerGroup) => {\n    const trElement = document.createElement('tr')\n    headerGroup.headers.forEach((header) => {\n      const thElement = document.createElement('th')\n      thElement.colSpan = header.colSpan\n      const divElement = document.createElement('div')\n      divElement.classList.add(\n        'w-36',\n        ...(header.column.getCanSort()\n          ? ['cursor-pointer', 'select-none']\n          : []),\n      )\n      ;((divElement.onclick = (e) =>\n        header.column.getToggleSortingHandler()?.(e)),\n        (divElement.innerHTML = header.isPlaceholder\n          ? ''\n          : flexRender(header.column.columnDef.header, header.getContext())))\n      divElement.innerHTML +=\n        {\n          asc: ' 🔼',\n          desc: ' 🔽',\n        }[header.column.getIsSorted() as string] ?? ''\n      thElement.appendChild(divElement)\n      trElement.appendChild(thElement)\n    })\n    theadElement.appendChild(trElement)\n  })\n\n  // Render table rows\n  table.getRowModel().rows.forEach((row) => {\n    const trElement = document.createElement('tr')\n    row.getAllCells().forEach((cell) => {\n      const tdElement = document.createElement('td')\n      tdElement.innerHTML = flexRender(\n        cell.column.columnDef.cell,\n        cell.getContext(),\n      )\n      trElement.appendChild(tdElement)\n    })\n    tbodyElement.appendChild(trElement)\n  })\n\n  // Render pagination\n  const paginationElement = document.createElement('div')\n  paginationElement.classList.add('flex', 'items-center', 'gap-2')\n\n  // Render pagination first page button\n  const firstPageButton = document.createElement('button')\n  firstPageButton.classList.add('border', 'rounded', 'p-1')\n  firstPageButton.disabled = !table.getCanPreviousPage()\n  firstPageButton.innerHTML = '<<'\n  firstPageButton.onclick = () => table.firstPage()\n  paginationElement.appendChild(firstPageButton)\n\n  // Render pagination previous page button\n  const prevPageButton = document.createElement('button')\n  prevPageButton.classList.add('border', 'rounded', 'p-1')\n  prevPageButton.disabled = !table.getCanPreviousPage()\n  prevPageButton.innerHTML = '<'\n  prevPageButton.onclick = () => table.previousPage()\n  paginationElement.appendChild(prevPageButton)\n\n  // Render pagination next page button\n  const nextPageButton = document.createElement('button')\n  nextPageButton.classList.add('border', 'rounded', 'p-1')\n  nextPageButton.disabled = !table.getCanNextPage()\n  nextPageButton.innerHTML = '>'\n  nextPageButton.onclick = () => table.nextPage()\n  paginationElement.appendChild(nextPageButton)\n\n  // Render pagination last page button\n  const lastPageButton = document.createElement('button')\n  lastPageButton.classList.add('border', 'rounded', 'p-1')\n  lastPageButton.disabled = !table.getCanNextPage()\n  lastPageButton.innerHTML = '>>'\n  lastPageButton.onclick = () => table.lastPage()\n  paginationElement.appendChild(lastPageButton)\n\n  // Render pagination info\n  const paginationInfoElement = document.createElement('span')\n  paginationInfoElement.classList.add('flex', 'items-center', 'gap-1')\n  paginationInfoElement.innerHTML = `<div>Page</div><strong>${table.store.state.pagination.pageIndex + 1} of ${table.getPageCount().toLocaleString()}</strong>`\n  paginationElement.appendChild(paginationInfoElement)\n\n  // Render pagination set page\n  const paginationPageElement = document.createElement('span')\n  paginationPageElement.classList.add('flex', 'items-center', 'gap-1')\n  paginationPageElement.textContent = '| Go to page:'\n  const paginationPageInput = document.createElement('input')\n  paginationPageInput.type = 'number'\n  paginationPageInput.min = String(1)\n  paginationPageInput.max = String(table.getPageCount())\n  paginationPageInput.defaultValue = String(\n    table.store.state.pagination.pageIndex + 1,\n  )\n  paginationPageInput.classList.add('border', 'p-1', 'rounded', 'w-16')\n  paginationPageInput.oninput = (e) => {\n    const target = e.target as HTMLInputElement\n    const page = target.value ? Number(target.value) - 1 : 0\n    table.setPageIndex(page)\n  }\n  paginationPageElement.appendChild(paginationPageInput)\n  paginationElement.appendChild(paginationPageElement)\n\n  // Render pagiantion page size\n  const paginationPageSizeSelect = document.createElement('select')\n  paginationPageSizeSelect.value = String(table.store.state.pagination.pageSize)\n  paginationPageSizeSelect.onchange = (e) => {\n    const target = e.target as HTMLSelectElement\n    table.setPageSize(Number(target.value))\n  }\n  ;[10, 20, 30, 40, 50].map((pageSize) => {\n    const option = document.createElement('option')\n    option.value = String(pageSize)\n    option.selected = table.store.state.pagination.pageSize === pageSize\n    option.textContent = `Show ${pageSize}`\n    paginationPageSizeSelect.appendChild(option)\n  })\n  paginationElement.appendChild(paginationPageSizeSelect)\n\n  // Render table state info\n  const stateInfoElement = document.createElement('pre')\n  stateInfoElement.textContent = JSON.stringify(\n    {\n      pagination: table.store.state.pagination,\n      sorting: table.store.state.sorting,\n    },\n    null,\n    2,\n  )\n\n  // Clear previous content and append new content\n  const wrapperElement = document.getElementById('wrapper') as HTMLDivElement\n  wrapperElement.innerHTML = ''\n  wrapperElement.appendChild(tableElement)\n  wrapperElement.appendChild(paginationElement)\n  wrapperElement.appendChild(stateInfoElement)\n}\n\nconst table = createTable({\n  _features,\n  _rowModels: {\n    paginatedRowModel: createPaginatedRowModel(),\n    sortedRowModel: createSortedRowModel(sortFns),\n  },\n  data,\n  columns,\n  initialState: {\n    pagination: {\n      pageIndex: 0,\n      pageSize: 10,\n    },\n    sorting: [\n      {\n        id: 'lastName',\n        desc: false,\n      },\n    ],\n  },\n  onStateChange: () => renderTable(table),\n  debugTable: true,\n})\n\nrenderTable(table)\n"
  },
  {
    "path": "examples/vanilla/pagination/src/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  subRows?: Array<Person>\n}\n\nconst range = (len: number) => {\n  const arr: Array<number> = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (): Person => {\n  return {\n    firstName: faker.person.firstName(),\n    lastName: faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: faker.number.int(1000),\n    progress: faker.number.int(100),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0],\n  }\n}\n\nexport function makeData(...lens: Array<number>) {\n  const makeDataLevel = (depth = 0): Array<Person> => {\n    const len = lens[depth]\n    return range(len).map((_d): Person => {\n      return {\n        ...newPerson(),\n        subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined,\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n"
  },
  {
    "path": "examples/vanilla/pagination/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"module\": \"ESNext\",\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"emitDecoratorMetadata\": true,\n    \"noEmit\": true,\n    \"jsx\": \"react-jsx\",\n    \"experimentalDecorators\": true,\n    \"useDefineForClassFields\": false,\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": false,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "examples/vanilla/pagination/vite.config.js",
    "content": "import { defineConfig } from 'vite'\nimport rollupReplace from '@rollup/plugin-replace'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [\n    rollupReplace({\n      preventAssignment: true,\n      values: {\n        __DEV__: JSON.stringify(true),\n        'process.env.NODE_ENV': JSON.stringify('development'),\n      },\n    }),\n  ],\n})\n"
  },
  {
    "path": "examples/vanilla/sorting/.gitignore",
    "content": "node_modules\n.DS_Store\ndist\ndist-ssr\n*.local\n"
  },
  {
    "path": "examples/vanilla/sorting/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run start` or `yarn start`\n"
  },
  {
    "path": "examples/vanilla/sorting/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite + TS</title>\n    <script type=\"module\" src=\"https://cdn.skypack.dev/twind/shim\"></script>\n  </head>\n  <body>\n    <div id=\"root\" class=\"p-2\">\n      <div id=\"wrapper\"></div>\n    </div>\n    <script type=\"module\" src=\"/src/main.ts\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/vanilla/sorting/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-vanilla-sorting\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"serve\": \"vite preview\",\n    \"start\": \"vite\"\n  },\n  \"devDependencies\": {\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"@rollup/plugin-replace\": \"^6.0.3\",\n    \"@types/node\": \"^25.0.10\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\"\n  },\n  \"dependencies\": {\n    \"@tanstack/table-core\": \"^9.0.0-alpha.16\",\n    \"nanostores\": \"^1.1.0\"\n  }\n}\n"
  },
  {
    "path": "examples/vanilla/sorting/src/createTable.ts",
    "content": "import { atom } from 'nanostores'\nimport {\n  constructTable,\n  coreFeatures,\n  getInitialTableState,\n} from '@tanstack/table-core'\nimport type {\n  RowData,\n  Table,\n  TableFeatures,\n  TableOptions,\n  TableState,\n} from '@tanstack/table-core'\n\nexport const flexRender = <TProps extends object>(comp: any, props: TProps) => {\n  if (typeof comp === 'function') {\n    return comp(props)\n  }\n  return comp\n}\n\nexport const createTable = <\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  tableOptions: TableOptions<TFeatures, TData>,\n): Table<TFeatures, TData> => {\n  const _features = { ...coreFeatures, ...tableOptions._features }\n\n  // const initialState = getInitialTableState(_features)\n  const state = atom(getInitialTableState(_features, tableOptions.initialState))\n\n  // Compose in the generic options to the user options\n  const statefulOptions: TableOptions<TFeatures, TData> = {\n    ...tableOptions,\n    _features,\n    state: { ...state, ...tableOptions.state },\n  }\n\n  // Create a new table\n  const table = constructTable(statefulOptions)\n\n  // Subscribe to state changes\n  state.subscribe((currentState) => {\n    table.setOptions((prev) => ({\n      ...prev,\n      ...tableOptions,\n      state: {\n        ...(currentState as TableState<TFeatures>),\n        ...tableOptions.state,\n      },\n      // Similarly, we'll maintain both our internal state and any user-provided state\n      onStateChange: (updater) => {\n        if (typeof updater === 'function') {\n          const newState = updater(currentState as TableState<TFeatures>)\n          state.set(newState)\n        } else {\n          state.set(updater)\n        }\n        tableOptions.onStateChange?.(updater)\n      },\n    }))\n  })\n\n  return table\n}\n"
  },
  {
    "path": "examples/vanilla/sorting/src/index.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n\nbutton:disabled {\n  opacity: 0.5;\n}\n"
  },
  {
    "path": "examples/vanilla/sorting/src/main.ts",
    "content": "import './index.css'\nimport {\n  constructTableHelper,\n  createSortedRowModel,\n  rowSortingFeature,\n  sortFns,\n} from '@tanstack/table-core'\nimport { makeData } from './makeData'\nimport { createTable, flexRender } from './createTable'\nimport type { SortFn } from '@tanstack/table-core'\n\nconst data = makeData(1000)\n\n// Custom sorting logic for one of our enum columns\nconst sortStatusFn: SortFn<any, any> = (rowA, rowB, _columnId) => {\n  const statusA = rowA.original.status\n  const statusB = rowB.original.status\n  const statusOrder = ['single', 'complicated', 'relationship']\n  return statusOrder.indexOf(statusA) - statusOrder.indexOf(statusB)\n}\n\nconst tableHelper = constructTableHelper(createTable, {\n  _features: {\n    rowSortingFeature,\n  },\n  _rowModels: {\n    sortedRowModel: createSortedRowModel(sortFns),\n  },\n})\n\nconst { columnHelper } = tableHelper\n\nconst columns = [\n  columnHelper.accessor('firstName', {\n    cell: (info) => info.getValue(),\n    // This column will sort in ascending order by default since it is a string column\n  }),\n  columnHelper.accessor((row) => row.lastName, {\n    id: 'lastName',\n    cell: (info) => `<i>${info.getValue()}</i>`,\n    header: () => '<span>Last Name</span>',\n    sortUndefined: 'last', // Force undefined values to the end\n    sortDescFirst: false, // First sort order will be ascending (nullable values can mess up auto detection of sort order)\n  }),\n  columnHelper.accessor('age', {\n    header: () => 'Age',\n    cell: (info) => info.renderValue(),\n    // This column will sort in descending order by default since it is a number column\n  }),\n  columnHelper.accessor('visits', {\n    header: () => '<span>Visits</span>',\n    sortUndefined: 'last', // Force undefined values to the end\n  }),\n  columnHelper.accessor('status', {\n    header: 'Status',\n    sortFn: sortStatusFn, // Use our custom sorting function for this enum column\n  }),\n  columnHelper.accessor('progress', {\n    header: 'Profile Progress',\n    enableSorting: false, // Disable sorting for this column\n  }),\n  columnHelper.accessor('rank', {\n    header: 'Rank',\n    invertSorting: true, // Invert the sorting order (golf score-like where smaller is better)\n  }),\n  columnHelper.accessor('createdAt', {\n    header: 'Created At',\n  }),\n]\n\nconst renderTable = () => {\n  // Create table elements\n  const tableElement = document.createElement('table')\n  const theadElement = document.createElement('thead')\n  const tbodyElement = document.createElement('tbody')\n\n  tableElement.classList.add('mb-2')\n\n  tableElement.appendChild(theadElement)\n  tableElement.appendChild(tbodyElement)\n\n  // Render table headers\n  table.getHeaderGroups().forEach((headerGroup) => {\n    const trElement = document.createElement('tr')\n    headerGroup.headers.forEach((header) => {\n      const thElement = document.createElement('th')\n      thElement.colSpan = header.colSpan\n      const divElement = document.createElement('div')\n      divElement.classList.add(\n        'w-36',\n        ...(header.column.getCanSort()\n          ? ['cursor-pointer', 'select-none']\n          : []),\n      )\n      ;((divElement.onclick = (e) =>\n        header.column.getToggleSortingHandler()?.(e)),\n        (divElement.innerHTML = header.isPlaceholder\n          ? ''\n          : flexRender(header.column.columnDef.header, header.getContext())))\n      divElement.innerHTML +=\n        {\n          asc: ' 🔼',\n          desc: ' 🔽',\n        }[header.column.getIsSorted() as string] ?? ''\n      thElement.appendChild(divElement)\n      trElement.appendChild(thElement)\n    })\n    theadElement.appendChild(trElement)\n  })\n\n  // Render table rows\n  table\n    .getRowModel()\n    .rows.slice(0, 10)\n    .forEach((row) => {\n      const trElement = document.createElement('tr')\n      row.getAllCells().forEach((cell) => {\n        const tdElement = document.createElement('td')\n        tdElement.innerHTML = flexRender(\n          cell.column.columnDef.cell,\n          cell.getContext(),\n        )\n        trElement.appendChild(tdElement)\n      })\n      tbodyElement.appendChild(trElement)\n    })\n\n  // Render table state info\n  const stateInfoElement = document.createElement('pre')\n  stateInfoElement.textContent = JSON.stringify(\n    {\n      sorting: table.store.state.sorting,\n    },\n    null,\n    2,\n  )\n\n  // Clear previous content and append new content\n  const wrapperElement = document.getElementById('wrapper') as HTMLDivElement\n  wrapperElement.innerHTML = ''\n  wrapperElement.appendChild(tableElement)\n  wrapperElement.appendChild(stateInfoElement)\n}\n\nconst table = tableHelper.tableCreator({\n  data,\n  columns,\n  onStateChange: () => renderTable(),\n  debugTable: true,\n})\n\nrenderTable()\n"
  },
  {
    "path": "examples/vanilla/sorting/src/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  rank: number\n  createdAt: Date\n  subRows?: Array<Person>\n}\n\nconst range = (len: number) => {\n  const arr: Array<number> = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (): Person => {\n  return {\n    firstName: faker.person.firstName(),\n    lastName: faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: faker.number.int(1000),\n    progress: faker.number.int(100),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0],\n    rank: faker.number.int(100),\n    createdAt: faker.date.anytime(),\n  }\n}\n\nexport function makeData(...lens: Array<number>) {\n  const makeDataLevel = (depth = 0): Array<Person> => {\n    const len = lens[depth]\n    return range(len).map((_d): Person => {\n      return {\n        ...newPerson(),\n        subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined,\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n"
  },
  {
    "path": "examples/vanilla/sorting/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"module\": \"ESNext\",\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"emitDecoratorMetadata\": true,\n    \"noEmit\": true,\n    \"jsx\": \"react-jsx\",\n    \"experimentalDecorators\": true,\n    \"useDefineForClassFields\": false,\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": false,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "examples/vanilla/sorting/vite.config.js",
    "content": "import { defineConfig } from 'vite'\nimport rollupReplace from '@rollup/plugin-replace'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [\n    rollupReplace({\n      preventAssignment: true,\n      values: {\n        __DEV__: JSON.stringify(true),\n        'process.env.NODE_ENV': JSON.stringify('development'),\n      },\n    }),\n  ],\n})\n"
  },
  {
    "path": "examples/vue/basic/.gitignore",
    "content": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\npnpm-debug.log*\nlerna-debug.log*\n\nnode_modules\ndist\ndist-ssr\n*.local\n\n# Editor directories and files\n.vscode/*\n!.vscode/extensions.json\n.idea\n.DS_Store\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n*.sw?\n"
  },
  {
    "path": "examples/vue/basic/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run dev` or `yarn dev`\n"
  },
  {
    "path": "examples/vue/basic/env.d.ts",
    "content": "/// <reference types=\"vite/client\" />\n"
  },
  {
    "path": "examples/vue/basic/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <link rel=\"icon\" href=\"/favicon.ico\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite App</title>\n    <script src=\"https://cdn.tailwindcss.com\"></script>\n  </head>\n  <body>\n    <div id=\"app\"></div>\n    <script type=\"module\" src=\"/src/main.ts\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/vue/basic/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-vue-basic\",\n  \"private\": true,\n  \"version\": \"0.0.0\",\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"preview\": \"vite preview\",\n    \"lint\": \"eslint ./src\",\n    \"test:types\": \"vue-tsc\"\n  },\n  \"dependencies\": {\n    \"@tanstack/vue-table\": \"^9.0.0-alpha.10\",\n    \"vue\": \"^3.5.27\"\n  },\n  \"devDependencies\": {\n    \"@types/node\": \"^25.0.10\",\n    \"@vitejs/plugin-vue\": \"^6.0.3\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\",\n    \"vue-tsc\": \"^3.2.4\"\n  }\n}\n"
  },
  {
    "path": "examples/vue/basic/src/App.vue",
    "content": "<script setup lang=\"ts\">\nimport {\n  FlexRender,\n  useTable,\n  createColumnHelper,\n  tableFeatures,\n} from '@tanstack/vue-table'\nimport { ref } from 'vue'\n\ntype Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  status: string\n  progress: number\n}\n\nconst defaultData: Person[] = [\n  {\n    firstName: 'tanner',\n    lastName: 'linsley',\n    age: 24,\n    visits: 100,\n    status: 'In Relationship',\n    progress: 50,\n  },\n  {\n    firstName: 'tandy',\n    lastName: 'miller',\n    age: 40,\n    visits: 40,\n    status: 'Single',\n    progress: 80,\n  },\n  {\n    firstName: 'joe',\n    lastName: 'dirte',\n    age: 45,\n    visits: 20,\n    status: 'Complicated',\n    progress: 10,\n  },\n]\n\nconst _features = tableFeatures({})\n\nconst columnHelper = createColumnHelper<typeof _features, Person>()\n\nconst columns = [\n  columnHelper.group({\n    header: 'Name',\n    footer: (props) => props.column.id,\n    columns: columnHelper.columns([\n      columnHelper.accessor('firstName', {\n        cell: (info) => info.getValue(),\n        footer: (props) => props.column.id,\n      }),\n      columnHelper.accessor((row) => row.lastName, {\n        id: 'lastName',\n        cell: (info) => info.getValue(),\n        header: () => 'Last Name',\n        footer: (props) => props.column.id,\n      }),\n    ]),\n  }),\n  columnHelper.group({\n    header: 'Info',\n    footer: (props) => props.column.id,\n    columns: columnHelper.columns([\n      columnHelper.accessor('age', {\n        header: () => 'Age',\n        footer: (props) => props.column.id,\n      }),\n      columnHelper.group({\n        header: 'More Info',\n        columns: columnHelper.columns([\n          columnHelper.accessor('visits', {\n            header: () => 'Visits',\n            footer: (props) => props.column.id,\n          }),\n          columnHelper.accessor('status', {\n            header: 'Status',\n            footer: (props) => props.column.id,\n          }),\n          columnHelper.accessor('progress', {\n            header: 'Profile Progress',\n            footer: (props) => props.column.id,\n          }),\n        ]),\n      }),\n    ]),\n  }),\n]\n\nconst data = ref(defaultData)\n\nconst rerender = () => {\n  data.value = defaultData\n}\n\nconst table = useTable({\n  _features,\n  _rowModels: {},\n  get data() {\n    return data.value\n  },\n  columns,\n  debugTable: true,\n})\n</script>\n\n<template>\n  <div class=\"p-2\">\n    <table>\n      <thead>\n        <tr\n          v-for=\"headerGroup in table.getHeaderGroups()\"\n          :key=\"headerGroup.id\"\n        >\n          <th\n            v-for=\"header in headerGroup.headers\"\n            :key=\"header.id\"\n            :colSpan=\"header.colSpan\"\n          >\n            <FlexRender\n              v-if=\"!header.isPlaceholder\"\n              :render=\"header.column.columnDef.header\"\n              :props=\"header.getContext()\"\n            />\n          </th>\n        </tr>\n      </thead>\n      <tbody>\n        <tr v-for=\"row in table.getRowModel().rows\" :key=\"row.id\">\n          <td v-for=\"cell in row.getAllCells()\" :key=\"cell.id\">\n            <FlexRender\n              :render=\"cell.column.columnDef.cell\"\n              :props=\"cell.getContext()\"\n            />\n          </td>\n        </tr>\n      </tbody>\n      <tfoot>\n        <tr\n          v-for=\"footerGroup in table.getFooterGroups()\"\n          :key=\"footerGroup.id\"\n        >\n          <th\n            v-for=\"header in footerGroup.headers\"\n            :key=\"header.id\"\n            :colSpan=\"header.colSpan\"\n          >\n            <FlexRender\n              v-if=\"!header.isPlaceholder\"\n              :render=\"header.column.columnDef.footer\"\n              :props=\"header.getContext()\"\n            />\n          </th>\n        </tr>\n      </tfoot>\n    </table>\n    <div class=\"h-4\" />\n    <button @click=\"rerender\" class=\"border p-2\">Rerender</button>\n  </div>\n</template>\n\n<style>\nhtml {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n</style>\n"
  },
  {
    "path": "examples/vue/basic/src/env.d.ts",
    "content": "/// <reference types=\"vite/client\" />\n\ndeclare module '*.vue' {\n  import type { DefineComponent } from 'vue'\n  // eslint-disable-next-line @typescript-eslint/ban-types\n  const component: DefineComponent<{}, {}, any>\n  export default component\n}\n"
  },
  {
    "path": "examples/vue/basic/src/main.ts",
    "content": "import { createApp } from 'vue'\nimport App from './App.vue'\n\ncreateApp(App).mount('#app')\n"
  },
  {
    "path": "examples/vue/basic/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"module\": \"ESNext\",\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"preserve\",\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src/**/*.ts\", \"src/**/*.tsx\", \"src/**/*.vue\"]\n}\n"
  },
  {
    "path": "examples/vue/basic/vite.config.ts",
    "content": "import { defineConfig } from 'vite'\nimport vue from '@vitejs/plugin-vue'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [vue()],\n})\n"
  },
  {
    "path": "examples/vue/column-ordering/.gitignore",
    "content": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\npnpm-debug.log*\nlerna-debug.log*\n\nnode_modules\n.DS_Store\ndist\ndist-ssr\ncoverage\n*.local\n\n/cypress/videos/\n/cypress/screenshots/\n\n# Editor directories and files\n.vscode/*\n!.vscode/extensions.json\n.idea\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n*.sw?\n"
  },
  {
    "path": "examples/vue/column-ordering/.vscode/extensions.json",
    "content": "{\n  \"recommendations\": [\"Vue.volar\", \"Vue.vscode-typescript-vue-plugin\"]\n}\n"
  },
  {
    "path": "examples/vue/column-ordering/README.md",
    "content": "# column-ordering\n\nThis template should help get you started developing with Vue 3 in Vite.\n\n## Recommended IDE Setup\n\n[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).\n\n## Type Support for `.vue` Imports in TS\n\nTypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin) to make the TypeScript language service aware of `.vue` types.\n\nIf the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471#discussioncomment-1361669) that is more performant. You can enable it by the following steps:\n\n1. Disable the built-in TypeScript Extension\n   1. Run `Extensions: Show Built-in Extensions` from VSCode's command palette\n   2. Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)`\n2. Reload the VSCode window by running `Developer: Reload Window` from the command palette.\n\n## Customize configuration\n\nSee [Vite Configuration Reference](https://vitejs.dev/config/).\n\n## Project Setup\n\n```sh\nnpm install\n```\n\n### Compile and Hot-Reload for Development\n\n```sh\nnpm run dev\n```\n\n### Type-Check, Compile and Minify for Production\n\n```sh\nnpm run build\n```\n"
  },
  {
    "path": "examples/vue/column-ordering/env.d.ts",
    "content": "/// <reference types=\"vite/client\" />\n"
  },
  {
    "path": "examples/vue/column-ordering/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <link rel=\"icon\" href=\"/favicon.ico\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite App</title>\n    <script src=\"https://cdn.tailwindcss.com\"></script>\n  </head>\n  <body>\n    <div id=\"app\"></div>\n    <script type=\"module\" src=\"/src/main.ts\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/vue/column-ordering/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-vue-column-ordering\",\n  \"version\": \"0.0.0\",\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"preview\": \"vite preview\",\n    \"lint\": \"eslint ./src\"\n  },\n  \"dependencies\": {\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"@tanstack/vue-table\": \"^9.0.0-alpha.10\",\n    \"vue\": \"^3.5.27\"\n  },\n  \"devDependencies\": {\n    \"@types/node\": \"^25.0.10\",\n    \"@vitejs/plugin-vue\": \"^6.0.3\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\",\n    \"vue-tsc\": \"^3.2.4\"\n  }\n}\n"
  },
  {
    "path": "examples/vue/column-ordering/src/App.vue",
    "content": "<script setup lang=\"ts\">\nimport {\n  FlexRender,\n  columnOrderingFeature,\n  columnVisibilityFeature,\n  createColumnHelper,\n  tableFeatures,\n  type Column,\n  useTable,\n} from '@tanstack/vue-table'\nimport { makeData, type Person } from './makeData'\nimport { ref } from 'vue'\nimport { faker } from '@faker-js/faker'\n\nconst _features = tableFeatures({\n  columnOrderingFeature,\n  columnVisibilityFeature,\n})\n\nconst columnHelper = createColumnHelper<typeof _features, Person>()\n\nconst data = ref(makeData(20))\n\nconst columns = ref(\n  columnHelper.columns([\n    columnHelper.group({\n      header: 'Name',\n      footer: (props) => props.column.id,\n      columns: columnHelper.columns([\n        columnHelper.accessor('firstName', {\n          cell: (info) => info.getValue(),\n          footer: (props) => props.column.id,\n        }),\n        columnHelper.accessor((row) => row.lastName, {\n          id: 'lastName',\n          cell: (info) => info.getValue(),\n          header: () => 'Last Name',\n          footer: (props) => props.column.id,\n        }),\n      ]),\n    }),\n    columnHelper.group({\n      header: 'Info',\n      footer: (props) => props.column.id,\n      columns: columnHelper.columns([\n        columnHelper.accessor('age', {\n          header: () => 'Age',\n          footer: (props) => props.column.id,\n        }),\n        columnHelper.group({\n          header: 'More Info',\n          columns: columnHelper.columns([\n            columnHelper.accessor('visits', {\n              header: () => 'Visits',\n              footer: (props) => props.column.id,\n            }),\n            columnHelper.accessor('status', {\n              header: 'Status',\n              footer: (props) => props.column.id,\n            }),\n            columnHelper.accessor('progress', {\n              header: 'Profile Progress',\n              footer: (props) => props.column.id,\n            }),\n          ]),\n        }),\n      ]),\n    }),\n  ]),\n)\n\nconst rerender = () => (data.value = makeData(20))\n\nconst table = useTable(\n  {\n    _features,\n    data,\n    get columns() {\n      return columns.value\n    },\n    debugTable: true,\n    debugHeaders: true,\n    debugColumns: true,\n  },\n  (state) => ({\n    columnOrder: state.columnOrder,\n    columnVisibility: state.columnVisibility,\n  }),\n)\n\nconst randomizeColumns = () => {\n  table.setColumnOrder(\n    faker.helpers.shuffle(table.getAllLeafColumns().map((d) => d.id)),\n  )\n}\n\nfunction toggleColumnVisibility(column: Column<any, any>) {\n  table.setColumnVisibility({\n    ...table.state.columnVisibility,\n    [column.id]: !column.getIsVisible(),\n  })\n}\n\nfunction toggleAllColumnsVisibility() {\n  table.getAllLeafColumns().forEach((column) => {\n    toggleColumnVisibility(column)\n  })\n}\n</script>\n\n<template>\n  <div class=\"p-2\">\n    <div class=\"inline-block border border-black shadow rounded\">\n      <div class=\"px-1 border-b border-black\">\n        <label>\n          <input\n            type=\"checkbox\"\n            :checked=\"table.getIsAllColumnsVisible()\"\n            @input=\"toggleAllColumnsVisibility\"\n          />\n          Toggle All\n        </label>\n      </div>\n      <div\n        v-for=\"column in table.getAllLeafColumns()\"\n        :key=\"column.id\"\n        class=\"px-1\"\n      >\n        <label>\n          <input\n            type=\"checkbox\"\n            :checked=\"column.getIsVisible()\"\n            @input=\"toggleColumnVisibility(column)\"\n          />\n\n          {{ column.id }}\n        </label>\n      </div>\n    </div>\n    <div class=\"h-4\" />\n    <div class=\"flex flex-wrap gap-2\">\n      <button @click=\"rerender\" class=\"border p-1\">Regenerate</button>\n      <button @click=\"randomizeColumns\" class=\"border p-1\">\n        Shuffle Columns\n      </button>\n    </div>\n    <div class=\"h-4\" />\n\n    <table>\n      <thead>\n        <tr\n          v-for=\"headerGroup in table.getHeaderGroups()\"\n          :key=\"headerGroup.id\"\n        >\n          <th\n            v-for=\"header in headerGroup.headers\"\n            :key=\"header.id\"\n            :colSpan=\"header.colSpan\"\n          >\n            <FlexRender\n              v-if=\"!header.isPlaceholder\"\n              :render=\"header.column.columnDef.header\"\n              :props=\"header.getContext()\"\n            />\n          </th>\n        </tr>\n      </thead>\n      <tbody>\n        <tr v-for=\"row in table.getRowModel().rows\" :key=\"row.id\">\n          <td v-for=\"cell in row.getVisibleCells()\" :key=\"cell.id\">\n            <FlexRender\n              :render=\"cell.column.columnDef.cell\"\n              :props=\"cell.getContext()\"\n            />\n          </td>\n        </tr>\n      </tbody>\n      <tfoot>\n        <tr\n          v-for=\"footerGroup in table.getFooterGroups()\"\n          :key=\"footerGroup.id\"\n        >\n          <th\n            v-for=\"header in footerGroup.headers\"\n            :key=\"header.id\"\n            :colSpan=\"header.colSpan\"\n          >\n            <FlexRender\n              v-if=\"!header.isPlaceholder\"\n              :render=\"header.column.columnDef.footer\"\n              :props=\"header.getContext()\"\n            />\n          </th>\n        </tr>\n      </tfoot>\n    </table>\n    <pre>{{ JSON.stringify(table.state.columnOrder, null, 2) }}</pre>\n  </div>\n</template>\n\n<style>\nhtml,\nbody {\n  padding: 4px;\n  margin: 0;\n\n  font-family: Arial, Helvetica, sans-serif;\n}\n\ntable {\n  border: 1px solid lightgray;\n  border-collapse: collapse;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth,\ntd {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\nth {\n  padding: 8px;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n</style>\n"
  },
  {
    "path": "examples/vue/column-ordering/src/env.d.ts",
    "content": "/// <reference types=\"vite/client\" />\n\ndeclare module '*.vue' {\n  import type { DefineComponent } from 'vue'\n  // eslint-disable-next-line @typescript-eslint/ban-types\n  const component: DefineComponent<{}, {}, any>\n  export default component\n}\n"
  },
  {
    "path": "examples/vue/column-ordering/src/main.ts",
    "content": "import { createApp } from 'vue'\nimport App from './App.vue'\n\ncreateApp(App).mount('#app')\n"
  },
  {
    "path": "examples/vue/column-ordering/src/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  subRows?: Array<Person>\n}\n\nconst range = (len: number) => {\n  const arr: Array<number> = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (): Person => {\n  return {\n    firstName: faker.person.firstName(),\n    lastName: faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: faker.number.int(1000),\n    progress: faker.number.int(100),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0],\n  }\n}\n\nexport function makeData(...lens: Array<number>) {\n  const makeDataLevel = (depth = 0): Array<Person> => {\n    const len = lens[depth]\n    return range(len).map((): Person => {\n      return {\n        ...newPerson(),\n        subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined,\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n"
  },
  {
    "path": "examples/vue/column-ordering/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"module\": \"ESNext\",\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"preserve\",\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src/**/*.ts\", \"src/**/*.tsx\", \"src/**/*.vue\"]\n}\n"
  },
  {
    "path": "examples/vue/column-ordering/vite.config.ts",
    "content": "import { defineConfig } from 'vite'\nimport vue from '@vitejs/plugin-vue'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [vue()],\n})\n"
  },
  {
    "path": "examples/vue/column-pinning/.gitignore",
    "content": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\npnpm-debug.log*\nlerna-debug.log*\n\nnode_modules\n.DS_Store\ndist\ndist-ssr\ncoverage\n*.local\n\n/cypress/videos/\n/cypress/screenshots/\n\n# Editor directories and files\n.vscode/*\n!.vscode/extensions.json\n.idea\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n*.sw?\n"
  },
  {
    "path": "examples/vue/column-pinning/.vscode/extensions.json",
    "content": "{\n  \"recommendations\": [\"Vue.volar\", \"Vue.vscode-typescript-vue-plugin\"]\n}\n"
  },
  {
    "path": "examples/vue/column-pinning/README.md",
    "content": "# column-ordering\n\nThis template should help get you started developing with Vue 3 in Vite.\n\n## Recommended IDE Setup\n\n[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).\n\n## Type Support for `.vue` Imports in TS\n\nTypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin) to make the TypeScript language service aware of `.vue` types.\n\nIf the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471#discussioncomment-1361669) that is more performant. You can enable it by the following steps:\n\n1. Disable the built-in TypeScript Extension\n   1. Run `Extensions: Show Built-in Extensions` from VSCode's command palette\n   2. Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)`\n2. Reload the VSCode window by running `Developer: Reload Window` from the command palette.\n\n## Customize configuration\n\nSee [Vite Configuration Reference](https://vitejs.dev/config/).\n\n## Project Setup\n\n```sh\nnpm install\n```\n\n### Compile and Hot-Reload for Development\n\n```sh\nnpm run dev\n```\n\n### Type-Check, Compile and Minify for Production\n\n```sh\nnpm run build\n```\n"
  },
  {
    "path": "examples/vue/column-pinning/env.d.ts",
    "content": "/// <reference types=\"vite/client\" />\n"
  },
  {
    "path": "examples/vue/column-pinning/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <link rel=\"icon\" href=\"/favicon.ico\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite App</title>\n    <script src=\"https://cdn.tailwindcss.com\"></script>\n  </head>\n  <body>\n    <div id=\"app\"></div>\n    <script type=\"module\" src=\"/src/main.ts\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/vue/column-pinning/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-vue-column-pinning\",\n  \"version\": \"0.0.0\",\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"preview\": \"vite preview\",\n    \"lint\": \"eslint ./src\",\n    \"test:types\": \"vue-tsc\"\n  },\n  \"dependencies\": {\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"@tanstack/vue-table\": \"^9.0.0-alpha.10\",\n    \"vue\": \"^3.5.27\"\n  },\n  \"devDependencies\": {\n    \"@types/node\": \"^25.0.10\",\n    \"@vitejs/plugin-vue\": \"^6.0.3\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\",\n    \"vue-tsc\": \"^3.2.4\"\n  }\n}\n"
  },
  {
    "path": "examples/vue/column-pinning/src/App.vue",
    "content": "<script setup lang=\"ts\">\nimport {\n  FlexRender,\n  columnOrderingFeature,\n  columnPinningFeature,\n  columnVisibilityFeature,\n  createColumnHelper,\n  tableFeatures,\n  useTable,\n} from '@tanstack/vue-table'\nimport type { Column } from '@tanstack/vue-table'\nimport { makeData, type Person } from './makeData'\nimport { ref } from 'vue'\nimport { faker } from '@faker-js/faker'\n\nconst data = ref(makeData(5000))\n\nconst _features = tableFeatures({\n  columnOrderingFeature,\n  columnPinningFeature,\n  columnVisibilityFeature,\n})\n\nconst columnHelper = createColumnHelper<typeof _features, Person>()\n\nconst columns = ref(\n  columnHelper.columns([\n    columnHelper.group({\n      header: 'Name',\n      footer: (props) => props.column.id,\n      columns: columnHelper.columns([\n        columnHelper.accessor('firstName', {\n          cell: (info) => info.getValue(),\n          footer: (props) => props.column.id,\n        }),\n        columnHelper.accessor((row) => row.lastName, {\n          id: 'lastName',\n          cell: (info) => info.getValue(),\n          header: () => 'Last Name',\n          footer: (props) => props.column.id,\n        }),\n      ]),\n    }),\n    columnHelper.group({\n      header: 'Info',\n      footer: (props) => props.column.id,\n      columns: columnHelper.columns([\n        columnHelper.accessor('age', {\n          header: () => 'Age',\n          footer: (props) => props.column.id,\n        }),\n        columnHelper.group({\n          header: 'More Info',\n          columns: columnHelper.columns([\n            columnHelper.accessor('visits', {\n              header: () => 'Visits',\n              footer: (props) => props.column.id,\n            }),\n            columnHelper.accessor('status', {\n              header: 'Status',\n              footer: (props) => props.column.id,\n            }),\n            columnHelper.accessor('progress', {\n              header: 'Profile Progress',\n              footer: (props) => props.column.id,\n            }),\n          ]),\n        }),\n      ]),\n    }),\n  ]),\n)\n\nconst isSplit = ref(false)\n\nconst rerender = () => (data.value = makeData(5000))\n\nconst table = useTable(\n  {\n    _features,\n    data,\n    get columns() {\n      return columns.value\n    },\n    debugTable: true,\n    debugHeaders: true,\n    debugColumns: true,\n  },\n  (state) => ({\n    columnOrder: state.columnOrder,\n    columnPinning: state.columnPinning,\n    columnVisibility: state.columnVisibility,\n  }),\n)\n\nconst randomizeColumns = () => {\n  table.setColumnOrder(\n    faker.helpers.shuffle(table.getAllLeafColumns().map((d) => d.id)),\n  )\n}\n\nfunction toggleColumnVisibility(column: Column<typeof _features, Person>) {\n  table.setColumnVisibility({\n    ...table.state.columnVisibility,\n    [column.id]: !column.getIsVisible(),\n  })\n}\n\nfunction toggleAllColumnsVisibility() {\n  table.getAllLeafColumns().forEach((column) => {\n    toggleColumnVisibility(column)\n  })\n}\n</script>\n\n<template>\n  <div class=\"p-2\">\n    <div class=\"inline-block border border-black rounded shadow\">\n      <div class=\"px-1 border-b border-black\">\n        <label>\n          <input\n            type=\"checkbox\"\n            :checked=\"table.getIsAllColumnsVisible()\"\n            @input=\"toggleAllColumnsVisibility\"\n          />\n          Toggle All\n        </label>\n      </div>\n      <div\n        v-for=\"column in table.getAllLeafColumns()\"\n        :key=\"column.id\"\n        class=\"px-1\"\n      >\n        <label>\n          <input\n            type=\"checkbox\"\n            :checked=\"column.getIsVisible()\"\n            @input=\"toggleColumnVisibility(column)\"\n          />\n          {{ column.id }}\n        </label>\n      </div>\n    </div>\n    <div class=\"h-4\" />\n    <div class=\"flex flex-wrap gap-2\">\n      <button @click=\"rerender\" class=\"p-1 border\">Regenerate</button>\n      <button @click=\"randomizeColumns\" class=\"p-1 border\">\n        Shuffle Columns\n      </button>\n    </div>\n    <div class=\"h-4\" />\n    <div>\n      <label>\n        <input type=\"checkbox\" v-model=\"isSplit\" />\n        Split Mode\n      </label>\n    </div>\n    <div class=\"h-4\" />\n    <div :class=\"`flex ${isSplit ? 'gap-4' : ''}`\">\n      <!-- left -->\n      <table v-if=\"isSplit\" class=\"border-2 border-black table-left\">\n        <thead>\n          <tr\n            v-for=\"headerGroup in table.getLeftHeaderGroups()\"\n            :key=\"headerGroup.id\"\n          >\n            <th\n              v-for=\"header in headerGroup.headers\"\n              :key=\"header.id\"\n              :colSpan=\"header.colSpan\"\n            >\n              <div class=\"whitespace-nowrap\">\n                <FlexRender\n                  v-if=\"!header.isPlaceholder\"\n                  :render=\"header.column.columnDef.header\"\n                  :props=\"header.getContext()\"\n                />\n              </div>\n              <div\n                v-if=\"!header.isPlaceholder && header.column.getCanPin()\"\n                class=\"flex justify-center gap-1\"\n              >\n                <button\n                  v-if=\"header.column.getIsPinned() !== 'left'\"\n                  @click=\"header.column.pin('left')\"\n                  class=\"px-2 border rounded\"\n                >\n                  {{ '<=' }}\n                </button>\n                <button\n                  v-if=\"header.column.getIsPinned()\"\n                  @click=\"header.column.pin(false)\"\n                  class=\"px-2 border rounded\"\n                >\n                  X\n                </button>\n                <button\n                  v-if=\"header.column.getIsPinned() !== 'right'\"\n                  @click=\"header.column.pin('right')\"\n                  class=\"px-2 border rounded\"\n                >\n                  {{ '=>' }}\n                </button>\n              </div>\n            </th>\n          </tr>\n        </thead>\n        <tbody>\n          <tr\n            v-for=\"row in table.getRowModel().rows.slice(0, 20)\"\n            :key=\"row.id\"\n          >\n            <td v-for=\"cell in row.getLeftVisibleCells()\" :key=\"cell.id\">\n              <FlexRender\n                :render=\"cell.column.columnDef.cell\"\n                :props=\"cell.getContext()\"\n              />\n            </td>\n          </tr>\n        </tbody>\n      </table>\n      <!-- center -->\n      <table class=\"border-2 border-black table-center\">\n        <thead>\n          <tr\n            v-for=\"headerGroup in isSplit\n              ? table.getCenterHeaderGroups()\n              : table.getHeaderGroups()\"\n            :key=\"headerGroup.id\"\n          >\n            <th\n              v-for=\"header in headerGroup.headers\"\n              :key=\"header.id\"\n              :colSpan=\"header.colSpan\"\n            >\n              <div class=\"whitespace-nowrap\">\n                <FlexRender\n                  v-if=\"!header.isPlaceholder\"\n                  :render=\"header.column.columnDef.header\"\n                  :props=\"header.getContext()\"\n                />\n              </div>\n              <div\n                v-if=\"!header.isPlaceholder && header.column.getCanPin()\"\n                class=\"flex justify-center gap-1\"\n              >\n                <button\n                  v-if=\"header.column.getIsPinned() !== 'left'\"\n                  @click=\"header.column.pin('left')\"\n                  class=\"px-2 border rounded\"\n                >\n                  {{ '<=' }}\n                </button>\n                <button\n                  v-if=\"header.column.getIsPinned()\"\n                  @click=\"header.column.pin(false)\"\n                  class=\"px-2 border rounded\"\n                >\n                  X\n                </button>\n                <button\n                  v-if=\"header.column.getIsPinned() !== 'right'\"\n                  @click=\"header.column.pin('right')\"\n                  class=\"px-2 border rounded\"\n                >\n                  {{ '=>' }}\n                </button>\n              </div>\n            </th>\n          </tr>\n        </thead>\n        <tbody>\n          <tr\n            v-for=\"row in table.getRowModel().rows.slice(0, 20)\"\n            :key=\"row.id\"\n          >\n            <td\n              v-for=\"cell in isSplit\n                ? row.getCenterVisibleCells()\n                : row.getVisibleCells()\"\n              :key=\"cell.id\"\n            >\n              <FlexRender\n                :render=\"cell.column.columnDef.cell\"\n                :props=\"cell.getContext()\"\n              />\n            </td>\n          </tr>\n        </tbody>\n      </table>\n      <!-- right -->\n      <table v-if=\"isSplit\" class=\"border-2 border-black table-right\">\n        <thead>\n          <tr\n            v-for=\"headerGroup in table.getRightHeaderGroups()\"\n            :key=\"headerGroup.id\"\n          >\n            <th\n              v-for=\"header in headerGroup.headers\"\n              :key=\"header.id\"\n              :colSpan=\"header.colSpan\"\n            >\n              <div class=\"whitespace-nowrap\">\n                <FlexRender\n                  v-if=\"!header.isPlaceholder\"\n                  :render=\"header.column.columnDef.header\"\n                  :props=\"header.getContext()\"\n                />\n              </div>\n              <div\n                v-if=\"!header.isPlaceholder && header.column.getCanPin()\"\n                class=\"flex justify-center gap-1\"\n              >\n                <button\n                  v-if=\"header.column.getIsPinned() !== 'left'\"\n                  @click=\"header.column.pin('left')\"\n                  class=\"px-2 border rounded\"\n                >\n                  {{ '<=' }}\n                </button>\n                <button\n                  v-if=\"header.column.getIsPinned()\"\n                  @click=\"header.column.pin(false)\"\n                  class=\"px-2 border rounded\"\n                >\n                  X\n                </button>\n                <button\n                  v-if=\"header.column.getIsPinned() !== 'right'\"\n                  @click=\"header.column.pin('right')\"\n                  class=\"px-2 border rounded\"\n                >\n                  {{ '=>' }}\n                </button>\n              </div>\n            </th>\n          </tr>\n        </thead>\n        <tbody>\n          <tr\n            v-for=\"row in table.getRowModel().rows.slice(0, 20)\"\n            :key=\"row.id\"\n          >\n            <td v-for=\"cell in row.getRightVisibleCells()\" :key=\"cell.id\">\n              <FlexRender\n                :render=\"cell.column.columnDef.cell\"\n                :props=\"cell.getContext()\"\n              />\n            </td>\n          </tr>\n        </tbody>\n      </table>\n    </div>\n    <pre>{{ JSON.stringify(table.state.columnOrder, null, 2) }}</pre>\n  </div>\n</template>\n\n<style>\nhtml,\nbody {\n  padding: 4px;\n  margin: 0;\n  font-family: Arial, Helvetica, sans-serif;\n}\n\ntable {\n  border: 1px solid lightgray;\n  border-collapse: collapse;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth,\ntd {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\nth {\n  padding: 8px;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n</style>\n"
  },
  {
    "path": "examples/vue/column-pinning/src/env.d.ts",
    "content": "/// <reference types=\"vite/client\" />\n\ndeclare module '*.vue' {\n  import type { DefineComponent } from 'vue'\n  // eslint-disable-next-line @typescript-eslint/ban-types\n  const component: DefineComponent<{}, {}, any>\n  export default component\n}\n"
  },
  {
    "path": "examples/vue/column-pinning/src/main.ts",
    "content": "import { createApp } from 'vue'\nimport App from './App.vue'\n\ncreateApp(App).mount('#app')\n"
  },
  {
    "path": "examples/vue/column-pinning/src/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  subRows?: Array<Person>\n}\n\nconst range = (len: number) => {\n  const arr: Array<number> = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (): Person => {\n  return {\n    firstName: faker.person.firstName(),\n    lastName: faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: faker.number.int(1000),\n    progress: faker.number.int(100),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0],\n  }\n}\n\nexport function makeData(...lens: Array<number>) {\n  const makeDataLevel = (depth = 0): Array<Person> => {\n    const len = lens[depth]\n    return range(len).map((): Person => {\n      return {\n        ...newPerson(),\n        subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined,\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n"
  },
  {
    "path": "examples/vue/column-pinning/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"module\": \"ESNext\",\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"preserve\",\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src/**/*.ts\", \"src/**/*.tsx\", \"src/**/*.vue\"]\n}\n"
  },
  {
    "path": "examples/vue/column-pinning/vite.config.ts",
    "content": "import { defineConfig } from 'vite'\nimport vue from '@vitejs/plugin-vue'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [vue()],\n})\n"
  },
  {
    "path": "examples/vue/filters/.gitignore",
    "content": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\npnpm-debug.log*\nlerna-debug.log*\n\nnode_modules\ndist\ndist-ssr\n*.local\n\n# Editor directories and files\n.vscode/*\n!.vscode/extensions.json\n.idea\n.DS_Store\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n*.sw?\n"
  },
  {
    "path": "examples/vue/filters/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run dev` or `yarn dev`\n"
  },
  {
    "path": "examples/vue/filters/env.d.ts",
    "content": "/// <reference types=\"vite/client\" />\n"
  },
  {
    "path": "examples/vue/filters/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <link rel=\"icon\" href=\"/favicon.ico\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite App</title>\n    <script src=\"https://cdn.tailwindcss.com\"></script>\n  </head>\n  <body>\n    <div id=\"app\"></div>\n    <script type=\"module\" src=\"/src/main.ts\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/vue/filters/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-vue-filters\",\n  \"private\": true,\n  \"version\": \"0.0.0\",\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"preview\": \"vite preview\",\n    \"lint\": \"eslint ./src\",\n    \"test:types\": \"vue-tsc\"\n  },\n  \"dependencies\": {\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"@tanstack/vue-table\": \"^9.0.0-alpha.10\",\n    \"vue\": \"^3.5.27\"\n  },\n  \"devDependencies\": {\n    \"@types/node\": \"^25.0.10\",\n    \"@vitejs/plugin-vue\": \"^6.0.3\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\",\n    \"vue-tsc\": \"^3.2.4\"\n  }\n}\n"
  },
  {
    "path": "examples/vue/filters/src/App.vue",
    "content": "<script setup lang=\"ts\">\nimport { FlexRender } from '@tanstack/vue-table'\nimport { ref } from 'vue'\nimport DebouncedInput from './DebouncedInput.vue'\nimport Filter from './Filter.vue'\nimport { Person, tableHelper } from './tableHelper'\n\nconst defaultData: Array<Person> = [\n  {\n    firstName: 'tanner',\n    lastName: 'linsley',\n    age: 24,\n    visits: 100,\n    status: 'In Relationship',\n    progress: 50,\n  },\n  {\n    firstName: 'tandy',\n    lastName: 'miller',\n    age: 40,\n    visits: 40,\n    status: 'Single',\n    progress: 80,\n  },\n  {\n    firstName: 'joe',\n    lastName: 'dirte',\n    age: 45,\n    visits: 20,\n    status: 'Complicated',\n    progress: 10,\n  },\n]\n\nconst { columnHelper } = tableHelper\n\nconst columns = ref(\n  columnHelper.columns([\n    columnHelper.group({\n      header: 'Name',\n      footer: (props) => props.column.id,\n      columns: columnHelper.columns([\n        columnHelper.accessor('firstName', {\n          cell: (info) => info.getValue(),\n          footer: (props) => props.column.id,\n        }),\n        columnHelper.accessor((row) => row.lastName, {\n          id: 'lastName',\n          cell: (info) => info.getValue(),\n          header: () => 'Last Name',\n          footer: (props) => props.column.id,\n        }),\n      ]),\n    }),\n    columnHelper.group({\n      header: 'Info',\n      footer: (props) => props.column.id,\n      columns: columnHelper.columns([\n        columnHelper.accessor('age', {\n          header: () => 'Age',\n          footer: (props) => props.column.id,\n        }),\n        columnHelper.group({\n          header: 'More Info',\n          columns: columnHelper.columns([\n            columnHelper.accessor('visits', {\n              header: () => 'Visits',\n              footer: (props) => props.column.id,\n            }),\n            columnHelper.accessor('status', {\n              header: 'Status',\n              footer: (props) => props.column.id,\n            }),\n            columnHelper.accessor('progress', {\n              header: 'Profile Progress',\n              footer: (props) => props.column.id,\n            }),\n          ]),\n        }),\n      ]),\n    }),\n  ]),\n)\n\nconst data = ref(defaultData)\nconst rerender = () => {\n  data.value = defaultData\n}\n\nconst table = tableHelper.useTable(\n  {\n    data,\n    get columns() {\n      return columns.value\n    },\n  },\n  (state) => ({\n    columnFilters: state.columnFilters,\n    globalFilter: state.globalFilter,\n  }),\n)\n</script>\n\n<template>\n  <div class=\"p-2\">\n    <div>\n      <DebouncedInput\n        :modelValue=\"table.state.globalFilter ?? ''\"\n        @update:modelValue=\"(value) => table.setGlobalFilter(String(value))\"\n        className=\"p-2 font-lg shadow border border-block\"\n        placeholder=\"Search all columns...\"\n      />\n    </div>\n    <div className=\"h-2\" />\n    <table>\n      <thead>\n        <tr\n          v-for=\"headerGroup in table.getHeaderGroups()\"\n          :key=\"headerGroup.id\"\n        >\n          <th\n            v-for=\"header in headerGroup.headers\"\n            :key=\"header.id\"\n            :colSpan=\"header.colSpan\"\n          >\n            <FlexRender\n              v-if=\"!header.isPlaceholder\"\n              :render=\"header.column.columnDef.header\"\n              :props=\"header.getContext()\"\n            />\n            <template\n              v-if=\"!header.isPlaceholder && header.column.getCanFilter()\"\n            >\n              <Filter :column=\"header.column\" :table=\"table\" />\n            </template>\n          </th>\n        </tr>\n      </thead>\n      <tbody>\n        <tr v-for=\"row in table.getRowModel().rows\" :key=\"row.id\">\n          <td v-for=\"cell in row.getAllCells()\" :key=\"cell.id\">\n            <FlexRender\n              :render=\"cell.column.columnDef.cell\"\n              :props=\"cell.getContext()\"\n            />\n          </td>\n        </tr>\n      </tbody>\n      <tfoot>\n        <tr\n          v-for=\"footerGroup in table.getFooterGroups()\"\n          :key=\"footerGroup.id\"\n        >\n          <th\n            v-for=\"header in footerGroup.headers\"\n            :key=\"header.id\"\n            :colSpan=\"header.colSpan\"\n          >\n            <FlexRender\n              v-if=\"!header.isPlaceholder\"\n              :render=\"header.column.columnDef.footer\"\n              :props=\"header.getContext()\"\n            />\n          </th>\n        </tr>\n      </tfoot>\n    </table>\n    <div class=\"h-4\" />\n    <button @click=\"rerender\" class=\"border p-2\">Rerender</button>\n  </div>\n</template>\n<style>\nhtml {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n</style>\n"
  },
  {
    "path": "examples/vue/filters/src/DebouncedInput.vue",
    "content": "<script lang=\"ts\" setup>\nimport { computed, onBeforeUnmount, ref } from 'vue'\n\nconst props = defineProps({\n  modelValue: {\n    type: [String, Number],\n    required: true,\n  },\n  debounce: {\n    type: Number,\n    default: 500,\n  },\n})\n\nconst emit = defineEmits(['update:modelValue'])\n\nconst timeout = ref<ReturnType<typeof setTimeout>>()\n\nconst localValue = computed({\n  get() {\n    return props.modelValue\n  },\n  set(newValue) {\n    if (timeout.value) {\n      clearTimeout(timeout.value)\n    }\n    timeout.value = setTimeout(\n      () => emit('update:modelValue', newValue),\n      props.debounce,\n    )\n  },\n})\nonBeforeUnmount(() => clearTimeout(timeout.value))\n</script>\n\n<template>\n  <input v-model=\"localValue\" v-bind=\"$attrs\" />\n</template>\n"
  },
  {
    "path": "examples/vue/filters/src/Filter.vue",
    "content": "<script lang=\"ts\" setup>\nimport type { Column, Table } from '@tanstack/vue-table'\nimport { computed, PropType } from 'vue'\nimport DebouncedInput from './DebouncedInput.vue'\nimport { Person, tableHelper } from './tableHelper'\n\nconst props = defineProps({\n  column: {\n    type: Object as PropType<Column<typeof tableHelper.features, Person>>,\n    required: true,\n  },\n  table: {\n    type: Object as PropType<Table<typeof tableHelper.features, Person>>,\n    required: true,\n  },\n})\n\nconst firstValue = computed(() =>\n  props.table.getPreFilteredRowModel().flatRows[0]?.getValue(props.column.id),\n)\n\nconst columnFilterValue = computed(() => props.column.getFilterValue())\nconst sortedUniqueValues = computed(() =>\n  typeof firstValue.value === 'number'\n    ? []\n    : Array.from(props.column.getFacetedUniqueValues().keys()).sort(),\n)\n</script>\n\n<template>\n  <div v-if=\"typeof firstValue === 'number'\">\n    <div class=\"flex space-x-2\">\n      <DebouncedInput\n        type=\"number\"\n        :min=\"Number(column.getFacetedMinMaxValues()?.[0] ?? '')\"\n        :max=\"Number(column.getFacetedMinMaxValues()?.[1] ?? '')\"\n        :modelValue=\"(columnFilterValue as [number, number])?.[0] ?? ''\"\n        @update:modelValue=\"\n          (value) =>\n            column.setFilterValue((old: [number, number]) => [value, old?.[1]])\n        \"\n        :placeholder=\"`Min ${\n          column.getFacetedMinMaxValues()?.[0]\n            ? `(${column.getFacetedMinMaxValues()?.[0]})`\n            : ''\n        }`\"\n        class=\"w-24 border shadow rounded\"\n      />\n      <DebouncedInput\n        type=\"number\"\n        :min=\"Number(column.getFacetedMinMaxValues()?.[0] ?? '')\"\n        :max=\"Number(column.getFacetedMinMaxValues()?.[1] ?? '')\"\n        :modelValue=\"(columnFilterValue as [number, number])?.[1] ?? ''\"\n        @update:modelValue=\"\n          (value) =>\n            column.setFilterValue((old: [number, number]) => [old?.[0], value])\n        \"\n        :placeholder=\"`Max ${\n          column.getFacetedMinMaxValues()?.[1]\n            ? `(${column.getFacetedMinMaxValues()?.[1]})`\n            : ''\n        }`\"\n        class=\"w-24 border shadow rounded\"\n      />\n    </div>\n    <div class=\"h-1\" />\n  </div>\n  <div v-else>\n    <datalist :id=\"column.id + 'list'\">\n      <option\n        v-for=\"value in sortedUniqueValues.slice(0, 5000)\"\n        :key=\"value\"\n        :value=\"value\"\n      />\n    </datalist>\n    <DebouncedInput\n      type=\"text\"\n      :modelValue=\"(columnFilterValue ?? '') as string\"\n      @update:modelValue=\"(value) => column.setFilterValue(value)\"\n      :placeholder=\"`Search... (${\n        column.getFacetedUniqueValues() instanceof Map\n          ? column.getFacetedUniqueValues().size\n          : 0\n      })`\"\n      class=\"w-36 border shadow rounded\"\n      :list=\"column.id + 'list'\"\n    />\n    <div class=\"h-1\" />\n  </div>\n</template>\n"
  },
  {
    "path": "examples/vue/filters/src/main.ts",
    "content": "import { createApp } from 'vue'\nimport App from './App.vue'\n\ncreateApp(App).mount('#app')\n"
  },
  {
    "path": "examples/vue/filters/src/tableHelper.ts",
    "content": "import {\n  columnFacetingFeature,\n  columnFilteringFeature,\n  createFacetedMinMaxValues,\n  createFacetedRowModel,\n  createFacetedUniqueValues,\n  createFilteredRowModel,\n  createTableHelper,\n  filterFns,\n  globalFilteringFeature,\n} from '@tanstack/vue-table'\n\nexport type Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  status: string\n  progress: number\n}\n\nexport const tableHelper = createTableHelper({\n  _features: {\n    columnFilteringFeature,\n    globalFilteringFeature,\n    columnFacetingFeature,\n  },\n  _rowModels: {\n    filteredRowModel: createFilteredRowModel(filterFns),\n    facetedRowModel: createFacetedRowModel(),\n    facetedMinMaxValues: createFacetedMinMaxValues(),\n    facetedUniqueValues: createFacetedUniqueValues(),\n  },\n  TData: {} as Person,\n})\n"
  },
  {
    "path": "examples/vue/filters/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"module\": \"ESNext\",\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"preserve\",\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src/**/*.ts\", \"src/**/*.tsx\", \"src/**/*.vue\"]\n}\n"
  },
  {
    "path": "examples/vue/filters/vite.config.ts",
    "content": "import { defineConfig } from 'vite'\nimport vue from '@vitejs/plugin-vue'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [vue()],\n})\n"
  },
  {
    "path": "examples/vue/pagination/.gitignore",
    "content": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\npnpm-debug.log*\nlerna-debug.log*\n\nnode_modules\ndist\ndist-ssr\n*.local\n\n# Editor directories and files\n.vscode/*\n!.vscode/extensions.json\n.idea\n.DS_Store\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n*.sw?\n"
  },
  {
    "path": "examples/vue/pagination/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run dev` or `yarn dev`\n"
  },
  {
    "path": "examples/vue/pagination/env.d.ts",
    "content": "/// <reference types=\"vite/client\" />\n"
  },
  {
    "path": "examples/vue/pagination/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <link rel=\"icon\" href=\"/favicon.ico\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite App</title>\n    <script src=\"https://cdn.tailwindcss.com\"></script>\n  </head>\n  <body>\n    <div id=\"app\"></div>\n    <script type=\"module\" src=\"/src/main.ts\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/vue/pagination/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-vue-pagination\",\n  \"private\": true,\n  \"version\": \"0.0.0\",\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"preview\": \"vite preview\",\n    \"lint\": \"eslint ./src\",\n    \"test:types\": \"vue-tsc\"\n  },\n  \"dependencies\": {\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"@tanstack/vue-table\": \"^9.0.0-alpha.10\",\n    \"vue\": \"^3.5.27\"\n  },\n  \"devDependencies\": {\n    \"@types/node\": \"^25.0.10\",\n    \"@vitejs/plugin-vue\": \"^6.0.3\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\",\n    \"vue-tsc\": \"^3.2.4\"\n  }\n}\n"
  },
  {
    "path": "examples/vue/pagination/src/App.vue",
    "content": "<script setup lang=\"ts\">\nimport {\n  FlexRender,\n  createColumnHelper,\n  createPaginatedRowModel,\n  rowPaginationFeature,\n  tableFeatures,\n  useTable,\n} from '@tanstack/vue-table'\nimport { ref } from 'vue'\nimport { makeData, Person } from './makeData'\n\nconst _features = tableFeatures({\n  rowPaginationFeature,\n})\n\nconst columnHelper = createColumnHelper<typeof _features, Person>()\n\nconst INITIAL_PAGE_INDEX = 0\n\nconst defaultData = makeData(100)\nconst goToPageNumber = ref(INITIAL_PAGE_INDEX + 1)\nconst pageSizes = [10, 20, 30, 40, 50]\nconst data = ref(defaultData)\n\nconst columns = ref(\n  columnHelper.columns([\n    columnHelper.group({\n      header: 'Name',\n      footer: (props) => props.column.id,\n      columns: columnHelper.columns([\n        columnHelper.accessor('firstName', {\n          cell: (info) => info.getValue(),\n          footer: (props) => props.column.id,\n        }),\n        columnHelper.accessor((row) => row.lastName, {\n          id: 'lastName',\n          cell: (info) => info.getValue(),\n          header: () => 'Last Name',\n          footer: (props) => props.column.id,\n        }),\n      ]),\n    }),\n    columnHelper.group({\n      header: 'Info',\n      footer: (props) => props.column.id,\n      columns: columnHelper.columns([\n        columnHelper.accessor('age', {\n          header: () => 'Age',\n          footer: (props) => props.column.id,\n        }),\n        columnHelper.group({\n          header: 'More Info',\n          columns: columnHelper.columns([\n            columnHelper.accessor('visits', {\n              header: () => 'Visits',\n              footer: (props) => props.column.id,\n            }),\n            columnHelper.accessor('status', {\n              header: 'Status',\n              footer: (props) => props.column.id,\n            }),\n            columnHelper.accessor('progress', {\n              header: 'Profile Progress',\n              footer: (props) => props.column.id,\n            }),\n          ]),\n        }),\n      ]),\n    }),\n  ]),\n)\n\nconst table = useTable(\n  {\n    _features,\n    _rowModels: {\n      paginatedRowModel: createPaginatedRowModel(),\n    },\n    data,\n    get columns() {\n      return columns.value\n    },\n    debugTable: true,\n  },\n  (state) => ({ pagination: state.pagination }),\n)\n\nfunction rerender() {\n  data.value = defaultData\n}\n\nfunction handleGoToPage(e: any) {\n  const page = e.target.value ? Number(e.target.value) - 1 : 0\n  goToPageNumber.value = page + 1\n  table.setPageIndex(page)\n}\n\nfunction handlePageSizeChange(e: any) {\n  table.setPageSize(Number(e.target.value))\n}\n</script>\n\n<template>\n  <div class=\"p-2\">\n    <table>\n      <thead>\n        <tr\n          v-for=\"headerGroup in table.getHeaderGroups()\"\n          :key=\"headerGroup.id\"\n        >\n          <th\n            v-for=\"header in headerGroup.headers\"\n            :key=\"header.id\"\n            :colSpan=\"header.colSpan\"\n          >\n            <FlexRender\n              v-if=\"!header.isPlaceholder\"\n              :render=\"header.column.columnDef.header\"\n              :props=\"header.getContext()\"\n            />\n          </th>\n        </tr>\n      </thead>\n      <tbody>\n        <tr v-for=\"row in table.getRowModel().rows\" :key=\"row.id\">\n          <td v-for=\"cell in row.getAllCells()\" :key=\"cell.id\">\n            <FlexRender\n              :render=\"cell.column.columnDef.cell\"\n              :props=\"cell.getContext()\"\n            />\n          </td>\n        </tr>\n      </tbody>\n      <tfoot>\n        <tr\n          v-for=\"footerGroup in table.getFooterGroups()\"\n          :key=\"footerGroup.id\"\n        >\n          <th\n            v-for=\"header in footerGroup.headers\"\n            :key=\"header.id\"\n            :colSpan=\"header.colSpan\"\n          >\n            <FlexRender\n              v-if=\"!header.isPlaceholder\"\n              :render=\"header.column.columnDef.footer\"\n              :props=\"header.getContext()\"\n            />\n          </th>\n        </tr>\n      </tfoot>\n    </table>\n    <div>\n      <div class=\"flex items-center gap-2\">\n        <button\n          class=\"border rounded p-1\"\n          @click=\"() => table.setPageIndex(0)\"\n          :disabled=\"!table.getCanPreviousPage()\"\n        >\n          «\n        </button>\n        <button\n          class=\"border rounded p-1\"\n          @click=\"() => table.previousPage()\"\n          :disabled=\"!table.getCanPreviousPage()\"\n        >\n          ‹\n        </button>\n        <button\n          class=\"border rounded p-1\"\n          @click=\"() => table.nextPage()\"\n          :disabled=\"!table.getCanNextPage()\"\n        >\n          ›\n        </button>\n        <button\n          class=\"border rounded p-1\"\n          @click=\"() => table.setPageIndex(table.getPageCount() - 1)\"\n          :disabled=\"!table.getCanNextPage()\"\n        >\n          »\n        </button>\n        <span class=\"flex items-center gap-1\">\n          <div>Page</div>\n          <strong>\n            {{ table.state.pagination.pageIndex + 1 }} of\n            {{ table.getPageCount() }}\n          </strong>\n        </span>\n        <span class=\"flex items-center gap-1\">\n          | Go to page:\n          <input\n            type=\"number\"\n            :value=\"goToPageNumber\"\n            @change=\"handleGoToPage\"\n            class=\"border p-1 rounded w-16\"\n          />\n        </span>\n        <select\n          :value=\"table.state.pagination.pageSize\"\n          @change=\"handlePageSizeChange\"\n        >\n          <option\n            :key=\"pageSize\"\n            :value=\"pageSize\"\n            v-for=\"pageSize in pageSizes\"\n          >\n            Show {{ pageSize }}\n          </option>\n        </select>\n      </div>\n      <div>{{ table.getRowModel().rows.length }} Rows</div>\n      <pre>{{ JSON.stringify(table.state.pagination, null, 2) }}</pre>\n    </div>\n    <div class=\"h-2\" />\n    <button @click=\"rerender\" class=\"border p-2\">Rerender</button>\n  </div>\n</template>\n\n<style>\nhtml {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n</style>\n"
  },
  {
    "path": "examples/vue/pagination/src/env.d.ts",
    "content": "/// <reference types=\"vite/client\" />\n\ndeclare module '*.vue' {\n  import type { DefineComponent } from 'vue'\n  // eslint-disable-next-line @typescript-eslint/ban-types\n  const component: DefineComponent<{}, {}, any>\n  export default component\n}\n"
  },
  {
    "path": "examples/vue/pagination/src/main.ts",
    "content": "import { createApp } from 'vue'\nimport App from './App.vue'\n\ncreateApp(App).mount('#app')\n"
  },
  {
    "path": "examples/vue/pagination/src/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  subRows?: Array<Person>\n}\n\nconst range = (len: number) => {\n  const arr: Array<number> = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (): Person => {\n  return {\n    firstName: faker.person.firstName(),\n    lastName: faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: faker.number.int(1000),\n    progress: faker.number.int(100),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0],\n  }\n}\n\nexport function makeData(...lens: Array<number>) {\n  const makeDataLevel = (depth = 0): Array<Person> => {\n    const len = lens[depth]\n    return range(len).map((): Person => {\n      return {\n        ...newPerson(),\n        subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined,\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n"
  },
  {
    "path": "examples/vue/pagination/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"module\": \"ESNext\",\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"preserve\",\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src/**/*.ts\", \"src/**/*.tsx\", \"src/**/*.vue\"]\n}\n"
  },
  {
    "path": "examples/vue/pagination/vite.config.ts",
    "content": "import { defineConfig } from 'vite'\nimport vue from '@vitejs/plugin-vue'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [vue()],\n})\n"
  },
  {
    "path": "examples/vue/pagination-controlled/.gitignore",
    "content": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\npnpm-debug.log*\nlerna-debug.log*\n\nnode_modules\ndist\ndist-ssr\n*.local\n\n# Editor directories and files\n.vscode/*\n!.vscode/extensions.json\n.idea\n.DS_Store\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n*.sw?\n"
  },
  {
    "path": "examples/vue/pagination-controlled/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run dev` or `yarn dev`\n"
  },
  {
    "path": "examples/vue/pagination-controlled/env.d.ts",
    "content": "/// <reference types=\"vite/client\" />\n"
  },
  {
    "path": "examples/vue/pagination-controlled/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <link rel=\"icon\" href=\"/favicon.ico\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite App</title>\n    <script src=\"https://cdn.tailwindcss.com\"></script>\n  </head>\n  <body>\n    <div id=\"app\"></div>\n    <script type=\"module\" src=\"/src/main.ts\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/vue/pagination-controlled/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-vue-pagination-controlled\",\n  \"private\": true,\n  \"version\": \"0.0.0\",\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"preview\": \"vite preview\",\n    \"lint\": \"eslint ./src\",\n    \"test:types\": \"vue-tsc\"\n  },\n  \"dependencies\": {\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"@tanstack/vue-table\": \"^9.0.0-alpha.10\",\n    \"vue\": \"^3.5.27\"\n  },\n  \"devDependencies\": {\n    \"@types/node\": \"^25.0.10\",\n    \"@vitejs/plugin-vue\": \"^6.0.3\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\",\n    \"vue-tsc\": \"^3.2.4\"\n  }\n}\n"
  },
  {
    "path": "examples/vue/pagination-controlled/src/App.vue",
    "content": "<script setup lang=\"ts\">\nimport { ref } from 'vue'\nimport {\n  FlexRender,\n  useTable,\n  createColumnHelper,\n  PaginationState,\n  rowPaginationFeature,\n  tableFeatures,\n  Updater,\n} from '@tanstack/vue-table'\nimport useService from './useService'\n\nconst _features = tableFeatures({\n  rowPaginationFeature,\n})\n\ntype Post = {\n  userId: number\n  id: number\n  title: string\n  body: string\n}\n\nconst INITIAL_PAGE_INDEX = 0\nconst INITIAL_PAGE_SIZE = 10\n\nconst columnHelper = createColumnHelper<typeof _features, Post>()\n\nconst columns = columnHelper.columns([\n  columnHelper.accessor('id', { header: 'Post ID' }),\n  columnHelper.accessor('title', { header: 'Title' }),\n])\n\nconst pageSizes = [10, 20, 30, 40, 50]\n\nconst pagination = ref<PaginationState>({\n  pageIndex: INITIAL_PAGE_INDEX,\n  pageSize: INITIAL_PAGE_SIZE,\n})\n\nconst goToPageNumber = ref(INITIAL_PAGE_INDEX + 1)\n\nconst { data, isLoading, pageCount } = useService(pagination)\n\nconst table = useTable(\n  {\n    _features,\n    _rowModels: {}, // no client-side row models since we're using server-side pagination\n    get data() {\n      return data.value ?? []\n    },\n    get pageCount() {\n      return pageCount.value ?? -1\n    },\n    columns,\n    initialState: {\n      pagination: {\n        pageIndex: INITIAL_PAGE_INDEX,\n        pageSize: INITIAL_PAGE_SIZE,\n      },\n    },\n    state: {\n      pagination: pagination.value,\n    },\n    manualPagination: true,\n    onPaginationChange: (updater: Updater<PaginationState>) => {\n      if (typeof updater === 'function') {\n        setPagination(\n          updater({\n            pageIndex: pagination.value.pageIndex,\n            pageSize: pagination.value.pageSize,\n          }),\n        )\n      } else {\n        setPagination(updater)\n      }\n    },\n    debugTable: true,\n  },\n  (state) => ({ pagination: state.pagination }),\n)\n\nfunction setPagination({\n  pageIndex,\n  pageSize,\n}: PaginationState): PaginationState {\n  pagination.value.pageIndex = pageIndex\n  pagination.value.pageSize = pageSize\n\n  return { pageIndex, pageSize }\n}\n\nfunction handleGoToPage(e: any) {\n  const page = e.target.value ? Number(e.target.value) - 1 : 0\n  goToPageNumber.value = page + 1\n  table.setPageIndex(page)\n}\n\nfunction handlePageSizeChange(e: any) {\n  table.setPageSize(Number(e.target.value))\n}\n</script>\n\n<template>\n  <div class=\"p-2\">\n    <table>\n      <thead>\n        <tr\n          v-for=\"headerGroup in table.getHeaderGroups()\"\n          :key=\"headerGroup.id\"\n        >\n          <th\n            v-for=\"header in headerGroup.headers\"\n            :key=\"header.id\"\n            :colSpan=\"header.colSpan\"\n          >\n            <FlexRender\n              v-if=\"!header.isPlaceholder\"\n              :render=\"header.column.columnDef.header\"\n              :props=\"header.getContext()\"\n            />\n          </th>\n        </tr>\n      </thead>\n      <tbody>\n        <tr v-for=\"row in table.getRowModel().rows\" :key=\"row.id\">\n          <td v-for=\"cell in row.getAllCells()\" :key=\"cell.id\">\n            <FlexRender\n              :render=\"cell.column.columnDef.cell\"\n              :props=\"cell.getContext()\"\n            />\n          </td>\n        </tr>\n      </tbody>\n    </table>\n    <div className=\"h-2\">\n      <div className=\"flex items-center gap-2\">\n        <button\n          className=\"border rounded p-1\"\n          @click=\"() => table.setPageIndex(0)\"\n          :disabled=\"!table.getCanPreviousPage()\"\n        >\n          «\n        </button>\n        <button\n          className=\"border rounded p-1\"\n          @click=\"() => table.previousPage()\"\n          :disabled=\"!table.getCanPreviousPage()\"\n        >\n          ‹\n        </button>\n        <button\n          className=\"border rounded p-1\"\n          @click=\"() => table.nextPage()\"\n          :disabled=\"!table.getCanNextPage()\"\n        >\n          ›\n        </button>\n        <button\n          className=\"border rounded p-1\"\n          @click=\"() => table.setPageIndex(table.getPageCount() - 1)\"\n          :disabled=\"!table.getCanNextPage()\"\n        >\n          »\n        </button>\n        <span className=\"flex items-center gap-1\">\n          <div>Page</div>\n          <strong>\n            {{ table.state.pagination.pageIndex + 1 }} of\n            {{ table.getPageCount() }}\n          </strong>\n        </span>\n        <span className=\"flex items-center gap-1\">\n          | Go to page:\n          <input\n            type=\"number\"\n            :value=\"goToPageNumber\"\n            @change=\"handleGoToPage\"\n            className=\"border p-1 rounded w-16\"\n          />\n        </span>\n        <select\n          :value=\"table.state.pagination.pageSize\"\n          @change=\"handlePageSizeChange\"\n        >\n          <option\n            :key=\"pageSize\"\n            :value=\"pageSize\"\n            v-for=\"pageSize in pageSizes\"\n          >\n            Show {{ pageSize }}\n          </option>\n        </select>\n        {{ isLoading ? 'Loading...' : null }}\n      </div>\n      <pre>{{ JSON.stringify(pagination, null, 2) }}</pre>\n    </div>\n  </div>\n</template>\n\n<style>\nhtml {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n</style>\n"
  },
  {
    "path": "examples/vue/pagination-controlled/src/env.d.ts",
    "content": "/// <reference types=\"vite/client\" />\n\ndeclare module '*.vue' {\n  import type { DefineComponent } from 'vue'\n  // eslint-disable-next-line @typescript-eslint/ban-types\n  const component: DefineComponent<{}, {}, any>\n  export default component\n}\n"
  },
  {
    "path": "examples/vue/pagination-controlled/src/main.ts",
    "content": "import { createApp } from 'vue'\nimport App from './App.vue'\n\ncreateApp(App).mount('#app')\n"
  },
  {
    "path": "examples/vue/pagination-controlled/src/useService.ts",
    "content": "import { computed, ref, watchEffect } from 'vue'\nimport type { PaginationState } from '@tanstack/vue-table'\nimport type { Ref } from 'vue'\n\nconst DEFAULT_PAGE_COUNT = -1\nconst DEFAULT_RESULT_COUNT = -1\n\nconst endpoint = 'https://jsonplaceholder.typicode.com/posts'\n\nexport default function useService(pagination: Ref<PaginationState>) {\n  const data = ref(null)\n  const totalResultCount = ref(DEFAULT_RESULT_COUNT)\n  const error = ref(null)\n  const isLoading = ref(false)\n  const request = ref<Promise<any> | null>(null)\n\n  const requestParams = computed(() => {\n    const { pageSize, pageIndex } = pagination.value\n    const currentPage = pageIndex + 1\n\n    return {\n      _limit: pageSize.toString(),\n      _page: currentPage.toString(),\n    }\n  })\n\n  const url = computed(() => {\n    const searchParams = new URLSearchParams(requestParams.value)\n    return `${endpoint}?${searchParams}`\n  })\n\n  const pageCount = computed(() => {\n    const { pageSize } = pagination.value\n\n    return Math.ceil(totalResultCount.value / pageSize)\n  })\n\n  watchEffect(() => {\n    isLoading.value = true\n\n    request.value = fetch(url.value)\n      .then(async (response) => {\n        const responseData = await response.json()\n\n        if (response.ok) {\n          data.value = responseData\n          error.value = null\n          totalResultCount.value = Number(\n            response.headers.get('x-total-count') ?? DEFAULT_PAGE_COUNT,\n          )\n        } else {\n          throw new Error('Network response was not OK')\n        }\n      })\n      .catch((error) => {\n        error.value = error\n        data.value = null\n        totalResultCount.value = DEFAULT_PAGE_COUNT\n\n        console.log('error!', error)\n      })\n      .finally(() => {\n        isLoading.value = false\n      })\n  })\n\n  return {\n    data,\n    totalResultCount,\n    pageCount,\n    error,\n    isLoading,\n  }\n}\n"
  },
  {
    "path": "examples/vue/pagination-controlled/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"module\": \"ESNext\",\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"preserve\",\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src/**/*.ts\", \"src/**/*.tsx\", \"src/**/*.vue\"]\n}\n"
  },
  {
    "path": "examples/vue/pagination-controlled/vite.config.ts",
    "content": "import { defineConfig } from 'vite'\nimport vue from '@vitejs/plugin-vue'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [vue()],\n})\n"
  },
  {
    "path": "examples/vue/row-selection/.gitignore",
    "content": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\npnpm-debug.log*\nlerna-debug.log*\n\nnode_modules\ndist\ndist-ssr\n*.local\n\n# Editor directories and files\n.vscode/*\n!.vscode/extensions.json\n.idea\n.DS_Store\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n*.sw?\n"
  },
  {
    "path": "examples/vue/row-selection/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run dev` or `yarn dev`\n"
  },
  {
    "path": "examples/vue/row-selection/env.d.ts",
    "content": "/// <reference types=\"vite/client\" />\n"
  },
  {
    "path": "examples/vue/row-selection/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <link rel=\"icon\" href=\"/favicon.ico\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite App</title>\n    <script src=\"https://cdn.tailwindcss.com\"></script>\n  </head>\n  <body>\n    <div id=\"app\"></div>\n    <script type=\"module\" src=\"/src/main.ts\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/vue/row-selection/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-vue-row-selection\",\n  \"private\": true,\n  \"version\": \"0.0.0\",\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"preview\": \"vite preview\",\n    \"lint\": \"eslint ./src\"\n  },\n  \"dependencies\": {\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"@tanstack/vue-table\": \"^9.0.0-alpha.10\",\n    \"vue\": \"^3.5.27\"\n  },\n  \"devDependencies\": {\n    \"@types/node\": \"^25.0.10\",\n    \"@vitejs/plugin-vue\": \"^6.0.3\",\n    \"@vitejs/plugin-vue-jsx\": \"^5.1.3\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\",\n    \"vue-tsc\": \"^3.2.4\"\n  }\n}\n"
  },
  {
    "path": "examples/vue/row-selection/src/App.vue",
    "content": "<script setup lang=\"tsx\">\nimport {\n  FlexRender,\n  useTable,\n  createColumnHelper,\n  tableFeatures,\n  rowSelectionFeature,\n} from '@tanstack/vue-table'\nimport { ref } from 'vue'\nimport IndeterminateCheckbox from './IndeterminateCheckbox.vue'\nimport { makeData, Person } from './makeData'\n\nconst _features = tableFeatures({\n  rowSelectionFeature,\n})\n\nconst columnHelper = createColumnHelper<typeof _features, Person>()\n\nconst columns = columnHelper.columns([\n  columnHelper.display({\n    id: 'select',\n    header: ({ table }) => {\n      return (\n        <IndeterminateCheckbox\n          checked={table.getIsAllRowsSelected()}\n          indeterminate={table.getIsSomeRowsSelected()}\n          onChange={table.getToggleAllRowsSelectedHandler()}\n        ></IndeterminateCheckbox>\n      ) as any\n    },\n    cell: ({ row }) => {\n      return (\n        // @ts-ignore\n        <div className=\"px-1\">\n          <IndeterminateCheckbox\n            checked={row.getIsSelected()}\n            disabled={!row.getCanSelect()}\n            onChange={row.getToggleSelectedHandler()}\n          ></IndeterminateCheckbox>\n          {/* @ts-ignore */}\n        </div>\n      ) as any\n    },\n  }),\n  columnHelper.group({\n    header: 'Name',\n    footer: (props) => props.column.id,\n    columns: columnHelper.columns([\n      columnHelper.accessor('firstName', {\n        cell: (info) => info.getValue(),\n        footer: (props) => props.column.id,\n      }),\n      columnHelper.accessor((row) => row.lastName, {\n        id: 'lastName',\n        cell: (info) => info.getValue(),\n        header: () => 'Last Name',\n        footer: (props) => props.column.id,\n      }),\n    ]),\n  }),\n  columnHelper.group({\n    header: 'Info',\n    footer: (props) => props.column.id,\n    columns: columnHelper.columns([\n      columnHelper.accessor('age', {\n        header: () => 'Age',\n        footer: (props) => props.column.id,\n      }),\n      columnHelper.group({\n        header: 'More Info',\n        columns: columnHelper.columns([\n          columnHelper.accessor('visits', {\n            header: () => 'Visits',\n            footer: (props) => props.column.id,\n          }),\n          columnHelper.accessor('status', {\n            header: 'Status',\n            footer: (props) => props.column.id,\n          }),\n          columnHelper.accessor('progress', {\n            header: 'Profile Progress',\n            footer: (props) => props.column.id,\n          }),\n        ]),\n      }),\n    ]),\n  }),\n])\n\nconst data = ref(makeData(10))\nconst enableRowSelection = ref(true)\n\nconst rerender = () => {\n  data.value = makeData(10)\n}\n\nconst toggleRowSelection = () => {\n  enableRowSelection.value = !enableRowSelection.value\n}\n\nconst table = useTable(\n  {\n    _features,\n    _rowModels: {},\n    data,\n    columns,\n    // enable row selection for all rows\n    get enableRowSelection() {\n      return enableRowSelection.value\n    },\n    // enableRowSelection: row => row.original.age > 18, // or enable row selection conditionally per row\n  },\n  (state) => ({ rowSelection: state.rowSelection }),\n)\n</script>\n\n<template>\n  <div class=\"p-2\">\n    <table>\n      <thead>\n        <tr\n          v-for=\"headerGroup in table.getHeaderGroups()\"\n          :key=\"headerGroup.id\"\n        >\n          <th\n            v-for=\"header in headerGroup.headers\"\n            :key=\"header.id\"\n            :colSpan=\"header.colSpan\"\n          >\n            <FlexRender\n              v-if=\"!header.isPlaceholder\"\n              :render=\"header.column.columnDef.header\"\n              :props=\"header.getContext()\"\n            />\n          </th>\n        </tr>\n      </thead>\n      <tbody>\n        <tr v-for=\"row in table.getRowModel().rows\" :key=\"row.id\">\n          <td v-for=\"cell in row.getAllCells()\" :key=\"cell.id\">\n            <FlexRender\n              :render=\"cell.column.columnDef.cell\"\n              :props=\"cell.getContext()\"\n            />\n          </td>\n        </tr>\n      </tbody>\n      <tfoot>\n        <tr>\n          <td className=\"p-1\">\n            <IndeterminateCheckbox\n              :checked=\"table.getIsAllPageRowsSelected()\"\n              :indeterminate=\"table.getIsSomePageRowsSelected()\"\n              :onChange=\"table.getToggleAllPageRowsSelectedHandler()\"\n            />\n          </td>\n          <td :colSpan=\"20\">Page Rows {{ table.getRowModel().rows.length }}</td>\n        </tr>\n      </tfoot>\n    </table>\n    <div class=\"h-4\" />\n    <button @click=\"rerender\" class=\"border p-2\">Rerender</button>\n    <button @click=\"toggleRowSelection\" class=\"border p-2\">\n      {{ enableRowSelection ? 'Disable' : 'Enable' }} Row Selection\n    </button>\n  </div>\n</template>\n\n<style>\nhtml {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n</style>\n"
  },
  {
    "path": "examples/vue/row-selection/src/IndeterminateCheckbox.vue",
    "content": "<script setup lang=\"ts\">\nimport { ref, toRefs } from 'vue'\n\nconst props = defineProps<{\n  indeterminate: boolean\n  className?: string\n}>()\n\nconst { indeterminate, className } = toRefs(props)\n\nconst inputRef = ref<any>(null)\n</script>\n\n<template>\n  <input\n    type=\"checkbox\"\n    ref=\"inputRef\"\n    :class=\"`${className} cursor-pointer`\"\n    :indeterminate=\"indeterminate\"\n    v-bind=\"$attrs\"\n  />\n</template>\n"
  },
  {
    "path": "examples/vue/row-selection/src/env.d.ts",
    "content": "/// <reference types=\"vite/client\" />\n\ndeclare module '*.vue' {\n  import type { DefineComponent } from 'vue'\n  // eslint-disable-next-line @typescript-eslint/ban-types\n  const component: DefineComponent<{}, {}, any>\n  export default component\n}\n"
  },
  {
    "path": "examples/vue/row-selection/src/main.ts",
    "content": "import { createApp } from 'vue'\nimport App from './App.vue'\n\ncreateApp(App).mount('#app')\n"
  },
  {
    "path": "examples/vue/row-selection/src/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  subRows?: Array<Person>\n}\n\nconst range = (len: number) => {\n  const arr: Array<number> = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (): Person => {\n  return {\n    firstName: faker.person.firstName(),\n    lastName: faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: faker.number.int(1000),\n    progress: faker.number.int(100),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0],\n  }\n}\n\nexport function makeData(...lens: Array<number>) {\n  const makeDataLevel = (depth = 0): Array<Person> => {\n    const len = lens[depth]\n    return range(len).map((): Person => {\n      return {\n        ...newPerson(),\n        subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined,\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n"
  },
  {
    "path": "examples/vue/row-selection/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"module\": \"ESNext\",\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"preserve\",\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src/**/*.ts\", \"src/**/*.tsx\", \"src/**/*.vue\"]\n}\n"
  },
  {
    "path": "examples/vue/row-selection/vite.config.ts",
    "content": "import { defineConfig } from 'vite'\nimport vue from '@vitejs/plugin-vue'\nimport vueJsx from '@vitejs/plugin-vue-jsx'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [vue(), vueJsx()],\n})\n"
  },
  {
    "path": "examples/vue/sorting/.gitignore",
    "content": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\npnpm-debug.log*\nlerna-debug.log*\n\nnode_modules\ndist\ndist-ssr\n*.local\n\n# Editor directories and files\n.vscode/*\n!.vscode/extensions.json\n.idea\n.DS_Store\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n*.sw?\n"
  },
  {
    "path": "examples/vue/sorting/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run dev` or `yarn dev`\n"
  },
  {
    "path": "examples/vue/sorting/env.d.ts",
    "content": "/// <reference types=\"vite/client\" />\n"
  },
  {
    "path": "examples/vue/sorting/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <link rel=\"icon\" href=\"/favicon.ico\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite App</title>\n    <script src=\"https://cdn.tailwindcss.com\"></script>\n  </head>\n  <body>\n    <div id=\"app\"></div>\n    <script type=\"module\" src=\"/src/main.ts\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/vue/sorting/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-vue-sorting\",\n  \"private\": true,\n  \"version\": \"0.0.0\",\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"preview\": \"vite preview\",\n    \"lint\": \"eslint ./src\",\n    \"test:types\": \"vue-tsc\"\n  },\n  \"dependencies\": {\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"@tanstack/vue-table\": \"^9.0.0-alpha.10\",\n    \"vue\": \"^3.5.27\"\n  },\n  \"devDependencies\": {\n    \"@types/node\": \"^25.0.10\",\n    \"@vitejs/plugin-vue\": \"^6.0.3\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\",\n    \"vue-tsc\": \"^3.2.4\"\n  }\n}\n"
  },
  {
    "path": "examples/vue/sorting/src/App.vue",
    "content": "<script setup lang=\"ts\">\nimport {\n  FlexRender,\n  rowSortingFeature,\n  useTable,\n  createColumnHelper,\n  createSortedRowModel,\n  sortFns,\n  tableFeatures,\n} from '@tanstack/vue-table'\nimport { h, ref } from 'vue'\nimport { makeData, Person } from './makeData'\n\nconst _features = tableFeatures({\n  rowSortingFeature,\n})\n\nconst columnHelper = createColumnHelper<typeof _features, Person>()\n\nconst columns = columnHelper.columns([\n  columnHelper.accessor('firstName', {\n    cell: (info) => info.getValue(),\n    footer: (props) => props.column.id,\n  }),\n  columnHelper.accessor((row) => row.lastName, {\n    id: 'lastName',\n    cell: (info) => info.getValue(),\n    header: () => h('span', 'Last Name'),\n    footer: (props) => props.column.id,\n  }),\n  columnHelper.accessor('age', {\n    header: () => 'Age',\n    footer: (props) => props.column.id,\n  }),\n  columnHelper.accessor('visits', {\n    header: () => h('span', 'Visits'),\n    footer: (props) => props.column.id,\n  }),\n  columnHelper.accessor('status', {\n    header: 'Status',\n    footer: (props) => props.column.id,\n  }),\n  columnHelper.accessor('progress', {\n    header: 'Profile Progress',\n    footer: (props) => props.column.id,\n  }),\n  columnHelper.accessor('createdAt', {\n    header: 'Created At',\n  }),\n])\n\nconst data = ref(makeData(10000))\n\nconst rerender = () => {\n  data.value = makeData(10000)\n}\n\nconst table = useTable(\n  {\n    _features,\n    _rowModels: {\n      sortedRowModel: createSortedRowModel(sortFns),\n    },\n    data,\n    columns,\n    debugTable: true,\n  },\n  (state) => ({ sorting: state.sorting }),\n)\n</script>\n\n<template>\n  <div class=\"p-2\">\n    <table>\n      <thead>\n        <tr\n          v-for=\"headerGroup in table.getHeaderGroups()\"\n          :key=\"headerGroup.id\"\n        >\n          <th\n            v-for=\"header in headerGroup.headers\"\n            :key=\"header.id\"\n            :colSpan=\"header.colSpan\"\n            :class=\"\n              header.column.getCanSort() ? 'cursor-pointer select-none' : ''\n            \"\n            @click=\"header.column.getToggleSortingHandler()?.($event)\"\n          >\n            <template v-if=\"!header.isPlaceholder\">\n              <FlexRender\n                :render=\"header.column.columnDef.header\"\n                :props=\"header.getContext()\"\n              />\n\n              {{\n                { asc: ' 🔼', desc: ' 🔽' }[\n                  header.column.getIsSorted() as string\n                ]\n              }}\n            </template>\n          </th>\n        </tr>\n      </thead>\n\n      <tbody>\n        <tr v-for=\"row in table.getRowModel().rows.slice(0, 10)\" :key=\"row.id\">\n          <td v-for=\"cell in row.getAllCells()\" :key=\"cell.id\">\n            <FlexRender\n              :render=\"cell.column.columnDef.cell\"\n              :props=\"cell.getContext()\"\n            />\n          </td>\n        </tr>\n      </tbody>\n\n      <tfoot>\n        <tr\n          v-for=\"footerGroup in table.getFooterGroups()\"\n          :key=\"footerGroup.id\"\n        >\n          <th\n            v-for=\"header in footerGroup.headers\"\n            :key=\"header.id\"\n            :colSpan=\"header.colSpan\"\n          >\n            <FlexRender\n              v-if=\"!header.isPlaceholder\"\n              :render=\"header.column.columnDef.footer\"\n              :props=\"header.getContext()\"\n            />\n          </th>\n        </tr>\n      </tfoot>\n    </table>\n\n    <div class=\"h-4\"></div>\n\n    <div>{{ table.getRowModel().rows.length }} Rows</div>\n\n    <button @click=\"rerender\" class=\"border p-2\">Rerender</button>\n\n    <pre>{{ JSON.stringify(table.state.sorting, null, 2) }}</pre>\n  </div>\n</template>\n\n<style>\nhtml {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border: 1px solid lightgray;\n}\n\ntbody {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\n\ntfoot {\n  color: gray;\n}\n\ntfoot th {\n  font-weight: normal;\n}\n</style>\n"
  },
  {
    "path": "examples/vue/sorting/src/env.d.ts",
    "content": "/// <reference types=\"vite/client\" />\n\ndeclare module '*.vue' {\n  import type { DefineComponent } from 'vue'\n  // eslint-disable-next-line @typescript-eslint/ban-types\n  const component: DefineComponent<{}, {}, any>\n  export default component\n}\n"
  },
  {
    "path": "examples/vue/sorting/src/main.ts",
    "content": "import { createApp } from 'vue'\nimport App from './App.vue'\n\ncreateApp(App).mount('#app')\n"
  },
  {
    "path": "examples/vue/sorting/src/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  createdAt: Date\n  subRows?: Array<Person>\n}\n\nconst range = (len: number) => {\n  const arr: Array<number> = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (): Person => {\n  return {\n    firstName: faker.person.firstName(),\n    lastName: faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: faker.number.int(1000),\n    progress: faker.number.int(100),\n    createdAt: faker.date.anytime(),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0],\n  }\n}\n\nexport function makeData(...lens: Array<number>) {\n  const makeDataLevel = (depth = 0): Array<Person> => {\n    const len = lens[depth]\n    return range(len).map((): Person => {\n      return {\n        ...newPerson(),\n        subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined,\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n"
  },
  {
    "path": "examples/vue/sorting/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"module\": \"ESNext\",\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"preserve\",\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src/**/*.ts\", \"src/**/*.tsx\", \"src/**/*.vue\"]\n}\n"
  },
  {
    "path": "examples/vue/sorting/vite.config.ts",
    "content": "import { defineConfig } from 'vite'\nimport vue from '@vitejs/plugin-vue'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [vue()],\n})\n"
  },
  {
    "path": "examples/vue/sub-components/.gitignore",
    "content": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\npnpm-debug.log*\nlerna-debug.log*\n\nnode_modules\ndist\ndist-ssr\n*.local\n\n# Editor directories and files\n.vscode/*\n!.vscode/extensions.json\n.idea\n.DS_Store\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n*.sw?\n"
  },
  {
    "path": "examples/vue/sub-components/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run dev` or `yarn dev`\n"
  },
  {
    "path": "examples/vue/sub-components/env.d.ts",
    "content": "/// <reference types=\"vite/client\" />\n"
  },
  {
    "path": "examples/vue/sub-components/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <link rel=\"icon\" href=\"/favicon.ico\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite App</title>\n    <script src=\"https://cdn.tailwindcss.com\"></script>\n  </head>\n  <body>\n    <div id=\"app\"></div>\n    <script type=\"module\" src=\"/src/main.ts\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/vue/sub-components/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-vue-subcomponents\",\n  \"private\": true,\n  \"version\": \"0.0.0\",\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"preview\": \"vite preview\",\n    \"lint\": \"eslint ./src\",\n    \"test:types\": \"vue-tsc\"\n  },\n  \"dependencies\": {\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"@tanstack/vue-table\": \"^9.0.0-alpha.10\",\n    \"vue\": \"^3.5.27\"\n  },\n  \"devDependencies\": {\n    \"@types/node\": \"^25.0.10\",\n    \"@vitejs/plugin-vue\": \"^6.0.3\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\",\n    \"vue-tsc\": \"^3.2.4\"\n  }\n}\n"
  },
  {
    "path": "examples/vue/sub-components/src/App.vue",
    "content": "<script setup lang=\"ts\">\nimport {\n  FlexRender,\n  createExpandedRowModel,\n  createTableHelper,\n  rowExpandingFeature,\n  type Row,\n} from '@tanstack/vue-table'\nimport { Text, h, ref } from 'vue'\n\ntype Person = {\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  status: string\n  progress: number\n}\n\nconst defaultData: Person[] = [\n  {\n    firstName: 'tanner',\n    lastName: 'linsley',\n    age: 24,\n    visits: 100,\n    status: 'In Relationship',\n    progress: 50,\n  },\n  {\n    firstName: 'tandy',\n    lastName: 'miller',\n    age: 40,\n    visits: 40,\n    status: 'Single',\n    progress: 80,\n  },\n  {\n    firstName: 'joe',\n    lastName: 'dirte',\n    age: 45,\n    visits: 20,\n    status: 'Complicated',\n    progress: 10,\n  },\n]\n\nconst tableHelper = createTableHelper({\n  _features: { rowExpandingFeature },\n  _rowModels: {\n    expandedRowModel: createExpandedRowModel(),\n  },\n  TData: {} as Person,\n})\n\nconst columnHelper = tableHelper.createColumnHelper<Person>()\n\nfunction renderExpanded(row: Row<typeof tableHelper.features, Person>) {\n  if (!row.getCanExpand()) {\n    return h(Text, '🔵')\n  }\n  return h(\n    'button',\n    {\n      onClick: row.getToggleExpandedHandler(),\n      style: { cursor: 'pointer' },\n    },\n    row.getIsExpanded() ? '👇' : '👉',\n  )\n}\n\nconst columns = columnHelper.columns([\n  columnHelper.display({\n    id: 'expander',\n    header: () => null,\n    cell: ({ row }) => renderExpanded(row),\n  }),\n  columnHelper.accessor('firstName', {\n    footer: (props) => props.column.id,\n  }),\n  columnHelper.accessor((row) => row.lastName, {\n    id: 'lastName',\n    cell: (info) => info.getValue(),\n    header: () => 'Last Name',\n    footer: (props) => props.column.id,\n  }),\n  columnHelper.accessor('age', {\n    header: () => 'Age',\n    footer: (props) => props.column.id,\n  }),\n  columnHelper.accessor('visits', {\n    header: () => 'Visits',\n    footer: (props) => props.column.id,\n  }),\n  columnHelper.accessor('status', {\n    header: 'Status',\n    footer: (props) => props.column.id,\n  }),\n  columnHelper.accessor('progress', {\n    header: 'Profile Progress',\n    footer: (props) => props.column.id,\n  }),\n])\n\nconst data = ref(defaultData)\n\nconst rerender = () => {\n  data.value = defaultData\n}\n\nconst table = tableHelper.useTable(\n  {\n    // features and row models are already defined in the tableHelper\n    data,\n    columns,\n    getRowCanExpand: () => true,\n  },\n  (state) => ({ expanded: state.expanded }),\n)\n</script>\n\n<template>\n  <div class=\"p-2\">\n    <table>\n      <thead>\n        <tr\n          v-for=\"headerGroup in table.getHeaderGroups()\"\n          :key=\"headerGroup.id\"\n        >\n          <th\n            v-for=\"header in headerGroup.headers\"\n            :key=\"header.id\"\n            :colSpan=\"header.colSpan\"\n          >\n            <FlexRender\n              v-if=\"!header.isPlaceholder\"\n              :render=\"header.column.columnDef.header\"\n              :props=\"header.getContext()\"\n            />\n          </th>\n        </tr>\n      </thead>\n      <tbody>\n        <template v-for=\"row in table.getRowModel().rows\" :key=\"row.id\">\n          <tr>\n            <td v-for=\"cell in row.getAllCells()\" :key=\"cell.id\">\n              <FlexRender\n                :render=\"cell.column.columnDef.cell\"\n                :props=\"cell.getContext()\"\n              />\n            </td>\n          </tr>\n          <tr v-if=\"row.getIsExpanded()\">\n            <td :colspan=\"row.getAllCells().length\">\n              <pre :style=\"{ fontSize: '10px' }\">\n                  <code>{{ JSON.stringify(row.original, null, 2) }}</code>\n                </pre>\n            </td>\n          </tr>\n        </template>\n      </tbody>\n      <tfoot>\n        <tr\n          v-for=\"footerGroup in table.getFooterGroups()\"\n          :key=\"footerGroup.id\"\n        >\n          <th\n            v-for=\"header in footerGroup.headers\"\n            :key=\"header.id\"\n            :colSpan=\"header.colSpan\"\n          >\n            <FlexRender\n              v-if=\"!header.isPlaceholder\"\n              :render=\"header.column.columnDef.footer\"\n              :props=\"header.getContext()\"\n            />\n          </th>\n        </tr>\n      </tfoot>\n    </table>\n    <div class=\"h-4\" />\n    <button @click=\"rerender\" class=\"border p-2\">Rerender</button>\n  </div>\n</template>\n\n<style>\nhtml {\n  font-family: sans-serif;\n  font-size: 14px;\n}\ntable {\n  border: 1px solid lightgray;\n}\ntbody {\n  border-bottom: 1px solid lightgray;\n}\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n}\ntfoot {\n  color: gray;\n}\ntfoot th {\n  font-weight: normal;\n}\n</style>\n"
  },
  {
    "path": "examples/vue/sub-components/src/main.ts",
    "content": "import { createApp } from 'vue'\nimport App from './App.vue'\n\ncreateApp(App).mount('#app')\n"
  },
  {
    "path": "examples/vue/sub-components/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"module\": \"ESNext\",\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"preserve\",\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src/**/*.ts\", \"src/**/*.tsx\", \"src/**/*.vue\"]\n}\n"
  },
  {
    "path": "examples/vue/sub-components/vite.config.ts",
    "content": "import { defineConfig } from 'vite'\nimport vue from '@vitejs/plugin-vue'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [vue()],\n})\n"
  },
  {
    "path": "examples/vue/virtualized-rows/.gitignore",
    "content": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\npnpm-debug.log*\nlerna-debug.log*\n\nnode_modules\ndist\ndist-ssr\n*.local\n\n# Editor directories and files\n.vscode/*\n!.vscode/extensions.json\n.idea\n.DS_Store\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n*.sw?\n"
  },
  {
    "path": "examples/vue/virtualized-rows/README.md",
    "content": "# Example\n\nTo run this example:\n\n- `npm install` or `yarn`\n- `npm run dev` or `yarn dev`\n"
  },
  {
    "path": "examples/vue/virtualized-rows/env.d.ts",
    "content": "/// <reference types=\"vite/client\" />\n"
  },
  {
    "path": "examples/vue/virtualized-rows/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <link rel=\"icon\" href=\"/favicon.ico\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite App</title>\n    <script src=\"https://cdn.tailwindcss.com\"></script>\n  </head>\n  <body>\n    <div id=\"app\"></div>\n    <script type=\"module\" src=\"/src/main.ts\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "examples/vue/virtualized-rows/package.json",
    "content": "{\n  \"name\": \"tanstack-table-example-vue-virtualized-rows\",\n  \"private\": true,\n  \"version\": \"0.0.0\",\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"preview\": \"vite preview\",\n    \"test:types\": \"vue-tsc\"\n  },\n  \"dependencies\": {\n    \"@tanstack/vue-table\": \"^9.0.0-alpha.10\",\n    \"@tanstack/vue-virtual\": \"^3.13.18\",\n    \"vue\": \"^3.5.27\"\n  },\n  \"devDependencies\": {\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"@types/node\": \"^25.0.10\",\n    \"@vitejs/plugin-vue\": \"^6.0.3\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\",\n    \"vue-tsc\": \"^3.2.4\"\n  }\n}\n"
  },
  {
    "path": "examples/vue/virtualized-rows/src/App.vue",
    "content": "<script setup lang=\"ts\">\nimport './index.css'\nimport { computed, ref, h } from 'vue'\nimport {\n  type ColumnDef,\n  FlexRender,\n  useTable,\n  columnSizingFeature,\n  rowSortingFeature,\n  createSortedRowModel,\n  tableFeatures,\n  sortFns,\n} from '@tanstack/vue-table'\nimport { useVirtualizer } from '@tanstack/vue-virtual'\nimport { makeData, type Person } from './makeData'\n\nconst _features = tableFeatures({\n  columnSizingFeature,\n  rowSortingFeature,\n})\n\nconst search = ref('')\n\nconst data = ref<Person[]>(makeData(50_000))\n\nconst filteredData = computed<Person[]>(() => {\n  const searchValue = search.value.toLowerCase()\n\n  // If no search value is present, return all data\n  if (!searchValue) return data.value\n\n  return data.value.filter((row) => {\n    return Object.values(row).some((value) => {\n      if (value instanceof Date) {\n        return value.toLocaleString().toLowerCase().includes(searchValue)\n      }\n      // Stringify the value and check if it contains the search term\n      return `${value}`.toLowerCase().includes(searchValue)\n    })\n  })\n})\n\nlet searchTimeout: NodeJS.Timeout\nfunction handleDebounceSearch(ev: Event) {\n  if (searchTimeout) {\n    clearTimeout(searchTimeout)\n  }\n\n  searchTimeout = setTimeout(() => {\n    search.value = (ev?.target as HTMLInputElement)?.value ?? ''\n  }, 300)\n}\n\nconst columns = computed<ColumnDef<typeof _features, Person>[]>(() => [\n  {\n    accessorKey: 'id',\n    header: 'ID',\n  },\n  {\n    accessorKey: 'firstName',\n    cell: (info) => info.getValue(),\n  },\n  {\n    accessorFn: (row) => row.lastName,\n    id: 'lastName',\n    cell: (info) => info.getValue(),\n    header: () => h('span', 'Last Name'),\n  },\n  {\n    accessorKey: 'age',\n    header: () => 'Age',\n  },\n  {\n    accessorKey: 'visits',\n    header: () => h('span', 'Visits'),\n  },\n  {\n    accessorKey: 'status',\n    header: 'Status',\n  },\n  {\n    accessorKey: 'progress',\n    header: 'Profile Progress',\n  },\n  {\n    accessorKey: 'createdAt',\n    header: 'Created At',\n    cell: (info) => info.getValue<Date>().toLocaleString(),\n  },\n])\n\nconst table = useTable({\n  _features,\n  _rowModels: {\n    sortedRowModel: createSortedRowModel(sortFns),\n  },\n  get data() {\n    return filteredData.value\n  },\n  columns: columns.value,\n  debugTable: false,\n})\n\nconst rows = computed(() => table.getRowModel().rows)\n\n//The virtualizer needs to know the scrollable container element\nconst tableContainerRef = ref<HTMLDivElement | null>(null)\n\nconst rowVirtualizerOptions = computed(() => {\n  return {\n    count: rows.value.length,\n    estimateSize: () => 33, //estimate row height for accurate scrollbar dragging\n    getScrollElement: () => tableContainerRef.value,\n    overscan: 5,\n  }\n})\n\nconst rowVirtualizer = useVirtualizer(rowVirtualizerOptions)\n\nconst virtualRows = computed(() => rowVirtualizer.value.getVirtualItems())\nconst totalSize = computed(() => rowVirtualizer.value.getTotalSize())\n\nfunction measureElement(el?: Element) {\n  if (!el) {\n    return\n  }\n\n  rowVirtualizer.value.measureElement(el)\n\n  return undefined\n}\n</script>\n\n<template>\n  <div>\n    <p class=\"text-center\">\n      For tables, the basis for the offset of the translate css function is from\n      the row's initial position itself. Because of this, we need to calculate\n      the translateY pixel count different and base it off the the index.\n    </p>\n    <h1 class=\"text-3xl font-bold text-center\">Virtualized Rows</h1>\n    <div style=\"margin: 0 auto; width: min-content\">\n      <input\n        :modelValue=\"search\"\n        @input=\"handleDebounceSearch\"\n        placeholder=\"Search\"\n        class=\"p-2\"\n      />\n      {{ rows.length.toLocaleString() }} results\n    </div>\n  </div>\n  <div\n    class=\"container\"\n    ref=\"tableContainerRef\"\n    :style=\"{\n      overflow: 'auto', //our scrollable table container\n      position: 'relative', //needed for sticky header\n      height: '800px', //should be a fixed height\n    }\"\n  >\n    <div :style=\"{ height: `${totalSize}px` }\">\n      <!-- Even though we're still using sematic table tags, we must use CSS grid and flexbox for dynamic row heights -->\n      <table :style=\"{ display: 'grid' }\">\n        <thead\n          :style=\"{\n            display: 'grid',\n            position: 'sticky',\n            top: 0,\n            zIndex: 1,\n          }\"\n        >\n          <tr\n            v-for=\"headerGroup in table.getHeaderGroups()\"\n            :key=\"headerGroup.id\"\n            :style=\"{ display: 'flex', width: '100%' }\"\n          >\n            <th\n              v-for=\"header in headerGroup.headers\"\n              :key=\"header.id\"\n              :colspan=\"header.colSpan\"\n              :style=\"{ width: `${header.getSize()}px` }\"\n            >\n              <div\n                v-if=\"!header.isPlaceholder\"\n                :class=\"{\n                  'cursor-pointer select-none': header.column.getCanSort(),\n                }\"\n                @click=\"(e) => header.column.getToggleSortingHandler()?.(e)\"\n              >\n                <FlexRender\n                  :render=\"header.column.columnDef.header\"\n                  :props=\"header.getContext()\"\n                />\n                <span v-if=\"header.column.getIsSorted() === 'asc'\"> 🔼</span>\n                <span v-if=\"header.column.getIsSorted() === 'desc'\"> 🔽</span>\n              </div>\n            </th>\n          </tr>\n        </thead>\n        <tbody\n          :style=\"{\n            display: 'grid',\n            height: `${totalSize}px`, //tells scrollbar how big the table is\n            position: 'relative', //needed for absolute positioning of rows\n          }\"\n        >\n          <tr\n            v-for=\"vRow in virtualRows\"\n            :data-index=\"\n              vRow.index /* needed for dynamic row height measurement*/\n            \"\n            :ref=\"measureElement /*measure dynamic row height*/\"\n            :key=\"rows[vRow.index].id\"\n            :style=\"{\n              display: 'flex',\n              position: 'absolute',\n              transform: `translateY(${vRow.start}px)`, //this should always be a `style` as it changes on scroll\n              width: '100%',\n            }\"\n          >\n            <td\n              v-for=\"cell in rows[vRow.index].getAllCells()\"\n              :key=\"cell.id\"\n              :style=\"{\n                display: 'flex',\n                width: `${cell.column.getSize()}px`,\n              }\"\n            >\n              <FlexRender\n                :render=\"cell.column.columnDef.cell\"\n                :props=\"cell.getContext()\"\n              />\n            </td>\n          </tr>\n        </tbody>\n      </table>\n    </div>\n  </div>\n</template>\n"
  },
  {
    "path": "examples/vue/virtualized-rows/src/env.d.ts",
    "content": "/// <reference types=\"vite/client\" />\n\ndeclare module '*.vue' {\n  import type { DefineComponent } from 'vue'\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types\n  const component: DefineComponent<{}, {}, any>\n  export default component\n}\n"
  },
  {
    "path": "examples/vue/virtualized-rows/src/index.css",
    "content": "html {\n  font-family: sans-serif;\n  font-size: 14px;\n}\n\ntable {\n  border-collapse: collapse;\n  border-spacing: 0;\n  font-family: arial, sans-serif;\n  table-layout: fixed;\n}\n\nthead {\n  background: lightgray;\n}\n\ntr {\n  border-bottom: 1px solid lightgray;\n}\n\nth {\n  border-bottom: 1px solid lightgray;\n  border-right: 1px solid lightgray;\n  padding: 2px 4px;\n  text-align: left;\n}\n\ntd {\n  padding: 6px;\n}\n\n.container {\n  border: 1px solid lightgray;\n  margin: 1rem auto;\n}\n\n.cursor-pointer {\n  cursor: pointer;\n}\n\n.select-none {\n  -webkit-user-select: none;\n  -moz-user-select: none;\n  -ms-user-select: none;\n  user-select: none;\n}\n\n.text-left {\n  text-align: left;\n}\n"
  },
  {
    "path": "examples/vue/virtualized-rows/src/main.ts",
    "content": "import { createApp } from 'vue'\nimport App from './App.vue'\n\ncreateApp(App).mount('#app')\n"
  },
  {
    "path": "examples/vue/virtualized-rows/src/makeData.ts",
    "content": "import { faker } from '@faker-js/faker'\n\nexport type Person = {\n  id: number\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  createdAt: Date\n}\n\nconst range = (len: number) => {\n  const arr: number[] = []\n  for (let i = 0; i < len; i++) {\n    arr.push(i)\n  }\n  return arr\n}\n\nconst newPerson = (index: number): Person => {\n  return {\n    id: index + 1,\n    firstName: faker.person.firstName(),\n    lastName: faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: faker.number.int(1000),\n    progress: faker.number.int(100),\n    createdAt: faker.date.anytime(),\n    status: faker.helpers.shuffle<Person['status']>([\n      'relationship',\n      'complicated',\n      'single',\n    ])[0]!,\n  }\n}\n\nexport function makeData(...lens: number[]) {\n  const makeDataLevel = (depth = 0): Person[] => {\n    const len = lens[depth]!\n    return range(len).map((d): Person => {\n      return {\n        ...newPerson(d),\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n"
  },
  {
    "path": "examples/vue/virtualized-rows/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"module\": \"ESNext\",\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n    \"noEmit\": true,\n    \"jsx\": \"preserve\",\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true\n  },\n  \"include\": [\"src/**/*.ts\", \"src/**/*.tsx\", \"src/**/*.vue\"]\n}\n"
  },
  {
    "path": "examples/vue/virtualized-rows/vite.config.ts",
    "content": "import { defineConfig } from 'vite'\nimport vue from '@vitejs/plugin-vue'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [vue()],\n})\n"
  },
  {
    "path": "knip.json",
    "content": "{\n  \"$schema\": \"https://unpkg.com/knip@5/schema.json\",\n  \"ignoreDependencies\": [\"@faker-js/faker\"],\n  \"ignoreWorkspaces\": [\"examples/**\"],\n  \"ignore\": [\"**/*benchmark*\", \"**/benchmarks/**\"],\n  \"workspaces\": {\n    \"packages/table-core\": {\n      \"ignore\": [\"**/tests/**\"]\n    },\n    \"packages/match-sorter-utils\": {\n      \"ignoreDependencies\": [\"remove-accents\"]\n    },\n    \"packages/react-table\": {\n      \"ignore\": [\"**/*.notest.*\", \"**/makeTestData.ts\"]\n    }\n  }\n}\n"
  },
  {
    "path": "nx.json",
    "content": "{\n  \"$schema\": \"./node_modules/nx/schemas/nx-schema.json\",\n  \"defaultBase\": \"main\",\n  \"nxCloudId\": \"6435ee4cd7387c45c0e4bf4c\",\n  \"useInferencePlugins\": false,\n  \"parallel\": 5,\n  \"tui\": {\n    \"enabled\": false\n  },\n  \"namedInputs\": {\n    \"sharedGlobals\": [\n      \"{workspaceRoot}/.nvmrc\",\n      \"{workspaceRoot}/package.json\",\n      \"{workspaceRoot}/tsconfig.json\"\n    ],\n    \"default\": [\n      \"sharedGlobals\",\n      \"{projectRoot}/**/*\",\n      \"!{projectRoot}/**/*.md\"\n    ],\n    \"public\": [\n      \"default\",\n      \"{projectRoot}/build\",\n      \"{projectRoot}/dist\",\n      \"!{projectRoot}/.eslintrc.cjs\",\n      \"!{projectRoot}/tsconfig.eslint.json\"\n    ]\n  },\n  \"targetDefaults\": {\n    \"test:lib\": {\n      \"dependsOn\": [\"^build\"],\n      \"inputs\": [\"default\", \"^public\"],\n      \"outputs\": [\"{projectRoot}/coverage\"],\n      \"cache\": true\n    },\n    \"test:eslint\": {\n      \"dependsOn\": [\"^build\"],\n      \"inputs\": [\"default\", \"^public\"],\n      \"cache\": true\n    },\n    \"test:types\": {\n      \"dependsOn\": [\"^build\"],\n      \"inputs\": [\"default\", \"^public\"],\n      \"cache\": true\n    },\n    \"test:build\": {\n      \"dependsOn\": [\"build\"],\n      \"inputs\": [\"default\", \"^public\"],\n      \"cache\": true\n    },\n    \"build\": {\n      \"dependsOn\": [\"^build\"],\n      \"inputs\": [\"default\", \"^public\"],\n      \"outputs\": [\"{projectRoot}/build\", \"{projectRoot}/dist\"],\n      \"cache\": true\n    },\n    \"test:knip\": {\n      \"cache\": true,\n      \"inputs\": [\"{workspaceRoot}/**/*\"]\n    },\n    \"test:sherif\": {\n      \"cache\": true,\n      \"inputs\": [\"{workspaceRoot}/**/package.json\"]\n    }\n  }\n}\n"
  },
  {
    "path": "package.json",
    "content": "{\n  \"name\": \"table\",\n  \"private\": true,\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+https://github.com/TanStack/table.git\"\n  },\n  \"packageManager\": \"pnpm@10.28.2\",\n  \"type\": \"module\",\n  \"scripts\": {\n    \"build\": \"nx run-many --targets=build -p @tanstack/table-core @tanstack/react-table @tanstack/table-devtools @tanstack/react-table-devtools @tanstack/preact-table @tanstack/angular-table && size-limit\",\n    \"build:all\": \"nx run-many --targets=build -p @tanstack/table-core @tanstack/react-table @tanstack/table-devtools @tanstack/react-table-devtools @tanstack/preact-table @tanstack/angular-table && size-limit\",\n    \"build:core\": \"nx build @tanstack/table-core && size-limit\",\n    \"cipublish\": \"node scripts/publish.js\",\n    \"clean\": \"find . -name 'dist' -type d -prune -exec rm -rf {} +\",\n    \"clean:node_modules\": \"find . -name 'node_modules' -type d -prune -exec rm -rf {} +\",\n    \"dev\": \"pnpm run watch\",\n    \"generate-docs\": \"node scripts/generateDocs.js\",\n    \"format\": \"prettier --experimental-cli --ignore-unknown '**/*' --write\",\n    \"lint:fix:all\": \"pnpm run format && nx run-many --targets=lint --fix --exclude=packages/{lit-table,solid-table,svelte-table,vue-table,match-sorter-utils}\",\n    \"lint:fix\": \"nx affected --target=lint:fix --exclude=examples/**,packages/{lit-table,solid-table,svelte-table,vue-table,match-sorter-utils}\",\n    \"preinstall\": \"node -e \\\"if(process.env.CI == 'true') {console.log('Skipping preinstall...'); process.exit(1)}\\\" || npx -y only-allow pnpm\",\n    \"size\": \"size-limit\",\n    \"test\": \"pnpm run test:ci\",\n    \"test:build\": \"nx affected --target=test:build --exclude='examples/{lit,solid,svelte,vanilla,vue}/**' --exclude='packages/{lit-table,solid-table,svelte-table,vue-table,match-sorter-utils}'\",\n    \"test:ci\": \"nx run-many --targets=test:eslint,test:sherif,test:knip,test:lib,test:types,test:build,build -p @tanstack/table-core @tanstack/react-table @tanstack/table-devtools @tanstack/react-table-devtools @tanstack/preact-table @tanstack/angular-table 'examples/react/**' 'examples/preact/**' 'examples/angular/**'\",\n    \"test:docs\": \"node scripts/verify-links.ts\",\n    \"test:eslint\": \"nx affected --target=test:eslint --exclude='examples/{lit,solid,svelte,vanilla,vue}/**' --exclude='packages/{lit-table,solid-table,svelte-table,vue-table,match-sorter-utils}'\",\n    \"test:knip\": \"NODE_OPTIONS='--max-old-space-size=4096' knip\",\n    \"test:lib\": \"nx affected --targets=test:lib --exclude='examples/{lit,solid,svelte,vanilla,vue}/**' --exclude='packages/{lit-table,solid-table,svelte-table,vue-table,match-sorter-utils}'\",\n    \"test:lib:dev\": \"pnpm test:lib && nx watch --all -- pnpm test:lib\",\n    \"test:pr\": \"nx affected --targets=test:eslint,test:sherif,test:knip,test:lib,test:types,test:build,build --exclude='examples/{lit,solid,svelte,vanilla,vue}/**' --exclude='packages/{lit-table,solid-table,svelte-table,vue-table,match-sorter-utils}'\",\n    \"test:sherif\": \"sherif\",\n    \"test:types\": \"nx affected --targets=test:types --exclude='examples/{lit,solid,svelte,vanilla,vue}/**' --exclude='packages/{lit-table,solid-table,svelte-table,vue-table,match-sorter-utils}'\",\n    \"watch\": \"pnpm run build:all && nx watch --all -- pnpm run build:all\"\n  },\n  \"nx\": {\n    \"includedScripts\": [\n      \"test:docs\",\n      \"test:knip\",\n      \"test:sherif\"\n    ]\n  },\n  \"size-limit\": [\n    {\n      \"path\": \"packages/table-core/dist/esm/index.js\",\n      \"limit\": \"20 KB\"\n    }\n  ],\n  \"devDependencies\": {\n    \"@faker-js/faker\": \"^10.2.0\",\n    \"@size-limit/preset-small-lib\": \"^12.0.0\",\n    \"@tanstack/eslint-config\": \"0.3.4\",\n    \"@tanstack/publish-config\": \"0.2.2\",\n    \"@tanstack/typedoc-config\": \"0.3.3\",\n    \"@tanstack/vite-config\": \"0.4.3\",\n    \"@testing-library/jest-dom\": \"^6.9.1\",\n    \"@types/node\": \"^25.0.10\",\n    \"eslint\": \"^9.39.2\",\n    \"jsdom\": \"^27.4.0\",\n    \"knip\": \"^5.82.1\",\n    \"markdown-link-extractor\": \"^4.0.3\",\n    \"nx\": \"^22.4.2\",\n    \"prettier\": \"^3.8.1\",\n    \"prettier-plugin-svelte\": \"^3.4.1\",\n    \"publint\": \"^0.3.17\",\n    \"rimraf\": \"^6.1.2\",\n    \"sherif\": \"^1.10.0\",\n    \"size-limit\": \"^12.0.0\",\n    \"tinyglobby\": \"^0.2.15\",\n    \"typescript\": \"5.9.3\",\n    \"vite\": \"^7.3.1\",\n    \"vitest\": \"^4.0.18\"\n  }\n}\n"
  },
  {
    "path": "packages/angular-table/eslint.config.js",
    "content": "// @ts-check\n\nimport rootConfig from '../../eslint.config.js'\n\n/** @type {any} */\nconst config = [\n  ...rootConfig,\n  {\n    rules: {},\n  },\n]\n\nexport default config\n"
  },
  {
    "path": "packages/angular-table/ng-package.json",
    "content": "{\n  \"$schema\": \"./node_modules/ng-packagr/ng-package.schema.json\",\n  \"dest\": \"./dist\",\n  \"lib\": {\n    \"entryFile\": \"src/index.ts\"\n  },\n  \"deleteDestPath\": false,\n  \"allowedNonPeerDependencies\": [\n    \"@tanstack/table-core\",\n    \"@tanstack/angular-store\"\n  ]\n}\n"
  },
  {
    "path": "packages/angular-table/package.json",
    "content": "{\n  \"name\": \"@tanstack/angular-table\",\n  \"version\": \"9.0.0-alpha.17\",\n  \"description\": \"Headless UI for building powerful tables & datagrids for Angular.\",\n  \"author\": \"Tanner Linsley\",\n  \"license\": \"MIT\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+https://github.com/TanStack/table.git\",\n    \"directory\": \"packages/angular-table\"\n  },\n  \"homepage\": \"https://tanstack.com/table\",\n  \"funding\": {\n    \"type\": \"github\",\n    \"url\": \"https://github.com/sponsors/tannerlinsley\"\n  },\n  \"keywords\": [\n    \"angular\",\n    \"table\",\n    \"angular-table\",\n    \"datagrid\"\n  ],\n  \"type\": \"module\",\n  \"module\": \"dist/fesm2022/tanstack-angular-table.mjs\",\n  \"types\": \"dist/types/tanstack-angular-table.d.ts\",\n  \"exports\": {\n    \".\": {\n      \"types\": \"./dist/types/tanstack-angular-table.d.ts\",\n      \"default\": \"./dist/fesm2022/tanstack-angular-table.mjs\"\n    },\n    \"./package.json\": {\n      \"default\": \"./package.json\"\n    }\n  },\n  \"engines\": {\n    \"node\": \">=18\"\n  },\n  \"files\": [\n    \"dist\",\n    \"src\"\n  ],\n  \"scripts\": {\n    \"build\": \"ng-packagr -p ng-package.json -c tsconfig.build.json && rimraf ./dist/package.json\",\n    \"build:types\": \"tsc --emitDeclarationOnly\",\n    \"clean\": \"rimraf ./build && rimraf ./dist\",\n    \"test:build\": \"publint --strict\",\n    \"test:eslint\": \"eslint ./src\",\n    \"test:lib\": \"vitest\",\n    \"test:benchmark\": \"vitest bench\",\n    \"test:lib:dev\": \"vitest --watch\",\n    \"test:types\": \"tsc && vitest --typecheck\"\n  },\n  \"dependencies\": {\n    \"@tanstack/angular-store\": \"^0.9.2\",\n    \"@tanstack/table-core\": \"workspace:*\",\n    \"tslib\": \"^2.8.1\"\n  },\n  \"devDependencies\": {\n    \"@analogjs/vite-plugin-angular\": \"^2.2.2\",\n    \"@analogjs/vitest-angular\": \"^2.2.2\",\n    \"@angular/core\": \"^21.1.1\",\n    \"@angular/platform-browser\": \"^21.1.1\",\n    \"ng-packagr\": \"^21.1.0\",\n    \"typescript\": \"5.9.3\"\n  },\n  \"peerDependencies\": {\n    \"@angular/core\": \">=19\"\n  },\n  \"sideEffects\": false\n}\n"
  },
  {
    "path": "packages/angular-table/src/flex-render/context.ts",
    "content": "import { InjectionToken, inject } from '@angular/core'\n\nexport const FlexRenderComponentProps = new InjectionToken<\n  NonNullable<unknown>\n>('[@tanstack/angular-table] Flex render component context props')\n\n/**\n * Inject the flex render context props.\n *\n * Can be used in components rendered via FlexRender directives.\n */\nexport function injectFlexRenderContext<T extends NonNullable<unknown>>(): T {\n  return inject<T>(FlexRenderComponentProps)\n}\n"
  },
  {
    "path": "packages/angular-table/src/flex-render/flags.ts",
    "content": "/**\n * Flags used to manage and optimize the rendering lifecycle of the content of the cell\n * while using {@link FlexViewRenderer}.\n */\nexport const FlexRenderFlags = {\n  /**\n   * Indicates that the view is being created for the first time or will be cleared during the next update phase.\n   * This is the initial state and will transition after the first ngDoCheck.\n   */\n  ViewFirstRender: 1 << 0,\n  /**\n   * Indicates the `content` property has been modified or the view requires a complete re-render.\n   * When this flag is enabled, the view will be cleared and recreated from scratch.\n   */\n  ContentChanged: 1 << 1,\n  /**\n   * Indicates that the `props` property reference has changed.\n   * When this flag is enabled, the view context is updated based on the type of the content.\n   *\n   * For Component view, inputs will be updated and view will be marked as dirty.\n   * For TemplateRef and primitive values, view will be marked as dirty\n   */\n  PropsReferenceChanged: 1 << 2,\n  /**\n   * Indicates that the current rendered view needs to be checked for changes.\n   * This will be set to true when `content(props)` result has changed or during\n   * forced update\n   */\n  Dirty: 1 << 3,\n  /**\n   * Indicates that the first render effect has been checked at least one time.\n   */\n  RenderEffectChecked: 1 << 4,\n} as const\n"
  },
  {
    "path": "packages/angular-table/src/flex-render/flexRenderComponent.ts",
    "content": "import { reflectComponentType } from '@angular/core'\nimport type {\n  Binding,\n  ComponentMirror,\n  Injector,\n  InputSignal,\n  OutputEmitterRef,\n  Type,\n  createComponent,\n} from '@angular/core'\n\ntype CreateComponentOptions = Parameters<typeof createComponent>[1]\ntype CreateComponentBindings = CreateComponentOptions['bindings']\ntype CreateComponentDirectives = CreateComponentOptions['directives']\n\ninterface FlexRenderOptions<\n  TInputs extends Record<string, any>,\n  TOutputs extends Record<string, any>,\n> {\n  /**\n   * Native Angular bindings applied at component creation time via `createComponent`.\n   * Use this option to set inputs, outputs, or two-way bindings at creation time.\n   * Shouldn't be used together with {@link FlexRenderOptions#inputs} or {@link FlexRenderOptions#outputs} option.\n   *\n   * Binding input/outputs at creation time: {@link https://angular.dev/guide/components/programmatic-rendering#binding-inputs-outputs-and-setting-host-directives-at-creation}\n   *\n   * Two-way binding: {@link https://angular.dev/api/core/twoWayBinding}\n   *\n   * Output binding: {@link https://angular.dev/api/core/outputBinding}\n   *\n   * Input binding: {@link https://angular.dev/api/core/inputBinding}\n   *\n   * @example\n   * ```ts\n   * import {flexRenderComponent} from '@tanstack/angular-table';\n   * flexRenderComponent(MyComponent, {\n   *   bindings: [\n   *     // Will update `value` input every time `mySignalValue` changes\n   *     inputBinding('value', mySignalValue),\n   *     // Set myProperty to 1 when the component is created\n   *     inputBinding('myProperty', () => 1),\n   *     // Callback called every time `valueChange` output emit\n   *     outputBinding('valueChange', value => {\n   *       console.log(\"my value changed to\", value)\n   *     }),\n   *     // Two-way binding between `value` input and `valueChange` output\n   *     // Useful while using `model` inputs.\n   *     twoWayBinding('value', mySignal)\n   *   ]\n   * })\n   * ```\n   */\n  readonly bindings?: Array<Binding>\n  /**\n   * Directives to apply to the component at creation time.\n   *\n   * Binding directives at creation time: {@link https://angular.dev/guide/components/programmatic-rendering#binding-inputs-outputs-and-setting-host-directives-at-creation}\n   *\n   * Two-way binding: {@link https://angular.dev/api/core/twoWayBinding}\n   *\n   * Output binding: {@link https://angular.dev/api/core/outputBinding}\n   *\n   * Input binding: {@link https://angular.dev/api/core/inputBinding}\n   *\n   * @example\n   * ```ts\n   * import {flexRenderComponent} from '@tanstack/angular-table';\n   * flexRenderComponent(MyComponent, {\n   *   bindings: [\n   *      // ...\n   *   ],\n   *   directives: [\n   *      DirectiveA,\n   *      {\n   *        type: DirectiveB,\n   *        bindings: [\n   *          inputBinding('value', mySignalValue),\n   *          // ...\n   *        ]\n   *      }\n   *   ]\n   * })\n   * ```\n   */\n  readonly directives?: CreateComponentDirectives\n  /**\n   * Component instance inputs.\n   *\n   * These values are assigned after the component has been created using\n   * [componentRef.setInput API](https://angular.dev/api/core/ComponentRef#setInput).\n   *\n   * Shouldn't be used together with {@link FlexRenderOptions#bindings} option\n   */\n  readonly inputs?: TInputs\n  /**\n   * Component instance outputs.\n   *\n   * Outputs are wired imperatively after component creation using {@link OutputEmitterRef#subscribe}.\n   *\n   * Shouldn't be used together with {@link FlexRenderOptions#bindings} option\n   */\n  readonly outputs?: TOutputs\n  /**\n   * Optional {@link Injector} that will be used when rendering the component\n   */\n  readonly injector?: Injector\n}\n\ntype Inputs<T> = {\n  [K in keyof T as T[K] extends InputSignal<infer R>\n    ? K\n    : never]?: T[K] extends InputSignal<infer R> ? R : never\n}\n\ntype Outputs<T> = {\n  [K in keyof T as T[K] extends OutputEmitterRef<infer R>\n    ? K\n    : never]?: T[K] extends OutputEmitterRef<infer R>\n    ? OutputEmitterRef<R>['emit']\n    : never\n}\n\n/**\n * Helper function to create a {@link FlexRenderComponent} instance, with better type-safety.\n *\n * @example\n * ```ts\n * import {flexRenderComponent} from '@tanstack/angular-table'\n * import {inputBinding, outputBinding} from '@angular/core';\n *\n * const columns = [\n *   {\n *     cell: ({ row }) => {\n *        return flexRenderComponent(MyComponent, {\n *          inputs: { value: mySignalValue() },\n *          outputs: { valueChange: (val) => {} }\n *          // or using angular native createComponent#binding api\n *          bindings: [\n *            inputBinding('value', mySignalValue),\n *            outputBinding('valueChange', value => {\n *              console.log(\"my value changed to\", value)\n *            })\n *          ]\n *        })\n *     },\n *   },\n * ]\n * ```\n */\nexport function flexRenderComponent<TComponent = any>(\n  component: Type<TComponent>,\n  options?: FlexRenderOptions<Inputs<TComponent>, Outputs<TComponent>>,\n): FlexRenderComponent<TComponent> {\n  const { inputs, injector, outputs, directives, bindings } = options ?? {}\n  return new FlexRenderComponentInstance(\n    component,\n    inputs,\n    injector,\n    outputs,\n    directives,\n    bindings,\n  )\n}\n\n/**\n * Wrapper interface for a component that will be used as content for {@link FlexRenderDirective}.\n * Can be created using {@link flexRenderComponent} helper.\n *\n * @example\n *\n * ```ts\n * import {flexRenderComponent} from '@tanstack/angular-table'\n *\n * // Usage in cell/header/footer definition\n * const columns = [\n *   {\n *     cell: ({ row }) => {\n *        return flexRenderComponent(MyComponent, {\n *          inputs: { value: mySignalValue() },\n *          outputs: { valueChange: (val) => {} }\n *          // or using angular createComponent#bindings api\n *          bindings: [\n *            inputBinding('value', mySignalValue),\n *            outputBinding('valueChange', value => {\n *              console.log(\"my value changed to\", value)\n *            })\n *          ]\n *        })\n *     },\n *   },\n * ]\n *\n * import {input, output} from '@angular/core';\n *\n * @Component({\n *  selector: 'my-component',\n * })\n * class MyComponent {\n *    readonly value = input(0);\n *    readonly valueChange = output<number>();\n * }\n *\n * ```\n */\nexport interface FlexRenderComponent<TComponent = any> {\n  /**\n   * The component type\n   */\n  readonly component: Type<TComponent>\n  /**\n   * Reflected metadata about the component.\n   */\n  readonly mirror: ComponentMirror<TComponent>\n  /**\n   * List of allowed input names.\n   */\n  readonly allowedInputNames: Array<string>\n  /**\n   * List of allowed output names.\n   */\n  readonly allowedOutputNames: Array<string>\n  /**\n   * Component instance outputs. Subscribed via {@link OutputEmitterRef#subscribe}\n   *\n   * @see {@link FlexRenderOptions#outputs}\n   */\n  readonly outputs?: Outputs<TComponent>\n  /**\n   * Component instance inputs. Set via [componentRef.setInput API](https://angular.dev/api/core/ComponentRef#setInput))\n   *\n   * @see {@link FlexRenderOptions#inputs}\n   */\n  readonly inputs?: Inputs<TComponent>\n  /**\n   * Optional {@link Injector} that will be used when rendering the component.\n   *\n   * @see {@link FlexRenderOptions#injector}\n   */\n  readonly injector?: Injector\n  /**\n   * Bindings to apply to the root component\n   *\n   * @see {@link FlexRenderOptions#bindings}\n   */\n  bindings?: CreateComponentBindings\n  /**\n   * Directives that should be applied to the component.\n   *\n   * @see {FlexRenderOptions#directives}\n   */\n  directives?: CreateComponentDirectives\n}\n\n/**\n * Wrapper class for a component that will be used as content for {@link FlexRenderDirective}\n *\n * Prefer {@link flexRenderComponent} helper for better type-safety\n */\nexport class FlexRenderComponentInstance<\n  TComponent = any,\n> implements FlexRenderComponent<TComponent> {\n  readonly mirror: ComponentMirror<TComponent>\n  readonly allowedInputNames: Array<string> = []\n  readonly allowedOutputNames: Array<string> = []\n\n  constructor(\n    readonly component: Type<TComponent>,\n    readonly inputs?: Inputs<TComponent>,\n    readonly injector?: Injector,\n    readonly outputs?: Outputs<TComponent>,\n    readonly directives?: CreateComponentDirectives,\n    readonly bindings?: CreateComponentBindings,\n  ) {\n    const mirror = reflectComponentType(component)\n    if (!mirror) {\n      throw new Error(\n        `[@tanstack-table/angular] The provided symbol is not a component`,\n      )\n    }\n    this.mirror = mirror\n    for (const input of this.mirror.inputs) {\n      this.allowedInputNames.push(input.propName)\n    }\n    for (const output of this.mirror.outputs) {\n      this.allowedOutputNames.push(output.propName)\n    }\n  }\n}\n"
  },
  {
    "path": "packages/angular-table/src/flex-render/flexRenderComponentFactory.ts",
    "content": "import {\n  ChangeDetectorRef,\n  ComponentRef,\n  Injectable,\n  Injector,\n  KeyValueDiffer,\n  KeyValueDiffers,\n  OutputEmitterRef,\n  OutputRefSubscription,\n  ViewContainerRef,\n} from '@angular/core'\nimport { FlexRenderComponent } from './flexRenderComponent'\n\n@Injectable()\nexport class FlexRenderComponentFactory {\n  readonly #viewContainerRef: ViewContainerRef\n\n  constructor(viewContainerRef: ViewContainerRef) {\n    this.#viewContainerRef = viewContainerRef\n  }\n\n  createComponent<T>(\n    flexRenderComponent: FlexRenderComponent<T>,\n    componentInjector: Injector,\n  ): FlexRenderComponentRef<T> {\n    const componentRef = this.#viewContainerRef.createComponent(\n      flexRenderComponent.component,\n      {\n        injector: componentInjector,\n        directives: flexRenderComponent.directives,\n        bindings: flexRenderComponent.bindings ?? [],\n      },\n    )\n    const view = new FlexRenderComponentRef(\n      componentRef,\n      flexRenderComponent,\n      componentInjector,\n    )\n\n    const { inputs, outputs } = flexRenderComponent\n\n    if (inputs) view.setInputs(inputs)\n    if (outputs) view.setOutputs(outputs)\n\n    return view\n  }\n}\n\nexport class FlexRenderComponentRef<T> {\n  readonly #keyValueDiffersFactory: KeyValueDiffers\n  #componentData: FlexRenderComponent<T>\n  #inputValueDiffer: KeyValueDiffer<string, unknown>\n\n  readonly #outputRegistry: FlexRenderComponentOutputManager\n\n  constructor(\n    readonly componentRef: ComponentRef<T>,\n    componentData: FlexRenderComponent<T>,\n    readonly componentInjector: Injector,\n  ) {\n    this.#componentData = componentData\n    this.#keyValueDiffersFactory = componentInjector.get(KeyValueDiffers)\n\n    this.#outputRegistry = new FlexRenderComponentOutputManager(\n      this.#keyValueDiffersFactory,\n      this.outputs,\n    )\n\n    this.#inputValueDiffer = this.#keyValueDiffersFactory\n      .find(this.inputs)\n      .create()\n    this.#inputValueDiffer.diff(this.inputs)\n\n    this.componentRef.onDestroy(() => this.#outputRegistry.unsubscribeAll())\n  }\n\n  get component() {\n    return this.#componentData.component\n  }\n\n  get inputs() {\n    return this.#componentData.inputs ?? {}\n  }\n\n  get outputs() {\n    return this.#componentData.outputs ?? {}\n  }\n\n  /**\n   * Get component input and output diff by the given item\n   */\n  diff(item: FlexRenderComponent<T>) {\n    return {\n      inputDiff: this.#inputValueDiffer.diff(item.inputs ?? {}),\n      outputDiff: this.#outputRegistry.diff(item.outputs ?? {}),\n    }\n  }\n  /**\n   *\n   * @param compare Whether the current ref component instance is the same as the given one\n   */\n  eqType(compare: FlexRenderComponent<T>): boolean {\n    return compare.component === this.component\n  }\n\n  /**\n   * Tries to update current component refs input by the new given content component.\n   */\n  update(content: FlexRenderComponent<T>) {\n    const eq = this.eqType(content)\n    if (!eq) return\n    const { inputDiff, outputDiff } = this.diff(content)\n    if (inputDiff) {\n      inputDiff.forEachAddedItem((item) =>\n        this.setInput(item.key, item.currentValue),\n      )\n      inputDiff.forEachChangedItem((item) =>\n        this.setInput(item.key, item.currentValue),\n      )\n      inputDiff.forEachRemovedItem((item) => this.setInput(item.key, undefined))\n    }\n    if (outputDiff) {\n      outputDiff.forEachAddedItem((item) => {\n        this.setOutput(item.key, item.currentValue)\n      })\n      outputDiff.forEachChangedItem((item) => {\n        if (item.currentValue) {\n          this.#outputRegistry.setListener(item.key, item.currentValue)\n        } else {\n          this.#outputRegistry.unsubscribe(item.key)\n        }\n      })\n      outputDiff.forEachRemovedItem((item) => {\n        this.#outputRegistry.unsubscribe(item.key)\n      })\n    }\n\n    this.#componentData = content\n  }\n\n  markAsDirty(): void {\n    this.componentRef.injector.get(ChangeDetectorRef).markForCheck()\n  }\n\n  setInputs(inputs: Record<string, unknown>) {\n    for (const prop in inputs) {\n      this.setInput(prop, inputs[prop])\n    }\n  }\n\n  setInput(key: string, value: unknown) {\n    if (this.#componentData.allowedInputNames.includes(key)) {\n      this.componentRef.setInput(key, value)\n    }\n  }\n\n  setOutputs(\n    outputs: Record<\n      string,\n      OutputEmitterRef<unknown>['emit'] | null | undefined\n    >,\n  ) {\n    this.#outputRegistry.unsubscribeAll()\n    for (const prop in outputs) {\n      this.setOutput(prop, outputs[prop])\n    }\n  }\n\n  setOutput(\n    outputName: string,\n    emit: OutputEmitterRef<unknown>['emit'] | undefined | null,\n  ): void {\n    if (!this.#componentData.allowedOutputNames.includes(outputName)) return\n    if (!emit) {\n      this.#outputRegistry.unsubscribe(outputName)\n      return\n    }\n\n    const hasListener = this.#outputRegistry.hasListener(outputName)\n    this.#outputRegistry.setListener(outputName, emit)\n\n    if (hasListener) {\n      return\n    }\n\n    const instance = this.componentRef.instance\n    const output = instance[outputName as keyof typeof instance]\n    if (output && output instanceof OutputEmitterRef) {\n      output.subscribe((value) => {\n        this.#outputRegistry.getListener(outputName)?.(value)\n      })\n    }\n  }\n}\n\nclass FlexRenderComponentOutputManager {\n  readonly #outputSubscribers: Record<string, OutputRefSubscription> = {}\n  readonly #outputListeners: Record<string, (...args: Array<any>) => void> = {}\n\n  readonly #valueDiffer: KeyValueDiffer<\n    string,\n    undefined | null | OutputEmitterRef<unknown>['emit']\n  >\n\n  constructor(keyValueDiffers: KeyValueDiffers, initialOutputs: any) {\n    this.#valueDiffer = keyValueDiffers.find(initialOutputs).create()\n    if (initialOutputs) {\n      this.#valueDiffer.diff(initialOutputs)\n    }\n  }\n\n  hasListener(outputName: string) {\n    return outputName in this.#outputListeners\n  }\n\n  setListener(outputName: string, callback: (...args: Array<any>) => void) {\n    this.#outputListeners[outputName] = callback\n  }\n\n  getListener(outputName: string) {\n    return this.#outputListeners[outputName]\n  }\n\n  unsubscribeAll(): void {\n    for (const prop in this.#outputSubscribers) {\n      this.unsubscribe(prop)\n    }\n  }\n\n  unsubscribe(outputName: string) {\n    if (outputName in this.#outputSubscribers) {\n      this.#outputSubscribers[outputName]?.unsubscribe()\n      delete this.#outputSubscribers[outputName]\n      delete this.#outputListeners[outputName]\n    }\n  }\n\n  diff(outputs: Record<string, OutputEmitterRef<unknown>['emit'] | undefined>) {\n    return this.#valueDiffer.diff(outputs ?? {})\n  }\n}\n"
  },
  {
    "path": "packages/angular-table/src/flex-render/renderer.ts",
    "content": "import {\n  Injector,\n  computed,\n  effect,\n  runInInjectionContext,\n  untracked,\n} from '@angular/core'\nimport { TanStackTableToken } from '../helpers/table'\nimport { TanStackTableCellToken } from '../helpers/cell'\nimport { TanStackTableHeaderToken } from '../helpers/header'\nimport { FlexRenderComponentProps } from './context'\nimport { FlexRenderFlags } from './flags'\nimport {\n  FlexRenderComponentView,\n  FlexRenderTemplateView,\n  mapToFlexRenderTypedContent,\n} from './view'\nimport { flexRenderComponent } from './flexRenderComponent'\nimport { FlexRenderComponentFactory } from './flexRenderComponentFactory'\nimport type { FlexRenderComponent } from './flexRenderComponent'\nimport type {\n  EffectRef,\n  TemplateRef,\n  Type,\n  ViewContainerRef,\n} from '@angular/core'\nimport type { FlexRenderTypedContent, FlexRenderView } from './view'\nimport type {\n  CellContext,\n  CellData,\n  HeaderContext,\n  RowData,\n  TableFeatures,\n} from '@tanstack/table-core'\n\n/**\n * Content supported by the `flexRender` directive when declaring\n * a table column header/cell.\n */\nexport type FlexRenderContent<TProps extends NonNullable<unknown>> =\n  | string\n  | number\n  | Type<TProps>\n  | FlexRenderComponent<TProps>\n  | TemplateRef<{ $implicit: TProps }>\n  | null\n  | Record<any, any>\n  | undefined\n\n/**\n * Input content supported by the `flexRender` directives.\n */\nexport type FlexRenderInputContent<TProps extends NonNullable<unknown>> =\n  | number\n  | string\n  | ((props: TProps) => FlexRenderContent<TProps>)\n  | null\n  | undefined\n\n/**\n * Options used to create a {@link FlexViewRenderer}.\n *\n * This renderer is designed to be embedded inside a directive/component that owns the\n * `ViewContainerRef` and possibly a fallback `TemplateRef`.\n */\ninterface RendererViewOptions<TProps extends NonNullable<unknown>> {\n  /**\n   * Signal-like getter that returns the latest renderable content.\n   */\n  content: () => FlexRenderInputContent<TProps>\n  /**\n   * Signal-like getter returning the current props/context object.\n   */\n  props: () => NoInfer<TProps>\n  /**\n   * Getter returning the base injector to evaluate render functions in.\n   *\n   * If `content` is a function, it will be executed inside this injection context\n   * via `runInInjectionContext` so Angular DI works as expected.\n   */\n  injector: () => Injector\n  /**\n   * Container that will host the dynamically created view/component.\n   */\n  viewContainerRef: ViewContainerRef\n  /**\n   * Fallback template used for primitive rendering.\n   *\n   * The template is instantiated with `$implicit` set to the primitive string/number.\n   */\n  templateRef: TemplateRef<unknown>\n}\n\n/**\n * Internal view renderer used by Angular TanStack Table to implement `flexRender` directives.\n *\n * @internal Use FlexRender directives instead.\n */\nexport class FlexViewRenderer<\n  TFeatures extends TableFeatures,\n  TRowData extends RowData,\n  TValue extends CellData,\n  TProps extends\n    | NonNullable<unknown>\n    | CellContext<TFeatures, TRowData, TValue>\n    | HeaderContext<TFeatures, TRowData, TValue>,\n> {\n  #renderFlags = FlexRenderFlags.ViewFirstRender\n  #renderView: FlexRenderView<any> | null = null\n  #currentRenderEffectRef: EffectRef | null = null\n  #content: () => FlexRenderInputContent<TProps>\n  #props: () => TProps\n  #injector: () => Injector\n  #viewContainerRef: ViewContainerRef\n  #templateRef: TemplateRef<unknown>\n  #flexRenderComponentFactory: FlexRenderComponentFactory\n\n  readonly #getLatestContentValue = () => {\n    const content = this.#content()\n    const props = this.#props()\n    return typeof content !== 'function'\n      ? content\n      : runInInjectionContext(this.#injector(), () => content(props))\n  }\n\n  readonly #latestContent = computed(() => this.#getLatestContentValue())\n\n  #getContentValue = computed(() => {\n    const latestContent = this.#latestContent()\n    return mapToFlexRenderTypedContent(latestContent)\n  })\n\n  constructor(options: RendererViewOptions<TProps>) {\n    this.#content = options.content\n    this.#props = options.props\n    this.#injector = options.injector\n    this.#templateRef = options.templateRef\n    this.#viewContainerRef = options.viewContainerRef\n    this.#flexRenderComponentFactory = new FlexRenderComponentFactory(\n      this.#viewContainerRef,\n    )\n  }\n\n  mount(): EffectRef {\n    let previousContent: FlexRenderInputContent<TProps>\n    let previousProps: TProps\n\n    return effect(() => {\n      const props = this.#props()\n      const content = this.#content()\n\n      if (!(this.#renderFlags & FlexRenderFlags.ViewFirstRender)) {\n        if (previousContent !== content) {\n          this.#renderFlags |= FlexRenderFlags.ContentChanged\n        }\n        if (previousProps !== props) {\n          this.#renderFlags |= FlexRenderFlags.PropsReferenceChanged\n        }\n      }\n\n      untracked(() => this.#update())\n\n      if (FlexRenderFlags.ViewFirstRender & this.#renderFlags) {\n        this.#renderFlags &= ~FlexRenderFlags.ViewFirstRender\n      }\n\n      previousContent = content\n      previousProps = props\n    })\n  }\n\n  destroy(): void {\n    if (this.#currentRenderEffectRef) {\n      this.#currentRenderEffectRef.destroy()\n      this.#currentRenderEffectRef = null\n    }\n    if (this.#renderView) {\n      this.#renderView.unmount()\n      this.#renderView = null\n    }\n  }\n\n  #update() {\n    if (\n      this.#renderFlags &\n      (FlexRenderFlags.ContentChanged | FlexRenderFlags.ViewFirstRender)\n    ) {\n      this.#render()\n      return\n    }\n\n    if (this.#renderFlags & FlexRenderFlags.PropsReferenceChanged) {\n      if (this.#renderView) this.#renderView.updateProps(this.#props())\n      this.#renderFlags &= ~FlexRenderFlags.PropsReferenceChanged\n    }\n\n    if (this.#renderFlags & FlexRenderFlags.Dirty) {\n      if (this.#renderView) this.#renderView.dirtyCheck()\n      this.#renderFlags &= ~FlexRenderFlags.Dirty\n    }\n  }\n\n  #render() {\n    // When the view is recreated from scratch (content change or first render),\n    // we have to destroy the current effect listener since it will be recreated\n    // skipping the first call (FlexRenderFlags.RenderEffectChecked)\n    if (this.#shouldRecreateEntireView() && this.#currentRenderEffectRef) {\n      this.#currentRenderEffectRef.destroy()\n      this.#currentRenderEffectRef = null\n      this.#renderFlags &= ~FlexRenderFlags.RenderEffectChecked\n    }\n\n    this.#viewContainerRef.clear()\n    if (this.#renderView) {\n      this.#renderView.unmount()\n      this.#renderView = null\n    }\n\n    this.#renderFlags =\n      (this.#renderFlags & FlexRenderFlags.ViewFirstRender) |\n      (this.#renderFlags & FlexRenderFlags.RenderEffectChecked)\n\n    const resolvedContent = this.#getContentValue()\n    this.#renderView = this.#renderViewByContent(resolvedContent)\n    // If the content is a function `content(props)`, we initialize an effect\n    // to react to changes. If the current fn uses signals, we will set the DirtySignal flag\n    // to re-schedule the component updates\n    if (\n      !this.#currentRenderEffectRef &&\n      typeof untracked(this.#content) === 'function'\n    ) {\n      this.#currentRenderEffectRef = effect(\n        () => {\n          this.#latestContent()\n          if (!(this.#renderFlags & FlexRenderFlags.RenderEffectChecked)) {\n            this.#renderFlags |= FlexRenderFlags.RenderEffectChecked\n            return\n          }\n          this.#renderFlags |= FlexRenderFlags.Dirty\n          this.#doCheck()\n        },\n        { injector: this.#viewContainerRef.injector },\n      )\n    }\n  }\n\n  #shouldRecreateEntireView() {\n    return (\n      this.#renderFlags &\n      FlexRenderFlags.ContentChanged &\n      FlexRenderFlags.ViewFirstRender\n    )\n  }\n\n  #doCheck() {\n    const latestContent = this.#getContentValue()\n    if (latestContent.kind === 'null' || !this.#renderView) {\n      this.#renderFlags |= FlexRenderFlags.ContentChanged\n    } else {\n      this.#renderView.content = latestContent\n      const { kind: previousKind } = this.#renderView.previousContent\n      if (latestContent.kind !== previousKind) {\n        this.#renderFlags |= FlexRenderFlags.ContentChanged\n      }\n    }\n    this.#update()\n  }\n\n  #renderViewByContent(\n    content: FlexRenderTypedContent,\n  ): FlexRenderView<any> | null {\n    if (content.kind === 'primitive') {\n      return this.#renderStringContent(content)\n    } else if (content.kind === 'templateRef') {\n      return this.#renderTemplateRefContent(content)\n    } else if (content.kind === 'flexRenderComponent') {\n      return this.#renderComponent(content)\n    } else if (content.kind === 'component') {\n      return this.#renderCustomComponent(content)\n    } else {\n      return null\n    }\n  }\n\n  #renderStringContent(\n    template: Extract<FlexRenderTypedContent, { kind: 'primitive' }>,\n  ): FlexRenderTemplateView {\n    const context = () => {\n      const content = this.#content()\n      return typeof content === 'string' || typeof content === 'number'\n        ? content\n        : runInInjectionContext(this.#injector(), () =>\n            content?.(this.#props()),\n          )\n    }\n    const ref = this.#viewContainerRef.createEmbeddedView(this.#templateRef, {\n      get $implicit() {\n        return context()\n      },\n    })\n    return new FlexRenderTemplateView(template, ref)\n  }\n\n  #renderTemplateRefContent(\n    template: Extract<FlexRenderTypedContent, { kind: 'templateRef' }>,\n  ): FlexRenderTemplateView {\n    const latestContext = () => this.#props()\n    const view = this.#viewContainerRef.createEmbeddedView(\n      template.content,\n      {\n        get $implicit() {\n          return latestContext()\n        },\n      },\n      { injector: this.#getInjector() },\n    )\n    return new FlexRenderTemplateView(template, view)\n  }\n\n  #renderComponent(\n    flexRenderComponent: Extract<\n      FlexRenderTypedContent,\n      { kind: 'flexRenderComponent' }\n    >,\n  ): FlexRenderComponentView {\n    const { injector } = flexRenderComponent.content\n    const componentInjector = this.#getInjector(injector)\n    const view = this.#flexRenderComponentFactory.createComponent(\n      flexRenderComponent.content,\n      componentInjector,\n    )\n    return new FlexRenderComponentView(flexRenderComponent, view)\n  }\n\n  #renderCustomComponent(\n    component: Extract<FlexRenderTypedContent, { kind: 'component' }>,\n  ): FlexRenderComponentView {\n    const instance = flexRenderComponent(component.content, {\n      inputs: this.#props(),\n    })\n    const injector = this.#getInjector(instance.injector)\n    const view = this.#flexRenderComponentFactory.createComponent(\n      instance,\n      injector,\n    )\n    return new FlexRenderComponentView(component, view)\n  }\n\n  #getInjector(parentInjector?: Injector) {\n    const getContext = () => this.#props()\n    const proxy = new Proxy(this.#props(), {\n      get: (_, key) => getContext()[key as keyof typeof _],\n    })\n\n    const staticProviders = []\n    if ('table' in proxy) {\n      staticProviders.push({\n        provide: TanStackTableToken,\n        useValue: () => proxy.table,\n      })\n    }\n    if ('cell' in proxy) {\n      staticProviders.push({\n        provide: TanStackTableCellToken,\n        useValue: () => proxy.cell,\n      })\n    }\n    if ('header' in proxy) {\n      staticProviders.push({\n        provide: TanStackTableHeaderToken,\n        useValue: () => proxy.header,\n      })\n    }\n\n    return Injector.create({\n      parent: parentInjector ?? this.#injector(),\n      providers: [\n        ...staticProviders,\n        { provide: FlexRenderComponentProps, useValue: proxy },\n      ],\n    })\n  }\n}\n"
  },
  {
    "path": "packages/angular-table/src/flex-render/view.ts",
    "content": "import { TemplateRef, Type } from '@angular/core'\nimport { FlexRenderComponentInstance } from './flexRenderComponent'\nimport type { FlexRenderComponent } from './flexRenderComponent'\nimport type { FlexRenderContent } from './renderer'\nimport type { EmbeddedViewRef } from '@angular/core'\nimport type { FlexRenderComponentRef } from './flexRenderComponentFactory'\n\nexport type FlexRenderTypedContent =\n  | { kind: 'null' }\n  | {\n      kind: 'primitive'\n      content: string | number | Record<string, any>\n    }\n  | { kind: 'flexRenderComponent'; content: FlexRenderComponent<unknown> }\n  | { kind: 'templateRef'; content: TemplateRef<unknown> }\n  | { kind: 'component'; content: Type<unknown> }\n\nexport function mapToFlexRenderTypedContent(\n  content: FlexRenderContent<any>,\n): FlexRenderTypedContent {\n  if (content === null || content === undefined) {\n    return { kind: 'null' }\n  }\n  if (typeof content === 'string' || typeof content === 'number') {\n    return { kind: 'primitive', content }\n  }\n  if (content instanceof FlexRenderComponentInstance) {\n    return { kind: 'flexRenderComponent', content }\n  } else if (content instanceof TemplateRef) {\n    return { kind: 'templateRef', content }\n  } else if (content instanceof Type) {\n    return { kind: 'component', content }\n  } else {\n    return { kind: 'primitive', content }\n  }\n}\n\nexport abstract class FlexRenderView<\n  TView extends FlexRenderComponentRef<any> | EmbeddedViewRef<unknown> | null,\n> {\n  readonly view: TView\n  #previousContent: FlexRenderTypedContent | undefined\n  #content: FlexRenderTypedContent\n\n  protected constructor(\n    initialContent: Exclude<FlexRenderTypedContent, { kind: 'null' }>,\n    view: TView,\n  ) {\n    this.#content = initialContent\n    this.view = view\n  }\n\n  get previousContent(): FlexRenderTypedContent {\n    return this.#previousContent ?? { kind: 'null' }\n  }\n\n  get content() {\n    return this.#content\n  }\n\n  set content(content: FlexRenderTypedContent) {\n    this.#previousContent = this.#content\n    this.#content = content\n  }\n\n  abstract updateProps(props: Record<string, any>): void\n\n  abstract dirtyCheck(): void\n\n  abstract onDestroy(callback: Function): void\n\n  abstract unmount(): void\n}\n\nexport class FlexRenderTemplateView extends FlexRenderView<\n  EmbeddedViewRef<unknown>\n> {\n  constructor(\n    initialContent: Extract<\n      FlexRenderTypedContent,\n      { kind: 'primitive' | 'templateRef' }\n    >,\n    view: EmbeddedViewRef<unknown>,\n  ) {\n    super(initialContent, view)\n  }\n\n  override updateProps(props: Record<string, any>) {\n    this.view.markForCheck()\n  }\n\n  override dirtyCheck() {\n    // Basically a no-op. When the view is created via EmbeddedViewRef, we don't need to do any manual update\n    // since this type of content has a proxy as a context, then every time the root component is checked for changes,\n    // the property getter will be re-evaluated.\n    //\n    // If in a future we need to manually mark the view as dirty, just uncomment next line\n    // this.view.markForCheck()\n  }\n\n  override unmount() {\n    this.view.destroy()\n  }\n\n  override onDestroy(callback: Function) {\n    this.view.onDestroy(callback)\n  }\n}\n\nexport class FlexRenderComponentView extends FlexRenderView<\n  FlexRenderComponentRef<unknown>\n> {\n  constructor(\n    initialContent: Extract<\n      FlexRenderTypedContent,\n      { kind: 'component' | 'flexRenderComponent' }\n    >,\n    view: FlexRenderComponentRef<unknown>,\n  ) {\n    super(initialContent, view)\n  }\n\n  override updateProps(props: Record<string, any>) {\n    switch (this.content.kind) {\n      case 'component': {\n        this.view.setInputs(props)\n        break\n      }\n      case 'flexRenderComponent': {\n        // No-op. When FlexRenderFlags.PropsReferenceChanged is set,\n        // FlexRenderComponent will be updated into `dirtyCheck`.\n        break\n      }\n    }\n  }\n\n  override dirtyCheck() {\n    switch (this.content.kind) {\n      case 'component': {\n        // Component context is currently valuated with the cell context. Since it's reference\n        // shouldn't change, we force mark the component as dirty in order to re-evaluate function invocation in view.\n        // NOTE: this should behave like having a component with ChangeDetectionStrategy.Default\n        this.view.markAsDirty()\n        break\n      }\n      case 'flexRenderComponent': {\n        // Given context instance will always have a different reference than the previous one,\n        // so instead of recreating the entire view, we will only update the current view\n        if (this.view.eqType(this.content.content)) {\n          this.view.update(this.content.content)\n        }\n        this.view.markAsDirty()\n        break\n      }\n    }\n  }\n\n  override unmount() {\n    this.view.componentRef.destroy()\n  }\n\n  override onDestroy(callback: Function) {\n    this.view.componentRef.onDestroy(callback)\n  }\n}\n"
  },
  {
    "path": "packages/angular-table/src/flexRender.ts",
    "content": "import {\n  DestroyRef,\n  Directive,\n  Injector,\n  InputSignal,\n  TemplateRef,\n  ViewContainerRef,\n  inject,\n  input,\n} from '@angular/core'\nimport {\n  FlexRenderInputContent,\n  FlexViewRenderer,\n} from './flex-render/renderer'\nimport type {\n  CellContext,\n  CellData,\n  HeaderContext,\n  RowData,\n  TableFeatures,\n} from '@tanstack/table-core'\n\nexport {\n  injectFlexRenderContext,\n  type FlexRenderComponentProps,\n} from './flex-render/context'\n\nexport type {\n  FlexRenderInputContent,\n  FlexRenderContent,\n} from './flex-render/renderer'\n\n/**\n * Use this utility directive to render headers, cells, or footers with custom markup.\n *\n * Note: If you are rendering cell, header, or footer without custom context or other props,\n * you can use the {@link FlexRenderCell} directive as shorthand instead .\n *\n * @example\n * ```ts\n * import {FlexRender} from '@tanstack/angular-table';\n *\n * @Component({\n *   imports: [FlexRender],\n *   template: `\n *      <td\n *        *flexRender=\"\n *          cell.column.columnDef.cell;\n *          props: cell.getContext();\n *          let cell\"\n *      >\n *        {{cell}}\n *      </td>\n *\n *      <th\n *        *flexRender=\"\n *          header.column.columnDef.header;\n *          props: header.getContext();\n *          let header\"\n *        >\n *        {{header}}\n *      </td>\n *\n *      <td\n *        *flexRender=\"\n *          footer.column.columnDef.footer;\n *          props: footer.getContext();\n *          let footer\"\n *      >\n *        {{footer}}\n *      </td>\n *   `,\n * })\n * class App {\n * }\n * ```\n *\n * Can be imported through {@link FlexRenderDirective} or {@link FlexRender} import,\n * which the latter is preferred.\n */\n@Directive({\n  selector: 'ng-template[flexRender]',\n})\nexport class FlexRenderDirective<\n  TFeatures extends TableFeatures,\n  TRowData extends RowData,\n  TValue extends CellData,\n  TProps extends\n    | NonNullable<unknown>\n    | CellContext<TFeatures, TRowData, TValue>\n    | HeaderContext<TFeatures, TRowData, TValue>,\n> {\n  readonly content: InputSignal<FlexRenderInputContent<TProps>> = input(\n    undefined as FlexRenderInputContent<TProps>,\n    { alias: 'flexRender' },\n  )\n\n  readonly props = input<TProps>({} as TProps, {\n    alias: 'flexRenderProps',\n  })\n\n  readonly injector = input(inject(Injector), {\n    alias: 'flexRenderInjector',\n  })\n\n  readonly #viewContainerRef = inject(ViewContainerRef)\n  readonly #templateRef = inject(TemplateRef)\n\n  constructor() {\n    const renderer = new FlexViewRenderer({\n      content: this.content,\n      props: this.props,\n      injector: this.injector,\n      templateRef: this.#templateRef,\n      viewContainerRef: this.#viewContainerRef,\n    })\n\n    renderer.mount()\n\n    inject(DestroyRef).onDestroy(() => {\n      renderer.destroy()\n    })\n  }\n}\n"
  },
  {
    "path": "packages/angular-table/src/helpers/cell.ts",
    "content": "import { Directive, InjectionToken, inject, input } from '@angular/core'\nimport { Cell, CellData, RowData, TableFeatures } from '@tanstack/table-core'\nimport type { Signal } from '@angular/core'\n\n/**\n * DI context shape for a TanStack Table cell.\n *\n * This exists to make the current `Cell` injectable by any nested component/directive\n * without having to pass it through inputs/props manually.\n */\nexport interface TanStackTableCellContext<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData,\n> {\n  /** Signal that returns the current cell instance. */\n  cell: Signal<Cell<TFeatures, TData, TValue>>\n}\n\n/**\n * Injection token that provides access to the current cell.\n *\n * This token is provided by the {@link TanStackTableCell} directive.\n */\nexport const TanStackTableCellToken = new InjectionToken<\n  TanStackTableCellContext<any, any, any>['cell']\n>('[TanStack Table] CellContext')\n\n/**\n * Provides a TanStack Table `Cell` instance in Angular DI.\n *\n * The cell can be injected by:\n * - any descendant of an element using `[tanStackTableCell]=\"...\"`\n * - any component instantiated by `*flexRender` when the render props contains `cell`\n *\n * @example\n * Inject from the nearest `[tanStackTableCell]`:\n * ```html\n * <td [tanStackTableCell]=\"cell\">\n *   <app-cell-actions />\n * </td>\n * ```\n *\n * ```ts\n * @Component({\n *   selector: 'app-cell-actions',\n *   template: `{{ cell().id }}`,\n * })\n * export class CellActionsComponent {\n *   readonly cell = injectTableCellContext()\n * }\n * ```\n *\n * @example\n * Inject inside a component rendered via `flexRender`:\n * ```ts\n * @Component({\n *   selector: 'app-price-cell',\n *   template: `{{ cell().getValue() }}`,\n * })\n * export class PriceCellComponent {\n *   readonly cell = injectTableCellContext()\n * }\n * ```\n */\n@Directive({\n  selector: '[tanStackTableCell]',\n  exportAs: 'cell',\n  providers: [\n    {\n      provide: TanStackTableCellToken,\n      useFactory: () => inject(TanStackTableCell).cell,\n    },\n  ],\n})\nexport class TanStackTableCell<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData,\n> implements TanStackTableCellContext<TFeatures, TData, TValue> {\n  /**\n   * The current TanStack Table cell.\n   *\n   * Provided as a required signal input so DI consumers always read the latest value.\n   */\n  readonly cell = input.required<Cell<TFeatures, TData, TValue>>({\n    alias: 'tanStackTableCell',\n  })\n}\n\n/**\n * Injects the current TanStack Table cell signal.\n *\n * Available when:\n * - there is a nearest `[tanStackTableCell]` directive in the DI tree, or\n * - the caller is rendered via `*flexRender` with render props containing `cell`\n */\nexport function injectTableCellContext<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData,\n>(): TanStackTableCellContext<TFeatures, TData, TValue>['cell'] {\n  return inject(TanStackTableCellToken)\n}\n"
  },
  {
    "path": "packages/angular-table/src/helpers/createTableHook.ts",
    "content": "import { createColumnHelper as coreCreateColumnHelper } from '@tanstack/table-core'\nimport { injectTable } from '../injectTable'\nimport { injectFlexRenderContext } from '../flexRender'\nimport { injectTableHeaderContext as _injectTableHeaderContext } from './header'\nimport { injectTableContext as _injectTableContext } from './table'\nimport { injectTableCellContext as _injectTableCellContext } from './cell'\nimport type { FlexRenderContent } from '../flexRender'\nimport type { AngularTable } from '../injectTable'\nimport type {\n  AccessorFn,\n  AccessorFnColumnDef,\n  AccessorKeyColumnDef,\n  Cell,\n  CellContext,\n  CellData,\n  Column,\n  ColumnDef,\n  DeepKeys,\n  DeepValue,\n  DisplayColumnDef,\n  GroupColumnDef,\n  Header,\n  HeaderContext,\n  IdentifiedColumnDef,\n  Row,\n  RowData,\n  Table,\n  TableFeature,\n  TableFeatures,\n  TableOptions,\n  TableState,\n} from '@tanstack/table-core'\nimport type { Signal, Type } from '@angular/core'\n\ntype RenderableComponent =\n  | Type<any>\n  | (<T extends NonNullable<unknown>>(props: T) => FlexRenderContent<T>)\n\n// =============================================================================\n// Enhanced Context Types with Pre-bound Components\n// =============================================================================\n\n/**\n * Enhanced CellContext with pre-bound cell components.\n * The `cell` property includes the registered cellComponents.\n */\nexport type AppCellContext<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData,\n  TCellComponents extends Record<string, RenderableComponent>,\n> = {\n  cell: Cell<TFeatures, TData, TValue> &\n    TCellComponents & { FlexRender: () => unknown }\n  column: Column<TFeatures, TData, TValue>\n  getValue: CellContext<TFeatures, TData, TValue>['getValue']\n  renderValue: CellContext<TFeatures, TData, TValue>['renderValue']\n  row: Row<TFeatures, TData>\n  table: Table<TFeatures, TData>\n}\n\n/**\n * Enhanced HeaderContext with pre-bound header components.\n * The `header` property includes the registered headerComponents.\n */\nexport type AppHeaderContext<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData,\n  THeaderComponents extends Record<string, RenderableComponent>,\n> = {\n  column: Column<TFeatures, TData, TValue>\n  header: Header<TFeatures, TData, TValue> &\n    THeaderComponents & { FlexRender: () => unknown }\n  table: Table<TFeatures, TData>\n}\n\n// =============================================================================\n// Enhanced Column Definition Types\n// =============================================================================\n\n/**\n * Template type for column definitions that can be a string or a function.\n */\ntype AppColumnDefTemplate<TProps extends object> =\n  | string\n  | ((props: TProps) => any)\n\n/**\n * Enhanced column definition base with pre-bound components in cell/header/footer contexts.\n */\ntype AppColumnDefBase<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData,\n  TCellComponents extends Record<string, RenderableComponent>,\n  THeaderComponents extends Record<string, RenderableComponent>,\n> = Omit<\n  IdentifiedColumnDef<TFeatures, TData, TValue>,\n  'cell' | 'header' | 'footer'\n> & {\n  cell?: AppColumnDefTemplate<\n    AppCellContext<TFeatures, TData, TValue, TCellComponents>\n  >\n  header?: AppColumnDefTemplate<\n    AppHeaderContext<TFeatures, TData, TValue, THeaderComponents>\n  >\n  footer?: AppColumnDefTemplate<\n    AppHeaderContext<TFeatures, TData, TValue, THeaderComponents>\n  >\n}\n\n/**\n * Enhanced display column definition with pre-bound components.\n */\ntype AppDisplayColumnDef<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TCellComponents extends Record<string, RenderableComponent>,\n  THeaderComponents extends Record<string, RenderableComponent>,\n> = Omit<\n  DisplayColumnDef<TFeatures, TData, unknown>,\n  'cell' | 'header' | 'footer'\n> & {\n  cell?: AppColumnDefTemplate<\n    AppCellContext<TFeatures, TData, unknown, TCellComponents>\n  >\n  header?: AppColumnDefTemplate<\n    AppHeaderContext<TFeatures, TData, unknown, THeaderComponents>\n  >\n  footer?: AppColumnDefTemplate<\n    AppHeaderContext<TFeatures, TData, unknown, THeaderComponents>\n  >\n}\n\n/**\n * Enhanced group column definition with pre-bound components.\n */\ntype AppGroupColumnDef<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TCellComponents extends Record<string, RenderableComponent>,\n  THeaderComponents extends Record<string, RenderableComponent>,\n> = Omit<\n  GroupColumnDef<TFeatures, TData, unknown>,\n  'cell' | 'header' | 'footer' | 'columns'\n> & {\n  cell?: AppColumnDefTemplate<\n    AppCellContext<TFeatures, TData, unknown, TCellComponents>\n  >\n  header?: AppColumnDefTemplate<\n    AppHeaderContext<TFeatures, TData, unknown, THeaderComponents>\n  >\n  footer?: AppColumnDefTemplate<\n    AppHeaderContext<TFeatures, TData, unknown, THeaderComponents>\n  >\n  columns?: ReadonlyArray<ColumnDef<TFeatures, TData, unknown>>\n}\n\n// =============================================================================\n// Enhanced Column Helper Type\n// =============================================================================\n\n/**\n * Enhanced column helper with pre-bound components in cell/header/footer contexts.\n * This enables TypeScript to know about the registered components when defining columns.\n */\nexport type AppColumnHelper<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TCellComponents extends Record<string, RenderableComponent>,\n  THeaderComponents extends Record<string, RenderableComponent>,\n> = {\n  /**\n   * Creates a data column definition with an accessor key or function.\n   * The cell, header, and footer contexts include pre-bound components.\n   */\n  accessor: <\n    TAccessor extends AccessorFn<TData> | DeepKeys<TData>,\n    TValue extends TAccessor extends AccessorFn<TData, infer TReturn>\n      ? TReturn\n      : TAccessor extends DeepKeys<TData>\n        ? DeepValue<TData, TAccessor>\n        : never,\n  >(\n    accessor: TAccessor,\n    column: TAccessor extends AccessorFn<TData>\n      ? AppColumnDefBase<\n          TFeatures,\n          TData,\n          TValue,\n          TCellComponents,\n          THeaderComponents\n        > & { id: string }\n      : AppColumnDefBase<\n          TFeatures,\n          TData,\n          TValue,\n          TCellComponents,\n          THeaderComponents\n        >,\n  ) => TAccessor extends AccessorFn<TData>\n    ? AccessorFnColumnDef<TFeatures, TData, TValue>\n    : AccessorKeyColumnDef<TFeatures, TData, TValue>\n\n  /**\n   * Wraps an array of column definitions to preserve each column's individual TValue type.\n   */\n  columns: <TColumns extends ReadonlyArray<ColumnDef<TFeatures, TData, any>>>(\n    columns: [...TColumns],\n  ) => Array<ColumnDef<TFeatures, TData, any>> & [...TColumns]\n\n  /**\n   * Creates a display column definition for non-data columns.\n   * The cell, header, and footer contexts include pre-bound components.\n   */\n  display: (\n    column: AppDisplayColumnDef<\n      TFeatures,\n      TData,\n      TCellComponents,\n      THeaderComponents\n    >,\n  ) => DisplayColumnDef<TFeatures, TData, unknown>\n\n  /**\n   * Creates a group column definition with nested child columns.\n   * The cell, header, and footer contexts include pre-bound components.\n   */\n  group: (\n    column: AppGroupColumnDef<\n      TFeatures,\n      TData,\n      TCellComponents,\n      THeaderComponents\n    >,\n  ) => GroupColumnDef<TFeatures, TData, unknown>\n}\n\n/**\n * Extended table API returned by useAppTable with all App wrapper components\n */\nexport type AppAngularTable<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TSelected,\n  TTableComponents extends Record<string, RenderableComponent>,\n  TCellComponents extends Record<string, RenderableComponent>,\n  THeaderComponents extends Record<string, RenderableComponent>,\n> = AngularTable<TFeatures, TData, TSelected> &\n  NoInfer<TTableComponents> & {\n    appCell: <TValue>(\n      cell: Cell<TFeatures, TData, TValue>,\n    ) => Cell<TFeatures, TData, TValue> & NoInfer<TCellComponents>\n\n    appHeader: <TValue>(\n      header: Header<TFeatures, TData, TValue>,\n    ) => Header<TFeatures, TData, TValue> & NoInfer<THeaderComponents>\n\n    appFooter: <TValue>(\n      footer: Header<TFeatures, TData, TValue>,\n    ) => Header<TFeatures, TData, TValue> & NoInfer<THeaderComponents>\n  }\n\n// =============================================================================\n// CreateTableHook Options and Props\n// =============================================================================\n\n/**\n * Options for creating a table hook with pre-bound components and default table options.\n * Extends all TableOptions except 'columns' | 'data' | 'store' | 'state' | 'initialState'.\n */\nexport type CreateTableContextOptions<\n  TFeatures extends TableFeatures,\n  TTableComponents extends Record<string, RenderableComponent>,\n  TCellComponents extends Record<string, RenderableComponent>,\n  THeaderComponents extends Record<string, RenderableComponent>,\n> = Omit<\n  TableOptions<TFeatures, any>,\n  'columns' | 'data' | 'store' | 'state' | 'initialState'\n> & {\n  /**\n   * Table-level components that need access to the table instance.\n   * These are available directly on the table object returned by useAppTable.\n   * Use `useTableContext()` inside these components.\n   * @example { PaginationControls, GlobalFilter, RowCount }\n   */\n  tableComponents?: TTableComponents\n  /**\n   * Cell-level components that need access to the cell instance.\n   * These are available on the cell object passed to AppCell's children.\n   * Use `useCellContext()` inside these components.\n   * @example { TextCell, NumberCell, DateCell, CurrencyCell }\n   */\n  cellComponents?: TCellComponents\n  /**\n   * Header-level components that need access to the header instance.\n   * These are available on the header object passed to AppHeader/AppFooter's children.\n   * Use `useHeaderContext()` inside these components.\n   * @example { SortIndicator, ColumnFilter, ResizeHandle }\n   */\n  headerComponents?: THeaderComponents\n}\n\nexport type CreateTableHookResult<\n  TFeatures extends TableFeatures,\n  TTableComponents extends Record<string, RenderableComponent>,\n  TCellComponents extends Record<string, RenderableComponent>,\n  THeaderComponents extends Record<string, RenderableComponent>,\n> = {\n  createAppColumnHelper: <TData extends RowData>() => AppColumnHelper<\n    TFeatures,\n    TData,\n    TCellComponents,\n    THeaderComponents\n  >\n  injectTableContext: <TData extends RowData = RowData>() => Signal<\n    AngularTable<TFeatures, TData>\n  >\n  injectTableHeaderContext: <\n    TValue extends CellData = CellData,\n    TRowData extends RowData = RowData,\n  >() => Signal<Header<TFeatures, TRowData, TValue>>\n  injectTableCellContext: <\n    TValue extends CellData = CellData,\n    TRowData extends RowData = RowData,\n  >() => Signal<Cell<TFeatures, TRowData, TValue>>\n  injectFlexRenderHeaderContext: <\n    TData extends RowData,\n    TValue extends CellData,\n  >() => HeaderContext<TFeatures, TData, TValue>\n  injectFlexRenderCellContext: <\n    TData extends RowData,\n    TValue extends CellData,\n  >() => CellContext<TFeatures, TData, TValue>\n  injectAppTable: <TData extends RowData, TSelected = TableState<TFeatures>>(\n    tableOptions: () => Omit<\n      TableOptions<TFeatures, TData>,\n      '_features' | '_rowModels'\n    >,\n    selector?: (state: TableState<TFeatures>) => TSelected,\n  ) => AppAngularTable<\n    TFeatures,\n    TData,\n    TSelected,\n    TTableComponents,\n    TCellComponents,\n    THeaderComponents\n  >\n}\n\nexport function createTableHook<\n  TFeatures extends TableFeatures,\n  const TTableComponents extends Record<string, RenderableComponent>,\n  const TCellComponents extends Record<string, RenderableComponent>,\n  const THeaderComponents extends Record<string, RenderableComponent>,\n>({\n  tableComponents,\n  cellComponents,\n  headerComponents,\n  ...defaultTableOptions\n}: CreateTableContextOptions<\n  TFeatures,\n  TTableComponents,\n  TCellComponents,\n  THeaderComponents\n>): CreateTableHookResult<\n  TFeatures,\n  TTableComponents,\n  TCellComponents,\n  THeaderComponents\n> {\n  function injectTableContext<TData extends RowData = RowData>(): Signal<\n    AngularTable<TFeatures, TData>\n  > {\n    return _injectTableContext<TFeatures, TData>()\n  }\n\n  function injectTableHeaderContext<\n    TValue extends CellData = CellData,\n    TRowData extends RowData = RowData,\n  >(): Signal<Header<TFeatures, TRowData, TValue>> {\n    return _injectTableHeaderContext<TFeatures, TRowData, TValue>()\n  }\n\n  function injectTableCellContext<\n    TValue extends CellData = CellData,\n    TRowData extends RowData = RowData,\n  >(): Signal<Cell<TFeatures, TRowData, TValue>> {\n    return _injectTableCellContext<TFeatures, TRowData, TValue>()\n  }\n\n  function injectFlexRenderHeaderContext<\n    TData extends RowData,\n    TValue extends CellData,\n  >(): HeaderContext<TFeatures, TData, TValue> {\n    return injectFlexRenderContext<HeaderContext<TFeatures, TData, TValue>>()\n  }\n\n  function injectFlexRenderCellContext<\n    TData extends RowData,\n    TValue extends CellData,\n  >(): CellContext<TFeatures, TData, TValue> {\n    return injectFlexRenderContext<CellContext<TFeatures, TData, TValue>>()\n  }\n\n  function injectAppTable<TData extends RowData, TSelected = {}>(\n    tableOptions: () => Omit<\n      TableOptions<TFeatures, TData>,\n      '_features' | '_rowModels'\n    >,\n    selector?: (state: TableState<TFeatures>) => TSelected,\n  ): AppAngularTable<\n    TFeatures,\n    TData,\n    TSelected,\n    TTableComponents,\n    TCellComponents,\n    THeaderComponents\n  > {\n    function appCell(cell: Cell<TFeatures, TData, any>) {\n      return cell as Cell<TFeatures, TData, any> & TCellComponents\n    }\n\n    function appHeader(header: Header<TFeatures, TData, any>) {\n      return header as Header<TFeatures, TData, any> & THeaderComponents\n    }\n\n    function appFooter(footer: Header<TFeatures, TData, any>) {\n      return footer as Header<TFeatures, TData, any> & THeaderComponents\n    }\n\n    const appTableFeatures: TableFeature<{}> = {\n      constructTableAPIs: (table) => {\n        Object.assign(table, tableComponents, { appCell, appHeader, appFooter })\n      },\n      assignCellPrototype(prototype) {\n        Object.assign(prototype, cellComponents)\n      },\n      assignHeaderPrototype(prototype) {\n        Object.assign(prototype, headerComponents)\n      },\n    }\n\n    return injectTable<TFeatures, TData, TSelected>(() => {\n      const options = {\n        ...defaultTableOptions,\n        ...tableOptions(),\n      } as TableOptions<TFeatures, TData>\n      options._features = { ...options._features, appTableFeatures }\n      return options\n    }, selector) as AngularTable<any, any>\n  }\n\n  function createAppColumnHelper<TData extends RowData>(): AppColumnHelper<\n    TFeatures,\n    TData,\n    TCellComponents,\n    THeaderComponents\n  > {\n    // The runtime implementation is the same - components are attached at render time\n    // This cast provides the enhanced types for column definitions\n    return coreCreateColumnHelper<TFeatures, TData>() as AppColumnHelper<\n      TFeatures,\n      TData,\n      TCellComponents,\n      THeaderComponents\n    >\n  }\n\n  return {\n    createAppColumnHelper,\n    injectTableContext,\n    injectTableHeaderContext,\n    injectTableCellContext,\n    injectFlexRenderHeaderContext,\n    injectFlexRenderCellContext,\n    injectAppTable,\n  }\n}\n"
  },
  {
    "path": "packages/angular-table/src/helpers/flexRenderCell.ts",
    "content": "import {\n  DestroyRef,\n  Directive,\n  Injector,\n  TemplateRef,\n  ViewContainerRef,\n  computed,\n  inject,\n  input,\n} from '@angular/core'\nimport {\n  Cell,\n  CellData,\n  Header,\n  RowData,\n  TableFeatures,\n} from '@tanstack/table-core'\nimport { FlexViewRenderer } from '../flex-render/renderer'\nimport type { FlexRenderInputContent } from '../flex-render/renderer'\nimport type { CellContext, HeaderContext } from '@tanstack/table-core'\n\n/**\n * Simplified directive wrapper of `*flexRender`.\n *\n * Use this utility component to render headers, cells, or footers with custom markup.\n *\n * Only one prop (`cell`, `header`, or `footer`) may be passed based on the used selector.\n *\n * @example\n * ```html\n * <td *flexRenderCell=\"cell; let cell\">{{cell}}</td>\n * <th *flexRenderHeader=\"header; let header\">{{header}}</th>\n * <th *flexRenderFooter=\"footer; let footer\">{{footer}}</th>\n * ```\n *\n * This replaces calling `*flexRender` directly like this:\n * ```html\n * <td *flexRender=\"cell.column.columnDef.cell; props: cell.getContext(); let cell\">{{cell}}</td>\n * <td *flexRender=\"header.column.columnDef.header; props: header.getContext(); let header\">{{header}}</td>\n * <td *flexRender=\"footer.column.columnDef.footer; props: footer.getContext(); let footer\">{{footer}}</td>\n * ```\n *\n * Can be imported through {@link FlexRenderCell} or {@link FlexRender} import,\n * which the latter is preferred.\n *\n * @example\n * ```ts\n * import {FlexRender} from '@tanstack/angular-table\n *\n * @Component({\n *  // ...\n *  imports: [\n *    FlexRender\n *  ]\n * })\n * ```\n */\n@Directive({\n  selector:\n    'ng-template[flexRenderCell], ng-template[flexRenderFooter], ng-template[flexRenderHeader]',\n})\nexport class FlexRenderCell<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData,\n> {\n  readonly cell = input<Cell<TFeatures, TData, TValue>>(undefined, {\n    alias: 'flexRenderCell',\n  })\n\n  readonly header = input<Header<TFeatures, TData, TValue>>(undefined, {\n    alias: 'flexRenderHeader',\n  })\n\n  readonly footer = input<Header<TFeatures, TData, TValue>>(undefined, {\n    alias: 'flexRenderFooter',\n  })\n\n  readonly #renderData = computed<\n    | [\n        content: FlexRenderInputContent<CellContext<TFeatures, TData, TValue>>,\n        props: CellContext<TFeatures, TData, TValue>,\n      ]\n    | [\n        content: FlexRenderInputContent<\n          HeaderContext<TFeatures, TData, TValue>\n        >,\n        props: HeaderContext<TFeatures, TData, TValue>,\n      ]\n    | [content: null, props: null]\n  >(\n    () => {\n      const cell = this.cell()\n      const header = this.header()\n      const footer = this.footer()\n      if (cell) {\n        return [cell.column.columnDef.cell, cell.getContext()]\n      }\n      if (header) {\n        return [header.column.columnDef.header, header.getContext()]\n      }\n      if (footer) {\n        return [footer.column.columnDef.footer, footer.getContext()]\n      }\n      return [null, null]\n    },\n    {\n      equal: (a, b) => {\n        return a[0] === b[0] && a[1] === b[1]\n      },\n    },\n  )\n\n  readonly #injector = inject(Injector)\n  readonly #templateRef = inject(TemplateRef)\n  readonly #viewContainerRef = inject(ViewContainerRef)\n\n  constructor() {\n    const content = computed(() => this.#renderData()[0])\n    const props = computed(() => this.#renderData()[1])\n\n    const renderer = new FlexViewRenderer<TFeatures, TData, TValue, any>({\n      content: content,\n      props: props,\n      injector: () => this.#injector,\n      templateRef: this.#templateRef,\n      viewContainerRef: this.#viewContainerRef,\n    })\n\n    renderer.mount()\n\n    inject(DestroyRef).onDestroy(() => {\n      renderer.destroy()\n    })\n  }\n}\n"
  },
  {
    "path": "packages/angular-table/src/helpers/header.ts",
    "content": "import { Directive, InjectionToken, inject, input } from '@angular/core'\nimport { CellData, Header, RowData, TableFeatures } from '@tanstack/table-core'\nimport type { Signal } from '@angular/core'\n\n/**\n * DI context shape for a TanStack Table header.\n *\n * This exists to make the current `Header` injectable by any nested component/directive\n * without passing it through inputs/props.\n */\nexport interface TanStackTableHeaderContext<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData,\n> {\n  /** Signal that returns the current header instance. */\n  header: Signal<Header<TFeatures, TData, TValue>>\n}\n\n/**\n * Injection token that provides access to the current header.\n *\n * This token is provided by the {@link TanStackTableHeader} directive.\n */\nexport const TanStackTableHeaderToken = new InjectionToken<\n  TanStackTableHeaderContext<any, any, any>['header']\n>('[TanStack Table] HeaderContext')\n\n/**\n * Provides a TanStack Table `Header` instance in Angular DI.\n *\n * The header can be injected by:\n * - any descendant of an element using `[tanStackTableHeader]=\"...\"`\n * - any component instantiated by `*flexRender` when the render props contains `header`\n *\n * @example\n * ```html\n * <th [tanStackTableHeader]=\"header\">\n *   <app-sort-indicator />\n * </th>\n * ```\n *\n * ```ts\n * @Component({\n *   selector: 'app-sort-indicator',\n *   template: `\n *     <button (click)=\"toggle()\">\n *       {{ header().column.id }}\n *     </button>\n *   `,\n * })\n * export class SortIndicatorComponent {\n *   readonly header = injectTableHeaderContext()\n *\n *   toggle() {\n *     this.header().column.toggleSorting()\n *   }\n * }\n * ```\n */\n@Directive({\n  selector: '[tanStackTableHeader]',\n  exportAs: 'header',\n  providers: [\n    {\n      provide: TanStackTableHeaderToken,\n      useFactory: () => inject(TanStackTableHeader).header,\n    },\n  ],\n})\nexport class TanStackTableHeader<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData,\n> implements TanStackTableHeaderContext<TFeatures, TData, TValue> {\n  /**\n   * The current TanStack Table header.\n   *\n   * Provided as a required signal input so DI consumers always read the latest value.\n   */\n  readonly header = input.required<Header<TFeatures, TData, TValue>>({\n    alias: 'tanStackTableHeader',\n  })\n}\n\n/**\n * Injects the current TanStack Table header signal.\n *\n * Available when:\n * - there is a nearest `[tanStackTableHeader]` directive in the DI tree, or\n * - the caller is rendered via `*flexRender` with render props containing `header`\n */\nexport function injectTableHeaderContext<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData,\n>(): TanStackTableHeaderContext<TFeatures, TData, TValue>['header'] {\n  return inject(TanStackTableHeaderToken)\n}\n"
  },
  {
    "path": "packages/angular-table/src/helpers/table.ts",
    "content": "import { Directive, InjectionToken, inject, input } from '@angular/core'\nimport { RowData, TableFeatures, TableState } from '@tanstack/table-core'\nimport { AngularTable } from '../injectTable'\nimport type { Signal } from '@angular/core'\n\n/**\n * Injection token that provides access to the current {@link AngularTable} instance.\n *\n * This token is provided by the {@link TanStackTable} directive.\n */\nexport const TanStackTableToken = new InjectionToken<\n  Signal<AngularTable<any, any>>\n>('[TanStack Table] Table Context')\n\n/**\n * Provides a TanStack Table instance (`AngularTable`) in Angular DI.\n *\n * The table can be injected by:\n * - any descendant of an element using `[tanStackTable]=\"...\"`\n * - any component instantiated by `*flexRender` when the render props contains `table`\n *\n * @example\n * ```html\n * <div [tanStackTable]=\"table\">\n *   <app-pagination />\n * </div>\n * ```\n *\n * ```ts\n * @Component({\n *   selector: 'app-pagination',\n *   template: `\n *     <button (click)=\"prev()\" [disabled]=\"!table().getCanPreviousPage()\">Prev</button>\n *     <button (click)=\"next()\" [disabled]=\"!table().getCanNextPage()\">Next</button>\n *   `,\n * })\n * export class PaginationComponent {\n *   readonly table = injectTableContext()\n *\n *   prev() {\n *     this.table().previousPage()\n *   }\n *   next() {\n *     this.table().nextPage()\n *   }\n * }\n * ```\n */\n@Directive({\n  selector: '[tanStackTable]',\n  exportAs: 'table',\n  providers: [\n    {\n      provide: TanStackTableToken,\n      useFactory: () => inject(TanStackTable).table,\n    },\n  ],\n})\nexport class TanStackTable<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TSelected extends {} = TableState<TFeatures>,\n> {\n  /**\n   * The current TanStack Table instance.\n   *\n   * Provided as a required signal input so DI consumers always read the latest value.\n   */\n  readonly table = input.required<AngularTable<TFeatures, TData, TSelected>>({\n    alias: 'tanStackTable',\n  })\n}\n\n/**\n * Injects the current TanStack Table instance signal.\n *\n * Available when:\n * - there is a nearest `[tanStackTable]` directive in the DI tree, or\n * - the caller is rendered via `*flexRender` with render props containing `table`\n */\nexport function injectTableContext<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TSelected extends {} = TableState<TFeatures>,\n>(): Signal<AngularTable<TFeatures, TData, TSelected>> {\n  return inject(TanStackTableToken)\n}\n"
  },
  {
    "path": "packages/angular-table/src/index.ts",
    "content": "import { FlexRenderCell } from './helpers/flexRenderCell'\nimport { FlexRenderDirective } from './flexRender'\n\nexport * from '@tanstack/table-core'\n\nexport * from './flexRender'\nexport * from './injectTable'\nexport * from './flex-render/flexRenderComponent'\n\nexport * from './helpers/cell'\nexport * from './helpers/header'\nexport * from './helpers/table'\nexport * from './helpers/createTableHook'\nexport * from './helpers/flexRenderCell'\n\n/**\n * Constant helper to import FlexRender directives.\n *\n * You should prefer to use this constant over importing the directives separately,\n * as it ensures you always have the correct set of directives over library updates.\n *\n * @see {@link FlexRenderDirective} and {@link FlexRenderCell} for more details on the directives included in this export.\n */\nexport const FlexRender = [FlexRenderDirective, FlexRenderCell] as const\n"
  },
  {
    "path": "packages/angular-table/src/injectTable.ts",
    "content": "import {\n  Injector,\n  assertInInjectionContext,\n  computed,\n  effect,\n  inject,\n  signal,\n  untracked,\n} from '@angular/core'\nimport {\n  constructReactivityFeature,\n  constructTable,\n} from '@tanstack/table-core'\nimport { injectStore } from '@tanstack/angular-store'\nimport { lazyInit } from './lazySignalInitializer'\nimport type {\n  RowData,\n  Table,\n  TableFeatures,\n  TableOptions,\n  TableState,\n} from '@tanstack/table-core'\nimport type { Signal, ValueEqualityFn } from '@angular/core'\n\nexport type AngularTable<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TSelected = TableState<TFeatures>,\n> = Table<TFeatures, TData> & {\n  /**\n   * The selected state from the table store, based on the selector provided.\n   */\n  readonly state: Signal<Readonly<TSelected>>\n  /**\n   * A signal that returns the entire table instance. Will update on table/options change.\n   */\n  readonly value: Signal<AngularTable<TFeatures, TData, TSelected>>\n  /**\n   * Creates a computed that subscribe to changes in the table store with a custom selector.\n   * Default equality function is \"shallow\".\n   */\n  computed: <TSubSelected = {}>(props: {\n    selector: (state: TableState<TFeatures>) => TSubSelected\n    equal?: ValueEqualityFn<TSubSelected>\n  }) => Signal<Readonly<TSubSelected>>\n}\n\n/**\n * Creates and returns an Angular-reactive table instance.\n *\n * The initializer is intentionally re-evaluated whenever any signal read inside it changes.\n * This is how the adapter keeps the table in sync with Angular's reactivity model.\n *\n * Because of that behavior, keep expensive/static values (for example `columns`, feature setup, row models)\n * as stable references outside the initializer, and only read reactive state (`data()`, pagination/filter/sorting signals, etc.)\n * inside it.\n *\n * The returned table is also signal-reactive: table state and table APIs are wired for Angular signals, so you can safely consume table methods inside `computed(...)` and `effect(...)`.\n *\n * @example\n * 1. Register the table features you need\n * ```ts\n * // Register only the features you need\n * import {tableFeatures, rowPaginationFeature} from '@tanstack/angular-table';\n * const _features = tableFeatures({\n *  rowPaginationFeature,\n *  // ...all other features you need\n * })\n *\n * // Use all table core features\n * import {stockFeatures} from '@tanstack/angular-table';\n * const _features = tableFeatures(stockFeatures);\n * ```\n * 2. Prepare the table columns\n * ```ts\n * import {ColumnDef} from '@tanstack/angular-table';\n *\n * type MyData = {}\n *\n * const columns: ColumnDef<typeof _features, MyData>[] = [\n *   // ...column definitions\n * ]\n *\n * // or using createColumnHelper\n * import {createColumnHelper} from '@tanstack/angular-table';\n * const columnHelper = createColumnHelper<typeof _features, MyData>();\n * const columns = columnHelper.columns([\n *  columnHelper.accessor(...),\n *  // ...other columns\n * ])\n * ```\n * 3. Create the table instance with `injectTable`\n * ```ts\n * const table = injectTable(() => {\n *   // ...table options,\n *   _features,\n *   columns: columns,\n *   data: myDataSignal(),\n * })\n * ```\n *\n * @returns An Angular-reactive TanStack Table instance.\n */\nexport function injectTable<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TSelected = TableState<TFeatures>,\n>(\n  options: () => TableOptions<TFeatures, TData>,\n  selector: (state: TableState<TFeatures>) => TSelected = (state) =>\n    state as TSelected,\n): AngularTable<TFeatures, TData, TSelected> {\n  assertInInjectionContext(injectTable)\n  const injector = inject(Injector)\n  const stateNotifier = signal(0)\n  const angularReactivityFeature = constructReactivityFeature({\n    stateNotifier: () => stateNotifier(),\n  })\n\n  return lazyInit(() => {\n    const resolvedOptions: TableOptions<TFeatures, TData> = {\n      ...options(),\n      _features: {\n        ...options()._features,\n        angularReactivityFeature,\n      },\n    } as TableOptions<TFeatures, TData>\n\n    const table = constructTable(resolvedOptions) as AngularTable<\n      TFeatures,\n      TData,\n      TSelected\n    >\n    const tableState = injectStore(table.store, (state) => state, { injector })\n    const tableOptions = injectStore(table.optionsStore, (state) => state, {\n      injector,\n    })\n\n    const updatedOptions = computed<TableOptions<TFeatures, TData>>(() => {\n      const tableOptionsValue = options()\n      const result: TableOptions<TFeatures, TData> = {\n        ...untracked(() => table.options),\n        ...tableOptionsValue,\n        _features: { ...tableOptionsValue._features, angularReactivityFeature },\n      }\n      if (tableOptionsValue.state) {\n        result.state = tableOptionsValue.state\n      }\n      return result\n    })\n\n    effect(\n      () => {\n        const newOptions = updatedOptions()\n        untracked(() => table.setOptions(newOptions))\n      },\n      { injector, debugName: 'tableOptionsUpdate' },\n    )\n\n    let isMount = true\n    effect(\n      () => {\n        void [tableOptions(), tableState()]\n        if (!isMount) untracked(() => stateNotifier.update((n) => n + 1))\n        isMount && (isMount = false)\n      },\n      { injector, debugName: 'tableStateNotifier' },\n    )\n\n    table.computed = function Subscribe<TSubSelected = {}>(props: {\n      selector: (state: TableState<TFeatures>) => TSubSelected\n      equal?: ValueEqualityFn<TSubSelected>\n    }) {\n      return injectStore(table.store, props.selector, {\n        injector,\n        equal: props.equal,\n      })\n    }\n\n    Object.defineProperty(table, 'state', {\n      value: injectStore(table.store, selector, { injector }),\n    })\n\n    Object.defineProperty(table, 'value', {\n      value: computed(() => {\n        tableOptions()\n        tableState()\n        return table\n      }),\n    })\n\n    return table\n  })\n}\n"
  },
  {
    "path": "packages/angular-table/src/lazySignalInitializer.ts",
    "content": "import { untracked } from '@angular/core'\n\n/**\n * Implementation from @tanstack/angular-query\n * {https://github.com/TanStack/query/blob/main/packages/angular-query-experimental/src/util/lazy-init/lazy-init.ts}\n */\nexport function lazyInit<T extends object>(initializer: () => T): T {\n  let object: T | null = null\n\n  const initializeObject = () => {\n    if (!object) {\n      object = untracked(() => initializer())\n    }\n  }\n\n  queueMicrotask(() => initializeObject())\n\n  const table = () => {}\n\n  return new Proxy<T>(table as T, {\n    apply(target: T, thisArg: any, argArray: Array<any>): any {\n      initializeObject()\n      if (typeof object === 'function') {\n        return Reflect.apply(object, thisArg, argArray)\n      }\n      return Reflect.apply(target as any, thisArg, argArray)\n    },\n    get(_, prop, receiver) {\n      initializeObject()\n      return Reflect.get(object as T, prop, receiver)\n    },\n    has(_, prop) {\n      initializeObject()\n      return Reflect.has(object as T, prop)\n    },\n    ownKeys() {\n      initializeObject()\n      return Reflect.ownKeys(object as T)\n    },\n    getOwnPropertyDescriptor() {\n      return {\n        enumerable: true,\n        configurable: true,\n      }\n    },\n  })\n}\n"
  },
  {
    "path": "packages/angular-table/tests/angularReactivityFeature.test.ts",
    "content": "import { describe, expect, test, vi } from 'vitest'\nimport { computed, effect, signal } from '@angular/core'\nimport { TestBed } from '@angular/core/testing'\nimport { injectTable, stockFeatures } from '../src'\nimport type { ColumnDef } from '../src'\nimport type { WritableSignal } from '@angular/core'\n\ndescribe('angularReactivityFeature', () => {\n  type Data = { id: string; title: string }\n  const data = signal<Array<Data>>([{ id: '1', title: 'Title' }])\n  const columns: Array<ColumnDef<typeof stockFeatures, Data>> = [\n    {\n      id: 'id',\n      header: 'Id',\n      accessorKey: 'id',\n      cell: (context) => context.getValue(),\n    },\n    {\n      id: 'title',\n      header: 'Title',\n      accessorKey: 'title',\n      cell: (context) => context.getValue(),\n    },\n  ]\n\n  function createTestTable(_data: WritableSignal<Array<Data>> = data) {\n    return TestBed.runInInjectionContext(() =>\n      injectTable(() => ({\n        data: _data(),\n        _features: { ...stockFeatures },\n        columns: columns,\n        getRowId: (row) => row.id,\n        reactivity: {\n          column: true,\n          cell: true,\n          row: true,\n          header: true,\n        },\n      })),\n    )\n  }\n\n  const table = createTestTable()\n\n  describe('Integration', () => {\n    test('methods within effect will be re-trigger when options/state changes', () => {\n      const data = signal<Array<Data>>([{ id: '1', title: 'Title' }])\n      const table = createTestTable(data)\n      const isSelectedRow1Captor = vi.fn<(val: boolean) => void>()\n      const cellGetValueCaptor = vi.fn<(val: unknown) => void>()\n      const cellGetValueMemoizedCaptor = vi.fn<(val: unknown) => void>()\n      const columnIsVisibleCaptor = vi.fn<(val: boolean) => void>()\n\n      // This will test a case where you put in the effect a single cell property method\n      // which will trigger effect reschedule only when the value changes, acting like\n      // its a computed value\n      const cell = computed(\n        () => table.getRowModel().rows[0]!.getAllCells()[0]!,\n      )\n\n      const cellGetValue = computed(() => cell().getValue())\n\n      TestBed.runInInjectionContext(() => {\n        effect(() => {\n          isSelectedRow1Captor(cell().row.getIsSelected())\n        })\n        effect(() => {\n          cellGetValueCaptor(cell().getValue())\n        })\n        effect(() => {\n          cellGetValueMemoizedCaptor(cellGetValue())\n        })\n        effect(() => {\n          columnIsVisibleCaptor(cell().column.getIsVisible())\n        })\n      })\n\n      TestBed.tick()\n      expect(isSelectedRow1Captor).toHaveBeenCalledTimes(1)\n      expect(cellGetValueMemoizedCaptor).toHaveBeenCalledTimes(1)\n      expect(cellGetValueCaptor).toHaveBeenCalledTimes(1)\n      expect(columnIsVisibleCaptor).toHaveBeenCalledTimes(1)\n\n      cell().row.toggleSelected(true)\n      TestBed.tick()\n      expect(isSelectedRow1Captor).toHaveBeenCalledTimes(2)\n      expect(cellGetValueCaptor).toHaveBeenCalledTimes(1)\n      expect(columnIsVisibleCaptor).toHaveBeenCalledTimes(2)\n\n      data.set([{ id: '1', title: 'Title 3' }])\n      TestBed.tick()\n      // In this case it will be called twice since `data` will change and\n      // the cell instance will be recreated\n      expect(isSelectedRow1Captor).toHaveBeenCalledTimes(3)\n      expect(cellGetValueCaptor).toHaveBeenCalledTimes(2)\n      expect(columnIsVisibleCaptor).toHaveBeenCalledTimes(3)\n\n      cell().column.toggleVisibility(false)\n      TestBed.tick()\n      expect(isSelectedRow1Captor).toHaveBeenCalledTimes(4)\n      expect(cellGetValueCaptor).toHaveBeenCalledTimes(2)\n      expect(columnIsVisibleCaptor).toHaveBeenCalledTimes(4)\n\n      expect(isSelectedRow1Captor.mock.calls).toEqual([\n        [false],\n        [true],\n        [true],\n        [true],\n      ])\n      expect(cellGetValueCaptor.mock.calls).toEqual([['1'], ['1']])\n      expect(columnIsVisibleCaptor.mock.calls).toEqual([\n        [true],\n        [true],\n        [true],\n        [false],\n      ])\n    })\n  })\n})\n"
  },
  {
    "path": "packages/angular-table/tests/benchmarks/injectTable.benchmark.ts",
    "content": "import { setTimeout } from 'node:timers/promises'\nimport { bench, describe } from 'vitest'\nimport { benchCases, columns, createTestTable, dataMap } from './setup'\n\nconst nIteration = 5\n\nfor (const benchCase of benchCases) {\n  describe(`injectTable - ${benchCase.size} elements`, () => {\n    const data = dataMap[benchCase.size]!\n\n    bench(\n      `No reactivity`,\n      async () => {\n        const table = createTestTable(false, data, columns)\n        await setTimeout(0)\n        table.getRowModel()\n      },\n      {\n        iterations: nIteration,\n      },\n    )\n\n    bench(\n      `Full reactivity`,\n      async () => {\n        const table = createTestTable(true, data, columns)\n        await setTimeout(0)\n        table.getRowModel()\n      },\n      {\n        iterations: nIteration,\n      },\n    )\n  })\n}\n"
  },
  {
    "path": "packages/angular-table/tests/benchmarks/setup.ts",
    "content": "import { injectTable, stockFeatures } from '../../src'\nimport type { ColumnDef } from '../../src'\n\nexport function createData(size: number) {\n  return Array.from({ length: size }, (_, index) => ({\n    id: index,\n    title: `title-${index}`,\n    name: `name-${index}`,\n  }))\n}\n\nexport const columns: Array<ColumnDef<typeof stockFeatures, any>> = [\n  { id: 'col1' },\n  { id: 'col2' },\n  { id: 'col3' },\n  { id: 'col4' },\n  { id: 'col5' },\n  { id: 'col6' },\n  { id: 'col7' },\n]\n\nexport function createTestTable(\n  enableGranularReactivity: boolean,\n  data: Array<any>,\n  columns: Array<any>,\n) {\n  return injectTable(() => ({\n    _features: stockFeatures,\n    columns: columns,\n    data,\n    reactivity: {\n      table: enableGranularReactivity,\n      row: enableGranularReactivity,\n      column: enableGranularReactivity,\n      cell: enableGranularReactivity,\n      header: enableGranularReactivity,\n    },\n  }))\n}\n\nexport const benchCases = [\n  { size: 100, max: 5, threshold: 10 },\n  { size: 1000, max: 25, threshold: 50 },\n  { size: 2000, max: 50, threshold: 100 },\n  { size: 5000, max: 100, threshold: 500 },\n  { size: 10_000, max: 200, threshold: 1000 },\n  { size: 25_000, max: 500, threshold: 1000 },\n  { size: 50_000, max: 1500, threshold: 1000 },\n  { size: 100_000, max: 2000, threshold: 1500 },\n]\n\nconsole.log('Seeding data...')\n\nexport const dataMap = {} as Record<number, Array<any>>\n\nfor (const benchCase of benchCases) {\n  dataMap[benchCase.size] = createData(benchCase.size)\n}\n\nconsole.log('Seed data completed')\n"
  },
  {
    "path": "packages/angular-table/tests/flex-render/flex-render-component.test-d.ts",
    "content": "import { input } from '@angular/core'\nimport { test } from 'vitest'\nimport { flexRenderComponent } from '../../src'\n\ntest('Infer component inputs', () => {\n  class Test {\n    readonly input1 = input<string>()\n  }\n\n  // @ts-expect-error Must pass right type as a value\n  flexRenderComponent(Test, { inputs: { input1: 1 } })\n\n  // Input is optional so we can skip passing the property\n  flexRenderComponent(Test, { inputs: {} })\n})\n"
  },
  {
    "path": "packages/angular-table/tests/flex-render/flex-render-table.test.ts",
    "content": "import {\n  ChangeDetectionStrategy,\n  Component,\n  ViewChild,\n  input,\n  inputBinding,\n  output,\n  outputBinding,\n  signal,\n} from '@angular/core'\nimport {\n  ColumnDef,\n  createCoreRowModel,\n  stockFeatures,\n} from '@tanstack/table-core'\nimport { TestBed } from '@angular/core/testing'\nimport { describe, expect, test, vi } from 'vitest'\nimport { By } from '@angular/platform-browser'\nimport {\n  FlexRender,\n  flexRenderComponent,\n  injectFlexRenderContext,\n  injectTable,\n} from '../../src'\nimport type { FlexRenderContent } from '../../src'\nimport type {\n  CellContext,\n  ExpandedState,\n  TableOptions,\n} from '@tanstack/table-core'\nimport type { TemplateRef } from '@angular/core'\n\nconst defaultData: Array<TestData> = [\n  { id: '1', title: 'My title' },\n] as Array<TestData>\n\nconst defaultColumns: Array<ColumnDef<typeof stockFeatures, TestData>> = [\n  {\n    id: 'title',\n    accessorKey: 'title',\n    header: 'Title',\n    cell: (props) => props.renderValue(),\n  },\n]\n\ndescribe('FlexRenderDirective', () => {\n  test.each([null, undefined])('Render %s as empty', (value) => {\n    const { fixture, dom } = createTestTable(defaultData, [\n      { id: 'first_cell', header: 'header', cell: () => value },\n    ])\n    const row = dom.getBodyRow(0)!\n    const firstCell = row.querySelector('td')\n\n    expect(firstCell!.matches(':empty')).toBe(true)\n  })\n\n  test.each([\n    ['String column via function', () => 'My string'],\n    ['String column', () => 'My string'],\n    ['Number column via function', () => 0],\n    ['Number column', 0],\n  ])('Render primitive (%s)', (columnName, columnValue) => {\n    const { fixture, dom } = createTestTable(defaultData, [\n      { id: 'first_cell', header: columnName, cell: columnValue as any },\n    ])\n    const row = dom.getBodyRow(0)!\n    const firstCell = row.querySelector('td')\n\n    expectPrimitiveValueIs(\n      firstCell,\n      String(typeof columnValue === 'function' ? columnValue() : columnValue),\n    )\n  })\n\n  test('Render TemplateRef', () => {\n    @Component({\n      template: `\n        <!-- prettier-ignore -->\n        <ng-template #template let-context>Cell id: {{ context.cell.id }}</ng-template>\n      `,\n      standalone: true,\n    })\n    class FakeTemplateRefComponent {\n      @ViewChild('template', { static: true })\n      templateRef!: TemplateRef<any>\n    }\n\n    const templateRef = TestBed.createComponent(FakeTemplateRefComponent)\n      .componentInstance.templateRef\n\n    const { dom } = createTestTable(defaultData, [\n      { id: 'first_cell', header: 'Header', cell: () => templateRef },\n    ])\n\n    const row = dom.getBodyRow(0)!\n    const firstCell = row.querySelector('td')\n    expect(firstCell!.textContent).toEqual('Cell id: 0_first_cell')\n  })\n\n  test('Render component with FlexRenderComponent', async () => {\n    const status = signal<string>('Initial status')\n\n    const { dom, fixture } = createTestTable(defaultData, [\n      {\n        id: 'first_cell',\n        header: 'Status',\n        cell: () => {\n          return flexRenderComponent(TestBadgeComponent, {\n            inputs: {\n              status: status(),\n            },\n          })\n        },\n      },\n    ])\n\n    const row = dom.getBodyRow(0)!\n    const firstCell = row.querySelector('td')\n    expect(firstCell!.textContent).toEqual('Initial status')\n\n    status.set('Updated status')\n    await fixture.whenStable()\n\n    expect(firstCell!.textContent).toEqual('Updated status')\n  })\n\n  test('Render content reactively based on signal value', async () => {\n    const statusComponent = signal<FlexRenderContent<any>>('Initial status')\n\n    const { dom, fixture } = createTestTable(defaultData, [\n      {\n        id: 'first_cell',\n        header: 'Status',\n        cell: () => {\n          return statusComponent()\n        },\n      },\n    ])\n\n    const row = dom.getBodyRow(0)!\n    const firstCell = row.querySelector('td')\n\n    expect(firstCell!.textContent).toEqual('Initial status')\n\n    statusComponent.set(null)\n    await fixture.whenRenderingDone()\n    expect(firstCell!.matches(':empty')).toBe(true)\n\n    statusComponent.set(\n      flexRenderComponent(TestBadgeComponent, {\n        inputs: { status: 'Updated status' },\n      }),\n    )\n    await fixture.whenRenderingDone()\n\n    const el = firstCell!.firstElementChild as HTMLElement\n    expect(el.tagName).toEqual('APP-TEST-BADGE')\n    expect(el.textContent).toEqual('Updated status')\n  })\n\n  test('Cell content always get the latest context value', async () => {\n    const contextCaptor = vi.fn()\n\n    @Component({\n      template: ``,\n    })\n    class EmptyCell {}\n\n    const { dom, fixture } = createTestTable(defaultData, [\n      {\n        id: 'cell',\n        header: 'Header',\n        cell: (context) => {\n          contextCaptor(context)\n          return flexRenderComponent(EmptyCell)\n        },\n      },\n    ])\n\n    const latestCall = () =>\n      contextCaptor.mock.lastCall![0] as CellContext<\n        typeof stockFeatures,\n        TestData,\n        any\n      >\n\n    expect(contextCaptor).toHaveBeenCalledTimes(1)\n    expect(latestCall().row.getIsExpanded()).toEqual(false)\n\n    const table = fixture.componentInstance.table\n    table.getRow('0').toggleSelected(true)\n    await fixture.whenStable()\n\n    expect(contextCaptor).toHaveBeenCalledTimes(1)\n    expect(latestCall().row.getIsSelected()).toEqual(true)\n\n    table.getRow('0').toggleSelected(false)\n    table.getRow('0').toggleExpanded(true)\n    await fixture.whenStable()\n\n    expect(contextCaptor).toHaveBeenCalledTimes(1)\n    expect(latestCall().row.getIsSelected()).toEqual(false)\n    expect(latestCall().row.getIsExpanded()).toEqual(true)\n  })\n\n  test('Support cell with component output', async () => {\n    const callExpandRender = vi.fn<(val: boolean) => void>()\n\n    const columns = [\n      {\n        id: 'expand',\n        header: 'Expand',\n        cell: ({ row }: any) => {\n          callExpandRender(row.getIsExpanded())\n          return flexRenderComponent(ExpandCell, {\n            inputs: { expanded: row.getIsExpanded() },\n            outputs: { toggleExpand: () => row.toggleExpanded() },\n          })\n        },\n      },\n    ] satisfies Array<ColumnDef<typeof stockFeatures, TestData>>\n\n    @Component({\n      selector: 'expand-cell',\n      template: `\n        <button (click)=\"toggleExpand.emit()\">\n          {{ expanded() ? 'Expanded' : 'Not expanded' }}\n        </button>\n      `,\n      changeDetection: ChangeDetectionStrategy.OnPush,\n      standalone: true,\n    })\n    class ExpandCell {\n      readonly expanded = input(false)\n      readonly toggleExpand = output<void>()\n    }\n\n    @Component({\n      template: `\n        <table>\n          <tbody>\n            @for (row of table.getRowModel().rows; track row.id) {\n              <tr>\n                @for (cell of row.getVisibleCells(); track cell.id) {\n                  <td>\n                    <ng-container\n                      *flexRender=\"\n                        cell.column.columnDef.cell;\n                        props: cell.getContext();\n                        let cell\n                      \"\n                    >\n                      <span [innerHTML]=\"cell\"></span>\n                    </ng-container>\n                  </td>\n                }\n              </tr>\n            }\n          </tbody>\n        </table>\n      `,\n      changeDetection: ChangeDetectionStrategy.OnPush,\n      standalone: true,\n      selector: 'app-table-test',\n      imports: [FlexRender],\n    })\n    class TestComponent {\n      readonly expandState = signal<ExpandedState>({})\n\n      readonly table = injectTable(() => {\n        return {\n          columns: columns,\n          data: defaultData,\n          _features: stockFeatures,\n          _rowModels: {\n            coreRowModel: createCoreRowModel(),\n          },\n          state: { expanded: this.expandState() },\n          onExpandedChange: (updaterOrValue) => {\n            typeof updaterOrValue === 'function'\n              ? this.expandState.update(updaterOrValue)\n              : this.expandState.set(updaterOrValue)\n          },\n        } as TableOptions<typeof stockFeatures, TestData>\n      })\n    }\n\n    const fixture = TestBed.createComponent(TestComponent)\n    fixture.detectChanges()\n\n    const expandCell = fixture.debugElement.query(By.directive(ExpandCell))\n    expect(fixture.componentInstance.expandState()).toEqual({})\n    expect(expandCell.componentInstance.expanded()).toEqual(false)\n\n    const buttonEl = expandCell.query(By.css('button'))\n    expect(buttonEl.nativeElement.innerHTML).toEqual(' Not expanded ')\n    buttonEl.triggerEventHandler('click')\n\n    expect(fixture.componentInstance.expandState()).toEqual({\n      '0': true,\n    })\n    await fixture.whenStable()\n\n    expect(callExpandRender).toHaveBeenCalledTimes(2)\n    expect(callExpandRender).toHaveBeenNthCalledWith(1, false)\n    expect(callExpandRender).toHaveBeenNthCalledWith(2, true)\n\n    expect(buttonEl.nativeElement.innerHTML).toEqual(' Expanded ')\n  })\n\n  test('Support cell with component input/output binding', async () => {\n    const callExpandRender = vi.fn<() => void>()\n\n    const columns = [\n      {\n        id: 'expand',\n        header: 'Expand',\n        cell: ({ row }: any) => {\n          callExpandRender()\n          return flexRenderComponent(ExpandCell, {\n            bindings: [\n              inputBinding('expanded', () => row.getIsExpanded()),\n              outputBinding('toggleExpand', () => row.toggleExpanded()),\n            ],\n          })\n        },\n      },\n    ] satisfies Array<ColumnDef<typeof stockFeatures, TestData>>\n\n    @Component({\n      selector: 'expand-cell',\n      template: `\n        <button (click)=\"toggleExpand.emit()\">\n          {{ expanded() ? 'Expanded' : 'Not expanded' }}\n        </button>\n      `,\n      changeDetection: ChangeDetectionStrategy.OnPush,\n      standalone: true,\n    })\n    class ExpandCell {\n      readonly expanded = input(false)\n      readonly toggleExpand = output<void>()\n    }\n\n    @Component({\n      template: `\n        <table>\n          <tbody>\n            @for (row of table.getRowModel().rows; track row.id) {\n              <tr>\n                @for (cell of row.getVisibleCells(); track cell.id) {\n                  <td>\n                    <ng-container *flexRenderCell=\"cell; let cell\">\n                      <span [innerHTML]=\"cell\"></span>\n                    </ng-container>\n                  </td>\n                }\n              </tr>\n            }\n          </tbody>\n        </table>\n      `,\n      changeDetection: ChangeDetectionStrategy.OnPush,\n      standalone: true,\n      selector: 'app-table-test',\n      imports: [FlexRender],\n    })\n    class TestComponent {\n      readonly expandState = signal<ExpandedState>({})\n\n      readonly table = injectTable(() => {\n        return {\n          columns: columns,\n          data: defaultData,\n          _features: stockFeatures,\n          _rowModels: {\n            coreRowModel: createCoreRowModel(),\n          },\n          state: { expanded: this.expandState() },\n          onExpandedChange: (updaterOrValue) => {\n            typeof updaterOrValue === 'function'\n              ? this.expandState.update(updaterOrValue)\n              : this.expandState.set(updaterOrValue)\n          },\n        } as TableOptions<typeof stockFeatures, TestData>\n      })\n    }\n\n    const fixture = TestBed.createComponent(TestComponent)\n    await fixture.whenStable()\n\n    const expandCell = fixture.debugElement.query(By.directive(ExpandCell))\n    expect(fixture.componentInstance.expandState()).toEqual({})\n    expect(expandCell.componentInstance.expanded()).toEqual(false)\n\n    const buttonEl = expandCell.query(By.css('button'))\n    expect(buttonEl.nativeElement.innerHTML).toEqual(' Not expanded ')\n    buttonEl.triggerEventHandler('click')\n\n    expect(fixture.componentInstance.expandState()).toEqual({\n      '0': true,\n    })\n    await fixture.whenStable()\n\n    expect(callExpandRender).toHaveBeenCalledTimes(1)\n    expect(buttonEl.nativeElement.innerHTML).toEqual(' Expanded ')\n  })\n})\n\nfunction expectPrimitiveValueIs(\n  cell: HTMLTableCellElement | null,\n  value: unknown,\n) {\n  expect(cell).not.toBeNull()\n  expect(cell!.matches(':empty')).toBe(false)\n  const span = cell!.querySelector('span')!\n  expect(span).toBeDefined()\n  expect(span.innerHTML).toEqual(value)\n}\n\ntype TestData = { id: string; title: string }\n\nexport function createTestTable(\n  data: Array<TestData>,\n  columns: Array<ColumnDef<typeof stockFeatures, TestData, any>>,\n  optionsFn?: () => Partial<TableOptions<typeof stockFeatures, TestData>>,\n) {\n  @Component({\n    template: `\n      <table>\n        <thead data-testid=\"thead\">\n          @for (headerGroup of table.getHeaderGroups(); track headerGroup.id) {\n            <tr\n              data-testid=\"thead_row\"\n              [attr.data-testid]=\"'thead_headergroup_' + headerGroup.id\"\n            >\n              @for (header of headerGroup.headers; track header.id) {\n                @if (!header.isPlaceholder) {\n                  <th\n                    [attr.data-testid]=\"\n                      'thead_headergroup_' + headerGroup.id + '_' + header.id\n                    \"\n                  >\n                    <ng-container\n                      *flexRender=\"\n                        header.column.columnDef.header;\n                        props: header.getContext();\n                        let header\n                      \"\n                    >\n                      <span [innerHTML]=\"header\"></span>\n                    </ng-container>\n                  </th>\n                }\n              }\n            </tr>\n          }\n        </thead>\n        <tbody>\n          @for (row of table.getRowModel().rows; track row.id) {\n            <tr [attr.data-testid]=\"'row_' + row.id\">\n              @for (cell of row.getVisibleCells(); track cell.id) {\n                <td [attr.data-testid]=\"'row_' + row.id + '_cell_' + cell.id\">\n                  <ng-container\n                    *flexRender=\"\n                      cell.column.columnDef.cell;\n                      props: cell.getContext();\n                      let cell\n                    \"\n                  >\n                    <span [innerHTML]=\"cell\"></span>\n                  </ng-container>\n                </td>\n              }\n            </tr>\n          }\n        </tbody>\n      </table>\n\n      <button (click)=\"(0)\">Trigger CD</button>\n\n      <button (click)=\"count.set(count() + 1)\">Trigger CD 2</button>\n\n      {{ count() }}\n    `,\n    changeDetection: ChangeDetectionStrategy.OnPush,\n    standalone: true,\n    selector: 'app-table-test',\n    imports: [FlexRender],\n  })\n  class TestComponent {\n    readonly columns =\n      input<Array<ColumnDef<typeof stockFeatures, TestData>>>(columns)\n    readonly data = input<Array<TestData>>(data)\n\n    readonly count = signal(0)\n\n    readonly table = injectTable(() => {\n      return {\n        ...(optionsFn?.() ?? {}),\n        _features: stockFeatures,\n        _rowModels: {\n          coreRowModel: createCoreRowModel(),\n        },\n        columns: this.columns(),\n        data: this.data(),\n      } as TableOptions<typeof stockFeatures, TestData>\n    })\n  }\n\n  const fixture = TestBed.createComponent(TestComponent)\n\n  fixture.detectChanges()\n\n  return {\n    fixture,\n    dom: {\n      getTable() {\n        return fixture.nativeElement.querySelector('table') as HTMLTableElement\n      },\n      getHeader() {\n        return this.getTable().querySelector('thead') as HTMLTableSectionElement\n      },\n      getHeaderRow() {\n        return this.getHeader().querySelector('tr') as HTMLTableRowElement\n      },\n      getBody() {\n        return this.getTable().querySelector('tbody') as HTMLTableSectionElement\n      },\n      getBodyRow(index: number) {\n        return this.getBody().rows.item(index)\n      },\n    },\n  }\n}\n\n@Component({\n  selector: 'app-test-badge',\n  template: `<span>{{ status() }}</span> `,\n  standalone: true,\n  changeDetection: ChangeDetectionStrategy.OnPush,\n})\nclass TestBadgeComponent {\n  readonly context =\n    injectFlexRenderContext<CellContext<typeof stockFeatures, TestData, any>>()\n\n  readonly status = input.required<string>()\n}\n"
  },
  {
    "path": "packages/angular-table/tests/flex-render/flex-render.unit.test.ts",
    "content": "import { Component, ViewChild, input } from '@angular/core'\nimport { TestBed } from '@angular/core/testing'\nimport { createColumnHelper } from '@tanstack/table-core'\nimport { describe, expect, test } from 'vitest'\nimport {\n  FlexRender,\n  FlexRenderDirective,\n  flexRenderComponent,\n  injectFlexRenderContext,\n} from '../../src'\nimport { setFixtureSignalInput, setFixtureSignalInputs } from '../test-utils'\nimport type { TemplateRef } from '@angular/core'\nimport type { ComponentFixture } from '@angular/core/testing'\n\ninterface Data {\n  id: string\n  title: string\n  description: string\n  status: 'success' | 'failed' | 'pending'\n  favorite?: boolean\n}\n\ndescribe('FlexRenderDirective', () => {\n  const helper = createColumnHelper<{}, Data>()\n\n  test('should render primitives', () => {\n    const fixture = TestBed.createComponent(TestRenderComponent)\n\n    // Null\n    setFixtureSignalInputs(fixture, {\n      content: () => null,\n      context: {},\n    })\n    expect((fixture.nativeElement as HTMLElement).matches(':empty')).toBe(true)\n\n    // Undefined\n    setFixtureSignalInputs(fixture, {\n      content: () => undefined,\n      context: {},\n    })\n    expect((fixture.nativeElement as HTMLElement).matches(':empty')).toBe(true)\n\n    // String\n    setFixtureSignalInputs(fixture, {\n      content: 'My value',\n      context: {},\n    })\n    expectPrimitiveValueIs(fixture, 'My value')\n\n    // Numbers\n    setFixtureSignalInputs(fixture, {\n      content: 0,\n      context: {},\n    })\n    expectPrimitiveValueIs(fixture, '0')\n\n    // Functions that returns primitives\n    setFixtureSignalInputs(fixture, {\n      content: () => 'My value 2',\n      context: {},\n    })\n    expectPrimitiveValueIs(fixture, 'My value 2')\n\n    // Set again to null to be sure content has been destroyed\n    setFixtureSignalInputs(fixture, {\n      content: () => null,\n      context: {},\n    })\n    expect((fixture.nativeElement as HTMLElement).matches(':empty')).toBe(true)\n  })\n\n  test('should render TemplateRef', () => {\n    @Component({\n      template: `\n        <ng-template #template let-context>{{ context.property }}</ng-template>\n      `,\n      standalone: true,\n    })\n    class FakeTemplateRefComponent {\n      @ViewChild('template', { static: true })\n      templateRef!: TemplateRef<any>\n    }\n\n    const templateRef = TestBed.createComponent(FakeTemplateRefComponent)\n      .componentInstance.templateRef\n\n    const fixture = TestBed.createComponent(TestRenderComponent)\n    setFixtureSignalInputs(fixture, {\n      content: () => templateRef,\n      context: {\n        property: 'Property context value',\n      },\n    })\n\n    expect(fixture.nativeElement.textContent).toEqual('Property context value')\n\n    setFixtureSignalInput(fixture, 'context', { property: 'Updated value' })\n    fixture.detectChanges()\n\n    expect(fixture.nativeElement.textContent).toEqual('Updated value')\n  })\n\n  test('should render components', () => {\n    @Component({\n      template: `{{ context.property }}`,\n      standalone: true,\n    })\n    class FakeComponent {\n      context = injectFlexRenderContext<{ property: string }>()\n    }\n\n    const fixture = TestBed.createComponent(TestRenderComponent)\n    setFixtureSignalInputs(\n      fixture,\n      {\n        content: () => flexRenderComponent(FakeComponent),\n        context: {\n          property: 'Context value',\n        },\n      },\n      { detectChanges: true },\n    )\n\n    expect(fixture.nativeElement.textContent).toEqual('Context value')\n\n    setFixtureSignalInput(fixture, 'context', { property: 'Updated value' })\n    fixture.detectChanges()\n\n    expect(fixture.nativeElement.textContent).toEqual('Updated value')\n  })\n\n  // Skip for now, test framework (using ComponentRef.setInput) cannot recognize signal inputs\n  // as component inputs\n  test('should render custom components', async () => {\n    @Component({\n      template: `{{ row().property }}`,\n      standalone: true,\n    })\n    class FakeComponent {\n      row = input.required<{ property: string }>()\n\n      constructor() {}\n    }\n\n    const fixture = TestBed.createComponent(TestRenderComponent)\n    setFixtureSignalInputs(fixture, {\n      content: () => FakeComponent,\n      context: {\n        row: {\n          property: 'Row value',\n        },\n      },\n    })\n\n    expect(fixture.nativeElement.textContent).toEqual('Row value')\n\n    setFixtureSignalInput(fixture, 'context', {\n      row: { property: 'Updated value' },\n    })\n    await fixture.whenRenderingDone()\n    fixture.detectChanges()\n\n    expect(fixture.nativeElement.textContent).toEqual('Updated value')\n  })\n})\n\n@Component({\n  selector: 'app-test-render',\n  template: `\n    <ng-container *flexRender=\"content(); props: context(); let renderValue\">\n      <span [innerHTML]=\"renderValue\"></span>\n    </ng-container>\n  `,\n  standalone: true,\n  imports: [FlexRender],\n})\nclass TestRenderComponent {\n  readonly content = input.required<FlexRenderAllowedContent>()\n\n  readonly context = input.required<Record<string, unknown>>()\n}\n\ntype FlexRenderAllowedContent = ReturnType<\n  FlexRenderDirective<\n    any,\n    any,\n    NonNullable<unknown>,\n    NonNullable<unknown>\n  >['content']\n>\n\nfunction expectPrimitiveValueIs(\n  fixture: ComponentFixture<unknown>,\n  value: unknown,\n) {\n  expect(fixture.nativeElement.matches(':empty')).toBe(false)\n  const span = fixture.nativeElement.querySelector('span')\n  expect(span).toBeDefined()\n  expect(span.innerHTML).toEqual(value)\n}\n"
  },
  {
    "path": "packages/angular-table/tests/injectTable.test.ts",
    "content": "import { isProxy } from 'node:util/types'\nimport { describe, expect, test, vi } from 'vitest'\nimport {\n  ChangeDetectionStrategy,\n  Component,\n  effect,\n  input,\n  signal,\n} from '@angular/core'\nimport { TestBed } from '@angular/core/testing'\nimport {\n  ColumnDef,\n  createPaginatedRowModel,\n  stockFeatures,\n} from '@tanstack/table-core'\nimport { RowModel, injectTable } from '../src'\nimport type { PaginationState } from '../src'\n\ndescribe('injectTable', () => {\n  test('should support required signal inputs', () => {\n    @Component({\n      selector: 'app-table',\n      template: ``,\n      standalone: true,\n      changeDetection: ChangeDetectionStrategy.OnPush,\n    })\n    class TableComponent {\n      data = input.required<Array<any>>()\n\n      table = injectTable(() => ({\n        data: this.data(),\n        _features: stockFeatures,\n        columns: [],\n      }))\n    }\n\n    @Component({\n      selector: 'app-root',\n      imports: [TableComponent],\n      template: ` <app-table [data]=\"[]\" /> `,\n      changeDetection: ChangeDetectionStrategy.OnPush,\n    })\n    class RootComponent {}\n\n    const fixture = TestBed.createComponent(RootComponent)\n    fixture.detectChanges()\n\n    fixture.whenRenderingDone()\n  })\n\n  describe('Proxy table', () => {\n    type Data = { id: string; title: string }\n    const data = signal<Array<Data>>([{ id: '1', title: 'Title' }])\n    const columns: Array<ColumnDef<typeof stockFeatures, Data>> = [\n      { id: 'id', header: 'Id', cell: (context) => context.getValue() },\n      { id: 'title', header: 'Title', cell: (context) => context.getValue() },\n    ]\n    const table = TestBed.runInInjectionContext(() =>\n      injectTable(() => ({\n        data: data(),\n        _features: stockFeatures,\n        columns: columns,\n        getRowId: (row) => row.id,\n      })),\n    )\n\n    test('table is proxy', () => {\n      expect(isProxy(table)).toBe(true)\n    })\n\n    test('supports \"in\" operator', () => {\n      expect('_features' in table).toBe(true)\n      expect('options' in table).toBe(true)\n      expect('notFound' in table).toBe(false)\n    })\n\n    test('supports \"Object.keys\"', () => {\n      const keys = Object.keys(table)\n      expect(keys.some((k) => ['state', 'getRowModel'].includes(k)))\n    })\n\n    test('Row model is reactive', () => {\n      const coreRowModelFn =\n        vi.fn<(model: RowModel<typeof stockFeatures, Data>) => void>()\n      const rowModelFn =\n        vi.fn<(model: RowModel<typeof stockFeatures, Data>) => void>()\n      const pagination = signal<PaginationState>({\n        pageSize: 5,\n        pageIndex: 0,\n      })\n      const data = Array.from({ length: 10 }, (_, i) => ({\n        id: String(i),\n        title: `Title ${i}`,\n      }))\n\n      TestBed.runInInjectionContext(() => {\n        const table = injectTable(() => ({\n          data,\n          columns: columns,\n          _features: stockFeatures,\n          _rowModels: {\n            paginatedRowModel: createPaginatedRowModel(),\n          },\n          getRowId: (row) => row.id,\n          state: {\n            pagination: pagination(),\n          },\n          onPaginationChange: (updater) => {\n            typeof updater === 'function'\n              ? pagination.update(updater)\n              : pagination.set(updater)\n          },\n        }))\n\n        effect(() => coreRowModelFn(table.getCoreRowModel()))\n        effect(() => rowModelFn(table.getRowModel()))\n\n        TestBed.tick()\n\n        pagination.set({ pageIndex: 0, pageSize: 3 })\n\n        TestBed.tick()\n\n        expect(coreRowModelFn).toHaveBeenCalledOnce()\n        expect(coreRowModelFn.mock.calls[0]![0].rows.length).toEqual(10)\n\n        expect(rowModelFn).toHaveBeenCalledTimes(2)\n        expect(rowModelFn.mock.calls[0]![0].rows.length).toEqual(5)\n        expect(rowModelFn.mock.calls[1]![0].rows.length).toEqual(3)\n      })\n    })\n  })\n})\n"
  },
  {
    "path": "packages/angular-table/tests/lazy-init.test.ts",
    "content": "import { describe, expect, test, vi } from 'vitest'\nimport {\n  ChangeDetectionStrategy,\n  Component,\n  computed,\n  effect,\n  input,\n  signal,\n} from '@angular/core'\nimport { TestBed } from '@angular/core/testing'\nimport { lazyInit } from '../src/lazySignalInitializer'\nimport { flushQueue, setFixtureSignalInputs } from './test-utils'\nimport type { WritableSignal } from '@angular/core'\n\ndescribe('lazyInit', () => {\n  test('should init lazily in next tick when not accessing manually', async () => {\n    const mockFn = vi.fn()\n\n    TestBed.runInInjectionContext(() => {\n      lazyInit(() => {\n        mockFn()\n        return {\n          data: signal(true),\n        }\n      })\n    })\n\n    expect(mockFn).not.toHaveBeenCalled()\n\n    await new Promise(setImmediate)\n\n    expect(mockFn).toHaveBeenCalled()\n  })\n\n  test('should init eagerly accessing manually', () => {\n    const mockFn = vi.fn()\n\n    TestBed.runInInjectionContext(() => {\n      const lazySignal = lazyInit(() => {\n        mockFn()\n        return {\n          data: signal(true),\n        }\n      })\n\n      lazySignal.data()\n    })\n\n    expect(mockFn).toHaveBeenCalled()\n  })\n\n  test('should init lazily and only once', async () => {\n    const initCallFn = vi.fn()\n    const registerDataValue = vi.fn<(arg0: number) => void>()\n\n    let value!: { data: WritableSignal<number> }\n    const outerSignal = signal(0)\n\n    TestBed.runInInjectionContext(() => {\n      value = lazyInit(() => {\n        initCallFn()\n\n        void outerSignal()\n\n        return { data: signal(0) }\n      })\n\n      effect(() => registerDataValue(value.data()))\n    })\n\n    value.data()\n\n    TestBed.flushEffects()\n\n    expect(outerSignal).toBeDefined()\n\n    expect(initCallFn).toHaveBeenCalledTimes(1)\n\n    outerSignal.set(1)\n    await flushQueue()\n    outerSignal.set(2)\n    await flushQueue()\n    value.data.set(4)\n    await flushQueue()\n\n    expect(initCallFn).toHaveBeenCalledTimes(1)\n    expect(registerDataValue).toHaveBeenCalledTimes(1)\n  })\n\n  test('should support required signal input', async () => {\n    @Component({\n      standalone: true,\n      template: `{{ call }} - {{ lazySignal.data() }}`,\n      changeDetection: ChangeDetectionStrategy.OnPush,\n    })\n    class Test {\n      readonly title = input.required<string>()\n      call = 0\n\n      lazySignal = lazyInit(() => {\n        this.call++\n        return {\n          data: computed(() => this.title()),\n        }\n      })\n    }\n\n    const fixture = TestBed.createComponent(Test)\n\n    setFixtureSignalInputs(fixture, { title: 'newValue' })\n    expect(fixture.debugElement.nativeElement.textContent).toBe('0 - newValue')\n    await flushQueue()\n\n    setFixtureSignalInputs(fixture, { title: 'updatedValue' })\n    expect(fixture.debugElement.nativeElement.textContent).toBe(\n      '1 - updatedValue',\n    )\n\n    setFixtureSignalInputs(fixture, { title: 'newUpdatedValue' })\n    expect(fixture.debugElement.nativeElement.textContent).toBe(\n      '1 - newUpdatedValue',\n    )\n  })\n})\n"
  },
  {
    "path": "packages/angular-table/tests/test-setup.ts",
    "content": "import '@analogjs/vitest-angular/setup-snapshots'\nimport '@testing-library/jest-dom/vitest'\nimport { setupTestBed } from '@analogjs/vitest-angular/setup-testbed'\n\nsetupTestBed()\n"
  },
  {
    "path": "packages/angular-table/tests/test-utils.ts",
    "content": "import type { InputSignal } from '@angular/core'\nimport type { ComponentFixture } from '@angular/core/testing'\n\ntype ToSignalInputUpdatableMap<T> = {\n  [K in keyof T as T[K] extends InputSignal<any>\n    ? K\n    : never]?: T[K] extends infer Input\n    ? Input extends InputSignal<infer T>\n      ? T\n      : never\n    : never\n}\n\nexport function setFixtureSignalInputs<T extends NonNullable<unknown>>(\n  componentFixture: ComponentFixture<T>,\n  inputs: ToSignalInputUpdatableMap<T>,\n  options: { detectChanges: boolean } = { detectChanges: true },\n) {\n  for (const inputKey in inputs) {\n    componentFixture.componentRef.setInput(inputKey, inputs[inputKey])\n  }\n  if (options.detectChanges) {\n    componentFixture.detectChanges()\n  }\n}\n\nexport function setFixtureSignalInput<\n  T extends NonNullable<unknown>,\n  InputMaps extends ToSignalInputUpdatableMap<T>,\n  InputName extends keyof InputMaps,\n>(\n  componentFixture: ComponentFixture<T>,\n  inputName: InputName,\n  value: InputMaps[InputName],\n) {\n  setFixtureSignalInputs(componentFixture, {\n    [inputName]: value,\n  } as ToSignalInputUpdatableMap<T>)\n}\n\nexport async function flushQueue() {\n  await new Promise(setImmediate)\n}\n"
  },
  {
    "path": "packages/angular-table/tsconfig.build.json",
    "content": "{\n  \"extends\": \"./node_modules/ng-packagr/src/lib/ts/conf/tsconfig.ngc.json\",\n  \"compilerOptions\": {\n    \"allowJs\": true,\n    \"module\": \"ESNext\",\n    \"moduleDetection\": \"force\",\n    \"moduleResolution\": \"Bundler\",\n    \"stripInternal\": true\n  },\n  \"angularCompilerOptions\": {\n    \"enableI18nLegacyMessageIdFormat\": false,\n    \"strictInjectionParameters\": true,\n    \"strictInputAccessModifiers\": true,\n    \"strictTemplates\": true,\n    \"compilationMode\": \"partial\"\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "packages/angular-table/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig.json\",\n  \"compilerOptions\": {\n    \"useDefineForClassFields\": false,\n    \"forceConsistentCasingInFileNames\": true,\n    \"strict\": true,\n    \"noImplicitOverride\": true,\n    \"noPropertyAccessFromIndexSignature\": true,\n    \"noImplicitReturns\": true,\n    \"noFallthroughCasesInSwitch\": true,\n    \"emitDecoratorMetadata\": true,\n    \"experimentalDecorators\": true,\n    \"importHelpers\": true\n  },\n  \"include\": [\"src\", \"tests\", \"eslint.config.js\", \"vite.config.ts\"]\n}\n"
  },
  {
    "path": "packages/angular-table/tsconfig.test.json",
    "content": "{\n  \"compilerOptions\": {\n    \"outDir\": \"./dist/out-tsc\",\n    \"forceConsistentCasingInFileNames\": true,\n    \"strict\": true,\n    \"noImplicitOverride\": true,\n    \"noPropertyAccessFromIndexSignature\": true,\n    \"noImplicitReturns\": true,\n    \"noFallthroughCasesInSwitch\": true,\n    \"esModuleInterop\": true,\n    \"sourceMap\": true,\n    \"declaration\": false,\n    \"downlevelIteration\": true,\n    \"experimentalDecorators\": true,\n    \"moduleResolution\": \"node\",\n    \"importHelpers\": true,\n    \"target\": \"ES2022\",\n    \"module\": \"ES2022\",\n    \"useDefineForClassFields\": false,\n    \"lib\": [\"ES2022\", \"dom\"],\n    \"types\": [\"vitest/globals\", \"node\"]\n  },\n  \"angularCompilerOptions\": {\n    \"enableI18nLegacyMessageIdFormat\": false,\n    \"strictInjectionParameters\": true,\n    \"strictInputAccessModifiers\": true,\n    \"strictTemplates\": true\n  },\n  \"include\": [\"src\", \"tests\"]\n}\n"
  },
  {
    "path": "packages/angular-table/vite.config.ts",
    "content": "import * as path from 'node:path'\nimport { defineConfig } from 'vitest/config'\nimport angular from '@analogjs/vite-plugin-angular'\nimport packageJson from './package.json'\n\nconst tsconfigPath = path.join(import.meta.dirname, 'tsconfig.test.json')\nconst testDirPath = path.join(import.meta.dirname, 'tests')\nconst angularPlugin = angular({ tsconfig: tsconfigPath, jit: true })\n\nexport default defineConfig({\n  plugins: [angularPlugin],\n  test: {\n    name: packageJson.name,\n    watch: false,\n    dir: testDirPath,\n    pool: 'threads',\n    environment: 'jsdom',\n    setupFiles: [path.join(testDirPath, 'test-setup.ts')],\n    globals: true,\n    reporters: 'default',\n    disableConsoleIntercept: true,\n  },\n})\n"
  },
  {
    "path": "packages/lit-table/eslint.config.js",
    "content": "// @ts-check\n\nimport rootConfig from '../../eslint.config.js'\n\nexport default [\n  ...rootConfig,\n  {\n    rules: {},\n  },\n]\n"
  },
  {
    "path": "packages/lit-table/package.json",
    "content": "{\n  \"name\": \"@tanstack/lit-table\",\n  \"version\": \"9.0.0-alpha.10\",\n  \"description\": \"Headless UI for building powerful tables & datagrids for Lit.\",\n  \"author\": \"Tanner Linsley\",\n  \"license\": \"MIT\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/TanStack/table.git\",\n    \"directory\": \"packages/lit-table\"\n  },\n  \"homepage\": \"https://tanstack.com/table\",\n  \"funding\": {\n    \"type\": \"github\",\n    \"url\": \"https://github.com/sponsors/tannerlinsley\"\n  },\n  \"keywords\": [\n    \"lit\",\n    \"table\",\n    \"lit-table\",\n    \"datagrid\"\n  ],\n  \"type\": \"module\",\n  \"types\": \"dist/esm/index.d.ts\",\n  \"main\": \"dist/esm/index.js\",\n  \"module\": \"dist/esm/index.js\",\n  \"exports\": {\n    \".\": {\n      \"import\": {\n        \"types\": \"./dist/esm/index.d.ts\",\n        \"default\": \"./dist/esm/index.js\"\n      }\n    },\n    \"./package.json\": \"./package.json\"\n  },\n  \"sideEffects\": false,\n  \"engines\": {\n    \"node\": \">=16\"\n  },\n  \"files\": [\n    \"dist\",\n    \"src\"\n  ],\n  \"scripts\": {\n    \"clean\": \"rimraf ./build && rimraf ./dist\",\n    \"test:eslint\": \"eslint ./src\",\n    \"test:types\": \"tsc\",\n    \"test:build\": \"publint --strict\",\n    \"build\": \"vite build\"\n  },\n  \"dependencies\": {\n    \"@tanstack/table-core\": \"workspace:*\"\n  },\n  \"devDependencies\": {\n    \"lit\": \"^3.3.2\"\n  },\n  \"peerDependencies\": {\n    \"lit\": \"^3.1.3\"\n  }\n}\n"
  },
  {
    "path": "packages/lit-table/src/TableController.ts",
    "content": "import { constructTable, coreFeatures } from '@tanstack/table-core'\nimport type {\n  RowData,\n  Table,\n  TableFeatures,\n  TableOptions,\n  TableState,\n} from '@tanstack/table-core'\nimport type { ReactiveController, ReactiveControllerHost } from 'lit'\n\nexport class TableController<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> implements ReactiveController {\n  host: ReactiveControllerHost\n\n  private _table: Table<TFeatures, TData> | null = null\n  private _subscription?: () => void\n  private _allState: TableState<TFeatures> | null = null\n\n  constructor(host: ReactiveControllerHost) {\n    ;(this.host = host).addController(this)\n  }\n\n  public table(\n    tableOptions: TableOptions<TFeatures, TData>,\n    selector: (state: TableState<TFeatures>) => any = () => ({}),\n  ): Table<TFeatures, TData> & { state: any } {\n    if (!this._table) {\n      const _features = { ...coreFeatures, ...tableOptions._features }\n\n      const statefulOptions: TableOptions<TFeatures, TData> = {\n        ...tableOptions,\n        _features,\n        // Remove state and onStateChange - store handles it internally\n        mergeOptions: (\n          defaultOptions: TableOptions<TFeatures, TData>,\n          newOptions: Partial<TableOptions<TFeatures, TData>>,\n        ) => {\n          return {\n            ...defaultOptions,\n            ...newOptions,\n          }\n        },\n      }\n\n      this._table = constructTable(statefulOptions)\n      this._allState = this._table.store.state\n\n      // Wrap all \"get*\" methods to make them reactive\n      Object.keys(this._table).forEach((key) => {\n        const value = (this._table as any)[key]\n        if (typeof value === 'function' && key.startsWith('get')) {\n          const originalMethod = value.bind(this._table)\n          ;(this._table as any)[key] = (...args: Array<any>) => {\n            // Access state to create reactive dependency\n            this._allState\n            return originalMethod(...args)\n          }\n        }\n      })\n\n      // Set up subscription immediately when table is created\n      // This ensures reactivity works even if hostConnected() was called before table creation\n      this._setupSubscription()\n\n      // Add Subscribe function\n      // For Lit, this could be used with a directive or component\n      // This is a basic implementation that can be enhanced\n      ;(this._table as any).Subscribe = function Subscribe<TSelected>(props: {\n        selector: (state: TableState<TFeatures>) => TSelected\n        children: ((state: Readonly<TSelected>) => any) | any\n      }) {\n        // This is a simplified version - in practice, you'd want to use\n        // a Lit directive or component to handle the subscription and rendering\n        const selectedState = props.selector(this.store.state)\n\n        if (typeof props.children === 'function') {\n          return props.children(selectedState)\n        }\n        return props.children\n      }\n    }\n\n    // Update options when they change\n    this._table.setOptions((prev) => ({\n      ...prev,\n      ...tableOptions,\n    }))\n\n    // Capture selector and table for the state getter\n    const selectorFn = selector\n    const tableInstance = this._table\n\n    return {\n      ...this._table,\n      get state() {\n        return selectorFn(tableInstance.store.state)\n      },\n    } as Table<TFeatures, TData> & { state: any }\n  }\n\n  private _setupSubscription() {\n    // Only set up if not already subscribed\n    if (this._table && !this._subscription) {\n      this._subscription = this._table.store.subscribe(({ currentVal }) => {\n        this._allState = currentVal\n        // Request update to trigger re-render\n        this.host.requestUpdate()\n      })\n    }\n  }\n\n  hostConnected() {\n    // Set up subscription if table exists but subscription wasn't set up yet\n    // (This handles the case where hostConnected() is called before table creation)\n    this._setupSubscription()\n  }\n\n  hostDisconnected() {\n    this._subscription?.()\n    this._subscription = undefined\n  }\n}\n"
  },
  {
    "path": "packages/lit-table/src/flexRender.ts",
    "content": "import type { TemplateResult } from 'lit'\n\nexport function flexRender<TProps>(\n  Comp: ((props: TProps) => string) | string | TemplateResult | undefined,\n  props: TProps,\n): TemplateResult | string | null {\n  if (!Comp) return null\n\n  if (typeof Comp === 'function') {\n    return Comp(props)\n  }\n\n  return Comp\n}\n"
  },
  {
    "path": "packages/lit-table/src/index.ts",
    "content": "export * from '@tanstack/table-core'\n\nexport * from './flexRender'\nexport * from './TableController'\n"
  },
  {
    "path": "packages/lit-table/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig.json\",\n  \"include\": [\"src\", \"eslint.config.js\", \"vite.config.ts\"]\n}\n"
  },
  {
    "path": "packages/lit-table/vite.config.ts",
    "content": "import { defineConfig, mergeConfig } from 'vitest/config'\nimport { tanstackViteConfig } from '@tanstack/vite-config'\n\nconst config = defineConfig({})\n\nexport default mergeConfig(\n  config,\n  tanstackViteConfig({\n    cjs: false,\n    entry: './src/index.ts',\n    srcDir: './src',\n  }),\n)\n"
  },
  {
    "path": "packages/match-sorter-utils/package.json",
    "content": "{\n  \"name\": \"@tanstack/match-sorter-utils\",\n  \"version\": \"9.0.0-alpha.4\",\n  \"description\": \"A fork of match-sorter with separated filtering and sorting phases\",\n  \"contributors\": [\n    \"Kent C. Dodds\",\n    \"Tanner Linsley\"\n  ],\n  \"license\": \"MIT\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/TanStack/table.git\",\n    \"directory\": \"packages/match-sorter-utils\"\n  },\n  \"homepage\": \"https://tanstack.com/table\",\n  \"funding\": {\n    \"type\": \"github\",\n    \"url\": \"https://github.com/sponsors/tannerlinsley\"\n  },\n  \"keywords\": [\n    \"react\",\n    \"table\",\n    \"match-sorter\",\n    \"utils\",\n    \"split\",\n    \"separate\",\n    \"datagrid\"\n  ],\n  \"type\": \"module\",\n  \"types\": \"dist/esm/index.d.ts\",\n  \"main\": \"dist/esm/index.js\",\n  \"module\": \"dist/esm/index.js\",\n  \"exports\": {\n    \".\": {\n      \"import\": {\n        \"types\": \"./dist/esm/index.d.ts\",\n        \"default\": \"./dist/esm/index.js\"\n      }\n    },\n    \"./package.json\": \"./package.json\"\n  },\n  \"sideEffects\": false,\n  \"engines\": {\n    \"node\": \">=16\"\n  },\n  \"files\": [\n    \"dist\",\n    \"src\"\n  ],\n  \"scripts\": {\n    \"clean\": \"rimraf ./build && rimraf ./dist\",\n    \"test:lib\": \"vitest\",\n    \"test:lib:dev\": \"pnpm test:lib --watch\",\n    \"test:types\": \"tsc\",\n    \"test:build\": \"publint --strict\",\n    \"build\": \"vite build\"\n  },\n  \"dependencies\": {\n    \"remove-accents\": \"0.5.0\"\n  }\n}\n"
  },
  {
    "path": "packages/match-sorter-utils/src/index.ts",
    "content": "/**\n * @name match-sorter\n * @license MIT license.\n * @copyright (c) 2099 Kent C. Dodds\n * @author Kent C. Dodds <me@kentcdodds.com> (https://kentcdodds.com)\n */\n\n// This is a fork of match-sorter. Instead of offering\n// a unified API for filtering and sorting in a single pass,\n// match-sorter-utils provides the lower-level utilities of\n// ranking items and comparing ranks in a way that can\n// be incrementally applied to a system rather than\n// all-at-once.\n\n// 1. Use the rankItem function to rank an item\n// 2. Use the resulting rankingInfo.passed to filter\n// 3. Use the resulting rankingInfo.rank to sort\n\n// For bundling purposes (mainly remove-accents not being esm safe/ready),\n// we've also hard-coded remove-accents into this source.\n// The remove-accents package is still included as a dependency\n// for attribution purposes, but it will not be imported and bundled.\n\nimport { removeAccents } from './remove-accents'\n\nexport type AccessorAttributes = {\n  threshold?: Ranking\n  maxRanking: Ranking\n  minRanking: Ranking\n}\n\nexport interface RankingInfo {\n  rankedValue: any\n  rank: Ranking\n  accessorIndex: number\n  accessorThreshold: Ranking | undefined\n  passed: boolean\n}\n\nexport interface AccessorOptions<TItem> {\n  accessor: AccessorFn<TItem>\n  threshold?: Ranking\n  maxRanking?: Ranking\n  minRanking?: Ranking\n}\n\nexport type AccessorFn<TItem> = (item: TItem) => string | Array<string>\n\nexport type Accessor<TItem> = AccessorFn<TItem> | AccessorOptions<TItem>\n\nexport interface RankItemOptions<TItem = unknown> {\n  accessors?: ReadonlyArray<Accessor<TItem>>\n  threshold?: Ranking\n  keepDiacritics?: boolean\n}\n\nexport const rankings = {\n  CASE_SENSITIVE_EQUAL: 7,\n  EQUAL: 6,\n  STARTS_WITH: 5,\n  WORD_STARTS_WITH: 4,\n  CONTAINS: 3,\n  ACRONYM: 2,\n  MATCHES: 1,\n  NO_MATCH: 0,\n} as const\n\nexport type Ranking = (typeof rankings)[keyof typeof rankings]\n\n/**\n * Gets the highest ranking for value for the given item based on its values for the given keys\n * @param {*} item - the item to rank\n * @param {String} value - the value to rank against\n * @param {Object} options - options to control the ranking\n * @return {{rank: Number, accessorIndex: Number, accessorThreshold: Number}} - the highest ranking\n */\nexport function rankItem<TItem>(\n  item: TItem,\n  value: string,\n  options?: RankItemOptions<TItem>,\n): RankingInfo {\n  options = options || {}\n\n  options.threshold = options.threshold ?? rankings.MATCHES\n\n  if (!options.accessors) {\n    // if keys is not specified, then we assume the item given is ready to be matched\n    const rank = getMatchRanking(item as unknown as string, value, options)\n    return {\n      // ends up being duplicate of 'item' in matches but consistent\n      rankedValue: item,\n      rank,\n      accessorIndex: -1,\n      accessorThreshold: options.threshold,\n      passed: rank >= options.threshold,\n    }\n  }\n\n  const valuesToRank = getAllValuesToRank(item, options.accessors)\n\n  const rankingInfo: RankingInfo = {\n    rankedValue: item,\n    rank: rankings.NO_MATCH as Ranking,\n    accessorIndex: -1,\n    accessorThreshold: options.threshold,\n    passed: false,\n  }\n\n  for (let i = 0; i < valuesToRank.length; i++) {\n    const rankValue = valuesToRank[i]!\n\n    let newRank = getMatchRanking(rankValue.itemValue, value, options)\n\n    const {\n      minRanking,\n      maxRanking,\n      threshold = options.threshold,\n    } = rankValue.attributes\n\n    if (newRank < minRanking && newRank >= rankings.MATCHES) {\n      newRank = minRanking\n    } else if (newRank > maxRanking) {\n      newRank = maxRanking\n    }\n\n    newRank = Math.min(newRank, maxRanking) as Ranking\n\n    if (newRank >= threshold && newRank > rankingInfo.rank) {\n      rankingInfo.rank = newRank\n      rankingInfo.passed = true\n      rankingInfo.accessorIndex = i\n      rankingInfo.accessorThreshold = threshold\n      rankingInfo.rankedValue = rankValue.itemValue\n    }\n  }\n\n  return rankingInfo\n}\n\n/**\n * Gives a rankings score based on how well the two strings match.\n * @param {String} testString - the string to test against\n * @param {String} stringToRank - the string to rank\n * @param {Object} options - options for the match (like keepDiacritics for comparison)\n * @returns {Number} the ranking for how well stringToRank matches testString\n */\nfunction getMatchRanking<TItem>(\n  testString: string,\n  stringToRank: string,\n  options: RankItemOptions<TItem>,\n): Ranking {\n  testString = prepareValueForComparison(testString, options)\n  stringToRank = prepareValueForComparison(stringToRank, options)\n\n  // too long\n  if (stringToRank.length > testString.length) {\n    return rankings.NO_MATCH\n  }\n\n  // case sensitive equals\n  if (testString === stringToRank) {\n    return rankings.CASE_SENSITIVE_EQUAL\n  }\n\n  // Lower casing before further comparison\n  testString = testString.toLowerCase()\n  stringToRank = stringToRank.toLowerCase()\n\n  // case insensitive equals\n  if (testString === stringToRank) {\n    return rankings.EQUAL\n  }\n\n  // starts with\n  if (testString.startsWith(stringToRank)) {\n    return rankings.STARTS_WITH\n  }\n\n  // word starts with\n  if (testString.includes(` ${stringToRank}`)) {\n    return rankings.WORD_STARTS_WITH\n  }\n\n  // contains\n  if (testString.includes(stringToRank)) {\n    return rankings.CONTAINS\n  } else if (stringToRank.length === 1) {\n    // If the only character in the given stringToRank\n    //   isn't even contained in the testString, then\n    //   it's definitely not a match.\n    return rankings.NO_MATCH\n  }\n\n  // acronym\n  if (getAcronym(testString).includes(stringToRank)) {\n    return rankings.ACRONYM\n  }\n\n  // will return a number between rankings.MATCHES and\n  // rankings.MATCHES + 1 depending  on how close of a match it is.\n  return getClosenessRanking(testString, stringToRank)\n}\n\n/**\n * Generates an acronym for a string.\n *\n * @param {String} string the string for which to produce the acronym\n * @returns {String} the acronym\n */\nfunction getAcronym(string: string): string {\n  let acronym = ''\n  const wordsInString = string.split(' ')\n  wordsInString.forEach((wordInString) => {\n    const splitByHyphenWords = wordInString.split('-')\n    splitByHyphenWords.forEach((splitByHyphenWord) => {\n      acronym += splitByHyphenWord.substr(0, 1)\n    })\n  })\n  return acronym\n}\n\n/**\n * Returns a score based on how spread apart the\n * characters from the stringToRank are within the testString.\n * A number close to rankings.MATCHES represents a loose match. A number close\n * to rankings.MATCHES + 1 represents a tighter match.\n * @param {String} testString - the string to test against\n * @param {String} stringToRank - the string to rank\n * @returns {Number} the number between rankings.MATCHES and\n * rankings.MATCHES + 1 for how well stringToRank matches testString\n */\nfunction getClosenessRanking(\n  testString: string,\n  stringToRank: string,\n): Ranking {\n  let matchingInOrderCharCount = 0\n  let charNumber = 0\n  function findMatchingCharacter(\n    matchChar: undefined | string,\n    string: string,\n    index: number,\n  ) {\n    for (let j = index, J = string.length; j < J; j++) {\n      const stringChar = string[j]\n      if (stringChar === matchChar) {\n        matchingInOrderCharCount += 1\n        return j + 1\n      }\n    }\n    return -1\n  }\n  function getRanking(spread: number) {\n    const spreadPercentage = 1 / spread\n    const inOrderPercentage = matchingInOrderCharCount / stringToRank.length\n    const ranking = rankings.MATCHES + inOrderPercentage * spreadPercentage\n    return ranking as Ranking\n  }\n  const firstIndex = findMatchingCharacter(stringToRank[0], testString, 0)\n  if (firstIndex < 0) {\n    return rankings.NO_MATCH\n  }\n  charNumber = firstIndex\n  for (let i = 1, I = stringToRank.length; i < I; i++) {\n    const matchChar = stringToRank[i]\n    charNumber = findMatchingCharacter(matchChar, testString, charNumber)\n    const found = charNumber > -1\n    if (!found) {\n      return rankings.NO_MATCH\n    }\n  }\n\n  const spread = charNumber - firstIndex\n  return getRanking(spread)\n}\n\n/**\n * Sorts items that have a rank, index, and accessorIndex\n * @param {Object} a - the first item to sort\n * @param {Object} b - the second item to sort\n * @return {Number} -1 if a should come first, 1 if b should come first, 0 if equal\n */\nexport function compareItems<TItem>(a: RankingInfo, b: RankingInfo): number {\n  return a.rank === b.rank ? 0 : a.rank > b.rank ? -1 : 1\n}\n\n/**\n * Prepares value for comparison by stringifying it, removing diacritics (if specified)\n * @param {String} value - the value to clean\n * @param {Object} options - {keepDiacritics: whether to remove diacritics}\n * @return {String} the prepared value\n */\nfunction prepareValueForComparison<TItem>(\n  value: string,\n  { keepDiacritics }: RankItemOptions<TItem>,\n): string {\n  // value might not actually be a string at this point (we don't get to choose)\n  // so part of preparing the value for comparison is ensure that it is a string\n  value = `${value}` // toString\n  if (!keepDiacritics) {\n    value = removeAccents(value)\n  }\n  return value\n}\n\n/**\n * Gets value for key in item at arbitrarily nested keypath\n * @param {Object} item - the item\n * @param {Object|Function} key - the potentially nested keypath or property callback\n * @return {Array} - an array containing the value(s) at the nested keypath\n */\nfunction getItemValues<TItem>(\n  item: TItem,\n  accessor: Accessor<TItem>,\n): Array<string> {\n  let accessorFn = accessor as AccessorFn<TItem>\n\n  if (typeof accessor === 'object') {\n    accessorFn = accessor.accessor\n  }\n\n  const value = accessorFn(item)\n\n  // because `value` can also be undefined\n  if (value == null) {\n    return []\n  }\n\n  if (Array.isArray(value)) {\n    return value\n  }\n\n  return [String(value)]\n}\n\n/**\n * Gets all the values for the given keys in the given item and returns an array of those values\n * @param item - the item from which the values will be retrieved\n * @param keys - the keys to use to retrieve the values\n * @return objects with {itemValue, attributes}\n */\nfunction getAllValuesToRank<TItem>(\n  item: TItem,\n  accessors: ReadonlyArray<Accessor<TItem>>,\n) {\n  const allValues: Array<{\n    itemValue: string\n    attributes: AccessorAttributes\n  }> = []\n  for (let j = 0, J = accessors.length; j < J; j++) {\n    const accessor = accessors[j]!\n    const attributes = getAccessorAttributes(accessor)\n    const itemValues = getItemValues(item, accessor)\n    for (let i = 0, I = itemValues.length; i < I; i++) {\n      allValues.push({\n        itemValue: itemValues[i]!,\n        attributes,\n      })\n    }\n  }\n  return allValues\n}\n\nconst defaultKeyAttributes = {\n  maxRanking: Infinity as Ranking,\n  minRanking: -Infinity as Ranking,\n}\n/**\n * Gets all the attributes for the given accessor\n * @param accessor - the accessor from which the attributes will be retrieved\n * @return object containing the accessor's attributes\n */\nfunction getAccessorAttributes<TItem>(\n  accessor: Accessor<TItem>,\n): AccessorAttributes {\n  if (typeof accessor === 'function') {\n    return defaultKeyAttributes\n  }\n  return { ...defaultKeyAttributes, ...accessor }\n}\n"
  },
  {
    "path": "packages/match-sorter-utils/src/remove-accents.ts",
    "content": "const characterMap: Record<string, string> = {\n  À: 'A',\n  Á: 'A',\n  Â: 'A',\n  Ã: 'A',\n  Ä: 'A',\n  Å: 'A',\n  Ấ: 'A',\n  Ắ: 'A',\n  Ẳ: 'A',\n  Ẵ: 'A',\n  Ặ: 'A',\n  Æ: 'AE',\n  Ầ: 'A',\n  Ằ: 'A',\n  Ȃ: 'A',\n  Ç: 'C',\n  Ḉ: 'C',\n  È: 'E',\n  É: 'E',\n  Ê: 'E',\n  Ë: 'E',\n  Ế: 'E',\n  Ḗ: 'E',\n  Ề: 'E',\n  Ḕ: 'E',\n  Ḝ: 'E',\n  Ȇ: 'E',\n  Ì: 'I',\n  Í: 'I',\n  Î: 'I',\n  Ï: 'I',\n  Ḯ: 'I',\n  Ȋ: 'I',\n  Ð: 'D',\n  Ñ: 'N',\n  Ò: 'O',\n  Ó: 'O',\n  Ô: 'O',\n  Õ: 'O',\n  Ö: 'O',\n  Ø: 'O',\n  Ố: 'O',\n  Ṍ: 'O',\n  Ṓ: 'O',\n  Ȏ: 'O',\n  Ù: 'U',\n  Ú: 'U',\n  Û: 'U',\n  Ü: 'U',\n  Ý: 'Y',\n  à: 'a',\n  á: 'a',\n  â: 'a',\n  ã: 'a',\n  ä: 'a',\n  å: 'a',\n  ấ: 'a',\n  ắ: 'a',\n  ẳ: 'a',\n  ẵ: 'a',\n  ặ: 'a',\n  æ: 'ae',\n  ầ: 'a',\n  ằ: 'a',\n  ȃ: 'a',\n  ç: 'c',\n  ḉ: 'c',\n  è: 'e',\n  é: 'e',\n  ê: 'e',\n  ë: 'e',\n  ế: 'e',\n  ḗ: 'e',\n  ề: 'e',\n  ḕ: 'e',\n  ḝ: 'e',\n  ȇ: 'e',\n  ì: 'i',\n  í: 'i',\n  î: 'i',\n  ï: 'i',\n  ḯ: 'i',\n  ȋ: 'i',\n  ð: 'd',\n  ñ: 'n',\n  ò: 'o',\n  ó: 'o',\n  ô: 'o',\n  õ: 'o',\n  ö: 'o',\n  ø: 'o',\n  ố: 'o',\n  ṍ: 'o',\n  ṓ: 'o',\n  ȏ: 'o',\n  ù: 'u',\n  ú: 'u',\n  û: 'u',\n  ü: 'u',\n  ý: 'y',\n  ÿ: 'y',\n  Ā: 'A',\n  ā: 'a',\n  Ă: 'A',\n  ă: 'a',\n  Ą: 'A',\n  ą: 'a',\n  Ć: 'C',\n  ć: 'c',\n  Ĉ: 'C',\n  ĉ: 'c',\n  Ċ: 'C',\n  ċ: 'c',\n  Č: 'C',\n  č: 'c',\n  C̆: 'C',\n  c̆: 'c',\n  Ď: 'D',\n  ď: 'd',\n  Đ: 'D',\n  đ: 'd',\n  Ē: 'E',\n  ē: 'e',\n  Ĕ: 'E',\n  ĕ: 'e',\n  Ė: 'E',\n  ė: 'e',\n  Ę: 'E',\n  ę: 'e',\n  Ě: 'E',\n  ě: 'e',\n  Ĝ: 'G',\n  Ǵ: 'G',\n  ĝ: 'g',\n  ǵ: 'g',\n  Ğ: 'G',\n  ğ: 'g',\n  Ġ: 'G',\n  ġ: 'g',\n  Ģ: 'G',\n  ģ: 'g',\n  Ĥ: 'H',\n  ĥ: 'h',\n  Ħ: 'H',\n  ħ: 'h',\n  Ḫ: 'H',\n  ḫ: 'h',\n  Ĩ: 'I',\n  ĩ: 'i',\n  Ī: 'I',\n  ī: 'i',\n  Ĭ: 'I',\n  ĭ: 'i',\n  Į: 'I',\n  į: 'i',\n  İ: 'I',\n  ı: 'i',\n  Ĳ: 'IJ',\n  ĳ: 'ij',\n  Ĵ: 'J',\n  ĵ: 'j',\n  Ķ: 'K',\n  ķ: 'k',\n  Ḱ: 'K',\n  ḱ: 'k',\n  K̆: 'K',\n  k̆: 'k',\n  Ĺ: 'L',\n  ĺ: 'l',\n  Ļ: 'L',\n  ļ: 'l',\n  Ľ: 'L',\n  ľ: 'l',\n  Ŀ: 'L',\n  ŀ: 'l',\n  Ł: 'l',\n  ł: 'l',\n  Ḿ: 'M',\n  ḿ: 'm',\n  M̆: 'M',\n  m̆: 'm',\n  Ń: 'N',\n  ń: 'n',\n  Ņ: 'N',\n  ņ: 'n',\n  Ň: 'N',\n  ň: 'n',\n  ŉ: 'n',\n  N̆: 'N',\n  n̆: 'n',\n  Ō: 'O',\n  ō: 'o',\n  Ŏ: 'O',\n  ŏ: 'o',\n  Ő: 'O',\n  ő: 'o',\n  Œ: 'OE',\n  œ: 'oe',\n  P̆: 'P',\n  p̆: 'p',\n  Ŕ: 'R',\n  ŕ: 'r',\n  Ŗ: 'R',\n  ŗ: 'r',\n  Ř: 'R',\n  ř: 'r',\n  R̆: 'R',\n  r̆: 'r',\n  Ȓ: 'R',\n  ȓ: 'r',\n  Ś: 'S',\n  ś: 's',\n  Ŝ: 'S',\n  ŝ: 's',\n  Ş: 'S',\n  Ș: 'S',\n  ș: 's',\n  ş: 's',\n  Š: 'S',\n  š: 's',\n  Ţ: 'T',\n  ţ: 't',\n  ț: 't',\n  Ț: 'T',\n  Ť: 'T',\n  ť: 't',\n  Ŧ: 'T',\n  ŧ: 't',\n  T̆: 'T',\n  t̆: 't',\n  Ũ: 'U',\n  ũ: 'u',\n  Ū: 'U',\n  ū: 'u',\n  Ŭ: 'U',\n  ŭ: 'u',\n  Ů: 'U',\n  ů: 'u',\n  Ű: 'U',\n  ű: 'u',\n  Ų: 'U',\n  ų: 'u',\n  Ȗ: 'U',\n  ȗ: 'u',\n  V̆: 'V',\n  v̆: 'v',\n  Ŵ: 'W',\n  ŵ: 'w',\n  Ẃ: 'W',\n  ẃ: 'w',\n  X̆: 'X',\n  x̆: 'x',\n  Ŷ: 'Y',\n  ŷ: 'y',\n  Ÿ: 'Y',\n  Y̆: 'Y',\n  y̆: 'y',\n  Ź: 'Z',\n  ź: 'z',\n  Ż: 'Z',\n  ż: 'z',\n  Ž: 'Z',\n  ž: 'z',\n  ſ: 's',\n  ƒ: 'f',\n  Ơ: 'O',\n  ơ: 'o',\n  Ư: 'U',\n  ư: 'u',\n  Ǎ: 'A',\n  ǎ: 'a',\n  Ǐ: 'I',\n  ǐ: 'i',\n  Ǒ: 'O',\n  ǒ: 'o',\n  Ǔ: 'U',\n  ǔ: 'u',\n  Ǖ: 'U',\n  ǖ: 'u',\n  Ǘ: 'U',\n  ǘ: 'u',\n  Ǚ: 'U',\n  ǚ: 'u',\n  Ǜ: 'U',\n  ǜ: 'u',\n  Ứ: 'U',\n  ứ: 'u',\n  Ṹ: 'U',\n  ṹ: 'u',\n  Ǻ: 'A',\n  ǻ: 'a',\n  Ǽ: 'AE',\n  ǽ: 'ae',\n  Ǿ: 'O',\n  ǿ: 'o',\n  Þ: 'TH',\n  þ: 'th',\n  Ṕ: 'P',\n  ṕ: 'p',\n  Ṥ: 'S',\n  ṥ: 's',\n  X́: 'X',\n  x́: 'x',\n  Ѓ: 'Г',\n  ѓ: 'г',\n  Ќ: 'К',\n  ќ: 'к',\n  A̋: 'A',\n  a̋: 'a',\n  E̋: 'E',\n  e̋: 'e',\n  I̋: 'I',\n  i̋: 'i',\n  Ǹ: 'N',\n  ǹ: 'n',\n  Ồ: 'O',\n  ồ: 'o',\n  Ṑ: 'O',\n  ṑ: 'o',\n  Ừ: 'U',\n  ừ: 'u',\n  Ẁ: 'W',\n  ẁ: 'w',\n  Ỳ: 'Y',\n  ỳ: 'y',\n  Ȁ: 'A',\n  ȁ: 'a',\n  Ȅ: 'E',\n  ȅ: 'e',\n  Ȉ: 'I',\n  ȉ: 'i',\n  Ȍ: 'O',\n  ȍ: 'o',\n  Ȑ: 'R',\n  ȑ: 'r',\n  Ȕ: 'U',\n  ȕ: 'u',\n  B̌: 'B',\n  b̌: 'b',\n  Č̣: 'C',\n  č̣: 'c',\n  Ê̌: 'E',\n  ê̌: 'e',\n  F̌: 'F',\n  f̌: 'f',\n  Ǧ: 'G',\n  ǧ: 'g',\n  Ȟ: 'H',\n  ȟ: 'h',\n  J̌: 'J',\n  ǰ: 'j',\n  Ǩ: 'K',\n  ǩ: 'k',\n  M̌: 'M',\n  m̌: 'm',\n  P̌: 'P',\n  p̌: 'p',\n  Q̌: 'Q',\n  q̌: 'q',\n  Ř̩: 'R',\n  ř̩: 'r',\n  Ṧ: 'S',\n  ṧ: 's',\n  V̌: 'V',\n  v̌: 'v',\n  W̌: 'W',\n  w̌: 'w',\n  X̌: 'X',\n  x̌: 'x',\n  Y̌: 'Y',\n  y̌: 'y',\n  A̧: 'A',\n  a̧: 'a',\n  B̧: 'B',\n  b̧: 'b',\n  Ḑ: 'D',\n  ḑ: 'd',\n  Ȩ: 'E',\n  ȩ: 'e',\n  Ɛ̧: 'E',\n  ɛ̧: 'e',\n  Ḩ: 'H',\n  ḩ: 'h',\n  I̧: 'I',\n  i̧: 'i',\n  Ɨ̧: 'I',\n  ɨ̧: 'i',\n  M̧: 'M',\n  m̧: 'm',\n  O̧: 'O',\n  o̧: 'o',\n  Q̧: 'Q',\n  q̧: 'q',\n  U̧: 'U',\n  u̧: 'u',\n  X̧: 'X',\n  x̧: 'x',\n  Z̧: 'Z',\n  z̧: 'z',\n}\n\nconst chars = Object.keys(characterMap).join('|')\nconst allAccents = new RegExp(chars, 'g')\n\nexport function removeAccents(str: string) {\n  return str.replace(allAccents, (match) => {\n    return characterMap[match]!\n  })\n}\n"
  },
  {
    "path": "packages/match-sorter-utils/tests/match-sorter-utils.test.ts",
    "content": "import { describe, expect, it } from 'vitest'\nimport { rankings, rankItem } from '../src'\n\ninterface Person {\n  firstName: string\n  lastName: string\n  email: string\n}\n\nconst testPerson: Person = {\n  firstName: 'John',\n  lastName: 'Doe',\n  email: 'j.doe@email.com',\n}\n\ndescribe('match-sorter-utils', () => {\n  describe('rankItem', () => {\n    describe('with accessorFn', () => {\n      it('CASE_SENSITIVE_EQUAL', () => {\n        const ranking = rankItem(testPerson, 'John', {\n          accessors: [\n            (item) => item.firstName,\n            (item) => item.lastName,\n            (item) => item.email,\n          ],\n        })\n        expect(ranking.rank).toBe(rankings.CASE_SENSITIVE_EQUAL)\n        expect(ranking.passed).toBe(true)\n        expect(ranking.rankedValue).toBe(testPerson.firstName)\n        expect(ranking.accessorIndex).toBe(0)\n        expect(ranking.accessorThreshold).toBe(1)\n      })\n\n      it('NO_MATCH', () => {\n        const ranking = rankItem(testPerson, 'Tom', {\n          accessors: [\n            (item) => item.firstName,\n            (item) => item.lastName,\n            (item) => item.email,\n          ],\n        })\n        expect(ranking.rank).toBe(rankings.NO_MATCH)\n        expect(ranking.passed).toBe(false)\n        expect(ranking.rankedValue).toBe(testPerson)\n        expect(ranking.accessorIndex).toBe(-1)\n        expect(ranking.accessorThreshold).toBe(1)\n      })\n    })\n\n    describe('with accessorOptions and custom Threshold', () => {\n      it('CASE_SENSITIVE_EQUAL', () => {\n        const ranking = rankItem(testPerson, 'John', {\n          accessors: [\n            {\n              accessor: (item) => item.firstName,\n              threshold: rankings.CONTAINS,\n            },\n            {\n              accessor: (item) => item.lastName,\n              threshold: rankings.CONTAINS,\n            },\n            {\n              accessor: (item) => item.email,\n              threshold: rankings.MATCHES,\n            },\n          ],\n        })\n        expect(ranking.rank).toBe(rankings.CASE_SENSITIVE_EQUAL)\n        expect(ranking.passed).toBe(true)\n        expect(ranking.rankedValue).toBe(testPerson.firstName)\n        expect(ranking.accessorIndex).toBe(0)\n        expect(ranking.accessorThreshold).toBe(rankings.CONTAINS)\n      })\n\n      it('ACRONYM but threshold is CONTAINS', () => {\n        const ranking = rankItem(testPerson, 'jd', {\n          threshold: rankings.ACRONYM,\n          accessors: [\n            {\n              accessor: (item) => item.firstName,\n              threshold: rankings.CONTAINS,\n            },\n            {\n              accessor: (item) => item.lastName,\n              threshold: rankings.CONTAINS,\n            },\n            {\n              accessor: (item) => `${item.firstName} ${item.lastName}`,\n              threshold: rankings.CONTAINS,\n            },\n            {\n              accessor: (item) => item.email,\n              threshold: rankings.CONTAINS,\n            },\n          ],\n        })\n        expect(ranking.rank).toBe(rankings.NO_MATCH)\n        expect(ranking.passed).toBe(false)\n        expect(ranking.rankedValue).toBe(testPerson)\n        expect(ranking.accessorIndex).toBe(-1)\n        expect(ranking.accessorThreshold).toBe(rankings.ACRONYM)\n      })\n\n      it('NO_MATCH', () => {\n        const ranking = rankItem(testPerson, 'Tom', {\n          accessors: [\n            {\n              accessor: (item) => item.firstName,\n              threshold: rankings.CONTAINS,\n            },\n            {\n              accessor: (item) => item.lastName,\n              threshold: rankings.CONTAINS,\n            },\n            {\n              accessor: (item) => item.email,\n              threshold: rankings.MATCHES,\n            },\n          ],\n        })\n        expect(ranking.rank).toBe(rankings.NO_MATCH)\n        expect(ranking.passed).toBe(false)\n        expect(ranking.rankedValue).toBe(testPerson)\n        expect(ranking.accessorIndex).toBe(-1)\n        expect(ranking.accessorThreshold).toBe(1)\n      })\n    })\n  })\n})\n"
  },
  {
    "path": "packages/match-sorter-utils/tests/test-setup.ts",
    "content": "import '@testing-library/jest-dom/vitest'\n"
  },
  {
    "path": "packages/match-sorter-utils/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig.json\",\n  \"include\": [\"src\", \"vite.config.ts\", \"tests\"]\n}\n"
  },
  {
    "path": "packages/match-sorter-utils/vite.config.ts",
    "content": "import { defineConfig, mergeConfig } from 'vitest/config'\nimport { tanstackViteConfig } from '@tanstack/vite-config'\nimport packageJson from './package.json'\n\nconst config = defineConfig({\n  test: {\n    name: packageJson.name,\n    dir: './tests',\n    watch: false,\n    environment: 'jsdom',\n    setupFiles: ['./tests/test-setup.ts'],\n  },\n})\n\nexport default mergeConfig(\n  config,\n  tanstackViteConfig({\n    cjs: false,\n    entry: './src/index.ts',\n    srcDir: './src',\n  }),\n)\n"
  },
  {
    "path": "packages/preact-table/eslint.config.js",
    "content": "// @ts-check\n\nimport rootConfig from '../../eslint.config.js'\n\n/** @type {any} */\nconst config = [\n  ...rootConfig,\n  {\n    rules: {},\n  },\n]\n\nexport default config\n"
  },
  {
    "path": "packages/preact-table/package.json",
    "content": "{\n  \"name\": \"@tanstack/preact-table\",\n  \"version\": \"9.0.0-alpha.16\",\n  \"description\": \"Headless UI for building powerful tables & datagrids for Preact.\",\n  \"author\": \"Tanner Linsley\",\n  \"license\": \"MIT\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/TanStack/table.git\",\n    \"directory\": \"packages/preact-table\"\n  },\n  \"homepage\": \"https://tanstack.com/table\",\n  \"funding\": {\n    \"type\": \"github\",\n    \"url\": \"https://github.com/sponsors/tannerlinsley\"\n  },\n  \"keywords\": [\n    \"preact\",\n    \"table\",\n    \"preact-table\",\n    \"datagrid\"\n  ],\n  \"type\": \"module\",\n  \"types\": \"dist/esm/index.d.ts\",\n  \"main\": \"dist/esm/index.js\",\n  \"module\": \"dist/esm/index.js\",\n  \"exports\": {\n    \".\": {\n      \"import\": {\n        \"types\": \"./dist/esm/index.d.ts\",\n        \"default\": \"./dist/esm/index.js\"\n      }\n    },\n    \"./package.json\": \"./package.json\"\n  },\n  \"sideEffects\": false,\n  \"engines\": {\n    \"node\": \">=16\"\n  },\n  \"files\": [\n    \"dist\",\n    \"src\"\n  ],\n  \"scripts\": {\n    \"clean\": \"rimraf ./build && rimraf ./dist\",\n    \"test:eslint\": \"eslint ./src\",\n    \"test:lib\": \"vitest --passWithNoTests\",\n    \"test:lib:dev\": \"pnpm test:lib --watch\",\n    \"test:types\": \"tsc\",\n    \"test:build\": \"publint --strict\",\n    \"build\": \"vite build\"\n  },\n  \"dependencies\": {\n    \"@tanstack/preact-store\": \"^0.11.1\",\n    \"@tanstack/table-core\": \"workspace:*\"\n  },\n  \"devDependencies\": {\n    \"@preact/preset-vite\": \"^2.10.3\",\n    \"preact\": \"^10.28.2\"\n  },\n  \"peerDependencies\": {\n    \"preact\": \">=10\"\n  }\n}\n"
  },
  {
    "path": "packages/preact-table/src/FlexRender.tsx",
    "content": "import type {\n  Cell,\n  CellData,\n  Header,\n  RowData,\n  TableFeatures,\n} from '@tanstack/table-core'\nimport type { ComponentChild, ComponentType } from 'preact'\n\nexport type Renderable<TProps> = ComponentChild | ComponentType<TProps>\n\nfunction isPreactComponent<TProps>(\n  component: unknown,\n): component is ComponentType<TProps> {\n  return (\n    isClassComponent(component) ||\n    typeof component === 'function' ||\n    isExoticComponent(component)\n  )\n}\n\nfunction isClassComponent(component: any) {\n  return (\n    typeof component === 'function' &&\n    (() => {\n      const proto = Object.getPrototypeOf(component)\n      return proto.prototype && proto.prototype.isPreactComponent\n    })()\n  )\n}\n\nfunction isExoticComponent(component: any) {\n  return (\n    typeof component === 'object' &&\n    typeof component.$$typeof === 'symbol' &&\n    ['preact.memo', 'preact.forward_ref'].includes(\n      component.$$typeof.description,\n    )\n  )\n}\n\n/**\n * If rendering headers, cells, or footers with custom markup, use flexRender instead of `cell.getValue()` or `cell.renderValue()`.\n * @example flexRender(cell.column.columnDef.cell, cell.getContext())\n */\nexport function flexRender<TProps extends object>(\n  Comp: Renderable<TProps> | null,\n  props: TProps,\n): ComponentChild | Element | null {\n  return !Comp ? null : isPreactComponent<TProps>(Comp) ? (\n    <Comp {...props} />\n  ) : (\n    Comp\n  )\n}\n\n/**\n * Simplified component wrapper of `flexRender`. Use this utility component to render headers, cells, or footers with custom markup.\n * Only one prop (`cell`, `header`, or `footer`) may be passed.\n * @example <FlexRender cell={cell} />\n * @example <FlexRender header={header} />\n * @example <FlexRender footer={footer} />\n */\nexport type FlexRenderProps<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n> =\n  | { cell: Cell<TFeatures, TData, TValue>; header?: never; footer?: never }\n  | {\n      header: Header<TFeatures, TData, TValue>\n      cell?: never\n      footer?: never\n    }\n  | {\n      footer: Header<TFeatures, TData, TValue>\n      cell?: never\n      header?: never\n    }\n\n/**\n * Simplified component wrapper of `flexRender`. Use this utility component to render headers, cells, or footers with custom markup.\n * Only one prop (`cell`, `header`, or `footer`) may be passed.\n * @example\n * ```tsx\n * <FlexRender cell={cell} />\n * <FlexRender header={header} />\n * <FlexRender footer={footer} />\n * ```\n *\n * This replaces calling `flexRender` directly like this:\n * ```tsx\n * flexRender(cell.column.columnDef.cell, cell.getContext())\n * flexRender(header.column.columnDef.header, header.getContext())\n * flexRender(footer.column.columnDef.footer, footer.getContext())\n * ```\n */\nexport function FlexRender<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n>(props: FlexRenderProps<TFeatures, TData, TValue>) {\n  if ('cell' in props && props.cell) {\n    return flexRender(props.cell.column.columnDef.cell, props.cell.getContext())\n  }\n  if ('header' in props && props.header) {\n    return flexRender(\n      props.header.column.columnDef.header,\n      props.header.getContext(),\n    )\n  }\n  if ('footer' in props && props.footer) {\n    return flexRender(\n      props.footer.column.columnDef.footer,\n      props.footer.getContext(),\n    )\n  }\n  return null\n}\n"
  },
  {
    "path": "packages/preact-table/src/Subscribe.ts",
    "content": "import { useStore } from '@tanstack/preact-store'\nimport type {\n  NoInfer,\n  RowData,\n  Table,\n  TableFeatures,\n  TableState,\n} from '@tanstack/table-core'\nimport type { ComponentChildren } from 'preact'\n\nexport type SubscribeProps<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TSelected = {},\n> = {\n  /**\n   * The table instance to subscribe to. Required when using as a standalone component.\n   * Not needed when using as `table.Subscribe`.\n   */\n  table: Table<TFeatures, TData>\n  /**\n   * A selector function that selects the part of the table state to subscribe to.\n   * This allows for fine-grained reactivity by only re-rendering when the selected state changes.\n   */\n  selector: (state: NoInfer<TableState<TFeatures>>) => TSelected\n  /**\n   * The children to render. Can be a function that receives the selected state, or a Preact node.\n   */\n  children: ((state: TSelected) => ComponentChildren) | ComponentChildren\n}\n\n/**\n * A Preact component that allows you to subscribe to the table state.\n *\n * This is useful for opting into state re-renders for specific parts of the table state.\n *\n * @example\n * ```tsx\n * // As a standalone component\n * <Subscribe table={table} selector={(state) => ({ rowSelection: state.rowSelection })}>\n *   {({ rowSelection }) => (\n *     <div>Selected rows: {Object.keys(rowSelection).length}</div>\n *   )}\n * </Subscribe>\n * ```\n *\n * @example\n * ```tsx\n * // As table.Subscribe (table instance method)\n * <table.Subscribe selector={(state) => ({ rowSelection: state.rowSelection })}>\n *   {({ rowSelection }) => (\n *     <div>Selected rows: {Object.keys(rowSelection).length}</div>\n *   )}\n * </table.Subscribe>\n * ```\n */\nexport function Subscribe<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TSelected = {},\n>(props: SubscribeProps<TFeatures, TData, TSelected>): ComponentChildren {\n  const selected = useStore(props.table.store, props.selector)\n\n  return typeof props.children === 'function'\n    ? props.children(selected)\n    : props.children\n}\n"
  },
  {
    "path": "packages/preact-table/src/createTableHook.tsx",
    "content": "'use client'\nimport { createContext } from 'preact'\nimport { useContext, useMemo } from 'preact/hooks'\nimport { createColumnHelper as coreCreateColumnHelper } from '@tanstack/table-core'\nimport { useTable } from './useTable'\nimport { FlexRender } from './FlexRender'\nimport type {\n  AccessorFn,\n  AccessorFnColumnDef,\n  AccessorKeyColumnDef,\n  Cell,\n  CellContext,\n  CellData,\n  Column,\n  ColumnDef,\n  DeepKeys,\n  DeepValue,\n  DisplayColumnDef,\n  GroupColumnDef,\n  Header,\n  IdentifiedColumnDef,\n  NoInfer,\n  Row,\n  RowData,\n  Table,\n  TableFeatures,\n  TableOptions,\n  TableState,\n} from '@tanstack/table-core'\nimport type { ComponentChildren, ComponentType } from 'preact'\nimport type { PreactTable } from './useTable'\n\n// =============================================================================\n// Enhanced Context Types with Pre-bound Components\n// =============================================================================\n\n/**\n * Enhanced CellContext with pre-bound cell components.\n * The `cell` property includes the registered cellComponents.\n */\nexport type AppCellContext<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData,\n  TCellComponents extends Record<string, ComponentType<any>>,\n> = {\n  cell: Cell<TFeatures, TData, TValue> &\n    TCellComponents & { FlexRender: () => ComponentChildren }\n  column: Column<TFeatures, TData, TValue>\n  getValue: CellContext<TFeatures, TData, TValue>['getValue']\n  renderValue: CellContext<TFeatures, TData, TValue>['renderValue']\n  row: Row<TFeatures, TData>\n  table: Table<TFeatures, TData>\n}\n\n/**\n * Enhanced HeaderContext with pre-bound header components.\n * The `header` property includes the registered headerComponents.\n */\nexport type AppHeaderContext<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData,\n  THeaderComponents extends Record<string, ComponentType<any>>,\n> = {\n  column: Column<TFeatures, TData, TValue>\n  header: Header<TFeatures, TData, TValue> &\n    THeaderComponents & { FlexRender: () => ComponentChildren }\n  table: Table<TFeatures, TData>\n}\n\n// =============================================================================\n// Enhanced Column Definition Types\n// =============================================================================\n\n/**\n * Template type for column definitions that can be a string or a function.\n */\ntype AppColumnDefTemplate<TProps extends object> =\n  | string\n  | ((props: TProps) => any)\n\n/**\n * Enhanced column definition base with pre-bound components in cell/header/footer contexts.\n */\ntype AppColumnDefBase<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData,\n  TCellComponents extends Record<string, ComponentType<any>>,\n  THeaderComponents extends Record<string, ComponentType<any>>,\n> = Omit<\n  IdentifiedColumnDef<TFeatures, TData, TValue>,\n  'cell' | 'header' | 'footer'\n> & {\n  cell?: AppColumnDefTemplate<\n    AppCellContext<TFeatures, TData, TValue, TCellComponents>\n  >\n  header?: AppColumnDefTemplate<\n    AppHeaderContext<TFeatures, TData, TValue, THeaderComponents>\n  >\n  footer?: AppColumnDefTemplate<\n    AppHeaderContext<TFeatures, TData, TValue, THeaderComponents>\n  >\n}\n\n/**\n * Enhanced display column definition with pre-bound components.\n */\ntype AppDisplayColumnDef<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TCellComponents extends Record<string, ComponentType<any>>,\n  THeaderComponents extends Record<string, ComponentType<any>>,\n> = Omit<\n  DisplayColumnDef<TFeatures, TData, unknown>,\n  'cell' | 'header' | 'footer'\n> & {\n  cell?: AppColumnDefTemplate<\n    AppCellContext<TFeatures, TData, unknown, TCellComponents>\n  >\n  header?: AppColumnDefTemplate<\n    AppHeaderContext<TFeatures, TData, unknown, THeaderComponents>\n  >\n  footer?: AppColumnDefTemplate<\n    AppHeaderContext<TFeatures, TData, unknown, THeaderComponents>\n  >\n}\n\n/**\n * Enhanced group column definition with pre-bound components.\n */\ntype AppGroupColumnDef<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TCellComponents extends Record<string, ComponentType<any>>,\n  THeaderComponents extends Record<string, ComponentType<any>>,\n> = Omit<\n  GroupColumnDef<TFeatures, TData, unknown>,\n  'cell' | 'header' | 'footer' | 'columns'\n> & {\n  cell?: AppColumnDefTemplate<\n    AppCellContext<TFeatures, TData, unknown, TCellComponents>\n  >\n  header?: AppColumnDefTemplate<\n    AppHeaderContext<TFeatures, TData, unknown, THeaderComponents>\n  >\n  footer?: AppColumnDefTemplate<\n    AppHeaderContext<TFeatures, TData, unknown, THeaderComponents>\n  >\n  columns?: Array<ColumnDef<TFeatures, TData, unknown>>\n}\n\n// =============================================================================\n// Enhanced Column Helper Type\n// =============================================================================\n\n/**\n * Enhanced column helper with pre-bound components in cell/header/footer contexts.\n * This enables TypeScript to know about the registered components when defining columns.\n */\nexport type AppColumnHelper<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TCellComponents extends Record<string, ComponentType<any>>,\n  THeaderComponents extends Record<string, ComponentType<any>>,\n> = {\n  /**\n   * Creates a data column definition with an accessor key or function.\n   * The cell, header, and footer contexts include pre-bound components.\n   */\n  accessor: <\n    TAccessor extends AccessorFn<TData> | DeepKeys<TData>,\n    TValue extends TAccessor extends AccessorFn<TData, infer TReturn>\n      ? TReturn\n      : TAccessor extends DeepKeys<TData>\n        ? DeepValue<TData, TAccessor>\n        : never,\n  >(\n    accessor: TAccessor,\n    column: TAccessor extends AccessorFn<TData>\n      ? AppColumnDefBase<\n          TFeatures,\n          TData,\n          TValue,\n          TCellComponents,\n          THeaderComponents\n        > & { id: string }\n      : AppColumnDefBase<\n          TFeatures,\n          TData,\n          TValue,\n          TCellComponents,\n          THeaderComponents\n        >,\n  ) => TAccessor extends AccessorFn<TData>\n    ? AccessorFnColumnDef<TFeatures, TData, TValue>\n    : AccessorKeyColumnDef<TFeatures, TData, TValue>\n\n  /**\n   * Wraps an array of column definitions to preserve each column's individual TValue type.\n   */\n  columns: <TColumns extends ReadonlyArray<ColumnDef<TFeatures, TData, any>>>(\n    columns: [...TColumns],\n  ) => Array<ColumnDef<TFeatures, TData, any>> & [...TColumns]\n\n  /**\n   * Creates a display column definition for non-data columns.\n   * The cell, header, and footer contexts include pre-bound components.\n   */\n  display: (\n    column: AppDisplayColumnDef<\n      TFeatures,\n      TData,\n      TCellComponents,\n      THeaderComponents\n    >,\n  ) => DisplayColumnDef<TFeatures, TData, unknown>\n\n  /**\n   * Creates a group column definition with nested child columns.\n   * The cell, header, and footer contexts include pre-bound components.\n   */\n  group: (\n    column: AppGroupColumnDef<\n      TFeatures,\n      TData,\n      TCellComponents,\n      THeaderComponents\n    >,\n  ) => GroupColumnDef<TFeatures, TData, unknown>\n}\n\n// =============================================================================\n// CreateTableHook Options and Props\n// =============================================================================\n\n/**\n * Options for creating a table hook with pre-bound components and default table options.\n * Extends all TableOptions except 'columns' | 'data' | 'store' | 'state' | 'initialState'.\n */\nexport type CreateTableHookOptions<\n  TFeatures extends TableFeatures,\n  TTableComponents extends Record<string, ComponentType<any>>,\n  TCellComponents extends Record<string, ComponentType<any>>,\n  THeaderComponents extends Record<string, ComponentType<any>>,\n> = Omit<\n  TableOptions<TFeatures, any>,\n  'columns' | 'data' | 'store' | 'state' | 'initialState'\n> & {\n  /**\n   * Table-level components that need access to the table instance.\n   * These are available directly on the table object returned by useAppTable.\n   * Use `useTableContext()` inside these components.\n   * @example { PaginationControls, GlobalFilter, RowCount }\n   */\n  tableComponents?: TTableComponents\n  /**\n   * Cell-level components that need access to the cell instance.\n   * These are available on the cell object passed to AppCell's children.\n   * Use `useCellContext()` inside these components.\n   * @example { TextCell, NumberCell, DateCell, CurrencyCell }\n   */\n  cellComponents?: TCellComponents\n  /**\n   * Header-level components that need access to the header instance.\n   * These are available on the header object passed to AppHeader/AppFooter's children.\n   * Use `useHeaderContext()` inside these components.\n   * @example { SortIndicator, ColumnFilter, ResizeHandle }\n   */\n  headerComponents?: THeaderComponents\n}\n\n/**\n * Props for AppTable component - without selector\n */\nexport interface AppTablePropsWithoutSelector {\n  children: ComponentChildren\n  selector?: never\n}\n\n/**\n * Props for AppTable component - with selector\n */\nexport interface AppTablePropsWithSelector<\n  TFeatures extends TableFeatures,\n  TSelected,\n> {\n  children: (state: TSelected) => ComponentChildren\n  selector: (state: TableState<TFeatures>) => TSelected\n}\n\n/**\n * Props for AppCell component - without selector\n */\nexport interface AppCellPropsWithoutSelector<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData,\n  TCellComponents extends Record<string, ComponentType<any>>,\n> {\n  cell: Cell<TFeatures, TData, TValue>\n  children: (\n    cell: Cell<TFeatures, TData, TValue> &\n      TCellComponents & { FlexRender: () => ComponentChildren },\n  ) => ComponentChildren\n  selector?: never\n}\n\n/**\n * Props for AppCell component - with selector\n */\nexport interface AppCellPropsWithSelector<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData,\n  TCellComponents extends Record<string, ComponentType<any>>,\n  TSelected,\n> {\n  cell: Cell<TFeatures, TData, TValue>\n  children: (\n    cell: Cell<TFeatures, TData, TValue> &\n      TCellComponents & { FlexRender: () => ComponentChildren },\n    state: TSelected,\n  ) => ComponentChildren\n  selector: (state: TableState<TFeatures>) => TSelected\n}\n\n/**\n * Props for AppHeader/AppFooter component - without selector\n */\nexport interface AppHeaderPropsWithoutSelector<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData,\n  THeaderComponents extends Record<string, ComponentType<any>>,\n> {\n  header: Header<TFeatures, TData, TValue>\n  children: (\n    header: Header<TFeatures, TData, TValue> &\n      THeaderComponents & { FlexRender: () => ComponentChildren },\n  ) => ComponentChildren\n  selector?: never\n}\n\n/**\n * Props for AppHeader/AppFooter component - with selector\n */\nexport interface AppHeaderPropsWithSelector<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData,\n  THeaderComponents extends Record<string, ComponentType<any>>,\n  TSelected,\n> {\n  header: Header<TFeatures, TData, TValue>\n  children: (\n    header: Header<TFeatures, TData, TValue> &\n      THeaderComponents & { FlexRender: () => ComponentChildren },\n    state: TSelected,\n  ) => ComponentChildren\n  selector: (state: TableState<TFeatures>) => TSelected\n}\n\n/**\n * Component type for AppCell - wraps a cell and provides cell context with optional Subscribe\n */\nexport interface AppCellComponent<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TCellComponents extends Record<string, ComponentType<any>>,\n> {\n  <TValue extends CellData = CellData>(\n    props: AppCellPropsWithoutSelector<\n      TFeatures,\n      TData,\n      TValue,\n      TCellComponents\n    >,\n  ): ComponentChildren\n  <TValue extends CellData = CellData, TSelected = unknown>(\n    props: AppCellPropsWithSelector<\n      TFeatures,\n      TData,\n      TValue,\n      TCellComponents,\n      TSelected\n    >,\n  ): ComponentChildren\n}\n\n/**\n * Component type for AppHeader/AppFooter - wraps a header and provides header context with optional Subscribe\n */\nexport interface AppHeaderComponent<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  THeaderComponents extends Record<string, ComponentType<any>>,\n> {\n  <TValue extends CellData = CellData>(\n    props: AppHeaderPropsWithoutSelector<\n      TFeatures,\n      TData,\n      TValue,\n      THeaderComponents\n    >,\n  ): ComponentChildren\n  <TValue extends CellData = CellData, TSelected = unknown>(\n    props: AppHeaderPropsWithSelector<\n      TFeatures,\n      TData,\n      TValue,\n      THeaderComponents,\n      TSelected\n    >,\n  ): ComponentChildren\n}\n\n/**\n * Component type for AppTable - root wrapper with optional Subscribe\n */\nexport interface AppTableComponent<TFeatures extends TableFeatures> {\n  (props: AppTablePropsWithoutSelector): ComponentChildren\n  <TSelected>(\n    props: AppTablePropsWithSelector<TFeatures, TSelected>,\n  ): ComponentChildren\n}\n\n/**\n * Extended table API returned by useAppTable with all App wrapper components\n */\nexport type AppPreactTable<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TSelected,\n  TTableComponents extends Record<string, ComponentType<any>>,\n  TCellComponents extends Record<string, ComponentType<any>>,\n  THeaderComponents extends Record<string, ComponentType<any>>,\n> = PreactTable<TFeatures, TData, TSelected> &\n  NoInfer<TTableComponents> & {\n    /**\n     * Root wrapper component that provides table context with optional Subscribe.\n     * @example\n     * ```tsx\n     * // Without selector - children is ComponentChildren\n     * <table.AppTable>\n     *   <table>...</table>\n     * </table.AppTable>\n     *\n     * // With selector - children receives selected state\n     * <table.AppTable selector={(s) => s.pagination}>\n     *   {(pagination) => <div>Page {pagination.pageIndex}</div>}\n     * </table.AppTable>\n     * ```\n     */\n    AppTable: AppTableComponent<TFeatures>\n    /**\n     * Wraps a cell and provides cell context with pre-bound cellComponents.\n     * Optionally accepts a selector for Subscribe functionality.\n     * @example\n     * ```tsx\n     * // Without selector\n     * <table.AppCell cell={cell}>\n     *   {(c) => <td><c.TextCell /></td>}\n     * </table.AppCell>\n     *\n     * // With selector - children receives cell and selected state\n     * <table.AppCell cell={cell} selector={(s) => s.columnFilters}>\n     *   {(c, filters) => <td>{filters.length}</td>}\n     * </table.AppCell>\n     * ```\n     */\n    AppCell: AppCellComponent<TFeatures, TData, NoInfer<TCellComponents>>\n    /**\n     * Wraps a header and provides header context with pre-bound headerComponents.\n     * Optionally accepts a selector for Subscribe functionality.\n     * @example\n     * ```tsx\n     * // Without selector\n     * <table.AppHeader header={header}>\n     *   {(h) => <th><h.SortIndicator /></th>}\n     * </table.AppHeader>\n     *\n     * // With selector\n     * <table.AppHeader header={header} selector={(s) => s.sorting}>\n     *   {(h, sorting) => <th>{sorting.length} sorted</th>}\n     * </table.AppHeader>\n     * ```\n     */\n    AppHeader: AppHeaderComponent<TFeatures, TData, NoInfer<THeaderComponents>>\n    /**\n     * Wraps a footer and provides header context with pre-bound headerComponents.\n     * Optionally accepts a selector for Subscribe functionality.\n     * @example\n     * ```tsx\n     * <table.AppFooter header={footer}>\n     *   {(f) => <td><table.FlexRender footer={footer} /></td>}\n     * </table.AppFooter>\n     * ```\n     */\n    AppFooter: AppHeaderComponent<TFeatures, TData, NoInfer<THeaderComponents>>\n  }\n\n/**\n * Creates a custom table hook with pre-bound components for composition.\n *\n * This is the table equivalent of TanStack Form's `createFormHook`. It allows you to:\n * - Define features, row models, and default options once, shared across all tables\n * - Register reusable table, cell, and header components\n * - Access table/cell/header instances via context in those components\n * - Get a `useAppTable` hook that returns an extended table with App wrapper components\n * - Get a `createAppColumnHelper` function pre-bound to your features\n *\n * @example\n * ```tsx\n * // hooks/table.ts\n * export const {\n *   useAppTable,\n *   createAppColumnHelper,\n *   useTableContext,\n *   useCellContext,\n *   useHeaderContext,\n * } = createTableHook({\n *   _features: tableFeatures({\n *     rowPaginationFeature,\n *     rowSortingFeature,\n *     columnFilteringFeature,\n *   }),\n *   _rowModels: {\n *     paginatedRowModel: createPaginatedRowModel(),\n *     sortedRowModel: createSortedRowModel(sortFns),\n *     filteredRowModel: createFilteredRowModel(filterFns),\n *   },\n *   tableComponents: { PaginationControls, RowCount },\n *   cellComponents: { TextCell, NumberCell },\n *   headerComponents: { SortIndicator, ColumnFilter },\n * })\n *\n * // Create column helper with TFeatures already bound\n * const columnHelper = createAppColumnHelper<Person>()\n *\n * // components/table-components.tsx\n * function PaginationControls() {\n *   const table = useTableContext() // TFeatures already known!\n *   return <table.Subscribe selector={(s) => s.pagination}>...</table.Subscribe>\n * }\n *\n * // features/users.tsx\n * function UsersTable({ data }: { data: Person[] }) {\n *   const table = useAppTable({\n *     columns,\n *     data, // TData inferred from Person[]\n *   })\n *\n *   return (\n *     <table.AppTable>\n *       <table>\n *         <thead>\n *           {table.getHeaderGroups().map(headerGroup => (\n *             <tr key={headerGroup.id}>\n *               {headerGroup.headers.map(h => (\n *                 <table.AppHeader header={h} key={h.id}>\n *                   {(header) => (\n *                     <th>\n *                       <table.FlexRender header={h} />\n *                       <header.SortIndicator />\n *                     </th>\n *                   )}\n *                 </table.AppHeader>\n *               ))}\n *             </tr>\n *           ))}\n *         </thead>\n *         <tbody>\n *           {table.getRowModel().rows.map(row => (\n *             <tr key={row.id}>\n *               {row.getAllCells().map(c => (\n *                 <table.AppCell cell={c} key={c.id}>\n *                   {(cell) => <td><cell.TextCell /></td>}\n *                 </table.AppCell>\n *               ))}\n *             </tr>\n *           ))}\n *         </tbody>\n *       </table>\n *       <table.PaginationControls />\n *     </table.AppTable>\n *   )\n * }\n * ```\n */\nexport function createTableHook<\n  TFeatures extends TableFeatures,\n  const TTableComponents extends Record<string, ComponentType<any>>,\n  const TCellComponents extends Record<string, ComponentType<any>>,\n  const THeaderComponents extends Record<string, ComponentType<any>>,\n>({\n  tableComponents,\n  cellComponents,\n  headerComponents,\n  ...defaultTableOptions\n}: CreateTableHookOptions<\n  TFeatures,\n  TTableComponents,\n  TCellComponents,\n  THeaderComponents\n>) {\n  // Create contexts internally with TFeatures baked in\n  const TableContext = createContext<PreactTable<TFeatures, any, any>>(\n    null as never,\n  )\n  const CellContext = createContext<Cell<TFeatures, any, any>>(null as never)\n  const HeaderContext = createContext<Header<TFeatures, any, any>>(\n    null as never,\n  )\n\n  /**\n   * Create a column helper pre-bound to the features and components configured in this table hook.\n   * The cell, header, and footer contexts include pre-bound components (e.g., `cell.TextCell`).\n   * @example\n   * ```tsx\n   * const columnHelper = createAppColumnHelper<Person>()\n   *\n   * const columns = [\n   *   columnHelper.accessor('firstName', {\n   *     header: 'First Name',\n   *     cell: ({ cell }) => <cell.TextCell />, // cell has pre-bound components!\n   *   }),\n   *   columnHelper.accessor('age', {\n   *     header: 'Age',\n   *     cell: ({ cell }) => <cell.NumberCell />,\n   *   }),\n   * ]\n   * ```\n   */\n  function createAppColumnHelper<TData extends RowData>(): AppColumnHelper<\n    TFeatures,\n    TData,\n    TCellComponents,\n    THeaderComponents\n  > {\n    // The runtime implementation is the same - components are attached at render time\n    // This cast provides the enhanced types for column definitions\n    return coreCreateColumnHelper<TFeatures, TData>() as AppColumnHelper<\n      TFeatures,\n      TData,\n      TCellComponents,\n      THeaderComponents\n    >\n  }\n\n  /**\n   * Access the table instance from within an `AppTable` wrapper.\n   * Use this in custom `tableComponents` passed to `createTableHook`.\n   * TFeatures is already known from the createTableHook call.\n   *\n   * @example\n   * ```tsx\n   * function PaginationControls() {\n   *   const table = useTableContext()\n   *   return (\n   *     <table.Subscribe selector={(s) => s.pagination}>\n   *       {(pagination) => (\n   *         <div>\n   *           <button onClick={() => table.previousPage()}>Prev</button>\n   *           <span>Page {pagination.pageIndex + 1}</span>\n   *           <button onClick={() => table.nextPage()}>Next</button>\n   *         </div>\n   *       )}\n   *     </table.Subscribe>\n   *   )\n   * }\n   * ```\n   */\n  function useTableContext<TData extends RowData = RowData>(): PreactTable<\n    TFeatures,\n    TData\n  > {\n    const table = useContext(TableContext)\n\n    // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n    if (!table) {\n      throw new Error(\n        '`useTableContext` must be used within an `AppTable` component. ' +\n          'Make sure your component is wrapped with `<table.AppTable>...</table.AppTable>`.',\n      )\n    }\n\n    return table as PreactTable<TFeatures, TData>\n  }\n\n  /**\n   * Access the cell instance from within an `AppCell` wrapper.\n   * Use this in custom `cellComponents` passed to `createTableHook`.\n   * TFeatures is already known from the createTableHook call.\n   *\n   * @example\n   * ```tsx\n   * function TextCell() {\n   *   const cell = useCellContext<string>()\n   *   return <span>{cell.getValue()}</span>\n   * }\n   *\n   * function NumberCell({ format }: { format?: Intl.NumberFormatOptions }) {\n   *   const cell = useCellContext<number>()\n   *   return <span>{cell.getValue().toLocaleString(undefined, format)}</span>\n   * }\n   * ```\n   */\n  function useCellContext<TValue extends CellData = CellData>() {\n    const cell = useContext(CellContext)\n\n    // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n    if (!cell) {\n      throw new Error(\n        '`useCellContext` must be used within an `AppCell` component. ' +\n          'Make sure your component is wrapped with `<table.AppCell cell={cell}>...</table.AppCell>`.',\n      )\n    }\n\n    return cell as Cell<TFeatures, any, TValue>\n  }\n\n  /**\n   * Access the header instance from within an `AppHeader` or `AppFooter` wrapper.\n   * Use this in custom `headerComponents` passed to `createTableHook`.\n   * TFeatures is already known from the createTableHook call.\n   *\n   * @example\n   * ```tsx\n   * function SortIndicator() {\n   *   const header = useHeaderContext()\n   *   const sorted = header.column.getIsSorted()\n   *   return sorted === 'asc' ? '🔼' : sorted === 'desc' ? '🔽' : null\n   * }\n   *\n   * function ColumnFilter() {\n   *   const header = useHeaderContext()\n   *   if (!header.column.getCanFilter()) return null\n   *   return (\n   *     <input\n   *       value={(header.column.getFilterValue() ?? '') as string}\n   *       onChange={(e) => header.column.setFilterValue(e.target.value)}\n   *       placeholder=\"Filter...\"\n   *     />\n   *   )\n   * }\n   * ```\n   */\n  function useHeaderContext<TValue extends CellData = CellData>() {\n    const header = useContext(HeaderContext)\n\n    // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n    if (!header) {\n      throw new Error(\n        '`useHeaderContext` must be used within an `AppHeader` or `AppFooter` component.',\n      )\n    }\n\n    return header as Header<TFeatures, any, TValue>\n  }\n\n  /**\n   * Context-aware FlexRender component for cells.\n   * Uses the cell from context, so no need to pass cell prop.\n   */\n  function CellFlexRender() {\n    const cell = useCellContext()\n    return <FlexRender cell={cell} />\n  }\n\n  /**\n   * Context-aware FlexRender component for headers.\n   * Uses the header from context, so no need to pass header prop.\n   */\n  function HeaderFlexRender() {\n    const header = useHeaderContext()\n    return <FlexRender header={header} />\n  }\n\n  /**\n   * Context-aware FlexRender component for footers.\n   * Uses the header from context, so no need to pass footer prop.\n   */\n  function FooterFlexRender() {\n    const header = useHeaderContext()\n    return <FlexRender footer={header} />\n  }\n\n  /**\n   * Enhanced useTable hook that returns a table with App wrapper components\n   * and pre-bound tableComponents attached directly to the table object.\n   *\n   * Default options from createTableHook are automatically merged with\n   * the options passed here. Options passed here take precedence.\n   *\n   * TFeatures is already known from the createTableHook call; TData is inferred from the data prop.\n   */\n  function useAppTable<TData extends RowData, TSelected = {}>(\n    tableOptions: Omit<\n      TableOptions<TFeatures, TData>,\n      '_features' | '_rowModels'\n    >,\n    selector?: (state: TableState<TFeatures>) => TSelected,\n  ): AppPreactTable<\n    TFeatures,\n    TData,\n    TSelected,\n    TTableComponents,\n    TCellComponents,\n    THeaderComponents\n  > {\n    // Merge default options with provided options (provided takes precedence)\n    const table = useTable<TFeatures, TData, TSelected>(\n      { ...defaultTableOptions, ...tableOptions } as TableOptions<\n        TFeatures,\n        TData\n      >,\n      selector,\n    )\n\n    // AppTable - Root wrapper that provides table context with optional Subscribe\n    const AppTable = useMemo(() => {\n      function AppTableImpl(\n        props: AppTablePropsWithoutSelector,\n      ): ComponentChildren\n      function AppTableImpl<TAppTableSelected>(\n        props: AppTablePropsWithSelector<TFeatures, TAppTableSelected>,\n      ): ComponentChildren\n      function AppTableImpl<TAppTableSelected>(\n        props:\n          | AppTablePropsWithoutSelector\n          | AppTablePropsWithSelector<TFeatures, TAppTableSelected>,\n      ): ComponentChildren {\n        const { children, selector: appTableSelector } = props as any\n\n        return (\n          <TableContext.Provider value={table}>\n            {appTableSelector ? (\n              <table.Subscribe selector={appTableSelector}>\n                {(state: TAppTableSelected) =>\n                  (children as (state: TAppTableSelected) => ComponentChildren)(\n                    state,\n                  )\n                }\n              </table.Subscribe>\n            ) : (\n              children\n            )}\n          </TableContext.Provider>\n        )\n      }\n      return AppTableImpl as AppTableComponent<TFeatures>\n    }, [table])\n\n    // AppCell - Wraps cell with context, pre-bound cellComponents, and optional Subscribe\n    const AppCell = useMemo(() => {\n      function AppCellImpl<TValue extends CellData = CellData>(\n        props: AppCellPropsWithoutSelector<\n          TFeatures,\n          TData,\n          TValue,\n          TCellComponents\n        >,\n      ): ComponentChildren\n      function AppCellImpl<\n        TValue extends CellData = CellData,\n        TAppCellSelected = unknown,\n      >(\n        props: AppCellPropsWithSelector<\n          TFeatures,\n          TData,\n          TValue,\n          TCellComponents,\n          TAppCellSelected\n        >,\n      ): ComponentChildren\n      function AppCellImpl<\n        TValue extends CellData = CellData,\n        TAppCellSelected = unknown,\n      >(\n        props:\n          | AppCellPropsWithoutSelector<\n              TFeatures,\n              TData,\n              TValue,\n              TCellComponents\n            >\n          | AppCellPropsWithSelector<\n              TFeatures,\n              TData,\n              TValue,\n              TCellComponents,\n              TAppCellSelected\n            >,\n      ): ComponentChildren {\n        const { cell, children, selector: appCellSelector } = props as any\n        const extendedCell = Object.assign(cell, {\n          FlexRender: CellFlexRender,\n          ...cellComponents,\n        })\n\n        return (\n          <CellContext.Provider value={cell}>\n            {appCellSelector ? (\n              <table.Subscribe selector={appCellSelector}>\n                {(state: TAppCellSelected) =>\n                  (\n                    children as (\n                      cell: Cell<TFeatures, TData, TValue> &\n                        TCellComponents & {\n                          FlexRender: () => ComponentChildren\n                        },\n                      state: TAppCellSelected,\n                    ) => ComponentChildren\n                  )(extendedCell, state)\n                }\n              </table.Subscribe>\n            ) : (\n              (\n                children as (\n                  cell: Cell<TFeatures, TData, TValue> &\n                    TCellComponents & { FlexRender: () => ComponentChildren },\n                ) => ComponentChildren\n              )(extendedCell)\n            )}\n          </CellContext.Provider>\n        )\n      }\n      return AppCellImpl as AppCellComponent<TFeatures, TData, TCellComponents>\n    }, [table])\n\n    // AppHeader - Wraps header with context, pre-bound headerComponents, and optional Subscribe\n    const AppHeader = useMemo(() => {\n      function AppHeaderImpl<TValue extends CellData = CellData>(\n        props: AppHeaderPropsWithoutSelector<\n          TFeatures,\n          TData,\n          TValue,\n          THeaderComponents\n        >,\n      ): ComponentChildren\n      function AppHeaderImpl<\n        TValue extends CellData = CellData,\n        TAppHeaderSelected = unknown,\n      >(\n        props: AppHeaderPropsWithSelector<\n          TFeatures,\n          TData,\n          TValue,\n          THeaderComponents,\n          TAppHeaderSelected\n        >,\n      ): ComponentChildren\n      function AppHeaderImpl<\n        TValue extends CellData = CellData,\n        TAppHeaderSelected = unknown,\n      >(\n        props:\n          | AppHeaderPropsWithoutSelector<\n              TFeatures,\n              TData,\n              TValue,\n              THeaderComponents\n            >\n          | AppHeaderPropsWithSelector<\n              TFeatures,\n              TData,\n              TValue,\n              THeaderComponents,\n              TAppHeaderSelected\n            >,\n      ): ComponentChildren {\n        const { header, children, selector: appHeaderSelector } = props as any\n        const extendedHeader = Object.assign(header, {\n          FlexRender: HeaderFlexRender,\n          ...headerComponents,\n        })\n\n        return (\n          <HeaderContext.Provider value={header}>\n            {appHeaderSelector ? (\n              <table.Subscribe selector={appHeaderSelector}>\n                {(state: TAppHeaderSelected) =>\n                  (\n                    children as (\n                      header: Header<TFeatures, TData, TValue> &\n                        THeaderComponents,\n                      state: TAppHeaderSelected,\n                    ) => ComponentChildren\n                  )(extendedHeader, state)\n                }\n              </table.Subscribe>\n            ) : (\n              (\n                children as (\n                  header: Header<TFeatures, TData, TValue> &\n                    THeaderComponents & { FlexRender: () => ComponentChildren },\n                ) => ComponentChildren\n              )(extendedHeader)\n            )}\n          </HeaderContext.Provider>\n        )\n      }\n      return AppHeaderImpl as AppHeaderComponent<\n        TFeatures,\n        TData,\n        THeaderComponents\n      >\n    }, [table])\n\n    // AppFooter - Same as AppHeader (footers use Header type)\n    const AppFooter = useMemo(() => {\n      function AppFooterImpl<TValue extends CellData = CellData>(\n        props: AppHeaderPropsWithoutSelector<\n          TFeatures,\n          TData,\n          TValue,\n          THeaderComponents\n        >,\n      ): ComponentChildren\n      function AppFooterImpl<\n        TValue extends CellData = CellData,\n        TAppFooterSelected = unknown,\n      >(\n        props: AppHeaderPropsWithSelector<\n          TFeatures,\n          TData,\n          TValue,\n          THeaderComponents,\n          TAppFooterSelected\n        >,\n      ): ComponentChildren\n      function AppFooterImpl<\n        TValue extends CellData = CellData,\n        TAppFooterSelected = unknown,\n      >(\n        props:\n          | AppHeaderPropsWithoutSelector<\n              TFeatures,\n              TData,\n              TValue,\n              THeaderComponents\n            >\n          | AppHeaderPropsWithSelector<\n              TFeatures,\n              TData,\n              TValue,\n              THeaderComponents,\n              TAppFooterSelected\n            >,\n      ): ComponentChildren {\n        const { header, children, selector: appFooterSelector } = props as any\n        const extendedHeader = Object.assign(header, {\n          FlexRender: FooterFlexRender,\n          ...headerComponents,\n        })\n\n        return (\n          <HeaderContext.Provider value={header}>\n            {appFooterSelector ? (\n              <table.Subscribe selector={appFooterSelector}>\n                {(state: TAppFooterSelected) =>\n                  (\n                    children as (\n                      header: Header<TFeatures, TData, TValue> &\n                        THeaderComponents,\n                      state: TAppFooterSelected,\n                    ) => ComponentChildren\n                  )(extendedHeader, state)\n                }\n              </table.Subscribe>\n            ) : (\n              (\n                children as (\n                  header: Header<TFeatures, TData, TValue> &\n                    THeaderComponents & { FlexRender: () => ComponentChildren },\n                ) => ComponentChildren\n              )(extendedHeader)\n            )}\n          </HeaderContext.Provider>\n        )\n      }\n      return AppFooterImpl as AppHeaderComponent<\n        TFeatures,\n        TData,\n        THeaderComponents\n      >\n    }, [table])\n\n    // Combine everything into the extended table API\n    const extendedTable = useMemo(() => {\n      return Object.assign(table, {\n        AppTable,\n        AppCell,\n        AppHeader,\n        AppFooter,\n        ...tableComponents,\n      }) as AppPreactTable<\n        TFeatures,\n        TData,\n        TSelected,\n        TTableComponents,\n        TCellComponents,\n        THeaderComponents\n      >\n    }, [table, AppTable, AppCell, AppHeader, AppFooter])\n\n    return extendedTable\n  }\n\n  return {\n    appFeatures: defaultTableOptions._features as TFeatures,\n    createAppColumnHelper,\n    useAppTable,\n    useTableContext,\n    useCellContext,\n    useHeaderContext,\n  }\n}\n"
  },
  {
    "path": "packages/preact-table/src/index.ts",
    "content": "export * from '@tanstack/table-core'\n\nexport * from './FlexRender'\nexport * from './Subscribe'\nexport * from './createTableHook'\nexport * from './useTable'\n"
  },
  {
    "path": "packages/preact-table/src/useTable.ts",
    "content": "import { useEffect, useLayoutEffect, useMemo, useState } from 'preact/hooks'\nimport { constructTable } from '@tanstack/table-core'\nimport { useStore } from '@tanstack/preact-store'\nimport { FlexRender } from './FlexRender'\nimport { Subscribe } from './Subscribe'\nimport type {\n  CellData,\n  NoInfer,\n  RowData,\n  Table,\n  TableFeatures,\n  TableOptions,\n  TableState,\n} from '@tanstack/table-core'\nimport type { ComponentChildren } from 'preact'\nimport type { FlexRenderProps } from './FlexRender'\nimport type { SubscribeProps } from './Subscribe'\n\nconst useIsomorphicLayoutEffect =\n  typeof window !== 'undefined' ? useLayoutEffect : useEffect\n\nexport type PreactTable<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TSelected = {},\n> = Table<TFeatures, TData> & {\n  /**\n   * A Preact HOC (Higher Order Component) that allows you to subscribe to the table state.\n   *\n   * This is useful for opting into state re-renders for specific parts of the table state.\n   *\n   * @example\n   * <table.Subscribe selector={(state) => ({ rowSelection: state.rowSelection })}>\n   *   {({ rowSelection }) => ( // important to include `{() => {()}}` syntax\n   *     <tr key={row.id}>\n   *       // render the row\n   *     </tr>\n   *   )}\n   * </table.Subscribe>\n   */\n  Subscribe: <TSelected>(props: {\n    selector: (state: NoInfer<TableState<TFeatures>>) => TSelected\n    children: ((state: TSelected) => ComponentChildren) | ComponentChildren\n  }) => ComponentChildren\n  /**\n   * A Preact component that renders headers, cells, or footers with custom markup.\n   * Use this utility component instead of manually calling flexRender.\n   *\n   * @example\n   * ```tsx\n   * <table.FlexRender cell={cell} />\n   * <table.FlexRender header={header} />\n   * <table.FlexRender footer={footer} />\n   * ```\n   *\n   * This replaces calling `flexRender` directly like this:\n   * ```tsx\n   * flexRender(cell.column.columnDef.cell, cell.getContext())\n   * flexRender(header.column.columnDef.header, header.getContext())\n   * flexRender(footer.column.columnDef.footer, footer.getContext())\n   * ```\n   */\n  FlexRender: <TValue extends CellData = CellData>(\n    props: FlexRenderProps<TFeatures, TData, TValue>,\n  ) => ComponentChildren\n  /**\n   * The selected state of the table. This state may not match the structure of `table.store.state` because it is selected by the `selector` function that you pass as the 2nd argument to `useTable`.\n   *\n   * @example\n   * const table = useTable(options, (state) => ({ globalFilter: state.globalFilter })) // only globalFilter is part of the selected state\n   *\n   * console.log(table.state.globalFilter)\n   */\n  readonly state: Readonly<TSelected>\n}\n\nexport function useTable<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TSelected = {},\n>(\n  tableOptions: TableOptions<TFeatures, TData>,\n  selector: (state: TableState<TFeatures>) => TSelected = () =>\n    ({}) as TSelected,\n): PreactTable<TFeatures, TData, TSelected> {\n  const [table] = useState(() => {\n    const tableInstance = constructTable(tableOptions) as PreactTable<\n      TFeatures,\n      TData,\n      TSelected\n    >\n\n    tableInstance.Subscribe = function SubscribeBound<TSelected>(\n      props: Omit<SubscribeProps<TFeatures, TData, TSelected>, 'table'>,\n    ) {\n      return Subscribe({ ...props, table: tableInstance })\n    }\n\n    tableInstance.FlexRender = FlexRender\n\n    return tableInstance\n  })\n\n  // sync table options on every render\n  table.setOptions((prev) => ({\n    ...prev,\n    ...tableOptions,\n  }))\n\n  useIsomorphicLayoutEffect(() => {\n    // prevent race condition between table.setOptions and table.baseStore.setState\n    queueMicrotask(() => {\n      table.baseStore.setState((prev) => ({\n        ...prev,\n      }))\n    })\n  }, [\n    table.options.columns, // re-render when columns change\n    table.options.data, // re-render when data changes\n    table.options.state, // sync preact state to the table store\n  ])\n\n  const state = useStore(table.store, selector)\n\n  return useMemo(\n    () => ({\n      ...table,\n      state,\n    }),\n    [state, table],\n  )\n}\n"
  },
  {
    "path": "packages/preact-table/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig.json\",\n  \"compilerOptions\": {\n    \"jsx\": \"react-jsx\",\n    \"jsxImportSource\": \"preact\",\n    \"skipLibCheck\": true,\n    \"paths\": {\n      \"react\": [\"./node_modules/preact/compat/\"],\n      \"react-dom\": [\"./node_modules/preact/compat/\"]\n    }\n  },\n  \"include\": [\n    \"src\",\n    \"eslint.config.js\",\n    \"vite.config.ts\",\n    \"tests\",\n    \"node_modules/vite/client.d.ts\"\n  ]\n}\n"
  },
  {
    "path": "packages/preact-table/vite.config.ts",
    "content": "import { defineConfig, mergeConfig } from 'vitest/config'\nimport { tanstackViteConfig } from '@tanstack/vite-config'\nimport preact from '@preact/preset-vite'\nimport packageJson from './package.json'\n\nconst config = defineConfig({\n  plugins: [preact()],\n  test: {\n    name: packageJson.name,\n    dir: './tests',\n    watch: false,\n    environment: 'jsdom',\n    // setupFiles: ['./tests/test-setup.ts'],\n    globals: true,\n  },\n})\n\nexport default mergeConfig(\n  config,\n  tanstackViteConfig({\n    cjs: false,\n    entry: './src/index.ts',\n    srcDir: './src',\n  }),\n)\n"
  },
  {
    "path": "packages/react-table/eslint.config.js",
    "content": "// @ts-check\n\nimport pluginReact from '@eslint-react/eslint-plugin'\nimport pluginReactCompiler from 'eslint-plugin-react-compiler'\nimport pluginReactHooks from 'eslint-plugin-react-hooks'\nimport rootConfig from '../../eslint.config.js'\n\n/** @type {any} */\nconst config = [\n  ...rootConfig,\n  {\n    files: ['**/*.{ts,tsx}'],\n    ...pluginReact.configs.recommended,\n  },\n  {\n    plugins: {\n      'react-hooks': pluginReactHooks,\n      'react-compiler': pluginReactCompiler,\n    },\n    rules: {\n      '@eslint-react/dom/no-missing-button-type': 'off',\n      'react-compiler/react-compiler': 'error',\n      'react-hooks/exhaustive-deps': 'error',\n      'react-hooks/rules-of-hooks': 'error',\n    },\n  },\n  {\n    files: ['**/__tests__/**'],\n    rules: {\n      // 'react-compiler/react-compiler': 'off',\n    },\n  },\n]\n\nexport default config\n"
  },
  {
    "path": "packages/react-table/package.json",
    "content": "{\n  \"name\": \"@tanstack/react-table\",\n  \"version\": \"9.0.0-alpha.19\",\n  \"description\": \"Headless UI for building powerful tables & datagrids for React.\",\n  \"author\": \"Tanner Linsley\",\n  \"license\": \"MIT\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/TanStack/table.git\",\n    \"directory\": \"packages/react-table\"\n  },\n  \"homepage\": \"https://tanstack.com/table\",\n  \"funding\": {\n    \"type\": \"github\",\n    \"url\": \"https://github.com/sponsors/tannerlinsley\"\n  },\n  \"keywords\": [\n    \"react\",\n    \"table\",\n    \"react-table\",\n    \"datagrid\"\n  ],\n  \"type\": \"module\",\n  \"types\": \"dist/esm/index.d.ts\",\n  \"main\": \"dist/esm/index.js\",\n  \"module\": \"dist/esm/index.js\",\n  \"exports\": {\n    \".\": {\n      \"import\": {\n        \"types\": \"./dist/esm/index.d.ts\",\n        \"default\": \"./dist/esm/index.js\"\n      }\n    },\n    \"./package.json\": \"./package.json\",\n    \"./legacy\": {\n      \"import\": {\n        \"types\": \"./dist/esm/legacy.d.ts\",\n        \"default\": \"./dist/esm/legacy.js\"\n      }\n    }\n  },\n  \"sideEffects\": false,\n  \"engines\": {\n    \"node\": \">=16\"\n  },\n  \"files\": [\n    \"dist\",\n    \"src\"\n  ],\n  \"scripts\": {\n    \"clean\": \"rimraf ./build && rimraf ./dist\",\n    \"test:eslint\": \"eslint ./src\",\n    \"test:lib\": \"vitest --passWithNoTests\",\n    \"test:lib:dev\": \"pnpm test:lib --watch\",\n    \"test:types\": \"tsc\",\n    \"test:build\": \"publint --strict\",\n    \"build\": \"vite build\"\n  },\n  \"dependencies\": {\n    \"@tanstack/react-store\": \"^0.9.2\",\n    \"@tanstack/table-core\": \"workspace:*\"\n  },\n  \"devDependencies\": {\n    \"@eslint-react/eslint-plugin\": \"^2.13.0\",\n    \"@types/react\": \"^19.2.10\",\n    \"@vitejs/plugin-react\": \"^5.1.2\",\n    \"eslint-plugin-react-compiler\": \"19.1.0-rc.2\",\n    \"eslint-plugin-react-hooks\": \"^7.0.1\",\n    \"react\": \"^19.2.4\"\n  },\n  \"peerDependencies\": {\n    \"react\": \">=18\"\n  }\n}\n"
  },
  {
    "path": "packages/react-table/src/FlexRender.tsx",
    "content": "import React from 'react'\nimport type {\n  Cell,\n  CellData,\n  Header,\n  RowData,\n  TableFeatures,\n} from '@tanstack/table-core'\nimport type { ComponentType, JSX, ReactNode } from 'react'\n\nexport type Renderable<TProps> = ReactNode | ComponentType<TProps>\n\nfunction isReactComponent<TProps>(\n  component: unknown,\n): component is ComponentType<TProps> {\n  return (\n    isClassComponent(component) ||\n    typeof component === 'function' ||\n    isExoticComponent(component)\n  )\n}\n\nfunction isClassComponent(component: any) {\n  return (\n    typeof component === 'function' &&\n    (() => {\n      const proto = Object.getPrototypeOf(component)\n      return proto.prototype && proto.prototype.isReactComponent\n    })()\n  )\n}\n\nfunction isExoticComponent(component: any) {\n  return (\n    typeof component === 'object' &&\n    typeof component.$$typeof === 'symbol' &&\n    ['react.memo', 'react.forward_ref'].includes(component.$$typeof.description)\n  )\n}\n\n/**\n * If rendering headers, cells, or footers with custom markup, use flexRender instead of `cell.getValue()` or `cell.renderValue()`.\n * @example flexRender(cell.column.columnDef.cell, cell.getContext())\n */\nexport function flexRender<TProps extends object>(\n  Comp: Renderable<TProps>,\n  props: TProps,\n): ReactNode | JSX.Element {\n  return !Comp ? null : isReactComponent<TProps>(Comp) ? (\n    <Comp {...props} />\n  ) : (\n    Comp\n  )\n}\n\n/**\n * Simplified component wrapper of `flexRender`. Use this utility component to render headers, cells, or footers with custom markup.\n * Only one prop (`cell`, `header`, or `footer`) may be passed.\n * @example <FlexRender cell={cell} />\n * @example <FlexRender header={header} />\n * @example <FlexRender footer={footer} />\n */\nexport type FlexRenderProps<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n> =\n  | { cell: Cell<TFeatures, TData, TValue>; header?: never; footer?: never }\n  | {\n      header: Header<TFeatures, TData, TValue>\n      cell?: never\n      footer?: never\n    }\n  | {\n      footer: Header<TFeatures, TData, TValue>\n      cell?: never\n      header?: never\n    }\n\n/**\n * Simplified component wrapper of `flexRender`. Use this utility component to render headers, cells, or footers with custom markup.\n * Only one prop (`cell`, `header`, or `footer`) may be passed.\n * @example\n * ```tsx\n * <FlexRender cell={cell} />\n * <FlexRender header={header} />\n * <FlexRender footer={footer} />\n * ```\n *\n * This replaces calling `flexRender` directly like this:\n * ```tsx\n * flexRender(cell.column.columnDef.cell, cell.getContext())\n * flexRender(header.column.columnDef.header, header.getContext())\n * flexRender(footer.column.columnDef.footer, footer.getContext())\n * ```\n */\nexport function FlexRender<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n>(props: FlexRenderProps<TFeatures, TData, TValue>) {\n  if ('cell' in props && props.cell) {\n    return flexRender(props.cell.column.columnDef.cell, props.cell.getContext())\n  }\n  if ('header' in props && props.header) {\n    return flexRender(\n      props.header.column.columnDef.header,\n      props.header.getContext(),\n    )\n  }\n  if ('footer' in props && props.footer) {\n    return flexRender(\n      props.footer.column.columnDef.footer,\n      props.footer.getContext(),\n    )\n  }\n  return null\n}\n"
  },
  {
    "path": "packages/react-table/src/Subscribe.ts",
    "content": "'use client'\n\nimport { shallow, useStore } from '@tanstack/react-store'\nimport type {\n  NoInfer,\n  RowData,\n  Table,\n  TableFeatures,\n  TableState,\n} from '@tanstack/table-core'\nimport type { FunctionComponent, ReactNode } from 'react'\n\nexport type SubscribeProps<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TSelected = {},\n> = {\n  /**\n   * The table instance to subscribe to. Required when using as a standalone component.\n   * Not needed when using as `table.Subscribe`.\n   */\n  table: Table<TFeatures, TData>\n  /**\n   * A selector function that selects the part of the table state to subscribe to.\n   * This allows for fine-grained reactivity by only re-rendering when the selected state changes.\n   */\n  selector: (state: NoInfer<TableState<TFeatures>>) => TSelected\n  /**\n   * The children to render. Can be a function that receives the selected state, or a React node.\n   */\n  children: ((state: TSelected) => ReactNode) | ReactNode\n}\n\n/**\n * A React component that allows you to subscribe to the table state.\n *\n * This is useful for opting into state re-renders for specific parts of the table state.\n *\n * @example\n * ```tsx\n * // As a standalone component\n * <Subscribe table={table} selector={(state) => ({ rowSelection: state.rowSelection })}>\n *   {({ rowSelection }) => (\n *     <div>Selected rows: {Object.keys(rowSelection).length}</div>\n *   )}\n * </Subscribe>\n * ```\n *\n * @example\n * ```tsx\n * // As table.Subscribe (table instance method)\n * <table.Subscribe selector={(state) => ({ rowSelection: state.rowSelection })}>\n *   {({ rowSelection }) => (\n *     <div>Selected rows: {Object.keys(rowSelection).length}</div>\n *   )}\n * </table.Subscribe>\n * ```\n */\nexport function Subscribe<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TSelected = {},\n>(\n  props: SubscribeProps<TFeatures, TData, TSelected>,\n): ReturnType<FunctionComponent> {\n  const selected = useStore(props.table.store, props.selector, shallow)\n\n  return typeof props.children === 'function'\n    ? props.children(selected)\n    : props.children\n}\n"
  },
  {
    "path": "packages/react-table/src/createTableHook.tsx",
    "content": "'use client'\n/* eslint-disable @eslint-react/no-context-provider */\n// eslint-disable-next-line @eslint-react/no-use-context -- intentional useContext for older React support\nimport React, { createContext, useContext, useMemo } from 'react'\nimport { createColumnHelper as coreCreateColumnHelper } from '@tanstack/table-core'\nimport { useTable } from './useTable'\nimport { FlexRender } from './FlexRender'\nimport type {\n  AccessorFn,\n  AccessorFnColumnDef,\n  AccessorKeyColumnDef,\n  Cell,\n  CellContext,\n  CellData,\n  Column,\n  ColumnDef,\n  DeepKeys,\n  DeepValue,\n  DisplayColumnDef,\n  GroupColumnDef,\n  Header,\n  IdentifiedColumnDef,\n  NoInfer,\n  Row,\n  RowData,\n  Table,\n  TableFeatures,\n  TableOptions,\n  TableState,\n} from '@tanstack/table-core'\nimport type { ComponentType, ReactNode } from 'react'\nimport type { ReactTable } from './useTable'\n\n// =============================================================================\n// Enhanced Context Types with Pre-bound Components\n// =============================================================================\n\n/**\n * Enhanced CellContext with pre-bound cell components.\n * The `cell` property includes the registered cellComponents.\n */\nexport type AppCellContext<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData,\n  TCellComponents extends Record<string, ComponentType<any>>,\n> = {\n  cell: Cell<TFeatures, TData, TValue> &\n    TCellComponents & { FlexRender: () => ReactNode }\n  column: Column<TFeatures, TData, TValue>\n  getValue: CellContext<TFeatures, TData, TValue>['getValue']\n  renderValue: CellContext<TFeatures, TData, TValue>['renderValue']\n  row: Row<TFeatures, TData>\n  table: Table<TFeatures, TData>\n}\n\n/**\n * Enhanced HeaderContext with pre-bound header components.\n * The `header` property includes the registered headerComponents.\n */\nexport type AppHeaderContext<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData,\n  THeaderComponents extends Record<string, ComponentType<any>>,\n> = {\n  column: Column<TFeatures, TData, TValue>\n  header: Header<TFeatures, TData, TValue> &\n    THeaderComponents & { FlexRender: () => ReactNode }\n  table: Table<TFeatures, TData>\n}\n\n// =============================================================================\n// Enhanced Column Definition Types\n// =============================================================================\n\n/**\n * Template type for column definitions that can be a string or a function.\n */\ntype AppColumnDefTemplate<TProps extends object> =\n  | string\n  | ((props: TProps) => any)\n\n/**\n * Enhanced column definition base with pre-bound components in cell/header/footer contexts.\n */\ntype AppColumnDefBase<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData,\n  TCellComponents extends Record<string, ComponentType<any>>,\n  THeaderComponents extends Record<string, ComponentType<any>>,\n> = Omit<\n  IdentifiedColumnDef<TFeatures, TData, TValue>,\n  'cell' | 'header' | 'footer'\n> & {\n  cell?: AppColumnDefTemplate<\n    AppCellContext<TFeatures, TData, TValue, TCellComponents>\n  >\n  header?: AppColumnDefTemplate<\n    AppHeaderContext<TFeatures, TData, TValue, THeaderComponents>\n  >\n  footer?: AppColumnDefTemplate<\n    AppHeaderContext<TFeatures, TData, TValue, THeaderComponents>\n  >\n}\n\n/**\n * Enhanced display column definition with pre-bound components.\n */\ntype AppDisplayColumnDef<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TCellComponents extends Record<string, ComponentType<any>>,\n  THeaderComponents extends Record<string, ComponentType<any>>,\n> = Omit<\n  DisplayColumnDef<TFeatures, TData, unknown>,\n  'cell' | 'header' | 'footer'\n> & {\n  cell?: AppColumnDefTemplate<\n    AppCellContext<TFeatures, TData, unknown, TCellComponents>\n  >\n  header?: AppColumnDefTemplate<\n    AppHeaderContext<TFeatures, TData, unknown, THeaderComponents>\n  >\n  footer?: AppColumnDefTemplate<\n    AppHeaderContext<TFeatures, TData, unknown, THeaderComponents>\n  >\n}\n\n/**\n * Enhanced group column definition with pre-bound components.\n */\ntype AppGroupColumnDef<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TCellComponents extends Record<string, ComponentType<any>>,\n  THeaderComponents extends Record<string, ComponentType<any>>,\n> = Omit<\n  GroupColumnDef<TFeatures, TData, unknown>,\n  'cell' | 'header' | 'footer' | 'columns'\n> & {\n  cell?: AppColumnDefTemplate<\n    AppCellContext<TFeatures, TData, unknown, TCellComponents>\n  >\n  header?: AppColumnDefTemplate<\n    AppHeaderContext<TFeatures, TData, unknown, THeaderComponents>\n  >\n  footer?: AppColumnDefTemplate<\n    AppHeaderContext<TFeatures, TData, unknown, THeaderComponents>\n  >\n  columns?: Array<ColumnDef<TFeatures, TData, unknown>>\n}\n\n// =============================================================================\n// Enhanced Column Helper Type\n// =============================================================================\n\n/**\n * Enhanced column helper with pre-bound components in cell/header/footer contexts.\n * This enables TypeScript to know about the registered components when defining columns.\n */\nexport type AppColumnHelper<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TCellComponents extends Record<string, ComponentType<any>>,\n  THeaderComponents extends Record<string, ComponentType<any>>,\n> = {\n  /**\n   * Creates a data column definition with an accessor key or function.\n   * The cell, header, and footer contexts include pre-bound components.\n   */\n  accessor: <\n    TAccessor extends AccessorFn<TData> | DeepKeys<TData>,\n    TValue extends TAccessor extends AccessorFn<TData, infer TReturn>\n      ? TReturn\n      : TAccessor extends DeepKeys<TData>\n        ? DeepValue<TData, TAccessor>\n        : never,\n  >(\n    accessor: TAccessor,\n    column: TAccessor extends AccessorFn<TData>\n      ? AppColumnDefBase<\n          TFeatures,\n          TData,\n          TValue,\n          TCellComponents,\n          THeaderComponents\n        > & { id: string }\n      : AppColumnDefBase<\n          TFeatures,\n          TData,\n          TValue,\n          TCellComponents,\n          THeaderComponents\n        >,\n  ) => TAccessor extends AccessorFn<TData>\n    ? AccessorFnColumnDef<TFeatures, TData, TValue>\n    : AccessorKeyColumnDef<TFeatures, TData, TValue>\n\n  /**\n   * Wraps an array of column definitions to preserve each column's individual TValue type.\n   */\n  columns: <TColumns extends ReadonlyArray<ColumnDef<TFeatures, TData, any>>>(\n    columns: [...TColumns],\n  ) => Array<ColumnDef<TFeatures, TData, any>> & [...TColumns]\n\n  /**\n   * Creates a display column definition for non-data columns.\n   * The cell, header, and footer contexts include pre-bound components.\n   */\n  display: (\n    column: AppDisplayColumnDef<\n      TFeatures,\n      TData,\n      TCellComponents,\n      THeaderComponents\n    >,\n  ) => DisplayColumnDef<TFeatures, TData, unknown>\n\n  /**\n   * Creates a group column definition with nested child columns.\n   * The cell, header, and footer contexts include pre-bound components.\n   */\n  group: (\n    column: AppGroupColumnDef<\n      TFeatures,\n      TData,\n      TCellComponents,\n      THeaderComponents\n    >,\n  ) => GroupColumnDef<TFeatures, TData, unknown>\n}\n\n// =============================================================================\n// CreateTableHook Options and Props\n// =============================================================================\n\n/**\n * Options for creating a table hook with pre-bound components and default table options.\n * Extends all TableOptions except 'columns' | 'data' | 'store' | 'state' | 'initialState'.\n */\nexport type CreateTableHookOptions<\n  TFeatures extends TableFeatures,\n  TTableComponents extends Record<string, ComponentType<any>>,\n  TCellComponents extends Record<string, ComponentType<any>>,\n  THeaderComponents extends Record<string, ComponentType<any>>,\n> = Omit<\n  TableOptions<TFeatures, any>,\n  'columns' | 'data' | 'store' | 'state' | 'initialState'\n> & {\n  /**\n   * Table-level components that need access to the table instance.\n   * These are available directly on the table object returned by useAppTable.\n   * Use `useTableContext()` inside these components.\n   * @example { PaginationControls, GlobalFilter, RowCount }\n   */\n  tableComponents?: TTableComponents\n  /**\n   * Cell-level components that need access to the cell instance.\n   * These are available on the cell object passed to AppCell's children.\n   * Use `useCellContext()` inside these components.\n   * @example { TextCell, NumberCell, DateCell, CurrencyCell }\n   */\n  cellComponents?: TCellComponents\n  /**\n   * Header-level components that need access to the header instance.\n   * These are available on the header object passed to AppHeader/AppFooter's children.\n   * Use `useHeaderContext()` inside these components.\n   * @example { SortIndicator, ColumnFilter, ResizeHandle }\n   */\n  headerComponents?: THeaderComponents\n}\n\n/**\n * Props for AppTable component - without selector\n */\nexport interface AppTablePropsWithoutSelector {\n  children: ReactNode\n  selector?: never\n}\n\n/**\n * Props for AppTable component - with selector\n */\nexport interface AppTablePropsWithSelector<\n  TFeatures extends TableFeatures,\n  TSelected,\n> {\n  children: (state: TSelected) => ReactNode\n  selector: (state: TableState<TFeatures>) => TSelected\n}\n\n/**\n * Props for AppCell component - without selector\n */\nexport interface AppCellPropsWithoutSelector<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData,\n  TCellComponents extends Record<string, ComponentType<any>>,\n> {\n  cell: Cell<TFeatures, TData, TValue>\n  children: (\n    cell: Cell<TFeatures, TData, TValue> &\n      TCellComponents & { FlexRender: () => ReactNode },\n  ) => ReactNode\n  selector?: never\n}\n\n/**\n * Props for AppCell component - with selector\n */\nexport interface AppCellPropsWithSelector<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData,\n  TCellComponents extends Record<string, ComponentType<any>>,\n  TSelected,\n> {\n  cell: Cell<TFeatures, TData, TValue>\n  children: (\n    cell: Cell<TFeatures, TData, TValue> &\n      TCellComponents & { FlexRender: () => ReactNode },\n    state: TSelected,\n  ) => ReactNode\n  selector: (state: TableState<TFeatures>) => TSelected\n}\n\n/**\n * Props for AppHeader/AppFooter component - without selector\n */\nexport interface AppHeaderPropsWithoutSelector<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData,\n  THeaderComponents extends Record<string, ComponentType<any>>,\n> {\n  header: Header<TFeatures, TData, TValue>\n  children: (\n    header: Header<TFeatures, TData, TValue> &\n      THeaderComponents & { FlexRender: () => ReactNode },\n  ) => ReactNode\n  selector?: never\n}\n\n/**\n * Props for AppHeader/AppFooter component - with selector\n */\nexport interface AppHeaderPropsWithSelector<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData,\n  THeaderComponents extends Record<string, ComponentType<any>>,\n  TSelected,\n> {\n  header: Header<TFeatures, TData, TValue>\n  children: (\n    header: Header<TFeatures, TData, TValue> &\n      THeaderComponents & { FlexRender: () => ReactNode },\n    state: TSelected,\n  ) => ReactNode\n  selector: (state: TableState<TFeatures>) => TSelected\n}\n\n/**\n * Component type for AppCell - wraps a cell and provides cell context with optional Subscribe\n */\nexport interface AppCellComponent<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TCellComponents extends Record<string, ComponentType<any>>,\n> {\n  <TValue extends CellData = CellData>(\n    props: AppCellPropsWithoutSelector<\n      TFeatures,\n      TData,\n      TValue,\n      TCellComponents\n    >,\n  ): ReactNode\n  <TValue extends CellData = CellData, TSelected = unknown>(\n    props: AppCellPropsWithSelector<\n      TFeatures,\n      TData,\n      TValue,\n      TCellComponents,\n      TSelected\n    >,\n  ): ReactNode\n}\n\n/**\n * Component type for AppHeader/AppFooter - wraps a header and provides header context with optional Subscribe\n */\nexport interface AppHeaderComponent<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  THeaderComponents extends Record<string, ComponentType<any>>,\n> {\n  <TValue extends CellData = CellData>(\n    props: AppHeaderPropsWithoutSelector<\n      TFeatures,\n      TData,\n      TValue,\n      THeaderComponents\n    >,\n  ): ReactNode\n  <TValue extends CellData = CellData, TSelected = unknown>(\n    props: AppHeaderPropsWithSelector<\n      TFeatures,\n      TData,\n      TValue,\n      THeaderComponents,\n      TSelected\n    >,\n  ): ReactNode\n}\n\n/**\n * Component type for AppTable - root wrapper with optional Subscribe\n */\nexport interface AppTableComponent<TFeatures extends TableFeatures> {\n  (props: AppTablePropsWithoutSelector): ReactNode\n  <TSelected>(props: AppTablePropsWithSelector<TFeatures, TSelected>): ReactNode\n}\n\n/**\n * Extended table API returned by useAppTable with all App wrapper components\n */\nexport type AppReactTable<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TSelected,\n  TTableComponents extends Record<string, ComponentType<any>>,\n  TCellComponents extends Record<string, ComponentType<any>>,\n  THeaderComponents extends Record<string, ComponentType<any>>,\n> = ReactTable<TFeatures, TData, TSelected> &\n  NoInfer<TTableComponents> & {\n    /**\n     * Root wrapper component that provides table context with optional Subscribe.\n     * @example\n     * ```tsx\n     * // Without selector - children is ReactNode\n     * <table.AppTable>\n     *   <table>...</table>\n     * </table.AppTable>\n     *\n     * // With selector - children receives selected state\n     * <table.AppTable selector={(s) => s.pagination}>\n     *   {(pagination) => <div>Page {pagination.pageIndex}</div>}\n     * </table.AppTable>\n     * ```\n     */\n    AppTable: AppTableComponent<TFeatures>\n    /**\n     * Wraps a cell and provides cell context with pre-bound cellComponents.\n     * Optionally accepts a selector for Subscribe functionality.\n     * @example\n     * ```tsx\n     * // Without selector\n     * <table.AppCell cell={cell}>\n     *   {(c) => <td><c.TextCell /></td>}\n     * </table.AppCell>\n     *\n     * // With selector - children receives cell and selected state\n     * <table.AppCell cell={cell} selector={(s) => s.columnFilters}>\n     *   {(c, filters) => <td>{filters.length}</td>}\n     * </table.AppCell>\n     * ```\n     */\n    AppCell: AppCellComponent<TFeatures, TData, NoInfer<TCellComponents>>\n    /**\n     * Wraps a header and provides header context with pre-bound headerComponents.\n     * Optionally accepts a selector for Subscribe functionality.\n     * @example\n     * ```tsx\n     * // Without selector\n     * <table.AppHeader header={header}>\n     *   {(h) => <th><h.SortIndicator /></th>}\n     * </table.AppHeader>\n     *\n     * // With selector\n     * <table.AppHeader header={header} selector={(s) => s.sorting}>\n     *   {(h, sorting) => <th>{sorting.length} sorted</th>}\n     * </table.AppHeader>\n     * ```\n     */\n    AppHeader: AppHeaderComponent<TFeatures, TData, NoInfer<THeaderComponents>>\n    /**\n     * Wraps a footer and provides header context with pre-bound headerComponents.\n     * Optionally accepts a selector for Subscribe functionality.\n     * @example\n     * ```tsx\n     * <table.AppFooter header={footer}>\n     *   {(f) => <td><table.FlexRender footer={footer} /></td>}\n     * </table.AppFooter>\n     * ```\n     */\n    AppFooter: AppHeaderComponent<TFeatures, TData, NoInfer<THeaderComponents>>\n  }\n\n/**\n * Creates a custom table hook with pre-bound components for composition.\n *\n * This is the table equivalent of TanStack Form's `createFormHook`. It allows you to:\n * - Define features, row models, and default options once, shared across all tables\n * - Register reusable table, cell, and header components\n * - Access table/cell/header instances via context in those components\n * - Get a `useAppTable` hook that returns an extended table with App wrapper components\n * - Get a `createAppColumnHelper` function pre-bound to your features\n *\n * @example\n * ```tsx\n * // hooks/table.ts\n * export const {\n *   useAppTable,\n *   createAppColumnHelper,\n *   useTableContext,\n *   useCellContext,\n *   useHeaderContext,\n * } = createTableHook({\n *   _features: tableFeatures({\n *     rowPaginationFeature,\n *     rowSortingFeature,\n *     columnFilteringFeature,\n *   }),\n *   _rowModels: {\n *     paginatedRowModel: createPaginatedRowModel(),\n *     sortedRowModel: createSortedRowModel(sortFns),\n *     filteredRowModel: createFilteredRowModel(filterFns),\n *   },\n *   tableComponents: { PaginationControls, RowCount },\n *   cellComponents: { TextCell, NumberCell },\n *   headerComponents: { SortIndicator, ColumnFilter },\n * })\n *\n * // Create column helper with TFeatures already bound\n * const columnHelper = createAppColumnHelper<Person>()\n *\n * // components/table-components.tsx\n * function PaginationControls() {\n *   const table = useTableContext() // TFeatures already known!\n *   return <table.Subscribe selector={(s) => s.pagination}>...</table.Subscribe>\n * }\n *\n * // features/users.tsx\n * function UsersTable({ data }: { data: Person[] }) {\n *   const table = useAppTable({\n *     columns,\n *     data, // TData inferred from Person[]\n *   })\n *\n *   return (\n *     <table.AppTable>\n *       <table>\n *         <thead>\n *           {table.getHeaderGroups().map(headerGroup => (\n *             <tr key={headerGroup.id}>\n *               {headerGroup.headers.map(h => (\n *                 <table.AppHeader header={h} key={h.id}>\n *                   {(header) => (\n *                     <th>\n *                       <table.FlexRender header={h} />\n *                       <header.SortIndicator />\n *                     </th>\n *                   )}\n *                 </table.AppHeader>\n *               ))}\n *             </tr>\n *           ))}\n *         </thead>\n *         <tbody>\n *           {table.getRowModel().rows.map(row => (\n *             <tr key={row.id}>\n *               {row.getAllCells().map(c => (\n *                 <table.AppCell cell={c} key={c.id}>\n *                   {(cell) => <td><cell.TextCell /></td>}\n *                 </table.AppCell>\n *               ))}\n *             </tr>\n *           ))}\n *         </tbody>\n *       </table>\n *       <table.PaginationControls />\n *     </table.AppTable>\n *   )\n * }\n * ```\n */\nexport function createTableHook<\n  TFeatures extends TableFeatures,\n  const TTableComponents extends Record<string, ComponentType<any>>,\n  const TCellComponents extends Record<string, ComponentType<any>>,\n  const THeaderComponents extends Record<string, ComponentType<any>>,\n>({\n  tableComponents,\n  cellComponents,\n  headerComponents,\n  ...defaultTableOptions\n}: CreateTableHookOptions<\n  TFeatures,\n  TTableComponents,\n  TCellComponents,\n  THeaderComponents\n>) {\n  // Create contexts internally with TFeatures baked in\n  const TableContext = createContext<ReactTable<TFeatures, any, any>>(\n    null as never,\n  )\n  const CellContext = createContext<Cell<TFeatures, any, any>>(null as never)\n  const HeaderContext = createContext<Header<TFeatures, any, any>>(\n    null as never,\n  )\n\n  /**\n   * Create a column helper pre-bound to the features and components configured in this table hook.\n   * The cell, header, and footer contexts include pre-bound components (e.g., `cell.TextCell`).\n   * @example\n   * ```tsx\n   * const columnHelper = createAppColumnHelper<Person>()\n   *\n   * const columns = [\n   *   columnHelper.accessor('firstName', {\n   *     header: 'First Name',\n   *     cell: ({ cell }) => <cell.TextCell />, // cell has pre-bound components!\n   *   }),\n   *   columnHelper.accessor('age', {\n   *     header: 'Age',\n   *     cell: ({ cell }) => <cell.NumberCell />,\n   *   }),\n   * ]\n   * ```\n   */\n  function createAppColumnHelper<TData extends RowData>(): AppColumnHelper<\n    TFeatures,\n    TData,\n    TCellComponents,\n    THeaderComponents\n  > {\n    // The runtime implementation is the same - components are attached at render time\n    // This cast provides the enhanced types for column definitions\n    return coreCreateColumnHelper<TFeatures, TData>() as AppColumnHelper<\n      TFeatures,\n      TData,\n      TCellComponents,\n      THeaderComponents\n    >\n  }\n\n  /**\n   * Access the table instance from within an `AppTable` wrapper.\n   * Use this in custom `tableComponents` passed to `createTableHook`.\n   * TFeatures is already known from the createTableHook call.\n   *\n   * @example\n   * ```tsx\n   * function PaginationControls() {\n   *   const table = useTableContext()\n   *   return (\n   *     <table.Subscribe selector={(s) => s.pagination}>\n   *       {(pagination) => (\n   *         <div>\n   *           <button onClick={() => table.previousPage()}>Prev</button>\n   *           <span>Page {pagination.pageIndex + 1}</span>\n   *           <button onClick={() => table.nextPage()}>Next</button>\n   *         </div>\n   *       )}\n   *     </table.Subscribe>\n   *   )\n   * }\n   * ```\n   */\n  function useTableContext<TData extends RowData = RowData>(): ReactTable<\n    TFeatures,\n    TData\n  > {\n    // useContext used for React 18 compatibility - use() requires React 19+\n    // eslint-disable-next-line @eslint-react/no-use-context -- intentional useContext for older React support\n    const table = useContext(TableContext)\n\n    // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n    if (!table) {\n      throw new Error(\n        '`useTableContext` must be used within an `AppTable` component. ' +\n          'Make sure your component is wrapped with `<table.AppTable>...</table.AppTable>`.',\n      )\n    }\n\n    return table as ReactTable<TFeatures, TData>\n  }\n\n  /**\n   * Access the cell instance from within an `AppCell` wrapper.\n   * Use this in custom `cellComponents` passed to `createTableHook`.\n   * TFeatures is already known from the createTableHook call.\n   *\n   * @example\n   * ```tsx\n   * function TextCell() {\n   *   const cell = useCellContext<string>()\n   *   return <span>{cell.getValue()}</span>\n   * }\n   *\n   * function NumberCell({ format }: { format?: Intl.NumberFormatOptions }) {\n   *   const cell = useCellContext<number>()\n   *   return <span>{cell.getValue().toLocaleString(undefined, format)}</span>\n   * }\n   * ```\n   */\n  function useCellContext<TValue extends CellData = CellData>() {\n    // useContext used for React 18 compatibility - use() requires React 19+\n    // eslint-disable-next-line @eslint-react/no-use-context -- intentional useContext for older React support\n    const cell = useContext(CellContext)\n\n    // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n    if (!cell) {\n      throw new Error(\n        '`useCellContext` must be used within an `AppCell` component. ' +\n          'Make sure your component is wrapped with `<table.AppCell cell={cell}>...</table.AppCell>`.',\n      )\n    }\n\n    return cell as Cell<TFeatures, any, TValue>\n  }\n\n  /**\n   * Access the header instance from within an `AppHeader` or `AppFooter` wrapper.\n   * Use this in custom `headerComponents` passed to `createTableHook`.\n   * TFeatures is already known from the createTableHook call.\n   *\n   * @example\n   * ```tsx\n   * function SortIndicator() {\n   *   const header = useHeaderContext()\n   *   const sorted = header.column.getIsSorted()\n   *   return sorted === 'asc' ? '🔼' : sorted === 'desc' ? '🔽' : null\n   * }\n   *\n   * function ColumnFilter() {\n   *   const header = useHeaderContext()\n   *   if (!header.column.getCanFilter()) return null\n   *   return (\n   *     <input\n   *       value={(header.column.getFilterValue() ?? '') as string}\n   *       onChange={(e) => header.column.setFilterValue(e.target.value)}\n   *       placeholder=\"Filter...\"\n   *     />\n   *   )\n   * }\n   * ```\n   */\n  function useHeaderContext<TValue extends CellData = CellData>() {\n    // useContext used for React 18 compatibility - use() requires React 19+\n    // eslint-disable-next-line @eslint-react/no-use-context -- intentional useContext for older React support\n    const header = useContext(HeaderContext)\n\n    // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n    if (!header) {\n      throw new Error(\n        '`useHeaderContext` must be used within an `AppHeader` or `AppFooter` component.',\n      )\n    }\n\n    return header as Header<TFeatures, any, TValue>\n  }\n\n  /**\n   * Context-aware FlexRender component for cells.\n   * Uses the cell from context, so no need to pass cell prop.\n   */\n  function CellFlexRender() {\n    const cell = useCellContext()\n    return <FlexRender cell={cell} />\n  }\n\n  /**\n   * Context-aware FlexRender component for headers.\n   * Uses the header from context, so no need to pass header prop.\n   */\n  function HeaderFlexRender() {\n    const header = useHeaderContext()\n    return <FlexRender header={header} />\n  }\n\n  /**\n   * Context-aware FlexRender component for footers.\n   * Uses the header from context, so no need to pass footer prop.\n   */\n  function FooterFlexRender() {\n    const header = useHeaderContext()\n    return <FlexRender footer={header} />\n  }\n\n  /**\n   * Enhanced useTable hook that returns a table with App wrapper components\n   * and pre-bound tableComponents attached directly to the table object.\n   *\n   * Default options from createTableHook are automatically merged with\n   * the options passed here. Options passed here take precedence.\n   *\n   * TFeatures is already known from the createTableHook call; TData is inferred from the data prop.\n   */\n  function useAppTable<TData extends RowData, TSelected = {}>(\n    tableOptions: Omit<\n      TableOptions<TFeatures, TData>,\n      '_features' | '_rowModels'\n    >,\n    selector?: (state: TableState<TFeatures>) => TSelected,\n  ): AppReactTable<\n    TFeatures,\n    TData,\n    TSelected,\n    TTableComponents,\n    TCellComponents,\n    THeaderComponents\n  > {\n    // Merge default options with provided options (provided takes precedence)\n    const table = useTable<TFeatures, TData, TSelected>(\n      { ...defaultTableOptions, ...tableOptions } as TableOptions<\n        TFeatures,\n        TData\n      >,\n      selector,\n    )\n\n    // AppTable - Root wrapper that provides table context with optional Subscribe\n    const AppTable = useMemo(() => {\n      function AppTableImpl(props: AppTablePropsWithoutSelector): ReactNode\n      function AppTableImpl<TAppTableSelected>(\n        props: AppTablePropsWithSelector<TFeatures, TAppTableSelected>,\n      ): ReactNode\n      function AppTableImpl<TAppTableSelected>(\n        props:\n          | AppTablePropsWithoutSelector\n          | AppTablePropsWithSelector<TFeatures, TAppTableSelected>,\n      ): ReactNode {\n        const { children, selector: appTableSelector } = props as any\n\n        return (\n          <TableContext.Provider value={table}>\n            {appTableSelector ? (\n              <table.Subscribe selector={appTableSelector}>\n                {(state: TAppTableSelected) =>\n                  (children as (state: TAppTableSelected) => ReactNode)(state)\n                }\n              </table.Subscribe>\n            ) : (\n              children\n            )}\n          </TableContext.Provider>\n        )\n      }\n      return AppTableImpl as AppTableComponent<TFeatures>\n    }, [table])\n\n    // AppCell - Wraps cell with context, pre-bound cellComponents, and optional Subscribe\n    const AppCell = useMemo(() => {\n      function AppCellImpl<TValue extends CellData = CellData>(\n        props: AppCellPropsWithoutSelector<\n          TFeatures,\n          TData,\n          TValue,\n          TCellComponents\n        >,\n      ): ReactNode\n      function AppCellImpl<\n        TValue extends CellData = CellData,\n        TAppCellSelected = unknown,\n      >(\n        props: AppCellPropsWithSelector<\n          TFeatures,\n          TData,\n          TValue,\n          TCellComponents,\n          TAppCellSelected\n        >,\n      ): ReactNode\n      function AppCellImpl<\n        TValue extends CellData = CellData,\n        TAppCellSelected = unknown,\n      >(\n        props:\n          | AppCellPropsWithoutSelector<\n              TFeatures,\n              TData,\n              TValue,\n              TCellComponents\n            >\n          | AppCellPropsWithSelector<\n              TFeatures,\n              TData,\n              TValue,\n              TCellComponents,\n              TAppCellSelected\n            >,\n      ): ReactNode {\n        const { cell, children, selector: appCellSelector } = props as any\n        const extendedCell = Object.assign(cell, {\n          FlexRender: CellFlexRender,\n          ...cellComponents,\n        })\n\n        return (\n          <CellContext.Provider value={cell}>\n            {appCellSelector ? (\n              <table.Subscribe selector={appCellSelector}>\n                {(state: TAppCellSelected) =>\n                  (\n                    children as (\n                      cell: Cell<TFeatures, TData, TValue> &\n                        TCellComponents & { FlexRender: () => ReactNode },\n                      state: TAppCellSelected,\n                    ) => ReactNode\n                  )(extendedCell, state)\n                }\n              </table.Subscribe>\n            ) : (\n              (\n                children as (\n                  cell: Cell<TFeatures, TData, TValue> &\n                    TCellComponents & { FlexRender: () => ReactNode },\n                ) => ReactNode\n              )(extendedCell)\n            )}\n          </CellContext.Provider>\n        )\n      }\n      return AppCellImpl as AppCellComponent<TFeatures, TData, TCellComponents>\n    }, [table])\n\n    // AppHeader - Wraps header with context, pre-bound headerComponents, and optional Subscribe\n    const AppHeader = useMemo(() => {\n      function AppHeaderImpl<TValue extends CellData = CellData>(\n        props: AppHeaderPropsWithoutSelector<\n          TFeatures,\n          TData,\n          TValue,\n          THeaderComponents\n        >,\n      ): ReactNode\n      function AppHeaderImpl<\n        TValue extends CellData = CellData,\n        TAppHeaderSelected = unknown,\n      >(\n        props: AppHeaderPropsWithSelector<\n          TFeatures,\n          TData,\n          TValue,\n          THeaderComponents,\n          TAppHeaderSelected\n        >,\n      ): ReactNode\n      function AppHeaderImpl<\n        TValue extends CellData = CellData,\n        TAppHeaderSelected = unknown,\n      >(\n        props:\n          | AppHeaderPropsWithoutSelector<\n              TFeatures,\n              TData,\n              TValue,\n              THeaderComponents\n            >\n          | AppHeaderPropsWithSelector<\n              TFeatures,\n              TData,\n              TValue,\n              THeaderComponents,\n              TAppHeaderSelected\n            >,\n      ): ReactNode {\n        const { header, children, selector: appHeaderSelector } = props as any\n        const extendedHeader = Object.assign(header, {\n          FlexRender: HeaderFlexRender,\n          ...headerComponents,\n        })\n\n        return (\n          <HeaderContext.Provider value={header}>\n            {appHeaderSelector ? (\n              <table.Subscribe selector={appHeaderSelector}>\n                {(state: TAppHeaderSelected) =>\n                  (\n                    children as (\n                      header: Header<TFeatures, TData, TValue> &\n                        THeaderComponents & { FlexRender: () => ReactNode },\n                      state: TAppHeaderSelected,\n                    ) => ReactNode\n                  )(extendedHeader, state)\n                }\n              </table.Subscribe>\n            ) : (\n              (\n                children as (\n                  header: Header<TFeatures, TData, TValue> &\n                    THeaderComponents & { FlexRender: () => ReactNode },\n                ) => ReactNode\n              )(extendedHeader)\n            )}\n          </HeaderContext.Provider>\n        )\n      }\n      return AppHeaderImpl as AppHeaderComponent<\n        TFeatures,\n        TData,\n        THeaderComponents\n      >\n    }, [table])\n\n    // AppFooter - Same as AppHeader (footers use Header type)\n    const AppFooter = useMemo(() => {\n      function AppFooterImpl<TValue extends CellData = CellData>(\n        props: AppHeaderPropsWithoutSelector<\n          TFeatures,\n          TData,\n          TValue,\n          THeaderComponents\n        >,\n      ): ReactNode\n      function AppFooterImpl<\n        TValue extends CellData = CellData,\n        TAppFooterSelected = unknown,\n      >(\n        props: AppHeaderPropsWithSelector<\n          TFeatures,\n          TData,\n          TValue,\n          THeaderComponents,\n          TAppFooterSelected\n        >,\n      ): ReactNode\n      function AppFooterImpl<\n        TValue extends CellData = CellData,\n        TAppFooterSelected = unknown,\n      >(\n        props:\n          | AppHeaderPropsWithoutSelector<\n              TFeatures,\n              TData,\n              TValue,\n              THeaderComponents\n            >\n          | AppHeaderPropsWithSelector<\n              TFeatures,\n              TData,\n              TValue,\n              THeaderComponents,\n              TAppFooterSelected\n            >,\n      ): ReactNode {\n        const { header, children, selector: appFooterSelector } = props as any\n        const extendedHeader = Object.assign(header, {\n          FlexRender: FooterFlexRender,\n          ...headerComponents,\n        })\n\n        return (\n          <HeaderContext.Provider value={header}>\n            {appFooterSelector ? (\n              <table.Subscribe selector={appFooterSelector}>\n                {(state: TAppFooterSelected) =>\n                  (\n                    children as (\n                      header: Header<TFeatures, TData, TValue> &\n                        THeaderComponents & { FlexRender: () => ReactNode },\n                      state: TAppFooterSelected,\n                    ) => ReactNode\n                  )(extendedHeader, state)\n                }\n              </table.Subscribe>\n            ) : (\n              (\n                children as (\n                  header: Header<TFeatures, TData, TValue> &\n                    THeaderComponents & { FlexRender: () => ReactNode },\n                ) => ReactNode\n              )(extendedHeader)\n            )}\n          </HeaderContext.Provider>\n        )\n      }\n      return AppFooterImpl as AppHeaderComponent<\n        TFeatures,\n        TData,\n        THeaderComponents\n      >\n    }, [table])\n\n    // Combine everything into the extended table API\n    const extendedTable = useMemo(() => {\n      return Object.assign(table, {\n        AppTable,\n        AppCell,\n        AppHeader,\n        AppFooter,\n        ...tableComponents,\n      }) as AppReactTable<\n        TFeatures,\n        TData,\n        TSelected,\n        TTableComponents,\n        TCellComponents,\n        THeaderComponents\n      >\n    }, [table, AppTable, AppCell, AppHeader, AppFooter])\n\n    return extendedTable\n  }\n\n  return {\n    appFeatures: defaultTableOptions._features as TFeatures,\n    createAppColumnHelper,\n    useAppTable,\n    useTableContext,\n    useCellContext,\n    useHeaderContext,\n  }\n}\n"
  },
  {
    "path": "packages/react-table/src/index.ts",
    "content": "export * from '@tanstack/table-core'\n\nexport * from './FlexRender'\nexport * from './Subscribe'\nexport * from './createTableHook'\nexport * from './useTable'\n"
  },
  {
    "path": "packages/react-table/src/legacy.ts",
    "content": "// Legacy entry - v8-style API for incremental migration\n// Import flexRender, types (ColumnFiltersState, etc.) from '@tanstack/react-table'\nexport * from './useLegacyTable'\n"
  },
  {
    "path": "packages/react-table/src/useLegacyTable.ts",
    "content": "'use client'\n\nimport {\n  aggregationFns,\n  createColumnHelper,\n  createExpandedRowModel,\n  createFacetedMinMaxValues,\n  createFacetedRowModel,\n  createFacetedUniqueValues,\n  createFilteredRowModel,\n  createGroupedRowModel,\n  createPaginatedRowModel,\n  createSortedRowModel,\n  filterFns,\n  sortFns,\n  stockFeatures,\n} from '@tanstack/table-core'\nimport { useCallback, useMemo } from 'react'\nimport { shallow, useStore } from '@tanstack/react-store'\nimport { useTable } from './useTable'\nimport type {\n  Cell,\n  Column,\n  ColumnDef,\n  CreateRowModels_All,\n  Header,\n  HeaderGroup,\n  Row,\n  RowData,\n  RowModel,\n  StockFeatures,\n  Table,\n  TableOptions,\n  TableState,\n} from '@tanstack/table-core'\nimport type { ReactTable } from './useTable'\n\n// =============================================================================\n// V8-style row model factory functions\n// These are stub functions that act as markers for useLegacyTable to know\n// which row models to enable. They don't actually do anything - the real\n// implementation is handled by useLegacyTable internally.\n// =============================================================================\n\n/**\n * @deprecated Use `createFilteredRowModel(filterFns)` with the new `useTable` hook instead.\n *\n * This is a stub function for v8 API compatibility with `useLegacyTable`.\n * It acts as a marker to enable the filtered row model.\n */\nexport function getFilteredRowModel<\n  TData extends RowData,\n>(): RowModelFactory<TData> {\n  return (() => () => {}) as unknown as RowModelFactory<TData>\n}\n\n/**\n * @deprecated Use `createSortedRowModel(sortFns)` with the new `useTable` hook instead.\n *\n * This is a stub function for v8 API compatibility with `useLegacyTable`.\n * It acts as a marker to enable the sorted row model.\n */\nexport function getSortedRowModel<\n  TData extends RowData,\n>(): RowModelFactory<TData> {\n  return (() => () => {}) as unknown as RowModelFactory<TData>\n}\n\n/**\n * @deprecated Use `createPaginatedRowModel()` with the new `useTable` hook instead.\n *\n * This is a stub function for v8 API compatibility with `useLegacyTable`.\n * It acts as a marker to enable the paginated row model.\n */\nexport function getPaginationRowModel<\n  TData extends RowData,\n>(): RowModelFactory<TData> {\n  return (() => () => {}) as unknown as RowModelFactory<TData>\n}\n\n/**\n * @deprecated Use `createExpandedRowModel()` with the new `useTable` hook instead.\n *\n * This is a stub function for v8 API compatibility with `useLegacyTable`.\n * It acts as a marker to enable the expanded row model.\n */\nexport function getExpandedRowModel<\n  TData extends RowData,\n>(): RowModelFactory<TData> {\n  return (() => () => {}) as unknown as RowModelFactory<TData>\n}\n\n/**\n * @deprecated Use `createGroupedRowModel(aggregationFns)` with the new `useTable` hook instead.\n *\n * This is a stub function for v8 API compatibility with `useLegacyTable`.\n * It acts as a marker to enable the grouped row model.\n */\nexport function getGroupedRowModel<\n  TData extends RowData,\n>(): RowModelFactory<TData> {\n  return (() => () => {}) as unknown as RowModelFactory<TData>\n}\n\n/**\n * @deprecated Use `createFacetedRowModel()` with the new `useTable` hook instead.\n *\n * This is a stub function for v8 API compatibility with `useLegacyTable`.\n * It acts as a marker to enable the faceted row model.\n */\nexport function getFacetedRowModel<\n  TData extends RowData,\n>(): FacetedRowModelFactory<TData> {\n  return (() => () => {}) as unknown as FacetedRowModelFactory<TData>\n}\n\n/**\n * @deprecated Use `createFacetedMinMaxValues()` with the new `useTable` hook instead.\n *\n * This is a stub function for v8 API compatibility with `useLegacyTable`.\n * It acts as a marker to enable the faceted min/max values.\n */\nexport function getFacetedMinMaxValues<\n  TData extends RowData,\n>(): FacetedMinMaxValuesFactory<TData> {\n  return (() => () => undefined) as unknown as FacetedMinMaxValuesFactory<TData>\n}\n\n/**\n * @deprecated Use `createFacetedUniqueValues()` with the new `useTable` hook instead.\n *\n * This is a stub function for v8 API compatibility with `useLegacyTable`.\n * It acts as a marker to enable the faceted unique values.\n */\nexport function getFacetedUniqueValues<\n  TData extends RowData,\n>(): FacetedUniqueValuesFactory<TData> {\n  return (() => () => new Map()) as unknown as FacetedUniqueValuesFactory<TData>\n}\n\n/**\n * @deprecated The core row model is always created automatically in v9.\n *\n * This is a stub function for v8 API compatibility with `useLegacyTable`.\n * It does nothing - the core row model is always available.\n */\nexport function getCoreRowModel<\n  TData extends RowData,\n>(): RowModelFactory<TData> {\n  return (() => () => {}) as unknown as RowModelFactory<TData>\n}\n\n// =============================================================================\n// Type definitions\n// =============================================================================\n\n/**\n * Row model factory function type from v8 API\n */\ntype RowModelFactory<TData extends RowData> = (\n  table: Table<StockFeatures, TData>,\n) => () => RowModel<StockFeatures, TData>\n\n/**\n * Faceted row model factory function type from v8 API\n */\ntype FacetedRowModelFactory<TData extends RowData> = (\n  table: Table<StockFeatures, TData>,\n  columnId: string,\n) => () => RowModel<StockFeatures, TData>\n\n/**\n * Faceted min/max values factory function type from v8 API\n */\ntype FacetedMinMaxValuesFactory<TData extends RowData> = (\n  table: Table<StockFeatures, TData>,\n  columnId: string,\n) => () => undefined | [number, number]\n\n/**\n * Faceted unique values factory function type from v8 API\n */\ntype FacetedUniqueValuesFactory<TData extends RowData> = (\n  table: Table<StockFeatures, TData>,\n  columnId: string,\n) => () => Map<any, number>\n\n/**\n * Legacy v8-style row model options\n */\nexport interface LegacyRowModelOptions<TData extends RowData> {\n  /**\n   * Returns the core row model for the table.\n   * @deprecated This option is no longer needed in v9. The core row model is always created automatically.\n   */\n  getCoreRowModel?: RowModelFactory<TData>\n  /**\n   * Returns the filtered row model for the table.\n   * @deprecated Use `_rowModels.filteredRowModel` with `createFilteredRowModel(filterFns)` instead.\n   */\n  getFilteredRowModel?: RowModelFactory<TData>\n  /**\n   * Returns the sorted row model for the table.\n   * @deprecated Use `_rowModels.sortedRowModel` with `createSortedRowModel(sortFns)` instead.\n   */\n  getSortedRowModel?: RowModelFactory<TData>\n  /**\n   * Returns the paginated row model for the table.\n   * @deprecated Use `_rowModels.paginatedRowModel` with `createPaginatedRowModel()` instead.\n   */\n  getPaginationRowModel?: RowModelFactory<TData>\n  /**\n   * Returns the expanded row model for the table.\n   * @deprecated Use `_rowModels.expandedRowModel` with `createExpandedRowModel()` instead.\n   */\n  getExpandedRowModel?: RowModelFactory<TData>\n  /**\n   * Returns the grouped row model for the table.\n   * @deprecated Use `_rowModels.groupedRowModel` with `createGroupedRowModel(aggregationFns)` instead.\n   */\n  getGroupedRowModel?: RowModelFactory<TData>\n  /**\n   * Returns the faceted row model for a column.\n   * @deprecated Use `_rowModels.facetedRowModel` with `createFacetedRowModel()` instead.\n   */\n  getFacetedRowModel?: FacetedRowModelFactory<TData>\n  /**\n   * Returns the faceted min/max values for a column.\n   * @deprecated Use `_rowModels.facetedMinMaxValues` with `createFacetedMinMaxValues()` instead.\n   */\n  getFacetedMinMaxValues?: FacetedMinMaxValuesFactory<TData>\n  /**\n   * Returns the faceted unique values for a column.\n   * @deprecated Use `_rowModels.facetedUniqueValues` with `createFacetedUniqueValues()` instead.\n   */\n  getFacetedUniqueValues?: FacetedUniqueValuesFactory<TData>\n}\n\n/**\n * Legacy v8-style table options that work with useLegacyTable.\n *\n * This type omits `_features` and `_rowModels` and instead accepts the v8-style\n * `get*RowModel` function options.\n *\n * @deprecated This is a compatibility layer for migrating from v8. Use `useTable` with explicit `_features` and `_rowModels` instead.\n */\nexport type LegacyTableOptions<TData extends RowData> = Omit<\n  TableOptions<StockFeatures, TData>,\n  '_features' | '_rowModels'\n> &\n  LegacyRowModelOptions<TData>\n\n/**\n * Legacy table instance type that includes the v8-style `getState()` method.\n *\n * @deprecated Use `useTable` with explicit state selection instead.\n */\nexport type LegacyReactTable<TData extends RowData> = ReactTable<\n  StockFeatures,\n  TData,\n  TableState<StockFeatures>\n> & {\n  /**\n   * Returns the current table state.\n   * @deprecated In v9, access state directly via `table.state` or use `table.store.state` for the full state.\n   */\n  getState: () => TableState<StockFeatures>\n}\n\n// =============================================================================\n// Legacy type aliases - StockFeatures hardcoded for simpler prop typing with useLegacyTable\n// =============================================================================\n\n/** @deprecated Use Column<TFeatures, TData, TValue> with useTable instead. */\nexport type LegacyColumn<TData extends RowData, TValue = unknown> = Column<\n  StockFeatures,\n  TData,\n  TValue\n>\n\n/** @deprecated Use Row<TFeatures, TData> with useTable instead. */\nexport type LegacyRow<TData extends RowData> = Row<StockFeatures, TData>\n\n/** @deprecated Use Cell<TFeatures, TData, TValue> with useTable instead. */\nexport type LegacyCell<TData extends RowData, TValue = unknown> = Cell<\n  StockFeatures,\n  TData,\n  TValue\n>\n\n/** @deprecated Use Header<TFeatures, TData, TValue> with useTable instead. */\nexport type LegacyHeader<TData extends RowData, TValue = unknown> = Header<\n  StockFeatures,\n  TData,\n  TValue\n>\n\n/** @deprecated Use HeaderGroup<TFeatures, TData> with useTable instead. */\nexport type LegacyHeaderGroup<TData extends RowData> = HeaderGroup<\n  StockFeatures,\n  TData\n>\n\n/** @deprecated Use ColumnDef<TFeatures, TData, TValue> with useTable instead. */\nexport type LegacyColumnDef<\n  TData extends RowData,\n  TValue = unknown,\n> = ColumnDef<StockFeatures, TData, TValue>\n\n/** @deprecated Use Table<TFeatures, TData> with useTable instead. */\nexport type LegacyTable<TData extends RowData> = Table<StockFeatures, TData>\n\n// =============================================================================\n// Legacy column helper - StockFeatures hardcoded\n// =============================================================================\n\n/**\n * @deprecated Use `createColumnHelper<TFeatures, TData>()` with useTable instead.\n *\n * A column helper with StockFeatures pre-bound for use with useLegacyTable.\n * Only requires TData—no need to specify TFeatures.\n */\nexport function legacyCreateColumnHelper<TData extends RowData>() {\n  return createColumnHelper<StockFeatures, TData>()\n}\n\n// =============================================================================\n// useLegacyTable hook\n// =============================================================================\n\n/**\n * @deprecated This hook is provided as a compatibility layer for migrating from TanStack Table v8.\n *\n * Use the new `useTable` hook instead with explicit `_features` and `_rowModels`:\n *\n * ```tsx\n * // New v9 API\n * const _features = tableFeatures({\n *   columnFilteringFeature,\n *   rowSortingFeature,\n *   rowPaginationFeature,\n * })\n *\n * const table = useTable({\n *   _features,\n *   _rowModels: {\n *     filteredRowModel: createFilteredRowModel(filterFns),\n *     sortedRowModel: createSortedRowModel(sortFns),\n *     paginatedRowModel: createPaginatedRowModel(),\n *   },\n *   columns,\n *   data,\n * })\n * ```\n *\n * Key differences from v8:\n * - Features are tree-shakeable - only import what you use\n * - Row models are explicitly passed via `_rowModels`\n * - Use `table.Subscribe` for fine-grained re-renders\n * - State is accessed via `table.state` after selecting with the 2nd argument\n *\n * @param options - Legacy v8-style table options\n * @returns A table instance with the full state subscribed and a `getState()` method\n */\nexport function useLegacyTable<TData extends RowData>(\n  options: LegacyTableOptions<TData>,\n): LegacyReactTable<TData> {\n  const {\n    // Extract legacy row model options\n    getCoreRowModel: _getCoreRowModel,\n    getFilteredRowModel,\n    getSortedRowModel,\n    getPaginationRowModel,\n    getExpandedRowModel,\n    getGroupedRowModel,\n    getFacetedRowModel,\n    getFacetedMinMaxValues,\n    getFacetedUniqueValues,\n    // Rest of the options\n    ...restOptions\n  } = options\n\n  // Build the _rowModels object based on which legacy options were provided\n  const _rowModels: CreateRowModels_All<StockFeatures, TData> = {}\n\n  // Map v8 row model factories to v9 _rowModels\n  // Note: getCoreRowModel is handled automatically in v9, so we ignore it\n\n  if (getFilteredRowModel) {\n    _rowModels.filteredRowModel = createFilteredRowModel(filterFns)\n  }\n\n  if (getSortedRowModel) {\n    _rowModels.sortedRowModel = createSortedRowModel(sortFns)\n  }\n\n  if (getPaginationRowModel) {\n    _rowModels.paginatedRowModel = createPaginatedRowModel()\n  }\n\n  if (getExpandedRowModel) {\n    _rowModels.expandedRowModel = createExpandedRowModel()\n  }\n\n  if (getGroupedRowModel) {\n    _rowModels.groupedRowModel = createGroupedRowModel(aggregationFns)\n  }\n\n  if (getFacetedRowModel) {\n    _rowModels.facetedRowModel = createFacetedRowModel()\n  }\n\n  if (getFacetedMinMaxValues) {\n    _rowModels.facetedMinMaxValues = createFacetedMinMaxValues()\n  }\n\n  if (getFacetedUniqueValues) {\n    _rowModels.facetedUniqueValues = createFacetedUniqueValues()\n  }\n\n  // Call useTable with the v9 API, subscribing to all state changes\n  const table = useTable<StockFeatures, TData, TableState<StockFeatures>>(\n    {\n      ...restOptions,\n      _features: stockFeatures,\n      _rowModels,\n    } as TableOptions<StockFeatures, TData>,\n    (state) => state,\n  )\n\n  return useMemo(\n    () =>\n      ({\n        ...table,\n        getState: () => table.state,\n      }) as LegacyReactTable<TData>,\n    [table],\n  )\n}\n"
  },
  {
    "path": "packages/react-table/src/useTable.ts",
    "content": "'use client'\n\nimport { useEffect, useLayoutEffect, useMemo, useState } from 'react'\nimport { constructTable } from '@tanstack/table-core'\nimport { shallow, useStore } from '@tanstack/react-store'\nimport { FlexRender } from './FlexRender'\nimport { Subscribe } from './Subscribe'\nimport type {\n  CellData,\n  NoInfer,\n  RowData,\n  Table,\n  TableFeatures,\n  TableOptions,\n  TableState,\n} from '@tanstack/table-core'\nimport type { FunctionComponent, ReactNode } from 'react'\nimport type { FlexRenderProps } from './FlexRender'\nimport type { SubscribeProps } from './Subscribe'\n\nconst useIsomorphicLayoutEffect =\n  typeof window !== 'undefined' ? useLayoutEffect : useEffect\n\nexport type ReactTable<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TSelected = {},\n> = Table<TFeatures, TData> & {\n  /**\n   * A React HOC (Higher Order Component) that allows you to subscribe to the table state.\n   *\n   * This is useful for opting into state re-renders for specific parts of the table state.\n   *\n   * @example\n   * <table.Subscribe selector={(state) => ({ rowSelection: state.rowSelection })}>\n   *   {({ rowSelection }) => ( // important to include `{() => {()}}` syntax\n   *     <tr key={row.id}>\n            // render the row\n   *     </tr>\n   *   ))}\n   * </table.Subscribe>\n   */\n  Subscribe: <TSelected>(props: {\n    selector: (state: NoInfer<TableState<TFeatures>>) => TSelected\n    children: ((state: TSelected) => ReactNode) | ReactNode\n  }) => ReturnType<FunctionComponent>\n  /**\n   * A React component that renders headers, cells, or footers with custom markup.\n   * Use this utility component instead of manually calling flexRender.\n   *\n   * @example\n   * ```tsx\n   * <table.FlexRender cell={cell} />\n   * <table.FlexRender header={header} />\n   * <table.FlexRender footer={footer} />\n   * ```\n   *\n   * This replaces calling `flexRender` directly like this:\n   * ```tsx\n   * flexRender(cell.column.columnDef.cell, cell.getContext())\n   * flexRender(header.column.columnDef.header, header.getContext())\n   * flexRender(footer.column.columnDef.footer, footer.getContext())\n   * ```\n   */\n  FlexRender: <TValue extends CellData = CellData>(\n    props: FlexRenderProps<TFeatures, TData, TValue>,\n  ) => ReactNode\n  /**\n   * The selected state of the table. This state may not match the structure of `table.store.state` because it is selected by the `selector` function that you pass as the 2nd argument to `useTable`.\n   *\n   * @example\n   * const table = useTable(options, (state) => ({ globalFilter: state.globalFilter })) // only globalFilter is part of the selected state\n   *\n   * console.log(table.state.globalFilter)\n   */\n  readonly state: Readonly<TSelected>\n}\n\nexport function useTable<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TSelected = {},\n>(\n  tableOptions: TableOptions<TFeatures, TData>,\n  selector: (state: TableState<TFeatures>) => TSelected = () =>\n    ({}) as TSelected,\n): ReactTable<TFeatures, TData, TSelected> {\n  const [table] = useState(() => {\n    const tableInstance = constructTable(tableOptions) as ReactTable<\n      TFeatures,\n      TData,\n      TSelected\n    >\n\n    tableInstance.Subscribe = function SubscribeBound<TSelected>(\n      props: Omit<SubscribeProps<TFeatures, TData, TSelected>, 'table'>,\n    ) {\n      return Subscribe({ ...props, table: tableInstance })\n    }\n\n    tableInstance.FlexRender = FlexRender\n\n    return tableInstance\n  })\n\n  useEffect(() => {\n    // sync table options on every render\n    table.setOptions((prev) => ({\n      ...prev,\n      ...tableOptions,\n    }))\n  }, [table, tableOptions])\n\n  const state = useStore(table.store, selector, shallow)\n\n  return useMemo(\n    () => ({\n      ...table,\n      state,\n    }),\n    [state, table],\n  )\n}\n"
  },
  {
    "path": "packages/react-table/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig.json\",\n  \"compilerOptions\": {\n    \"jsx\": \"react\"\n  },\n  \"include\": [\"src\", \"eslint.config.js\", \"vite.config.ts\", \"tests\"]\n}\n"
  },
  {
    "path": "packages/react-table/vite.config.ts",
    "content": "import { defineConfig, mergeConfig } from 'vitest/config'\nimport { tanstackViteConfig } from '@tanstack/vite-config'\nimport react from '@vitejs/plugin-react'\nimport packageJson from './package.json'\n\nconst config = defineConfig({\n  plugins: [react()],\n  test: {\n    name: packageJson.name,\n    dir: './tests',\n    watch: false,\n    environment: 'jsdom',\n    // setupFiles: ['./tests/test-setup.ts'],\n    globals: true,\n  },\n})\n\nexport default mergeConfig(\n  config,\n  tanstackViteConfig({\n    cjs: false,\n    entry: ['./src/index.ts', './src/legacy.ts'],\n    srcDir: './src',\n  }),\n)\n"
  },
  {
    "path": "packages/react-table-devtools/eslint.config.js",
    "content": "// @ts-check\n\nimport pluginReact from '@eslint-react/eslint-plugin'\nimport pluginReactCompiler from 'eslint-plugin-react-compiler'\nimport pluginReactHooks from 'eslint-plugin-react-hooks'\nimport rootConfig from '../../eslint.config.js'\n\n/** @type {any} */\nconst config = [\n  ...rootConfig,\n  {\n    files: ['**/*.{ts,tsx}'],\n    ...pluginReact.configs.recommended,\n  },\n  {\n    plugins: {\n      'react-hooks': pluginReactHooks,\n      'react-compiler': pluginReactCompiler,\n    },\n    rules: {\n      '@eslint-react/dom/no-missing-button-type': 'off',\n      'react-compiler/react-compiler': 'error',\n      'react-hooks/exhaustive-deps': 'error',\n      'react-hooks/rules-of-hooks': 'error',\n    },\n  },\n]\n\nexport default config\n"
  },
  {
    "path": "packages/react-table-devtools/package.json",
    "content": "{\n  \"name\": \"@tanstack/react-table-devtools\",\n  \"version\": \"9.0.0-alpha.11\",\n  \"description\": \"React devtools for TanStack Table.\",\n  \"author\": \"Tanner Linsley\",\n  \"license\": \"MIT\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/TanStack/table.git\",\n    \"directory\": \"packages/react-table-devtools\"\n  },\n  \"homepage\": \"https://tanstack.com/table\",\n  \"funding\": {\n    \"type\": \"github\",\n    \"url\": \"https://github.com/sponsors/tannerlinsley\"\n  },\n  \"keywords\": [\n    \"react\",\n    \"tanstack\",\n    \"table\",\n    \"devtools\"\n  ],\n  \"scripts\": {\n    \"clean\": \"rimraf ./build && rimraf ./dist\",\n    \"test:eslint\": \"eslint ./src\",\n    \"test:lib\": \"vitest --passWithNoTests\",\n    \"test:lib:dev\": \"pnpm test:lib --watch\",\n    \"test:types\": \"tsc\",\n    \"test:build\": \"publint --strict\",\n    \"build\": \"vite build\"\n  },\n  \"type\": \"module\",\n  \"types\": \"dist/esm/index.d.ts\",\n  \"module\": \"dist/esm/index.js\",\n  \"exports\": {\n    \".\": {\n      \"import\": {\n        \"types\": \"./dist/esm/index.d.ts\",\n        \"default\": \"./dist/esm/index.js\"\n      }\n    },\n    \"./production\": {\n      \"import\": {\n        \"types\": \"./dist/esm/production.d.ts\",\n        \"default\": \"./dist/esm/production.js\"\n      }\n    },\n    \"./package.json\": \"./package.json\"\n  },\n  \"sideEffects\": false,\n  \"engines\": {\n    \"node\": \">=16\"\n  },\n  \"files\": [\n    \"dist\",\n    \"src\"\n  ],\n  \"dependencies\": {\n    \"@tanstack/devtools-utils\": \"^0.3.2\",\n    \"@tanstack/table-core\": \"workspace:*\",\n    \"@tanstack/table-devtools\": \"workspace:*\"\n  },\n  \"devDependencies\": {\n    \"@eslint-react/eslint-plugin\": \"^2.13.0\",\n    \"@types/react\": \"^19.2.10\",\n    \"@vitejs/plugin-react\": \"^5.1.2\",\n    \"eslint-plugin-react-compiler\": \"19.1.0-rc.2\",\n    \"eslint-plugin-react-hooks\": \"^7.0.1\",\n    \"react\": \"^19.2.4\"\n  },\n  \"peerDependencies\": {\n    \"react\": \">=18\",\n    \"react-dom\": \">=18\"\n  }\n}\n"
  },
  {
    "path": "packages/react-table-devtools/src/ReactTableDevtools.tsx",
    "content": "import React from 'react'\nimport { createReactPanel } from '@tanstack/devtools-utils/react'\nimport {\n  TableDevtoolsCore,\n  setTableDevtoolsTarget,\n} from '@tanstack/table-devtools'\n\nimport type { RowData, Table, TableFeatures } from '@tanstack/table-core'\nimport type { DevtoolsPanelProps } from '@tanstack/devtools-utils/react'\n\nexport interface TableDevtoolsReactInit<\n  TFeatures extends TableFeatures = TableFeatures,\n  TData extends RowData = RowData,\n> extends DevtoolsPanelProps {\n  table?: Table<TFeatures, TData>\n}\n\nconst [TableDevtoolsPanelBase, TableDevtoolsPanelNoOp] =\n  createReactPanel(TableDevtoolsCore)\n\nfunction TableDevtoolsPanel(props: TableDevtoolsReactInit) {\n  setTableDevtoolsTarget(props.table)\n  return <TableDevtoolsPanelBase theme={props.theme} />\n}\n\nexport { TableDevtoolsPanel, TableDevtoolsPanelNoOp }\n"
  },
  {
    "path": "packages/react-table-devtools/src/index.ts",
    "content": "'use client'\n\nimport * as Devtools from './ReactTableDevtools'\nimport * as plugin from './plugin'\n\nexport const TableDevtoolsPanel =\n  process.env.NODE_ENV !== 'development'\n    ? Devtools.TableDevtoolsPanelNoOp\n    : Devtools.TableDevtoolsPanel\n\nexport const tableDevtoolsPlugin =\n  process.env.NODE_ENV !== 'development'\n    ? plugin.tableDevtoolsNoOpPlugin\n    : plugin.tableDevtoolsPlugin\n\nexport type { TableDevtoolsReactInit } from './ReactTableDevtools'\nexport type { TableDevtoolsPluginOptions } from './plugin'\n"
  },
  {
    "path": "packages/react-table-devtools/src/plugin.tsx",
    "content": "import React from 'react'\nimport { TableDevtoolsPanel } from './ReactTableDevtools'\nimport type { RowData, Table, TableFeatures } from '@tanstack/table-core'\n\nexport interface TableDevtoolsPluginOptions<\n  TFeatures extends TableFeatures = TableFeatures,\n  TData extends RowData = RowData,\n> {\n  table: Table<TFeatures, TData>\n}\n\nfunction tableDevtoolsPlugin<\n  TFeatures extends TableFeatures = TableFeatures,\n  TData extends RowData = RowData,\n>(options: TableDevtoolsPluginOptions<TFeatures, TData>) {\n  return {\n    name: 'TanStack Table',\n    render: (_el: HTMLElement, theme: 'light' | 'dark') => (\n      <TableDevtoolsPanel table={options.table} theme={theme} />\n    ),\n  }\n}\n\nfunction tableDevtoolsNoOpPlugin<\n  TFeatures extends TableFeatures = TableFeatures,\n  TData extends RowData = RowData,\n>(_options: TableDevtoolsPluginOptions<TFeatures, TData>) {\n  return {\n    name: 'TanStack Table',\n    render: (_el: HTMLElement, _theme: 'light' | 'dark') => <></>,\n  }\n}\n\nexport { tableDevtoolsPlugin, tableDevtoolsNoOpPlugin }\n"
  },
  {
    "path": "packages/react-table-devtools/src/production.ts",
    "content": "'use client'\n\nexport { TableDevtoolsPanel } from './ReactTableDevtools'\nexport type { TableDevtoolsReactInit } from './ReactTableDevtools'\nexport { tableDevtoolsPlugin } from './plugin'\nexport type { TableDevtoolsPluginOptions } from './plugin'\n"
  },
  {
    "path": "packages/react-table-devtools/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig.json\",\n  \"compilerOptions\": {\n    \"jsx\": \"react\"\n  },\n  \"include\": [\"src\", \"eslint.config.js\", \"vite.config.ts\", \"tests\"]\n}\n"
  },
  {
    "path": "packages/react-table-devtools/vite.config.ts",
    "content": "import { defineConfig, mergeConfig } from 'vitest/config'\nimport { tanstackViteConfig } from '@tanstack/vite-config'\nimport react from '@vitejs/plugin-react'\nimport packageJson from './package.json'\n\nconst config = defineConfig({\n  plugins: [react()],\n  test: {\n    name: packageJson.name,\n    dir: './tests',\n    watch: false,\n    environment: 'jsdom',\n    globals: true,\n  },\n})\n\nexport default mergeConfig(\n  config,\n  tanstackViteConfig({\n    cjs: false,\n    entry: ['./src/index.ts', './src/production.ts'],\n    srcDir: './src',\n  }),\n)\n"
  },
  {
    "path": "packages/solid-table/eslint.config.js",
    "content": "// @ts-check\n\nimport rootConfig from '../../eslint.config.js'\n\nexport default [\n  ...rootConfig,\n  {\n    rules: {},\n  },\n]\n"
  },
  {
    "path": "packages/solid-table/package.json",
    "content": "{\n  \"name\": \"@tanstack/solid-table\",\n  \"version\": \"9.0.0-alpha.10\",\n  \"description\": \"Headless UI for building powerful tables & datagrids for Solid.\",\n  \"author\": \"Tanner Linsley\",\n  \"license\": \"MIT\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/TanStack/table.git\",\n    \"directory\": \"packages/solid-table\"\n  },\n  \"homepage\": \"https://tanstack.com/table\",\n  \"funding\": {\n    \"type\": \"github\",\n    \"url\": \"https://github.com/sponsors/tannerlinsley\"\n  },\n  \"keywords\": [\n    \"solid\",\n    \"table\",\n    \"solid-table\",\n    \"datagrid\"\n  ],\n  \"type\": \"module\",\n  \"types\": \"dist/index.d.ts\",\n  \"module\": \"dist/index.jsx\",\n  \"exports\": {\n    \".\": {\n      \"solid\": {\n        \"types\": \"./dist/index.d.ts\",\n        \"default\": \"./dist/index.jsx\"\n      },\n      \"import\": {\n        \"types\": \"./dist/index.d.ts\",\n        \"default\": \"./dist/index.jsx\"\n      }\n    },\n    \"./package.json\": \"./package.json\"\n  },\n  \"sideEffects\": false,\n  \"engines\": {\n    \"node\": \">=16\"\n  },\n  \"files\": [\n    \"dist\",\n    \"src\"\n  ],\n  \"scripts\": {\n    \"clean\": \"rimraf ./build && rimraf ./dist\",\n    \"test:eslint\": \"eslint ./src\",\n    \"test:types\": \"tsc\",\n    \"test:build\": \"publint --strict\",\n    \"build\": \"tsc -p tsconfig.build.json\"\n  },\n  \"dependencies\": {\n    \"@tanstack/solid-store\": \"^0.9.2\",\n    \"@tanstack/table-core\": \"workspace:*\"\n  },\n  \"devDependencies\": {\n    \"solid-js\": \"^1.9.11\",\n    \"vite-plugin-solid\": \"^2.11.10\"\n  },\n  \"peerDependencies\": {\n    \"solid-js\": \">=1.3\"\n  }\n}\n"
  },
  {
    "path": "packages/solid-table/src/FlexRender.tsx",
    "content": "import { Match, Switch, createComponent } from 'solid-js'\nimport type { JSX } from 'solid-js'\nimport type {\n  Cell,\n  CellData,\n  Header,\n  RowData,\n  TableFeatures,\n} from '@tanstack/table-core'\n\nexport function flexRender<TProps>(\n  Comp: ((_props: TProps) => JSX.Element) | JSX.Element | undefined,\n  props: TProps,\n): JSX.Element {\n  if (!Comp) return null\n\n  if (typeof Comp === 'function') {\n    return createComponent(Comp, props as any)\n  }\n\n  return Comp\n}\n\n/**\n * Simplified component wrapper of `flexRender`. Use this utility component to render headers, cells, or footers with custom markup.\n * Only one prop (`cell`, `header`, or `footer`) may be passed.\n * @example <FlexRender cell={cell} />\n * @example <FlexRender header={header} />\n * @example <FlexRender footer={footer} />\n */\nexport type FlexRenderProps<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n> =\n  | { cell: Cell<TFeatures, TData, TValue>; header?: never; footer?: never }\n  | {\n      header: Header<TFeatures, TData, TValue>\n      cell?: never\n      footer?: never\n    }\n  | {\n      footer: Header<TFeatures, TData, TValue>\n      cell?: never\n      header?: never\n    }\n\n/**\n * Simplified component wrapper of `flexRender`. Use this utility component to render headers, cells, or footers with custom markup.\n * Only one prop (`cell`, `header`, or `footer`) may be passed.\n * @example\n * ```tsx\n * <FlexRender cell={cell} />\n * <FlexRender header={header} />\n * <FlexRender footer={footer} />\n * ```\n *\n * This replaces calling `flexRender` directly like this:\n * ```tsx\n * flexRender(cell.column.columnDef.cell, cell.getContext())\n * flexRender(header.column.columnDef.header, header.getContext())\n * flexRender(footer.column.columnDef.footer, footer.getContext())\n * ```\n */\nexport function FlexRender<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n>(props: FlexRenderProps<TFeatures, TData, TValue>) {\n  return (\n    <Switch>\n      <Match when={'cell' in props && props.cell}>\n        {(cell) =>\n          flexRender(cell().column.columnDef.cell, cell().getContext())\n        }\n      </Match>\n      <Match when={'header' in props && props.header}>\n        {(header) =>\n          flexRender(header().column.columnDef.header, header().getContext())\n        }\n      </Match>\n      <Match when={'footer' in props && props.footer}>\n        {(footer) =>\n          flexRender(footer().column.columnDef.footer, footer().getContext())\n        }\n      </Match>\n    </Switch>\n  )\n}\n"
  },
  {
    "path": "packages/solid-table/src/createTable.ts",
    "content": "import {\n  constructReactivityFeature,\n  constructTable,\n} from '@tanstack/table-core'\nimport { useStore } from '@tanstack/solid-store'\nimport { createComputed, createSignal, mergeProps } from 'solid-js'\nimport type { Accessor, JSX } from 'solid-js'\nimport type {\n  NoInfer,\n  RowData,\n  Table,\n  TableFeatures,\n  TableOptions,\n  TableState,\n} from '@tanstack/table-core'\n\nexport type SolidTable<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TSelected = {},\n> = Table<TFeatures, TData> & {\n  /**\n   * A Solid component that allows you to subscribe to the table state.\n   *\n   * This is useful for opting into state subscriptions for specific parts of the table state.\n   *\n   * @example\n   * <table.Subscribe selector={(state) => ({ rowSelection: state.rowSelection })}>\n   *   {(state) => (\n   *     <tr>\n   *       // render the row\n   *     </tr>\n   *   )}\n   * </table.Subscribe>\n   */\n  Subscribe: <TSelected>(props: {\n    selector: (state: NoInfer<TableState<TFeatures>>) => TSelected\n    children: ((state: Accessor<TSelected>) => JSX.Element) | JSX.Element\n  }) => JSX.Element\n  /**\n   * The selected state of the table. This state may not match the structure of `table.store.state` because it is selected by the `selector` function that you pass as the 2nd argument to `createTable`.\n   *\n   * @example\n   * const table = createTable(options, (state) => ({ globalFilter: state.globalFilter })) // only globalFilter is part of the selected state\n   *\n   * console.log(table.state().globalFilter)\n   */\n  readonly state: Accessor<Readonly<TSelected>>\n}\n\nexport function createTable<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TSelected = {},\n>(\n  tableOptions: TableOptions<TFeatures, TData>,\n  selector: (state: TableState<TFeatures>) => TSelected = () =>\n    ({}) as TSelected,\n): SolidTable<TFeatures, TData, TSelected> {\n  const [notifier, setNotifier] = createSignal<void>(void 0, { equals: false })\n\n  const solidReactivityFeature = constructReactivityFeature({\n    stateNotifier: () => notifier(),\n    optionsNotifier: () => notifier(),\n  })\n\n  const mergedOptions = mergeProps(tableOptions, {\n    _features: mergeProps(tableOptions._features, {\n      solidReactivityFeature,\n    }),\n  }) as any\n\n  const resolvedOptions = mergeProps(\n    {\n      mergeOptions: (\n        defaultOptions: TableOptions<TFeatures, TData>,\n        options: TableOptions<TFeatures, TData>,\n      ) => {\n        return mergeProps(defaultOptions, options)\n      },\n    },\n    mergedOptions,\n  ) as TableOptions<TFeatures, TData>\n\n  const table = constructTable(resolvedOptions) as SolidTable<\n    TFeatures,\n    TData,\n    TSelected\n  >\n\n  const allState = useStore(table.store, (state) => state)\n  const allOptions = useStore(table.optionsStore, (options) => options)\n\n  createComputed(() => {\n    table.setOptions((prev) => {\n      return mergeProps(prev, mergedOptions) as TableOptions<TFeatures, TData>\n    })\n  })\n\n  createComputed(() => {\n    allState()\n    allOptions()\n    setNotifier(void 0)\n  })\n\n  table.Subscribe = function Subscribe<TSelected>(props: {\n    selector: (state: TableState<TFeatures>) => TSelected\n    children: ((state: Accessor<TSelected>) => JSX.Element) | JSX.Element\n  }) {\n    const selected = useStore(table.store, props.selector)\n    return typeof props.children === 'function'\n      ? props.children(selected)\n      : props.children\n  }\n\n  const state = useStore(table.store, selector)\n\n  return {\n    ...table,\n    state,\n  } as SolidTable<TFeatures, TData, TSelected>\n}\n"
  },
  {
    "path": "packages/solid-table/src/createTableHook.tsx",
    "content": "import { createColumnHelper as coreCreateColumnHelper } from '@tanstack/table-core'\nimport { Show, createContext, mergeProps, useContext } from 'solid-js'\nimport { createTable } from './createTable'\nimport { FlexRender } from './FlexRender'\nimport type { SolidTable } from './createTable'\nimport type { Accessor, Component, JSXElement } from 'solid-js'\nimport type {\n  AccessorFn,\n  AccessorFnColumnDef,\n  AccessorKeyColumnDef,\n  Cell,\n  CellContext,\n  CellData,\n  Column,\n  ColumnDef,\n  DeepKeys,\n  DeepValue,\n  DisplayColumnDef,\n  GroupColumnDef,\n  Header,\n  IdentifiedColumnDef,\n  NoInfer,\n  Row,\n  RowData,\n  Table,\n  TableFeatures,\n  TableOptions,\n  TableState,\n} from '@tanstack/table-core'\n\ntype ComponentType<T extends Record<string, any>> = Component<T>\n\n// =============================================================================\n// Enhanced Context Types with Pre-bound Components\n// =============================================================================\n\n/**\n * Enhanced CellContext with pre-bound cell components.\n * The `cell` property includes the registered cellComponents.\n */\nexport type AppCellContext<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData,\n  TCellComponents extends Record<string, ComponentType<any>>,\n> = {\n  cell: Cell<TFeatures, TData, TValue> &\n    TCellComponents & { FlexRender: () => JSXElement }\n  column: Column<TFeatures, TData, TValue>\n  getValue: CellContext<TFeatures, TData, TValue>['getValue']\n  renderValue: CellContext<TFeatures, TData, TValue>['renderValue']\n  row: Row<TFeatures, TData>\n  table: Table<TFeatures, TData>\n}\n\n/**\n * Enhanced HeaderContext with pre-bound header components.\n * The `header` property includes the registered headerComponents.\n */\nexport type AppHeaderContext<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData,\n  THeaderComponents extends Record<string, ComponentType<any>>,\n> = {\n  column: Column<TFeatures, TData, TValue>\n  header: Header<TFeatures, TData, TValue> &\n    THeaderComponents & { FlexRender: () => JSXElement }\n  table: Table<TFeatures, TData>\n}\n\n// =============================================================================\n// Enhanced Column Definition Types\n// =============================================================================\n\n/**\n * Template type for column definitions that can be a string or a function.\n */\ntype AppColumnDefTemplate<TProps extends object> =\n  | string\n  | ((props: TProps) => any)\n\n/**\n * Enhanced column definition base with pre-bound components in cell/header/footer contexts.\n */\ntype AppColumnDefBase<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData,\n  TCellComponents extends Record<string, ComponentType<any>>,\n  THeaderComponents extends Record<string, ComponentType<any>>,\n> = Omit<\n  IdentifiedColumnDef<TFeatures, TData, TValue>,\n  'cell' | 'header' | 'footer'\n> & {\n  cell?: AppColumnDefTemplate<\n    AppCellContext<TFeatures, TData, TValue, TCellComponents>\n  >\n  header?: AppColumnDefTemplate<\n    AppHeaderContext<TFeatures, TData, TValue, THeaderComponents>\n  >\n  footer?: AppColumnDefTemplate<\n    AppHeaderContext<TFeatures, TData, TValue, THeaderComponents>\n  >\n}\n\n/**\n * Enhanced display column definition with pre-bound components.\n */\ntype AppDisplayColumnDef<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TCellComponents extends Record<string, ComponentType<any>>,\n  THeaderComponents extends Record<string, ComponentType<any>>,\n> = Omit<\n  DisplayColumnDef<TFeatures, TData, unknown>,\n  'cell' | 'header' | 'footer'\n> & {\n  cell?: AppColumnDefTemplate<\n    AppCellContext<TFeatures, TData, unknown, TCellComponents>\n  >\n  header?: AppColumnDefTemplate<\n    AppHeaderContext<TFeatures, TData, unknown, THeaderComponents>\n  >\n  footer?: AppColumnDefTemplate<\n    AppHeaderContext<TFeatures, TData, unknown, THeaderComponents>\n  >\n}\n\n/**\n * Enhanced group column definition with pre-bound components.\n */\ntype AppGroupColumnDef<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TCellComponents extends Record<string, ComponentType<any>>,\n  THeaderComponents extends Record<string, ComponentType<any>>,\n> = Omit<\n  GroupColumnDef<TFeatures, TData, unknown>,\n  'cell' | 'header' | 'footer' | 'columns'\n> & {\n  cell?: AppColumnDefTemplate<\n    AppCellContext<TFeatures, TData, unknown, TCellComponents>\n  >\n  header?: AppColumnDefTemplate<\n    AppHeaderContext<TFeatures, TData, unknown, THeaderComponents>\n  >\n  footer?: AppColumnDefTemplate<\n    AppHeaderContext<TFeatures, TData, unknown, THeaderComponents>\n  >\n  columns?: Array<ColumnDef<TFeatures, TData, unknown>>\n}\n\n// =============================================================================\n// Enhanced Column Helper Type\n// =============================================================================\n\n/**\n * Enhanced column helper with pre-bound components in cell/header/footer contexts.\n * This enables TypeScript to know about the registered components when defining columns.\n */\nexport type AppColumnHelper<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TCellComponents extends Record<string, ComponentType<any>>,\n  THeaderComponents extends Record<string, ComponentType<any>>,\n> = {\n  /**\n   * Creates a data column definition with an accessor key or function.\n   * The cell, header, and footer contexts include pre-bound components.\n   */\n  accessor: <\n    TAccessor extends AccessorFn<TData> | DeepKeys<TData>,\n    TValue extends TAccessor extends AccessorFn<TData, infer TReturn>\n      ? TReturn\n      : TAccessor extends DeepKeys<TData>\n        ? DeepValue<TData, TAccessor>\n        : never,\n  >(\n    accessor: TAccessor,\n    column: TAccessor extends AccessorFn<TData>\n      ? AppColumnDefBase<\n          TFeatures,\n          TData,\n          TValue,\n          TCellComponents,\n          THeaderComponents\n        > & { id: string }\n      : AppColumnDefBase<\n          TFeatures,\n          TData,\n          TValue,\n          TCellComponents,\n          THeaderComponents\n        >,\n  ) => TAccessor extends AccessorFn<TData>\n    ? AccessorFnColumnDef<TFeatures, TData, TValue>\n    : AccessorKeyColumnDef<TFeatures, TData, TValue>\n\n  /**\n   * Wraps an array of column definitions to preserve each column's individual TValue type.\n   */\n  columns: <TColumns extends ReadonlyArray<ColumnDef<TFeatures, TData, any>>>(\n    columns: [...TColumns],\n  ) => Array<ColumnDef<TFeatures, TData, any>> & [...TColumns]\n\n  /**\n   * Creates a display column definition for non-data columns.\n   * The cell, header, and footer contexts include pre-bound components.\n   */\n  display: (\n    column: AppDisplayColumnDef<\n      TFeatures,\n      TData,\n      TCellComponents,\n      THeaderComponents\n    >,\n  ) => DisplayColumnDef<TFeatures, TData, unknown>\n\n  /**\n   * Creates a group column definition with nested child columns.\n   * The cell, header, and footer contexts include pre-bound components.\n   */\n  group: (\n    column: AppGroupColumnDef<\n      TFeatures,\n      TData,\n      TCellComponents,\n      THeaderComponents\n    >,\n  ) => GroupColumnDef<TFeatures, TData, unknown>\n}\n\n// =============================================================================\n// CreateTableHook Options and Props\n// =============================================================================\n\n/**\n * Options for creating a table hook with pre-bound components and default table options.\n * Extends all TableOptions except 'columns' | 'data' | 'store' | 'state' | 'initialState'.\n */\nexport type CreateTableHookOptions<\n  TFeatures extends TableFeatures,\n  TTableComponents extends Record<string, ComponentType<any>>,\n  TCellComponents extends Record<string, ComponentType<any>>,\n  THeaderComponents extends Record<string, ComponentType<any>>,\n> = Omit<\n  TableOptions<TFeatures, any>,\n  'columns' | 'data' | 'store' | 'state' | 'initialState'\n> & {\n  /**\n   * Table-level components that need access to the table instance.\n   * These are available directly on the table object returned by createAppTable.\n   * Use `useTableContext()` inside these components.\n   * @example { PaginationControls, GlobalFilter, RowCount }\n   */\n  tableComponents?: TTableComponents\n  /**\n   * Cell-level components that need access to the cell instance.\n   * These are available on the cell object passed to AppCell's children.\n   * Use `useCellContext()` inside these components.\n   * @example { TextCell, NumberCell, DateCell, CurrencyCell }\n   */\n  cellComponents?: TCellComponents\n  /**\n   * Header-level components that need access to the header instance.\n   * These are available on the header object passed to AppHeader/AppFooter's children.\n   * Use `useHeaderContext()` inside these components.\n   * @example { SortIndicator, ColumnFilter, ResizeHandle }\n   */\n  headerComponents?: THeaderComponents\n}\n\n/**\n * Props for AppTable component - without selector\n */\nexport interface AppTablePropsWithoutSelector {\n  children: JSXElement\n  selector?: never\n}\n\n/**\n * Props for AppTable component - with selector\n */\nexport interface AppTablePropsWithSelector<\n  TFeatures extends TableFeatures,\n  TSelected,\n> {\n  children: (state: Accessor<TSelected>) => JSXElement\n  selector: (state: TableState<TFeatures>) => TSelected\n}\n\n/**\n * Props for AppCell component - without selector\n */\nexport interface AppCellPropsWithoutSelector<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData,\n  TCellComponents extends Record<string, ComponentType<any>>,\n> {\n  cell: Cell<TFeatures, TData, TValue>\n  children: (\n    cell: Cell<TFeatures, TData, TValue> &\n      TCellComponents & { FlexRender: () => JSXElement },\n  ) => JSXElement\n  selector?: never\n}\n\n/**\n * Props for AppCell component - with selector\n */\nexport interface AppCellPropsWithSelector<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData,\n  TCellComponents extends Record<string, ComponentType<any>>,\n  TSelected,\n> {\n  cell: Cell<TFeatures, TData, TValue>\n  children: (\n    cell: Cell<TFeatures, TData, TValue> &\n      TCellComponents & { FlexRender: () => JSXElement },\n    state: Accessor<TSelected>,\n  ) => JSXElement\n  selector: (state: TableState<TFeatures>) => TSelected\n}\n\n/**\n * Props for AppHeader/AppFooter component - without selector\n */\nexport interface AppHeaderPropsWithoutSelector<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData,\n  THeaderComponents extends Record<string, ComponentType<any>>,\n> {\n  header: Header<TFeatures, TData, TValue>\n  children: (\n    header: Header<TFeatures, TData, TValue> &\n      THeaderComponents & { FlexRender: () => JSXElement },\n  ) => JSXElement\n  selector?: never\n}\n\n/**\n * Props for AppHeader/AppFooter component - with selector\n */\nexport interface AppHeaderPropsWithSelector<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData,\n  THeaderComponents extends Record<string, ComponentType<any>>,\n  TSelected,\n> {\n  header: Header<TFeatures, TData, TValue>\n  children: (\n    header: Header<TFeatures, TData, TValue> &\n      THeaderComponents & { FlexRender: () => JSXElement },\n    state: Accessor<TSelected>,\n  ) => JSXElement\n  selector: (state: TableState<TFeatures>) => TSelected\n}\n\n/**\n * Component type for AppCell - wraps a cell and provides cell context with optional Subscribe\n */\nexport interface AppCellComponent<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TCellComponents extends Record<string, ComponentType<any>>,\n> {\n  <TValue extends CellData = CellData>(\n    props: AppCellPropsWithoutSelector<\n      TFeatures,\n      TData,\n      TValue,\n      TCellComponents\n    >,\n  ): JSXElement\n  <TValue extends CellData = CellData, TSelected = unknown>(\n    props: AppCellPropsWithSelector<\n      TFeatures,\n      TData,\n      TValue,\n      TCellComponents,\n      TSelected\n    >,\n  ): JSXElement\n}\n\n/**\n * Component type for AppHeader/AppFooter - wraps a header and provides header context with optional Subscribe\n */\nexport interface AppHeaderComponent<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  THeaderComponents extends Record<string, ComponentType<any>>,\n> {\n  <TValue extends CellData = CellData>(\n    props: AppHeaderPropsWithoutSelector<\n      TFeatures,\n      TData,\n      TValue,\n      THeaderComponents\n    >,\n  ): JSXElement\n  <TValue extends CellData = CellData, TSelected = unknown>(\n    props: AppHeaderPropsWithSelector<\n      TFeatures,\n      TData,\n      TValue,\n      THeaderComponents,\n      TSelected\n    >,\n  ): JSXElement\n}\n\n/**\n * Component type for AppTable - root wrapper with optional Subscribe\n */\nexport interface AppTableComponent<TFeatures extends TableFeatures> {\n  (props: AppTablePropsWithoutSelector): JSXElement\n  <TSelected>(\n    props: AppTablePropsWithSelector<TFeatures, TSelected>,\n  ): JSXElement\n}\n\n/**\n * Extended table API returned by createAppTable with all App wrapper components\n */\nexport type AppSolidTable<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TSelected,\n  TTableComponents extends Record<string, ComponentType<any>>,\n  TCellComponents extends Record<string, ComponentType<any>>,\n  THeaderComponents extends Record<string, ComponentType<any>>,\n> = SolidTable<TFeatures, TData, TSelected> &\n  NoInfer<TTableComponents> & {\n    /**\n     * Root wrapper component that provides table context with optional Subscribe.\n     * @example\n     * ```tsx\n     * // Without selector - children is JSXElement\n     * <table.AppTable>\n     *   <table>...</table>\n     * </table.AppTable>\n     *\n     * // With selector - children receives selected state\n     * <table.AppTable selector={(s) => s.pagination}>\n     *   {(pagination) => <div>Page {pagination.pageIndex}</div>}\n     * </table.AppTable>\n     * ```\n     */\n    AppTable: AppTableComponent<TFeatures>\n    /**\n     * Wraps a cell and provides cell context with pre-bound cellComponents.\n     * Optionally accepts a selector for Subscribe functionality.\n     * @example\n     * ```tsx\n     * // Without selector\n     * <table.AppCell cell={cell}>\n     *   {(c) => <td><c.TextCell /></td>}\n     * </table.AppCell>\n     *\n     * // With selector - children receives cell and selected state\n     * <table.AppCell cell={cell} selector={(s) => s.columnFilters}>\n     *   {(c, filters) => <td>{filters.length}</td>}\n     * </table.AppCell>\n     * ```\n     */\n    AppCell: AppCellComponent<TFeatures, TData, NoInfer<TCellComponents>>\n    /**\n     * Wraps a header and provides header context with pre-bound headerComponents.\n     * Optionally accepts a selector for Subscribe functionality.\n     * @example\n     * ```tsx\n     * // Without selector\n     * <table.AppHeader header={header}>\n     *   {(h) => <th><h.SortIndicator /></th>}\n     * </table.AppHeader>\n     *\n     * // With selector\n     * <table.AppHeader header={header} selector={(s) => s.sorting}>\n     *   {(h, sorting) => <th>{sorting.length} sorted</th>}\n     * </table.AppHeader>\n     * ```\n     */\n    AppHeader: AppHeaderComponent<TFeatures, TData, NoInfer<THeaderComponents>>\n    /**\n     * Wraps a footer and provides header context with pre-bound headerComponents.\n     * Optionally accepts a selector for Subscribe functionality.\n     * @example\n     * ```tsx\n     * <table.AppFooter header={footer}>\n     *   {(f) => <td><table.FlexRender footer={footer} /></td>}\n     * </table.AppFooter>\n     * ```\n     */\n    AppFooter: AppHeaderComponent<TFeatures, TData, NoInfer<THeaderComponents>>\n    /**\n     * Convenience FlexRender component attached to the table instance.\n     * Renders cell, header, or footer content from column definitions.\n     * @example\n     * ```tsx\n     * <table.FlexRender header={header} />\n     * <table.FlexRender cell={cell} />\n     * <table.FlexRender footer={footer} />\n     * ```\n     */\n    FlexRender: typeof FlexRender\n  }\n\n/**\n * Creates a custom table hook with pre-bound components for composition.\n *\n * This is the table equivalent of TanStack Form's `createFormHook`. It allows you to:\n * - Define features, row models, and default options once, shared across all tables\n * - Register reusable table, cell, and header components\n * - Access table/cell/header instances via context in those components\n * - Get a `createAppTable` hook that returns an extended table with App wrapper components\n * - Get a `createAppColumnHelper` function pre-bound to your features\n *\n * @example\n * ```tsx\n * // hooks/table.ts\n * export const {\n *   createAppTable,\n *   createAppColumnHelper,\n *   useTableContext,\n *   useCellContext,\n *   useHeaderContext,\n * } = createTableHook({\n *   _features: tableFeatures({\n *     rowPaginationFeature,\n *     rowSortingFeature,\n *     columnFilteringFeature,\n *   }),\n *   _rowModels: {\n *     paginatedRowModel: createPaginatedRowModel(),\n *     sortedRowModel: createSortedRowModel(sortFns),\n *     filteredRowModel: createFilteredRowModel(filterFns),\n *   },\n *   tableComponents: { PaginationControls, RowCount },\n *   cellComponents: { TextCell, NumberCell },\n *   headerComponents: { SortIndicator, ColumnFilter },\n * })\n *\n * // Create column helper with TFeatures already bound\n * const columnHelper = createAppColumnHelper<Person>()\n *\n * // components/table-components.tsx\n * function PaginationControls() {\n *   const table = useTableContext() // TFeatures already known!\n *   return <table.Subscribe selector={(s) => s.pagination}>...</table.Subscribe>\n * }\n *\n * // features/users.tsx\n * function UsersTable({ data }: { data: Person[] }) {\n *   const table = createAppTable({\n *     columns,\n *     data, // TData inferred from Person[]\n *   })\n *\n *   return (\n *     <table.AppTable>\n *       <table>\n *         <thead>\n *           <For each={table.getHeaderGroups()}>\n *             {(headerGroup) => (\n *               <tr>\n *                 <For each={headerGroup.headers}>\n *                   {(h) => (\n *                     <table.AppHeader header={h}>\n *                       {(header) => (\n *                         <th>\n *                           <header.FlexRender />\n *                           <header.SortIndicator />\n *                         </th>\n *                       )}\n *                     </table.AppHeader>\n *                   )}\n *                 </For>\n *               </tr>\n *             )}\n *           </For>\n *         </thead>\n *         <tbody>\n *           <For each={table.getRowModel().rows}>\n *             {(row) => (\n *               <tr>\n *                 <For each={row.getAllCells()}>\n *                   {(c) => (\n *                     <table.AppCell cell={c}>\n *                       {(cell) => <td><cell.TextCell /></td>}\n *                     </table.AppCell>\n *                   )}\n *                 </For>\n *               </tr>\n *             )}\n *           </For>\n *         </tbody>\n *       </table>\n *       <table.PaginationControls />\n *     </table.AppTable>\n *   )\n * }\n * ```\n */\nexport function createTableHook<\n  TFeatures extends TableFeatures,\n  const TTableComponents extends Record<string, ComponentType<any>>,\n  const TCellComponents extends Record<string, ComponentType<any>>,\n  const THeaderComponents extends Record<string, ComponentType<any>>,\n>({\n  tableComponents,\n  cellComponents,\n  headerComponents,\n  ...defaultTableOptions\n}: CreateTableHookOptions<\n  TFeatures,\n  TTableComponents,\n  TCellComponents,\n  THeaderComponents\n>) {\n  // Create contexts internally with TFeatures baked in\n  const TableContext = createContext<SolidTable<TFeatures, any, any>>(\n    null as never,\n  )\n  const CellContext = createContext<Cell<TFeatures, any, any>>(null as never)\n  const HeaderContext = createContext<Header<TFeatures, any, any>>(\n    null as never,\n  )\n\n  /**\n   * Create a column helper pre-bound to the features and components configured in this table hook.\n   * The cell, header, and footer contexts include pre-bound components (e.g., `cell.TextCell`).\n   * @example\n   * ```tsx\n   * const columnHelper = createAppColumnHelper<Person>()\n   *\n   * const columns = [\n   *   columnHelper.accessor('firstName', {\n   *     header: 'First Name',\n   *     cell: ({ cell }) => <cell.TextCell />, // cell has pre-bound components!\n   *   }),\n   *   columnHelper.accessor('age', {\n   *     header: 'Age',\n   *     cell: ({ cell }) => <cell.NumberCell />,\n   *   }),\n   * ]\n   * ```\n   */\n  function createAppColumnHelper<TData extends RowData>(): AppColumnHelper<\n    TFeatures,\n    TData,\n    TCellComponents,\n    THeaderComponents\n  > {\n    // The runtime implementation is the same - components are attached at render time\n    // This cast provides the enhanced types for column definitions\n    return coreCreateColumnHelper<TFeatures, TData>() as AppColumnHelper<\n      TFeatures,\n      TData,\n      TCellComponents,\n      THeaderComponents\n    >\n  }\n\n  /**\n   * Access the table instance from within an `AppTable` wrapper.\n   * Use this in custom `tableComponents` passed to `createTableHook`.\n   * TFeatures is already known from the createTableHook call.\n   *\n   * @example\n   * ```tsx\n   * function PaginationControls() {\n   *   const table = useTableContext()\n   *   return (\n   *     <table.Subscribe selector={(s) => s.pagination}>\n   *       {(pagination) => (\n   *         <div>\n   *           <button onClick={() => table.previousPage()}>Prev</button>\n   *           <span>Page {pagination.pageIndex + 1}</span>\n   *           <button onClick={() => table.nextPage()}>Next</button>\n   *         </div>\n   *       )}\n   *     </table.Subscribe>\n   *   )\n   * }\n   * ```\n   */\n  function useTableContext<TData extends RowData = RowData>(): SolidTable<\n    TFeatures,\n    TData\n  > {\n    const table = useContext(TableContext)\n\n    if (!table) {\n      throw new Error(\n        '`useTableContext` must be used within an `AppTable` component. ' +\n          'Make sure your component is wrapped with `<table.AppTable>...</table.AppTable>`.',\n      )\n    }\n\n    return table\n  }\n\n  /**\n   * Access the cell instance from within an `AppCell` wrapper.\n   * Use this in custom `cellComponents` passed to `createTableHook`.\n   * TFeatures is already known from the createTableHook call.\n   *\n   * @example\n   * ```tsx\n   * function TextCell() {\n   *   const cell = useCellContext<string>()\n   *   return <span>{cell.getValue()}</span>\n   * }\n   *\n   * function NumberCell({ format }: { format?: Intl.NumberFormatOptions }) {\n   *   const cell = useCellContext<number>()\n   *   return <span>{cell.getValue().toLocaleString(undefined, format)}</span>\n   * }\n   * ```\n   */\n  function useCellContext<TValue extends CellData = CellData>(): Cell<\n    TFeatures,\n    any,\n    TValue\n  > {\n    const cell = useContext(CellContext)\n\n    if (!cell) {\n      throw new Error(\n        '`useCellContext` must be used within an `AppCell` component. ' +\n          'Make sure your component is wrapped with `<table.AppCell cell={cell}>...</table.AppCell>`.',\n      )\n    }\n\n    return cell\n  }\n\n  /**\n   * Access the header instance from within an `AppHeader` or `AppFooter` wrapper.\n   * Use this in custom `headerComponents` passed to `createTableHook`.\n   * TFeatures is already known from the createTableHook call.\n   *\n   * @example\n   * ```tsx\n   * function SortIndicator() {\n   *   const header = useHeaderContext()\n   *   const sorted = header.column.getIsSorted()\n   *   return sorted === 'asc' ? '🔼' : sorted === 'desc' ? '🔽' : null\n   * }\n   *\n   * function ColumnFilter() {\n   *   const header = useHeaderContext()\n   *   if (!header.column.getCanFilter()) return null\n   *   return (\n   *     <input\n   *       value={(header.column.getFilterValue() ?? '') as string}\n   *       onChange={(e) => header.column.setFilterValue(e.target.value)}\n   *       placeholder=\"Filter...\"\n   *     />\n   *   )\n   * }\n   * ```\n   */\n  function useHeaderContext<TValue extends CellData = CellData>(): Header<\n    TFeatures,\n    any,\n    TValue\n  > {\n    const header = useContext(HeaderContext)\n\n    if (!header) {\n      throw new Error(\n        '`useHeaderContext` must be used within an `AppHeader` or `AppFooter` component.',\n      )\n    }\n\n    return header\n  }\n\n  /**\n   * Context-aware FlexRender component for cells.\n   * Uses the cell from context, so no need to pass cell prop.\n   */\n  function CellFlexRender() {\n    const cell = useCellContext()\n    return <FlexRender cell={cell} />\n  }\n\n  /**\n   * Context-aware FlexRender component for headers.\n   * Uses the header from context, so no need to pass header prop.\n   */\n  function HeaderFlexRender() {\n    const header = useHeaderContext()\n    return <FlexRender header={header} />\n  }\n\n  /**\n   * Context-aware FlexRender component for footers.\n   * Uses the header from context, so no need to pass footer prop.\n   */\n  function FooterFlexRender() {\n    const header = useHeaderContext()\n    return <FlexRender footer={header} />\n  }\n\n  /**\n   * Enhanced useTable hook that returns a table with App wrapper components\n   * and pre-bound tableComponents attached directly to the table object.\n   *\n   * Default options from createTableHook are automatically merged with\n   * the options passed here. Options passed here take precedence.\n   *\n   * TFeatures is already known from the createTableHook call; TData is inferred from the data prop.\n   */\n  function createAppTable<TData extends RowData, TSelected = {}>(\n    tableOptions: Omit<\n      TableOptions<TFeatures, TData>,\n      '_features' | '_rowModels'\n    >,\n    selector?: (state: TableState<TFeatures>) => TSelected,\n  ): AppSolidTable<\n    TFeatures,\n    TData,\n    TSelected,\n    TTableComponents,\n    TCellComponents,\n    THeaderComponents\n  > {\n    // Merge default options with provided options (provided takes precedence)\n    const mergedProps = mergeProps(defaultTableOptions, tableOptions)\n    const table = createTable<TFeatures, TData, TSelected>(\n      mergedProps as TableOptions<TFeatures, TData>,\n      selector,\n    )\n\n    // AppTable - Root wrapper that provides table context with optional state selector\n    function AppTable(props: AppTablePropsWithoutSelector): JSXElement\n    function AppTable<TAppTableSelected>(\n      props: AppTablePropsWithSelector<TFeatures, TAppTableSelected>,\n    ): JSXElement\n    function AppTable<TAppTableSelected>(\n      props:\n        | AppTablePropsWithoutSelector\n        | AppTablePropsWithSelector<TFeatures, TAppTableSelected>,\n    ): JSXElement {\n      return (\n        <TableContext.Provider value={table}>\n          <Show when={props.selector} fallback={props.children as JSXElement}>\n            {(selector) => (\n              <table.Subscribe selector={selector()}>\n                {(state: Accessor<TAppTableSelected>) =>\n                  (\n                    props.children as (\n                      state: Accessor<TAppTableSelected>,\n                    ) => JSXElement\n                  )(state)\n                }\n              </table.Subscribe>\n            )}\n          </Show>\n        </TableContext.Provider>\n      )\n    }\n\n    // AppCell - Wraps cell with context, pre-bound cellComponents, and optional state selector\n    function AppCell<TValue extends CellData = CellData>(\n      props: AppCellPropsWithoutSelector<\n        TFeatures,\n        TData,\n        TValue,\n        TCellComponents\n      >,\n    ): JSXElement\n    function AppCell<\n      TValue extends CellData = CellData,\n      TAppCellSelected = unknown,\n    >(\n      props: AppCellPropsWithSelector<\n        TFeatures,\n        TData,\n        TValue,\n        TCellComponents,\n        TAppCellSelected\n      >,\n    ): JSXElement\n    function AppCell<\n      TValue extends CellData = CellData,\n      TAppCellSelected = unknown,\n    >(\n      props:\n        | AppCellPropsWithoutSelector<TFeatures, TData, TValue, TCellComponents>\n        | AppCellPropsWithSelector<\n            TFeatures,\n            TData,\n            TValue,\n            TCellComponents,\n            TAppCellSelected\n          >,\n    ): JSXElement {\n      const extendedCell = Object.assign(props.cell, {\n        FlexRender: CellFlexRender,\n        ...cellComponents,\n      }) as Cell<TFeatures, TData, TValue> &\n        TCellComponents & { FlexRender: () => JSXElement }\n\n      return (\n        <CellContext.Provider value={props.cell}>\n          <Show\n            when={props.selector}\n            fallback={(props.children as (cell: any) => JSXElement)(\n              extendedCell as any,\n            )}\n          >\n            {(selector) => (\n              <table.Subscribe selector={selector()}>\n                {(state: Accessor<TAppCellSelected>) =>\n                  props.children(extendedCell as any, state)\n                }\n              </table.Subscribe>\n            )}\n          </Show>\n        </CellContext.Provider>\n      )\n    }\n\n    // AppHeader - Wraps header with context, pre-bound headerComponents, and optional state selector\n    function AppHeader<TValue extends CellData = CellData>(\n      props: AppHeaderPropsWithoutSelector<\n        TFeatures,\n        TData,\n        TValue,\n        THeaderComponents\n      >,\n    ): JSXElement\n    function AppHeader<\n      TValue extends CellData = CellData,\n      TAppHeaderSelected = unknown,\n    >(\n      props: AppHeaderPropsWithSelector<\n        TFeatures,\n        TData,\n        TValue,\n        THeaderComponents,\n        TAppHeaderSelected\n      >,\n    ): JSXElement\n    function AppHeader<\n      TValue extends CellData = CellData,\n      TAppHeaderSelected = unknown,\n    >(\n      props:\n        | AppHeaderPropsWithoutSelector<\n            TFeatures,\n            TData,\n            TValue,\n            THeaderComponents\n          >\n        | AppHeaderPropsWithSelector<\n            TFeatures,\n            TData,\n            TValue,\n            THeaderComponents,\n            TAppHeaderSelected\n          >,\n    ): JSXElement {\n      const extendedHeader = Object.assign(props.header, {\n        FlexRender: HeaderFlexRender,\n        ...headerComponents,\n      }) as Header<TFeatures, TData, TValue> &\n        THeaderComponents & { FlexRender: () => JSXElement }\n\n      return (\n        <HeaderContext.Provider value={props.header}>\n          <Show\n            when={props.selector}\n            fallback={(props.children as (header: any) => JSXElement)(\n              extendedHeader as any,\n            )}\n          >\n            {(selector) => (\n              <table.Subscribe selector={selector()}>\n                {(state: Accessor<TAppHeaderSelected>) =>\n                  props.children(extendedHeader as any, state)\n                }\n              </table.Subscribe>\n            )}\n          </Show>\n        </HeaderContext.Provider>\n      )\n    }\n\n    // AppFooter - Same as AppHeader but uses FooterFlexRender (footers use Header type)\n    function AppFooter<TValue extends CellData = CellData>(\n      props: AppHeaderPropsWithoutSelector<\n        TFeatures,\n        TData,\n        TValue,\n        THeaderComponents\n      >,\n    ): JSXElement\n    function AppFooter<\n      TValue extends CellData = CellData,\n      TAppFooterSelected = unknown,\n    >(\n      props: AppHeaderPropsWithSelector<\n        TFeatures,\n        TData,\n        TValue,\n        THeaderComponents,\n        TAppFooterSelected\n      >,\n    ): JSXElement\n    function AppFooter<\n      TValue extends CellData = CellData,\n      TAppFooterSelected = unknown,\n    >(\n      props:\n        | AppHeaderPropsWithoutSelector<\n            TFeatures,\n            TData,\n            TValue,\n            THeaderComponents\n          >\n        | AppHeaderPropsWithSelector<\n            TFeatures,\n            TData,\n            TValue,\n            THeaderComponents,\n            TAppFooterSelected\n          >,\n    ): JSXElement {\n      const extendedHeader = Object.assign(props.header, {\n        FlexRender: FooterFlexRender,\n        ...headerComponents,\n      }) as Header<TFeatures, TData, TValue> &\n        THeaderComponents & { FlexRender: () => JSXElement }\n\n      return (\n        <HeaderContext.Provider value={props.header}>\n          <Show\n            when={props.selector}\n            fallback={(props.children as (header: any) => JSXElement)(\n              extendedHeader as any,\n            )}\n          >\n            {(selector) => (\n              <table.Subscribe selector={selector()}>\n                {(state: Accessor<TAppFooterSelected>) =>\n                  props.children(extendedHeader as any, state)\n                }\n              </table.Subscribe>\n            )}\n          </Show>\n        </HeaderContext.Provider>\n      )\n    }\n\n    // Combine everything into the extended table API\n    return Object.assign(table, {\n      AppTable,\n      AppCell,\n      AppHeader,\n      AppFooter,\n      FlexRender,\n      ...tableComponents,\n    }) as AppSolidTable<\n      TFeatures,\n      TData,\n      TSelected,\n      TTableComponents,\n      TCellComponents,\n      THeaderComponents\n    >\n  }\n\n  return {\n    appFeatures: defaultTableOptions._features as TFeatures,\n    createAppColumnHelper,\n    createAppTable: createAppTable,\n    useTableContext,\n    useCellContext,\n    useHeaderContext,\n  }\n}\n"
  },
  {
    "path": "packages/solid-table/src/index.tsx",
    "content": "export * from '@tanstack/table-core'\n\nexport * from './createTable'\nexport * from './FlexRender'\nexport * from './createTableHook'\n"
  },
  {
    "path": "packages/solid-table/tsconfig.build.json",
    "content": "{\n  \"extends\": \"../../tsconfig.json\",\n  \"compilerOptions\": {\n    \"jsx\": \"preserve\",\n    \"jsxImportSource\": \"solid-js\",\n    \"rootDir\": \"src\",\n    \"outDir\": \"dist\",\n    \"noEmit\": false,\n    \"declaration\": true,\n    \"sourceMap\": true\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "packages/solid-table/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig.json\",\n  \"compilerOptions\": {\n    \"jsx\": \"preserve\",\n    \"jsxImportSource\": \"solid-js\"\n  },\n  \"include\": [\"src\", \"eslint.config.js\", \"vite.config.ts\"]\n}\n"
  },
  {
    "path": "packages/solid-table/vite.config.ts",
    "content": "import { defineConfig } from 'vitest/config'\nimport solid from 'vite-plugin-solid'\n\nexport default defineConfig({\n  plugins: [solid()],\n})\n"
  },
  {
    "path": "packages/solid-table-devtools/eslint.config.js",
    "content": "// @ts-check\n\nimport rootConfig from '../../eslint.config.js'\n\n/** @type {any} */\nconst config = [...rootConfig]\n\nexport default config\n"
  },
  {
    "path": "packages/solid-table-devtools/package.json",
    "content": "{\n  \"name\": \"@tanstack/solid-table-devtools\",\n  \"version\": \"9.0.0-alpha.11\",\n  \"description\": \"Solid devtools for TanStack Table.\",\n  \"author\": \"Tanner Linsley\",\n  \"license\": \"MIT\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/TanStack/table.git\",\n    \"directory\": \"packages/react-table-devtools\"\n  },\n  \"homepage\": \"https://tanstack.com/table\",\n  \"funding\": {\n    \"type\": \"github\",\n    \"url\": \"https://github.com/sponsors/tannerlinsley\"\n  },\n  \"keywords\": [\n    \"solid\",\n    \"tanstack\",\n    \"table\",\n    \"devtools\"\n  ],\n  \"scripts\": {\n    \"clean\": \"rimraf ./build && rimraf ./dist\",\n    \"test:eslint\": \"eslint ./src\",\n    \"test:lib\": \"vitest --passWithNoTests\",\n    \"test:lib:dev\": \"pnpm test:lib --watch\",\n    \"test:types\": \"tsc\",\n    \"test:build\": \"publint --strict\",\n    \"build\": \"vite build\"\n  },\n  \"type\": \"module\",\n  \"types\": \"dist/esm/index.d.ts\",\n  \"module\": \"dist/esm/index.js\",\n  \"exports\": {\n    \".\": {\n      \"import\": {\n        \"types\": \"./dist/esm/index.d.ts\",\n        \"default\": \"./dist/esm/index.js\"\n      }\n    },\n    \"./production\": {\n      \"import\": {\n        \"types\": \"./dist/esm/production.d.ts\",\n        \"default\": \"./dist/esm/production.js\"\n      }\n    },\n    \"./package.json\": \"./package.json\"\n  },\n  \"sideEffects\": false,\n  \"engines\": {\n    \"node\": \">=16\"\n  },\n  \"files\": [\n    \"dist\",\n    \"src\"\n  ],\n  \"dependencies\": {\n    \"@tanstack/devtools-utils\": \"^0.3.2\",\n    \"@tanstack/table-core\": \"workspace:*\",\n    \"@tanstack/table-devtools\": \"workspace:*\"\n  },\n  \"peerDependencies\": {\n    \"solid-js\": \"^1.9.11\"\n  },\n  \"devDependencies\": {\n    \"vite-plugin-solid\": \"^2.11.10\"\n  }\n}\n"
  },
  {
    "path": "packages/solid-table-devtools/src/TableDevtools.tsx",
    "content": "import { createSolidPanel } from '@tanstack/devtools-utils/solid'\nimport {\n  TableDevtoolsCore,\n  setTableDevtoolsTarget,\n} from '@tanstack/table-devtools'\nimport type { DevtoolsPanelProps } from '@tanstack/devtools-utils/solid'\n\nimport type { RowData, Table, TableFeatures } from '@tanstack/table-core'\n\nexport interface TableDevtoolsSolidInit<\n  TFeatures extends TableFeatures = TableFeatures,\n  TData extends RowData = RowData,\n> extends DevtoolsPanelProps {\n  table?: Table<TFeatures, TData>\n}\n\nconst [TableDevtoolsPanelBase, TableDevtoolsPanelNoOp] =\n  createSolidPanel(TableDevtoolsCore)\n\nfunction TableDevtoolsPanel(props: TableDevtoolsSolidInit) {\n  setTableDevtoolsTarget(props.table)\n  return <TableDevtoolsPanelBase theme={props.theme} />\n}\n\nexport { TableDevtoolsPanel, TableDevtoolsPanelNoOp }\n"
  },
  {
    "path": "packages/solid-table-devtools/src/index.ts",
    "content": "import { isDev } from 'solid-js/web'\nimport * as plugin from './plugin'\nimport * as Devtools from './TableDevtools'\n\nexport const TableDevtoolsPanel = !isDev\n  ? Devtools.TableDevtoolsPanelNoOp\n  : Devtools.TableDevtoolsPanel\n\nexport const tableDevtoolsPlugin = !isDev\n  ? plugin.tableDevtoolsNoOpPlugin\n  : plugin.tableDevtoolsPlugin\n\nexport type { TableDevtoolsSolidInit } from './TableDevtools'\nexport type { TableDevtoolsPluginOptions } from './plugin'\n"
  },
  {
    "path": "packages/solid-table-devtools/src/plugin.tsx",
    "content": "import { createSolidPlugin } from '@tanstack/devtools-utils/solid'\nimport { TableDevtoolsPanel } from './TableDevtools'\nimport type { RowData, Table, TableFeatures } from '@tanstack/table-core'\n\nexport interface TableDevtoolsPluginOptions<\n  TFeatures extends TableFeatures = TableFeatures,\n  TData extends RowData = RowData,\n> {\n  table: Table<TFeatures, TData>\n}\n\nfunction tableDevtoolsPlugin<\n  TFeatures extends TableFeatures = TableFeatures,\n  TData extends RowData = RowData,\n>(options: TableDevtoolsPluginOptions<TFeatures, TData>) {\n  return {\n    name: 'TanStack Table',\n    render: (_el: HTMLElement, theme: 'light' | 'dark') => (\n      <TableDevtoolsPanel table={options.table} theme={theme} />\n    ),\n  }\n}\n\nfunction tableDevtoolsNoOpPlugin<\n  TFeatures extends TableFeatures = TableFeatures,\n  TData extends RowData = RowData,\n>(_options: TableDevtoolsPluginOptions<TFeatures, TData>) {\n  return {\n    name: 'TanStack Table',\n    render: (_el: HTMLElement, _theme: 'light' | 'dark') => <></>,\n  }\n}\n\nexport { tableDevtoolsPlugin, tableDevtoolsNoOpPlugin }\n"
  },
  {
    "path": "packages/solid-table-devtools/src/production/TableDevtools.tsx",
    "content": "import { createSolidPanel } from '@tanstack/devtools-utils/solid'\nimport { TableDevtoolsCore } from '@tanstack/table-devtools/production'\n\nimport type { DevtoolsPanelProps } from '@tanstack/devtools-utils/solid'\n\nconst [TableDevtoolsPanel] = createSolidPanel(TableDevtoolsCore)\n\nexport interface TableDevtoolsSolidInit extends DevtoolsPanelProps {}\n\nexport { TableDevtoolsPanel }\n"
  },
  {
    "path": "packages/solid-table-devtools/src/production/plugin.tsx",
    "content": "import { createSolidPlugin } from '@tanstack/devtools-utils/solid'\nimport { TableDevtoolsPanel } from './TableDevtools'\n\nconst [tableDevtoolsPlugin] = createSolidPlugin({\n  name: 'TanStack Table',\n  Component: TableDevtoolsPanel,\n})\n\nexport { tableDevtoolsPlugin }\n"
  },
  {
    "path": "packages/solid-table-devtools/src/production.ts",
    "content": "export { TableDevtoolsPanel } from './TableDevtools'\n\nexport type { TableDevtoolsSolidInit } from './production/TableDevtools'\n\nexport { tableDevtoolsPlugin } from './production/plugin'\n"
  },
  {
    "path": "packages/solid-table-devtools/tsconfig.build.json",
    "content": "{\n  \"extends\": \"../../tsconfig.json\",\n  \"compilerOptions\": {\n    \"jsx\": \"preserve\",\n    \"jsxImportSource\": \"solid-js\",\n    \"rootDir\": \"src\",\n    \"outDir\": \"dist\",\n    \"noEmit\": false,\n    \"declaration\": true,\n    \"sourceMap\": true\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "packages/solid-table-devtools/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig.json\",\n  \"compilerOptions\": {\n    \"jsx\": \"preserve\",\n    \"jsxImportSource\": \"solid-js\"\n  },\n  \"include\": [\"src\", \"eslint.config.js\", \"vite.config.ts\", \"tests\"]\n}\n"
  },
  {
    "path": "packages/solid-table-devtools/vite.config.ts",
    "content": "import { defineConfig, mergeConfig } from 'vitest/config'\nimport { tanstackViteConfig } from '@tanstack/vite-config'\nimport solid from 'vite-plugin-solid'\nimport packageJson from './package.json'\n\nconst config = defineConfig({\n  plugins: [solid()],\n  test: {\n    name: packageJson.name,\n    dir: './',\n    watch: false,\n    environment: 'jsdom',\n    globals: true,\n  },\n})\n\nexport default mergeConfig(\n  config,\n  tanstackViteConfig({\n    entry: ['./src/index.ts', './src/production.ts'],\n    srcDir: './src',\n    cjs: false,\n  }),\n)\n"
  },
  {
    "path": "packages/svelte-table/eslint.config.js",
    "content": "// @ts-check\n\nimport pluginSvelte from 'eslint-plugin-svelte'\nimport rootConfig from '../../eslint.config.js'\n\nexport default [\n  ...rootConfig,\n  ...pluginSvelte.configs['flat/recommended'],\n  {\n    rules: {\n      'svelte/block-lang': ['error', { script: ['ts'] }],\n      'svelte/no-svelte-internal': 'error',\n      'svelte/valid-compile': 'off',\n    },\n  },\n]\n"
  },
  {
    "path": "packages/svelte-table/package.json",
    "content": "{\n  \"name\": \"@tanstack/svelte-table\",\n  \"version\": \"9.0.0-alpha.10\",\n  \"description\": \"Headless UI for building powerful tables & datagrids for Svelte.\",\n  \"author\": \"Tanner Linsley\",\n  \"license\": \"MIT\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/TanStack/table.git\",\n    \"directory\": \"packages/svelte-table\"\n  },\n  \"homepage\": \"https://tanstack.com/table\",\n  \"funding\": {\n    \"type\": \"github\",\n    \"url\": \"https://github.com/sponsors/tannerlinsley\"\n  },\n  \"keywords\": [\n    \"svelte\",\n    \"table\",\n    \"svelte-table\",\n    \"datagrid\"\n  ],\n  \"type\": \"module\",\n  \"types\": \"dist/index.d.ts\",\n  \"module\": \"dist/index.js\",\n  \"svelte\": \"./dist/index.js\",\n  \"exports\": {\n    \".\": {\n      \"types\": \"./dist/index.d.ts\",\n      \"svelte\": \"./dist/index.js\",\n      \"import\": \"./dist/index.js\"\n    },\n    \"./package.json\": \"./package.json\"\n  },\n  \"engines\": {\n    \"node\": \">=16\"\n  },\n  \"files\": [\n    \"dist\",\n    \"src\"\n  ],\n  \"scripts\": {\n    \"clean\": \"rimraf ./build && rimraf ./dist\",\n    \"test:eslint\": \"eslint ./src\",\n    \"test:types\": \"svelte-check --tsconfig ./tsconfig.json\",\n    \"test:build\": \"publint --strict\",\n    \"build\": \"svelte-package --input ./src --output ./dist\"\n  },\n  \"dependencies\": {\n    \"@tanstack/svelte-store\": \"^0.10.1\",\n    \"@tanstack/table-core\": \"workspace:*\"\n  },\n  \"devDependencies\": {\n    \"@sveltejs/package\": \"^2.5.7\",\n    \"@sveltejs/vite-plugin-svelte\": \"^6.2.4\",\n    \"eslint-plugin-svelte\": \"^3.14.0\",\n    \"svelte\": \"^5.48.5\",\n    \"svelte-check\": \"^4.3.5\"\n  },\n  \"peerDependencies\": {\n    \"svelte\": \"^5.0.0\"\n  }\n}\n"
  },
  {
    "path": "packages/svelte-table/src/FlexRender.svelte",
    "content": "<script\n  lang=\"ts\"\n  generics=\"TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData, TContext extends HeaderContext<TFeatures, TData, TValue> | CellContext<TFeatures, TData, TValue>\"\n>\n  import { isFunction } from '@tanstack/table-core'\n  import {\n    RenderComponentConfig,\n    RenderSnippetConfig,\n  } from './render-component'\n  import type {\n    CellContext,\n    CellData,\n    ColumnDefTemplate,\n    HeaderContext,\n    RowData,\n    TableFeatures,\n  } from '@tanstack/table-core'\n\n  type Props = {\n    /** The cell or header field of the current cell's column definition. */\n    content?: TContext extends HeaderContext<TFeatures, TData, TValue>\n      ? ColumnDefTemplate<HeaderContext<TFeatures, TData, TValue>>\n      : TContext extends CellContext<TFeatures, TData, TValue>\n        ? ColumnDefTemplate<CellContext<TFeatures, TData, TValue>>\n        : never\n    /** The result of the `getContext()` function of the header or cell */\n    context: TContext\n  }\n\n  const { content, context }: Props = $props()\n</script>\n\n{#if typeof content === 'string'}\n  {content}\n{:else if isFunction(content)}\n  {@const result = content(context as any)}\n  {#if result instanceof RenderComponentConfig}\n    {@const { component: Component, props } = result}\n    <Component {...props} />\n  {:else if result instanceof RenderSnippetConfig}\n    {@const { snippet, params } = result}\n    {@render snippet(params)}\n  {:else}\n    {result}\n  {/if}\n{/if}\n"
  },
  {
    "path": "packages/svelte-table/src/Subscribe.svelte",
    "content": "<script\n  lang=\"ts\"\n  generics=\"TFeatures extends TableFeatures, TData extends RowData, TSelected = unknown\"\n>\n  import { useStore } from '@tanstack/svelte-store'\n  import type {\n    NoInfer,\n    RowData,\n    TableFeatures,\n    TableState,\n  } from '@tanstack/table-core'\n  import type { Snippet } from 'svelte'\n  import type { SvelteTable } from './createTable.svelte'\n\n  type Props<\n    TFeatures extends TableFeatures,\n    TData extends RowData,\n    TSelected,\n  > = {\n    /**\n     * A function that selects a portion of the table state to subscribe to.\n     * @param state - The full table state\n     * @returns The selected portion of state\n     */\n    selector: (state: NoInfer<TableState<TFeatures>>) => TSelected\n    /**\n     * A Svelte snippet that receives the selected state and renders content.\n     * The snippet will be called with the selected state whenever it changes.\n     */\n    children: Snippet<[state: Readonly<TSelected>]>\n    /**\n     * The table instance to subscribe to\n     */\n    table: SvelteTable<TFeatures, TData, unknown>\n  }\n\n  const props: Props<TFeatures, TData, TSelected> = $props()\n\n  // Subscribe to the store and get the selected state\n  // Access table and selector from props object to avoid closure warnings\n  const selectedState = useStore(\n    props.table.store,\n    props.selector as (state: any) => any,\n  )\n</script>\n\n{@render props.children(selectedState.current)}\n"
  },
  {
    "path": "packages/svelte-table/src/createTable.svelte.ts",
    "content": "import { constructTable } from '@tanstack/table-core'\nimport { useStore } from '@tanstack/svelte-store'\nimport type {\n  NoInfer,\n  RowData,\n  Table,\n  TableFeatures,\n  TableOptions,\n  TableState,\n} from '@tanstack/table-core'\nimport type { Snippet } from 'svelte'\n\nexport type SvelteTable<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TSelected = {},\n> = Table<TFeatures, TData> & {\n  /**\n   * A Svelte component that allows you to subscribe to the table state.\n   *\n   * This is useful for opting into state subscriptions for specific parts of the table state.\n   *\n   * @example\n   * <table.Subscribe selector={(state) => ({ rowSelection: state.rowSelection })}>\n   *   {(state) => (\n   *     <tr>\n   *       // render the row\n   *     </tr>\n   *   )}\n   * </table.Subscribe>\n   */\n  Subscribe: <TSelected>(props: {\n    selector: (state: NoInfer<TableState<TFeatures>>) => TSelected\n    children: ((state: Readonly<TSelected>) => Snippet) | Snippet\n  }) => any\n  /**\n   * The selected state of the table. This state may not match the structure of `table.store.state` because it is selected by the `selector` function that you pass as the 2nd argument to `createTable`.\n   *\n   * @example\n   * const table = createTable(options, (state) => ({ globalFilter: state.globalFilter })) // only globalFilter is part of the selected state\n   *\n   * console.log(table.state.globalFilter)\n   */\n  readonly state: Readonly<TSelected>\n}\n\nexport function createTable<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TSelected = {},\n>(\n  tableOptions: TableOptions<TFeatures, TData>,\n  selector: (state: TableState<TFeatures>) => TSelected = () =>\n    ({}) as TSelected,\n): SvelteTable<TFeatures, TData, TSelected> {\n  const statefulOptions: TableOptions<TFeatures, TData> = mergeObjects(\n    tableOptions,\n    {\n      // Remove state and onStateChange - store handles it internally\n      mergeOptions: (\n        defaultOptions: TableOptions<TFeatures, TData>,\n        newOptions: Partial<TableOptions<TFeatures, TData>>,\n      ) => {\n        return mergeObjects(defaultOptions, newOptions)\n      },\n    },\n  )\n\n  const table = constructTable(statefulOptions) as SvelteTable<\n    TFeatures,\n    TData,\n    TSelected\n  >\n\n  function updateOptions() {\n    table.setOptions((prev) => {\n      return mergeObjects(prev, tableOptions)\n    })\n  }\n\n  updateOptions()\n\n  /**\n   * Temp force reactivity to all state changes on every table.get* method\n   */\n  const allState = useStore(table.store, (state) => state)\n\n  // Wrap all \"get*\" methods to make them reactive\n  // Access allState.current directly to create reactive dependency\n  Object.keys(table).forEach((key) => {\n    const value = (table as any)[key]\n    if (typeof value === 'function' && key.startsWith('get')) {\n      const originalMethod = value.bind(table)\n      ;(table as any)[key] = (...args: Array<any>) => {\n        // Access state to create reactive dependency\n        allState.current\n        return originalMethod(...args)\n      }\n    }\n  })\n\n  table.Subscribe = function Subscribe<TSelected>(props: {\n    selector: (state: TableState<TFeatures>) => TSelected\n    children: ((state: Readonly<TSelected>) => Snippet) | Snippet\n  }): any {\n    const selected = useStore(table.store, props.selector)\n    if (typeof props.children === 'function') {\n      return props.children(selected.current)\n    }\n    return props.children\n  }\n\n  const stateStore = useStore(table.store, selector)\n\n  return {\n    ...table,\n    get state() {\n      return stateStore.current\n    },\n  } as SvelteTable<TFeatures, TData, TSelected>\n}\n\n/**\n * Merges objects together while keeping their getters alive.\n * Taken from SolidJS: {https://github.com/solidjs/solid/blob/24abc825c0996fd2bc8c1de1491efe9a7e743aff/packages/solid/src/server/rendering.ts#L82-L115}\n * */\nfunction mergeObjects<T>(source: T): T\nfunction mergeObjects<T, U>(source: T, source1: U): T & U\nfunction mergeObjects<T, U, V>(source: T, source1: U, source2: V): T & U & V\nfunction mergeObjects<T, U, V, W>(\n  source: T,\n  source1: U,\n  source2: V,\n  source3: W,\n): T & U & V & W\nfunction mergeObjects(...sources: any): any {\n  const target = {}\n  for (let source of sources) {\n    if (typeof source === 'function') source = source()\n    if (source) {\n      const descriptors = Object.getOwnPropertyDescriptors(source)\n      for (const key in descriptors) {\n        if (key in target) continue\n        Object.defineProperty(target, key, {\n          enumerable: true,\n          get() {\n            for (let i = sources.length - 1; i >= 0; i--) {\n              let v,\n                s = sources[i]\n              if (typeof s === 'function') s = s()\n              // eslint-disable-next-line prefer-const\n              v = (s || {})[key]\n              if (v !== undefined) return v\n            }\n          },\n        })\n      }\n    }\n  }\n  return target\n}\n"
  },
  {
    "path": "packages/svelte-table/src/createTableHelper.ts",
    "content": "import { constructTableHelper } from '@tanstack/table-core'\nimport { createTable } from './createTable.svelte'\nimport type {\n  RowData,\n  Table,\n  TableFeatures,\n  TableHelperOptions,\n  TableHelper_Core,\n  TableOptions,\n} from '@tanstack/table-core'\n\nexport type TableHelper<\n  TFeatures extends TableFeatures,\n  TData extends RowData = any,\n> = Omit<TableHelper_Core<TFeatures, TData>, 'tableCreator'> & {\n  createTable: (\n    tableOptions: Omit<\n      TableOptions<TFeatures, TData>,\n      '_features' | '_rowModels'\n    >,\n  ) => Table<TFeatures, TData>\n}\n\nexport function createTableHelper<\n  TFeatures extends TableFeatures,\n  TData extends RowData = any,\n>(\n  tableHelperOptions: TableHelperOptions<TFeatures, TData>,\n): TableHelper<TFeatures, TData> {\n  const tableHelper = constructTableHelper(createTable, tableHelperOptions)\n  return {\n    ...tableHelper,\n    createTable: tableHelper.tableCreator,\n  } as any\n}\n\n// test\n\n// type Person = {\n//   firstName: string\n//   lastName: string\n//   age: number\n// }\n\n// const tableHelper = createTableHelper({\n//   _features: { rowSelectionFeature: {} },\n//   TData: {} as Person,\n// })\n\n// const columns = [\n//   tableHelper.columnHelper.accessor('firstName', { header: 'First Name' }),\n//   tableHelper.columnHelper.accessor('lastName', { header: 'Last Name' }),\n//   tableHelper.columnHelper.accessor('age', { header: 'Age' }),\n//   tableHelper.columnHelper.display({ header: 'Actions', id: 'actions' }),\n// ] as Array<ColumnDef<typeof tableHelper.features, Person, unknown>>\n\n// const data: Array<Person> = []\n\n// tableHelper.createTable({\n//   columns,\n//   data,\n// })\n"
  },
  {
    "path": "packages/svelte-table/src/createTableState.svelte.ts",
    "content": "import type { Updater } from '@tanstack/table-core'\n\nexport function createTableState<TState>(\n  initialValue: TState,\n): [() => TState, (updater: Updater<TState>) => void] {\n  let value = $state(initialValue)\n\n  return [\n    () => value,\n    (updater: Updater<TState>) => {\n      if (updater instanceof Function) value = updater(value)\n      else value = updater\n    },\n  ]\n}\n"
  },
  {
    "path": "packages/svelte-table/src/global.d.ts",
    "content": "/// <reference types=\"svelte\" />\n"
  },
  {
    "path": "packages/svelte-table/src/index.ts",
    "content": "export * from '@tanstack/table-core'\n\nexport { createTable } from './createTable.svelte'\nexport { createTableHelper, type TableHelper } from './createTableHelper'\nexport { createTableState } from './createTableState.svelte'\nexport { default as FlexRender } from './FlexRender.svelte'\nexport { default as Subscribe } from './Subscribe.svelte'\nexport { renderComponent, renderSnippet } from './render-component'\n"
  },
  {
    "path": "packages/svelte-table/src/render-component.ts",
    "content": "import type { Component, ComponentProps, Snippet } from 'svelte'\n\n/**\n * A helper class to make it easy to identify Svelte components in\n * `columnDef.cell` and `columnDef.header` properties.\n *\n * > NOTE: This class should only be used internally by the adapter. If you're\n * reading this and you don't know what this is for, you probably don't need it.\n *\n * @example\n * ```svelte\n * {@const result = content(context as any)}\n * {#if result instanceof RenderComponentConfig}\n *   {@const { component: Component, props } = result}\n *   <Component {...props} />\n * {/if}\n * ```\n * */\nexport class RenderComponentConfig<TComponent extends Component> {\n  constructor(\n    public component: TComponent,\n    public props: ComponentProps<TComponent> | Record<string, never> = {},\n  ) {}\n}\n\n/**\n * A helper class to make it easy to identify Svelte Snippets in `columnDef.cell` and `columnDef.header` properties.\n *\n * > NOTE: This class should only be used internally by the adapter. If you're\n * reading this and you don't know what this is for, you probably don't need it.\n *\n * @example\n * ```svelte\n * {@const result = content(context as any)}\n * {#if result instanceof RenderSnippetConfig}\n *   {@const { snippet, params } = result}\n *   {@render snippet(params)}\n * {/if}\n * ```\n * */\nexport class RenderSnippetConfig<TProps> {\n  constructor(\n    public snippet: Snippet<[TProps]>,\n    public params: TProps,\n  ) {}\n}\n\n/**\n * A helper function to help create cells from Svelte components through ColumnDef's `cell` and `header` properties.\n *\n * This is only to be used with Svelte Components - use `renderSnippet` for Svelte Snippets.\n *\n * @param component A Svelte component\n * @param props The props to pass to `component`\n * @returns A `RenderComponentConfig` object that helps svelte-table know how to render the header/cell component.\n * @example\n * ```ts\n * // +page.svelte\n * const defaultColumns = [\n *   columnHelper.accessor('name', {\n *     header: header => renderComponent(SortHeader, { label: 'Name', header }),\n *   }),\n *   columnHelper.accessor('state', {\n *     header: header => renderComponent(SortHeader, { label: 'State', header }),\n *   }),\n * ]\n * ```\n * @see {@link https://tanstack.com/table/latest/docs/guide/column-defs}\n */\nexport const renderComponent = <\n  TComponent extends Component<any>,\n  TProps extends ComponentProps<TComponent>,\n>(\n  component: TComponent,\n  props: TProps,\n) => new RenderComponentConfig(component, props)\n\n/**\n * A helper function to help create cells from Svelte Snippets through ColumnDef's `cell` and `header` properties.\n *\n * *The snippet must only take one parameter.*\n *\n * This is only to be used with Snippets - use `renderComponent` for Svelte Components.\n *\n * @param snippet\n * @param params\n * @returns\n * @example\n * ```ts\n * // +page.svelte\n * const defaultColumns = [\n *   columnHelper.accessor('name', {\n *     cell: cell => renderSnippet(nameSnippet, { name: cell.row.name }),\n *   }),\n *   columnHelper.accessor('state', {\n *     cell: cell => renderSnippet(stateSnippet, { state: cell.row.state }),\n *   }),\n * ]\n * ```\n * @see {@link https://tanstack.com/table/latest/docs/guide/column-defs}\n */\nexport const renderSnippet = <TProps>(\n  snippet: Snippet<[TProps]>,\n  params: TProps,\n) => new RenderSnippetConfig(snippet, params)\n"
  },
  {
    "path": "packages/svelte-table/svelte.config.js",
    "content": "import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'\n\nconst config = {\n  preprocess: vitePreprocess(),\n}\n\nexport default config\n"
  },
  {
    "path": "packages/svelte-table/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig.json\",\n  \"compilerOptions\": {\n    \"rootDir\": \"./src\",\n    \"outDir\": \"./build/lib\"\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "packages/svelte-table/vite.config.ts",
    "content": "import { svelte } from '@sveltejs/vite-plugin-svelte'\nimport { defineConfig } from 'vitest/config'\n\nexport default defineConfig({\n  plugins: [svelte()],\n})\n"
  },
  {
    "path": "packages/table-core/eslint.config.js",
    "content": "// @ts-check\n\nimport rootConfig from '../../eslint.config.js'\n\n/** @type {any} */\nconst config = [\n  ...rootConfig,\n  {\n    rules: {},\n  },\n]\n\nexport default config\n"
  },
  {
    "path": "packages/table-core/package.json",
    "content": "{\n  \"name\": \"@tanstack/table-core\",\n  \"version\": \"9.0.0-alpha.16\",\n  \"description\": \"Headless UI for building powerful tables & datagrids for TS/JS.\",\n  \"author\": \"Tanner Linsley\",\n  \"license\": \"MIT\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/TanStack/table.git\",\n    \"directory\": \"packages/table-core\"\n  },\n  \"homepage\": \"https://tanstack.com/table\",\n  \"funding\": {\n    \"type\": \"github\",\n    \"url\": \"https://github.com/sponsors/tannerlinsley\"\n  },\n  \"keywords\": [\n    \"react\",\n    \"vue\",\n    \"solid\",\n    \"svelte\",\n    \"lit\",\n    \"angular\",\n    \"table\",\n    \"table-core\",\n    \"datagrid\"\n  ],\n  \"type\": \"module\",\n  \"types\": \"dist/esm/index.d.ts\",\n  \"main\": \"dist/esm/index.js\",\n  \"module\": \"dist/esm/index.js\",\n  \"exports\": {\n    \".\": {\n      \"types\": \"./dist/esm/index.d.ts\",\n      \"default\": \"./dist/esm/index.js\"\n    },\n    \"./package.json\": \"./package.json\"\n  },\n  \"sideEffects\": false,\n  \"engines\": {\n    \"node\": \">=16\"\n  },\n  \"files\": [\n    \"dist/\",\n    \"src\"\n  ],\n  \"scripts\": {\n    \"clean\": \"rimraf ./build && rimraf ./dist\",\n    \"lint:fix\": \"eslint ./src --fix\",\n    \"test:eslint\": \"eslint ./src\",\n    \"test:lib\": \"vitest\",\n    \"test:lib:dev\": \"pnpm test:lib --watch\",\n    \"test:types\": \"tsc\",\n    \"test:build\": \"publint --strict\",\n    \"build\": \"vite build\"\n  },\n  \"dependencies\": {\n    \"@tanstack/store\": \"^0.9.2\"\n  }\n}\n"
  },
  {
    "path": "packages/table-core/src/core/cells/constructCell.ts",
    "content": "import type { Table_Internal } from '../../types/Table'\nimport type { CellData, RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Row } from '../../types/Row'\nimport type { Cell } from '../../types/Cell'\nimport type { Column } from '../../types/Column'\nimport type { Cell_CoreProperties } from './coreCellsFeature.types'\n\n/**\n * Creates or retrieves the cell prototype for a table.\n * The prototype is cached on the table and shared by all cell instances.\n */\nfunction getCellPrototype<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>): object {\n  if (!table._cellPrototype) {\n    table._cellPrototype = { table }\n    for (const feature of Object.values(table._features)) {\n      feature.assignCellPrototype?.(table._cellPrototype, table)\n    }\n  }\n  return table._cellPrototype\n}\n\nexport function constructCell<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n>(\n  column: Column<TFeatures, TData, TValue>,\n  row: Row<TFeatures, TData>,\n  table: Table_Internal<TFeatures, TData>,\n): Cell<TFeatures, TData, TValue> {\n  // Create cell with shared prototype for memory efficiency\n  const cellPrototype = getCellPrototype(table)\n  const cell = Object.create(cellPrototype) as Cell_CoreProperties<\n    TFeatures,\n    TData,\n    TValue\n  >\n\n  // Only assign instance-specific properties\n  cell.column = column\n  cell.id = `${row.id}_${column.id}`\n  cell.row = row\n\n  return cell as Cell<TFeatures, TData, TValue>\n}\n"
  },
  {
    "path": "packages/table-core/src/core/cells/coreCellsFeature.ts",
    "content": "import { assignPrototypeAPIs } from '../../utils'\nimport {\n  cell_getContext,\n  cell_getValue,\n  cell_renderValue,\n} from './coreCellsFeature.utils'\nimport type { RowData } from '../../types/type-utils'\nimport type { TableFeature, TableFeatures } from '../../types/TableFeatures'\n// import type { Cell_Cell, TableOptions_Cell } from './coreCellsFeature.types'\n\ninterface CoreCellsFeatureConstructors<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  // Cell: Cell_Cell<TableFeatures, RowData>\n  // TableOptions: TableOptions_Cell\n}\n\nexport function constructCoreCellsFeature<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(): TableFeature<CoreCellsFeatureConstructors<TFeatures, TData>> {\n  return {\n    assignCellPrototype: (prototype, table) => {\n      assignPrototypeAPIs('coreCellsFeature', prototype, table, {\n        cell_getValue: {\n          fn: (cell) => cell_getValue(cell),\n        },\n        cell_renderValue: {\n          fn: (cell) => cell_renderValue(cell),\n        },\n        cell_getContext: {\n          fn: (cell) => cell_getContext(cell),\n          memoDeps: (cell) => [cell],\n        },\n      })\n    },\n  }\n}\n\n/**\n * The Core Cells feature provides the core cell functionality.\n */\nexport const coreCellsFeature = constructCoreCellsFeature()\n"
  },
  {
    "path": "packages/table-core/src/core/cells/coreCellsFeature.types.ts",
    "content": "import type { CellData, Getter, RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Table, Table_Internal } from '../../types/Table'\nimport type { Row } from '../../types/Row'\nimport type { Cell } from '../../types/Cell'\nimport type { Column } from '../../types/Column'\n\nexport interface CellContext<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n> {\n  cell: Cell<TFeatures, TData, TValue>\n  column: Column<TFeatures, TData, TValue>\n  getValue: Getter<TValue>\n  renderValue: Getter<TValue | null>\n  row: Row<TFeatures, TData>\n  table: Table<TFeatures, TData>\n}\n\nexport interface Cell_CoreProperties<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n> {\n  /**\n   * The associated Column object for the cell.\n   */\n  column: Column<TFeatures, TData, TValue>\n  /**\n   * The unique ID for the cell across the entire table.\n   */\n  id: string\n  /**\n   * The associated Row object for the cell.\n   */\n  row: Row<TFeatures, TData>\n  /**\n   * Reference to the parent table instance.\n   */\n  table: Table_Internal<TFeatures, TData>\n}\n\nexport interface Cell_Cell<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n> extends Cell_CoreProperties<TFeatures, TData, TValue> {\n  /**\n   * Returns the rendering context (or props) for cell-based components like cells and aggregated cells. Use these props with your framework's `flexRender` utility to render these using the template of your choice:\n   */\n  getContext: () => CellContext<TFeatures, TData, TValue>\n  /**\n   * Returns the value for the cell, accessed via the associated column's accessor key or accessor function.\n   */\n  getValue: CellContext<TFeatures, TData, TValue>['getValue']\n  /**\n   * Renders the value for a cell the same as `getValue`, but will return the `renderFallbackValue` if no value is found.\n   */\n  renderValue: CellContext<TFeatures, TData, TValue>['renderValue']\n}\n\nexport interface TableOptions_Cell {\n  /**\n   * Value used when the desired value is not found in the data.\n   */\n  renderFallbackValue?: any\n}\n"
  },
  {
    "path": "packages/table-core/src/core/cells/coreCellsFeature.utils.ts",
    "content": "import type { CellData, RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Cell } from '../../types/Cell'\n\nexport function cell_getValue<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n>(cell: Cell<TFeatures, TData, TValue>): TValue {\n  return cell.row.getValue(cell.column.id)\n}\n\nexport function cell_renderValue<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n>(cell: Cell<TFeatures, TData, TValue>) {\n  return cell.getValue() ?? cell.table.options.renderFallbackValue\n}\n\nexport function cell_getContext<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n>(cell: Cell<TFeatures, TData, TValue>) {\n  return {\n    table: cell.table,\n    column: cell.column,\n    row: cell.row,\n    cell: cell,\n    // Wrap in arrow functions to preserve `this` binding (methods are on prototype)\n    getValue: () => cell.getValue(),\n    renderValue: () => cell.renderValue(),\n  }\n}\n"
  },
  {
    "path": "packages/table-core/src/core/columns/constructColumn.ts",
    "content": "import {} from '../../utils'\nimport type { Table_Internal } from '../../types/Table'\nimport type { CellData, RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type {\n  AccessorFn,\n  ColumnDef,\n  ColumnDefResolved,\n} from '../../types/ColumnDef'\nimport type { Column } from '../../types/Column'\nimport type { Column_CoreProperties } from './coreColumnsFeature.types'\n\n/**\n * Creates or retrieves the column prototype for a table.\n * The prototype is cached on the table and shared by all column instances.\n */\nfunction getColumnPrototype<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>): object {\n  if (!table._columnPrototype) {\n    table._columnPrototype = { table }\n    for (const feature of Object.values(table._features)) {\n      feature.assignColumnPrototype?.(table._columnPrototype, table)\n    }\n  }\n  return table._columnPrototype\n}\n\nexport function constructColumn<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n>(\n  table: Table_Internal<TFeatures, TData>,\n  columnDef: ColumnDef<TFeatures, TData, TValue>,\n  depth: number,\n  parent?: Column<TFeatures, TData, TValue>,\n): Column<TFeatures, TData, TValue> {\n  const defaultColumn = table.getDefaultColumnDef()\n\n  const resolvedColumnDef = {\n    ...defaultColumn,\n    ...columnDef,\n  } as ColumnDefResolved<{}, TData, TValue>\n\n  const accessorKey = resolvedColumnDef.accessorKey\n\n  const id =\n    resolvedColumnDef.id ??\n    (accessorKey ? accessorKey.replaceAll('.', '_') : undefined) ??\n    (typeof resolvedColumnDef.header === 'string'\n      ? resolvedColumnDef.header\n      : undefined)\n\n  let accessorFn: AccessorFn<TData, TValue> | undefined\n\n  if (resolvedColumnDef.accessorFn) {\n    accessorFn = resolvedColumnDef.accessorFn\n  } else if (accessorKey) {\n    // Support deep accessor keys\n    if (accessorKey.includes('.')) {\n      accessorFn = (originalRow: TData) => {\n        let result = originalRow as Record<string, any> | undefined\n\n        for (const key of accessorKey.split('.')) {\n          result = result?.[key]\n          if (process.env.NODE_ENV === 'development' && result === undefined) {\n            console.warn(\n              `\"${key}\" in deeply nested key \"${accessorKey}\" returned undefined.`,\n            )\n          }\n        }\n\n        return result as TValue\n      }\n    } else {\n      accessorFn = (originalRow: TData) =>\n        (originalRow as any)[resolvedColumnDef.accessorKey]\n    }\n  }\n\n  if (!id) {\n    if (process.env.NODE_ENV === 'development') {\n      throw new Error(\n        resolvedColumnDef.accessorFn\n          ? `coreColumnsFeature require an id when using an accessorFn`\n          : `coreColumnsFeature require an id when using a non-string header`,\n      )\n    }\n    throw new Error()\n  }\n\n  // Create column with shared prototype for memory efficiency\n  const columnPrototype = getColumnPrototype(table)\n  const column = Object.create(columnPrototype) as Column_CoreProperties<\n    TFeatures,\n    TData,\n    TValue\n  >\n\n  // Only assign instance-specific properties\n  column.accessorFn = accessorFn\n  column.columnDef = resolvedColumnDef as ColumnDef<TFeatures, TData, TValue>\n  column.columns = []\n  column.depth = depth\n  column.id = `${String(id)}`\n  column.parent = parent\n\n  return column as Column<TFeatures, TData, TValue>\n}\n"
  },
  {
    "path": "packages/table-core/src/core/columns/coreColumnsFeature.ts",
    "content": "import { assignPrototypeAPIs, assignTableAPIs } from '../../utils'\nimport {\n  column_getFlatColumns,\n  column_getLeafColumns,\n  table_getAllColumns,\n  table_getAllFlatColumns,\n  table_getAllFlatColumnsById,\n  table_getAllLeafColumns,\n  table_getColumn,\n  table_getDefaultColumnDef,\n} from './coreColumnsFeature.utils'\nimport type { RowData } from '../../types/type-utils'\nimport type { TableFeature, TableFeatures } from '../../types/TableFeatures'\n// import type {\n//   Column_Column,\n//   TableOptions_Columns,\n//   Table_Columns,\n// } from './coreColumnsFeature.types'\n\ninterface CoreColumnsFeatureConstructors<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  // Column: Column_Column<TFeatures, TData>\n  // Table: Table_Columns<TFeatures, TData>\n  // TableOptions: TableOptions_Columns<TFeatures, TData>\n}\n\nexport function constructCoreColumnsFeature<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(): TableFeature<CoreColumnsFeatureConstructors<TFeatures, TData>> {\n  return {\n    assignColumnPrototype: (prototype, table) => {\n      assignPrototypeAPIs('coreColumnsFeature', prototype, table, {\n        column_getFlatColumns: {\n          fn: (column) => column_getFlatColumns(column),\n          memoDeps: (column) => [column.table.options.columns],\n        },\n        column_getLeafColumns: {\n          fn: (column) => column_getLeafColumns(column),\n          memoDeps: (column) => [\n            column.table.store.state.columnOrder,\n            column.table.store.state.grouping,\n            column.table.options.columns,\n            column.table.options.groupedColumnMode,\n          ],\n        },\n      })\n    },\n\n    constructTableAPIs: (table) => {\n      assignTableAPIs('coreColumnsFeature', table, {\n        table_getDefaultColumnDef: {\n          fn: () => table_getDefaultColumnDef(table),\n          memoDeps: () => [table.options.defaultColumn],\n        },\n        table_getAllColumns: {\n          fn: () => table_getAllColumns(table),\n          memoDeps: () => [table.options.columns],\n        },\n        table_getAllFlatColumns: {\n          fn: () => table_getAllFlatColumns(table),\n          memoDeps: () => [table.options.columns],\n        },\n        table_getAllFlatColumnsById: {\n          fn: () => table_getAllFlatColumnsById(table),\n          memoDeps: () => [table.options.columns],\n        },\n        table_getAllLeafColumns: {\n          fn: () => table_getAllLeafColumns(table),\n          memoDeps: () => [\n            table.store.state.columnOrder,\n            table.store.state.grouping,\n            table.options.columns,\n            table.options.groupedColumnMode,\n          ],\n        },\n        table_getColumn: {\n          fn: (columnId) => table_getColumn(table, columnId),\n        },\n      })\n    },\n  }\n}\n\n/**\n * The Core Columns feature provides the core column functionality.\n */\nexport const coreColumnsFeature = constructCoreColumnsFeature()\n"
  },
  {
    "path": "packages/table-core/src/core/columns/coreColumnsFeature.types.ts",
    "content": "import type { Table_Internal } from '../../types/Table'\nimport type { CellData, RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { AccessorFn, ColumnDef } from '../../types/ColumnDef'\nimport type { Column } from '../../types/Column'\n\nexport interface Column_CoreProperties<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n> {\n  /**\n   * The resolved accessor function to use when extracting the value for the column from each row. Will only be defined if the column def has a valid accessor key or function defined.\n   */\n  accessorFn?: AccessorFn<TData, TValue>\n  /**\n   * The original column def used to create the column.\n   */\n  columnDef: ColumnDef<TFeatures, TData, TValue>\n  /**\n   * The child column (if the column is a group column). Will be an empty array if the column is not a group column.\n   */\n  columns: Array<Column<TFeatures, TData, TValue>>\n  /**\n   * The depth of the column (if grouped) relative to the root column def array.\n   */\n  depth: number\n  /**\n   * The resolved unique identifier for the column resolved in this priority:\n      - A manual `id` property from the column def\n      - The accessor key from the column def\n      - The header string from the column def\n   */\n  id: string\n  /**\n   * The parent column for this column. Will be undefined if this is a root column.\n   */\n  parent?: Column<TFeatures, TData, TValue>\n  /**\n   * Reference to the parent table instance.\n   */\n  table: Table_Internal<TFeatures, TData>\n}\n\nexport interface Column_Column<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n> extends Column_CoreProperties<TFeatures, TData, TValue> {\n  /**\n   * Returns the flattened array of this column and all child/grand-child columns for this column.\n   */\n  getFlatColumns: () => Array<Column<TFeatures, TData, TValue>>\n  /**\n   * Returns an array of all leaf-node columns for this column. If a column has no children, it is considered the only leaf-node column.\n   */\n  getLeafColumns: () => Array<Column<TFeatures, TData, TValue>>\n}\n\nexport interface TableOptions_Columns<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n> {\n  /**\n   * The array of column defs to use for the table.\n   */\n  columns: ReadonlyArray<ColumnDef<TFeatures, TData, TValue>>\n  /**\n   * Default column options to use for all column defs supplied to the table.\n   */\n  defaultColumn?: Partial<ColumnDef<TFeatures, TData, TValue>>\n}\n\nexport interface Table_Columns<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  /**\n   * Returns a map of all flat columns by their ID.\n   */\n  getAllFlatColumnsById: () => Record<string, Column<TFeatures, TData, unknown>>\n  /**\n   * Returns the default column options to use for all column defs supplied to the table.\n   */\n  getDefaultColumnDef: () => Partial<ColumnDef<TFeatures, TData, unknown>>\n  /**\n   * Returns all columns in the table in their normalized and nested hierarchy.\n   */\n  getAllColumns: () => Array<Column<TFeatures, TData, unknown>>\n  /**\n   * Returns all columns in the table flattened to a single level.\n   */\n  getAllFlatColumns: () => Array<Column<TFeatures, TData, unknown>>\n  /**\n   * Returns all leaf-node columns in the table flattened to a single level. This does not include parent columns.\n   */\n  getAllLeafColumns: () => Array<Column<TFeatures, TData, unknown>>\n  /**\n   * Returns a single column by its ID.\n   */\n  getColumn: (columnId: string) => Column<TFeatures, TData, unknown> | undefined\n}\n"
  },
  {
    "path": "packages/table-core/src/core/columns/coreColumnsFeature.utils.ts",
    "content": "import { callMemoOrStaticFn } from '../../utils'\nimport { table_getOrderColumnsFn } from '../../features/column-ordering/columnOrderingFeature.utils'\nimport { constructColumn } from './constructColumn'\nimport type { Table_Internal } from '../../types/Table'\nimport type { CellData, RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type {\n  ColumnDef,\n  ColumnDefResolved,\n  GroupColumnDef,\n} from '../../types/ColumnDef'\nimport type { Column } from '../../types/Column'\n\nexport function column_getFlatColumns<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n>(\n  column: Column<TFeatures, TData, TValue>,\n): Array<Column<TFeatures, TData, TValue>> {\n  return [column, ...column.columns.flatMap((col) => col.getFlatColumns())]\n}\n\nexport function column_getLeafColumns<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n>(\n  column: Column<TFeatures, TData, TValue>,\n): Array<Column<TFeatures, TData, TValue>> {\n  if (column.columns.length) {\n    const leafColumns = column.columns.flatMap(\n      (col) => col.getLeafColumns(), // recursive\n    )\n\n    return callMemoOrStaticFn(\n      column.table,\n      'getOrderColumns',\n      table_getOrderColumnsFn,\n    )(leafColumns as any) as any\n  }\n\n  return [column]\n}\n\nexport function table_getDefaultColumnDef<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  table: Table_Internal<TFeatures, TData>,\n): Partial<ColumnDef<TFeatures, TData, unknown>> {\n  return {\n    header: (props) => {\n      const resolvedColumnDef = props.header.column\n        .columnDef as ColumnDefResolved<{}, TData>\n\n      if (resolvedColumnDef.accessorKey) {\n        return resolvedColumnDef.accessorKey\n      }\n\n      if (resolvedColumnDef.accessorFn) {\n        return resolvedColumnDef.id\n      }\n\n      return null\n    },\n    cell: (props) => props.renderValue<any>()?.toString?.() ?? null,\n    ...Object.values(table._features).reduce((obj, feature) => {\n      return Object.assign(obj, feature.getDefaultColumnDef?.())\n    }, {}),\n    ...table.options.defaultColumn,\n  } as Partial<ColumnDef<TFeatures, TData, unknown>>\n}\n\nexport function table_getAllColumns<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  table: Table_Internal<TFeatures, TData>,\n): Array<Column<TFeatures, TData, unknown>> {\n  const recurseColumns = (\n    colDefs: ReadonlyArray<ColumnDef<TFeatures, TData, unknown>>,\n    parent?: Column<TFeatures, TData, unknown>,\n    depth = 0,\n  ): Array<Column<TFeatures, TData, unknown>> => {\n    return colDefs.map((columnDef) => {\n      const column = constructColumn(table, columnDef, depth, parent)\n\n      const groupingColumnDef = columnDef as GroupColumnDef<\n        TFeatures,\n        TData,\n        unknown\n      >\n\n      column.columns = groupingColumnDef.columns\n        ? recurseColumns(groupingColumnDef.columns, column, depth + 1)\n        : []\n\n      return column\n    })\n  }\n\n  return recurseColumns(table.options.columns as any)\n}\n\nexport function table_getAllFlatColumns<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  table: Table_Internal<TFeatures, TData>,\n): Array<Column<TFeatures, TData, unknown>> {\n  return table.getAllColumns().flatMap((column) => column.getFlatColumns())\n}\n\nexport function table_getAllFlatColumnsById<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  table: Table_Internal<TFeatures, TData>,\n): Record<string, Column<TFeatures, TData, unknown>> {\n  return table.getAllFlatColumns().reduce(\n    (acc, column) => {\n      acc[column.id] = column\n      return acc\n    },\n    {} as Record<string, Column<TFeatures, TData, unknown>>,\n  )\n}\n\nexport function table_getAllLeafColumns<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  table: Table_Internal<TFeatures, TData>,\n): Array<Column<TFeatures, TData, unknown>> {\n  const leafColumns = table.getAllColumns().flatMap(\n    (c) => c.getLeafColumns(), // recursive\n  )\n  return callMemoOrStaticFn(\n    table,\n    'getOrderColumns',\n    table_getOrderColumnsFn,\n  )(leafColumns as any) as any\n}\n\nexport function table_getColumn<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  table: Table_Internal<TFeatures, TData>,\n  columnId: string,\n): Column<TFeatures, TData, unknown> | undefined {\n  const column = table.getAllFlatColumnsById()[columnId]\n\n  if (process.env.NODE_ENV === 'development' && !column) {\n    console.warn(`[Table] Column with id '${columnId}' does not exist.`)\n  }\n\n  return column\n}\n"
  },
  {
    "path": "packages/table-core/src/core/coreFeatures.ts",
    "content": "import { coreCellsFeature } from './cells/coreCellsFeature'\nimport { coreColumnsFeature } from './columns/coreColumnsFeature'\nimport { coreHeadersFeature } from './headers/coreHeadersFeature'\nimport { coreRowModelsFeature } from './row-models/coreRowModelsFeature'\nimport { coreRowsFeature } from './rows/coreRowsFeature'\nimport { coreTablesFeature } from './table/coreTablesFeature'\n\nexport interface CoreFeatures {\n  coreCellsFeature: typeof coreCellsFeature\n  coreColumnsFeature: typeof coreColumnsFeature\n  coreHeadersFeature: typeof coreHeadersFeature\n  coreRowModelsFeature: typeof coreRowModelsFeature\n  coreRowsFeature: typeof coreRowsFeature\n  coreTablesFeature: typeof coreTablesFeature\n}\n\nexport const coreFeatures: CoreFeatures = {\n  coreCellsFeature,\n  coreColumnsFeature,\n  coreHeadersFeature,\n  coreRowModelsFeature,\n  coreRowsFeature,\n  coreTablesFeature,\n}\n"
  },
  {
    "path": "packages/table-core/src/core/headers/buildHeaderGroups.ts",
    "content": "import { callMemoOrStaticFn } from '../../utils'\nimport { column_getIsVisible } from '../../features/column-visibility/columnVisibilityFeature.utils'\nimport { constructHeader } from './constructHeader'\nimport type { Table_Internal } from '../../types/Table'\nimport type { CellData, RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Header } from '../../types/Header'\nimport type { HeaderGroup } from '../../types/HeaderGroup'\nimport type { Column } from '../../types/Column'\n\nexport function buildHeaderGroups<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n>(\n  allColumns: Array<Column<TFeatures, TData, TValue>>,\n  columnsToGroup: Array<Column<TFeatures, TData, TValue>>,\n  table: Table_Internal<TFeatures, TData>,\n  headerFamily?: 'center' | 'left' | 'right',\n) {\n  // Find the max depth of the columns:\n  // build the leaf column row\n  // build each buffer row going up\n  //    placeholder for non-existent level\n  //    real column for existing level\n\n  let maxDepth = 0\n\n  const findMaxDepth = (\n    columns: Array<Column<TFeatures, TData, TValue>>,\n    depth = 1,\n  ) => {\n    maxDepth = Math.max(maxDepth, depth)\n\n    columns\n      .filter((column) =>\n        callMemoOrStaticFn(column, 'getIsVisible', column_getIsVisible),\n      )\n      .forEach((column) => {\n        if (column.columns.length) {\n          findMaxDepth(column.columns, depth + 1)\n        }\n      }, 0)\n  }\n\n  findMaxDepth(allColumns)\n\n  const headerGroups: Array<HeaderGroup<TFeatures, TData>> = []\n\n  const constructHeaderGroup = (\n    headersToGroup: Array<Header<TFeatures, TData, TValue>>,\n    depth: number,\n  ) => {\n    // The header group we are creating\n    const headerGroup: HeaderGroup<TFeatures, TData> = {\n      depth,\n      id: [headerFamily, `${depth}`].filter(Boolean).join('_'),\n      headers: [],\n    } as any\n\n    // The parent columns we're going to scan next\n    const pendingParentHeaders: Array<Header<TFeatures, TData, TValue>> = []\n\n    // Scan each column for parents\n    headersToGroup.forEach((headerToGroup) => {\n      // What is the latest (last) parent column?\n\n      const latestPendingParentHeader = [...pendingParentHeaders].reverse()[0]\n\n      const isLeafHeader = headerToGroup.column.depth === headerGroup.depth\n\n      let column: Column<TFeatures, TData, TValue>\n      let isPlaceholder = false\n\n      if (isLeafHeader && headerToGroup.column.parent) {\n        // The parent header is new\n        column = headerToGroup.column.parent\n      } else {\n        // The parent header is repeated\n        column = headerToGroup.column\n        isPlaceholder = true\n      }\n\n      if (\n        latestPendingParentHeader &&\n        latestPendingParentHeader.column === column\n      ) {\n        // This column is repeated. Add it as a sub header to the next batch\n        latestPendingParentHeader.subHeaders.push(headerToGroup)\n      } else {\n        // This is a new header. Let's create it\n        const header = constructHeader(table, column, {\n          id: [headerFamily, depth, column.id, headerToGroup.id]\n            .filter(Boolean)\n            .join('_'),\n          isPlaceholder,\n          placeholderId: isPlaceholder\n            ? `${pendingParentHeaders.filter((d) => d.column === column).length}`\n            : undefined,\n          depth,\n          index: pendingParentHeaders.length,\n        })\n\n        // Add the headerToGroup as a subHeader of the new header\n        header.subHeaders.push(headerToGroup)\n        // Add the new header to the pendingParentHeaders to get grouped\n        // in the next batch\n        pendingParentHeaders.push(header)\n      }\n\n      headerGroup.headers.push(headerToGroup)\n      headerToGroup.headerGroup = headerGroup\n    })\n\n    headerGroups.push(headerGroup)\n\n    if (depth > 0) {\n      constructHeaderGroup(pendingParentHeaders, depth - 1)\n    }\n  }\n\n  const bottomHeaders = columnsToGroup.map((column, index) =>\n    constructHeader(table, column, {\n      depth: maxDepth,\n      index,\n    }),\n  )\n\n  constructHeaderGroup(bottomHeaders, maxDepth - 1)\n\n  headerGroups.reverse()\n\n  // headerGroups = headerGroups.filter(headerGroup => {\n  //   return !headerGroup.headers.every(header => header.isPlaceholder)\n  // })\n\n  const recurseHeadersForSpans = (\n    headers: Array<Header<TFeatures, TData, TValue>>,\n  ): Array<{ colSpan: number; rowSpan: number }> => {\n    const filteredHeaders = headers.filter((header) =>\n      callMemoOrStaticFn(header.column, 'getIsVisible', column_getIsVisible),\n    )\n\n    return filteredHeaders.map((header) => {\n      let colSpan = 0\n      let rowSpan = 0\n      let childRowSpans = [0]\n\n      if (header.subHeaders.length) {\n        childRowSpans = []\n\n        recurseHeadersForSpans(header.subHeaders).forEach(\n          ({ colSpan: childColSpan, rowSpan: childRowSpan }) => {\n            colSpan += childColSpan\n            childRowSpans.push(childRowSpan)\n          },\n        )\n      } else {\n        colSpan = 1\n      }\n\n      const minChildRowSpan = Math.min(...childRowSpans)\n      rowSpan = rowSpan + minChildRowSpan\n\n      header.colSpan = colSpan\n      header.rowSpan = rowSpan\n\n      return { colSpan, rowSpan }\n    })\n  }\n\n  recurseHeadersForSpans(\n    (headerGroups[0]?.headers ?? []) as Array<Header<TFeatures, TData, TValue>>,\n  )\n\n  return headerGroups\n}\n"
  },
  {
    "path": "packages/table-core/src/core/headers/constructHeader.ts",
    "content": "import type { Table_Internal } from '../../types/Table'\nimport type { CellData, RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Header } from '../../types/Header'\nimport type { Column } from '../../types/Column'\nimport type { Header_CoreProperties } from './coreHeadersFeature.types'\n\n/**\n * Creates or retrieves the header prototype for a table.\n * The prototype is cached on the table and shared by all header instances.\n */\nfunction getHeaderPrototype<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>): object {\n  if (!table._headerPrototype) {\n    table._headerPrototype = { table }\n    for (const feature of Object.values(table._features)) {\n      feature.assignHeaderPrototype?.(table._headerPrototype, table)\n    }\n  }\n  return table._headerPrototype\n}\n\nexport function constructHeader<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n>(\n  table: Table_Internal<TFeatures, TData>,\n  column: Column<TFeatures, TData, TValue>,\n  options: {\n    id?: string\n    isPlaceholder?: boolean\n    placeholderId?: string\n    index: number\n    depth: number\n  },\n): Header<TFeatures, TData, TValue> {\n  // Create header with shared prototype for memory efficiency\n  const headerPrototype = getHeaderPrototype(table)\n  const header = Object.create(headerPrototype) as Header_CoreProperties<\n    TFeatures,\n    TData,\n    TValue\n  >\n\n  // Only assign instance-specific properties\n  header.colSpan = 0\n  header.column = column\n  header.depth = options.depth\n  header.headerGroup = null\n  header.id = options.id ?? column.id\n  header.index = options.index\n  header.isPlaceholder = !!options.isPlaceholder\n  header.placeholderId = options.placeholderId\n  header.rowSpan = 0\n  header.subHeaders = []\n\n  return header as Header<TFeatures, TData, TValue>\n}\n"
  },
  {
    "path": "packages/table-core/src/core/headers/coreHeadersFeature.ts",
    "content": "import {\n  assignPrototypeAPIs,\n  assignTableAPIs,\n  callMemoOrStaticFn,\n} from '../../utils'\nimport {\n  table_getCenterHeaderGroups,\n  table_getLeftHeaderGroups,\n  table_getRightHeaderGroups,\n} from '../../features/column-pinning/columnPinningFeature.utils'\nimport {\n  header_getContext,\n  header_getLeafHeaders,\n  table_getFlatHeaders,\n  table_getFooterGroups,\n  table_getHeaderGroups,\n  table_getLeafHeaders,\n} from './coreHeadersFeature.utils'\nimport type { RowData } from '../../types/type-utils'\nimport type { TableFeature, TableFeatures } from '../../types/TableFeatures'\n// import type { Header_Header, Table_Headers } from './coreHeadersFeature.types'\n\ninterface CoreHeadersFeatureConstructors<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  // Header: Header_Header<TFeatures, TData>\n  // Table: Table_Headers<TFeatures, TData>\n}\n\nexport function constructCoreHeadersFeature<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(): TableFeature<CoreHeadersFeatureConstructors<TFeatures, TData>> {\n  return {\n    assignHeaderPrototype: (prototype, table) => {\n      assignPrototypeAPIs('coreHeadersFeature', prototype, table, {\n        header_getLeafHeaders: {\n          fn: (header) => header_getLeafHeaders(header),\n          memoDeps: (header) => [header.column.table.options.columns],\n        },\n        header_getContext: {\n          fn: (header) => header_getContext(header),\n          memoDeps: (header) => [header.column.table.options.columns],\n        },\n      })\n    },\n\n    constructTableAPIs: (table) => {\n      assignTableAPIs('coreHeadersFeature', table, {\n        table_getHeaderGroups: {\n          fn: () => table_getHeaderGroups(table),\n          memoDeps: () => [\n            table.options.columns,\n            table.store.state.columnOrder,\n            table.store.state.grouping,\n            table.store.state.columnPinning,\n            table.store.state.columnVisibility,\n            table.options.groupedColumnMode,\n          ],\n        },\n        table_getFooterGroups: {\n          fn: () => table_getFooterGroups(table),\n          memoDeps: () => [table.getHeaderGroups()],\n        },\n        table_getFlatHeaders: {\n          fn: () => table_getFlatHeaders(table),\n          memoDeps: () => [table.getHeaderGroups()],\n        },\n        table_getLeafHeaders: {\n          fn: () => table_getLeafHeaders(table),\n          memoDeps: () => [\n            callMemoOrStaticFn(\n              table,\n              'getLeftHeaderGroups',\n              table_getLeftHeaderGroups,\n            ),\n            callMemoOrStaticFn(\n              table,\n              'getCenterHeaderGroups',\n              table_getCenterHeaderGroups,\n            ),\n            callMemoOrStaticFn(\n              table,\n              'getRightHeaderGroups',\n              table_getRightHeaderGroups,\n            ),\n          ],\n        },\n      })\n    },\n  }\n}\n\n/**\n * The Core Headers feature provides the core header functionality.\n */\nexport const coreHeadersFeature = constructCoreHeadersFeature()\n"
  },
  {
    "path": "packages/table-core/src/core/headers/coreHeadersFeature.types.ts",
    "content": "import type { CellData, RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Table } from '../../types/Table'\nimport type { Header } from '../../types/Header'\nimport type { HeaderGroup } from '../../types/HeaderGroup'\nimport type { Column } from '../../types/Column'\n\nexport interface Table_Headers<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  /**\n   * Returns all header groups for the table.\n   */\n  getHeaderGroups: () => Array<HeaderGroup<TFeatures, TData>>\n  /**\n   * Returns the footer groups for the table.\n   */\n  getFooterGroups: () => Array<HeaderGroup<TFeatures, TData>>\n  /**\n   * Returns headers for all columns in the table, including parent headers.\n   */\n  getFlatHeaders: () => Array<Header<TFeatures, TData, unknown>>\n  /**\n   * Returns headers for all leaf columns in the table, (not including parent headers).\n   */\n  getLeafHeaders: () => Array<Header<TFeatures, TData, unknown>>\n}\n\nexport interface HeaderContext<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n> {\n  /**\n   * An instance of a column.\n   */\n  column: Column<TFeatures, TData, TValue>\n  /**\n   * An instance of a header.\n   */\n  header: Header<TFeatures, TData, TValue>\n  /**\n   * The table instance.\n   */\n  table: Table<TFeatures, TData>\n}\n\nexport interface Header_CoreProperties<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n> {\n  /**\n   * The col-span for the header.\n   */\n  colSpan: number\n  /**\n   * The header's associated column object.\n   */\n  column: Column<TFeatures, TData, TValue>\n  /**\n   * The depth of the header, zero-indexed based.\n   */\n  depth: number\n  /**\n   * The header's associated header group object.\n   */\n  headerGroup: HeaderGroup<TFeatures, TData> | null\n  /**\n   * The unique identifier for the header.\n   */\n  id: string\n  /**\n   * The index for the header within the header group.\n   */\n  index: number\n  /**\n   * A boolean denoting if the header is a placeholder header.\n   */\n  isPlaceholder: boolean\n  /**\n   * If the header is a placeholder header, this will be a unique header ID that does not conflict with any other headers across the table.\n   */\n  placeholderId?: string\n  /**\n   * The row-span for the header.\n   */\n  rowSpan: number\n  /**\n   * The header's hierarchical sub/child headers. Will be empty if the header's associated column is a leaf-column.\n   */\n  subHeaders: Array<Header<TFeatures, TData, TValue>>\n  /**\n   * Reference to the parent table instance.\n   */\n  table: Table<TFeatures, TData>\n}\n\nexport interface Header_Header<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n> extends Header_CoreProperties<TFeatures, TData, TValue> {\n  /**\n   * Returns the rendering context (or props) for column-based components like headers, footers and filters.\n   */\n  getContext: () => HeaderContext<TFeatures, TData, TValue>\n  /**\n   * Returns the leaf headers hierarchically nested under this header.\n   */\n  getLeafHeaders: () => Array<Header<TFeatures, TData, TValue>>\n}\n\nexport interface HeaderGroup_Header<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n> {\n  depth: number\n  headers: Array<Header<TFeatures, TData, TValue>>\n  id: string\n}\n"
  },
  {
    "path": "packages/table-core/src/core/headers/coreHeadersFeature.utils.ts",
    "content": "import {\n  getDefaultColumnPinningState,\n  table_getCenterHeaderGroups,\n  table_getLeftHeaderGroups,\n  table_getRightHeaderGroups,\n} from '../../features/column-pinning/columnPinningFeature.utils'\nimport { table_getVisibleLeafColumns } from '../../features/column-visibility/columnVisibilityFeature.utils'\nimport { callMemoOrStaticFn } from '../../utils'\nimport { buildHeaderGroups } from './buildHeaderGroups'\nimport type { Table_Internal } from '../../types/Table'\nimport type { Header } from '../../types/Header'\nimport type { RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Header_Header } from './coreHeadersFeature.types'\nimport type { Column } from '../../types/Column'\n\nexport function header_getLeafHeaders<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue,\n>(header: Header<TFeatures, TData, TValue>) {\n  const leafHeaders: Array<Header<TFeatures, TData, TValue>> = []\n\n  const recurseHeader = (h: Header_Header<TFeatures, TData, TValue>) => {\n    if (h.subHeaders.length) {\n      h.subHeaders.map(recurseHeader)\n    }\n    leafHeaders.push(h as Header<TFeatures, TData, TValue>)\n  }\n\n  recurseHeader(header)\n\n  return leafHeaders\n}\n\nexport function header_getContext<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue,\n>(header: Header<TFeatures, TData, TValue>) {\n  return {\n    column: header.column,\n    header,\n    table: header.column.table,\n  }\n}\n\nexport function table_getHeaderGroups<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>) {\n  const { left, right } =\n    table.store.state.columnPinning ?? getDefaultColumnPinningState()\n  const allColumns = table.getAllColumns()\n  const leafColumns = callMemoOrStaticFn(\n    table,\n    'getVisibleLeafColumns',\n    table_getVisibleLeafColumns,\n  ) as unknown as Array<Column<TFeatures, TData, unknown>>\n\n  const leftColumns = left\n    .map((columnId) => leafColumns.find((d) => d.id === columnId)!)\n    .filter(Boolean)\n\n  const rightColumns = right\n    .map((columnId) => leafColumns.find((d) => d.id === columnId)!)\n    .filter(Boolean)\n\n  const centerColumns = leafColumns.filter(\n    (column) => !left.includes(column.id) && !right.includes(column.id),\n  )\n\n  const headerGroups = buildHeaderGroups(\n    allColumns,\n    [...leftColumns, ...centerColumns, ...rightColumns],\n    table,\n  )\n\n  return headerGroups\n}\n\nexport function table_getFooterGroups<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>) {\n  const headerGroups = table.getHeaderGroups()\n  return [...headerGroups].reverse()\n}\n\nexport function table_getFlatHeaders<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>) {\n  const headerGroups = table.getHeaderGroups()\n  return headerGroups\n    .map((headerGroup) => {\n      return headerGroup.headers\n    })\n    .flat()\n}\n\nexport function table_getLeafHeaders<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>) {\n  const left = callMemoOrStaticFn(\n    table,\n    'getLeftHeaderGroups',\n    table_getLeftHeaderGroups,\n  )\n  const center = callMemoOrStaticFn(\n    table,\n    'getCenterHeaderGroups',\n    table_getCenterHeaderGroups,\n  )\n  const right = callMemoOrStaticFn(\n    table,\n    'getRightHeaderGroups',\n    table_getRightHeaderGroups,\n  )\n\n  return [\n    ...(left[0]?.headers ?? []),\n    ...(center[0]?.headers ?? []),\n    ...(right[0]?.headers ?? []),\n  ]\n    .map((header) => {\n      return header.getLeafHeaders()\n    })\n    .flat()\n}\n"
  },
  {
    "path": "packages/table-core/src/core/row-models/coreRowModelsFeature.ts",
    "content": "import { assignTableAPIs } from '../../utils'\nimport {\n  table_getCoreRowModel,\n  table_getExpandedRowModel,\n  table_getFilteredRowModel,\n  table_getGroupedRowModel,\n  table_getPaginatedRowModel,\n  table_getPreExpandedRowModel,\n  table_getPreFilteredRowModel,\n  table_getPreGroupedRowModel,\n  table_getPrePaginatedRowModel,\n  table_getPreSortedRowModel,\n  table_getRowModel,\n  table_getSortedRowModel,\n} from './coreRowModelsFeature.utils'\nimport type { RowData } from '../../types/type-utils'\nimport type { TableFeature, TableFeatures } from '../../types/TableFeatures'\n// import type { Table_RowModels } from './coreRowModelsFeature.types'\n\ninterface CoreRowModelsFeatureConstructors<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  // Table: Table_RowModels<TFeatures, TData>\n}\n\nexport function constructCoreRowModelsFeature<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(): TableFeature<CoreRowModelsFeatureConstructors<TFeatures, TData>> {\n  return {\n    constructTableAPIs: (table) => {\n      assignTableAPIs('coreRowModelsFeature', table, {\n        table_getCoreRowModel: {\n          fn: () => table_getCoreRowModel(table),\n        },\n        table_getPreFilteredRowModel: {\n          fn: () => table_getPreFilteredRowModel(table),\n        },\n        table_getFilteredRowModel: {\n          fn: () => table_getFilteredRowModel(table),\n        },\n        table_getPreGroupedRowModel: {\n          fn: () => table_getPreGroupedRowModel(table),\n        },\n        table_getGroupedRowModel: {\n          fn: () => table_getGroupedRowModel(table),\n        },\n        table_getPreSortedRowModel: {\n          fn: () => table_getPreSortedRowModel(table),\n        },\n        table_getSortedRowModel: {\n          fn: () => table_getSortedRowModel(table),\n        },\n        table_getPreExpandedRowModel: {\n          fn: () => table_getPreExpandedRowModel(table),\n        },\n        table_getExpandedRowModel: {\n          fn: () => table_getExpandedRowModel(table),\n        },\n        table_getPrePaginatedRowModel: {\n          fn: () => table_getPrePaginatedRowModel(table),\n        },\n        table_getPaginatedRowModel: {\n          fn: () => table_getPaginatedRowModel(table),\n        },\n        table_getRowModel: {\n          fn: () => table_getRowModel(table),\n        },\n      })\n    },\n  }\n}\n\n/**\n * The Core Row Models feature provides the core row model functionality.\n */\nexport const coreRowModelsFeature = constructCoreRowModelsFeature()\n"
  },
  {
    "path": "packages/table-core/src/core/row-models/coreRowModelsFeature.types.ts",
    "content": "import type { Table } from '../../types/Table'\nimport type { Table_RowModels_Faceted } from '../../features/column-faceting/columnFacetingFeature.types'\nimport type { Table_RowModels_Filtered } from '../../features/column-filtering/columnFilteringFeature.types'\nimport type { Table_RowModels_Grouped } from '../../features/column-grouping/columnGroupingFeature.types'\nimport type { Table_RowModels_Expanded } from '../../features/row-expanding/rowExpandingFeature.types'\nimport type { Table_RowModels_Paginated } from '../../features/row-pagination/rowPaginationFeature.types'\nimport type { Table_RowModels_Sorted } from '../../features/row-sorting/rowSortingFeature.types'\nimport type { Row } from '../../types/Row'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { RowData } from '../../types/type-utils'\n\nexport interface RowModel<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  rows: Array<Row<TFeatures, TData>>\n  flatRows: Array<Row<TFeatures, TData>>\n  rowsById: Record<string, Row<TFeatures, TData>>\n}\n\nexport interface CreateRowModel_Plugins {}\n\nexport interface CreateRowModel_Core<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> extends CreateRowModel_Plugins {\n  /**\n   * This required option is a factory for a function that computes and returns the core row model for the table.\n   */\n  coreRowModel?: (\n    table: Table<TFeatures, TData>,\n  ) => () => RowModel<TFeatures, TData>\n}\n\nexport interface CachedRowModel_Plugins {}\n\nexport interface CachedRowModel_Core<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> extends CachedRowModel_Plugins {\n  coreRowModel: () => RowModel<TFeatures, TData>\n}\n\nexport interface Table_RowModels_Core<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  /**\n   * Returns the core row model before any processing has been applied.\n   */\n  getCoreRowModel: () => RowModel<TFeatures, TData>\n  /**\n   * Returns the final model after all processing from other used features has been applied. This is the row model that is most commonly used for rendering.\n   */\n  getRowModel: () => RowModel<TFeatures, TData>\n}\n\nexport type Table_RowModels<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> = Table_RowModels_Core<TFeatures, TData> &\n  Table_RowModels_Faceted<TFeatures, TData> &\n  Table_RowModels_Filtered<TFeatures, TData> &\n  Table_RowModels_Grouped<TFeatures, TData> &\n  Table_RowModels_Expanded<TFeatures, TData> &\n  Table_RowModels_Paginated<TFeatures, TData> &\n  Table_RowModels_Sorted<TFeatures, TData>\n"
  },
  {
    "path": "packages/table-core/src/core/row-models/coreRowModelsFeature.utils.ts",
    "content": "import { createCoreRowModel } from './createCoreRowModel'\nimport type { Table_Internal } from '../../types/Table'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { RowData } from '../../types/type-utils'\nimport type { RowModel } from './coreRowModelsFeature.types'\n\nexport function table_getCoreRowModel<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>): RowModel<TFeatures, TData> {\n  if (!table._rowModels.coreRowModel) {\n    table._rowModels.coreRowModel =\n      table.options._rowModels?.coreRowModel?.(table) ??\n      createCoreRowModel<TFeatures, TData>()(table)\n  }\n\n  return table._rowModels.coreRowModel()\n}\n\nexport function table_getPreFilteredRowModel<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>): RowModel<TFeatures, TData> {\n  return table.getCoreRowModel()\n}\n\nexport function table_getFilteredRowModel<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>): RowModel<TFeatures, TData> {\n  if (!table._rowModels.filteredRowModel) {\n    table._rowModels.filteredRowModel =\n      table.options._rowModels?.filteredRowModel?.(table)\n  }\n\n  if (table.options.manualFiltering || !table._rowModels.filteredRowModel) {\n    return table.getPreFilteredRowModel()\n  }\n\n  return table._rowModels.filteredRowModel()\n}\n\nexport function table_getPreGroupedRowModel<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>): RowModel<TFeatures, TData> {\n  return table.getFilteredRowModel()\n}\n\nexport function table_getGroupedRowModel<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>): RowModel<TFeatures, TData> {\n  if (!table._rowModels.groupedRowModel) {\n    table._rowModels.groupedRowModel =\n      table.options._rowModels?.groupedRowModel?.(table)\n  }\n\n  if (table.options.manualGrouping || !table._rowModels.groupedRowModel) {\n    return table.getPreGroupedRowModel()\n  }\n\n  return table._rowModels.groupedRowModel()\n}\n\nexport function table_getPreSortedRowModel<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>): RowModel<TFeatures, TData> {\n  return table.getGroupedRowModel()\n}\n\nexport function table_getSortedRowModel<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>): RowModel<TFeatures, TData> {\n  if (!table._rowModels.sortedRowModel) {\n    table._rowModels.sortedRowModel =\n      table.options._rowModels?.sortedRowModel?.(table)\n  }\n\n  if (table.options.manualSorting || !table._rowModels.sortedRowModel) {\n    return table.getPreSortedRowModel()\n  }\n\n  return table._rowModels.sortedRowModel()\n}\n\nexport function table_getPreExpandedRowModel<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>): RowModel<TFeatures, TData> {\n  return table.getSortedRowModel()\n}\n\nexport function table_getExpandedRowModel<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>): RowModel<TFeatures, TData> {\n  if (!table._rowModels.expandedRowModel) {\n    table._rowModels.expandedRowModel =\n      table.options._rowModels?.expandedRowModel?.(table)\n  }\n\n  if (table.options.manualExpanding || !table._rowModels.expandedRowModel) {\n    return table.getPreExpandedRowModel()\n  }\n\n  return table._rowModels.expandedRowModel()\n}\n\nexport function table_getPrePaginatedRowModel<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>): RowModel<TFeatures, TData> {\n  return table.getExpandedRowModel()\n}\n\nexport function table_getPaginatedRowModel<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>): RowModel<TFeatures, TData> {\n  if (!table._rowModels.paginatedRowModel) {\n    table._rowModels.paginatedRowModel =\n      table.options._rowModels?.paginatedRowModel?.(table)\n  }\n\n  if (table.options.manualPagination || !table._rowModels.paginatedRowModel) {\n    return table.getPrePaginatedRowModel()\n  }\n\n  return table._rowModels.paginatedRowModel()\n}\n\nexport function table_getRowModel<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>): RowModel<TFeatures, TData> {\n  return table.getPaginatedRowModel()\n}\n"
  },
  {
    "path": "packages/table-core/src/core/row-models/createCoreRowModel.ts",
    "content": "import { constructRow } from '../rows/constructRow'\nimport { tableMemo } from '../../utils'\nimport { table_autoResetPageIndex } from '../../features/row-pagination/rowPaginationFeature.utils'\nimport type { Table, Table_Internal } from '../../types/Table'\nimport type { RowModel } from './coreRowModelsFeature.types'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Row } from '../../types/Row'\nimport type { RowData } from '../../types/type-utils'\n\nexport function createCoreRowModel<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(): (table: Table<TFeatures, TData>) => () => RowModel<TFeatures, TData> {\n  return (_table) => {\n    const table = _table as Table_Internal<TFeatures, TData>\n    return tableMemo({\n      feature: 'coreRowModelsFeature',\n      table,\n      fnName: 'table.getCoreRowModel',\n      memoDeps: () => [table.options.data],\n      fn: () => _createCoreRowModel(table, table.options.data),\n      onAfterUpdate: () => table_autoResetPageIndex(table),\n    })\n  }\n}\n\nfunction _createCoreRowModel<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  table: Table_Internal<TFeatures, TData>,\n  data: ReadonlyArray<TData>,\n): {\n  rows: Array<Row<TFeatures, TData>>\n  flatRows: Array<Row<TFeatures, TData>>\n  rowsById: Record<string, Row<TFeatures, TData>>\n} {\n  const rowModel: RowModel<TFeatures, TData> = {\n    rows: [],\n    flatRows: [],\n    rowsById: {},\n  }\n\n  const accessRows = (\n    originalRows: ReadonlyArray<TData>,\n    depth = 0,\n    parentRow?: Row<TFeatures, TData>,\n  ): Array<Row<TFeatures, TData>> => {\n    const rows = [] as Array<Row<TFeatures, TData>>\n\n    for (let i = 0; i < originalRows.length; i++) {\n      const originalRow = originalRows[i]!\n      // Make the row\n      const row = constructRow(\n        table,\n        table.getRowId(originalRow, i, parentRow),\n        originalRow,\n        i,\n        depth,\n        undefined,\n        parentRow?.id,\n      )\n\n      // Keep track of every row in a flat array\n      rowModel.flatRows.push(row)\n      // Also keep track of every row by its ID\n      rowModel.rowsById[row.id] = row\n      // Push table row into parent\n      rows.push(row)\n\n      // Get the original subrows\n      if (table.options.getSubRows) {\n        row.originalSubRows = table.options.getSubRows(originalRow, i)\n\n        // Then recursively access them\n        if (row.originalSubRows?.length) {\n          row.subRows = accessRows(row.originalSubRows, depth + 1, row)\n        }\n      }\n    }\n\n    return rows\n  }\n\n  rowModel.rows = accessRows(data)\n\n  return rowModel\n}\n"
  },
  {
    "path": "packages/table-core/src/core/rows/constructRow.ts",
    "content": "import type { Table_Internal } from '../../types/Table'\nimport type { RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Row } from '../../types/Row'\nimport type { Row_CoreProperties } from './coreRowsFeature.types'\n\n/**\n * Creates or retrieves the row prototype for a table.\n * The prototype is cached on the table and shared by all row instances.\n */\nfunction getRowPrototype<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>): object {\n  if (!table._rowPrototype) {\n    table._rowPrototype = { table }\n    for (const feature of Object.values(table._features)) {\n      feature.assignRowPrototype?.(table._rowPrototype, table)\n    }\n  }\n  return table._rowPrototype\n}\n\nexport const constructRow = <\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  table: Table_Internal<TFeatures, TData>,\n  id: string,\n  original: TData,\n  rowIndex: number,\n  depth: number,\n  subRows?: Array<Row<TFeatures, TData>>,\n  parentId?: string,\n): Row<TFeatures, TData> => {\n  // Create row with shared prototype for memory efficiency\n  const rowPrototype = getRowPrototype(table)\n  const row = Object.create(rowPrototype) as Row_CoreProperties<\n    TFeatures,\n    TData\n  >\n\n  // Only assign instance-specific properties\n  row._uniqueValuesCache = {}\n  row._valuesCache = {}\n  row.depth = depth\n  row.id = id\n  row.index = rowIndex\n  row.original = original\n  row.parentId = parentId\n  row.subRows = subRows ?? []\n\n  // Initialize instance-specific data (e.g., caches) for features that need it\n  for (const feature of Object.values(table._features)) {\n    feature.initRowInstanceData?.(row as Row<TFeatures, TData>)\n  }\n\n  return row as Row<TFeatures, TData>\n}\n"
  },
  {
    "path": "packages/table-core/src/core/rows/coreRowsFeature.ts",
    "content": "import { assignPrototypeAPIs, assignTableAPIs } from '../../utils'\nimport {\n  row_getAllCells,\n  row_getAllCellsByColumnId,\n  row_getLeafRows,\n  row_getParentRow,\n  row_getParentRows,\n  row_getUniqueValues,\n  row_getValue,\n  row_renderValue,\n  table_getRow,\n  table_getRowId,\n} from './coreRowsFeature.utils'\nimport type { RowData } from '../../types/type-utils'\nimport type { TableFeature, TableFeatures } from '../../types/TableFeatures'\n// import type {\n//   Row_Row,\n//   TableOptions_Rows,\n//   Table_Rows,\n// } from './coreRowsFeature.types'\n\ninterface CoreRowsFeatureConstructors<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  // Row: Row_Row<TFeatures, TData>\n  // TableOptions: TableOptions_Rows<TFeatures, TData>\n  // Table: Table_Rows<TFeatures, TData>\n}\n\nexport function constructCoreRowsFeature<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(): TableFeature<CoreRowsFeatureConstructors<TFeatures, TData>> {\n  return {\n    assignRowPrototype: (prototype, table) => {\n      assignPrototypeAPIs('coreRowsFeature', prototype, table, {\n        row_getAllCellsByColumnId: {\n          fn: (row) => row_getAllCellsByColumnId(row),\n          memoDeps: (row) => [row.getAllCells()],\n        },\n        row_getAllCells: {\n          fn: (row) => row_getAllCells(row),\n          memoDeps: (row) => [row.table.getAllLeafColumns()],\n        },\n        row_getLeafRows: {\n          fn: (row) => row_getLeafRows(row),\n        },\n        row_getParentRow: {\n          fn: (row) => row_getParentRow(row),\n        },\n        row_getParentRows: {\n          fn: (row) => row_getParentRows(row),\n        },\n        row_getUniqueValues: {\n          fn: (row, columnId) => row_getUniqueValues(row, columnId),\n        },\n        row_getValue: {\n          fn: (row, columnId) => row_getValue(row, columnId),\n        },\n        row_renderValue: {\n          fn: (row, columnId) => row_renderValue(row, columnId),\n        },\n      })\n    },\n    constructTableAPIs: (table) => {\n      assignTableAPIs('coreRowsFeature', table, {\n        table_getRowId: {\n          fn: (originalRow, index, parent) =>\n            table_getRowId(originalRow, table, index, parent),\n        },\n        table_getRow: {\n          fn: (id: string, searchAll?: boolean) =>\n            table_getRow(table, id, searchAll),\n        },\n      })\n    },\n  }\n}\n\n/**\n * The Core Rows feature provides the core row functionality.\n */\nexport const coreRowsFeature = constructCoreRowsFeature()\n"
  },
  {
    "path": "packages/table-core/src/core/rows/coreRowsFeature.types.ts",
    "content": "import type { Table_Internal } from '../../types/Table'\nimport type { RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Row } from '../../types/Row'\nimport type { Cell } from '../../types/Cell'\n\nexport interface Row_CoreProperties<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  _uniqueValuesCache: Record<string, unknown>\n  _valuesCache: Record<string, unknown>\n  /**\n   * The depth of the row (if nested or grouped) relative to the root row array.\n   */\n  depth: number\n  /**\n   * The resolved unique identifier for the row resolved via the `options.getRowId` option. Defaults to the row's index (or relative index if it is a subRow).\n   */\n  id: string\n  /**\n   * The index of the row within its parent array (or the root data array).\n   */\n  index: number\n  /**\n   * The original row object provided to the table. If the row is a grouped row, the original row object will be the first original in the group.\n   */\n  original: TData\n  /**\n   * An array of the original subRows as returned by the `options.getSubRows` option.\n   */\n  originalSubRows?: ReadonlyArray<TData>\n  /**\n   * If nested, this row's parent row id.\n   */\n  parentId?: string\n  /**\n   * An array of subRows for the row as returned and created by the `options.getSubRows` option.\n   */\n  subRows: Array<Row<TFeatures, TData>>\n  /**\n   * Reference to the parent table instance.\n   */\n  table: Table_Internal<TFeatures, TData>\n}\n\nexport interface Row_Row<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> extends Row_CoreProperties<TFeatures, TData> {\n  getAllCellsByColumnId: () => Record<string, Cell<TFeatures, TData, unknown>>\n  /**\n   * Returns all of the cells for the row.\n   */\n  getAllCells: () => Array<Cell<TFeatures, TData, unknown>>\n  /**\n   * Returns the leaf rows for the row, not including any parent rows.\n   */\n  getLeafRows: () => Array<Row<TFeatures, TData>>\n  /**\n   * Returns the parent row for the row, if it exists.\n   */\n  getParentRow: () => Row<TFeatures, TData> | undefined\n  /**\n   * Returns the parent rows for the row, all the way up to a root row.\n   */\n  getParentRows: () => Array<Row<TFeatures, TData>>\n  /**\n   * Returns a unique array of values from the row for a given columnId.\n   */\n  getUniqueValues: <TValue>(columnId: string) => Array<TValue>\n  /**\n   * Returns the value from the row for a given columnId.\n   */\n  getValue: <TValue>(columnId: string) => TValue\n  /**\n   * Renders the value for the row in a given columnId the same as `getValue`, but will return the `renderFallbackValue` if no value is found.\n   */\n  renderValue: <TValue>(columnId: string) => TValue\n}\n\nexport interface TableOptions_Rows<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  /**\n   * This optional function is used to derive a unique ID for any given row. If not provided the rows index is used (nested rows join together with `.` using their grandparents' index eg. `index.index.index`). If you need to identify individual rows that are originating from any server-side operations, it's suggested you use this function to return an ID that makes sense regardless of network IO/ambiguity eg. a userId, taskId, database ID field, etc.\n   * @example getRowId: row => row.userId\n   */\n  getRowId?: (\n    originalRow: TData,\n    index: number,\n    parent?: Row<TFeatures, TData>,\n  ) => string\n  /**\n   * This optional function is used to access the sub rows for any given row. If you are using nested rows, you will need to use this function to return the sub rows object (or undefined) from the row.\n   * @example getSubRows: row => row.subRows\n   */\n  getSubRows?: (\n    originalRow: TData,\n    index: number,\n  ) => undefined | ReadonlyArray<TData>\n}\n\nexport interface Table_Rows<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  getRowId: (_: TData, index: number, parent?: Row<TFeatures, TData>) => string\n  /**\n   * Returns the row with the given ID.\n   */\n  getRow: (id: string, searchAll?: boolean) => Row<TFeatures, TData>\n}\n"
  },
  {
    "path": "packages/table-core/src/core/rows/coreRowsFeature.utils.ts",
    "content": "import { flattenBy } from '../../utils'\nimport { constructCell } from '../cells/constructCell'\nimport type { Table_Internal } from '../../types/Table'\nimport type { RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Row } from '../../types/Row'\nimport type { Cell } from '../../types/Cell'\n\nexport function row_getValue<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(row: Row<TFeatures, TData>, columnId: string) {\n  if (row._valuesCache.hasOwnProperty(columnId)) {\n    return row._valuesCache[columnId]\n  }\n\n  const column = row.table.getColumn(columnId)\n\n  if (!column?.accessorFn) {\n    return undefined\n  }\n\n  row._valuesCache[columnId] = column.accessorFn(row.original, row.index)\n\n  return row._valuesCache[columnId]\n}\n\nexport function row_getUniqueValues<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(row: Row<TFeatures, TData>, columnId: string) {\n  if (row._uniqueValuesCache.hasOwnProperty(columnId)) {\n    return row._uniqueValuesCache[columnId]\n  }\n\n  const column = row.table.getColumn(columnId)\n\n  if (!column?.accessorFn) {\n    return undefined\n  }\n\n  if (!column.columnDef.getUniqueValues) {\n    row._uniqueValuesCache[columnId] = [row.getValue(columnId)]\n    return row._uniqueValuesCache[columnId]\n  }\n\n  row._uniqueValuesCache[columnId] = column.columnDef.getUniqueValues(\n    row.original,\n    row.index,\n  )\n\n  return row._uniqueValuesCache[columnId]\n}\n\nexport function row_renderValue<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(row: Row<TFeatures, TData>, columnId: string) {\n  return row.getValue(columnId) ?? row.table.options.renderFallbackValue\n}\n\nexport function row_getLeafRows<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(row: Row<TFeatures, TData>): Array<Row<TFeatures, TData>> {\n  return flattenBy(row.subRows, (d) => d.subRows)\n}\n\nexport function row_getParentRow<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(row: Row<TFeatures, TData>) {\n  return row.parentId ? row.table.getRow(row.parentId, true) : undefined\n}\n\nexport function row_getParentRows<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(row: Row<TFeatures, TData>) {\n  const parentRows: Array<Row<TFeatures, TData>> = []\n  let currentRow = row\n  // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n  while (true) {\n    const parentRow = currentRow.getParentRow()\n    if (!parentRow) break\n    parentRows.push(parentRow)\n    currentRow = parentRow\n  }\n  return parentRows.reverse()\n}\n\nexport function row_getAllCells<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(row: Row<TFeatures, TData>): Array<Cell<TFeatures, TData, unknown>> {\n  return row.table.getAllLeafColumns().map((column) => {\n    return constructCell(column, row, row.table)\n  })\n}\n\nexport function row_getAllCellsByColumnId<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(row: Row<TFeatures, TData>) {\n  return row.getAllCells().reduce(\n    (acc, cell) => {\n      acc[cell.column.id] = cell\n      return acc\n    },\n    {} as Record<string, Cell<TFeatures, TData, unknown>>,\n  )\n}\n\nexport function table_getRowId<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  originalRow: TData,\n  table: Table_Internal<TFeatures, TData>,\n  index: number,\n  parent?: Row<TFeatures, TData>,\n) {\n  return (\n    table.options.getRowId?.(originalRow, index, parent) ??\n    `${parent ? [parent.id, index].join('.') : index}`\n  )\n}\n\nexport function table_getRow<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  table: Table_Internal<TFeatures, TData>,\n  rowId: string,\n  searchAll?: boolean,\n): Row<TFeatures, TData> {\n  // TODO - simplify this across different row models\n  let row = (searchAll ? table.getPrePaginatedRowModel() : table.getRowModel())\n    .rowsById[rowId]\n\n  if (!row) {\n    row = table.getCoreRowModel().rowsById[rowId]\n    if (!row) {\n      if (process.env.NODE_ENV === 'development') {\n        throw new Error(`getRow could not find row with ID: ${rowId}`)\n      }\n      throw new Error()\n    }\n  }\n\n  return row\n}\n"
  },
  {
    "path": "packages/table-core/src/core/table/constructTable.ts",
    "content": "import { createStore } from '@tanstack/store'\nimport { coreFeatures } from '../coreFeatures'\nimport type { Store } from '@tanstack/store'\nimport type { RowData } from '../../types/type-utils'\nimport type { TableFeature, TableFeatures } from '../../types/TableFeatures'\nimport type { Table, Table_Internal } from '../../types/Table'\nimport type { TableOptions } from '../../types/TableOptions'\nimport type { TableState } from '../../types/TableState'\n\nexport function getInitialTableState<TFeatures extends TableFeatures>(\n  features: TFeatures,\n  initialState: Partial<TableState<TFeatures>> | undefined = {},\n): TableState<TFeatures> {\n  Object.values(features).forEach((feature) => {\n    initialState =\n      feature.getInitialState?.(initialState as TableState<TFeatures>) ??\n      initialState\n  })\n  return structuredClone(initialState) as TableState<TFeatures>\n}\n\nexport function createTableStore<TFeatures extends TableFeatures>(\n  features: TFeatures,\n  initialState: Partial<TableState<TFeatures>> | undefined = {},\n): Store<TableState<TFeatures>> {\n  return createStore(getInitialTableState(features, initialState))\n}\n\nexport function constructTable<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(tableOptions: TableOptions<TFeatures, TData>): Table<TFeatures, TData> {\n  const table = {\n    _features: { ...coreFeatures, ...tableOptions._features },\n    _rowModels: {},\n    _rowModelFns: {},\n    get options() {\n      return this.optionsStore.state\n    },\n    set options(value) {\n      this.optionsStore.setState(() => value)\n    },\n  } as Table_Internal<TFeatures, TData>\n\n  const featuresList: Array<TableFeature<{}>> = Object.values(table._features)\n\n  const defaultOptions = featuresList.reduce((obj, feature) => {\n    return Object.assign(obj, feature.getDefaultTableOptions?.(table))\n  }, {}) as TableOptions<TFeatures, TData>\n\n  table.optionsStore = createStore({\n    ...defaultOptions,\n    ...tableOptions,\n  })\n\n  table.initialState = getInitialTableState(\n    table._features,\n    table.options.initialState,\n  )\n\n  table.baseStore = table.options.store ?? createStore(table.initialState)\n\n  table.store = createStore(() => {\n    const state = table.baseStore.state\n    return {\n      ...state,\n      ...(table.optionsStore.state.state ?? {}),\n    }\n  })\n\n  if (\n    process.env.NODE_ENV === 'development' &&\n    (tableOptions.debugAll || tableOptions.debugTable)\n  ) {\n    const features = Object.keys(table._features)\n    const rowModels = Object.keys(table.options._rowModels || {})\n    const states = Object.keys(table.initialState)\n\n    console.log(\n      `Constructing Table Instance\n\n  Features:   ${features.join('\\n              ')}\n\n  Row Models: ${rowModels.length ? rowModels.join('\\n              ') : '(none)'}\n\n  States:     ${states.join('\\n              ')}`,\n    )\n  }\n\n  for (const feature of featuresList) {\n    feature.constructTableAPIs?.(table)\n  }\n\n  return table\n}\n"
  },
  {
    "path": "packages/table-core/src/core/table/coreTablesFeature.ts",
    "content": "import { assignTableAPIs } from '../../utils'\nimport { table_reset, table_setOptions } from './coreTablesFeature.utils'\nimport type { RowData } from '../../types/type-utils'\nimport type { TableFeature, TableFeatures } from '../../types/TableFeatures'\n// import type { TableOptions_Table, Table_Table } from './coreTablesFeature.types'\n\ninterface CoreTablesFeatureConstructors<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  // Table: Table_Table<TFeatures, TData>\n  // TableOptions: TableOptions_Table<TFeatures, TData>\n}\n\nexport function constructCoreTablesFeature<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(): TableFeature<CoreTablesFeatureConstructors<TFeatures, TData>> {\n  return {\n    constructTableAPIs: (table) => {\n      assignTableAPIs('coreTablesFeature', table, {\n        table_reset: {\n          fn: () => table_reset(table),\n        },\n        table_setOptions: {\n          fn: (updater) => table_setOptions(table, updater),\n        },\n      })\n    },\n  }\n}\n\n/**\n * The Core Tables feature provides the core table functionality for handling state and options.\n */\nexport const coreTablesFeature = constructCoreTablesFeature()\n"
  },
  {
    "path": "packages/table-core/src/core/table/coreTablesFeature.types.ts",
    "content": "import type { ReadonlyStore, Store } from '@tanstack/store'\nimport type { CoreFeatures } from '../coreFeatures'\nimport type { RowModelFns } from '../../types/RowModelFns'\nimport type { RowData, Updater } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { CachedRowModels, CreateRowModels_All } from '../../types/RowModel'\nimport type { TableOptions } from '../../types/TableOptions'\nimport type { TableState } from '../../types/TableState'\n\nexport interface TableMeta<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {}\n\nexport interface TableOptions_Table<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  /**\n   * The features that you want to enable for the table.\n   */\n  _features: TFeatures\n  /**\n   * The row model options that you want to enable for the table.\n   */\n  _rowModels?: CreateRowModels_All<TFeatures, TData>\n  /**\n   * Set this option to override any of the `autoReset...` feature options.\n   */\n  autoResetAll?: boolean\n  /**\n   * The data for the table to display. When the `data` option changes reference, the table will reprocess the data.\n   */\n  data: ReadonlyArray<TData>\n  /**\n   * Use this option to optionally pass initial state to the table. This state will be used when resetting various table states either automatically by the table (eg. `options.autoResetPageIndex`) or via functions like `table.resetRowSelection()`. Most reset function allow you optionally pass a flag to reset to a blank/default state instead of the initial state.\n   * Table state will not be reset when this object changes, which also means that the initial state object does not need to be stable.\n   */\n  initialState?: Partial<TableState<TFeatures>>\n  /**\n   * This option is used to optionally implement the merging of table options.\n   */\n  mergeOptions?: (\n    defaultOptions: TableOptions<TFeatures, TData>,\n    options: Partial<TableOptions<TFeatures, TData>>,\n  ) => TableOptions<TFeatures, TData>\n  /**\n   * You can pass any object to `options.meta` and access it anywhere the `table` is available via `table.options.meta`.\n   */\n  meta?: TableMeta<TFeatures, TData>\n  /**\n   * Pass in individual self-managed state to the table.\n   */\n  state?: Partial<TableState<TFeatures>>\n  /**\n   * Optionally, provide your own external TanStack Store instance if you want to manage the table state externally.\n   */\n  store?: Store<TableState<TFeatures>>\n}\n\nexport interface Table_CoreProperties<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  /**\n   * The features that are enabled for the table.\n   */\n  _features: Partial<CoreFeatures> & TFeatures\n  /**\n   * Prototype cache for Cell objects - shared by all cells in this table\n   */\n  _cellPrototype?: object\n  /**\n   * Prototype cache for Column objects - shared by all columns in this table\n   */\n  _columnPrototype?: object\n  /**\n   * Prototype cache for Header objects - shared by all headers in this table\n   */\n  _headerPrototype?: object\n  /**\n   * The row model processing functions that are used to process the data by features.\n   */\n  _rowModelFns: RowModelFns<TFeatures, TData>\n  /**\n   * The row models that are enabled for the table.\n   */\n  _rowModels: CachedRowModels<TFeatures, TData>\n  /**\n   * Prototype cache for Row objects - shared by all rows in this table\n   */\n  _rowPrototype?: object\n  /**\n   * The base store for the table. This can be used to write to the table state.\n   */\n  baseStore: Store<TableState<TFeatures>>\n  /**\n   * The base store for the table options.\n   */\n  optionsStore: Store<TableOptions<TFeatures, TData>>\n  /**\n   * This is the resolved initial state of the table.\n   */\n  initialState: TableState<TFeatures>\n  /**\n   * A read-only reference to the table's current options.\n   */\n  readonly options: TableOptions<TFeatures, TData>\n  /**\n   * Where the table state is stored.\n   */\n  store: ReadonlyStore<TableState<TFeatures>>\n}\n\nexport interface Table_Table<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> extends Table_CoreProperties<TFeatures, TData> {\n  /**\n   * Call this function to reset the table state to the initial state.\n   */\n  reset: () => void\n  /**\n   * This function can be used to update the table options.\n   */\n  setOptions: (newOptions: Updater<TableOptions<TFeatures, TData>>) => void\n}\n"
  },
  {
    "path": "packages/table-core/src/core/table/coreTablesFeature.utils.ts",
    "content": "import { functionalUpdate } from '../../utils'\nimport type { RowData, Updater } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Table_Internal } from '../../types/Table'\nimport type { TableOptions } from '../../types/TableOptions'\n\nexport function table_reset<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>): void {\n  table.baseStore.setState(() => structuredClone(table.initialState))\n}\n\nexport function table_mergeOptions<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  table: Table_Internal<TFeatures, TData>,\n  newOptions: TableOptions<TFeatures, TData>,\n) {\n  if (table.options.mergeOptions) {\n    return table.options.mergeOptions(table.options, newOptions)\n  }\n\n  return {\n    ...table.options,\n    ...newOptions,\n  }\n}\n\nexport function table_setOptions<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  table: Table_Internal<TFeatures, TData>,\n  updater: Updater<TableOptions<TFeatures, TData>>,\n): void {\n  const newOptions = functionalUpdate(updater, table.options)\n  const mergedOptions = table_mergeOptions(table, newOptions)\n  table.optionsStore.setState(() => mergedOptions)\n}\n"
  },
  {
    "path": "packages/table-core/src/features/column-faceting/columnFacetingFeature.ts",
    "content": "import {\n  assignPrototypeAPIs,\n  assignTableAPIs,\n  callMemoOrStaticFn,\n} from '../../utils'\nimport {\n  column_getFacetedMinMaxValues,\n  column_getFacetedRowModel,\n  column_getFacetedUniqueValues,\n  table_getGlobalFacetedMinMaxValues,\n  table_getGlobalFacetedRowModel,\n  table_getGlobalFacetedUniqueValues,\n} from './columnFacetingFeature.utils'\nimport type { RowData } from '../../types/type-utils'\nimport type { TableFeature, TableFeatures } from '../../types/TableFeatures'\nimport type { Column_Internal } from '../../types/Column'\n// import type {\n//   CachedRowModel_Faceted,\n//   Column_ColumnFaceting,\n//   CreateRowModel_Faceted,\n// } from './columnFacetingFeature.types'\n\ninterface ColumnFacetingFeatureConstructors<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  // CachedRowModel: CachedRowModel_Faceted<TFeatures, TData>\n  // Column: Column_ColumnFaceting<TFeatures, TData>\n  // CreateRowModels: CreateRowModel_Faceted<TFeatures, TData>\n}\n\nexport function constructColumnFacetingFeature<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(): TableFeature<ColumnFacetingFeatureConstructors<TFeatures, TData>> {\n  return {\n    assignColumnPrototype: (prototype, table) => {\n      assignPrototypeAPIs('columnFacetingFeature', prototype, table, {\n        column_getFacetedRowModel: {\n          memoDeps: () => [\n            table.getPreFilteredRowModel().rows,\n            table.store.state.columnFilters,\n            table.store.state.globalFilter,\n            table.getFilteredRowModel().rows,\n          ],\n          fn: (column) => column_getFacetedRowModel(column, column.table),\n        },\n        column_getFacetedMinMaxValues: {\n          memoDeps: (column: Column_Internal<TFeatures, TData>) => [\n            callMemoOrStaticFn(\n              column,\n              'getFacetedRowModel',\n              column_getFacetedRowModel,\n              column.table,\n            ).flatRows,\n          ],\n          fn: (column) => column_getFacetedMinMaxValues(column, column.table),\n        },\n        column_getFacetedUniqueValues: {\n          memoDeps: (column: Column_Internal<TFeatures, TData>) => [\n            callMemoOrStaticFn(\n              column,\n              'getFacetedRowModel',\n              column_getFacetedRowModel,\n              column.table,\n            ).flatRows,\n          ],\n          fn: (column) => column_getFacetedUniqueValues(column, column.table),\n        },\n      })\n    },\n\n    constructTableAPIs: (table) => {\n      assignTableAPIs('columnFacetingFeature', table, {\n        table_getGlobalFacetedRowModel: {\n          memoDeps: () => [\n            table.getPreFilteredRowModel().rows,\n            table.store.state.columnFilters,\n            table.store.state.globalFilter,\n            table.getFilteredRowModel().rows,\n          ],\n          fn: () => table_getGlobalFacetedRowModel(table),\n        },\n        table_getGlobalFacetedMinMaxValues: {\n          memoDeps: () => [\n            callMemoOrStaticFn(\n              table,\n              'getGlobalFacetedRowModel',\n              table_getGlobalFacetedRowModel,\n            ).flatRows,\n          ],\n          fn: () => table_getGlobalFacetedMinMaxValues(table),\n        },\n        table_getGlobalFacetedUniqueValues: {\n          memoDeps: () => [\n            callMemoOrStaticFn(\n              table,\n              'getGlobalFacetedRowModel',\n              table_getGlobalFacetedRowModel,\n            ).flatRows,\n          ],\n          fn: () => table_getGlobalFacetedUniqueValues(table),\n        },\n      })\n    },\n  }\n}\n\n/**\n * The Column Faceting feature adds column faceting APIs to the column objects.\n */\nexport const columnFacetingFeature = constructColumnFacetingFeature()\n"
  },
  {
    "path": "packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts",
    "content": "import type { Table } from '../../types/Table'\nimport type { RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { RowModel } from '../../core/row-models/coreRowModelsFeature.types'\n\nexport interface Column_ColumnFaceting<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  /**\n   * A function that **computes and returns** a min/max tuple derived from `column.getFacetedRowModel`. Useful for displaying faceted result values.\n   */\n  getFacetedMinMaxValues: () => undefined | [number, number]\n  /**\n   * A function that **computes and returns** a row model with all other column filters applied, excluding its own filter. Useful for displaying faceted result counts.\n   */\n  getFacetedRowModel: () => RowModel<TFeatures, TData>\n  /**\n   * Returns a `Map` of unique values and their occurrences derived from `column.getFacetedRowModel`. Useful for displaying faceted result values.\n   */\n  getFacetedUniqueValues: () => Map<any, number>\n}\n\nexport interface Table_RowModels_Faceted<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  /**\n   * A function that **computes and returns** a min/max tuple derived from `column.getFacetedRowModel`. Useful for displaying faceted result values.\n   * > ⚠️ Requires that you pass a valid `getFacetedMinMaxValues` function to `options.getFacetedMinMaxValues`. A default implementation is provided via the exported `getFacetedMinMaxValues` function.\n   */\n  getFacetedMinMaxValues: () => undefined | [number, number]\n  /**\n   * Returns the row model with all other column filters applied, excluding its own filter. Useful for displaying faceted result counts.\n   * > ⚠️ Requires that you pass a valid `getFacetedRowModel` function to `options.facetedRowModel`. A default implementation is provided via the exported `getFacetedRowModel` function.\n   */\n  getFacetedRowModel: () => RowModel<TFeatures, TData>\n  /**\n   * A function that **computes and returns** a `Map` of unique values and their occurrences derived from `column.getFacetedRowModel`. Useful for displaying faceted result values.\n   * > ⚠️ Requires that you pass a valid `getFacetedUniqueValues` function to `options.getFacetedUniqueValues`. A default implementation is provided via the exported `getFacetedUniqueValues` function.\n   */\n  getFacetedUniqueValues: () => Map<any, number>\n}\n\nexport interface CreateRowModel_Faceted<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  /**\n   * This function is used to retrieve the faceted min/max values. If using server-side faceting, this function is not required. To use client-side faceting, pass the exported `getFacetedMinMaxValues()` from your adapter to your table or implement your own.\n   */\n  facetedMinMaxValues?: (\n    table: Table<TFeatures, TData>,\n    columnId: string,\n  ) => () => [number, number] | undefined\n  /**\n   * This function is used to retrieve the faceted row model. If using server-side faceting, this function is not required. To use client-side faceting, pass the exported `getFacetedRowModel()` from your adapter to your table or implement your own.\n   */\n  facetedRowModel?: (\n    table: Table<TFeatures, TData>,\n    columnId: string,\n  ) => () => RowModel<TFeatures, TData>\n  /**\n   * This function is used to retrieve the faceted unique values. If using server-side faceting, this function is not required. To use client-side faceting, pass the exported `getFacetedUniqueValues()` from your adapter to your table or implement your own.\n   */\n  facetedUniqueValues?: (\n    table: Table<TFeatures, TData>,\n    columnId: string,\n  ) => () => Map<any, number>\n}\n\nexport interface CachedRowModel_Faceted<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  facetedRowModel?: (columnId: string) => () => RowModel<TFeatures, TData>\n  facetedMinMaxValues?: (columnId: string) => [number, number]\n  facetedUniqueValues?: (columnId: string) => Map<any, number>\n}\n\nexport interface Table_ColumnFaceting<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  /**\n   * Returns the min and max values for the global filter.\n   */\n  getGlobalFacetedMinMaxValues: () => undefined | [number, number]\n  /**\n   * Returns the row model for the table after **global** filtering has been applied.\n   */\n  getGlobalFacetedRowModel: () => RowModel<TFeatures, TData>\n  /**\n   * Returns the faceted unique values for the global filter.\n   */\n  getGlobalFacetedUniqueValues: () => Map<any, number>\n}\n"
  },
  {
    "path": "packages/table-core/src/features/column-faceting/columnFacetingFeature.utils.ts",
    "content": "import type { CellData, RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { RowModel } from '../../core/row-models/coreRowModelsFeature.types'\nimport type { Table_Internal } from '../../types/Table'\nimport type { Column_Internal } from '../../types/Column'\n\nexport function column_getFacetedMinMaxValues<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n>(\n  column: Column_Internal<TFeatures, TData, TValue>,\n  table: Table_Internal<TFeatures, TData>,\n): [number, number] | undefined {\n  const facetedMinMaxValuesFn =\n    table.options._rowModels?.facetedMinMaxValues?.(table, column.id) ??\n    (() => undefined)\n  return facetedMinMaxValuesFn()\n}\n\nexport function column_getFacetedRowModel<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n>(\n  column: Column_Internal<TFeatures, TData, TValue> | undefined,\n  table: Table_Internal<TFeatures, TData>,\n): RowModel<TFeatures, TData> {\n  const facetedRowModelFn =\n    table.options._rowModels?.facetedRowModel?.(table, column?.id ?? '') ??\n    (() => table.getPreFilteredRowModel())\n  return facetedRowModelFn()\n}\n\nexport function column_getFacetedUniqueValues<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n>(\n  column: Column_Internal<TFeatures, TData, TValue>,\n  table: Table_Internal<TFeatures, TData>,\n): Map<any, number> {\n  const facetedUniqueValuesFn =\n    table.options._rowModels?.facetedUniqueValues?.(table, column.id) ??\n    (() => new Map<any, number>())\n  return facetedUniqueValuesFn()\n}\n\nexport function table_getGlobalFacetedMinMaxValues<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>): undefined | [number, number] {\n  const facetedMinMaxValuesFn =\n    table.options._rowModels?.facetedMinMaxValues?.(table, '__global__') ??\n    (() => undefined)\n  return facetedMinMaxValuesFn()\n}\n\nexport function table_getGlobalFacetedRowModel<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>): RowModel<TFeatures, TData> {\n  const facetedRowModelFn =\n    table.options._rowModels?.facetedRowModel?.(table, '__global__') ??\n    (() => table.getPreFilteredRowModel())\n  return facetedRowModelFn()\n}\n\nexport function table_getGlobalFacetedUniqueValues<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>): Map<any, number> {\n  const facetedUniqueValuesFn =\n    table.options._rowModels?.facetedUniqueValues?.(table, '__global__') ??\n    (() => new Map())\n  return facetedUniqueValuesFn()\n}\n"
  },
  {
    "path": "packages/table-core/src/features/column-faceting/createFacetedMinMaxValues.ts",
    "content": "import { callMemoOrStaticFn, tableMemo } from '../../utils'\nimport { column_getFacetedRowModel } from './columnFacetingFeature.utils'\nimport type { Row } from '../../types/Row'\nimport type { Table, Table_Internal } from '../../types/Table'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { RowData } from '../../types/type-utils'\n\nexport function createFacetedMinMaxValues<\n  TFeatures extends TableFeatures,\n  TData extends RowData = any,\n>(): (\n  table: Table<TFeatures, TData>,\n  columnId: string,\n) => () => undefined | [number, number] {\n  return (_table, columnId) => {\n    const table = _table as Table_Internal<TFeatures, TData>\n    return tableMemo({\n      feature: 'columnFacetingFeature',\n      fn: (flatRows) => _createFacetedMinMaxValues(columnId, flatRows),\n      fnName: 'table.getFacetedMinMaxValues',\n      memoDeps: () => {\n        const column = table.getColumn(columnId)\n        if (!column) return [table.getPreFilteredRowModel().flatRows]\n        return [\n          callMemoOrStaticFn(\n            column,\n            'getFacetedRowModel',\n            column_getFacetedRowModel,\n            table,\n          ).flatRows,\n        ]\n      },\n      table,\n    })\n  }\n}\n\nfunction _createFacetedMinMaxValues<\n  TFeatures extends TableFeatures,\n  TData extends RowData = any,\n>(\n  columnId: string,\n  flatRows: Array<Row<TFeatures, TData>>,\n): undefined | [number, number] {\n  if (!flatRows.length) return undefined\n\n  const numericValues = flatRows\n    .map((flatRow) => flatRow.getValue(columnId))\n    .map(Number)\n    .filter((value) => !Number.isNaN(value))\n\n  if (!numericValues.length) return undefined\n\n  let facetedMinValue = numericValues[0]!\n  let facetedMaxValue = numericValues[0]!\n\n  for (const value of numericValues) {\n    if (value < facetedMinValue) facetedMinValue = value\n    if (value > facetedMaxValue) facetedMaxValue = value\n  }\n\n  return [facetedMinValue, facetedMaxValue]\n}\n"
  },
  {
    "path": "packages/table-core/src/features/column-faceting/createFacetedRowModel.ts",
    "content": "import { tableMemo } from '../../utils'\nimport { filterRows } from '../column-filtering/filterRowsUtils'\nimport type { Table, Table_Internal } from '../../types/Table'\nimport type {\n  ColumnFiltersState,\n  Row_ColumnFiltering,\n} from '../column-filtering/columnFilteringFeature.types'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { RowModel } from '../../core/row-models/coreRowModelsFeature.types'\nimport type { Row } from '../../types/Row'\nimport type { RowData } from '../../types/type-utils'\n\nexport function createFacetedRowModel<\n  TFeatures extends TableFeatures,\n  TData extends RowData = any,\n>(): (\n  table: Table<TFeatures, TData>,\n  columnId: string,\n) => () => RowModel<TFeatures, TData> {\n  return (_table, columnId) => {\n    const table = _table as Table_Internal<TFeatures, TData>\n    return tableMemo({\n      feature: 'columnFacetingFeature',\n      table,\n      fnName: 'createFacetedRowModel',\n      memoDeps: () => [\n        table.getPreFilteredRowModel(),\n        table.store.state.columnFilters,\n        table.store.state.globalFilter,\n        table.getFilteredRowModel(),\n      ],\n      fn: (preRowModel, columnFilters, globalFilter) =>\n        _createFacetedRowModel(\n          table,\n          columnId,\n          preRowModel,\n          columnFilters,\n          globalFilter,\n        ),\n    })\n  }\n}\n\nfunction _createFacetedRowModel<\n  TFeatures extends TableFeatures,\n  TData extends RowData = any,\n>(\n  table: Table_Internal<TFeatures, TData>,\n  columnId: string,\n  preRowModel: RowModel<TFeatures, TData>,\n  columnFilters?: ColumnFiltersState,\n  globalFilter?: string,\n) {\n  if (!preRowModel.rows.length || (!columnFilters?.length && !globalFilter)) {\n    return preRowModel\n  }\n\n  const filterableIds = [\n    ...(columnFilters?.map((d) => d.id).filter((d) => d !== columnId) ?? []),\n    globalFilter ? '__global__' : undefined,\n  ].filter(Boolean) as Array<string>\n\n  const filterRowsImpl = (\n    row: Row<TFeatures, TData> & Partial<Row_ColumnFiltering<TFeatures, TData>>,\n  ) => {\n    // Horizontally filter rows through each column\n    for (const colId of filterableIds) {\n      if (row.columnFilters?.[colId] === false) {\n        return false\n      }\n    }\n    return true\n  }\n\n  return filterRows(preRowModel.rows, filterRowsImpl, table)\n}\n"
  },
  {
    "path": "packages/table-core/src/features/column-faceting/createFacetedUniqueValues.ts",
    "content": "import { callMemoOrStaticFn, tableMemo } from '../../utils'\nimport { column_getFacetedRowModel } from './columnFacetingFeature.utils'\nimport type { Row } from '../../types/Row'\nimport type { Table, Table_Internal } from '../../types/Table'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { RowData } from '../../types/type-utils'\n\nexport function createFacetedUniqueValues<\n  TFeatures extends TableFeatures,\n  TData extends RowData = any,\n>(): (\n  table: Table<TFeatures, TData>,\n  columnId: string,\n) => () => Map<any, number> {\n  return (_table, columnId) => {\n    const table = _table as Table_Internal<TFeatures, TData>\n    return tableMemo({\n      feature: 'columnFacetingFeature',\n      table,\n      fnName: 'table.getFacetedUniqueValues',\n      memoDeps: () => {\n        const column = table.getColumn(columnId)\n        if (!column) return [table.getPreFilteredRowModel().flatRows]\n        return [\n          callMemoOrStaticFn(\n            column,\n            'getFacetedRowModel',\n            column_getFacetedRowModel,\n            table,\n          ).flatRows,\n        ]\n      },\n      fn: (flatRows) => _createFacetedUniqueValues(columnId, flatRows),\n    })\n  }\n}\n\nfunction _createFacetedUniqueValues<\n  TFeatures extends TableFeatures,\n  TData extends RowData = any,\n>(columnId: string, flatRows: Array<Row<TFeatures, TData>>): Map<any, number> {\n  const facetedUniqueValues = new Map<any, number>()\n\n  for (const row of flatRows) {\n    const values = row.getUniqueValues(columnId)\n\n    for (const value of values) {\n      if (facetedUniqueValues.has(value)) {\n        facetedUniqueValues.set(\n          value,\n          (facetedUniqueValues.get(value) ?? 0) + 1,\n        )\n      } else {\n        facetedUniqueValues.set(value, 1)\n      }\n    }\n  }\n\n  return facetedUniqueValues\n}\n"
  },
  {
    "path": "packages/table-core/src/features/column-filtering/columnFilteringFeature.ts",
    "content": "import {\n  assignPrototypeAPIs,\n  assignTableAPIs,\n  makeStateUpdater,\n} from '../../utils'\nimport {\n  column_getAutoFilterFn,\n  column_getCanFilter,\n  column_getFilterFn,\n  column_getFilterIndex,\n  column_getFilterValue,\n  column_getIsFiltered,\n  column_setFilterValue,\n  getDefaultColumnFiltersState,\n  table_resetColumnFilters,\n  table_setColumnFilters,\n} from './columnFilteringFeature.utils'\nimport type { RowData } from '../../types/type-utils'\nimport type { TableFeature, TableFeatures } from '../../types/TableFeatures'\n// import type {\n//   CachedRowModel_Filtered,\n//   ColumnDef_ColumnFiltering,\n//   Column_ColumnFiltering,\n//   CreateRowModel_Filtered,\n//   RowModelFns_ColumnFiltering,\n//   Row_ColumnFiltering,\n//   TableOptions_ColumnFiltering,\n//   TableState_ColumnFiltering,\n//   Table_ColumnFiltering,\n// } from './columnFilteringFeature.types'\n\ninterface ColumnFilteringFeatureConstructors<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  // CachedRowModel: CachedRowModel_Filtered<TFeatures, TData>\n  // Column: Column_ColumnFiltering<TFeatures, TData>\n  // ColumnDef: ColumnDef_ColumnFiltering<TFeatures, TData>\n  // CreateRowModels: CreateRowModel_Filtered<TFeatures, TData>\n  // Row: Row_ColumnFiltering<TFeatures, TData>\n  // RowModelFns: RowModelFns_ColumnFiltering<TFeatures, TData>\n  // Table: Table_ColumnFiltering<TFeatures, TData>\n  // TableOptions: TableOptions_ColumnFiltering<TFeatures, TData>\n  // TableState: TableState_ColumnFiltering\n}\n\nexport function constructColumnFilteringFeature<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(): TableFeature<ColumnFilteringFeatureConstructors<TFeatures, TData>> {\n  return {\n    getInitialState: (initialState) => {\n      return {\n        columnFilters: getDefaultColumnFiltersState(),\n        ...initialState,\n      }\n    },\n\n    getDefaultColumnDef: () => {\n      return {\n        filterFn: 'auto',\n      }\n    },\n\n    getDefaultTableOptions: (table) => {\n      return {\n        onColumnFiltersChange: makeStateUpdater('columnFilters', table),\n        filterFromLeafRows: false,\n        maxLeafRowFilterDepth: 100,\n      }\n    },\n\n    assignColumnPrototype: (prototype, table) => {\n      assignPrototypeAPIs('columnFilteringFeature', prototype, table, {\n        column_getAutoFilterFn: {\n          fn: (column) => column_getAutoFilterFn(column),\n        },\n        column_getFilterFn: {\n          fn: (column) => column_getFilterFn(column),\n        },\n        column_getCanFilter: {\n          fn: (column) => column_getCanFilter(column),\n        },\n        column_getIsFiltered: {\n          fn: (column) => column_getIsFiltered(column),\n        },\n        column_getFilterValue: {\n          fn: (column) => column_getFilterValue(column),\n        },\n        column_getFilterIndex: {\n          fn: (column) => column_getFilterIndex(column),\n        },\n        column_setFilterValue: {\n          fn: (column, value) => column_setFilterValue(column, value),\n        },\n      })\n    },\n\n    initRowInstanceData: (row) => {\n      ;(row as any).columnFilters = {}\n      ;(row as any).columnFiltersMeta = {}\n    },\n\n    constructTableAPIs: (table) => {\n      assignTableAPIs('columnFilteringFeature', table, {\n        table_setColumnFilters: {\n          fn: (updater) => table_setColumnFilters(table, updater),\n        },\n        table_resetColumnFilters: {\n          fn: (defaultState) => table_resetColumnFilters(table, defaultState),\n        },\n      })\n    },\n  }\n}\n\n/**\n * The Column Filtering feature adds column filtering state and APIs to the table, row, and column objects.\n * **Note:** This does not include Global Filtering. The globalFilteringFeature feature has been split out into its own standalone feature.\n */\nexport const columnFilteringFeature = constructColumnFilteringFeature()\n"
  },
  {
    "path": "packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts",
    "content": "import type { Table } from '../../types/Table'\nimport type { BuiltInFilterFn } from '../../fns/filterFns'\nimport type {\n  CellData,\n  OnChangeFn,\n  RowData,\n  Updater,\n} from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { RowModel } from '../../core/row-models/coreRowModelsFeature.types'\nimport type { Row } from '../../types/Row'\nimport type { Column } from '../../types/Column'\n\nexport interface FilterMeta {}\n\nexport interface FilterFns {}\n\nexport interface TableState_ColumnFiltering {\n  columnFilters: ColumnFiltersState\n}\n\nexport type ColumnFiltersState = Array<ColumnFilter>\n\nexport interface ColumnFilter {\n  id: string\n  value: unknown\n}\n\nexport interface ResolvedColumnFilter<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  filterFn: FilterFn<TFeatures, TData>\n  id: string\n  resolvedValue: unknown\n}\n\nexport interface RowModelFns_ColumnFiltering<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  filterFns: Record<keyof FilterFns, FilterFn<TFeatures, TData>>\n}\n\nexport interface FilterFn<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  (\n    row: Row<TFeatures, TData>,\n    columnId: string,\n    filterValue: any,\n    addMeta?: (meta: FilterMeta) => void,\n  ): boolean\n  autoRemove?: ColumnFilterAutoRemoveTestFn<TFeatures, TData>\n  resolveFilterValue?: TransformFilterValueFn<TFeatures, TData>\n}\n\nexport type TransformFilterValueFn<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n> = (value: any, column?: Column<TFeatures, TData, TValue>) => TValue\n\nexport type ColumnFilterAutoRemoveTestFn<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n> = (value: any, column?: Column<TFeatures, TData, TValue>) => boolean\n\nexport type CustomFilterFns<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> = Record<string, FilterFn<TFeatures, TData>>\n\nexport type FilterFnOption<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> = 'auto' | BuiltInFilterFn | keyof FilterFns | FilterFn<TFeatures, TData>\n\nexport interface ColumnDef_ColumnFiltering<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  /**\n   * Enables/disables the **column** filter for this column.\n   */\n  enableColumnFilter?: boolean\n  /**\n   * The filter function to use with this column. Can be the name of a built-in filter function or a custom filter function.\n   */\n  filterFn?: FilterFnOption<TFeatures, TData>\n}\n\nexport interface Column_ColumnFiltering<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  /**\n   * Returns an automatically calculated filter function for the column based off of the columns first known value.\n   */\n  getAutoFilterFn: () => FilterFn<TFeatures, TData>\n  /**\n   * Returns whether or not the column can be **column** filtered.\n   */\n  getCanFilter: () => boolean\n  /**\n   * Returns the filter function (either user-defined or automatic, depending on configuration) for the columnId specified.\n   */\n  getFilterFn: () => FilterFn<TFeatures, TData>\n  /**\n   * Returns the index (including `-1`) of the column filter in the table's `state.columnFilters` array.\n   */\n  getFilterIndex: () => number\n  /**\n   * Returns the current filter value for the column.\n   */\n  getFilterValue: () => unknown\n  /**\n   * Returns whether or not the column is currently filtered.\n   */\n  getIsFiltered: () => boolean\n  /**\n   * A function that sets the current filter value for the column. You can pass it a value or an updater function for immutability-safe operations on existing values.\n   */\n  setFilterValue: (updater: Updater<any>) => void\n}\n\nexport interface Row_ColumnFiltering<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  /**\n   * The column filters map for the row. This object tracks whether a row is passing/failing specific filters by their column ID.\n   */\n  columnFilters: Record<string, boolean>\n  /**\n   * The column filters meta map for the row. This object tracks any filter meta for a row as optionally provided during the filtering process.\n   */\n  columnFiltersMeta: Record<string, FilterMeta>\n}\n\nexport interface TableOptions_ColumnFiltering<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  /**\n   * Enables/disables **column** filtering for all columns.\n   */\n  enableColumnFilters?: boolean\n  /**\n   * Enables/disables all filtering for the table.\n   */\n  enableFilters?: boolean\n  /**\n   * By default, filtering is done from parent rows down (so if a parent row is filtered out, all of its children will be filtered out as well). Setting this option to `true` will cause filtering to be done from leaf rows up (which means parent rows will be included so long as one of their child or grand-child rows is also included).\n   */\n  filterFromLeafRows?: boolean\n  /**\n   * Disables the `getFilteredRowModel` from being used to filter data. This may be useful if your table needs to dynamically support both client-side and server-side filtering.\n   */\n  manualFiltering?: boolean\n  /**\n     * By default, filtering is done for all rows (max depth of 100), no matter if they are root level parent rows or the child leaf rows of a parent row. Setting this option to `0` will cause filtering to only be applied to the root level parent rows, with all sub-rows remaining unfiltered. Similarly, setting this option to `1` will cause filtering to only be applied to child leaf rows 1 level deep, and so on.\n\n     * This is useful for situations where you want a row's entire child hierarchy to be visible regardless of the applied filter.\n     */\n  maxLeafRowFilterDepth?: number\n  /**\n   * If provided, this function will be called with an `updaterFn` when `state.columnFilters` changes. This overrides the default internal state management, so you will need to persist the state change either fully or partially outside of the table.\n   */\n  onColumnFiltersChange?: OnChangeFn<ColumnFiltersState>\n}\n\nexport interface Table_ColumnFiltering {\n  /**\n   * Resets the **columnFilters** state to `initialState.columnFilters`, or `true` can be passed to force a default blank state reset to `[]`.\n   */\n  resetColumnFilters: (defaultState?: boolean) => void\n  /**\n   * Sets or updates the `state.columnFilters` state.\n   */\n  setColumnFilters: (updater: Updater<ColumnFiltersState>) => void\n}\n\nexport interface Table_RowModels_Filtered<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  /**\n   * Returns the row model for the table after **column** filtering has been applied.\n   */\n  getFilteredRowModel: () => RowModel<TFeatures, TData>\n  /**\n   * Returns the row model for the table before any **column** filtering has been applied.\n   */\n  getPreFilteredRowModel: () => RowModel<TFeatures, TData>\n}\n\nexport interface CreateRowModel_Filtered<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  /**\n   * If provided, this function is called **once** per table and should return a **new function** which will calculate and return the row model for the table when it's filtered.\n   * - For server-side filtering, this function is unnecessary and can be ignored since the server should already return the filtered row model.\n   * - For client-side filtering, this function is required. A default implementation is provided via any table adapter's `{ getFilteredRowModel }` export.\n   */\n  filteredRowModel?: (\n    table: Table<TFeatures, TData>,\n  ) => () => RowModel<TFeatures, TData>\n}\n\nexport interface CachedRowModel_Filtered<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  filteredRowModel: () => RowModel<TFeatures, TData>\n}\n"
  },
  {
    "path": "packages/table-core/src/features/column-filtering/columnFilteringFeature.utils.ts",
    "content": "import { functionalUpdate, isFunction } from '../../utils'\nimport type { CellData, RowData, Updater } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Table_Internal } from '../../types/Table'\nimport type { Column_Internal } from '../../types/Column'\nimport type {\n  ColumnFiltersState,\n  FilterFn,\n} from './columnFilteringFeature.types'\n\nexport function getDefaultColumnFiltersState(): ColumnFiltersState {\n  return structuredClone([])\n}\n\nexport function column_getAutoFilterFn<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n>(column: Column_Internal<TFeatures, TData, TValue>) {\n  const filterFns = column.table._rowModelFns.filterFns as\n    | Record<string, FilterFn<TFeatures, TData>>\n    | undefined\n\n  const firstRow = column.table.getCoreRowModel().flatRows[0]\n\n  const value = firstRow ? firstRow.getValue(column.id) : undefined\n\n  if (typeof value === 'string') {\n    return filterFns?.includesString\n  }\n\n  if (typeof value === 'number') {\n    return filterFns?.inNumberRange\n  }\n\n  if (typeof value === 'boolean') {\n    return filterFns?.equals\n  }\n\n  if (value !== null && typeof value === 'object') {\n    return filterFns?.equals\n  }\n\n  if (Array.isArray(value)) {\n    return filterFns?.arrIncludes\n  }\n\n  return filterFns?.weakEquals\n}\n\nexport function column_getFilterFn<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n>(\n  column: Column_Internal<TFeatures, TData, TValue>,\n): FilterFn<TFeatures, TData> | undefined {\n  let filterFn = null\n  const filterFns = column.table._rowModelFns.filterFns as\n    | Record<string, FilterFn<TFeatures, TData>>\n    | undefined\n  filterFn = isFunction(column.columnDef.filterFn)\n    ? column.columnDef.filterFn\n    : column.columnDef.filterFn === 'auto'\n      ? column_getAutoFilterFn(column)\n      : filterFns?.[column.columnDef.filterFn as string]\n\n  if (process.env.NODE_ENV === 'development' && !filterFn) {\n    console.warn(\n      `Could not find a valid 'column.filterFn' for column with the ID: ${column.id}.`,\n    )\n  }\n\n  return filterFn\n}\n\nexport function column_getCanFilter<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n>(column: Column_Internal<TFeatures, TData, TValue>) {\n  return (\n    (column.columnDef.enableColumnFilter ?? true) &&\n    (column.table.options.enableColumnFilters ?? true) &&\n    (column.table.options.enableFilters ?? true) &&\n    !!column.accessorFn\n  )\n}\n\nexport function column_getIsFiltered<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n>(column: Column_Internal<TFeatures, TData, TValue>) {\n  return column_getFilterIndex(column) > -1\n}\n\nexport function column_getFilterValue<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n>(column: Column_Internal<TFeatures, TData, TValue>) {\n  return column.table.store.state.columnFilters?.find((d) => d.id === column.id)\n    ?.value\n}\n\nexport function column_getFilterIndex<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n>(column: Column_Internal<TFeatures, TData, TValue>): number {\n  return (\n    column.table.store.state.columnFilters?.findIndex(\n      (d) => d.id === column.id,\n    ) ?? -1\n  )\n}\n\nexport function column_setFilterValue<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n>(column: Column_Internal<TFeatures, TData, TValue>, value: any) {\n  table_setColumnFilters(column.table, (old) => {\n    const filterFn = column_getFilterFn(column)\n    const previousFilter = old.find((d) => d.id === column.id)\n\n    const newFilter = functionalUpdate(\n      value,\n      previousFilter ? previousFilter.value : undefined,\n    )\n\n    if (shouldAutoRemoveFilter(filterFn, newFilter, column)) {\n      return old.filter((d) => d.id !== column.id)\n    }\n\n    const newFilterObj = { id: column.id, value: newFilter }\n\n    if (previousFilter) {\n      return old.map((d) => {\n        if (d.id === column.id) {\n          return newFilterObj\n        }\n        return d\n      })\n    }\n\n    if (old.length) {\n      return [...old, newFilterObj]\n    }\n\n    return [newFilterObj]\n  })\n}\n\nexport function table_setColumnFilters<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  table: Table_Internal<TFeatures, TData>,\n  updater: Updater<ColumnFiltersState>,\n) {\n  const leafColumns = table.getAllLeafColumns()\n\n  const updateFn = (old: ColumnFiltersState) => {\n    return functionalUpdate(updater, old).filter((filter) => {\n      const column = leafColumns.find((d) => d.id === filter.id)\n\n      if (column) {\n        const filterFn = column_getFilterFn(column)\n\n        if (shouldAutoRemoveFilter(filterFn, filter.value, column)) {\n          return false\n        }\n      }\n\n      return true\n    })\n  }\n\n  table.options.onColumnFiltersChange?.(updateFn)\n}\n\nexport function table_resetColumnFilters<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>, defaultState?: boolean) {\n  table_setColumnFilters(\n    table,\n    defaultState ? [] : (table.initialState.columnFilters ?? []),\n  )\n}\n\nexport function shouldAutoRemoveFilter<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n>(\n  filterFn?: FilterFn<TFeatures, TData>,\n  value?: any,\n  column?: Column_Internal<TFeatures, TData, TValue>,\n) {\n  return (\n    (filterFn && filterFn.autoRemove\n      ? filterFn.autoRemove(\n          value,\n          column as Column_Internal<TFeatures, TData, unknown>,\n        )\n      : false) ||\n    typeof value === 'undefined' ||\n    (typeof value === 'string' && !value)\n  )\n}\n"
  },
  {
    "path": "packages/table-core/src/features/column-filtering/createFilteredRowModel.ts",
    "content": "import { tableMemo } from '../../utils'\nimport { table_getColumn } from '../../core/columns/coreColumnsFeature.utils'\nimport {\n  column_getCanGlobalFilter,\n  table_getGlobalFilterFn,\n} from '../global-filtering/globalFilteringFeature.utils'\nimport { table_autoResetPageIndex } from '../row-pagination/rowPaginationFeature.utils'\nimport { filterRows } from './filterRowsUtils'\nimport { column_getFilterFn } from './columnFilteringFeature.utils'\nimport type { RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { RowModel } from '../../core/row-models/coreRowModelsFeature.types'\nimport type { Table, Table_Internal } from '../../types/Table'\nimport type { Row } from '../../types/Row'\nimport type {\n  FilterFn,\n  FilterFns,\n  ResolvedColumnFilter,\n  Row_ColumnFiltering,\n} from './columnFilteringFeature.types'\n\nexport function createFilteredRowModel<\n  TFeatures extends TableFeatures,\n  TData extends RowData = any,\n>(\n  filterFns: Record<keyof FilterFns, FilterFn<TFeatures, TData>>,\n): (table: Table<TFeatures, TData>) => () => RowModel<TFeatures, TData> {\n  return (_table) => {\n    const table = _table as Table_Internal<TFeatures, TData>\n    if (!table._rowModelFns.filterFns) table._rowModelFns.filterFns = filterFns\n    return tableMemo({\n      feature: 'columnFilteringFeature',\n      table,\n      fnName: 'table.getFilteredRowModel',\n      memoDeps: () => [\n        table.getPreFilteredRowModel(),\n        table.store.state.columnFilters,\n        table.store.state.globalFilter,\n      ],\n      fn: () => _createFilteredRowModel(table),\n      onAfterUpdate: () => table_autoResetPageIndex(table),\n    })\n  }\n}\n\nfunction _createFilteredRowModel<\n  TFeatures extends TableFeatures,\n  TData extends RowData = any,\n>(table: Table_Internal<TFeatures, TData>): RowModel<TFeatures, TData> {\n  const rowModel = table.getPreFilteredRowModel()\n  const { columnFilters, globalFilter } = table.store.state\n\n  if (!rowModel.rows.length || (!columnFilters?.length && !globalFilter)) {\n    for (const row of rowModel.flatRows as Array<\n      Row<TFeatures, TData> & Partial<Row_ColumnFiltering<TFeatures, TData>>\n    >) {\n      row.columnFilters = {}\n      row.columnFiltersMeta = {}\n    }\n    return rowModel\n  }\n\n  const resolvedColumnFilters: Array<ResolvedColumnFilter<TFeatures, TData>> =\n    []\n  const resolvedGlobalFilters: Array<ResolvedColumnFilter<TFeatures, TData>> =\n    []\n\n  columnFilters?.forEach((columnFilter) => {\n    const column = table_getColumn(table, columnFilter.id)\n\n    if (!column) {\n      return\n    }\n\n    const filterFn = column_getFilterFn(column)!\n\n    resolvedColumnFilters.push({\n      id: columnFilter.id,\n      filterFn,\n      resolvedValue:\n        filterFn.resolveFilterValue?.(columnFilter.value) ?? columnFilter.value,\n    })\n  })\n\n  const filterableIds = columnFilters?.map((d) => d.id) ?? []\n\n  const globalFilterFn = table_getGlobalFilterFn(table)\n\n  const globallyFilterableColumns = table\n    .getAllLeafColumns()\n    .filter((column) => column_getCanGlobalFilter(column))\n\n  if (globalFilter && globalFilterFn && globallyFilterableColumns.length) {\n    filterableIds.push('__global__')\n\n    globallyFilterableColumns.forEach((column) => {\n      resolvedGlobalFilters.push({\n        id: column.id,\n        filterFn: globalFilterFn,\n        resolvedValue:\n          globalFilterFn.resolveFilterValue?.(globalFilter) ?? globalFilter,\n      })\n    })\n  }\n\n  // Flag the pre-filtered row model with each filter state\n  for (const row of rowModel.flatRows as Array<\n    Row<TFeatures, TData> & Partial<Row_ColumnFiltering<TFeatures, TData>>\n  >) {\n    row.columnFilters = {}\n\n    if (resolvedColumnFilters.length) {\n      for (const currentColumnFilter of resolvedColumnFilters) {\n        const id = currentColumnFilter.id\n\n        // Tag the row with the column filter state\n        row.columnFilters[id] = currentColumnFilter.filterFn(\n          row,\n          id,\n          currentColumnFilter.resolvedValue,\n          (filterMeta) => {\n            !row.columnFiltersMeta\n              ? (row.columnFiltersMeta = {})\n              : (row.columnFiltersMeta[id] = filterMeta)\n          },\n        )\n      }\n    }\n\n    if (resolvedGlobalFilters.length) {\n      for (const currentGlobalFilter of resolvedGlobalFilters) {\n        const id = currentGlobalFilter.id\n        // Tag the row with the first truthy global filter state\n        if (\n          currentGlobalFilter.filterFn(\n            row,\n            id,\n            currentGlobalFilter.resolvedValue,\n            (filterMeta) => {\n              !row.columnFiltersMeta\n                ? (row.columnFiltersMeta = {})\n                : (row.columnFiltersMeta[id] = filterMeta)\n            },\n          )\n        ) {\n          row.columnFilters.__global__ = true\n          break\n        }\n      }\n\n      if (row.columnFilters.__global__ !== true) {\n        row.columnFilters.__global__ = false\n      }\n    }\n  }\n\n  const filterRowsImpl = (\n    row: Row<TFeatures, TData> & Row_ColumnFiltering<TFeatures, TData>,\n  ) => {\n    // Horizontally filter rows through each column\n    for (const columnId of filterableIds) {\n      if (row.columnFilters[columnId] === false) {\n        return false\n      }\n    }\n    return true\n  }\n\n  // Filter final rows using all of the active filters\n  return filterRows(rowModel.rows, filterRowsImpl as any, table)\n}\n"
  },
  {
    "path": "packages/table-core/src/features/column-filtering/filterRowsUtils.ts",
    "content": "import { constructRow } from '../../core/rows/constructRow'\nimport type { Row_ColumnFiltering } from './columnFilteringFeature.types'\nimport type { RowModel } from '../../core/row-models/coreRowModelsFeature.types'\nimport type { Row } from '../../types/Row'\nimport type { Table_Internal } from '../../types/Table'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { RowData } from '../../types/type-utils'\n\nexport function filterRows<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  rows: Array<Row<TFeatures, TData>>,\n  filterRowImpl: (row: Row<TFeatures, TData>) => any,\n  table: Table_Internal<TFeatures, TData>,\n) {\n  if (table.options.filterFromLeafRows) {\n    return filterRowModelFromLeafs(rows, filterRowImpl, table)\n  }\n\n  return filterRowModelFromRoot(rows, filterRowImpl, table)\n}\n\nfunction filterRowModelFromLeafs<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  rowsToFilter: Array<Row<TFeatures, TData>>,\n  filterRow: (\n    row: Row<TFeatures, TData>,\n  ) => Array<Row<TFeatures, TData>> | undefined,\n  table: Table_Internal<TFeatures, TData>,\n): RowModel<TFeatures, TData> {\n  const newFilteredFlatRows: Array<Row<TFeatures, TData>> = []\n  const newFilteredRowsById: Record<string, Row<TFeatures, TData>> = {}\n  const maxDepth = table.options.maxLeafRowFilterDepth ?? 100\n\n  const recurseFilterRows = (\n    rowsToFilter: Array<\n      Row<TFeatures, TData> & Partial<Row_ColumnFiltering<TFeatures, TData>>\n    >,\n    depth = 0,\n  ) => {\n    const filteredRows: Array<Row<TFeatures, TData>> &\n      Partial<Row_ColumnFiltering<TFeatures, TData>> = []\n\n    // Filter from children up first\n    for (let row of rowsToFilter) {\n      const newRow = constructRow(\n        table,\n        row.id,\n        row.original,\n        row.index,\n        row.depth,\n        undefined,\n        row.parentId,\n      ) as Row<TFeatures, TData> &\n        Partial<Row_ColumnFiltering<TFeatures, TData>>\n      newRow.columnFilters = row.columnFilters\n\n      if (row.subRows.length && depth < maxDepth) {\n        newRow.subRows = recurseFilterRows(row.subRows, depth + 1)\n        row = newRow\n\n        if (filterRow(row) && !newRow.subRows.length) {\n          filteredRows.push(row)\n          newFilteredRowsById[row.id] = row\n          newFilteredFlatRows.push(row)\n          continue\n        }\n\n        if (filterRow(row) || newRow.subRows.length) {\n          filteredRows.push(row)\n          newFilteredRowsById[row.id] = row\n          newFilteredFlatRows.push(row)\n          continue\n        }\n      } else {\n        row = newRow\n        if (filterRow(row)) {\n          filteredRows.push(row)\n          newFilteredRowsById[row.id] = row\n          newFilteredFlatRows.push(row)\n        }\n      }\n    }\n\n    return filteredRows\n  }\n\n  return {\n    rows: recurseFilterRows(rowsToFilter),\n    flatRows: newFilteredFlatRows,\n    rowsById: newFilteredRowsById,\n  }\n}\n\nfunction filterRowModelFromRoot<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  rowsToFilter: Array<Row<TFeatures, TData>>,\n  filterRow: (row: Row<TFeatures, TData>) => any,\n  table: Table_Internal<TFeatures, TData>,\n): RowModel<TFeatures, TData> {\n  const newFilteredFlatRows: Array<Row<TFeatures, TData>> = []\n  const newFilteredRowsById: Record<string, Row<TFeatures, TData>> = {}\n  const maxDepth = table.options.maxLeafRowFilterDepth ?? 100\n\n  // Filters top level and nested rows\n  const recurseFilterRows = (\n    rowsToFilter: Array<Row<TFeatures, TData>>,\n    depth = 0,\n  ) => {\n    // Filter from parents downward first\n\n    const filteredRows: Array<Row<TFeatures, TData>> = []\n\n    // Apply the filter to any subRows\n    for (let row of rowsToFilter) {\n      const pass = filterRow(row)\n\n      if (pass) {\n        if (row.subRows.length && depth < maxDepth) {\n          const newRow = constructRow(\n            table,\n            row.id,\n            row.original,\n            row.index,\n            row.depth,\n            undefined,\n            row.parentId,\n          )\n          newRow.subRows = recurseFilterRows(row.subRows, depth + 1)\n          row = newRow\n        }\n\n        filteredRows.push(row)\n        newFilteredFlatRows.push(row)\n        newFilteredRowsById[row.id] = row\n      }\n    }\n\n    return filteredRows\n  }\n\n  return {\n    rows: recurseFilterRows(rowsToFilter),\n    flatRows: newFilteredFlatRows,\n    rowsById: newFilteredRowsById,\n  }\n}\n"
  },
  {
    "path": "packages/table-core/src/features/column-grouping/columnGroupingFeature.ts",
    "content": "import {\n  assignPrototypeAPIs,\n  assignTableAPIs,\n  makeStateUpdater,\n} from '../../utils'\nimport {\n  cell_getIsAggregated,\n  cell_getIsGrouped,\n  cell_getIsPlaceholder,\n  column_getAggregationFn,\n  column_getAutoAggregationFn,\n  column_getCanGroup,\n  column_getGroupedIndex,\n  column_getIsGrouped,\n  column_getToggleGroupingHandler,\n  column_toggleGrouping,\n  getDefaultGroupingState,\n  row_getGroupingValue,\n  row_getIsGrouped,\n  table_resetGrouping,\n  table_setGrouping,\n} from './columnGroupingFeature.utils'\nimport type { RowData } from '../../types/type-utils'\nimport type { TableFeature, TableFeatures } from '../../types/TableFeatures'\n// import type {\n//   CachedRowModel_Grouped,\n//   Cell_ColumnGrouping,\n//   ColumnDef_ColumnGrouping,\n//   Column_ColumnGrouping,\n//   CreateRowModel_Grouped,\n//   RowModelFns_ColumnGrouping,\n//   Row_ColumnGrouping,\n//   TableOptions_ColumnGrouping,\n//   TableState_ColumnGrouping,\n//   Table_ColumnGrouping,\n// } from './columnGroupingFeature.types'\n\ninterface ColumnGroupingFeatureConstructors<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  // CachedRowModel: CachedRowModel_Grouped<TFeatures, TData>\n  // Cell: Cell_ColumnGrouping\n  // Column: Column_ColumnGrouping<TFeatures, TData>\n  // ColumnDef: ColumnDef_ColumnGrouping<TFeatures, TData>\n  // CreateRowModels: CreateRowModel_Grouped<TFeatures, TData>\n  // Row: Row_ColumnGrouping\n  // RowModelFns: RowModelFns_ColumnGrouping<TFeatures, TData>\n  // Table: Table_ColumnGrouping<TFeatures, TData>\n  // TableOptions: TableOptions_ColumnGrouping\n  // TableState: TableState_ColumnGrouping\n}\n\nexport function constructColumnGroupingFeature<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(): TableFeature<ColumnGroupingFeatureConstructors<TFeatures, TData>> {\n  return {\n    getInitialState: (initialState) => {\n      return {\n        grouping: getDefaultGroupingState(),\n        ...initialState,\n      }\n    },\n\n    getDefaultColumnDef: () => {\n      return {\n        aggregatedCell: ({ getValue }: any) => getValue()?.toString?.() ?? null,\n        aggregationFn: 'auto',\n      }\n    },\n\n    getDefaultTableOptions: (table) => {\n      return {\n        onGroupingChange: makeStateUpdater('grouping', table),\n        groupedColumnMode: 'reorder',\n      }\n    },\n\n    assignCellPrototype: (prototype, table) => {\n      assignPrototypeAPIs('columnGroupingFeature', prototype, table, {\n        cell_getIsGrouped: {\n          fn: (cell) => cell_getIsGrouped(cell),\n        },\n        cell_getIsPlaceholder: {\n          fn: (cell) => cell_getIsPlaceholder(cell),\n        },\n        cell_getIsAggregated: {\n          fn: (cell) => cell_getIsAggregated(cell),\n        },\n      })\n    },\n\n    assignColumnPrototype: (prototype, table) => {\n      assignPrototypeAPIs('columnGroupingFeature', prototype, table, {\n        column_toggleGrouping: {\n          fn: (column) => column_toggleGrouping(column),\n        },\n        column_getCanGroup: {\n          fn: (column) => column_getCanGroup(column),\n        },\n        column_getIsGrouped: {\n          fn: (column) => column_getIsGrouped(column),\n        },\n        column_getGroupedIndex: {\n          fn: (column) => column_getGroupedIndex(column),\n        },\n        column_getToggleGroupingHandler: {\n          fn: (column) => column_getToggleGroupingHandler(column),\n        },\n        column_getAutoAggregationFn: {\n          fn: (column) => column_getAutoAggregationFn(column),\n        },\n        column_getAggregationFn: {\n          fn: (column) => column_getAggregationFn(column),\n        },\n      })\n    },\n\n    assignRowPrototype: (prototype, table) => {\n      assignPrototypeAPIs('columnGroupingFeature', prototype, table, {\n        row_getIsGrouped: {\n          fn: (row) => row_getIsGrouped(row),\n        },\n        row_getGroupingValue: {\n          fn: (row, columnId) => row_getGroupingValue(row, columnId),\n        },\n      })\n    },\n\n    initRowInstanceData: (row) => {\n      ;(row as any)._groupingValuesCache = {}\n    },\n\n    constructTableAPIs: (table) => {\n      assignTableAPIs('columnGroupingFeature', table, {\n        table_setGrouping: {\n          fn: (updater) => table_setGrouping(table, updater),\n        },\n        table_resetGrouping: {\n          fn: (defaultState) => table_resetGrouping(table, defaultState),\n        },\n      })\n    },\n  }\n}\n\n/**\n * The (Column) Grouping feature adds column grouping state and APIs to the table, row, column, and cell objects.\n */\nexport const columnGroupingFeature = constructColumnGroupingFeature()\n"
  },
  {
    "path": "packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts",
    "content": "import type { RowModel } from '../../core/row-models/coreRowModelsFeature.types'\nimport type { Table } from '../../types/Table'\nimport type { BuiltInAggregationFn } from '../../fns/aggregationFns'\nimport type {\n  CellData,\n  OnChangeFn,\n  RowData,\n  Updater,\n} from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Row } from '../../types/Row'\nimport type { Cell } from '../../types/Cell'\nimport type { ColumnDefTemplate } from '../../types/ColumnDef'\n\nexport type GroupingState = Array<string>\n\nexport interface TableState_ColumnGrouping {\n  grouping: GroupingState\n}\n\nexport interface RowModelFns_ColumnGrouping<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  aggregationFns: Record<keyof AggregationFns, AggregationFn<TFeatures, TData>>\n}\n\nexport interface AggregationFns {}\n\nexport type AggregationFn<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> = (\n  columnId: string,\n  leafRows: Array<Row<TFeatures, TData>>,\n  childRows: Array<Row<TFeatures, TData>>,\n) => any\n\nexport type CustomAggregationFns<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> = Record<string, AggregationFn<TFeatures, TData>>\n\nexport type AggregationFnOption<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> =\n  | 'auto'\n  | keyof AggregationFns\n  | BuiltInAggregationFn\n  | AggregationFn<TFeatures, TData>\n\nexport interface ColumnDef_ColumnGrouping<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n> {\n  /**\n   * The cell to display each row for the column if the cell is an aggregate. If a function is passed, it will be passed a props object with the context of the cell and should return the property type for your adapter (the exact type depends on the adapter being used).\n   */\n  aggregatedCell?: ColumnDefTemplate<\n    ReturnType<Cell<TFeatures, TData, TValue>['getContext']>\n  >\n  /**\n   * The resolved aggregation function for the column.\n   */\n  aggregationFn?: AggregationFnOption<TFeatures, TData>\n  /**\n   * Enables/disables grouping for this column.\n   */\n  enableGrouping?: boolean\n  /**\n   * Specify a value to be used for grouping rows on this column. If this option is not specified, the value derived from `accessorKey` / `accessorFn` will be used instead.\n   */\n  getGroupingValue?: (row: TData) => any\n}\n\nexport interface Column_ColumnGrouping<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  /**\n   * Returns the aggregation function for the column.\n   */\n  getAggregationFn: () => AggregationFn<TFeatures, TData> | undefined\n  /**\n   * Returns the automatically inferred aggregation function for the column.\n   */\n  getAutoAggregationFn: () => AggregationFn<TFeatures, TData> | undefined\n  /**\n   * Returns whether or not the column can be grouped.\n   */\n  getCanGroup: () => boolean\n  /**\n   * Returns the index of the column in the grouping state.\n   */\n  getGroupedIndex: () => number\n  /**\n   * Returns whether or not the column is currently grouped.\n   */\n  getIsGrouped: () => boolean\n  /**\n   * Returns a function that toggles the grouping state of the column. This is useful for passing to the `onClick` prop of a button.\n   */\n  getToggleGroupingHandler: () => () => void\n  /**\n   * Toggles the grouping state of the column.\n   */\n  toggleGrouping: () => void\n}\n\nexport interface Row_ColumnGrouping {\n  _groupingValuesCache: Record<string, any>\n  /**\n   * Returns the grouping value for any row and column (including leaf rows).\n   */\n  getGroupingValue: (columnId: string) => unknown\n  /**\n   * Returns whether or not the row is currently grouped.\n   */\n  getIsGrouped: () => boolean\n  /**\n   * If this row is grouped, this is the id of the column that this row is grouped by.\n   */\n  groupingColumnId?: string\n  /**\n   * If this row is grouped, this is the unique/shared value for the `groupingColumnId` for all of the rows in this group.\n   */\n  groupingValue?: unknown\n}\n\nexport interface Cell_ColumnGrouping {\n  /**\n   * Returns whether or not the cell is currently aggregated.\n   */\n  getIsAggregated: () => boolean\n  /**\n   * Returns whether or not the cell is currently grouped.\n   */\n  getIsGrouped: () => boolean\n  /**\n   * Returns whether or not the cell is currently a placeholder cell.\n   */\n  getIsPlaceholder: () => boolean\n}\n\nexport interface ColumnDefaultOptions {\n  enableGrouping: boolean\n  onGroupingChange: OnChangeFn<GroupingState>\n}\n\nexport interface TableOptions_ColumnGrouping {\n  /**\n   * Enables/disables grouping for the table.\n   */\n  enableGrouping?: boolean\n  /**\n   * Grouping columns are automatically reordered by default to the start of the columns list. If you would rather remove them or leave them as-is, set the appropriate mode here.\n   */\n  groupedColumnMode?: false | 'reorder' | 'remove'\n  /**\n   * Enables manual grouping. If this option is set to `true`, the table will not automatically group rows using `getGroupedRowModel()` and instead will expect you to manually group the rows before passing them to the table. This is useful if you are doing server-side grouping and aggregation.\n   */\n  manualGrouping?: boolean\n  /**\n   * If this function is provided, it will be called when the grouping state changes and you will be expected to manage the state yourself. You can pass the managed state back to the table via the `tableOptions.state.grouping` option.\n   */\n  onGroupingChange?: OnChangeFn<GroupingState>\n}\n\nexport type GroupingColumnMode = false | 'reorder' | 'remove'\n\nexport interface Table_ColumnGrouping<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  /**\n   * Resets the **grouping** state to `initialState.grouping`, or `true` can be passed to force a default blank state reset to `[]`.\n   */\n  resetGrouping: (defaultState?: boolean) => void\n  /**\n   * Updates the grouping state of the table via an update function or value.\n   */\n  setGrouping: (updater: Updater<GroupingState>) => void\n}\n\nexport interface Table_RowModels_Grouped<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  /**\n   * Returns the row model for the table after grouping has been applied.\n   */\n  getGroupedRowModel: () => RowModel<TFeatures, TData>\n  /**\n   * Returns the row model for the table before any grouping has been applied.\n   */\n  getPreGroupedRowModel: () => RowModel<TFeatures, TData>\n}\n\nexport interface CreateRowModel_Grouped<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  /**\n   * Returns the row model after grouping has taken place, but no further.\n   */\n  groupedRowModel?: (\n    table: Table<TFeatures, TData>,\n  ) => () => RowModel<TFeatures, TData>\n}\n\nexport interface CachedRowModel_Grouped<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  groupedRowModel: () => RowModel<TFeatures, TData>\n}\n"
  },
  {
    "path": "packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts",
    "content": "import { isFunction } from '../../utils'\nimport { table_getColumn } from '../../core/columns/coreColumnsFeature.utils'\nimport type { Column_Internal } from '../../types/Column'\nimport type { CellData, RowData, Updater } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Table_Internal } from '../../types/Table'\nimport type { Row } from '../../types/Row'\nimport type { Cell } from '../../types/Cell'\nimport type {\n  AggregationFn,\n  GroupingState,\n  Row_ColumnGrouping,\n} from './columnGroupingFeature.types'\n\nexport function getDefaultGroupingState(): GroupingState {\n  return structuredClone([])\n}\n\nexport function column_toggleGrouping<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n>(column: Column_Internal<TFeatures, TData, TValue>) {\n  table_setGrouping(column.table, (old) => {\n    // Find any existing grouping for this column\n    if (old.includes(column.id)) {\n      return old.filter((d) => d !== column.id)\n    }\n\n    return [...old, column.id]\n  })\n}\n\nexport function column_getCanGroup<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n>(column: Column_Internal<TFeatures, TData, TValue>) {\n  return (\n    (column.columnDef.enableGrouping ?? true) &&\n    (column.table.options.enableGrouping ?? true) &&\n    (!!column.accessorFn || !!column.columnDef.getGroupingValue)\n  )\n}\n\nexport function column_getIsGrouped<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n>(column: Column_Internal<TFeatures, TData, TValue>): boolean {\n  return !!column.table.store.state.grouping?.includes(column.id)\n}\n\nexport function column_getGroupedIndex<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n>(column: Column_Internal<TFeatures, TData, TValue>): number {\n  return column.table.store.state.grouping?.indexOf(column.id) ?? -1\n}\n\nexport function column_getToggleGroupingHandler<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n>(column: Column_Internal<TFeatures, TData, TValue>) {\n  const canGroup = column_getCanGroup(column)\n\n  return () => {\n    if (!canGroup) return\n    column_toggleGrouping(column)\n  }\n}\n\nexport function column_getAutoAggregationFn<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n>(column: Column_Internal<TFeatures, TData, TValue>) {\n  const aggregationFns = column.table._rowModelFns.aggregationFns as\n    | Record<string, AggregationFn<TFeatures, TData>>\n    | undefined\n\n  const firstRow = column.table.getCoreRowModel().flatRows[0]\n\n  const value = firstRow?.getValue(column.id)\n\n  if (typeof value === 'number') {\n    return aggregationFns?.sum\n  }\n\n  if (Object.prototype.toString.call(value) === '[object Date]') {\n    return aggregationFns?.extent\n  }\n}\n\nexport function column_getAggregationFn<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n>(column: Column_Internal<TFeatures, TData, TValue>) {\n  const aggregationFns = column.table._rowModelFns.aggregationFns as\n    | Record<string, AggregationFn<TFeatures, TData>>\n    | undefined\n\n  return isFunction(column.columnDef.aggregationFn)\n    ? column.columnDef.aggregationFn\n    : column.columnDef.aggregationFn === 'auto'\n      ? column_getAutoAggregationFn(column)\n      : aggregationFns?.[column.columnDef.aggregationFn as string]\n}\n\nexport function table_setGrouping<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>, updater: Updater<GroupingState>) {\n  table.options.onGroupingChange?.(updater)\n}\n\nexport function table_resetGrouping<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>, defaultState?: boolean) {\n  table_setGrouping(\n    table,\n    defaultState ? [] : (table.initialState.grouping ?? []),\n  )\n}\n\nexport function row_getIsGrouped<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(row: Row<TFeatures, TData> & Partial<Row_ColumnGrouping>) {\n  return !!row.groupingColumnId\n}\n\nexport function row_getGroupingValue<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(row: Row<TFeatures, TData> & Partial<Row_ColumnGrouping>, columnId: string) {\n  if (row._groupingValuesCache?.hasOwnProperty(columnId)) {\n    return row._groupingValuesCache[columnId]\n  }\n\n  const column = table_getColumn(row.table, columnId) as Column_Internal<\n    TFeatures,\n    TData\n  >\n\n  if (!column.columnDef.getGroupingValue) {\n    return row.getValue(columnId)\n  }\n\n  if (row._groupingValuesCache) {\n    row._groupingValuesCache[columnId] = column.columnDef.getGroupingValue(\n      row.original,\n    )\n  }\n\n  return row._groupingValuesCache?.[columnId]\n}\n\nexport function cell_getIsGrouped<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n>(cell: Cell<TFeatures, TData, TValue>) {\n  const row = cell.row as Row<TFeatures, TData> & Partial<Row_ColumnGrouping>\n  return (\n    column_getIsGrouped(cell.column) && cell.column.id === row.groupingColumnId\n  )\n}\n\nexport function cell_getIsPlaceholder<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n>(cell: Cell<TFeatures, TData, TValue>) {\n  return !cell_getIsGrouped(cell) && column_getIsGrouped(cell.column)\n}\n\nexport function cell_getIsAggregated<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n>(cell: Cell<TFeatures, TData, TValue>) {\n  return (\n    !cell_getIsGrouped(cell) &&\n    !cell_getIsPlaceholder(cell) &&\n    !!cell.row.subRows.length\n  )\n}\n"
  },
  {
    "path": "packages/table-core/src/features/column-grouping/createGroupedRowModel.ts",
    "content": "import { flattenBy, tableMemo } from '../../utils'\nimport { constructRow } from '../../core/rows/constructRow'\nimport { table_getColumn } from '../../core/columns/coreColumnsFeature.utils'\nimport { table_autoResetExpanded } from '../row-expanding/rowExpandingFeature.utils'\nimport { table_autoResetPageIndex } from '../row-pagination/rowPaginationFeature.utils'\nimport {\n  column_getAggregationFn,\n  row_getGroupingValue,\n} from './columnGroupingFeature.utils'\nimport type { Column } from '../../types/Column'\nimport type {\n  AggregationFn,\n  AggregationFns,\n  Row_ColumnGrouping,\n} from './columnGroupingFeature.types'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { RowModel } from '../../core/row-models/coreRowModelsFeature.types'\nimport type { Table, Table_Internal } from '../../types/Table'\nimport type { Row } from '../../types/Row'\nimport type { RowData } from '../../types/type-utils'\n\nexport function createGroupedRowModel<\n  TFeatures extends TableFeatures,\n  TData extends RowData = any,\n>(\n  aggregationFns: Record<keyof AggregationFns, AggregationFn<TFeatures, TData>>,\n): (table: Table<TFeatures, TData>) => () => RowModel<TFeatures, TData> {\n  return (_table) => {\n    const table = _table as Table_Internal<TFeatures, TData>\n    if (!table._rowModelFns.aggregationFns)\n      table._rowModelFns.aggregationFns = aggregationFns\n    return tableMemo({\n      feature: 'columnGroupingFeature',\n      table,\n      fnName: 'table.getGroupedRowModel',\n      memoDeps: () => [\n        table.store.state.grouping,\n        table.getPreGroupedRowModel(),\n      ],\n      fn: () => _createGroupedRowModel(table),\n      onAfterUpdate: () => {\n        table_autoResetExpanded(table)\n        table_autoResetPageIndex(table)\n      },\n    })\n  }\n}\n\nfunction _createGroupedRowModel<\n  TFeatures extends TableFeatures,\n  TData extends RowData = any,\n>(table: Table_Internal<TFeatures, TData>): RowModel<TFeatures, TData> {\n  const rowModel = table.getPreGroupedRowModel()\n  const grouping = table.store.state.grouping\n\n  if (!rowModel.rows.length || !grouping?.length) {\n    rowModel.rows.forEach((row) => {\n      row.depth = 0\n      row.parentId = undefined\n    })\n    return rowModel\n  }\n\n  // Filter the grouping list down to columns that exist\n  const existingGrouping = grouping.filter((columnId) =>\n    table_getColumn(table, columnId),\n  )\n\n  const groupedFlatRows: Array<Row<TFeatures, TData>> &\n    Partial<Row_ColumnGrouping> = []\n  const groupedRowsById: Record<string, Row<TFeatures, TData>> = {}\n\n  // Recursively group the data\n  const groupUpRecursively = (\n    rows: Array<Row<TFeatures, TData>>,\n    depth = 0,\n    parentId?: string,\n  ) => {\n    // Grouping depth has been been met\n    // Stop grouping and simply rewrite thd depth and row relationships\n    if (depth >= existingGrouping.length) {\n      return rows.map((row) => {\n        row.depth = depth\n\n        groupedFlatRows.push(row)\n        groupedRowsById[row.id] = row\n\n        if (row.subRows.length) {\n          row.subRows = groupUpRecursively(row.subRows, depth + 1, row.id)\n        }\n\n        return row\n      })\n    }\n\n    const columnId = existingGrouping[depth] as string\n\n    // Group the rows together for this level\n    const rowGroupsMap = groupBy(rows, columnId)\n\n    // Perform aggregations for each group\n    const aggregatedGroupedRows = Array.from(rowGroupsMap.entries()).map(\n      ([groupingValue, groupedRows], index) => {\n        let id = `${columnId}:${groupingValue}`\n        id = parentId ? `${parentId}>${id}` : id\n\n        // First, Recurse to group sub rows before aggregation\n        const subRows = groupUpRecursively(groupedRows, depth + 1, id)\n\n        subRows.forEach((subRow) => {\n          subRow.parentId = id\n        })\n\n        // Flatten the leaf rows of the rows in this group\n        const leafRows = depth\n          ? flattenBy(groupedRows, (row) => row.subRows)\n          : groupedRows\n\n        const row = constructRow(\n          table,\n          id,\n          leafRows[0]!.original,\n          index,\n          depth,\n          undefined,\n          parentId,\n        ) as Row<TFeatures, TData> & Partial<Row_ColumnGrouping>\n\n        Object.assign(row, {\n          groupingColumnId: columnId,\n          groupingValue,\n          subRows,\n          leafRows,\n          getValue: (colId: string) => {\n            // Don't aggregate columns that are in the grouping\n            if (existingGrouping.includes(colId)) {\n              if (row._valuesCache.hasOwnProperty(colId)) {\n                return row._valuesCache[colId]\n              }\n\n              if (groupedRows[0]) {\n                row._valuesCache[colId] =\n                  groupedRows[0].getValue(colId) ?? undefined\n              }\n\n              return row._valuesCache[colId]\n            }\n\n            if (row._groupingValuesCache?.hasOwnProperty(colId)) {\n              return row._groupingValuesCache[colId]\n            }\n\n            // Aggregate the values\n            const column = table.getColumn(colId)\n            const aggregateFn = column_getAggregationFn(\n              column as Column<TFeatures, TData, unknown>,\n            )\n\n            if (!row._groupingValuesCache) row._groupingValuesCache = {}\n\n            if (aggregateFn) {\n              row._groupingValuesCache[colId] = aggregateFn(\n                colId,\n                leafRows,\n                groupedRows,\n              )\n\n              return row._groupingValuesCache[colId]\n            }\n          },\n        })\n\n        subRows.forEach((subRow) => {\n          groupedFlatRows.push(subRow)\n          groupedRowsById[subRow.id] = subRow\n        })\n\n        return row\n      },\n    )\n\n    return aggregatedGroupedRows\n  }\n\n  const groupedRows = groupUpRecursively(rowModel.rows, 0)\n\n  groupedRows.forEach((subRow) => {\n    groupedFlatRows.push(subRow)\n    groupedRowsById[subRow.id] = subRow\n  })\n\n  return {\n    rows: groupedRows,\n    flatRows: groupedFlatRows,\n    rowsById: groupedRowsById,\n  }\n}\n\nfunction groupBy<TFeatures extends TableFeatures, TData extends RowData = any>(\n  rows: Array<Row<TFeatures, TData>>,\n  columnId: string,\n) {\n  const groupMap = new Map<any, Array<Row<TFeatures, TData>>>()\n\n  return rows.reduce((map, row) => {\n    const resKey = `${row_getGroupingValue(row, columnId)}`\n    const previous = map.get(resKey)\n    if (!previous) {\n      map.set(resKey, [row])\n    } else {\n      previous.push(row)\n    }\n    return map\n  }, groupMap)\n}\n"
  },
  {
    "path": "packages/table-core/src/features/column-ordering/columnOrderingFeature.ts",
    "content": "import {\n  assignPrototypeAPIs,\n  assignTableAPIs,\n  makeStateUpdater,\n} from '../../utils'\nimport {\n  column_getIndex,\n  column_getIsFirstColumn,\n  column_getIsLastColumn,\n  getDefaultColumnOrderState,\n  table_getOrderColumnsFn,\n  table_resetColumnOrder,\n  table_setColumnOrder,\n} from './columnOrderingFeature.utils'\nimport type { RowData } from '../../types/type-utils'\nimport type { TableFeature, TableFeatures } from '../../types/TableFeatures'\n// import type {\n//   Column_ColumnOrdering,\n//   TableOptions_ColumnOrdering,\n//   TableState_ColumnOrdering,\n//   Table_ColumnOrdering,\n// } from './columnOrderingFeature.types'\n\ninterface ColumnOrderingFeatureConstructors<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  // Column: Column_ColumnOrdering\n  // Table: Table_ColumnOrdering<TFeatures, TData>\n  // TableOptions: TableOptions_ColumnOrdering\n  // TableState: TableState_ColumnOrdering\n}\n\nexport function constructColumnOrderingFeature<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(): TableFeature<ColumnOrderingFeatureConstructors<TFeatures, TData>> {\n  return {\n    getInitialState: (initialState) => {\n      return {\n        columnOrder: getDefaultColumnOrderState(),\n        ...initialState,\n      }\n    },\n\n    getDefaultTableOptions: (table) => {\n      return {\n        onColumnOrderChange: makeStateUpdater('columnOrder', table),\n      }\n    },\n\n    assignColumnPrototype: (prototype, table) => {\n      assignPrototypeAPIs('columnOrderingFeature', prototype, table, {\n        column_getIndex: {\n          fn: (column, position) => column_getIndex(column, position),\n          memoDeps: (column, position) => [\n            position,\n            column.table.store.state.columnOrder,\n            column.table.store.state.columnPinning,\n            column.table.store.state.grouping,\n          ],\n        },\n        column_getIsFirstColumn: {\n          fn: (column, position) => column_getIsFirstColumn(column, position),\n        },\n        column_getIsLastColumn: {\n          fn: (column, position) => column_getIsLastColumn(column, position),\n        },\n      })\n    },\n\n    constructTableAPIs: (table) => {\n      assignTableAPIs('columnOrderingFeature', table, {\n        table_setColumnOrder: {\n          fn: (updater) => table_setColumnOrder(table, updater),\n        },\n        table_resetColumnOrder: {\n          fn: (defaultState) => table_resetColumnOrder(table, defaultState),\n        },\n        table_getOrderColumnsFn: {\n          fn: () => table_getOrderColumnsFn(table),\n          memoDeps: () => [\n            table.store.state.columnOrder,\n            table.store.state.grouping,\n            table.options.groupedColumnMode,\n          ],\n        },\n      })\n    },\n  }\n}\n\n/**\n * The Column Ordering feature adds column ordering state and APIs to the table and column objects.\n */\nexport const columnOrderingFeature = constructColumnOrderingFeature()\n"
  },
  {
    "path": "packages/table-core/src/features/column-ordering/columnOrderingFeature.types.ts",
    "content": "import type { OnChangeFn, RowData, Updater } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { ColumnPinningPosition } from '../column-pinning/columnPinningFeature.types'\n\nexport type ColumnOrderState = Array<string>\n\nexport interface TableState_ColumnOrdering {\n  columnOrder: ColumnOrderState\n}\n\nexport interface TableOptions_ColumnOrdering {\n  /**\n   * If provided, this function will be called with an `updaterFn` when `state.columnOrder` changes. This overrides the default internal state management, so you will need to persist the state change either fully or partially outside of the table.\n   */\n  onColumnOrderChange?: OnChangeFn<ColumnOrderState>\n}\n\nexport interface Column_ColumnOrdering {\n  /**\n   * Returns the index of the column in the order of the visible columns. Optionally pass a `position` parameter to get the index of the column in a sub-section of the table\n   */\n  getIndex: (position?: ColumnPinningPosition | 'center') => number\n  /**\n   * Returns `true` if the column is the first column in the order of the visible columns. Optionally pass a `position` parameter to check if the column is the first in a sub-section of the table.\n   */\n  getIsFirstColumn: (position?: ColumnPinningPosition | 'center') => boolean\n  /**\n   * Returns `true` if the column is the last column in the order of the visible columns. Optionally pass a `position` parameter to check if the column is the last in a sub-section of the table.\n   */\n  getIsLastColumn: (position?: ColumnPinningPosition | 'center') => boolean\n}\n\nexport interface ColumnOrderDefaultOptions {\n  onColumnOrderChange: OnChangeFn<ColumnOrderState>\n}\n\nexport interface Table_ColumnOrdering<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  /**\n   * Resets the **columnOrder** state to `initialState.columnOrder`, or `true` can be passed to force a default blank state reset to `[]`.\n   */\n  resetColumnOrder: (defaultState?: boolean) => void\n  /**\n   * Sets or updates the `state.columnOrder` state.\n   */\n  setColumnOrder: (updater: Updater<ColumnOrderState>) => void\n}\n"
  },
  {
    "path": "packages/table-core/src/features/column-ordering/columnOrderingFeature.utils.ts",
    "content": "import { table_getPinnedVisibleLeafColumns } from '../column-pinning/columnPinningFeature.utils'\nimport type { GroupingState } from '../column-grouping/columnGroupingFeature.types'\nimport type { CellData, RowData, Updater } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Table_Internal } from '../../types/Table'\nimport type { Column_Internal } from '../../types/Column'\nimport type { ColumnPinningPosition } from '../column-pinning/columnPinningFeature.types'\nimport type { ColumnOrderState } from './columnOrderingFeature.types'\n\nexport function getDefaultColumnOrderState(): ColumnOrderState {\n  return structuredClone([])\n}\n\nexport function column_getIndex<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n>(\n  column: Column_Internal<TFeatures, TData, TValue>,\n  position?: ColumnPinningPosition | 'center',\n) {\n  const columns = table_getPinnedVisibleLeafColumns(column.table, position)\n  return columns.findIndex((d) => d.id === column.id)\n}\n\nexport function column_getIsFirstColumn<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n>(\n  column: Column_Internal<TFeatures, TData, TValue>,\n  position?: ColumnPinningPosition | 'center',\n) {\n  const columns = table_getPinnedVisibleLeafColumns(column.table, position)\n  return columns[0]?.id === column.id\n}\n\nexport function column_getIsLastColumn<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n>(\n  column: Column_Internal<TFeatures, TData, TValue>,\n  position?: ColumnPinningPosition | 'center',\n) {\n  const columns = table_getPinnedVisibleLeafColumns(column.table, position)\n  return columns[columns.length - 1]?.id === column.id\n}\n\nexport function table_setColumnOrder<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>, updater: Updater<ColumnOrderState>) {\n  table.options.onColumnOrderChange?.(updater)\n}\n\nexport function table_resetColumnOrder<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>, defaultState?: boolean) {\n  table_setColumnOrder(\n    table,\n    defaultState ? [] : (table.initialState.columnOrder ?? []),\n  )\n}\n\nexport function table_getOrderColumnsFn<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>) {\n  const { columnOrder = [] } = table.store.state\n\n  return (columns: Array<Column_Internal<TFeatures, TData, unknown>>) => {\n    // Sort grouped columns to the start of the column list\n    // before the headers are built\n    let orderedColumns: Array<Column_Internal<TFeatures, TData, unknown>> = []\n\n    // If there is no order, return the normal columns\n    if (!columnOrder.length) {\n      orderedColumns = columns\n    } else {\n      const columnOrderCopy = [...columnOrder]\n\n      // If there is an order, make a copy of the columns\n      const columnsCopy = [...columns]\n\n      // And make a new ordered array of the columns\n\n      // Loop over the columns and place them in order into the new array\n      while (columnsCopy.length && columnOrderCopy.length) {\n        const targetColumnId = columnOrderCopy.shift()\n        const foundIndex = columnsCopy.findIndex((d) => d.id === targetColumnId)\n        if (foundIndex > -1) {\n          orderedColumns.push(columnsCopy.splice(foundIndex, 1)[0]!)\n        }\n      }\n\n      // If there are any columns left, add them to the end\n      orderedColumns = [...orderedColumns, ...columnsCopy]\n    }\n\n    return orderColumns(table, orderedColumns)\n  }\n}\n\nexport function orderColumns<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  table: Table_Internal<TFeatures, TData>,\n  leafColumns: Array<Column_Internal<TFeatures, TData, unknown>>,\n) {\n  const grouping = table.store.state.grouping ?? ([] as GroupingState)\n  const { groupedColumnMode } = table.options\n\n  if (!grouping.length || !groupedColumnMode) {\n    return leafColumns\n  }\n\n  const nonGroupingColumns = leafColumns.filter(\n    (col) => !grouping.includes(col.id),\n  )\n\n  if (groupedColumnMode === 'remove') {\n    return nonGroupingColumns\n  }\n\n  const groupingColumns = grouping\n    .map((g) => leafColumns.find((col) => col.id === g)!)\n    .filter(Boolean)\n\n  return [...groupingColumns, ...nonGroupingColumns]\n}\n"
  },
  {
    "path": "packages/table-core/src/features/column-pinning/columnPinningFeature.ts",
    "content": "import {\n  assignPrototypeAPIs,\n  assignTableAPIs,\n  callMemoOrStaticFn,\n  makeStateUpdater,\n} from '../../utils'\nimport { table_getVisibleLeafColumns } from '../column-visibility/columnVisibilityFeature.utils'\nimport {\n  column_getCanPin,\n  column_getIsPinned,\n  column_getPinnedIndex,\n  column_pin,\n  getDefaultColumnPinningState,\n  row_getCenterVisibleCells,\n  row_getLeftVisibleCells,\n  row_getRightVisibleCells,\n  table_getCenterFlatHeaders,\n  table_getCenterFooterGroups,\n  table_getCenterHeaderGroups,\n  table_getCenterLeafColumns,\n  table_getCenterLeafHeaders,\n  table_getCenterVisibleLeafColumns,\n  table_getIsSomeColumnsPinned,\n  table_getLeftFlatHeaders,\n  table_getLeftFooterGroups,\n  table_getLeftHeaderGroups,\n  table_getLeftLeafColumns,\n  table_getLeftLeafHeaders,\n  table_getLeftVisibleLeafColumns,\n  table_getRightFlatHeaders,\n  table_getRightFooterGroups,\n  table_getRightHeaderGroups,\n  table_getRightLeafColumns,\n  table_getRightLeafHeaders,\n  table_getRightVisibleLeafColumns,\n  table_resetColumnPinning,\n  table_setColumnPinning,\n} from './columnPinningFeature.utils'\nimport type { RowData } from '../../types/type-utils'\nimport type { TableFeature, TableFeatures } from '../../types/TableFeatures'\n// import type {\n//   ColumnDef_ColumnPinning,\n//   Column_ColumnPinning,\n//   Row_ColumnPinning,\n//   TableOptions_ColumnPinning,\n//   TableState_ColumnPinning,\n//   Table_ColumnPinning,\n// } from './columnPinningFeature.types'\n\ninterface ColumnPinningFeatureConstructors<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  // Column: Column_ColumnPinning\n  // ColumnDef: ColumnDef_ColumnPinning\n  // Row: Row_ColumnPinning<TFeatures, TData>\n  // Table: Table_ColumnPinning<TFeatures, TData>\n  // TableOptions: TableOptions_ColumnPinning\n  // TableState: TableState_ColumnPinning\n}\n\nexport function constructColumnPinningFeature<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(): TableFeature<ColumnPinningFeatureConstructors<TFeatures, TData>> {\n  return {\n    getInitialState: (initialState) => {\n      return {\n        columnPinning: {\n          ...getDefaultColumnPinningState(),\n          ...initialState.columnPinning,\n        },\n      }\n    },\n\n    getDefaultTableOptions: (table) => {\n      return {\n        onColumnPinningChange: makeStateUpdater('columnPinning', table),\n      }\n    },\n\n    assignColumnPrototype: (prototype, table) => {\n      assignPrototypeAPIs('columnPinningFeature', prototype, table, {\n        column_pin: {\n          fn: (column, position) => column_pin(column, position),\n        },\n        column_getCanPin: {\n          fn: (column) => column_getCanPin(column),\n        },\n        column_getPinnedIndex: {\n          fn: (column) => column_getPinnedIndex(column),\n        },\n        column_getIsPinned: {\n          fn: (column) => column_getIsPinned(column),\n        },\n      })\n    },\n\n    assignRowPrototype: (prototype, table) => {\n      assignPrototypeAPIs('columnPinningFeature', prototype, table, {\n        row_getCenterVisibleCells: {\n          fn: (row) => row_getCenterVisibleCells(row),\n          memoDeps: (row) => [\n            row.getAllCells(),\n            row.table.store.state.columnPinning,\n            row.table.store.state.columnVisibility,\n          ],\n        },\n        row_getLeftVisibleCells: {\n          fn: (row) => row_getLeftVisibleCells(row),\n          memoDeps: (row) => [\n            row.getAllCells(),\n            row.table.store.state.columnPinning?.left,\n            row.table.store.state.columnVisibility,\n          ],\n        },\n        row_getRightVisibleCells: {\n          fn: (row) => row_getRightVisibleCells(row),\n          memoDeps: (row) => [\n            row.getAllCells(),\n            row.table.store.state.columnPinning?.right,\n            row.table.store.state.columnVisibility,\n          ],\n        },\n      })\n    },\n\n    constructTableAPIs: (table) => {\n      assignTableAPIs('columnPinningFeature', table, {\n        table_setColumnPinning: {\n          fn: (updater) => table_setColumnPinning(table, updater),\n        },\n        table_resetColumnPinning: {\n          fn: (defaultState) => table_resetColumnPinning(table, defaultState),\n        },\n        table_getIsSomeColumnsPinned: {\n          fn: (position) => table_getIsSomeColumnsPinned(table, position),\n        },\n        // header groups\n        table_getLeftHeaderGroups: {\n          fn: () => table_getLeftHeaderGroups(table),\n          memoDeps: () => [\n            table.getAllColumns(),\n            callMemoOrStaticFn(\n              table,\n              'getVisibleLeafColumns',\n              table_getVisibleLeafColumns,\n            ),\n            table.store.state.columnPinning?.left,\n          ],\n        },\n        table_getCenterHeaderGroups: {\n          fn: () => table_getCenterHeaderGroups(table),\n          memoDeps: () => [\n            table.getAllColumns(),\n            callMemoOrStaticFn(\n              table,\n              'getVisibleLeafColumns',\n              table_getVisibleLeafColumns,\n            ),\n            table.store.state.columnPinning,\n          ],\n        },\n        table_getRightHeaderGroups: {\n          fn: () => table_getRightHeaderGroups(table),\n          memoDeps: () => [\n            table.getAllColumns(),\n            callMemoOrStaticFn(\n              table,\n              'getVisibleLeafColumns',\n              table_getVisibleLeafColumns,\n            ),\n            table.store.state.columnPinning?.right,\n          ],\n        },\n        // footer groups\n        table_getLeftFooterGroups: {\n          fn: () => table_getLeftFooterGroups(table),\n          memoDeps: () => [\n            callMemoOrStaticFn(\n              table,\n              'getLeftHeaderGroups',\n              table_getLeftHeaderGroups,\n            ),\n          ],\n        },\n        table_getCenterFooterGroups: {\n          fn: () => table_getCenterFooterGroups(table),\n          memoDeps: () => [\n            callMemoOrStaticFn(\n              table,\n              'getCenterHeaderGroups',\n              table_getCenterHeaderGroups,\n            ),\n          ],\n        },\n        table_getRightFooterGroups: {\n          fn: () => table_getRightFooterGroups(table),\n          memoDeps: () => [\n            callMemoOrStaticFn(\n              table,\n              'getRightHeaderGroups',\n              table_getRightHeaderGroups,\n            ),\n          ],\n        },\n        // flat headers\n        table_getLeftFlatHeaders: {\n          fn: () => table_getLeftFlatHeaders(table),\n          memoDeps: () => [\n            callMemoOrStaticFn(\n              table,\n              'getLeftHeaderGroups',\n              table_getLeftHeaderGroups,\n            ),\n          ],\n        },\n        table_getRightFlatHeaders: {\n          fn: () => table_getRightFlatHeaders(table),\n          memoDeps: () => [\n            callMemoOrStaticFn(\n              table,\n              'getRightHeaderGroups',\n              table_getRightHeaderGroups,\n            ),\n          ],\n        },\n        table_getCenterFlatHeaders: {\n          fn: () => table_getCenterFlatHeaders(table),\n          memoDeps: () => [\n            callMemoOrStaticFn(\n              table,\n              'getCenterHeaderGroups',\n              table_getCenterHeaderGroups,\n            ),\n          ],\n        },\n        // leaf headers\n        table_getLeftLeafHeaders: {\n          fn: () => table_getLeftLeafHeaders(table),\n          memoDeps: () => [\n            callMemoOrStaticFn(\n              table,\n              'getLeftHeaderGroups',\n              table_getLeftHeaderGroups,\n            ),\n          ],\n        },\n        table_getRightLeafHeaders: {\n          fn: () => table_getRightLeafHeaders(table),\n          memoDeps: () => [\n            callMemoOrStaticFn(\n              table,\n              'getRightHeaderGroups',\n              table_getRightHeaderGroups,\n            ),\n          ],\n        },\n        table_getCenterLeafHeaders: {\n          fn: () => table_getCenterLeafHeaders(table),\n          memoDeps: () => [\n            callMemoOrStaticFn(\n              table,\n              'getCenterHeaderGroups',\n              table_getCenterHeaderGroups,\n            ),\n          ],\n        },\n        // leaf columns\n        table_getLeftLeafColumns: {\n          fn: () => table_getLeftLeafColumns(table),\n          memoDeps: () => [\n            table.options.columns,\n            table.store.state.columnPinning,\n          ],\n        },\n        table_getRightLeafColumns: {\n          fn: () => table_getRightLeafColumns(table),\n          memoDeps: () => [\n            table.options.columns,\n            table.store.state.columnPinning,\n          ],\n        },\n        table_getCenterLeafColumns: {\n          fn: () => table_getCenterLeafColumns(table),\n          memoDeps: () => [\n            table.options.columns,\n            table.store.state.columnPinning,\n          ],\n        },\n        // visible leaf columns\n        table_getLeftVisibleLeafColumns: {\n          fn: () => table_getLeftVisibleLeafColumns(table),\n          memoDeps: () => [\n            table.options.columns,\n            table.store.state.columnPinning,\n            table.store.state.columnVisibility,\n          ],\n        },\n        table_getCenterVisibleLeafColumns: {\n          fn: () => table_getCenterVisibleLeafColumns(table),\n          memoDeps: () => [\n            table.options.columns,\n            table.store.state.columnPinning,\n            table.store.state.columnVisibility,\n          ],\n        },\n        table_getRightVisibleLeafColumns: {\n          fn: () => table_getRightVisibleLeafColumns(table),\n          memoDeps: () => [\n            table.options.columns,\n            table.store.state.columnPinning,\n            table.store.state.columnVisibility,\n          ],\n        },\n      })\n    },\n  }\n}\n\n/**\n * The Column Pinning feature adds column pinning state and APIs to the table, row, and column objects.\n */\nexport const columnPinningFeature = constructColumnPinningFeature()\n"
  },
  {
    "path": "packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts",
    "content": "import type { OnChangeFn, RowData, Updater } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Cell } from '../../types/Cell'\nimport type { Header } from '../../types/Header'\nimport type { HeaderGroup } from '../../types/HeaderGroup'\nimport type { Column } from '../../types/Column'\n\nexport type ColumnPinningPosition = false | 'left' | 'right'\n\nexport interface ColumnPinningState {\n  left: Array<string>\n  right: Array<string>\n}\n\nexport interface TableState_ColumnPinning {\n  columnPinning: ColumnPinningState\n}\n\nexport interface TableOptions_ColumnPinning {\n  /**\n   * Enables/disables column pinning for the table. Defaults to `true`.\n   */\n  enableColumnPinning?: boolean\n  /**\n   * If provided, this function will be called with an `updaterFn` when `state.columnPinning` changes. This overrides the default internal state management, so you will also need to supply `state.columnPinning` from your own managed state.\n   */\n  onColumnPinningChange?: OnChangeFn<ColumnPinningState>\n}\n\nexport interface ColumnPinningDefaultOptions {\n  onColumnPinningChange: OnChangeFn<ColumnPinningState>\n}\n\nexport interface ColumnDef_ColumnPinning {\n  /**\n   * Enables/disables column pinning for this column. Defaults to `true`.\n   */\n  enablePinning?: boolean\n}\n\nexport interface Column_ColumnPinning {\n  /**\n   * Returns whether or not the column can be pinned.\n   */\n  getCanPin: () => boolean\n  /**\n   * Returns the pinned position of the column. (`'left'`, `'right'` or `false`)\n   */\n  getIsPinned: () => ColumnPinningPosition\n  /**\n   * Returns the numeric pinned index of the column within a pinned column group.\n   */\n  getPinnedIndex: () => number\n  /**\n   * Pins a column to the `'left'` or `'right'`, or unpins the column to the center if `false` is passed.\n   */\n  pin: (position: ColumnPinningPosition) => void\n}\n\nexport interface Row_ColumnPinning<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  /**\n   * Returns all center pinned (unpinned) leaf cells in the row.\n   */\n  getCenterVisibleCells: () => Array<Cell<TFeatures, TData, unknown>>\n  /**\n   * Returns all left pinned leaf cells in the row.\n   */\n  getLeftVisibleCells: () => Array<Cell<TFeatures, TData, unknown>>\n  /**\n   * Returns all right pinned leaf cells in the row.\n   */\n  getRightVisibleCells: () => Array<Cell<TFeatures, TData, unknown>>\n}\n\nexport interface Table_ColumnPinning<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  /**\n   * If pinning, returns headers for all columns that are not pinned, including parent headers.\n   */\n  getCenterFlatHeaders: () => Array<Header<TFeatures, TData, unknown>>\n  /**\n   * If pinning, returns the footer groups for columns that are not pinned.\n   */\n  getCenterFooterGroups: () => Array<HeaderGroup<TFeatures, TData>>\n  /**\n   * If pinning, returns the header groups for columns that are not pinned.\n   */\n  getCenterHeaderGroups: () => Array<HeaderGroup<TFeatures, TData>>\n  /**\n   * Returns all center pinned (unpinned) leaf columns.\n   */\n  getCenterLeafColumns: () => Array<Column<TFeatures, TData, unknown>>\n  /**\n   * If pinning, returns headers for all columns that are not pinned, (not including parent headers).\n   */\n  getCenterLeafHeaders: () => Array<Header<TFeatures, TData, unknown>>\n  /**\n   * If column pinning, returns a flat array of leaf-node columns that are visible in the unpinned/center portion of the table.\n   */\n  getCenterVisibleLeafColumns: () => Array<Column<TFeatures, TData, unknown>>\n  /**\n   * Returns whether or not any columns are pinned. Optionally specify to only check for pinned columns in either the `left` or `right` position.\n   */\n  getIsSomeColumnsPinned: (position?: ColumnPinningPosition) => boolean\n  /**\n   * If pinning, returns headers for all left pinned columns in the table, including parent headers.\n   */\n  getLeftFlatHeaders: () => Array<Header<TFeatures, TData, unknown>>\n  /**\n   * If pinning, returns the footer groups for the left pinned columns.\n   */\n  getLeftFooterGroups: () => Array<HeaderGroup<TFeatures, TData>>\n  /**\n   * If pinning, returns the header groups for the left pinned columns.\n   */\n  getLeftHeaderGroups: () => Array<HeaderGroup<TFeatures, TData>>\n  /**\n   * Returns all left pinned leaf columns.\n   */\n  getLeftLeafColumns: () => Array<Column<TFeatures, TData, unknown>>\n  /**\n   * If pinning, returns headers for all left pinned leaf columns in the table, (not including parent headers).\n   */\n  getLeftLeafHeaders: () => Array<Header<TFeatures, TData, unknown>>\n  /**\n   * If column pinning, returns a flat array of leaf-node columns that are visible in the left portion of the table.\n   */\n  getLeftVisibleLeafColumns: () => Array<Column<TFeatures, TData, unknown>>\n  /**\n   * If pinning, returns headers for all right pinned columns in the table, including parent headers.\n   */\n  getRightFlatHeaders: () => Array<Header<TFeatures, TData, unknown>>\n  /**\n   * If pinning, returns the footer groups for the right pinned columns.\n   */\n  getRightFooterGroups: () => Array<HeaderGroup<TFeatures, TData>>\n  /**\n   * If pinning, returns the header groups for the right pinned columns.\n   */\n  getRightHeaderGroups: () => Array<HeaderGroup<TFeatures, TData>>\n  /**\n   * Returns all right pinned leaf columns.\n   */\n  getRightLeafColumns: () => Array<Column<TFeatures, TData, unknown>>\n  /**\n   * If pinning, returns headers for all right pinned leaf columns in the table, (not including parent headers).\n   */\n  getRightLeafHeaders: () => Array<Header<TFeatures, TData, unknown>>\n  /**\n   * If column pinning, returns a flat array of leaf-node columns that are visible in the right portion of the table.\n   */\n  getRightVisibleLeafColumns: () => Array<Column<TFeatures, TData, unknown>>\n  /**\n   * Resets the **columnPinning** state to `initialState.columnPinning`, or `true` can be passed to force a default blank state reset to `{ left: [], right: [], }`.\n   */\n  resetColumnPinning: (defaultState?: boolean) => void\n  /**\n   * Sets or updates the `state.columnPinning` state.\n   */\n  setColumnPinning: (updater: Updater<ColumnPinningState>) => void\n  /**\n   */\n  getPinnedLeafColumns: (\n    position: ColumnPinningPosition | 'center',\n  ) => Array<Column<TFeatures, TData, unknown>>\n  /**\n   */\n  getPinnedVisibleLeafColumns: (\n    position: ColumnPinningPosition | 'center',\n  ) => Array<Column<TFeatures, TData, unknown>>\n}\n"
  },
  {
    "path": "packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts",
    "content": "import {\n  column_getIsVisible,\n  row_getAllVisibleCells,\n  table_getVisibleLeafColumns,\n} from '../column-visibility/columnVisibilityFeature.utils'\nimport { buildHeaderGroups } from '../../core/headers/buildHeaderGroups'\nimport { callMemoOrStaticFn } from '../../utils'\nimport type { HeaderGroup } from '../../types/HeaderGroup'\nimport type { Cell } from '../../types/Cell'\nimport type { Row } from '../../types/Row'\nimport type { CellData, RowData, Updater } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Table_Internal } from '../../types/Table'\nimport type { Column_Internal } from '../../types/Column'\nimport type {\n  ColumnPinningPosition,\n  ColumnPinningState,\n} from './columnPinningFeature.types'\n\n// State\n\nexport function getDefaultColumnPinningState(): ColumnPinningState {\n  return structuredClone({\n    left: [],\n    right: [],\n  })\n}\n\n// Column APIs\n\nexport function column_pin<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n>(\n  column: Column_Internal<TFeatures, TData, TValue>,\n  position: ColumnPinningPosition,\n) {\n  const columnIds = column\n    .getLeafColumns()\n    .map((d) => d.id)\n    .filter(Boolean)\n\n  table_setColumnPinning(column.table, (old) => {\n    if (position === 'right') {\n      return {\n        left: old.left.filter((d) => !columnIds.includes(d)),\n        right: [\n          ...old.right.filter((d) => !columnIds.includes(d)),\n          ...columnIds,\n        ],\n      }\n    }\n\n    if (position === 'left') {\n      return {\n        left: [...old.left.filter((d) => !columnIds.includes(d)), ...columnIds],\n        right: old.right.filter((d) => !columnIds.includes(d)),\n      }\n    }\n\n    return {\n      left: old.left.filter((d) => !columnIds.includes(d)),\n      right: old.right.filter((d) => !columnIds.includes(d)),\n    }\n  })\n}\n\nexport function column_getCanPin<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n>(column: Column_Internal<TFeatures, TData, TValue>) {\n  const leafColumns = column.getLeafColumns() as Array<\n    Column_Internal<TFeatures, TData, TValue>\n  >\n\n  return leafColumns.some(\n    (leafColumn) =>\n      (leafColumn.columnDef.enablePinning ?? true) &&\n      (column.table.options.enableColumnPinning ?? true),\n  )\n}\n\nexport function column_getIsPinned<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n>(\n  column: Column_Internal<TFeatures, TData, TValue>,\n): ColumnPinningPosition | false {\n  const leafColumnIds = column.getLeafColumns().map((d) => d.id)\n\n  const { left, right } =\n    column.table.store.state.columnPinning ?? getDefaultColumnPinningState()\n\n  const isLeft = leafColumnIds.some((d) => left.includes(d))\n  const isRight = leafColumnIds.some((d) => right.includes(d))\n\n  return isLeft ? 'left' : isRight ? 'right' : false\n}\n\nexport function column_getPinnedIndex<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n>(column: Column_Internal<TFeatures, TData, TValue>) {\n  const position = column_getIsPinned(column)\n\n  return position\n    ? (column.table.store.state.columnPinning?.[position].indexOf(column.id) ??\n        -1)\n    : 0\n}\n\n// Row APIs\n\nexport function row_getCenterVisibleCells<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(row: Row<TFeatures, TData>) {\n  const allCells = callMemoOrStaticFn(\n    row,\n    'getAllVisibleCells',\n    row_getAllVisibleCells,\n  )\n  const { left, right } =\n    row.table.store.state.columnPinning ?? getDefaultColumnPinningState()\n  const leftAndRight: Array<string> = [...left, ...right]\n  return allCells.filter((d) => !leftAndRight.includes(d.column.id))\n}\n\nexport function row_getLeftVisibleCells<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(row: Row<TFeatures, TData>): Array<Cell<TFeatures, TData, unknown>> {\n  const allCells = callMemoOrStaticFn(\n    row,\n    'getAllVisibleCells',\n    row_getAllVisibleCells,\n  )\n  const { left } =\n    row.table.store.state.columnPinning ?? getDefaultColumnPinningState()\n  const cells = left\n    .map((columnId) => allCells.find((cell) => cell.column.id === columnId)!)\n    .filter(Boolean)\n  // Assign position property directly to preserve prototype chain\n  cells.forEach((cell) => {\n    cell.position = 'left'\n  })\n  return cells as any\n}\n\nexport function row_getRightVisibleCells<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(row: Row<TFeatures, TData>) {\n  const allCells = callMemoOrStaticFn(\n    row,\n    'getAllVisibleCells',\n    row_getAllVisibleCells,\n  )\n  const { right } =\n    row.table.store.state.columnPinning ?? getDefaultColumnPinningState()\n  const cells = right\n    .map((columnId) => allCells.find((cell) => cell.column.id === columnId)!)\n    .filter(Boolean)\n  // Assign position property directly to preserve prototype chain\n  cells.forEach((cell) => {\n    cell.position = 'right'\n  })\n  return cells as any\n}\n\n// Table APIs\n\nexport function table_setColumnPinning<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  table: Table_Internal<TFeatures, TData>,\n  updater: Updater<ColumnPinningState>,\n) {\n  table.options.onColumnPinningChange?.(updater)\n}\n\nexport function table_resetColumnPinning<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>, defaultState?: boolean) {\n  table_setColumnPinning(\n    table,\n    defaultState\n      ? getDefaultColumnPinningState()\n      : (table.initialState.columnPinning ?? getDefaultColumnPinningState()),\n  )\n}\n\nexport function table_getIsSomeColumnsPinned<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>, position?: ColumnPinningPosition) {\n  const pinningState = table.store.state.columnPinning\n\n  if (!position) {\n    return Boolean(pinningState?.left.length || pinningState?.right.length)\n  }\n  return Boolean(pinningState?.[position].length)\n}\n\n// header groups\n\nexport function table_getLeftHeaderGroups<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>) {\n  const allColumns = table.getAllColumns()\n  const leafColumns = callMemoOrStaticFn(\n    table,\n    'getVisibleLeafColumns',\n    table_getVisibleLeafColumns,\n  ) as Array<Column_Internal<TFeatures, TData, unknown>>\n  const { left } =\n    table.store.state.columnPinning ?? getDefaultColumnPinningState()\n\n  const orderedLeafColumns = left\n    .map((columnId) => leafColumns.find((d) => d.id === columnId)!)\n    .filter(Boolean)\n\n  return buildHeaderGroups(allColumns, orderedLeafColumns, table, 'left')\n}\n\nexport function table_getRightHeaderGroups<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>) {\n  const allColumns = table.getAllColumns()\n  const leafColumns = callMemoOrStaticFn(\n    table,\n    'getVisibleLeafColumns',\n    table_getVisibleLeafColumns,\n  ) as unknown as Array<Column_Internal<TFeatures, TData, unknown>>\n  const { right } =\n    table.store.state.columnPinning ?? getDefaultColumnPinningState()\n\n  const orderedLeafColumns = right\n    .map((columnId) => leafColumns.find((d) => d.id === columnId)!)\n    .filter(Boolean)\n\n  return buildHeaderGroups(allColumns, orderedLeafColumns, table, 'right')\n}\n\nexport function table_getCenterHeaderGroups<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  table: Table_Internal<TFeatures, TData>,\n): Array<HeaderGroup<TFeatures, TData>> {\n  const allColumns = table.getAllColumns()\n  let leafColumns = callMemoOrStaticFn(\n    table,\n    'getVisibleLeafColumns',\n    table_getVisibleLeafColumns,\n  ) as unknown as Array<Column_Internal<TFeatures, TData, unknown>>\n  const { left, right } =\n    table.store.state.columnPinning ?? getDefaultColumnPinningState()\n  const leftAndRight: Array<string> = [...left, ...right]\n\n  leafColumns = leafColumns.filter(\n    (column) => !leftAndRight.includes(column.id),\n  )\n  return buildHeaderGroups(allColumns, leafColumns, table, 'center')\n}\n\n// footer groups\n\nexport function table_getLeftFooterGroups<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>) {\n  const headerGroups = callMemoOrStaticFn(\n    table,\n    'getLeftHeaderGroups',\n    table_getLeftHeaderGroups,\n  )\n  return [...headerGroups].reverse()\n}\n\nexport function table_getRightFooterGroups<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>) {\n  const headerGroups = callMemoOrStaticFn(\n    table,\n    'getRightHeaderGroups',\n    table_getRightHeaderGroups,\n  )\n  return [...headerGroups].reverse()\n}\n\nexport function table_getCenterFooterGroups<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>) {\n  const headerGroups = callMemoOrStaticFn(\n    table,\n    'getCenterHeaderGroups',\n    table_getCenterHeaderGroups,\n  )\n  return [...headerGroups].reverse()\n}\n\n// flat headers\n\nexport function table_getLeftFlatHeaders<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>) {\n  const leftHeaderGroups = callMemoOrStaticFn(\n    table,\n    'getLeftHeaderGroups',\n    table_getLeftHeaderGroups,\n  )\n  return leftHeaderGroups\n    .map((headerGroup) => {\n      return headerGroup.headers\n    })\n    .flat()\n}\n\nexport function table_getRightFlatHeaders<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>) {\n  const rightHeaderGroups = callMemoOrStaticFn(\n    table,\n    'getRightHeaderGroups',\n    table_getRightHeaderGroups,\n  )\n  return rightHeaderGroups\n    .map((headerGroup) => {\n      return headerGroup.headers\n    })\n    .flat()\n}\n\nexport function table_getCenterFlatHeaders<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>) {\n  const centerHeaderGroups = callMemoOrStaticFn(\n    table,\n    'getCenterHeaderGroups',\n    table_getCenterHeaderGroups,\n  )\n  return centerHeaderGroups\n    .map((headerGroup) => {\n      return headerGroup.headers\n    })\n    .flat()\n}\n\n// leaf headers\n\nexport function table_getLeftLeafHeaders<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>) {\n  return callMemoOrStaticFn(\n    table,\n    'getLeftFlatHeaders',\n    table_getLeftFlatHeaders,\n  ).filter((header) => !header.subHeaders.length)\n}\n\nexport function table_getRightLeafHeaders<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>) {\n  return callMemoOrStaticFn(\n    table,\n    'getRightFlatHeaders',\n    table_getRightFlatHeaders,\n  ).filter((header) => !header.subHeaders.length)\n}\n\nexport function table_getCenterLeafHeaders<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>) {\n  return callMemoOrStaticFn(\n    table,\n    'getCenterFlatHeaders',\n    table_getCenterFlatHeaders,\n  ).filter((header) => !header.subHeaders.length)\n}\n\n// leaf columns\n\nexport function table_getLeftLeafColumns<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>) {\n  const { left } =\n    table.store.state.columnPinning ?? getDefaultColumnPinningState()\n  return left\n    .map(\n      (columnId) =>\n        table.getAllLeafColumns().find((column) => column.id === columnId)!,\n    )\n    .filter(Boolean)\n}\n\nexport function table_getRightLeafColumns<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>) {\n  const { right } =\n    table.store.state.columnPinning ?? getDefaultColumnPinningState()\n  return right\n    .map(\n      (columnId) =>\n        table.getAllLeafColumns().find((column) => column.id === columnId)!,\n    )\n    .filter(Boolean)\n}\n\nexport function table_getCenterLeafColumns<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>) {\n  const { left, right } =\n    table.store.state.columnPinning ?? getDefaultColumnPinningState()\n  const leftAndRight: Array<string> = [...left, ...right]\n  return table.getAllLeafColumns().filter((d) => !leftAndRight.includes(d.id))\n}\n\nexport function table_getPinnedLeafColumns<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  table: Table_Internal<TFeatures, TData>,\n  position: ColumnPinningPosition | 'center',\n) {\n  return !position\n    ? table.getAllLeafColumns()\n    : position === 'left'\n      ? callMemoOrStaticFn(\n          table,\n          'getLeftLeafColumns',\n          table_getLeftLeafColumns,\n        )\n      : position === 'right'\n        ? callMemoOrStaticFn(\n            table,\n            'getRightLeafColumns',\n            table_getRightLeafColumns,\n          )\n        : callMemoOrStaticFn(\n            table,\n            'getCenterLeafColumns',\n            table_getCenterLeafColumns,\n          )\n}\n\n// visible leaf columns\n\nexport function table_getLeftVisibleLeafColumns<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>) {\n  return callMemoOrStaticFn(\n    table,\n    'getLeftLeafColumns',\n    table_getLeftLeafColumns,\n  ).filter((column) =>\n    callMemoOrStaticFn(column, 'getIsVisible', column_getIsVisible),\n  )\n}\n\nexport function table_getRightVisibleLeafColumns<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>) {\n  return callMemoOrStaticFn(\n    table,\n    'getRightLeafColumns',\n    table_getRightLeafColumns,\n  ).filter((column) =>\n    callMemoOrStaticFn(column, 'getIsVisible', column_getIsVisible),\n  )\n}\n\nexport function table_getCenterVisibleLeafColumns<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>) {\n  return callMemoOrStaticFn(\n    table,\n    'getCenterLeafColumns',\n    table_getCenterLeafColumns,\n  ).filter((column) =>\n    callMemoOrStaticFn(column, 'getIsVisible', column_getIsVisible),\n  )\n}\n\nexport function table_getPinnedVisibleLeafColumns<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  table: Table_Internal<TFeatures, TData>,\n  position?: ColumnPinningPosition | 'center',\n) {\n  return !position\n    ? callMemoOrStaticFn(\n        table,\n        'getVisibleLeafColumns',\n        table_getVisibleLeafColumns,\n      )\n    : position === 'left'\n      ? callMemoOrStaticFn(\n          table,\n          'getLeftVisibleLeafColumns',\n          table_getLeftVisibleLeafColumns,\n        )\n      : position === 'right'\n        ? callMemoOrStaticFn(\n            table,\n            'getRightVisibleLeafColumns',\n            table_getRightVisibleLeafColumns,\n          )\n        : callMemoOrStaticFn(\n            table,\n            'getCenterVisibleLeafColumns',\n            table_getCenterVisibleLeafColumns,\n          )\n}\n"
  },
  {
    "path": "packages/table-core/src/features/column-resizing/columnResizingFeature.ts",
    "content": "import {\n  assignPrototypeAPIs,\n  assignTableAPIs,\n  makeStateUpdater,\n} from '../../utils'\nimport {\n  column_getCanResize,\n  column_getIsResizing,\n  getDefaultColumnResizingState,\n  header_getResizeHandler,\n  table_resetHeaderSizeInfo,\n  table_setColumnResizing,\n} from './columnResizingFeature.utils'\nimport type { RowData } from '../../types/type-utils'\nimport type { TableFeature, TableFeatures } from '../../types/TableFeatures'\n// import type {\n//   Column_ColumnResizing,\n//   Header_ColumnResizing,\n//   TableOptions_ColumnResizing,\n//   TableState_ColumnResizing,\n//   Table_ColumnResizing,\n// } from './columnResizingFeature.types'\n\ninterface ColumnResizingFeatureConstructors<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  // Column: Column_ColumnResizing\n  // Header: Header_ColumnResizing\n  // Table: Table_ColumnResizing\n  // TableOptions: TableOptions_ColumnResizing\n  // TableState: TableState_ColumnResizing\n}\n\nexport function constructColumnResizingFeature<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(): TableFeature<ColumnResizingFeatureConstructors<TFeatures, TData>> {\n  return {\n    getInitialState: (initialState) => {\n      return {\n        columnResizing: getDefaultColumnResizingState(),\n        ...initialState,\n      }\n    },\n\n    getDefaultTableOptions: (table) => {\n      return {\n        columnResizeMode: 'onEnd',\n        columnResizeDirection: 'ltr',\n        onColumnResizingChange: makeStateUpdater('columnResizing', table),\n      }\n    },\n\n    assignColumnPrototype: (prototype, table) => {\n      assignPrototypeAPIs('columnResizingFeature', prototype, table, {\n        column_getCanResize: {\n          fn: (column) => column_getCanResize(column),\n        },\n        column_getIsResizing: {\n          fn: (column) => column_getIsResizing(column),\n        },\n      })\n    },\n\n    assignHeaderPrototype: (prototype, table) => {\n      assignPrototypeAPIs('columnResizingFeature', prototype, table, {\n        header_getResizeHandler: {\n          fn: (header, _contextDocument) =>\n            header_getResizeHandler(header, _contextDocument),\n        },\n      })\n    },\n\n    constructTableAPIs: (table) => {\n      assignTableAPIs('columnResizingFeature', table, {\n        table_setColumnResizing: {\n          fn: (updater) => table_setColumnResizing(table, updater),\n        },\n        table_resetHeaderSizeInfo: {\n          fn: (defaultState) => table_resetHeaderSizeInfo(table, defaultState),\n        },\n      })\n    },\n  }\n}\n\n/**\n * The Column Resizing feature adds column resizing state and APIs to the table and column objects.\n * **Note:** This is dependent on the Column Sizing feature.\n */\nexport const columnResizingFeature = constructColumnResizingFeature()\n"
  },
  {
    "path": "packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts",
    "content": "import type { OnChangeFn, Updater } from '../../types/type-utils'\n\nexport interface TableState_ColumnResizing {\n  columnResizing: columnResizingState\n}\n\nexport interface columnResizingState {\n  columnSizingStart: Array<[string, number]>\n  deltaOffset: null | number\n  deltaPercentage: null | number\n  isResizingColumn: false | string\n  startOffset: null | number\n  startSize: null | number\n}\n\nexport type ColumnResizeMode = 'onChange' | 'onEnd'\n\nexport type ColumnResizeDirection = 'ltr' | 'rtl'\n\nexport interface TableOptions_ColumnResizing {\n  /**\n   * Determines when the columnSizing state is updated. `onChange` updates the state when the user is dragging the resize handle. `onEnd` updates the state when the user releases the resize handle.\n   */\n  columnResizeMode?: ColumnResizeMode\n  /**\n   * Enables or disables column resizing for the column.\n   */\n  enableColumnResizing?: boolean\n  /**\n   * Enables or disables right-to-left support for resizing the column. defaults to 'ltr'.\n   */\n  columnResizeDirection?: ColumnResizeDirection\n  /**\n   * If provided, this function will be called with an `updaterFn` when `state.columnResizing` changes. This overrides the default internal state management, so you will also need to supply `state.columnResizing` from your own managed state.\n   */\n  onColumnResizingChange?: OnChangeFn<columnResizingState>\n}\n\nexport type ColumnResizingDefaultOptions = Pick<\n  TableOptions_ColumnResizing,\n  'columnResizeMode' | 'onColumnResizingChange' | 'columnResizeDirection'\n>\n\nexport interface Table_ColumnResizing {\n  /**\n   * Resets column sizing info to its initial state. If `defaultState` is `true`, the default state for the table will be used instead of the initialValue provided to the table.\n   */\n  resetHeaderSizeInfo: (defaultState?: boolean) => void\n  /**\n   * Sets the column sizing info state using an updater function or a value. This will trigger the underlying `oncolumnResizingChange` function if one is passed to the table options, otherwise the state will be managed automatically by the table.\n   */\n  setcolumnResizing: (updater: Updater<columnResizingState>) => void\n}\n\nexport interface ColumnDef_ColumnResizing {\n  /**\n   * Enables or disables column resizing for the column.\n   */\n  enableResizing?: boolean\n}\n\nexport interface Column_ColumnResizing {\n  /**\n   * Returns `true` if the column can be resized.\n   */\n  getCanResize: () => boolean\n  /**\n   * Returns `true` if the column is currently being resized.\n   */\n  getIsResizing: () => boolean\n}\n\nexport interface Header_ColumnResizing {\n  /**\n   * Returns an event handler function that can be used to resize the header. It can be used as an:\n   * - `onMouseDown` handler\n   * - `onTouchStart` handler\n   * The dragging and release events are automatically handled for you.\n   */\n  getResizeHandler: (context?: Document) => (event: unknown) => void\n}\n"
  },
  {
    "path": "packages/table-core/src/features/column-resizing/columnResizingFeature.utils.ts",
    "content": "import {\n  column_getSize,\n  header_getSize,\n  table_setColumnSizing,\n} from '../column-sizing/columnSizingFeature.utils'\nimport { table_getColumn } from '../../core/columns/coreColumnsFeature.utils'\nimport type { CellData, RowData, Updater } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Table_Internal } from '../../types/Table'\nimport type { Header } from '../../types/Header'\nimport type { Column_Internal } from '../../types/Column'\nimport type { ColumnSizingState } from '../column-sizing/columnSizingFeature.types'\nimport type { columnResizingState } from './columnResizingFeature.types'\n\nexport function getDefaultColumnResizingState(): columnResizingState {\n  return structuredClone({\n    startOffset: null,\n    startSize: null,\n    deltaOffset: null,\n    deltaPercentage: null,\n    isResizingColumn: false,\n    columnSizingStart: [],\n  })\n}\n\nexport function column_getCanResize<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n>(column: Column_Internal<TFeatures, TData, TValue>) {\n  return (\n    (column.columnDef.enableResizing ?? true) &&\n    (column.table.options.enableColumnResizing ?? true)\n  )\n}\n\nexport function column_getIsResizing<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n>(column: Column_Internal<TFeatures, TData, TValue>) {\n  return column.table.store.state.columnResizing?.isResizingColumn === column.id\n}\n\nexport function header_getResizeHandler<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n>(header: Header<TFeatures, TData, TValue>, _contextDocument?: Document) {\n  const column = table_getColumn(header.column.table, header.column.id)!\n  const canResize = column_getCanResize(column)\n\n  return (event: unknown) => {\n    if (!canResize) {\n      return\n    }\n\n    ;(event as any).persist?.()\n\n    if (isTouchStartEvent(event)) {\n      // lets not respond to multiple touches (e.g. 2 or 3 fingers)\n      if (event.touches.length > 1) {\n        return\n      }\n    }\n\n    const startSize = header_getSize(header)\n\n    const columnSizingStart: Array<[string, number]> = header\n      .getLeafHeaders()\n      .map((leafHeader) => [\n        leafHeader.column.id,\n        column_getSize(leafHeader.column),\n      ])\n\n    const clientX = isTouchStartEvent(event)\n      ? Math.round(event.touches[0]!.clientX)\n      : (event as MouseEvent).clientX\n\n    const newColumnSizing: ColumnSizingState = {}\n\n    const updateOffset = (eventType: 'move' | 'end', clientXPos?: number) => {\n      if (typeof clientXPos !== 'number') {\n        return\n      }\n\n      table_setColumnResizing(column.table, (old) => {\n        const deltaDirection =\n          column.table.options.columnResizeDirection === 'rtl' ? -1 : 1\n        const deltaOffset =\n          (clientXPos - (old.startOffset ?? 0)) * deltaDirection\n        const deltaPercentage = Math.max(\n          deltaOffset / (old.startSize ?? 0),\n          -0.999999,\n        )\n\n        old.columnSizingStart.forEach(([columnId, headerSize]) => {\n          newColumnSizing[columnId] =\n            Math.round(\n              Math.max(headerSize + headerSize * deltaPercentage, 0) * 100,\n            ) / 100\n        })\n\n        return {\n          ...old,\n          deltaOffset,\n          deltaPercentage,\n        }\n      })\n\n      if (\n        column.table.options.columnResizeMode === 'onChange' ||\n        eventType === 'end'\n      ) {\n        table_setColumnSizing(column.table, (old) => ({\n          ...old,\n          ...newColumnSizing,\n        }))\n      }\n    }\n\n    const onMove = (clientXPos?: number) => updateOffset('move', clientXPos)\n\n    const onEnd = (clientXPos?: number) => {\n      updateOffset('end', clientXPos)\n\n      table_setColumnResizing(column.table, (old) => ({\n        ...old,\n        isResizingColumn: false,\n        startOffset: null,\n        startSize: null,\n        deltaOffset: null,\n        deltaPercentage: null,\n        columnSizingStart: [],\n      }))\n    }\n\n    const contextDocument =\n      _contextDocument || typeof document !== 'undefined' ? document : null\n\n    const mouseEvents = {\n      moveHandler: (e: MouseEvent) => onMove(e.clientX),\n      upHandler: (e: MouseEvent) => {\n        contextDocument?.removeEventListener(\n          'mousemove',\n          mouseEvents.moveHandler,\n        )\n        contextDocument?.removeEventListener('mouseup', mouseEvents.upHandler)\n        onEnd(e.clientX)\n      },\n    }\n\n    const touchEvents = {\n      moveHandler: (touchEvent: TouchEvent) => {\n        if (touchEvent.cancelable) {\n          touchEvent.preventDefault()\n          touchEvent.stopPropagation()\n        }\n        onMove(touchEvent.touches[0]!.clientX)\n        return false\n      },\n      upHandler: (e: TouchEvent) => {\n        contextDocument?.removeEventListener(\n          'touchmove',\n          touchEvents.moveHandler,\n        )\n        contextDocument?.removeEventListener('touchend', touchEvents.upHandler)\n        if (e.cancelable) {\n          e.preventDefault()\n          e.stopPropagation()\n        }\n        onEnd(e.touches[0]?.clientX)\n      },\n    }\n\n    const passiveIfSupported = passiveEventSupported()\n      ? { passive: false }\n      : false\n\n    if (isTouchStartEvent(event)) {\n      contextDocument?.addEventListener(\n        'touchmove',\n        touchEvents.moveHandler,\n        passiveIfSupported,\n      )\n      contextDocument?.addEventListener(\n        'touchend',\n        touchEvents.upHandler,\n        passiveIfSupported,\n      )\n    } else {\n      contextDocument?.addEventListener(\n        'mousemove',\n        mouseEvents.moveHandler,\n        passiveIfSupported,\n      )\n      contextDocument?.addEventListener(\n        'mouseup',\n        mouseEvents.upHandler,\n        passiveIfSupported,\n      )\n    }\n\n    table_setColumnResizing(column.table, (old) => ({\n      ...old,\n      startOffset: clientX,\n      startSize,\n      deltaOffset: 0,\n      deltaPercentage: 0,\n      columnSizingStart,\n      isResizingColumn: column.id,\n    }))\n  }\n}\n\nexport function table_setColumnResizing<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  table: Table_Internal<TFeatures, TData>,\n  updater: Updater<columnResizingState>,\n) {\n  table.options.onColumnResizingChange?.(updater)\n}\n\nexport function table_resetHeaderSizeInfo<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>, defaultState?: boolean) {\n  table_setColumnResizing(\n    table,\n    defaultState\n      ? getDefaultColumnResizingState()\n      : (table.initialState.columnResizing ?? getDefaultColumnResizingState()),\n  )\n}\n\nexport function passiveEventSupported() {\n  let passiveSupported: boolean | null = null\n\n  if (typeof passiveSupported === 'boolean') return passiveSupported\n\n  let supported = false\n  try {\n    const options = {\n      get passive() {\n        supported = true\n        return false\n      },\n    }\n\n    const noop = () => {}\n\n    window.addEventListener('test', noop, options)\n    window.removeEventListener('test', noop)\n  } catch (err) {\n    supported = false\n  }\n  passiveSupported = supported\n  return passiveSupported\n}\n\nexport function isTouchStartEvent(e: unknown): e is TouchEvent {\n  return (e as TouchEvent).type === 'touchstart'\n}\n"
  },
  {
    "path": "packages/table-core/src/features/column-sizing/columnSizingFeature.ts",
    "content": "import {\n  assignPrototypeAPIs,\n  assignTableAPIs,\n  callMemoOrStaticFn,\n  makeStateUpdater,\n} from '../../utils'\nimport { table_getPinnedVisibleLeafColumns } from '../column-pinning/columnPinningFeature.utils'\nimport {\n  column_getAfter,\n  column_getSize,\n  column_getStart,\n  column_resetSize,\n  getDefaultColumnSizingColumnDef,\n  getDefaultColumnSizingState,\n  header_getSize,\n  header_getStart,\n  table_getCenterTotalSize,\n  table_getLeftTotalSize,\n  table_getRightTotalSize,\n  table_getTotalSize,\n  table_resetColumnSizing,\n  table_setColumnSizing,\n} from './columnSizingFeature.utils'\nimport type { RowData } from '../../types/type-utils'\nimport type { TableFeature, TableFeatures } from '../../types/TableFeatures'\n// import type {\n//   ColumnDef_ColumnSizing,\n//   Column_ColumnSizing,\n//   Header_ColumnSizing,\n//   TableOptions_ColumnSizing,\n//   TableState_ColumnSizing,\n//   Table_ColumnSizing,\n// } from './columnSizingFeature.types'\n\ninterface ColumnSizingFeatureConstructors<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  // ColumnDef: ColumnDef_ColumnSizing\n  // Column: Column_ColumnSizing\n  // Header: Header_ColumnSizing\n  // Table: Table_ColumnSizing\n  // TableOptions: TableOptions_ColumnSizing\n  // TableState: TableState_ColumnSizing\n}\n\nexport function constructColumnSizingFeature<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(): TableFeature<ColumnSizingFeatureConstructors<TFeatures, TData>> {\n  return {\n    getInitialState: (initialState) => {\n      return {\n        columnSizing: getDefaultColumnSizingState(),\n        ...initialState,\n      }\n    },\n\n    getDefaultColumnDef: () => {\n      return getDefaultColumnSizingColumnDef()\n    },\n\n    getDefaultTableOptions: (table) => {\n      return {\n        onColumnSizingChange: makeStateUpdater('columnSizing', table),\n      }\n    },\n\n    assignColumnPrototype: (prototype, table) => {\n      assignPrototypeAPIs('columnSizingFeature', prototype, table, {\n        column_getSize: {\n          fn: (column) => column_getSize(column),\n        },\n        column_getStart: {\n          fn: (column, position) => column_getStart(column, position),\n          memoDeps: (column, position) => [\n            position,\n            callMemoOrStaticFn(\n              column.table,\n              'getPinnedVisibleLeafColumns',\n              table_getPinnedVisibleLeafColumns,\n              position,\n            ),\n            column.table.store.state.columnSizing,\n          ],\n        },\n        column_getAfter: {\n          fn: (column, position) => column_getAfter(column, position),\n          memoDeps: (column, position) => [\n            position,\n            callMemoOrStaticFn(\n              column.table,\n              'getPinnedVisibleLeafColumns',\n              table_getPinnedVisibleLeafColumns,\n              position,\n            ),\n            column.table.store.state.columnSizing,\n          ],\n        },\n        column_resetSize: {\n          fn: (column) => column_resetSize(column),\n        },\n      })\n    },\n\n    assignHeaderPrototype: (prototype, table) => {\n      assignPrototypeAPIs('columnSizingFeature', prototype, table, {\n        header_getSize: {\n          fn: (header) => header_getSize(header),\n        },\n        header_getStart: {\n          fn: (header) => header_getStart(header),\n        },\n      })\n    },\n\n    constructTableAPIs: (table) => {\n      assignTableAPIs('columnSizingFeature', table, {\n        table_setColumnSizing: {\n          fn: (updater) => table_setColumnSizing(table, updater),\n        },\n        table_resetColumnSizing: {\n          fn: (defaultState) => table_resetColumnSizing(table, defaultState),\n        },\n        table_getTotalSize: {\n          fn: () => table_getTotalSize(table),\n        },\n        table_getLeftTotalSize: {\n          fn: () => table_getLeftTotalSize(table),\n        },\n        table_getCenterTotalSize: {\n          fn: () => table_getCenterTotalSize(table),\n        },\n        table_getRightTotalSize: {\n          fn: () => table_getRightTotalSize(table),\n        },\n      })\n    },\n  }\n}\n\n/**\n * The Column Sizing feature adds column sizing state and APIs to the table, header, and column objects.\n * **Note:** This does not include column resizing. The columnResizingFeature feature has been split out into its own standalone feature.\n */\nexport const columnSizingFeature = constructColumnSizingFeature()\n"
  },
  {
    "path": "packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts",
    "content": "import type { OnChangeFn, Updater } from '../../types/type-utils'\nimport type { ColumnPinningPosition } from '../column-pinning/columnPinningFeature.types'\n\nexport interface TableState_ColumnSizing {\n  columnSizing: ColumnSizingState\n}\n\nexport type ColumnSizingState = Record<string, number>\n\nexport interface TableOptions_ColumnSizing {\n  /**\n   * If provided, this function will be called with an `updaterFn` when `state.columnSizing` changes. This overrides the default internal state management, so you will also need to supply `state.columnSizing` from your own managed state.\n   */\n  onColumnSizingChange?: OnChangeFn<ColumnSizingState>\n}\n\nexport type ColumnSizingDefaultOptions = Pick<\n  TableOptions_ColumnSizing,\n  'onColumnSizingChange'\n>\n\nexport interface Table_ColumnSizing {\n  /**\n   * If pinning, returns the total size of the center portion of the table by calculating the sum of the sizes of all unpinned/center leaf-columns.\n   */\n  getCenterTotalSize: () => number\n  /**\n   * Returns the total size of the left portion of the table by calculating the sum of the sizes of all left leaf-columns.\n   */\n  getLeftTotalSize: () => number\n  /**\n   * Returns the total size of the right portion of the table by calculating the sum of the sizes of all right leaf-columns.\n   */\n  getRightTotalSize: () => number\n  /**\n   * Returns the total size of the table by calculating the sum of the sizes of all leaf-columns.\n   */\n  getTotalSize: () => number\n  /**\n   * Resets column sizing to its initial state. If `defaultState` is `true`, the default state for the table will be used instead of the initialValue provided to the table.\n   */\n  resetColumnSizing: (defaultState?: boolean) => void\n  /**\n   * Sets the column sizing state using an updater function or a value. This will trigger the underlying `onColumnSizingChange` function if one is passed to the table options, otherwise the state will be managed automatically by the table.\n   */\n  setColumnSizing: (updater: Updater<ColumnSizingState>) => void\n}\n\nexport interface ColumnDef_ColumnSizing {\n  /**\n   * The maximum allowed size for the column\n   */\n  maxSize?: number\n  /**\n   * The minimum allowed size for the column\n   */\n  minSize?: number\n  /**\n   * The desired size for the column\n   */\n  size?: number\n}\n\nexport interface Column_ColumnSizing {\n  /**\n   * Returns the offset measurement along the row-axis (usually the x-axis for standard tables) for the header. This is effectively a sum of the offset measurements of all succeeding (right) headers in relation to the current column.\n   */\n  getAfter: (position?: ColumnPinningPosition | 'center') => number\n  /**\n   * Returns the current size of the column.\n   */\n  getSize: () => number\n  /**\n   * Returns the offset measurement along the row-axis (usually the x-axis for standard tables) for the header. This is effectively a sum of the offset measurements of all preceding (left) headers in relation to the current column.\n   */\n  getStart: (position?: ColumnPinningPosition | 'center') => number\n  /**\n   * Resets the column to its initial size.\n   */\n  resetSize: () => void\n}\n\nexport interface Header_ColumnSizing {\n  /**\n   * Returns the current size of the header.\n   */\n  getSize: () => number\n  /**\n   * Returns the offset measurement along the row-axis (usually the x-axis for standard tables) for the header. This is effectively a sum of the offset measurements of all preceding headers.\n   */\n  getStart: (position?: ColumnPinningPosition) => number\n}\n"
  },
  {
    "path": "packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts",
    "content": "import {\n  table_getCenterHeaderGroups,\n  table_getLeftHeaderGroups,\n  table_getPinnedVisibleLeafColumns,\n  table_getRightHeaderGroups,\n} from '../column-pinning/columnPinningFeature.utils'\nimport { column_getIndex } from '../column-ordering/columnOrderingFeature.utils'\nimport { callMemoOrStaticFn } from '../../utils'\nimport type { ColumnPinningPosition } from '../column-pinning/columnPinningFeature.types'\nimport type { CellData, RowData, Updater } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Table_Internal } from '../../types/Table'\nimport type { Header } from '../../types/Header'\nimport type { Column_Internal } from '../../types/Column'\nimport type { ColumnSizingState } from './columnSizingFeature.types'\n\nexport function getDefaultColumnSizingState(): ColumnSizingState {\n  return structuredClone({})\n}\n\nexport function getDefaultColumnSizingColumnDef() {\n  return structuredClone({\n    size: 150,\n    minSize: 20,\n    maxSize: Number.MAX_SAFE_INTEGER,\n  })\n}\n\nexport function column_getSize<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n>(column: Column_Internal<TFeatures, TData, TValue>): number {\n  const defaultSizes = getDefaultColumnSizingColumnDef()\n  const columnSize = column.table.store.state.columnSizing?.[column.id]\n\n  return Math.min(\n    Math.max(\n      column.columnDef.minSize ?? defaultSizes.minSize,\n      columnSize ?? column.columnDef.size ?? defaultSizes.size,\n    ),\n    column.columnDef.maxSize ?? defaultSizes.maxSize,\n  )\n}\n\nexport function column_getStart<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n>(\n  column: Column_Internal<TFeatures, TData, TValue>,\n  position: ColumnPinningPosition | 'center',\n): number {\n  const visibleLeafColumns = callMemoOrStaticFn(\n    column.table,\n    'getPinnedVisibleLeafColumns',\n    table_getPinnedVisibleLeafColumns,\n    position,\n  )\n\n  return visibleLeafColumns\n    .slice(0, callMemoOrStaticFn(column, 'getIndex', column_getIndex, position))\n    .reduce((sum: number, c) => sum + column_getSize(c), 0)\n}\n\nexport function column_getAfter<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n>(\n  column: Column_Internal<TFeatures, TData, TValue>,\n  position: ColumnPinningPosition | 'center',\n): number {\n  const visibleLeafColumns = callMemoOrStaticFn(\n    column.table,\n    'getPinnedVisibleLeafColumns',\n    table_getPinnedVisibleLeafColumns,\n    position,\n  )\n\n  return visibleLeafColumns\n    .slice(\n      callMemoOrStaticFn(column, 'getIndex', column_getIndex, position) + 1,\n    )\n    .reduce((sum: number, c) => sum + column_getSize(c), 0)\n}\n\nexport function column_resetSize<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n>(column: Column_Internal<TFeatures, TData, TValue>) {\n  table_setColumnSizing(column.table, ({ [column.id]: _, ...rest }) => {\n    return rest\n  })\n}\n\nexport function header_getSize<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n>(header: Header<TFeatures, TData, TValue>) {\n  let sum = 0\n\n  const recurse = (h: Header<TFeatures, TData, TValue>) => {\n    if (h.subHeaders.length) {\n      h.subHeaders.forEach(recurse)\n    } else {\n      sum += column_getSize(h.column)\n    }\n  }\n\n  recurse(header)\n\n  return sum\n}\n\nexport function header_getStart<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n>(header: Header<TFeatures, TData, TValue>): number {\n  if (header.index > 0) {\n    const prevSiblingHeader = header.headerGroup?.headers[header.index - 1]\n    if (prevSiblingHeader) {\n      return (\n        header_getStart(prevSiblingHeader) + header_getSize(prevSiblingHeader)\n      )\n    }\n  }\n\n  return 0\n}\n\n// Table APIs\n\nexport function table_setColumnSizing<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  table: Table_Internal<TFeatures, TData>,\n  updater: Updater<ColumnSizingState>,\n) {\n  table.options.onColumnSizingChange?.(updater)\n}\n\nexport function table_resetColumnSizing<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>, defaultState?: boolean) {\n  table_setColumnSizing(\n    table,\n    defaultState ? {} : (table.initialState.columnSizing ?? {}),\n  )\n}\n\nexport function table_getTotalSize<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>) {\n  return (\n    table.getHeaderGroups()[0]?.headers.reduce((sum, header) => {\n      return sum + header_getSize(header)\n    }, 0) ?? 0\n  )\n}\n\nexport function table_getLeftTotalSize<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>) {\n  return (\n    callMemoOrStaticFn(\n      table,\n      'getLeftHeaderGroups',\n      table_getLeftHeaderGroups,\n    )[0]?.headers.reduce((sum: number, header: Header<TFeatures, TData>) => {\n      return sum + header_getSize(header)\n    }, 0) ?? 0\n  )\n}\n\nexport function table_getCenterTotalSize<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>) {\n  return (\n    callMemoOrStaticFn(\n      table,\n      'getCenterHeaderGroups',\n      table_getCenterHeaderGroups,\n    )[0]?.headers.reduce((sum: number, header: Header<TFeatures, TData>) => {\n      return sum + header_getSize(header)\n    }, 0) ?? 0\n  )\n}\n\nexport function table_getRightTotalSize<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>) {\n  return (\n    callMemoOrStaticFn(\n      table,\n      'getRightHeaderGroups',\n      table_getRightHeaderGroups,\n    )[0]?.headers.reduce((sum: number, header: Header<TFeatures, TData>) => {\n      return sum + header_getSize(header)\n    }, 0) ?? 0\n  )\n}\n"
  },
  {
    "path": "packages/table-core/src/features/column-visibility/columnVisibilityFeature.ts",
    "content": "import {\n  assignPrototypeAPIs,\n  assignTableAPIs,\n  makeStateUpdater,\n} from '../../utils'\nimport {\n  row_getCenterVisibleCells,\n  row_getLeftVisibleCells,\n  row_getRightVisibleCells,\n} from '../column-pinning/columnPinningFeature.utils'\nimport {\n  column_getCanHide,\n  column_getIsVisible,\n  column_getToggleVisibilityHandler,\n  column_toggleVisibility,\n  getDefaultColumnVisibilityState,\n  row_getAllVisibleCells,\n  row_getVisibleCells,\n  table_getIsAllColumnsVisible,\n  table_getIsSomeColumnsVisible,\n  table_getToggleAllColumnsVisibilityHandler,\n  table_getVisibleFlatColumns,\n  table_getVisibleLeafColumns,\n  table_resetColumnVisibility,\n  table_setColumnVisibility,\n  table_toggleAllColumnsVisible,\n} from './columnVisibilityFeature.utils'\nimport type { RowData } from '../../types/type-utils'\nimport type { TableFeature, TableFeatures } from '../../types/TableFeatures'\n// import type {\n//   ColumnDef_ColumnVisibility,\n//   Column_ColumnVisibility,\n//   Row_ColumnVisibility,\n//   TableOptions_ColumnVisibility,\n//   TableState_ColumnVisibility,\n//   Table_ColumnVisibility,\n// } from './columnVisibilityFeature.types'\n\ninterface ColumnVisibilityFeatureConstructors<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  // ColumnDef: ColumnDef_ColumnVisibility\n  // Column: Column_ColumnVisibility\n  // Row: Row_ColumnVisibility<TFeatures, TData>\n  // Table: Table_ColumnVisibility<TFeatures, TData>\n  // TableOptions: TableOptions_ColumnVisibility\n  // TableState: TableState_ColumnVisibility\n}\n\nexport function constructColumnVisibilityFeature<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(): TableFeature<ColumnVisibilityFeatureConstructors<TFeatures, TData>> {\n  return {\n    getInitialState: (initialState) => {\n      return {\n        columnVisibility: getDefaultColumnVisibilityState(),\n        ...initialState,\n      }\n    },\n\n    getDefaultTableOptions: (table) => {\n      return {\n        onColumnVisibilityChange: makeStateUpdater('columnVisibility', table),\n      }\n    },\n\n    assignColumnPrototype: (prototype, table) => {\n      assignPrototypeAPIs('columnVisibilityFeature', prototype, table, {\n        column_getIsVisible: {\n          fn: (column) => column_getIsVisible(column),\n          memoDeps: (column) => [\n            column.table.options.columns,\n            column.table.store.state.columnVisibility,\n            column.columns,\n          ],\n        },\n        column_getCanHide: {\n          fn: (column) => column_getCanHide(column),\n        },\n        column_getToggleVisibilityHandler: {\n          fn: (column) => column_getToggleVisibilityHandler(column),\n        },\n        column_toggleVisibility: {\n          fn: (column, visible) => column_toggleVisibility(column, visible),\n        },\n      })\n    },\n\n    assignRowPrototype: (prototype, table) => {\n      assignPrototypeAPIs('columnVisibilityFeature', prototype, table, {\n        row_getAllVisibleCells: {\n          fn: (row) => row_getAllVisibleCells(row),\n          memoDeps: (row) => [\n            row.getAllCells(),\n            row.table.store.state.columnVisibility,\n          ],\n        },\n        row_getVisibleCells: {\n          fn: (row, left, center, right) =>\n            row_getVisibleCells(left, center, right),\n          memoDeps: (row) => [\n            row_getLeftVisibleCells(row),\n            row_getCenterVisibleCells(row),\n            row_getRightVisibleCells(row),\n          ],\n        },\n      })\n    },\n\n    constructTableAPIs: (table) => {\n      assignTableAPIs('columnVisibilityFeature', table, {\n        table_getVisibleFlatColumns: {\n          fn: () => table_getVisibleFlatColumns(table),\n          memoDeps: () => [\n            table.store.state.columnVisibility,\n            table.options.columns,\n          ],\n        },\n        table_getVisibleLeafColumns: {\n          fn: () => table_getVisibleLeafColumns(table),\n          memoDeps: () => [\n            table.store.state.columnVisibility,\n            table.options.columns,\n          ],\n        },\n        table_setColumnVisibility: {\n          fn: (updater) => table_setColumnVisibility(table, updater),\n        },\n        table_resetColumnVisibility: {\n          fn: (defaultState) =>\n            table_resetColumnVisibility(table, defaultState),\n        },\n        table_toggleAllColumnsVisible: {\n          fn: (value) => table_toggleAllColumnsVisible(table, value),\n        },\n        table_getIsAllColumnsVisible: {\n          fn: () => table_getIsAllColumnsVisible(table),\n        },\n        table_getIsSomeColumnsVisible: {\n          fn: () => table_getIsSomeColumnsVisible(table),\n        },\n        table_getToggleAllColumnsVisibilityHandler: {\n          fn: () => table_getToggleAllColumnsVisibilityHandler(table),\n        },\n      })\n    },\n  }\n}\n\n/**\n * The Column Visibility feature adds column visibility state and APIs to the table, row, and column objects.\n */\nexport const columnVisibilityFeature = constructColumnVisibilityFeature()\n"
  },
  {
    "path": "packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts",
    "content": "import type { OnChangeFn, RowData, Updater } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Cell } from '../../types/Cell'\nimport type { Column } from '../../types/Column'\n\nexport type ColumnVisibilityState = Record<string, boolean>\n\nexport interface TableState_ColumnVisibility {\n  columnVisibility: ColumnVisibilityState\n}\n\nexport interface TableOptions_ColumnVisibility {\n  /**\n   * Whether to enable column hiding. Defaults to `true`.\n   */\n  enableHiding?: boolean\n  /**\n   * If provided, this function will be called with an `updaterFn` when `state.columnVisibility` changes. This overrides the default internal state management, so you will need to persist the state change either fully or partially outside of the table.\n   */\n  onColumnVisibilityChange?: OnChangeFn<ColumnVisibilityState>\n}\n\nexport type VisibilityDefaultOptions = Pick<\n  TableOptions_ColumnVisibility,\n  'onColumnVisibilityChange'\n>\n\nexport interface Table_ColumnVisibility<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  /**\n   * Returns whether all columns are visible\n   */\n  getIsAllColumnsVisible: () => boolean\n  /**\n   * Returns whether any columns are visible\n   */\n  getIsSomeColumnsVisible: () => boolean\n  /**\n   * Returns a handler for toggling the visibility of all columns, meant to be bound to a `input[type=checkbox]` element.\n   */\n  getToggleAllColumnsVisibilityHandler: () => (event: unknown) => void\n  /**\n   * Returns a flat array of columns that are visible, including parent columns.\n   */\n  getVisibleFlatColumns: () => Array<Column<TFeatures, TData, unknown>>\n  /**\n   * Returns a flat array of leaf-node columns that are visible.\n   */\n  getVisibleLeafColumns: () => Array<Column<TFeatures, TData, unknown>>\n  /**\n   * Resets the column visibility state to the initial state. If `defaultState` is provided, the state will be reset to `{}`\n   */\n  resetColumnVisibility: (defaultState?: boolean) => void\n  /**\n   * Sets or updates the `state.columnVisibility` state.\n   */\n  setColumnVisibility: (updater: Updater<ColumnVisibilityState>) => void\n  /**\n   * Toggles the visibility of all columns.\n   */\n  toggleAllColumnsVisible: (value?: boolean) => void\n}\n\nexport interface ColumnDef_ColumnVisibility {\n  /**\n   * Enables/disables column hiding for this column. Defaults to `true`.\n   */\n  enableHiding?: boolean\n}\n\nexport interface Row_ColumnVisibility<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  getAllVisibleCells: () => Array<Cell<TFeatures, TData, unknown>>\n  /**\n   * Returns an array of cells that account for column visibility for the row.\n   */\n  getVisibleCells: () => Array<Cell<TFeatures, TData, unknown>>\n}\n\nexport interface Column_ColumnVisibility {\n  /**\n   * Returns whether the column can be hidden\n   */\n  getCanHide: () => boolean\n  /**\n   * Returns whether the column is visible\n   */\n  getIsVisible: () => boolean\n  /**\n   * Returns a function that can be used to toggle the column visibility. This function can be used to bind to an event handler to a checkbox.\n   */\n  getToggleVisibilityHandler: () => (event: unknown) => void\n  /**\n   * Toggles the visibility of the column.\n   */\n  toggleVisibility: (value?: boolean) => void\n}\n"
  },
  {
    "path": "packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts",
    "content": "import { callMemoOrStaticFn } from '../../utils'\nimport type { CellData, RowData, Updater } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Table_Internal } from '../../types/Table'\nimport type { Cell } from '../../types/Cell'\nimport type { Column_Internal } from '../../types/Column'\nimport type { ColumnVisibilityState } from './columnVisibilityFeature.types'\nimport type { Row } from '../../types/Row'\n\nexport function getDefaultColumnVisibilityState(): ColumnVisibilityState {\n  return structuredClone({})\n}\n\nexport function column_toggleVisibility<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n>(column: Column_Internal<TFeatures, TData, TValue>, visible?: boolean): void {\n  if (column_getCanHide(column)) {\n    table_setColumnVisibility(column.table, (old) => ({\n      ...old,\n      [column.id]:\n        visible ??\n        !callMemoOrStaticFn(column, 'getIsVisible', column_getIsVisible),\n    }))\n  }\n}\n\nexport function column_getIsVisible<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n>(column: Column_Internal<TFeatures, TData, TValue>): boolean {\n  const childColumns = column.columns\n  return (\n    (childColumns.length\n      ? childColumns.some((childColumn) =>\n          callMemoOrStaticFn(childColumn, 'getIsVisible', column_getIsVisible),\n        )\n      : column.table.store.state.columnVisibility?.[column.id]) ?? true\n  )\n}\n\nexport function column_getCanHide<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n>(column: Column_Internal<TFeatures, TData, TValue>) {\n  return (\n    (column.columnDef.enableHiding ?? true) &&\n    (column.table.options.enableHiding ?? true)\n  )\n}\n\nexport function column_getToggleVisibilityHandler<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n>(column: Column_Internal<TFeatures, TData, TValue>) {\n  return (e: unknown) => {\n    column_toggleVisibility(\n      column,\n      ((e as MouseEvent).target as HTMLInputElement).checked,\n    )\n  }\n}\n\nexport function row_getAllVisibleCells<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(row: Row<TFeatures, TData>) {\n  return row\n    .getAllCells()\n    .filter((cell) =>\n      callMemoOrStaticFn(cell.column, 'getIsVisible', column_getIsVisible),\n    )\n}\n\nexport function row_getVisibleCells<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  left: Array<Cell<TFeatures, TData, unknown>>,\n  center: Array<Cell<TFeatures, TData, unknown>>,\n  right: Array<Cell<TFeatures, TData, unknown>>,\n) {\n  return [...left, ...center, ...right]\n}\n\nexport function table_getVisibleFlatColumns<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>) {\n  return table\n    .getAllFlatColumns()\n    .filter((column) =>\n      callMemoOrStaticFn(column, 'getIsVisible', column_getIsVisible),\n    )\n}\n\nexport function table_getVisibleLeafColumns<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>) {\n  return table\n    .getAllLeafColumns()\n    .filter((column) =>\n      callMemoOrStaticFn(column, 'getIsVisible', column_getIsVisible),\n    )\n}\n\nexport function table_setColumnVisibility<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  table: Table_Internal<TFeatures, TData>,\n  updater: Updater<ColumnVisibilityState>,\n) {\n  table.options.onColumnVisibilityChange?.(updater)\n}\n\nexport function table_resetColumnVisibility<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>, defaultState?: boolean) {\n  table_setColumnVisibility(\n    table,\n    defaultState ? {} : (table.initialState.columnVisibility ?? {}),\n  )\n}\n\nexport function table_toggleAllColumnsVisible<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>, value?: boolean) {\n  value = value ?? !table_getIsAllColumnsVisible(table)\n\n  table_setColumnVisibility(\n    table,\n    table.getAllLeafColumns().reduce(\n      (obj, column) => ({\n        ...obj,\n        [column.id]: !value ? !column_getCanHide(column) : value,\n      }),\n      {},\n    ),\n  )\n}\n\nexport function table_getIsAllColumnsVisible<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>) {\n  return !table\n    .getAllLeafColumns()\n    .some(\n      (column) =>\n        !callMemoOrStaticFn(column, 'getIsVisible', column_getIsVisible),\n    )\n}\n\nexport function table_getIsSomeColumnsVisible<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>) {\n  return table\n    .getAllLeafColumns()\n    .some((column) =>\n      callMemoOrStaticFn(column, 'getIsVisible', column_getIsVisible),\n    )\n}\n\nexport function table_getToggleAllColumnsVisibilityHandler<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>) {\n  return (e: unknown) => {\n    table_toggleAllColumnsVisible(\n      table,\n      ((e as MouseEvent).target as HTMLInputElement).checked,\n    )\n  }\n}\n"
  },
  {
    "path": "packages/table-core/src/features/global-filtering/globalFilteringFeature.ts",
    "content": "import {\n  assignPrototypeAPIs,\n  assignTableAPIs,\n  makeStateUpdater,\n} from '../../utils'\nimport {\n  column_getCanGlobalFilter,\n  table_getGlobalAutoFilterFn,\n  table_getGlobalFilterFn,\n  table_resetGlobalFilter,\n  table_setGlobalFilter,\n} from './globalFilteringFeature.utils'\nimport type { RowData } from '../../types/type-utils'\nimport type { TableFeature, TableFeatures } from '../../types/TableFeatures'\n// import type {\n//   ColumnDef_GlobalFiltering,\n//   Column_GlobalFiltering,\n//   TableOptions_GlobalFiltering,\n//   TableState_GlobalFiltering,\n//   Table_GlobalFiltering,\n// } from './globalFilteringFeature.types'\n\ninterface GlobalFilteringFeatureConstructors<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  // Column: Column_GlobalFiltering\n  // ColumnDef: ColumnDef_GlobalFiltering\n  // Table: Table_GlobalFiltering<TFeatures, TData>\n  // TableOptions: TableOptions_GlobalFiltering<TFeatures, TData>\n  // TableState: TableState_GlobalFiltering\n}\n\nexport function constructGlobalFilteringFeature<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(): TableFeature<GlobalFilteringFeatureConstructors<TFeatures, TData>> {\n  return {\n    getInitialState: (initialState) => {\n      return {\n        globalFilter: undefined,\n        ...initialState,\n      }\n    },\n\n    getDefaultTableOptions: (table) => {\n      return {\n        onGlobalFilterChange: makeStateUpdater('globalFilter', table),\n        globalFilterFn: 'auto',\n        getColumnCanGlobalFilter: (column) => {\n          const value = table\n            .getCoreRowModel()\n            .flatRows[0]?.getAllCellsByColumnId()\n            [column.id]?.getValue()\n\n          return typeof value === 'string' || typeof value === 'number'\n        },\n      }\n    },\n\n    assignColumnPrototype: (prototype, table) => {\n      assignPrototypeAPIs('globalFilteringFeature', prototype, table, {\n        column_getCanGlobalFilter: {\n          fn: (column) => column_getCanGlobalFilter(column),\n        },\n      })\n    },\n\n    constructTableAPIs: (table) => {\n      assignTableAPIs('globalFilteringFeature', table, {\n        table_getGlobalAutoFilterFn: {\n          fn: () => table_getGlobalAutoFilterFn(),\n        },\n        table_getGlobalFilterFn: {\n          fn: () => table_getGlobalFilterFn(table),\n        },\n        table_setGlobalFilter: {\n          fn: (updater) => table_setGlobalFilter(table, updater),\n        },\n        table_resetGlobalFilter: {\n          fn: (defaultState) => table_resetGlobalFilter(table, defaultState),\n        },\n      })\n    },\n  }\n}\n\n/**\n * The Global Filtering feature adds global filtering state and APIs to the table and column objects.\n * **Note:** This is dependent on the columnFilteringFeature feature.\n */\nexport const globalFilteringFeature = constructGlobalFilteringFeature()\n"
  },
  {
    "path": "packages/table-core/src/features/global-filtering/globalFilteringFeature.types.ts",
    "content": "import type {\n  CellData,\n  OnChangeFn,\n  RowData,\n  Updater,\n} from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Column } from '../../types/Column'\nimport type {\n  FilterFn,\n  FilterFnOption,\n} from '../column-filtering/columnFilteringFeature.types'\n\nexport interface TableState_GlobalFiltering {\n  globalFilter: any\n}\n\nexport interface ColumnDef_GlobalFiltering {\n  /**\n   * Enables/disables the **global** filter for this column.\n   */\n  enableGlobalFilter?: boolean\n}\n\nexport interface Column_GlobalFiltering {\n  /**\n   * Returns whether or not the column can be **globally** filtered. Set to `false` to disable a column from being scanned during global filtering.\n   */\n  getCanGlobalFilter: () => boolean\n}\n\nexport interface TableOptions_GlobalFiltering<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  /**\n   * Enables/disables **global** filtering for all columns.\n   */\n  enableGlobalFilter?: boolean\n  /**\n   * If provided, this function will be called with the column and should return `true` or `false` to indicate whether this column should be used for global filtering.\n   * This is useful if the column can contain data that is not `string` or `number` (i.e. `undefined`).\n   */\n  getColumnCanGlobalFilter?: <\n    TFeatures extends TableFeatures,\n    TData extends RowData,\n    TValue extends CellData = CellData,\n  >(\n    column: Column<TFeatures, TData, TValue>,\n  ) => boolean\n  /**\n   * The filter function to use for global filtering.\n   * - A `string` referencing a built-in filter function\n   * - A `string` that references a custom filter functions provided via the `tableOptions.filterFns` option\n   * - A custom filter function\n   */\n  globalFilterFn?: FilterFnOption<TFeatures, TData>\n  /**\n   * If provided, this function will be called with an `updaterFn` when `state.globalFilter` changes. This overrides the default internal state management, so you will need to persist the state change either fully or partially outside of the table.\n   */\n  onGlobalFilterChange?: OnChangeFn<any>\n}\n\nexport interface Table_GlobalFiltering<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  /**\n   * Currently, this function returns the built-in `includesString` filter function. In future releases, it may return more dynamic filter functions based on the nature of the data provided.\n   */\n  getGlobalAutoFilterFn: () => FilterFn<TFeatures, TData> | undefined\n  /**\n   * Returns the filter function (either user-defined or automatic, depending on configuration) for the global filter.\n   */\n  getGlobalFilterFn: () => FilterFn<TFeatures, TData> | undefined\n  /**\n   * Resets the **globalFilter** state to `initialState.globalFilter`, or `true` can be passed to force a default blank state reset to `undefined`.\n   */\n  resetGlobalFilter: (defaultState?: boolean) => void\n  /**\n   * Sets or updates the `state.globalFilter` state.\n   */\n  setGlobalFilter: (updater: Updater<any>) => void\n}\n"
  },
  {
    "path": "packages/table-core/src/features/global-filtering/globalFilteringFeature.utils.ts",
    "content": "import { filterFn_includesString } from '../../fns/filterFns'\nimport { isFunction } from '../../utils'\nimport type { Column_Internal } from '../../types/Column'\nimport type { FilterFn } from '../column-filtering/columnFilteringFeature.types'\nimport type { CellData, RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Table_Internal } from '../../types/Table'\n\nexport function column_getCanGlobalFilter<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n>(column: Column_Internal<TFeatures, TData, TValue>): boolean {\n  return (\n    (column.columnDef.enableGlobalFilter ?? true) &&\n    (column.table.options.enableGlobalFilter ?? true) &&\n    (column.table.options.enableFilters ?? true) &&\n    (column.table.options.getColumnCanGlobalFilter?.(column) ?? true) &&\n    !!column.accessorFn\n  )\n}\n\nexport function table_getGlobalAutoFilterFn() {\n  return filterFn_includesString\n}\n\nexport function table_getGlobalFilterFn<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  table: Table_Internal<TFeatures, TData>,\n): FilterFn<TFeatures, TData> | FilterFn<TFeatures, TData> | undefined {\n  const { globalFilterFn: globalFilterFn } = table.options\n  const filterFns = table._rowModelFns.filterFns as\n    | Record<string, FilterFn<TFeatures, TData>>\n    | undefined\n\n  return isFunction(globalFilterFn)\n    ? globalFilterFn\n    : globalFilterFn === 'auto'\n      ? table_getGlobalAutoFilterFn()\n      : filterFns?.[globalFilterFn as string]\n}\n\nexport function table_setGlobalFilter<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>, updater: any) {\n  table.options.onGlobalFilterChange?.(updater)\n}\n\nexport function table_resetGlobalFilter<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>, defaultState?: boolean) {\n  table_setGlobalFilter(\n    table,\n    defaultState ? undefined : table.initialState.globalFilter,\n  )\n}\n"
  },
  {
    "path": "packages/table-core/src/features/row-expanding/createExpandedRowModel.ts",
    "content": "import { tableMemo } from '../../utils'\nimport { row_getIsExpanded } from './rowExpandingFeature.utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { RowModel } from '../../core/row-models/coreRowModelsFeature.types'\nimport type { Table, Table_Internal } from '../../types/Table'\nimport type { Row } from '../../types/Row'\nimport type { RowData } from '../../types/type-utils'\n\nexport function createExpandedRowModel<\n  TFeatures extends TableFeatures,\n  TData extends RowData = any,\n>(): (table: Table<TFeatures, TData>) => () => RowModel<TFeatures, TData> {\n  return (_table) => {\n    const table = _table as Table_Internal<TFeatures, TData>\n    return tableMemo({\n      feature: 'rowExpandingFeature',\n      table,\n      fnName: 'table.getExpandedRowModel',\n      memoDeps: () => [\n        table.store.state.expanded,\n        table.getPreExpandedRowModel(),\n        table.options.paginateExpandedRows,\n      ],\n      fn: () => _createExpandedRowModel(table),\n    })\n  }\n}\n\nfunction _createExpandedRowModel<\n  TFeatures extends TableFeatures,\n  TData extends RowData = any,\n>(table: Table_Internal<TFeatures, TData>): RowModel<TFeatures, TData> {\n  const rowModel = table.getPreExpandedRowModel()\n  const expanded = table.store.state.expanded\n\n  if (\n    !rowModel.rows.length ||\n    (expanded !== true && !Object.keys(expanded ?? {}).length)\n  ) {\n    return rowModel\n  }\n\n  if (!table.options.paginateExpandedRows) {\n    // Only expand rows at this point if they are being paginated\n    return rowModel\n  }\n\n  return expandRows(rowModel)\n}\n\nexport function expandRows<\n  TFeatures extends TableFeatures,\n  TData extends RowData = any,\n>(rowModel: RowModel<TFeatures, TData>): RowModel<TFeatures, TData> {\n  const expandedRows: Array<Row<TFeatures, TData>> = []\n\n  const handleRow = (row: Row<TFeatures, TData>) => {\n    expandedRows.push(row)\n\n    if (row.subRows.length && row_getIsExpanded(row)) {\n      row.subRows.forEach(handleRow)\n    }\n  }\n\n  rowModel.rows.forEach(handleRow)\n\n  return {\n    rows: expandedRows,\n    flatRows: rowModel.flatRows,\n    rowsById: rowModel.rowsById,\n  }\n}\n"
  },
  {
    "path": "packages/table-core/src/features/row-expanding/rowExpandingFeature.ts",
    "content": "import {\n  assignPrototypeAPIs,\n  assignTableAPIs,\n  makeStateUpdater,\n} from '../../utils'\nimport {\n  getDefaultExpandedState,\n  row_getCanExpand,\n  row_getIsAllParentsExpanded,\n  row_getIsExpanded,\n  row_getToggleExpandedHandler,\n  row_toggleExpanded,\n  table_autoResetExpanded,\n  table_getCanSomeRowsExpand,\n  table_getExpandedDepth,\n  table_getIsAllRowsExpanded,\n  table_getIsSomeRowsExpanded,\n  table_getToggleAllRowsExpandedHandler,\n  table_resetExpanded,\n  table_setExpanded,\n  table_toggleAllRowsExpanded,\n} from './rowExpandingFeature.utils'\nimport type { RowData } from '../../types/type-utils'\nimport type { TableFeature, TableFeatures } from '../../types/TableFeatures'\n// import type {\n//   CachedRowModel_Expanded,\n//   CreateRowModel_Expanded,\n//   Row_RowExpanding,\n//   TableOptions_RowExpanding,\n//   TableState_RowExpanding,\n//   Table_RowExpanding,\n// } from './rowExpandingFeature.types'\n\ninterface RowExpandingFeatureConstructors<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  // CachedRowModel: CachedRowModel_Expanded<TFeatures, TData>\n  // CreateRowModels: CreateRowModel_Expanded<TFeatures, TData>\n  // Row: Row_RowExpanding\n  // Table: Table_RowExpanding<TFeatures, TData>\n  // TableOptions: TableOptions_RowExpanding<TFeatures, TData>\n  // TableState: TableState_RowExpanding\n}\n\nexport function constructRowExpandingFeature<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(): TableFeature<RowExpandingFeatureConstructors<TFeatures, TData>> {\n  return {\n    getInitialState: (initialState) => {\n      return {\n        expanded: getDefaultExpandedState(),\n        ...initialState,\n      }\n    },\n\n    getDefaultTableOptions: (table) => {\n      return {\n        onExpandedChange: makeStateUpdater('expanded', table),\n        paginateExpandedRows: true,\n      }\n    },\n\n    assignRowPrototype: (prototype, table) => {\n      assignPrototypeAPIs('rowExpandingFeature', prototype, table, {\n        row_toggleExpanded: {\n          fn: (row, expanded) => row_toggleExpanded(row, expanded),\n        },\n        row_getIsExpanded: {\n          fn: (row) => row_getIsExpanded(row),\n        },\n        row_getCanExpand: {\n          fn: (row) => row_getCanExpand(row),\n        },\n        row_getIsAllParentsExpanded: {\n          fn: (row) => row_getIsAllParentsExpanded(row),\n        },\n        row_getToggleExpandedHandler: {\n          fn: (row) => row_getToggleExpandedHandler(row),\n        },\n      })\n    },\n\n    constructTableAPIs: (table) => {\n      assignTableAPIs('rowExpandingFeature', table, {\n        table_autoResetExpanded: {\n          fn: () => table_autoResetExpanded(table),\n        },\n        table_setExpanded: {\n          fn: (updater) => table_setExpanded(table, updater),\n        },\n        table_toggleAllRowsExpanded: {\n          fn: (expanded) => table_toggleAllRowsExpanded(table, expanded),\n        },\n        table_resetExpanded: {\n          fn: (defaultState) => table_resetExpanded(table, defaultState),\n        },\n        table_getCanSomeRowsExpand: {\n          fn: () => table_getCanSomeRowsExpand(table),\n        },\n        table_getToggleAllRowsExpandedHandler: {\n          fn: () => table_getToggleAllRowsExpandedHandler(table),\n        },\n        table_getIsSomeRowsExpanded: {\n          fn: () => table_getIsSomeRowsExpanded(table),\n        },\n        table_getIsAllRowsExpanded: {\n          fn: () => table_getIsAllRowsExpanded(table),\n        },\n        table_getExpandedDepth: {\n          fn: () => table_getExpandedDepth(table),\n        },\n      })\n    },\n  }\n}\n\n/**\n * The Row Expanding feature adds row expanding state and APIs to the table and row objects.\n */\nexport const rowExpandingFeature = constructRowExpandingFeature()\n"
  },
  {
    "path": "packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts",
    "content": "import type { Table } from '../../types/Table'\nimport type { OnChangeFn, RowData, Updater } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { RowModel } from '../../core/row-models/coreRowModelsFeature.types'\nimport type { Row } from '../../types/Row'\n\nexport type ExpandedStateList = Record<string, boolean>\nexport type ExpandedState = true | Record<string, boolean>\n\nexport interface TableState_RowExpanding {\n  expanded: ExpandedState\n}\n\nexport interface Row_RowExpanding {\n  /**\n   * Returns whether the row can be expanded.\n   */\n  getCanExpand: () => boolean\n  /**\n   * Returns whether all parent rows of the row are expanded.\n   */\n  getIsAllParentsExpanded: () => boolean\n  /**\n   * Returns whether the row is expanded.\n   */\n  getIsExpanded: () => boolean\n  /**\n   * Returns a function that can be used to toggle the expanded state of the row. This function can be used to bind to an event handler to a button.\n   */\n  getToggleExpandedHandler: () => () => void\n  /**\n   * Toggles the expanded state (or sets it if `expanded` is provided) for the row.\n   */\n  toggleExpanded: (expanded?: boolean) => void\n}\n\nexport interface TableOptions_RowExpanding<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  /**\n   * Enable this setting to automatically reset the expanded state of the table when expanding state changes.\n   */\n  autoResetExpanded?: boolean\n  /**\n   * Enable/disable expanding for all rows.\n   */\n  enableExpanding?: boolean\n  /**\n   * If provided, allows you to override the default behavior of determining whether a row is currently expanded.\n   */\n  getIsRowExpanded?: (row: Row<TFeatures, TData>) => boolean\n  /**\n   * If provided, allows you to override the default behavior of determining whether a row can be expanded.\n   */\n  getRowCanExpand?: (row: Row<TFeatures, TData>) => boolean\n  /**\n   * Enables manual row expansion. If this is set to `true`, `getExpandedRowModel` will not be used to expand rows and you would be expected to perform the expansion in your own data model. This is useful if you are doing server-side expansion.\n   */\n  manualExpanding?: boolean\n  /**\n   * This function is called when the `expanded` table state changes. If a function is provided, you will be responsible for managing this state on your own. To pass the managed state back to the table, use the `tableOptions.state.expanded` option.\n   */\n  onExpandedChange?: OnChangeFn<ExpandedState>\n  /**\n   * If `true` expanded rows will be paginated along with the rest of the table (which means expanded rows may span multiple pages). If `false` expanded rows will not be considered for pagination (which means expanded rows will always render on their parents page. This also means more rows will be rendered than the set page size)\n   */\n  paginateExpandedRows?: boolean\n}\n\nexport interface Table_RowExpanding<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  autoResetExpanded: () => void\n  /**\n   * Returns whether there are any rows that can be expanded.\n   */\n  getCanSomeRowsExpand: () => boolean\n  /**\n   * Returns the maximum depth of the expanded rows.\n   */\n  getExpandedDepth: () => number\n  /**\n   * Returns whether all rows are currently expanded.\n   */\n  getIsAllRowsExpanded: () => boolean\n  /**\n   * Returns whether there are any rows that are currently expanded.\n   */\n  getIsSomeRowsExpanded: () => boolean\n  /**\n   * Returns a handler that can be used to toggle the expanded state of all rows. This handler is meant to be used with an `input[type=checkbox]` element.\n   */\n  getToggleAllRowsExpandedHandler: () => (event: unknown) => void\n  /**\n   * Resets the expanded state of the table to the initial state.\n   */\n  resetExpanded: (defaultState?: boolean) => void\n  /**\n   * Updates the expanded state of the table via an update function or value.\n   */\n  setExpanded: (updater: Updater<ExpandedState>) => void\n  /**\n   * Toggles the expanded state for all rows.\n   */\n  toggleAllRowsExpanded: (expanded?: boolean) => void\n}\n\nexport interface Table_RowModels_Expanded<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  /**\n   * Returns the row model after expansion has been applied.\n   */\n  getExpandedRowModel: () => RowModel<TFeatures, TData>\n  /**\n   * Returns the row model before expansion has been applied.\n   */\n  getPreExpandedRowModel: () => RowModel<TFeatures, TData>\n}\n\nexport interface CreateRowModel_Expanded<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  /**\n   * This function is responsible for returning the expanded row model. If this function is not provided, the table will not expand rows. You can use the default exported `getExpandedRowModel` function to get the expanded row model or implement your own.\n   */\n  expandedRowModel?: (\n    table: Table<TFeatures, TData>,\n  ) => () => RowModel<TFeatures, TData>\n}\n\nexport interface CachedRowModel_Expanded<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  expandedRowModel: () => RowModel<TFeatures, TData>\n}\n"
  },
  {
    "path": "packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts",
    "content": "import type { RowData, Updater } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Table_Internal } from '../../types/Table'\nimport type { Row } from '../../types/Row'\nimport type {\n  ExpandedState,\n  ExpandedStateList,\n} from './rowExpandingFeature.types'\n\nexport function getDefaultExpandedState(): ExpandedState {\n  return structuredClone({})\n}\n\nexport function table_autoResetExpanded<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>) {\n  if (\n    table.options.autoResetAll ??\n    table.options.autoResetExpanded ??\n    !table.options.manualExpanding\n  ) {\n    queueMicrotask(() => table_resetExpanded(table))\n  }\n}\n\nexport function table_setExpanded<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>, updater: Updater<ExpandedState>) {\n  table.options.onExpandedChange?.(updater)\n}\n\nexport function table_toggleAllRowsExpanded<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>, expanded?: boolean) {\n  if (expanded ?? !table_getIsAllRowsExpanded(table)) {\n    table_setExpanded(table, true)\n  } else {\n    table_setExpanded(table, {})\n  }\n}\n\nexport function table_resetExpanded<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>, defaultState?: boolean) {\n  table_setExpanded(\n    table,\n    defaultState ? {} : (table.initialState.expanded ?? {}),\n  )\n}\n\nexport function table_getCanSomeRowsExpand<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>) {\n  return table\n    .getPrePaginatedRowModel()\n    .flatRows.some((row) => row_getCanExpand(row))\n}\n\nexport function table_getToggleAllRowsExpandedHandler<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>) {\n  return (e: unknown) => {\n    ;(e as any).persist?.()\n    table_toggleAllRowsExpanded(table)\n  }\n}\n\nexport function table_getIsSomeRowsExpanded<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>) {\n  const expanded = table.store.state.expanded ?? {}\n  return expanded === true || Object.values(expanded).some(Boolean)\n}\n\nexport function table_getIsAllRowsExpanded<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>) {\n  const expanded = table.store.state.expanded ?? {}\n\n  // If expanded is true, save some cycles and return true\n  if (expanded === true) {\n    return true\n  }\n\n  if (!Object.keys(expanded).length) {\n    return false\n  }\n\n  // If any row is not expanded, return false\n  if (table.getRowModel().flatRows.some((row) => !row_getIsExpanded(row))) {\n    return false\n  }\n\n  // They must all be expanded :shrug:\n  return true\n}\n\nexport function table_getExpandedDepth<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>) {\n  let maxDepth = 0\n\n  const rowIds =\n    table.store.state.expanded === true\n      ? Object.keys(table.getRowModel().rowsById)\n      : Object.keys(table.store.state.expanded ?? {})\n\n  rowIds.forEach((id) => {\n    const splitId = id.split('.')\n    maxDepth = Math.max(maxDepth, splitId.length)\n  })\n\n  return maxDepth\n}\n\nexport function row_toggleExpanded<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(row: Row<TFeatures, TData>, expanded?: boolean) {\n  table_setExpanded(row.table, (old) => {\n    const exists = old === true ? true : !!old[row.id]\n\n    let oldExpanded: ExpandedStateList = {}\n\n    if (old === true) {\n      Object.keys(row.table.getRowModel().rowsById).forEach((rowId) => {\n        oldExpanded[rowId] = true\n      })\n    } else {\n      oldExpanded = old\n    }\n\n    expanded = expanded ?? !exists\n\n    if (!exists && expanded) {\n      return {\n        ...oldExpanded,\n        [row.id]: true,\n      }\n    }\n\n    if (exists && !expanded) {\n      const { [row.id]: _, ...rest } = oldExpanded\n      return rest\n    }\n\n    return old\n  })\n}\n\nexport function row_getIsExpanded<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(row: Row<TFeatures, TData>) {\n  const expanded = row.table.store.state.expanded ?? ({} as ExpandedState)\n\n  return !!(\n    row.table.options.getIsRowExpanded?.(row) ??\n    (expanded === true || expanded[row.id])\n  )\n}\n\nexport function row_getCanExpand<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(row: Row<TFeatures, TData>) {\n  return (\n    row.table.options.getRowCanExpand?.(row) ??\n    ((row.table.options.enableExpanding ?? true) && !!row.subRows.length)\n  )\n}\n\nexport function row_getIsAllParentsExpanded<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(row: Row<TFeatures, TData>) {\n  let isFullyExpanded = true\n  let currentRow = row\n\n  while (isFullyExpanded && currentRow.parentId) {\n    currentRow = row.table.getRow(currentRow.parentId, true)\n    isFullyExpanded = row_getIsExpanded(row)\n  }\n\n  return isFullyExpanded\n}\n\nexport function row_getToggleExpandedHandler<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(row: Row<TFeatures, TData>) {\n  const canExpand = row_getCanExpand(row)\n\n  return () => {\n    if (!canExpand) return\n    row_toggleExpanded(row)\n  }\n}\n"
  },
  {
    "path": "packages/table-core/src/features/row-pagination/createPaginatedRowModel.ts",
    "content": "import { tableMemo } from '../../utils'\nimport { expandRows } from '../row-expanding/createExpandedRowModel'\nimport { getDefaultPaginationState } from './rowPaginationFeature.utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { RowModel } from '../../core/row-models/coreRowModelsFeature.types'\nimport type { Table, Table_Internal } from '../../types/Table'\nimport type { Row } from '../../types/Row'\nimport type { RowData } from '../../types/type-utils'\n\nexport function createPaginatedRowModel<\n  TFeatures extends TableFeatures,\n  TData extends RowData = any,\n>(): (table: Table<TFeatures, TData>) => () => RowModel<TFeatures, TData> {\n  return (_table) => {\n    const table = _table as Table_Internal<TFeatures, TData>\n    return tableMemo({\n      feature: 'rowPaginationFeature',\n      table,\n      fnName: 'table.getPaginatedRowModel',\n      memoDeps: () => [\n        table.getPrePaginatedRowModel(),\n        table.store.state.pagination,\n        table.options.paginateExpandedRows\n          ? table.store.state.expanded\n          : undefined,\n      ],\n      fn: () => _createPaginatedRowModel(table),\n    })\n  }\n}\n\nfunction _createPaginatedRowModel<\n  TFeatures extends TableFeatures,\n  TData extends RowData = any,\n>(table: Table_Internal<TFeatures, TData>): RowModel<TFeatures, TData> {\n  const prePaginatedRowModel = table.getPrePaginatedRowModel()\n  const pagination = table.store.state.pagination\n\n  if (!prePaginatedRowModel.rows.length) {\n    return prePaginatedRowModel\n  }\n\n  const { pageSize, pageIndex } = pagination ?? getDefaultPaginationState()\n  const { rows, flatRows, rowsById } = prePaginatedRowModel\n  const pageStart = pageSize * pageIndex\n  const pageEnd = pageStart + pageSize\n\n  const paginatedRows = rows.slice(pageStart, pageEnd)\n\n  let paginatedRowModel: RowModel<TFeatures, TData>\n\n  if (!table.options.paginateExpandedRows) {\n    paginatedRowModel = expandRows({\n      rows: paginatedRows,\n      flatRows,\n      rowsById,\n    })\n  } else {\n    paginatedRowModel = {\n      rows: paginatedRows,\n      flatRows,\n      rowsById,\n    }\n  }\n\n  paginatedRowModel.flatRows = []\n\n  const handleRow = (row: Row<TFeatures, TData>) => {\n    paginatedRowModel.flatRows.push(row)\n    if (row.subRows.length) {\n      row.subRows.forEach(handleRow)\n    }\n  }\n\n  paginatedRowModel.rows.forEach(handleRow)\n\n  return paginatedRowModel\n}\n"
  },
  {
    "path": "packages/table-core/src/features/row-pagination/rowPaginationFeature.ts",
    "content": "import { assignTableAPIs, makeStateUpdater } from '../../utils'\nimport {\n  getDefaultPaginationState,\n  table_autoResetPageIndex,\n  table_firstPage,\n  table_getCanNextPage,\n  table_getCanPreviousPage,\n  table_getPageCount,\n  table_getPageOptions,\n  table_getRowCount,\n  table_lastPage,\n  table_nextPage,\n  table_previousPage,\n  table_resetPageIndex,\n  table_resetPageSize,\n  table_resetPagination,\n  table_setPageIndex,\n  table_setPageSize,\n  table_setPagination,\n} from './rowPaginationFeature.utils'\nimport type { RowData } from '../../types/type-utils'\nimport type { TableFeature, TableFeatures } from '../../types/TableFeatures'\n// import type {\n//   CachedRowModel_Paginated,\n//   CreateRowModel_Paginated,\n//   TableOptions_RowPagination,\n//   TableState_RowPagination,\n//   Table_RowPagination,\n// } from './rowPaginationFeature.types'\n\ninterface RowPaginationFeatureConstructors<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  // CachedRowModel: CachedRowModel_Paginated<TFeatures, TData>\n  // CreateRowModels: CreateRowModel_Paginated<TFeatures, TData>\n  // Table: Table_RowPagination<TFeatures, TData>\n  // TableOptions: TableOptions_RowPagination<TFeatures, TData>\n  // TableState: TableState_RowPagination\n}\n\nexport function constructRowPaginationFeature<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(): TableFeature<RowPaginationFeatureConstructors<TFeatures, TData>> {\n  return {\n    getInitialState: (initialState) => {\n      return {\n        ...initialState,\n        pagination: {\n          ...getDefaultPaginationState(),\n          ...initialState.pagination,\n        },\n      }\n    },\n\n    getDefaultTableOptions: (table) => {\n      return {\n        onPaginationChange: makeStateUpdater('pagination', table),\n      }\n    },\n\n    constructTableAPIs: (table) => {\n      assignTableAPIs('rowPaginationFeature', table, {\n        table_autoResetPageIndex: {\n          fn: () => table_autoResetPageIndex(table),\n        },\n        table_setPagination: {\n          fn: (updater) => table_setPagination(table, updater),\n        },\n        table_resetPagination: {\n          fn: (defaultState) => table_resetPagination(table, defaultState),\n        },\n        table_setPageIndex: {\n          fn: (updater) => table_setPageIndex(table, updater),\n        },\n        table_resetPageIndex: {\n          fn: (defaultState) => table_resetPageIndex(table, defaultState),\n        },\n        table_setPageSize: {\n          fn: (updater) => table_setPageSize(table, updater),\n        },\n        table_getPageCount: {\n          fn: () => table_getPageCount(table),\n        },\n        table_resetPageSize: {\n          fn: (defaultState) => table_resetPageSize(table, defaultState),\n        },\n        table_getPageOptions: {\n          fn: () => table_getPageOptions(table),\n        },\n        table_getCanPreviousPage: {\n          fn: () => table_getCanPreviousPage(table),\n        },\n        table_getCanNextPage: {\n          fn: () => table_getCanNextPage(table),\n        },\n        table_previousPage: {\n          fn: () => table_previousPage(table),\n        },\n        table_nextPage: {\n          fn: () => table_nextPage(table),\n        },\n        table_firstPage: {\n          fn: () => table_firstPage(table),\n        },\n        table_lastPage: {\n          fn: () => table_lastPage(table),\n        },\n        table_getRowCount: {\n          fn: () => table_getRowCount(table),\n        },\n      })\n    },\n  }\n}\n\n/**\n * The (Row) Pagination feature adds pagination state and APIs to the table object.\n */\nexport const rowPaginationFeature = constructRowPaginationFeature()\n"
  },
  {
    "path": "packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts",
    "content": "import type { RowModel } from '../../core/row-models/coreRowModelsFeature.types'\nimport type { Table } from '../../types/Table'\nimport type { OnChangeFn, RowData, Updater } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\n\nexport interface PaginationState {\n  pageIndex: number\n  pageSize: number\n}\n\nexport interface TableState_RowPagination {\n  pagination: PaginationState\n}\n\nexport interface TableOptions_RowPagination {\n  /**\n   * If set to `true`, pagination will be reset to the first page when page-altering state changes eg. `data` is updated, filters change, grouping changes, etc.\n   */\n  autoResetPageIndex?: boolean\n  /**\n   * Enables manual pagination. If this option is set to `true`, the table will not automatically paginate rows using `getPaginatedRowModel()` and instead will expect you to manually paginate the rows before passing them to the table. This is useful if you are doing server-side pagination and aggregation.\n   */\n  manualPagination?: boolean\n  /**\n   * If this function is provided, it will be called when the pagination state changes and you will be expected to manage the state yourself. You can pass the managed state back to the table via the `tableOptions.state.pagination` option.\n   */\n  onPaginationChange?: OnChangeFn<PaginationState>\n  /**\n   * When manually controlling pagination, you can supply a total `pageCount` value to the table if you know it (Or supply a `rowCount` and `pageCount` will be calculated). If you do not know how many pages there are, you can set this to `-1`.\n   */\n  pageCount?: number\n  /**\n   * When manually controlling pagination, you can supply a total `rowCount` value to the table if you know it. The `pageCount` can be calculated from this value and the `pageSize`.\n   */\n  rowCount?: number\n}\n\nexport interface PaginationDefaultOptions {\n  onPaginationChange: OnChangeFn<PaginationState>\n}\n\nexport interface Table_RowPagination<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  _autoResetPageIndex: () => void\n  /**\n   * Returns whether the table can go to the next page.\n   */\n  getCanNextPage: () => boolean\n  /**\n   * Returns whether the table can go to the previous page.\n   */\n  getCanPreviousPage: () => boolean\n  /**\n   * Returns the page count. If manually paginating or controlling the pagination state, this will come directly from the `options.pageCount` table option, otherwise it will be calculated from the table data using the total row count and current page size.\n   */\n  getPageCount: () => number\n  /**\n   * Returns the row count. If manually paginating or controlling the pagination state, this will come directly from the `options.rowCount` table option, otherwise it will be calculated from the table data.\n   */\n  getRowCount: () => number\n  /**\n   * Returns an array of page options (zero-index-based) for the current page size.\n   */\n  getPageOptions: () => Array<number>\n  /**\n   * Increments the page index by one, if possible.\n   */\n  nextPage: () => void\n  /**\n   * Decrements the page index by one, if possible.\n   */\n  previousPage: () => void\n  /**\n   * Sets the page index to `0`.\n   */\n  firstPage: () => void\n  /**\n   * Sets the page index to the last page.\n   */\n  lastPage: () => void\n  /**\n   * Resets the page index to its initial state. If `defaultState` is `true`, the page index will be reset to `0` regardless of initial state.\n   */\n  resetPageIndex: (defaultState?: boolean) => void\n  /**\n   * Resets the page size to its initial state. If `defaultState` is `true`, the page size will be reset to `10` regardless of initial state.\n   */\n  resetPageSize: (defaultState?: boolean) => void\n  /**\n   * Resets the **pagination** state to `initialState.pagination`, or `true` can be passed to force a default blank state reset to `[]`.\n   */\n  resetPagination: (defaultState?: boolean) => void\n  /**\n   * Updates the page index using the provided function or value in the `state.pagination.pageIndex` state.\n   */\n  setPageIndex: (updater: Updater<number>) => void\n  /**\n   * Updates the page size using the provided function or value in the `state.pagination.pageSize` state.\n   */\n  setPageSize: (updater: Updater<number>) => void\n  /**\n   * Sets or updates the `state.pagination` state.\n   */\n  setPagination: (updater: Updater<PaginationState>) => void\n}\n\nexport interface Table_RowModels_Paginated<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  /**\n   * Returns the row model for the table after pagination has been applied.\n   */\n  getPaginatedRowModel: () => RowModel<TFeatures, TData>\n  /**\n   * Returns the row model for the table before any pagination has been applied.\n   */\n  getPrePaginatedRowModel: () => RowModel<TFeatures, TData>\n}\n\nexport interface CreateRowModel_Paginated<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  /**\n   * Returns the row model after pagination has taken place, but no further.\n   * Pagination columns are automatically reordered by default to the start of the columns list. If you would rather remove them or leave them as-is, set the appropriate mode here.\n   */\n  paginatedRowModel?: (\n    table: Table<TFeatures, TData>,\n  ) => () => RowModel<TFeatures, TData>\n}\n\nexport interface CachedRowModel_Paginated<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  paginatedRowModel: () => RowModel<TFeatures, TData>\n}\n"
  },
  {
    "path": "packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts",
    "content": "import { functionalUpdate } from '../../utils'\nimport type { RowData, Updater } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Table_Internal } from '../../types/Table'\nimport type { PaginationState } from './rowPaginationFeature.types'\n\nconst defaultPageIndex = 0\nconst defaultPageSize = 10\n\nexport function getDefaultPaginationState(): PaginationState {\n  return structuredClone({\n    pageIndex: defaultPageIndex,\n    pageSize: defaultPageSize,\n  })\n}\n\nexport function table_autoResetPageIndex<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>) {\n  if (\n    table.options.autoResetAll ??\n    table.options.autoResetPageIndex ??\n    !table.options.manualPagination\n  ) {\n    table_resetPageIndex(table)\n  }\n}\n\nexport function table_setPagination<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>, updater: Updater<PaginationState>) {\n  const safeUpdater: Updater<PaginationState> = (old) => {\n    const newState = functionalUpdate(updater, old)\n\n    return newState\n  }\n\n  return table.options.onPaginationChange?.(safeUpdater)\n}\n\nexport function table_resetPagination<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>, defaultState?: boolean) {\n  table_setPagination(\n    table,\n    defaultState\n      ? getDefaultPaginationState()\n      : (table.initialState.pagination ?? getDefaultPaginationState()),\n  )\n}\n\nexport function table_setPageIndex<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>, updater: Updater<number>) {\n  table_setPagination(table, (old) => {\n    let pageIndex = functionalUpdate(updater, old.pageIndex)\n\n    const maxPageIndex =\n      typeof table.options.pageCount === 'undefined' ||\n      table.options.pageCount === -1\n        ? Number.MAX_SAFE_INTEGER\n        : table.options.pageCount - 1\n\n    pageIndex = Math.max(0, Math.min(pageIndex, maxPageIndex))\n\n    return {\n      ...old,\n      pageIndex,\n    }\n  })\n}\n\nexport function table_resetPageIndex<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>, defaultState?: boolean) {\n  table_setPageIndex(\n    table,\n    defaultState\n      ? defaultPageIndex\n      : (table.initialState.pagination?.pageIndex ?? defaultPageIndex),\n  )\n}\n\nexport function table_resetPageSize<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>, defaultState?: boolean) {\n  table_setPageSize(\n    table,\n    defaultState\n      ? defaultPageSize\n      : (table.initialState.pagination?.pageSize ?? defaultPageSize),\n  )\n}\n\nexport function table_setPageSize<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>, updater: Updater<number>) {\n  table_setPagination(table, (old) => {\n    const pageSize = Math.max(1, functionalUpdate(updater, old.pageSize))\n    const topRowIndex = old.pageSize * old.pageIndex\n    const pageIndex = Math.floor(topRowIndex / pageSize)\n\n    return {\n      ...old,\n      pageIndex,\n      pageSize,\n    }\n  })\n}\n\nexport function table_getPageOptions<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>) {\n  const pageCount = table_getPageCount(table)\n  let pageOptions: Array<number> = []\n  if (pageCount && pageCount > 0) {\n    pageOptions = [...new Array(pageCount)].fill(null).map((_, i) => i)\n  }\n  return pageOptions\n}\n\nexport function table_getCanPreviousPage<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>) {\n  return (table.store.state.pagination?.pageIndex ?? 0) > 0\n}\n\nexport function table_getCanNextPage<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>) {\n  const pageIndex = table.store.state.pagination?.pageIndex ?? defaultPageIndex\n\n  const pageCount = table_getPageCount(table)\n\n  if (pageCount === -1) {\n    return true\n  }\n\n  if (pageCount === 0) {\n    return false\n  }\n\n  return pageIndex < pageCount - 1\n}\n\nexport function table_previousPage<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>) {\n  return table_setPageIndex(table, (old) => old - 1)\n}\n\nexport function table_nextPage<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>) {\n  return table_setPageIndex(table, (old) => {\n    return old + 1\n  })\n}\n\nexport function table_firstPage<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>) {\n  return table_setPageIndex(table, 0)\n}\n\nexport function table_lastPage<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>) {\n  return table_setPageIndex(table, table_getPageCount(table) - 1)\n}\n\nexport function table_getPageCount<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>) {\n  return (\n    table.options.pageCount ??\n    Math.ceil(\n      table_getRowCount(table) /\n        (table.store.state.pagination?.pageSize ?? defaultPageSize),\n    )\n  )\n}\n\nexport function table_getRowCount<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>) {\n  return table.options.rowCount ?? table.getPrePaginatedRowModel().rows.length\n}\n"
  },
  {
    "path": "packages/table-core/src/features/row-pinning/rowPinningFeature.ts",
    "content": "import {\n  assignPrototypeAPIs,\n  assignTableAPIs,\n  makeStateUpdater,\n} from '../../utils'\nimport {\n  getDefaultRowPinningState,\n  row_getCanPin,\n  row_getIsPinned,\n  row_getPinnedIndex,\n  row_pin,\n  table_getBottomRows,\n  table_getCenterRows,\n  table_getIsSomeRowsPinned,\n  table_getTopRows,\n  table_resetRowPinning,\n  table_setRowPinning,\n} from './rowPinningFeature.utils'\nimport type { RowData } from '../../types/type-utils'\nimport type { TableFeature, TableFeatures } from '../../types/TableFeatures'\n// import type {\n//   Row_RowPinning,\n//   TableOptions_RowPinning,\n//   TableState_RowPinning,\n//   Table_RowPinning,\n// } from './rowPinningFeature.types'\n\ninterface RowPinningFeatureConstructors<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  // Row: Row_RowPinning\n  // Table: Table_RowPinning<TFeatures, RowData>\n  // TableOptions: TableOptions_RowPinning<TFeatures, RowData>\n  // TableState: TableState_RowPinning\n}\n\nexport function constructRowPinningFeature<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(): TableFeature<RowPinningFeatureConstructors<TFeatures, TData>> {\n  return {\n    getInitialState: (initialState) => {\n      return {\n        ...initialState,\n        rowPinning: {\n          ...getDefaultRowPinningState(),\n          ...initialState.rowPinning,\n        },\n      }\n    },\n\n    getDefaultTableOptions: (table) => {\n      return {\n        onRowPinningChange: makeStateUpdater('rowPinning', table),\n      }\n    },\n\n    assignRowPrototype: (prototype, table) => {\n      assignPrototypeAPIs('rowPinningFeature', prototype, table, {\n        row_getCanPin: {\n          fn: (row) => row_getCanPin(row),\n        },\n        row_getIsPinned: {\n          fn: (row) => row_getIsPinned(row),\n        },\n        row_getPinnedIndex: {\n          fn: (row) => row_getPinnedIndex(row),\n          memoDeps: (row) => [\n            row.table.getRowModel().rows,\n            row.table.store.state.rowPinning,\n          ],\n        },\n        row_pin: {\n          fn: (row, position, includeLeafRows, includeParentRows) =>\n            row_pin(row, position, includeLeafRows, includeParentRows),\n        },\n      })\n    },\n\n    constructTableAPIs: (table) => {\n      assignTableAPIs('rowPinningFeature', table, {\n        table_setRowPinning: {\n          fn: (updater) => table_setRowPinning(table, updater),\n        },\n        table_resetRowPinning: {\n          fn: (defaultState) => table_resetRowPinning(table, defaultState),\n        },\n        table_getIsSomeRowsPinned: {\n          fn: (position) => table_getIsSomeRowsPinned(table, position),\n        },\n        table_getTopRows: {\n          fn: () => table_getTopRows(table),\n          memoDeps: () => [\n            table.getRowModel().rows,\n            table.store.state.rowPinning?.top,\n          ],\n        },\n        table_getBottomRows: {\n          fn: () => table_getBottomRows(table),\n          memoDeps: () => [\n            table.getRowModel().rows,\n            table.store.state.rowPinning?.bottom,\n          ],\n        },\n        table_getCenterRows: {\n          fn: () => table_getCenterRows(table),\n          memoDeps: () => [\n            table.getRowModel().rows,\n            table.store.state.rowPinning,\n          ],\n        },\n      })\n    },\n  }\n}\n\n/**\n * The Row Pinning feature adds row pinning state and APIs to the table and row objects.\n */\nexport const rowPinningFeature = constructRowPinningFeature()\n"
  },
  {
    "path": "packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts",
    "content": "import type { OnChangeFn, RowData, Updater } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Row } from '../../types/Row'\n\nexport type RowPinningPosition = false | 'top' | 'bottom'\n\nexport interface RowPinningState {\n  bottom: Array<string>\n  top: Array<string>\n}\n\nexport interface TableState_RowPinning {\n  rowPinning: RowPinningState\n}\n\nexport interface TableOptions_RowPinning<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  /**\n   * Enables/disables row pinning for the table. Defaults to `true`.\n   */\n  enableRowPinning?: boolean | ((row: Row<TFeatures, TData>) => boolean)\n  /**\n   * When `false`, pinned rows will not be visible if they are filtered or paginated out of the table. When `true`, pinned rows will always be visible regardless of filtering or pagination. Defaults to `true`.\n   */\n  keepPinnedRows?: boolean\n  /**\n   * If provided, this function will be called with an `updaterFn` when `state.rowPinning` changes. This overrides the default internal state management, so you will also need to supply `state.rowPinning` from your own managed state.\n   */\n  onRowPinningChange?: OnChangeFn<RowPinningState>\n}\n\nexport interface RowPinningDefaultOptions {\n  onRowPinningChange: OnChangeFn<RowPinningState>\n}\n\nexport interface Row_RowPinning {\n  /**\n   * Returns whether or not the row can be pinned.\n   */\n  getCanPin: () => boolean\n  /**\n   * Returns the pinned position of the row. (`'top'`, `'bottom'` or `false`)\n   */\n  getIsPinned: () => RowPinningPosition\n  /**\n   * Returns the numeric pinned index of the row within a pinned row group.\n   */\n  getPinnedIndex: () => number\n  /**\n   * Pins a row to the `'top'` or `'bottom'`, or unpins the row to the center if `false` is passed.\n   */\n  pin: (\n    position: RowPinningPosition,\n    includeLeafRows?: boolean,\n    includeParentRows?: boolean,\n  ) => void\n}\n\nexport interface Table_RowPinning<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  /**\n   * Returns all bottom pinned rows.\n   */\n  getBottomRows: () => Array<Row<TFeatures, TData>>\n  /**\n   * Returns all rows that are not pinned to the top or bottom.\n   */\n  getCenterRows: () => Array<Row<TFeatures, TData>>\n  /**\n   * Returns whether or not any rows are pinned. Optionally specify to only check for pinned rows in either the `top` or `bottom` position.\n   */\n  getIsSomeRowsPinned: (position?: RowPinningPosition) => boolean\n  /**\n   * Returns all top pinned rows.\n   */\n  getTopRows: () => Array<Row<TFeatures, TData>>\n  /**\n   * Resets the **rowPinning** state to `initialState.rowPinning`, or `true` can be passed to force a default blank state reset to `{ top: [], bottom: [], }`.\n   */\n  resetRowPinning: (defaultState?: boolean) => void\n  /**\n   * Sets or updates the `state.rowPinning` state.\n   */\n  setRowPinning: (updater: Updater<RowPinningState>) => void\n}\n"
  },
  {
    "path": "packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts",
    "content": "import { row_getIsAllParentsExpanded } from '../row-expanding/rowExpandingFeature.utils'\nimport { callMemoOrStaticFn } from '../../utils'\nimport type { RowData, Updater } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Table_Internal } from '../../types/Table'\nimport type { Row } from '../../types/Row'\nimport type {\n  RowPinningPosition,\n  RowPinningState,\n} from './rowPinningFeature.types'\n\n// State Utils\n\nexport function getDefaultRowPinningState(): RowPinningState {\n  return structuredClone({\n    top: [],\n    bottom: [],\n  })\n}\n\nexport function table_setRowPinning<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  table: Table_Internal<TFeatures, TData>,\n  updater: Updater<RowPinningState>,\n): void {\n  table.options.onRowPinningChange?.(updater)\n}\n\nexport function table_resetRowPinning<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>, defaultState?: boolean): void {\n  table_setRowPinning(\n    table,\n    defaultState\n      ? getDefaultRowPinningState()\n      : (table.initialState.rowPinning ?? getDefaultRowPinningState()),\n  )\n}\n\n// Table Utils\n\nexport function table_getIsSomeRowsPinned<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  table: Table_Internal<TFeatures, TData>,\n  position?: RowPinningPosition,\n): boolean {\n  const rowPinning = table.store.state.rowPinning\n\n  if (!position) {\n    return Boolean(rowPinning?.top.length || rowPinning?.bottom.length)\n  }\n  return Boolean(rowPinning?.[position].length)\n}\n\nfunction table_getPinnedRows<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  table: Table_Internal<TFeatures, TData>,\n  position: 'top' | 'bottom',\n): Array<Row<TFeatures, TData>> {\n  const visibleRows = table.getRowModel().rows\n  const pinnedRowIds = table.store.state.rowPinning?.[position] ?? []\n\n  const rows =\n    (table.options.keepPinnedRows ?? true)\n      ? // get all rows that are pinned even if they would not be otherwise visible\n        // account for expanded parent rows, but not pagination or filtering\n        pinnedRowIds.map((rowId) => {\n          const row = table.getRow(rowId, true)\n          return row_getIsAllParentsExpanded(row) ? row : null\n        })\n      : // else get only visible rows that are pinned\n        pinnedRowIds.map(\n          (rowId) => visibleRows.find((row) => row.id === rowId)!,\n        )\n\n  const filteredRows = rows.filter((r) => !!r)\n  // Assign position property directly to preserve prototype chain\n  filteredRows.forEach((row) => {\n    ;(row as any).position = position\n  })\n  return filteredRows\n}\n\nexport function table_getTopRows<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>): Array<Row<TFeatures, TData>> {\n  return table_getPinnedRows(table, 'top')\n}\n\nexport function table_getBottomRows<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>): Array<Row<TFeatures, TData>> {\n  return table_getPinnedRows(table, 'bottom')\n}\n\nexport function table_getCenterRows<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>): Array<Row<TFeatures, TData>> {\n  const { top, bottom } =\n    table.store.state.rowPinning ?? getDefaultRowPinningState()\n  const allRows = table.getRowModel().rows\n\n  const topAndBottom = new Set([...top, ...bottom])\n  return allRows.filter((d) => !topAndBottom.has(d.id))\n}\n\n// Row Utils\n\nexport function row_getCanPin<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(row: Row<TFeatures, TData>): boolean {\n  const { enableRowPinning } = row.table.options\n  if (typeof enableRowPinning === 'function') {\n    return enableRowPinning(row)\n  }\n  return enableRowPinning ?? true\n}\n\nexport function row_getIsPinned<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(row: Row<TFeatures, TData>): RowPinningPosition {\n  const { top, bottom } =\n    row.table.store.state.rowPinning ?? getDefaultRowPinningState()\n\n  return top.includes(row.id)\n    ? 'top'\n    : bottom.includes(row.id)\n      ? 'bottom'\n      : false\n}\n\nexport function row_getPinnedIndex<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(row: Row<TFeatures, TData>): number {\n  const position = row_getIsPinned(row)\n  if (!position) return -1\n\n  const visiblePinnedRowIds = (\n    position === 'top'\n      ? callMemoOrStaticFn(row.table, 'getTopRows', table_getTopRows)\n      : callMemoOrStaticFn(row.table, 'getBottomRows', table_getBottomRows)\n  ).map(({ id }) => id)\n\n  return visiblePinnedRowIds.indexOf(row.id)\n}\n\nexport function row_pin<TFeatures extends TableFeatures, TData extends RowData>(\n  row: Row<TFeatures, TData>,\n  position: RowPinningPosition,\n  includeLeafRows?: boolean,\n  includeParentRows?: boolean,\n): void {\n  const leafRowIds = includeLeafRows\n    ? row.getLeafRows().map(({ id }) => id)\n    : []\n  const parentRowIds = includeParentRows\n    ? row.getParentRows().map(({ id }) => id)\n    : []\n  const rowIds: Set<string> = new Set([...parentRowIds, row.id, ...leafRowIds])\n\n  table_setRowPinning(row.table, (old) => {\n    if (position === 'bottom') {\n      return {\n        top: old.top.filter((d) => !rowIds.has(d)),\n        bottom: [\n          ...old.bottom.filter((d) => !rowIds.has(d)),\n          ...Array.from(rowIds),\n        ],\n      }\n    }\n\n    if (position === 'top') {\n      return {\n        top: [...old.top.filter((d) => !rowIds.has(d)), ...Array.from(rowIds)],\n        bottom: old.bottom.filter((d) => !rowIds.has(d)),\n      }\n    }\n\n    return {\n      top: old.top.filter((d) => !rowIds.has(d)),\n      bottom: old.bottom.filter((d) => !rowIds.has(d)),\n    }\n  })\n}\n"
  },
  {
    "path": "packages/table-core/src/features/row-selection/rowSelectionFeature.ts",
    "content": "import {\n  assignPrototypeAPIs,\n  assignTableAPIs,\n  makeStateUpdater,\n} from '../../utils'\nimport {\n  getDefaultRowSelectionState,\n  row_getCanMultiSelect,\n  row_getCanSelect,\n  row_getCanSelectSubRows,\n  row_getIsAllSubRowsSelected,\n  row_getIsSelected,\n  row_getIsSomeSelected,\n  row_getToggleSelectedHandler,\n  row_toggleSelected,\n  table_getFilteredSelectedRowModel,\n  table_getGroupedSelectedRowModel,\n  table_getIsAllPageRowsSelected,\n  table_getIsAllRowsSelected,\n  table_getIsSomePageRowsSelected,\n  table_getIsSomeRowsSelected,\n  table_getPreSelectedRowModel,\n  table_getSelectedRowModel,\n  table_getToggleAllPageRowsSelectedHandler,\n  table_getToggleAllRowsSelectedHandler,\n  table_resetRowSelection,\n  table_setRowSelection,\n  table_toggleAllPageRowsSelected,\n  table_toggleAllRowsSelected,\n} from './rowSelectionFeature.utils'\nimport type { RowData } from '../../types/type-utils'\nimport type { TableFeature, TableFeatures } from '../../types/TableFeatures'\n// import type {\n//   Row_RowSelection,\n//   TableOptions_RowSelection,\n//   TableState_RowSelection,\n//   Table_RowSelection,\n// } from './rowSelectionFeature.types'\n\ninterface RowSelectionFeatureConstructors<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  // Row: Row_RowSelection\n  // Table: Table_RowSelection<TFeatures, TData>\n  // TableOptions: TableOptions_RowSelection<TFeatures, TData>\n  // TableState: TableState_RowSelection\n}\n\nexport function constructRowSelectionFeature<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(): TableFeature<RowSelectionFeatureConstructors<TFeatures, TData>> {\n  return {\n    getInitialState: (initialState) => {\n      return {\n        rowSelection: getDefaultRowSelectionState(),\n        ...initialState,\n      }\n    },\n\n    getDefaultTableOptions: (table) => {\n      return {\n        onRowSelectionChange: makeStateUpdater('rowSelection', table),\n        enableRowSelection: true,\n        enableMultiRowSelection: true,\n        enableSubRowSelection: true,\n      }\n    },\n\n    assignRowPrototype: (prototype, table) => {\n      assignPrototypeAPIs('rowSelectionFeature', prototype, table, {\n        row_toggleSelected: {\n          fn: (row, value, opts) => row_toggleSelected(row, value, opts),\n        },\n        row_getIsSelected: {\n          fn: (row) => row_getIsSelected(row),\n        },\n        row_getIsSomeSelected: {\n          fn: (row) => row_getIsSomeSelected(row),\n        },\n        row_getIsAllSubRowsSelected: {\n          fn: (row) => row_getIsAllSubRowsSelected(row),\n        },\n        row_getCanSelect: {\n          fn: (row) => row_getCanSelect(row),\n        },\n        row_getCanSelectSubRows: {\n          fn: (row) => row_getCanSelectSubRows(row),\n        },\n        row_getCanMultiSelect: {\n          fn: (row) => row_getCanMultiSelect(row),\n        },\n        row_getToggleSelectedHandler: {\n          fn: (row) => row_getToggleSelectedHandler(row),\n        },\n      })\n    },\n\n    constructTableAPIs: (table) => {\n      assignTableAPIs('rowSelectionFeature', table, {\n        table_setRowSelection: {\n          fn: (updater) => table_setRowSelection(table, updater),\n        },\n        table_resetRowSelection: {\n          fn: (defaultState) => table_resetRowSelection(table, defaultState),\n        },\n        table_toggleAllRowsSelected: {\n          fn: (value) => table_toggleAllRowsSelected(table, value),\n        },\n        table_toggleAllPageRowsSelected: {\n          fn: (value) => table_toggleAllPageRowsSelected(table, value),\n        },\n        table_getPreSelectedRowModel: {\n          fn: () => table_getPreSelectedRowModel(table),\n        },\n        table_getSelectedRowModel: {\n          fn: () => table_getSelectedRowModel(table),\n          memoDeps: () => [\n            table.store.state.rowSelection,\n            table.getCoreRowModel(),\n          ],\n        },\n        table_getFilteredSelectedRowModel: {\n          fn: () => table_getFilteredSelectedRowModel(table),\n          memoDeps: () => [\n            table.store.state.rowSelection,\n            table.getFilteredRowModel(),\n          ],\n        },\n        table_getGroupedSelectedRowModel: {\n          fn: () => table_getGroupedSelectedRowModel(table),\n          memoDeps: () => [\n            table.store.state.rowSelection,\n            table.getSortedRowModel(),\n          ],\n        },\n        table_getIsAllRowsSelected: {\n          fn: () => table_getIsAllRowsSelected(table),\n        },\n        table_getIsAllPageRowsSelected: {\n          fn: () => table_getIsAllPageRowsSelected(table),\n        },\n        table_getIsSomeRowsSelected: {\n          fn: () => table_getIsSomeRowsSelected(table),\n        },\n        table_getIsSomePageRowsSelected: {\n          fn: () => table_getIsSomePageRowsSelected(table),\n        },\n        table_getToggleAllRowsSelectedHandler: {\n          fn: () => table_getToggleAllRowsSelectedHandler(table),\n        },\n        table_getToggleAllPageRowsSelectedHandler: {\n          fn: () => table_getToggleAllPageRowsSelectedHandler(table),\n        },\n      })\n    },\n  }\n}\n\n/**\n * The Row Selection feature adds row selection state and APIs to the table and row objects.\n */\nexport const rowSelectionFeature = constructRowSelectionFeature()\n"
  },
  {
    "path": "packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts",
    "content": "import type { OnChangeFn, RowData, Updater } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { RowModel } from '../../core/row-models/coreRowModelsFeature.types'\nimport type { Row } from '../../types/Row'\n\nexport type RowSelectionState = Record<string, boolean>\n\nexport interface TableState_RowSelection {\n  rowSelection: RowSelectionState\n}\n\nexport interface TableOptions_RowSelection<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  /**\n   * - Enables/disables multiple row selection for all rows in the table OR\n   * - A function that given a row, returns whether to enable/disable multiple row selection for that row's children/grandchildren\n   */\n  enableMultiRowSelection?: boolean | ((row: Row<TFeatures, TData>) => boolean)\n  /**\n   * - Enables/disables row selection for all rows in the table OR\n   * - A function that given a row, returns whether to enable/disable row selection for that row\n   */\n  enableRowSelection?: boolean | ((row: Row<TFeatures, TData>) => boolean)\n  /**\n   * Enables/disables automatic sub-row selection when a parent row is selected, or a function that enables/disables automatic sub-row selection for each row.\n   * (Use in combination with expanding or grouping features)\n   */\n  enableSubRowSelection?: boolean | ((row: Row<TFeatures, TData>) => boolean)\n  /**\n   * If provided, this function will be called with an `updaterFn` when `state.rowSelection` changes. This overrides the default internal state management, so you will need to persist the state change either fully or partially outside of the table.\n   */\n  onRowSelectionChange?: OnChangeFn<RowSelectionState>\n  // enableGroupingRowSelection?:\n  //   | boolean\n  //   | ((\n  //       row: Row<TFeatures, TData>\n  //     ) => boolean)\n  // isAdditiveSelectEvent?: (e: unknown) => boolean\n  // isInclusiveSelectEvent?: (e: unknown) => boolean\n  // selectRowsFn?: (\n  //   table: Table<TFeatures, TData>,\n  //   rowModel: RowModel<TFeatures, TData>\n  // ) => RowModel<TFeatures, TData>\n}\n\nexport interface Row_RowSelection {\n  /**\n   * Returns whether or not the row can multi-select.\n   */\n  getCanMultiSelect: () => boolean\n  /**\n   * Returns whether or not the row can be selected.\n   */\n  getCanSelect: () => boolean\n  /**\n   * Returns whether or not the row can select sub rows automatically when the parent row is selected.\n   */\n  getCanSelectSubRows: () => boolean\n  /**\n   * Returns whether or not all of the row's sub rows are selected.\n   */\n  getIsAllSubRowsSelected: () => boolean\n  /**\n   * Returns whether or not the row is selected.\n   */\n  getIsSelected: () => boolean\n  /**\n   * Returns whether or not some of the row's sub rows are selected.\n   */\n  getIsSomeSelected: () => boolean\n  /**\n   * Returns a handler that can be used to toggle the row.\n   */\n  getToggleSelectedHandler: () => (event: unknown) => void\n  /**\n   * Selects/deselects the row.\n   */\n  toggleSelected: (value?: boolean, opts?: { selectChildren?: boolean }) => void\n}\n\nexport interface Table_RowSelection<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  /**\n   * Returns the row model of all rows that are selected after filtering has been applied.\n   */\n  getFilteredSelectedRowModel: () => RowModel<TFeatures, TData>\n  /**\n   * Returns the row model of all rows that are selected after grouping has been applied.\n   */\n  getGroupedSelectedRowModel: () => RowModel<TFeatures, TData>\n  /**\n   * Returns whether or not all rows on the current page are selected.\n   */\n  getIsAllPageRowsSelected: () => boolean\n  /**\n   * Returns whether or not all rows in the table are selected.\n   */\n  getIsAllRowsSelected: () => boolean\n  /**\n   * Returns whether or not any rows on the current page are selected.\n   */\n  getIsSomePageRowsSelected: () => boolean\n  /**\n   * Returns whether or not any rows in the table are selected.\n   */\n  getIsSomeRowsSelected: () => boolean\n  /**\n   * Returns the core row model of all rows before row selection has been applied.\n   */\n  getPreSelectedRowModel: () => RowModel<TFeatures, TData>\n  /**\n   * Returns the row model of all rows that are selected.\n   */\n  getSelectedRowModel: () => RowModel<TFeatures, TData>\n  /**\n   * Returns a handler that can be used to toggle all rows on the current page.\n   */\n  getToggleAllPageRowsSelectedHandler: () => (event: unknown) => void\n  /**\n   * Returns a handler that can be used to toggle all rows in the table.\n   */\n  getToggleAllRowsSelectedHandler: () => (event: unknown) => void\n  /**\n   * Resets the **rowSelection** state to the `initialState.rowSelection`, or `true` can be passed to force a default blank state reset to `{}`.\n   */\n  resetRowSelection: (defaultState?: boolean) => void\n  /**\n   * Sets or updates the `state.rowSelection` state.\n   */\n  setRowSelection: (updater: Updater<RowSelectionState>) => void\n  /**\n   * Selects/deselects all rows on the current page.\n   */\n  toggleAllPageRowsSelected: (value?: boolean) => void\n  /**\n   * Selects/deselects all rows in the table.\n   */\n  toggleAllRowsSelected: (value?: boolean) => void\n}\n"
  },
  {
    "path": "packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts",
    "content": "import type { RowData, Updater } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { RowModel } from '../../core/row-models/coreRowModelsFeature.types'\nimport type { Table_Internal } from '../../types/Table'\nimport type { Row } from '../../types/Row'\nimport type { RowSelectionState } from './rowSelectionFeature.types'\n\n// State APIs\n\nexport function getDefaultRowSelectionState(): RowSelectionState {\n  return structuredClone({})\n}\n\nexport function table_setRowSelection<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  table: Table_Internal<TFeatures, TData>,\n  updater: Updater<RowSelectionState>,\n) {\n  table.options.onRowSelectionChange?.(updater)\n}\n\nexport function table_resetRowSelection<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>, defaultState?: boolean) {\n  table_setRowSelection(\n    table,\n    defaultState ? {} : (table.initialState.rowSelection ?? {}),\n  )\n}\n\n// Table APIs\n\nexport function table_toggleAllRowsSelected<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>, value?: boolean) {\n  table_setRowSelection(table, (old) => {\n    value =\n      typeof value !== 'undefined' ? value : !table_getIsAllRowsSelected(table)\n\n    const rowSelection = { ...old }\n\n    const preGroupedFlatRows = table.getPreGroupedRowModel().flatRows\n\n    // We don't use `mutateRowIsSelected` here for performance reasons.\n    // All of the rows are flat already, so it wouldn't be worth it\n    if (value) {\n      preGroupedFlatRows.forEach((row) => {\n        if (!row_getCanSelect(row)) {\n          return\n        }\n        rowSelection[row.id] = true\n      })\n    } else {\n      preGroupedFlatRows.forEach((row) => {\n        delete rowSelection[row.id]\n      })\n    }\n\n    return rowSelection\n  })\n}\n\nexport function table_toggleAllPageRowsSelected<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>, value?: boolean) {\n  table_setRowSelection(table, (old) => {\n    const resolvedValue =\n      typeof value !== 'undefined'\n        ? value\n        : !table_getIsAllPageRowsSelected(table)\n\n    const rowSelection: RowSelectionState = { ...old }\n\n    table.getRowModel().rows.forEach((row) => {\n      mutateRowIsSelected(rowSelection, row.id, resolvedValue, true, table)\n    })\n\n    return rowSelection\n  })\n}\n\nexport function table_getPreSelectedRowModel<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>): RowModel<TFeatures, TData> {\n  return table.getCoreRowModel()\n}\n\nexport function table_getSelectedRowModel<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>) {\n  const rowModel = table.getCoreRowModel()\n\n  if (!Object.keys(table.store.state.rowSelection ?? {}).length) {\n    return {\n      rows: [],\n      flatRows: [],\n      rowsById: {},\n    }\n  }\n\n  return selectRowsFn(rowModel)\n}\n\nexport function table_getFilteredSelectedRowModel<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>) {\n  const rowModel = table.getCoreRowModel()\n\n  if (!Object.keys(table.store.state.rowSelection ?? {}).length) {\n    return {\n      rows: [],\n      flatRows: [],\n      rowsById: {},\n    }\n  }\n\n  return selectRowsFn(rowModel)\n}\n\nexport function table_getGroupedSelectedRowModel<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>) {\n  const rowModel = table.getCoreRowModel()\n\n  if (!Object.keys(table.store.state.rowSelection ?? {}).length) {\n    return {\n      rows: [],\n      flatRows: [],\n      rowsById: {},\n    }\n  }\n\n  return selectRowsFn(rowModel)\n}\n\nexport function table_getIsAllRowsSelected<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>) {\n  const preGroupedFlatRows = table.getFilteredRowModel().flatRows\n  const rowSelection =\n    table.store.state.rowSelection ?? ({} as RowSelectionState)\n\n  let isAllRowsSelected = Boolean(\n    preGroupedFlatRows.length && Object.keys(rowSelection).length,\n  )\n\n  if (isAllRowsSelected) {\n    if (\n      preGroupedFlatRows.some(\n        (row) => row_getCanSelect(row) && !rowSelection[row.id],\n      )\n    ) {\n      isAllRowsSelected = false\n    }\n  }\n\n  return isAllRowsSelected\n}\n\nexport function table_getIsAllPageRowsSelected<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>) {\n  const paginationFlatRows = table\n    .getPaginatedRowModel()\n    .flatRows.filter((row) => row_getCanSelect(row))\n  const rowSelection =\n    table.store.state.rowSelection ?? ({} as RowSelectionState)\n\n  let isAllPageRowsSelected = !!paginationFlatRows.length\n\n  if (\n    isAllPageRowsSelected &&\n    paginationFlatRows.some((row) => !rowSelection[row.id])\n  ) {\n    isAllPageRowsSelected = false\n  }\n\n  return isAllPageRowsSelected\n}\n\nexport function table_getIsSomeRowsSelected<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>) {\n  const totalSelected = Object.keys(table.store.state.rowSelection ?? {}).length\n  return (\n    totalSelected > 0 &&\n    totalSelected < table.getFilteredRowModel().flatRows.length\n  )\n}\n\nexport function table_getIsSomePageRowsSelected<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>) {\n  const paginationFlatRows = table.getPaginatedRowModel().flatRows\n  return table_getIsAllPageRowsSelected(table)\n    ? false\n    : paginationFlatRows\n        .filter((row) => row_getCanSelect(row))\n        .some((row) => row_getIsSelected(row) || row_getIsSomeSelected(row))\n}\n\nexport function table_getToggleAllRowsSelectedHandler<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>) {\n  return (e: unknown) => {\n    table_toggleAllRowsSelected(\n      table,\n      ((e as MouseEvent).target as HTMLInputElement).checked,\n    )\n  }\n}\n\nexport function table_getToggleAllPageRowsSelectedHandler<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>) {\n  return (e: unknown) => {\n    table_toggleAllPageRowsSelected(\n      table,\n      ((e as MouseEvent).target as HTMLInputElement).checked,\n    )\n  }\n}\n\n// Row APIs\n\nexport function row_toggleSelected<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  row: Row<TFeatures, TData>,\n  value?: boolean,\n  opts?: {\n    selectChildren?: boolean\n  },\n) {\n  const isSelected = row_getIsSelected(row)\n\n  table_setRowSelection(row.table, (old) => {\n    value = typeof value !== 'undefined' ? value : !isSelected\n\n    if (row_getCanSelect(row) && isSelected === value) {\n      return old\n    }\n\n    const selectedRowIds = { ...old }\n\n    mutateRowIsSelected(\n      selectedRowIds,\n      row.id,\n      value,\n      opts?.selectChildren ?? true,\n      row.table,\n    )\n\n    return selectedRowIds\n  })\n}\n\nexport function row_getIsSelected<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(row: Row<TFeatures, TData>) {\n  return isRowSelected(row)\n}\n\nexport function row_getIsSomeSelected<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(row: Row<TFeatures, TData>) {\n  return isSubRowSelected(row) === 'some'\n}\n\nexport function row_getIsAllSubRowsSelected<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(row: Row<TFeatures, TData>) {\n  return isSubRowSelected(row) === 'all'\n}\n\nexport function row_getCanSelect<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(row: Row<TFeatures, TData>) {\n  const options = row.table.options\n  if (typeof options.enableRowSelection === 'function') {\n    return options.enableRowSelection(row)\n  }\n\n  return options.enableRowSelection ?? true\n}\n\nexport function row_getCanSelectSubRows<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(row: Row<TFeatures, TData>) {\n  const options = row.table.options\n  if (typeof options.enableSubRowSelection === 'function') {\n    return options.enableSubRowSelection(row)\n  }\n\n  return options.enableSubRowSelection ?? true\n}\n\nexport function row_getCanMultiSelect<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(row: Row<TFeatures, TData>) {\n  const options = row.table.options\n  if (typeof options.enableMultiRowSelection === 'function') {\n    return options.enableMultiRowSelection(row)\n  }\n\n  return options.enableMultiRowSelection ?? true\n}\n\nexport function row_getToggleSelectedHandler<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(row: Row<TFeatures, TData>) {\n  const canSelect = row_getCanSelect(row)\n\n  return (e: unknown) => {\n    if (!canSelect) return\n    row_toggleSelected(\n      row,\n      ((e as MouseEvent).target as HTMLInputElement).checked,\n    )\n  }\n}\n\nconst mutateRowIsSelected = <\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  selectedRowIds: Record<string, boolean>,\n  rowId: string,\n  value: boolean,\n  includeChildren: boolean,\n  table: Table_Internal<TFeatures, TData>,\n) => {\n  const row = table.getRow(rowId, true)\n\n  if (value) {\n    if (!row_getCanMultiSelect(row)) {\n      Object.keys(selectedRowIds).forEach((key) => delete selectedRowIds[key])\n    }\n    if (row_getCanSelect(row)) {\n      selectedRowIds[rowId] = true\n    }\n  } else {\n    delete selectedRowIds[rowId]\n  }\n\n  if (includeChildren && row.subRows.length && row_getCanSelectSubRows(row)) {\n    row.subRows.forEach((r) =>\n      mutateRowIsSelected(selectedRowIds, r.id, value, includeChildren, table),\n    )\n  }\n}\n\nexport function selectRowsFn<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(rowModel: RowModel<TFeatures, TData>): RowModel<TFeatures, TData> {\n  const newSelectedFlatRows: Array<Row<TFeatures, TData>> = []\n  const newSelectedRowsById: Record<string, Row<TFeatures, TData>> = {}\n\n  // Filters top level and nested rows\n  const recurseRows = (\n    rows: Array<Row<TFeatures, TData>>,\n    depth = 0,\n  ): Array<Row<TFeatures, TData>> => {\n    return rows\n      .map((row) => {\n        const isSelected = isRowSelected(row)\n\n        if (isSelected) {\n          newSelectedFlatRows.push(row)\n          newSelectedRowsById[row.id] = row\n        }\n\n        if (row.subRows.length) {\n          row = {\n            ...row,\n            subRows: recurseRows(row.subRows, depth + 1),\n          }\n        }\n\n        if (isSelected) {\n          return row\n        }\n      })\n      .filter((x) => !!x)\n  }\n\n  return {\n    rows: recurseRows(rowModel.rows),\n    flatRows: newSelectedFlatRows,\n    rowsById: newSelectedRowsById,\n  }\n}\n\nexport function isRowSelected<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(row: Row<TFeatures, TData>): boolean {\n  return (row.table.store.state.rowSelection ?? {})[row.id] ?? false\n}\n\nexport function isSubRowSelected<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(row: Row<TFeatures, TData>): boolean | 'some' | 'all' {\n  if (!row.subRows.length) return false\n\n  let allChildrenSelected = true\n  let someSelected = false\n\n  row.subRows.forEach((subRow) => {\n    // Bail out early if we know both of these\n    if (someSelected && !allChildrenSelected) {\n      return\n    }\n\n    if (row_getCanSelect(subRow)) {\n      if (isRowSelected(subRow)) {\n        someSelected = true\n      } else {\n        allChildrenSelected = false\n      }\n    }\n\n    // Check row selection of nested subrows\n    if (subRow.subRows.length) {\n      const subRowChildrenSelected = isSubRowSelected(subRow)\n      if (subRowChildrenSelected === 'all') {\n        someSelected = true\n      } else if (subRowChildrenSelected === 'some') {\n        someSelected = true\n        allChildrenSelected = false\n      } else {\n        allChildrenSelected = false\n      }\n    }\n  })\n\n  // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n  return allChildrenSelected ? 'all' : someSelected ? 'some' : false\n}\n"
  },
  {
    "path": "packages/table-core/src/features/row-sorting/createSortedRowModel.ts",
    "content": "import { tableMemo } from '../../utils'\nimport { table_autoResetPageIndex } from '../row-pagination/rowPaginationFeature.utils'\nimport { column_getCanSort, column_getSortFn } from './rowSortingFeature.utils'\nimport type { Column_Internal } from '../../types/Column'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { RowModel } from '../../core/row-models/coreRowModelsFeature.types'\nimport type { Table, Table_Internal } from '../../types/Table'\nimport type { Row } from '../../types/Row'\nimport type { SortFn, SortFns } from './rowSortingFeature.types'\nimport type { RowData } from '../../types/type-utils'\n\nexport function createSortedRowModel<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  sortFns: Record<keyof SortFns, SortFn<TFeatures, TData>>,\n): (table: Table<TFeatures, TData>) => () => RowModel<TFeatures, TData> {\n  return (_table) => {\n    const table = _table as Table_Internal<TFeatures, TData>\n    if (!table._rowModelFns.sortFns) table._rowModelFns.sortFns = sortFns\n    return tableMemo({\n      feature: 'rowSortingFeature',\n      table,\n      fnName: 'table.getSortedRowModel',\n      memoDeps: () => [table.store.state.sorting, table.getPreSortedRowModel()],\n      fn: () => _createSortedRowModel(table),\n      onAfterUpdate: () => table_autoResetPageIndex(table),\n    })\n  }\n}\n\nfunction _createSortedRowModel<\n  TFeatures extends TableFeatures,\n  TData extends RowData = any,\n>(table: Table_Internal<TFeatures, TData>): RowModel<TFeatures, TData> {\n  const preSortedRowModel = table.getPreSortedRowModel()\n  const sorting = table.store.state.sorting\n\n  if (!preSortedRowModel.rows.length || !sorting?.length) {\n    return preSortedRowModel\n  }\n\n  const sortedFlatRows: Array<Row<TFeatures, TData>> = []\n\n  // Filter out sortings that correspond to non existing columns\n  const availableSorting = sorting.filter((sort) =>\n    column_getCanSort(\n      table.getColumn(sort.id) as Column_Internal<TFeatures, TData>,\n    ),\n  )\n\n  const columnInfoById: Record<\n    string,\n    {\n      sortUndefined?: false | -1 | 1 | 'first' | 'last'\n      invertSorting?: boolean\n      sortFn: SortFn<TFeatures, TData>\n    }\n  > = {}\n\n  availableSorting.forEach((sortEntry) => {\n    const column = table.getColumn(sortEntry.id) as\n      | Column_Internal<TFeatures, TData>\n      | undefined\n    if (!column) return\n\n    columnInfoById[sortEntry.id] = {\n      sortUndefined: column.columnDef.sortUndefined,\n      invertSorting: column.columnDef.invertSorting,\n      sortFn: column_getSortFn(column),\n    }\n  })\n\n  const sortData = (rows: Array<Row<TFeatures, TData>>) => {\n    // This will also perform a stable sorting using the row index\n    // if needed.\n    // Preserve prototype chain so methods like getValue() remain accessible\n    const sortedData = rows.map((row) => {\n      const cloned = Object.create(Object.getPrototypeOf(row))\n      return Object.assign(cloned, row)\n    })\n\n    sortedData.sort((rowA, rowB) => {\n      for (const sortEntry of availableSorting) {\n        const columnInfo = columnInfoById[sortEntry.id]!\n        const sortUndefined = columnInfo.sortUndefined\n        const isDesc = sortEntry.desc\n\n        let sortInt = 0\n\n        // All sorting ints should always return in ascending order\n        if (sortUndefined) {\n          const aValue = rowA.getValue(sortEntry.id)\n          const bValue = rowB.getValue(sortEntry.id)\n\n          const aUndefined = aValue === undefined\n          const bUndefined = bValue === undefined\n\n          if (aUndefined || bUndefined) {\n            if (sortUndefined === 'first') return aUndefined ? -1 : 1\n            if (sortUndefined === 'last') return aUndefined ? 1 : -1\n            sortInt =\n              aUndefined && bUndefined\n                ? 0\n                : aUndefined\n                  ? sortUndefined\n                  : -sortUndefined\n          }\n        }\n\n        if (sortInt === 0) {\n          sortInt = columnInfo.sortFn(rowA, rowB, sortEntry.id)\n        }\n\n        // If sorting is non-zero, take care of desc and inversion\n        if (sortInt !== 0) {\n          if (isDesc) {\n            sortInt *= -1\n          }\n\n          if (columnInfo.invertSorting) {\n            sortInt *= -1\n          }\n\n          return sortInt\n        }\n      }\n      return rowA.index - rowB.index\n    })\n\n    // If there are sub-rows, sort them\n    sortedData.forEach((row) => {\n      sortedFlatRows.push(row)\n      if (row.subRows.length) {\n        row.subRows = sortData(row.subRows)\n      }\n    })\n\n    return sortedData\n  }\n\n  return {\n    rows: sortData(preSortedRowModel.rows),\n    flatRows: sortedFlatRows,\n    rowsById: preSortedRowModel.rowsById,\n  }\n}\n"
  },
  {
    "path": "packages/table-core/src/features/row-sorting/rowSortingFeature.ts",
    "content": "import {\n  assignPrototypeAPIs,\n  assignTableAPIs,\n  makeStateUpdater,\n} from '../../utils'\nimport {\n  column_clearSorting,\n  column_getAutoSortDir,\n  column_getAutoSortFn,\n  column_getCanMultiSort,\n  column_getCanSort,\n  column_getFirstSortDir,\n  column_getIsSorted,\n  column_getNextSortingOrder,\n  column_getSortFn,\n  column_getSortIndex,\n  column_getToggleSortingHandler,\n  column_toggleSorting,\n  getDefaultSortingState,\n  table_resetSorting,\n  table_setSorting,\n} from './rowSortingFeature.utils'\nimport type { RowData } from '../../types/type-utils'\nimport type { TableFeature, TableFeatures } from '../../types/TableFeatures'\n// import type {\n//   CachedRowModel_Sorted,\n//   ColumnDef_RowSorting,\n//   Column_RowSorting,\n//   CreateRowModel_Sorted,\n//   RowModelFns_RowSorting,\n//   TableOptions_RowSorting,\n//   TableState_RowSorting,\n//   Table_RowSorting,\n// } from './rowSortingFeature.types'\n\ninterface RowSortingFeatureConstructors<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  // CachedRowModel: CachedRowModel_Sorted<TFeatures, TData>\n  // Column: Column_RowSorting<TFeatures, TData>\n  // ColumnDef: ColumnDef_RowSorting<TFeatures, TData>\n  // CreateRowModels: CreateRowModel_Sorted<TFeatures, TData>\n  // RowModelFns: RowModelFns_RowSorting<TFeatures, TData>\n  // Table: Table_RowSorting<TFeatures, TData>\n  // TableOptions: TableOptions_RowSorting\n  // TableState: TableState_RowSorting\n}\n\nexport function constructRowSortingFeature<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(): TableFeature<RowSortingFeatureConstructors<TFeatures, TData>> {\n  return {\n    getInitialState(initialState) {\n      return {\n        sorting: getDefaultSortingState(),\n        ...initialState,\n      }\n    },\n\n    getDefaultColumnDef() {\n      return {\n        sortFn: 'auto',\n        sortUndefined: 1,\n      }\n    },\n\n    getDefaultTableOptions(table) {\n      return {\n        onSortingChange: makeStateUpdater('sorting', table),\n        isMultiSortEvent: (e: unknown) => {\n          return (e as MouseEvent).shiftKey\n        },\n      }\n    },\n\n    assignColumnPrototype(prototype, table) {\n      assignPrototypeAPIs('rowSortingFeature', prototype, table, {\n        'column.getAutoSortFn': {\n          fn: (column) => column_getAutoSortFn(column),\n        },\n        'column.getAutoSortDir': {\n          fn: (column) => column_getAutoSortDir(column),\n        },\n        column_getSortFn: {\n          fn: (column) => column_getSortFn(column),\n        },\n        column_toggleSorting: {\n          fn: (column, desc, multi) =>\n            column_toggleSorting(column, desc, multi),\n        },\n        column_getFirstSortDir: {\n          fn: (column) => column_getFirstSortDir(column),\n        },\n        column_getNextSortingOrder: {\n          fn: (column, multi) => column_getNextSortingOrder(column, multi),\n        },\n        column_getCanSort: {\n          fn: (column) => column_getCanSort(column),\n        },\n        column_getCanMultiSort: {\n          fn: (column) => column_getCanMultiSort(column),\n        },\n        column_getIsSorted: {\n          fn: (column) => column_getIsSorted(column),\n        },\n        column_getSortIndex: {\n          fn: (column) => column_getSortIndex(column),\n        },\n        column_clearSorting: {\n          fn: (column) => column_clearSorting(column),\n        },\n        column_getToggleSortingHandler: {\n          fn: (column) => column_getToggleSortingHandler(column),\n        },\n      })\n    },\n\n    constructTableAPIs(table) {\n      assignTableAPIs('rowSortingFeature', table, {\n        table_setSorting: {\n          fn: (updater) => table_setSorting(table, updater),\n        },\n        table_resetSorting: {\n          fn: (defaultState) => table_resetSorting(table, defaultState),\n        },\n      })\n    },\n  }\n}\n\n/**\n * The (Row) Sorting feature adds sorting state and APIs to the table and column objects.\n */\nexport const rowSortingFeature = constructRowSortingFeature()\n"
  },
  {
    "path": "packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts",
    "content": "import type { RowModel } from '../../core/row-models/coreRowModelsFeature.types'\nimport type { Table } from '../../types/Table'\nimport type { BuiltInSortFn } from '../../fns/sortFns'\nimport type { OnChangeFn, RowData, Updater } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Row } from '../../types/Row'\n\nexport type SortDirection = 'asc' | 'desc'\n\nexport interface ColumnSort {\n  desc: boolean\n  id: string\n}\n\nexport type SortingState = Array<ColumnSort>\n\nexport interface TableState_RowSorting {\n  sorting: SortingState\n}\n\nexport interface RowModelFns_RowSorting<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  sortFns: Record<keyof SortFns, SortFn<TFeatures, TData>>\n}\n\nexport interface SortFns {}\n\nexport interface SortFn<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  (\n    rowA: Row<TFeatures, TData>,\n    rowB: Row<TFeatures, TData>,\n    columnId: string,\n  ): number\n}\n\nexport type CustomSortFns<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> = Record<string, SortFn<TFeatures, TData>>\n\nexport type SortFnOption<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> = 'auto' | keyof SortFns | BuiltInSortFn | SortFn<TFeatures, TData>\n\nexport interface ColumnDef_RowSorting<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  /**\n   * Enables/Disables multi-sorting for this column.\n   */\n  enableMultiSort?: boolean\n  /**\n   * Enables/Disables sorting for this column.\n   */\n  enableSorting?: boolean\n  /**\n   * Inverts the order of the sorting for this column. This is useful for values that have an inverted best/worst scale where lower numbers are better, eg. a ranking (1st, 2nd, 3rd) or golf-like scoring\n   */\n  invertSorting?: boolean\n  /**\n   * Set to `true` for sorting toggles on this column to start in the descending direction.\n   */\n  sortDescFirst?: boolean\n  /**\n   * The sorting function to use with this column.\n   * - A `string` referencing a built-in sorting function\n   * - A custom sorting function\n   */\n  sortFn?: SortFnOption<TFeatures, TData>\n  /**\n   * The priority of undefined values when sorting this column.\n   * - `false`\n   *   - Undefined values will be considered tied and need to be sorted by the next column filter or original index (whichever applies)\n   * - `-1`\n   *   - Undefined values will be sorted with higher priority (ascending) (if ascending, undefined will appear on the beginning of the list)\n   * - `1`\n   *   - Undefined values will be sorted with lower priority (descending) (if ascending, undefined will appear on the end of the list)\n   */\n  sortUndefined?: false | -1 | 1 | 'first' | 'last'\n}\n\nexport interface Column_RowSorting<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  /**\n   * Removes this column from the table's sorting state\n   */\n  clearSorting: () => void\n  /**\n   * Returns a sort direction automatically inferred based on the columns values.\n   */\n  getAutoSortDir: () => SortDirection\n  /**\n   * Returns a sorting function automatically inferred based on the columns values.\n   */\n  getAutoSortFn: () => SortFn<TFeatures, TData>\n  /**\n   * Returns whether this column can be multi-sorted.\n   */\n  getCanMultiSort: () => boolean\n  /**\n   * Returns whether this column can be sorted.\n   */\n  getCanSort: () => boolean\n  /**\n   * Returns the first direction that should be used when sorting this column.\n   */\n  getFirstSortDir: () => SortDirection\n  /**\n   * Returns the current sort direction of this column.\n   */\n  getIsSorted: () => false | SortDirection\n  /**\n   * Returns the next sorting order.\n   */\n  getNextSortingOrder: () => SortDirection | false\n  /**\n   * Returns the index position of this column's sorting within the sorting state\n   */\n  getSortIndex: () => number\n  /**\n   * Returns the resolved sorting function to be used for this column\n   */\n  getSortFn: () => SortFn<TFeatures, TData>\n  /**\n   * Returns a function that can be used to toggle this column's sorting state. This is useful for attaching a click handler to the column header.\n   */\n  getToggleSortingHandler: () => undefined | ((event: unknown) => void)\n  /**\n   * Toggles this columns sorting state. If `desc` is provided, it will force the sort direction to that value. If `isMulti` is provided, it will additivity multi-sort the column (or toggle it if it is already sorted).\n   */\n  toggleSorting: (desc?: boolean, isMulti?: boolean) => void\n}\n\nexport interface TableOptions_RowSorting {\n  /**\n   * Enables/disables the ability to remove multi-sorts\n   */\n  enableMultiRemove?: boolean\n  /**\n   * Enables/Disables multi-sorting for the table.\n   */\n  enableMultiSort?: boolean\n  /**\n   * Enables/Disables sorting for the table.\n   */\n  enableSorting?: boolean\n  /**\n   * Enables/Disables the ability to remove sorting for the table.\n   * - If `true` then changing sort order will circle like: 'none' -> 'desc' -> 'asc' -> 'none' -> ...\n   * - If `false` then changing sort order will circle like: 'none' -> 'desc' -> 'asc' -> 'desc' -> 'asc' -> ...\n   */\n  enableSortingRemoval?: boolean\n  /**\n   * Pass a custom function that will be used to determine if a multi-sort event should be triggered. It is passed the event from the sort toggle handler and should return `true` if the event should trigger a multi-sort.\n   */\n  isMultiSortEvent?: (e: unknown) => boolean\n  /**\n   * Enables manual sorting for the table. If this is `true`, you will be expected to sort your data before it is passed to the table. This is useful if you are doing server-side sorting.\n   */\n  manualSorting?: boolean\n  /**\n   * Set a maximum number of columns that can be multi-sorted.\n   */\n  maxMultiSortColCount?: number\n  /**\n   * If provided, this function will be called with an `updaterFn` when `state.sorting` changes. This overrides the default internal state management, so you will need to persist the state change either fully or partially outside of the table.\n   */\n  onSortingChange?: OnChangeFn<SortingState>\n  /**\n   * If `true`, all sorts will default to descending as their first toggle state.\n   */\n  sortDescFirst?: boolean\n}\n\nexport interface Table_RowSorting<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  /**\n   * Resets the **sorting** state to `initialState.sorting`, or `true` can be passed to force a default blank state reset to `[]`.\n   */\n  resetSorting: (defaultState?: boolean) => void\n  /**\n   * Sets or updates the `state.sorting` state.\n   */\n  setSorting: (updater: Updater<SortingState>) => void\n}\n\nexport interface Table_RowModels_Sorted<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  /**\n   * Returns the row model for the table before any sorting has been applied.\n   */\n  getPreSortedRowModel: () => RowModel<TFeatures, TData>\n  /**\n   * Returns the row model for the table after sorting has been applied.\n   */\n  getSortedRowModel: () => RowModel<TFeatures, TData>\n}\n\nexport interface CreateRowModel_Sorted<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  /**\n   * This function is used to retrieve the sorted row model. If using server-side sorting, this function is not required. To use client-side sorting, pass the exported `getSortedRowModel()` from your adapter to your table or implement your own.\n   */\n  sortedRowModel?: (\n    table: Table<TFeatures, TData>,\n  ) => () => RowModel<TFeatures, TData>\n}\n\nexport interface CachedRowModel_Sorted<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {\n  sortedRowModel: () => RowModel<TFeatures, TData>\n}\n"
  },
  {
    "path": "packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts",
    "content": "import { reSplitAlphaNumeric, sortFn_basic } from '../../fns/sortFns'\nimport { isFunction } from '../../utils'\nimport type { CellData, RowData, Updater } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Table_Internal } from '../../types/Table'\nimport type { Column_Internal } from '../../types/Column'\nimport type {\n  SortDirection,\n  SortFn,\n  SortingState,\n} from './rowSortingFeature.types'\n\n// State Utils\n\nexport function getDefaultSortingState(): SortingState {\n  return structuredClone([])\n}\n\nexport function table_setSorting<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>, updater: Updater<SortingState>) {\n  table.options.onSortingChange?.(updater)\n}\n\nexport function table_resetSorting<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>, defaultState?: boolean) {\n  table_setSorting(\n    table,\n    defaultState ? [] : (table.initialState.sorting ?? []),\n  )\n}\n\n// Column Utils\n\nexport function column_getAutoSortFn<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n>(column: Column_Internal<TFeatures, TData, TValue>): SortFn<TFeatures, TData> {\n  const sortFns = column.table._rowModelFns.sortFns as\n    | Record<string, SortFn<TFeatures, TData>>\n    | undefined\n\n  let sortFn: SortFn<TFeatures, TData> | undefined\n\n  const firstRows = column.table.getFilteredRowModel().flatRows.slice(10)\n\n  let isString = false\n\n  for (const row of firstRows) {\n    const value = row.getValue(column.id)\n\n    if (Object.prototype.toString.call(value) === '[object Date]') {\n      sortFn = sortFns?.datetime\n    }\n\n    if (typeof value === 'string') {\n      isString = true\n\n      if (value.split(reSplitAlphaNumeric).length > 1) {\n        sortFn = sortFns?.alphanumeric\n      }\n    }\n  }\n\n  if (isString) {\n    sortFn = sortFns?.text\n  }\n\n  return sortFn ?? sortFn_basic\n}\n\nexport function column_getAutoSortDir<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n>(column: Column_Internal<TFeatures, TData, TValue>) {\n  const firstRow = column.table.getFilteredRowModel().flatRows[0]\n\n  const value = firstRow ? firstRow.getValue(column.id) : undefined\n\n  if (typeof value === 'string') {\n    return 'asc'\n  }\n\n  return 'desc'\n}\n\nexport function column_getSortFn<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n>(column: Column_Internal<TFeatures, TData, TValue>): SortFn<TFeatures, TData> {\n  const sortFns = column.table._rowModelFns.sortFns as\n    | Record<string, SortFn<TFeatures, TData>>\n    | undefined\n\n  return isFunction(column.columnDef.sortFn)\n    ? column.columnDef.sortFn\n    : column.columnDef.sortFn === 'auto'\n      ? column_getAutoSortFn(column)\n      : (sortFns?.[column.columnDef.sortFn as string] ?? sortFn_basic)\n}\n\nexport function column_toggleSorting<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n>(\n  column: Column_Internal<TFeatures, TData, TValue>,\n  desc?: boolean,\n  multi?: boolean,\n) {\n  // if (column.columns.length) {\n  //   column.columns.forEach((c, i) => {\n  //     if (c.id) {\n  //       table.toggleColumnSorting(c.id, undefined, multi || !!i)\n  //     }\n  //   })\n  //   return\n  // }\n\n  // this needs to be outside of table.setSorting to be in sync with rerender\n  const nextSortingOrder = column_getNextSortingOrder(column)\n  const hasManualValue = typeof desc !== 'undefined'\n\n  table_setSorting(column.table, (old) => {\n    // Find any existing sorting for this column\n    const existingSorting = old.find((d) => d.id === column.id)\n    const existingIndex = old.findIndex((d) => d.id === column.id)\n\n    let newSorting: SortingState = []\n\n    // What should we do with this sort action?\n    let sortAction: 'add' | 'remove' | 'toggle' | 'replace'\n    const nextDesc = hasManualValue ? desc : nextSortingOrder === 'desc'\n\n    // Multi-mode\n    if (old.length && column_getCanMultiSort(column) && multi) {\n      if (existingSorting) {\n        sortAction = 'toggle'\n      } else {\n        sortAction = 'add'\n      }\n    } else {\n      // Normal mode\n      if (old.length && existingIndex !== old.length - 1) {\n        sortAction = 'replace'\n      } else if (existingSorting) {\n        sortAction = 'toggle'\n      } else {\n        sortAction = 'replace'\n      }\n    }\n\n    // Handle toggle states that will remove the sorting\n    if (sortAction === 'toggle') {\n      // If we are \"actually\" toggling (not a manual set value), should we remove the sorting?\n      if (!hasManualValue) {\n        // Is our intention to remove?\n        if (!nextSortingOrder) {\n          sortAction = 'remove'\n        }\n      }\n    }\n\n    if (sortAction === 'add') {\n      newSorting = [\n        ...old,\n        {\n          id: column.id,\n          desc: nextDesc,\n        },\n      ]\n      // Take latest n columns\n      newSorting.splice(\n        0,\n        newSorting.length -\n          (column.table.options.maxMultiSortColCount ??\n            Number.MAX_SAFE_INTEGER),\n      )\n    } else if (sortAction === 'toggle') {\n      // This flips (or sets) the\n      newSorting = old.map((d) => {\n        if (d.id === column.id) {\n          return {\n            ...d,\n            desc: nextDesc,\n          }\n        }\n        return d\n      })\n    } else if (sortAction === 'remove') {\n      newSorting = old.filter((d) => d.id !== column.id)\n    } else {\n      newSorting = [\n        {\n          id: column.id,\n          desc: nextDesc,\n        },\n      ]\n    }\n\n    return newSorting\n  })\n}\n\nexport function column_getFirstSortDir<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n>(column: Column_Internal<TFeatures, TData, TValue>) {\n  const sortDescFirst =\n    column.columnDef.sortDescFirst ??\n    column.table.options.sortDescFirst ??\n    column_getAutoSortDir(column) === 'desc'\n  return sortDescFirst ? 'desc' : 'asc'\n}\n\nexport function column_getNextSortingOrder<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n>(column: Column_Internal<TFeatures, TData, TValue>, multi?: boolean) {\n  const firstSortDirection = column_getFirstSortDir(column)\n  const isSorted = column_getIsSorted(column)\n\n  if (!isSorted) {\n    return firstSortDirection\n  }\n\n  if (\n    isSorted !== firstSortDirection &&\n    (column.table.options.enableSortingRemoval ?? true) && // If enableSortRemove, enable in general\n    (multi ? (column.table.options.enableMultiRemove ?? true) : true) // If multi, don't allow if enableMultiRemove))\n  ) {\n    return false\n  }\n  return isSorted === 'desc' ? 'asc' : 'desc'\n}\n\nexport function column_getCanSort<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n>(column: Column_Internal<TFeatures, TData, TValue>) {\n  return (\n    (column.columnDef.enableSorting ?? true) &&\n    (column.table.options.enableSorting ?? true) &&\n    !!column.accessorFn\n  )\n}\n\nexport function column_getCanMultiSort<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n>(column: Column_Internal<TFeatures, TData, TValue>): boolean {\n  return (\n    column.columnDef.enableMultiSort ??\n    column.table.options.enableMultiSort ??\n    !!column.accessorFn\n  )\n}\n\nexport function column_getIsSorted<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n>(column: Column_Internal<TFeatures, TData, TValue>): false | SortDirection {\n  const columnSort = column.table.store.state.sorting?.find(\n    (d) => d.id === column.id,\n  )\n  return !columnSort ? false : columnSort.desc ? 'desc' : 'asc'\n}\n\nexport function column_getSortIndex<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n>(column: Column_Internal<TFeatures, TData, TValue>): number {\n  return (\n    column.table.store.state.sorting?.findIndex((d) => d.id === column.id) ?? -1\n  )\n}\n\nexport function column_clearSorting<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n>(column: Column_Internal<TFeatures, TData, TValue>) {\n  // clear sorting for just 1 column\n  table_setSorting(column.table, (old) =>\n    old.length ? old.filter((d) => d.id !== column.id) : [],\n  )\n}\n\nexport function column_getToggleSortingHandler<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n>(column: Column_Internal<TFeatures, TData, TValue>) {\n  const canSort = column_getCanSort(column)\n\n  return (e: unknown) => {\n    if (!canSort) return\n    ;(e as any).persist?.()\n    column_toggleSorting(\n      column,\n\n      undefined,\n      column_getCanMultiSort(column)\n        ? column.table.options.isMultiSortEvent?.(e)\n        : false,\n    )\n  }\n}\n"
  },
  {
    "path": "packages/table-core/src/features/stockFeatures.ts",
    "content": "import { columnFacetingFeature } from './column-faceting/columnFacetingFeature'\nimport { columnFilteringFeature } from './column-filtering/columnFilteringFeature'\nimport { columnGroupingFeature } from './column-grouping/columnGroupingFeature'\nimport { columnOrderingFeature } from './column-ordering/columnOrderingFeature'\nimport { columnPinningFeature } from './column-pinning/columnPinningFeature'\nimport { columnResizingFeature } from './column-resizing/columnResizingFeature'\nimport { columnSizingFeature } from './column-sizing/columnSizingFeature'\nimport { columnVisibilityFeature } from './column-visibility/columnVisibilityFeature'\nimport { globalFilteringFeature } from './global-filtering/globalFilteringFeature'\nimport { rowExpandingFeature } from './row-expanding/rowExpandingFeature'\nimport { rowPaginationFeature } from './row-pagination/rowPaginationFeature'\nimport { rowPinningFeature } from './row-pinning/rowPinningFeature'\nimport { rowSelectionFeature } from './row-selection/rowSelectionFeature'\nimport { rowSortingFeature } from './row-sorting/rowSortingFeature'\n\nexport interface StockFeatures {\n  columnFacetingFeature: typeof columnFacetingFeature\n  columnFilteringFeature: typeof columnFilteringFeature\n  columnGroupingFeature: typeof columnGroupingFeature\n  columnOrderingFeature: typeof columnOrderingFeature\n  columnPinningFeature: typeof columnPinningFeature\n  columnResizingFeature: typeof columnResizingFeature\n  columnSizingFeature: typeof columnSizingFeature\n  columnVisibilityFeature: typeof columnVisibilityFeature\n  globalFilteringFeature: typeof globalFilteringFeature\n  rowExpandingFeature: typeof rowExpandingFeature\n  rowPaginationFeature: typeof rowPaginationFeature\n  rowPinningFeature: typeof rowPinningFeature\n  rowSelectionFeature: typeof rowSelectionFeature\n  rowSortingFeature: typeof rowSortingFeature\n}\n\nexport const stockFeatures: StockFeatures = {\n  columnFacetingFeature,\n  columnFilteringFeature,\n  columnGroupingFeature,\n  columnOrderingFeature,\n  columnPinningFeature,\n  columnResizingFeature,\n  columnSizingFeature,\n  columnVisibilityFeature,\n  globalFilteringFeature,\n  rowExpandingFeature,\n  rowPaginationFeature,\n  rowPinningFeature,\n  rowSelectionFeature,\n  rowSortingFeature,\n} as const\n"
  },
  {
    "path": "packages/table-core/src/features/table-reactivity/tableReactivityFeature.ts",
    "content": "import type { ReadonlyStore, Store } from '@tanstack/store'\nimport type { TableFeature, TableFeatures } from '../../types/TableFeatures'\nimport type { RowData } from '../../types/type-utils'\n\ninterface TableReactivityFeatureConstructors<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {}\n\nexport function constructReactivityFeature<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(bindings: {\n  stateNotifier?: () => unknown\n  optionsNotifier?: () => unknown\n}): TableFeature<TableReactivityFeatureConstructors<TFeatures, TData>> {\n  return {\n    constructTableAPIs: (table) => {\n      table.store = bindStore(table.store, bindings.stateNotifier)\n      table.optionsStore = bindStore(\n        table.optionsStore,\n        bindings.optionsNotifier,\n      )\n    },\n  }\n}\n\nconst bindStore = <T extends Store<any> | ReadonlyStore<any>>(\n  store: T,\n  notifier?: () => unknown,\n): T => {\n  const stateDescriptor = Object.getOwnPropertyDescriptor(\n    Object.getPrototypeOf(store),\n    'state',\n  )!\n\n  Object.defineProperty(store, 'state', {\n    configurable: true,\n    enumerable: true,\n    get() {\n      notifier?.()\n      return stateDescriptor.get!.call(store)\n    },\n  })\n\n  return store\n}\n"
  },
  {
    "path": "packages/table-core/src/fns/aggregationFns.ts",
    "content": "import { isNumberArray } from '../utils'\nimport type { RowData } from '../types/type-utils'\nimport type { TableFeatures } from '../types/TableFeatures'\nimport type { Row } from '../types/Row'\nimport type { AggregationFn } from '../features/column-grouping/columnGroupingFeature.types'\n\n/**\n * Aggregation function for summing up the values of a column.\n */\nexport const aggregationFn_sum: AggregationFn<any, any> = <\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  columnId: string,\n  _leafRows: Array<Row<any, any>>,\n  childRows: Array<Row<any, any>>,\n) => {\n  // It's faster to just add the aggregations together instead of\n  // process leaf nodes individually\n  return childRows.reduce((sumValue, next) => {\n    const nextValue = next.getValue(columnId)\n    return sumValue + (typeof nextValue === 'number' ? nextValue : 0)\n  }, 0)\n}\n\n/**\n * Aggregation function for finding the minimum value of a column.\n */\nexport const aggregationFn_min: AggregationFn<any, any> = <\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  columnId: string,\n  _leafRows: Array<Row<any, any>>,\n  childRows: Array<Row<any, any>>,\n) => {\n  let minValue: number | undefined\n\n  childRows.forEach((row) => {\n    const value = row.getValue(columnId)\n\n    if (\n      value != null &&\n      typeof value === 'number' &&\n      (minValue === undefined || value < minValue)\n    ) {\n      minValue = value\n    }\n  })\n\n  return minValue\n}\n\n/**\n * Aggregation function for finding the maximum value of a column.\n */\nexport const aggregationFn_max: AggregationFn<any, any> = <\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  columnId: string,\n  _leafRows: Array<Row<any, any>>,\n  childRows: Array<Row<any, any>>,\n) => {\n  let maxValue: number | undefined\n\n  childRows.forEach((row) => {\n    const value = row.getValue(columnId)\n    if (\n      value != null &&\n      typeof value === 'number' &&\n      (maxValue === undefined || value > maxValue)\n    ) {\n      maxValue = value\n    }\n  })\n\n  return maxValue\n}\n\n/**\n * Aggregation function for finding the extent (min and max) of a column.\n */\nexport const aggregationFn_extent: AggregationFn<any, any> = <\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  columnId: string,\n  _leafRows: Array<Row<any, any>>,\n  childRows: Array<Row<any, any>>,\n) => {\n  let minValue: number | undefined\n  let maxValue: number | undefined\n\n  childRows.forEach((row) => {\n    const value = row.getValue(columnId)\n    if (value != null && typeof value === 'number') {\n      if (minValue === undefined) {\n        minValue = maxValue = value\n      } else {\n        if (minValue > value) minValue = value\n        if (maxValue! < value) maxValue = value\n      }\n    }\n  })\n\n  return [minValue, maxValue]\n}\n\n/**\n * Aggregation function for finding the mean (average) of a column.\n */\nexport const aggregationFn_mean: AggregationFn<any, any> = <\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  columnId: string,\n  leafRows: Array<Row<any, any>>,\n) => {\n  let count = 0\n  let sumValue = 0\n\n  leafRows.forEach((row) => {\n    const value = row.getValue(columnId)\n    if (value != null && typeof value === 'number') {\n      ++count\n      sumValue += value\n    } else if (value != null) {\n      const numValue = +value\n      if (!Number.isNaN(numValue)) {\n        ++count\n        sumValue += numValue\n      }\n    }\n  })\n\n  if (count) return sumValue / count\n\n  return\n}\n\n/**\n * Aggregation function for finding the median value of a column.\n */\nexport const aggregationFn_median: AggregationFn<any, any> = <\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  columnId: string,\n  leafRows: Array<Row<any, any>>,\n) => {\n  if (!leafRows.length) {\n    return\n  }\n\n  const values = leafRows.map((row) => row.getValue(columnId))\n  if (!isNumberArray(values)) {\n    return\n  }\n  if (values.length === 1) {\n    return values[0]\n  }\n\n  const mid = Math.floor(values.length / 2)\n  const nums = values.sort((a, b) => a - b)\n  return values.length % 2 !== 0 ? nums[mid] : (nums[mid - 1]! + nums[mid]!) / 2\n}\n\n/**\n * Aggregation function for finding the unique values of a column.\n */\nexport const aggregationFn_unique: AggregationFn<any, any> = <\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  columnId: string,\n  leafRows: Array<Row<any, any>>,\n) => {\n  return Array.from(new Set(leafRows.map((d) => d.getValue(columnId))).values())\n}\n\n/**\n * Aggregation function for finding the count of unique values of a column.\n */\nexport const aggregationFn_uniqueCount: AggregationFn<any, any> = <\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  columnId: string,\n  leafRows: Array<Row<any, any>>,\n) => {\n  return new Set(leafRows.map((d) => d.getValue(columnId))).size\n}\n\n/**\n * Aggregation function for counting the number of rows in a column.\n */\nexport const aggregationFn_count: AggregationFn<any, any> = <\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  _columnId: string,\n  leafRows: Array<Row<any, any>>,\n) => {\n  return leafRows.length\n}\n\nexport const aggregationFns = {\n  sum: aggregationFn_sum,\n  min: aggregationFn_min,\n  max: aggregationFn_max,\n  extent: aggregationFn_extent,\n  mean: aggregationFn_mean,\n  median: aggregationFn_median,\n  unique: aggregationFn_unique,\n  uniqueCount: aggregationFn_uniqueCount,\n  count: aggregationFn_count,\n}\n\nexport type BuiltInAggregationFn = keyof typeof aggregationFns\n"
  },
  {
    "path": "packages/table-core/src/fns/filterFns.ts",
    "content": "import type { RowData } from '../types/type-utils'\nimport type { TableFeatures } from '../types/TableFeatures'\nimport type { Row } from '../types/Row'\nimport type { FilterFn } from '../features/column-filtering/columnFilteringFeature.types'\n\n// Basic filters\n\n/**\n * Filter function for checking if a value is exactly equal to a given value. (JS === comparison)\n */\nexport const filterFn_equals: FilterFn<any, any> = <\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  row: Row<TFeatures, TData>,\n  columnId: string,\n  filterValue: unknown,\n) => {\n  return row.getValue(columnId) === filterValue\n}\n\nfilterFn_equals.autoRemove = (val: any) => testFalsy(val)\n\n/**\n * Filter function for checking if a value is weakly equal to a given value. (JS == comparison)\n */\nexport const filterFn_weakEquals: FilterFn<any, any> = <\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  row: Row<TFeatures, TData>,\n  columnId: string,\n  filterValue: unknown,\n) => {\n  return row.getValue(columnId) == filterValue\n}\n\nfilterFn_weakEquals.autoRemove = (val: any) => testFalsy(val)\n\n// String filters\n\n/**\n * Filter function for checking if a string includes a given substring. (Case-sensitive)\n */\nexport const filterFn_includesStringSensitive: FilterFn<any, any> = <\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  row: Row<TFeatures, TData>,\n  columnId: string,\n  filterValue: string,\n) => {\n  return Boolean(\n    row.getValue(columnId)?.toString().includes(filterValue.toString()),\n  )\n}\n\nfilterFn_includesStringSensitive.autoRemove = (val: any) => testFalsy(val)\n\n/**\n * Filter function for checking if a string includes a given substring. (Non-case-sensitive)\n */\nexport const filterFn_includesString: FilterFn<any, any> = <\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  row: Row<TFeatures, TData>,\n  columnId: string,\n  filterValue: string,\n) => {\n  return Boolean(\n    row\n      .getValue(columnId)\n      ?.toString()\n      .toLowerCase()\n      .includes(filterValue.toString().toLowerCase()),\n  )\n}\n\nfilterFn_includesString.autoRemove = (val: any) => testFalsy(val)\n\n/**\n * Filter function for checking if a string is exactly equal to a given string. (Non-case-sensitive)\n */\nexport const filterFn_equalsString: FilterFn<any, any> = <\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  row: Row<TFeatures, TData>,\n  columnId: string,\n  filterValue: string,\n) => {\n  return (\n    row.getValue(columnId)?.toString().toLowerCase() ===\n    filterValue.toLowerCase()\n  )\n}\n\nfilterFn_equalsString.autoRemove = (val: any) => testFalsy(val)\n\n/**\n * Filter function for checking if a string is exactly equal to a given string. (Case-sensitive)\n */\nexport const filterFn_equalsStringSensitive: FilterFn<any, any> = <\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  row: Row<TFeatures, TData>,\n  columnId: string,\n  filterValue: string,\n) => {\n  return row.getValue(columnId)?.toString() === filterValue\n}\n\nfilterFn_equalsStringSensitive.autoRemove = (val: any) => testFalsy(val)\n\n// Number filters\n\n/**\n * Filter function for checking if a number is greater than a given number.\n */\nexport const filterFn_greaterThan: FilterFn<any, any> = <\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  row: Row<TFeatures, TData>,\n  columnId: string,\n  filterValue: Date | number | string,\n) => {\n  const rowValue = row.getValue(columnId)\n  const numericRowValue =\n    rowValue === null || rowValue === undefined ? 0 : +rowValue\n  const numericFilterValue = +filterValue\n\n  if (!isNaN(numericFilterValue) && !isNaN(numericRowValue)) {\n    return numericRowValue > numericFilterValue\n  }\n\n  const stringValue = (rowValue ?? '').toString().toLowerCase().trim()\n  const stringFilterValue = filterValue.toString().toLowerCase().trim()\n  return stringValue > stringFilterValue\n}\n\nfilterFn_greaterThan.resolveFilterValue = (val: any) => testFalsy(val)\n\n/**\n * Filter function for checking if a number is greater than or equal to a given number.\n */\nexport const filterFn_greaterThanOrEqualTo: FilterFn<any, any> = <\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  row: Row<TFeatures, TData>,\n  columnId: string,\n  filterValue: Date | number | string,\n) => {\n  return (\n    filterFn_greaterThan(row as any, columnId, filterValue) ||\n    filterFn_equals(row as any, columnId, filterValue)\n  )\n}\n\nfilterFn_greaterThanOrEqualTo.resolveFilterValue = (val: any) => testFalsy(val)\n\n/**\n * Filter function for checking if a number is less than a given number.\n */\nexport const filterFn_lessThan: FilterFn<any, any> = <\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  row: Row<TFeatures, TData>,\n  columnId: string,\n  filterValue: Date | number | string,\n) => {\n  return !filterFn_greaterThanOrEqualTo(row as any, columnId, filterValue)\n}\n\nfilterFn_lessThan.resolveFilterValue = (val: any) => testFalsy(val)\n\n/**\n * Filter function for checking if a number is less than or equal to a given number.\n */\nexport const filterFn_lessThanOrEqualTo: FilterFn<any, any> = <\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  row: Row<TFeatures, TData>,\n  columnId: string,\n  filterValue: Date | number | string,\n) => {\n  return !filterFn_greaterThan(row as any, columnId, filterValue)\n}\n\nfilterFn_lessThanOrEqualTo.resolveFilterValue = (val: any) => testFalsy(val)\n\n// Range filters\n\n/**\n * Filter function for checking if a number or a string is between two given values.\n */\nconst filterFn_between: FilterFn<any, any> = <\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  row: Row<TFeatures, TData>,\n  columnId: string,\n  filterValues: [number | string, number | string],\n): boolean =>\n  ((['', undefined] as Array<any>).includes(filterValues[0]) ||\n    filterFn_greaterThan(row as any, columnId, filterValues[0])) &&\n  ((!isNaN(+filterValues[0]) &&\n    !isNaN(+filterValues[1]) &&\n    +filterValues[0] > +filterValues[1]) ||\n    (['', undefined] as Array<any>).includes(filterValues[1]) ||\n    filterFn_lessThan(row as any, columnId, filterValues[1]))\n\nfilterFn_between.autoRemove = (val: any) => !val\n\n/**\n * Filter function for checking if a number or a string is between two given values or equal to them.\n */\nconst filterFn_betweenInclusive: FilterFn<any, any> = <\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  row: Row<TFeatures, TData>,\n  columnId: string,\n  filterValues: [number | string, number | string],\n): boolean =>\n  ((['', undefined] as Array<any>).includes(filterValues[0]) ||\n    filterFn_greaterThanOrEqualTo(row as any, columnId, filterValues[0])) &&\n  ((!isNaN(+filterValues[0]) &&\n    !isNaN(+filterValues[1]) &&\n    +filterValues[0] > +filterValues[1]) ||\n    (['', undefined] as Array<any>).includes(filterValues[1]) ||\n    filterFn_lessThanOrEqualTo(row as any, columnId, filterValues[1]))\n\nfilterFn_betweenInclusive.autoRemove = (val: any) => !val\n\n/**\n * Filter function for checking if a number is within a given range.\n */\nexport const filterFn_inNumberRange: FilterFn<any, any> = <\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  row: Row<TFeatures, TData>,\n  columnId: string,\n  filterValue: [number, number],\n) => {\n  const [min, max] = filterValue\n\n  const rowValue: number = row.getValue(columnId)\n  return rowValue >= min && rowValue <= max\n}\n\nfilterFn_inNumberRange.resolveFilterValue = (val: [any, any]) => {\n  const [unsafeMin, unsafeMax] = val\n\n  const parsedMin =\n    typeof unsafeMin !== 'number' ? parseFloat(unsafeMin) : unsafeMin\n  const parsedMax =\n    typeof unsafeMax !== 'number' ? parseFloat(unsafeMax) : unsafeMax\n\n  let min =\n    unsafeMin === null || Number.isNaN(parsedMin) ? -Infinity : parsedMin\n  let max = unsafeMax === null || Number.isNaN(parsedMax) ? Infinity : parsedMax\n\n  if (min > max) {\n    const temp = min\n    min = max\n    max = temp\n  }\n\n  return [min, max] as const\n}\n\nfilterFn_inNumberRange.autoRemove = (val: any) =>\n  testFalsy(val) || (testFalsy(val[0]) && testFalsy(val[1]))\n\n// Array filters\n\n/**\n * Filter function for checking if an array has a given value.\n */\nexport const filterFn_arrHas: FilterFn<any, any> = <\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  row: Row<TFeatures, TData>,\n  columnId: string,\n  filterValue: Array<unknown>,\n) => {\n  return filterValue.some((val) => row.getValue<unknown>(columnId) === val)\n}\n\n/**\n * Filter function for checking if an array includes a given value.\n */\nexport const filterFn_arrIncludes: FilterFn<any, any> = <\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  row: Row<TFeatures, TData>,\n  columnId: string,\n  filterValue: Array<unknown>,\n) => {\n  return filterValue.some((val) =>\n    (row.getValue<unknown>(columnId) as Array<unknown> | string).includes(\n      val as any,\n    ),\n  )\n}\n\nfilterFn_arrIncludes.autoRemove = (val: any) => testFalsy(val) || !val?.length\n\n/**\n * Filter function for checking if an array includes all of the given values.\n */\nexport const filterFn_arrIncludesAll: FilterFn<any, any> = <\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  row: Row<TFeatures, TData>,\n  columnId: string,\n  filterValue: Array<unknown>,\n) => {\n  const value = row.getValue<Array<unknown>>(columnId)\n  if (!Array.isArray(value)) return false\n  return !filterValue.some((val) => !value.includes(val))\n}\n\nfilterFn_arrIncludesAll.autoRemove = (val: any) =>\n  testFalsy(val) || !val?.length\n\n/**\n * Filter function for checking if an array includes any of the given values.\n */\nexport const filterFn_arrIncludesSome: FilterFn<any, any> = <\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  row: Row<TFeatures, TData>,\n  columnId: string,\n  filterValue: Array<unknown>,\n) => {\n  const value = row.getValue<Array<unknown>>(columnId)\n  if (!Array.isArray(value)) return false\n  return filterValue.some((val) => value.includes(val))\n}\n\nfilterFn_arrIncludesSome.autoRemove = (val: any) =>\n  testFalsy(val) || !val?.length\n\n// Export\n\nexport const filterFns = {\n  arrIncludes: filterFn_arrIncludes,\n  arrIncludesAll: filterFn_arrIncludesAll,\n  arrHas: filterFn_arrHas,\n  arrIncludesSome: filterFn_arrIncludesSome,\n  between: filterFn_between,\n  betweenInclusive: filterFn_betweenInclusive,\n  equals: filterFn_equals,\n  equalsString: filterFn_equalsString,\n  inNumberRange: filterFn_inNumberRange,\n  includesString: filterFn_includesString,\n  includesStringSensitive: filterFn_includesStringSensitive,\n  weakEquals: filterFn_weakEquals,\n}\n\nexport type BuiltInFilterFn = keyof typeof filterFns\n\n// Utils\n\nfunction testFalsy(val: any) {\n  return val === undefined || val === null || val === ''\n}\n"
  },
  {
    "path": "packages/table-core/src/fns/sortFns.ts",
    "content": "import type { RowData } from '../types/type-utils'\nimport type { TableFeatures } from '../types/TableFeatures'\nimport type { Row } from '../types/Row'\nimport type { SortFn } from '../features/row-sorting/rowSortingFeature.types'\n\nexport const reSplitAlphaNumeric = /([0-9]+)/gm\n\nexport const sortFn_alphanumeric: SortFn<any, any> = <\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  rowA: Row<any, any>,\n  rowB: Row<any, any>,\n  columnId: string,\n) => {\n  return compareAlphanumeric(\n    toString(rowA.getValue(columnId)).toLowerCase(),\n    toString(rowB.getValue(columnId)).toLowerCase(),\n  )\n}\n\nexport const sortFn_alphanumericCaseSensitive: SortFn<any, any> = <\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  rowA: Row<any, any>,\n  rowB: Row<any, any>,\n  columnId: string,\n) => {\n  return compareAlphanumeric(\n    toString(rowA.getValue(columnId)),\n    toString(rowB.getValue(columnId)),\n  )\n}\n\n// The text filter is more basic (less numeric support)\n// but is much faster\nexport const sortFn_text: SortFn<any, any> = <\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  rowA: Row<any, any>,\n  rowB: Row<any, any>,\n  columnId: string,\n) => {\n  return compareBasic(\n    toString(rowA.getValue(columnId)).toLowerCase(),\n    toString(rowB.getValue(columnId)).toLowerCase(),\n  )\n}\n\n// The text filter is more basic (less numeric support)\n// but is much faster\nexport const sortFn_textCaseSensitive: SortFn<any, any> = <\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  rowA: Row<any, any>,\n  rowB: Row<any, any>,\n  columnId: string,\n) => {\n  return compareBasic(\n    toString(rowA.getValue(columnId)),\n    toString(rowB.getValue(columnId)),\n  )\n}\n\nexport const sortFn_datetime: SortFn<any, any> = <\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  rowA: Row<any, any>,\n  rowB: Row<any, any>,\n  columnId: string,\n) => {\n  const a: number | string = rowA.getValue(columnId)\n  const b: number | string = rowB.getValue(columnId)\n\n  // Can handle nullish values\n  // Use > and < because == (and ===) doesn't work with\n  // Date objects (would require calling getTime()).\n  return a > b ? 1 : a < b ? -1 : 0\n}\n\nexport const sortFn_basic: SortFn<any, any> = <\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  rowA: Row<any, any>,\n  rowB: Row<any, any>,\n  columnId: string,\n) => {\n  return compareBasic(rowA.getValue(columnId), rowB.getValue(columnId))\n}\n\n// Utils\n\nfunction compareBasic(a: any, b: any) {\n  return a === b ? 0 : a > b ? 1 : -1\n}\n\nfunction toString(a: any) {\n  if (typeof a === 'number') {\n    if (isNaN(a) || a === Infinity || a === -Infinity) {\n      return ''\n    }\n    return String(a)\n  }\n  if (typeof a === 'string') {\n    return a\n  }\n  return ''\n}\n\n// Mixed sorting is slow, but very inclusive of many edge cases.\n// It handles numbers, mixed alphanumeric combinations, and even\n// null, undefined, and Infinity\nfunction compareAlphanumeric(aStr: string, bStr: string) {\n  // Split on number groups, but keep the delimiter\n  // Then remove falsey split values\n  const a = aStr.split(reSplitAlphaNumeric).filter(Boolean)\n  const b = bStr.split(reSplitAlphaNumeric).filter(Boolean)\n\n  // While\n  while (a.length && b.length) {\n    const aa = a.shift()!\n    const bb = b.shift()!\n\n    const an = parseInt(aa, 10)\n    const bn = parseInt(bb, 10)\n\n    const combo = [an, bn].sort()\n\n    // Both are string\n    if (isNaN(combo[0]!)) {\n      if (aa > bb) {\n        return 1\n      }\n      if (bb > aa) {\n        return -1\n      }\n      continue\n    }\n\n    // One is a string, one is a number\n    if (isNaN(combo[1]!)) {\n      return isNaN(an) ? -1 : 1\n    }\n\n    // Both are numbers\n    if (an > bn) {\n      return 1\n    }\n    if (bn > an) {\n      return -1\n    }\n  }\n\n  return a.length - b.length\n}\n\n// Exports\n\nexport const sortFns = {\n  alphanumeric: sortFn_alphanumeric,\n  alphanumericCaseSensitive: sortFn_alphanumericCaseSensitive,\n  basic: sortFn_basic,\n  datetime: sortFn_datetime,\n  text: sortFn_text,\n  textCaseSensitive: sortFn_textCaseSensitive,\n}\n\nexport type BuiltInSortFn = keyof typeof sortFns\n"
  },
  {
    "path": "packages/table-core/src/helpers/columnHelper.ts",
    "content": "import type { DeepKeys, DeepValue, RowData } from '../types/type-utils'\nimport type { TableFeatures } from '../types/TableFeatures'\nimport type {\n  AccessorFn,\n  AccessorFnColumnDef,\n  AccessorKeyColumnDef,\n  ColumnDef,\n  DisplayColumnDef,\n  GroupColumnDef,\n  IdentifiedColumnDef,\n} from '../types/ColumnDef'\n\nexport type ColumnHelper<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> = {\n  /**\n   * Creates a data column definition with an accessor key or function to extract the cell value.\n   * @example\n   * ```ts\n   * helper.accessor('firstName', { cell: (info) => info.getValue() })\n   * helper.accessor((row) => row.lastName, { id: 'lastName' })\n   * ```\n   */\n  accessor: <\n    TAccessor extends AccessorFn<TData> | DeepKeys<TData>,\n    TValue extends TAccessor extends AccessorFn<TData, infer TReturn>\n      ? TReturn\n      : TAccessor extends DeepKeys<TData>\n        ? DeepValue<TData, TAccessor>\n        : never,\n  >(\n    accessor: TAccessor,\n    column: TAccessor extends AccessorFn<TData>\n      ? DisplayColumnDef<TFeatures, TData, TValue>\n      : IdentifiedColumnDef<TFeatures, TData, TValue>,\n  ) => TAccessor extends AccessorFn<TData>\n    ? AccessorFnColumnDef<TFeatures, TData, TValue>\n    : AccessorKeyColumnDef<TFeatures, TData, TValue>\n  /**\n   * Wraps an array of column definitions to preserve each column's individual TValue type.\n   * Uses variadic tuple types to infer element types before checking constraints, preventing type widening.\n   * @example\n   * ```ts\n   * helper.columns([helper.accessor('firstName', {}), helper.accessor('age', {})])\n   * ```\n   */\n  columns: <TColumns extends ReadonlyArray<ColumnDef<TFeatures, TData, any>>>(\n    columns: [...TColumns],\n  ) => Array<ColumnDef<TFeatures, TData, any>> & [...TColumns]\n  /**\n   * Creates a display column definition for non-data columns like actions or row selection.\n   * @example\n   * ```ts\n   * helper.display({ id: 'actions', header: 'Actions', cell: () => <button>Edit</button> })\n   * ```\n   */\n  display: (\n    column: DisplayColumnDef<TFeatures, TData>,\n  ) => DisplayColumnDef<TFeatures, TData, unknown>\n  /**\n   * Creates a group column definition that contains nested child columns.\n   * @example\n   * ```ts\n   * helper.group({\n   *   id: 'name',\n   *   header: 'Name',\n   *   columns: helper.columns([\n   *     helper.accessor('firstName', {}),\n   *     helper.accessor('lastName', { id: 'lastName' }),\n   *   ]),\n   * })\n   * ```\n   */\n  group: (\n    column: GroupColumnDef<TFeatures, TData, unknown>,\n  ) => GroupColumnDef<TFeatures, TData, unknown>\n}\n\n/**\n * A helper utility for creating column definitions with slightly better type inference for each individual column.\n * The `TValue` generic is inferred based on the accessor key or function provided.\n * **Note:** From a JavaScript perspective, the functions in these helpers do not do anything. They are only used to help TypeScript infer the correct types for the column definitions.\n * @example\n * ```tsx\n * const helper = createColumnHelper<typeof _features, Person>() // _features is the result of `tableFeatures({})` helper\n * const columns = [\n *  helper.display({ id: 'actions', header: 'Actions' }),\n *  helper.accessor('firstName', {}),\n *  helper.accessor((row) => row.lastName, {}\n * ]\n * ```\n */\nexport function createColumnHelper<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(): ColumnHelper<TFeatures, TData> {\n  return {\n    accessor: (accessor, column) => {\n      return typeof accessor === 'function'\n        ? ({\n            ...column,\n            accessorFn: accessor,\n          } as any)\n        : {\n            ...column,\n            accessorKey: accessor,\n          }\n    },\n    columns: <TColumns extends ReadonlyArray<ColumnDef<TFeatures, TData, any>>>(\n      columns: [...TColumns],\n    ): Array<ColumnDef<TFeatures, TData, any>> & [...TColumns] =>\n      columns as Array<ColumnDef<TFeatures, TData, any>> & [...TColumns],\n    display: (column) => column,\n    group: (column) => column,\n  }\n}\n"
  },
  {
    "path": "packages/table-core/src/helpers/tableFeatures.ts",
    "content": "import type { TableFeatures } from '../types/TableFeatures'\n\n/**\n * A helper function to help define the features that are to be imported and applied to a table instance.\n * Use this utility to make it easier to have the correct type inference for the features that are being imported.\n * **Note:** It is recommended to use this utility statically outside of a component.\n * @example\n * ```\n * import { tableFeatures, columnVisibilityFeature, rowPinningFeature } from '@tanstack/react-table'\n * const _features = tableFeatures({ columnVisibilityFeature, rowPinningFeature });\n * const table = useTable({ _features, rowModels: {}, columns, data });\n * ```\n */\nexport function tableFeatures<TFeatures extends TableFeatures>(\n  features: TFeatures,\n): TFeatures {\n  return features\n}\n\n// test\n\n// const features = tableFeatures({\n//   rowPinningFeature: {},\n// });\n"
  },
  {
    "path": "packages/table-core/src/helpers/tableHelper.ts",
    "content": "import { createColumnHelper } from './columnHelper'\nimport type { ColumnHelper } from './columnHelper'\nimport type { RowData } from '../types/type-utils'\nimport type { TableFeatures } from '../types/TableFeatures'\nimport type { Table } from '../types/Table'\nimport type { TableOptions } from '../types/TableOptions'\n\n/**\n * Options for creating a table helper to share common options across multiple tables\n * coreColumnsFeature, data, and state are excluded from this type and reserved for only the `useTable`/`createTable` functions\n */\nexport type TableHelperOptions<TFeatures extends TableFeatures> = Omit<\n  TableOptions<TFeatures, any>,\n  'columns' | 'data' | 'store' | 'state' | 'initialState'\n> & {\n  _features: TFeatures\n}\n\n/**\n * Internal type that each adapter package will build off of to create a table helper\n */\nexport type TableHelper_Core<TFeatures extends TableFeatures> = {\n  createColumnHelper: <TData extends RowData>() => ColumnHelper<\n    TFeatures,\n    TData\n  >\n  features: TFeatures\n  options: Omit<\n    TableOptions<TFeatures, any>,\n    'columns' | 'data' | 'store' | 'state' | 'initialState'\n  >\n  tableCreator: <TData extends RowData>(\n    tableOptions: Omit<\n      TableOptions<TFeatures, TData>,\n      '_features' | '_rowModels'\n    >,\n    selector?: any,\n  ) => Table<TFeatures, TData>\n}\n\n/**\n * Internal function to create a table helper that each adapter package will use to create their own table helper\n */\nexport function constructTableHelper<TFeatures extends TableFeatures>(\n  tableCreator: <TData extends RowData>(\n    tableOptions: Omit<\n      TableOptions<TFeatures, TData>,\n      '_features' | '_rowModels'\n    >,\n    selector?: any,\n  ) => Table<TFeatures, TData>,\n  tableHelperOptions: TableHelperOptions<TFeatures>,\n): TableHelper_Core<TFeatures> {\n  return {\n    createColumnHelper,\n    features: tableHelperOptions._features,\n    options: tableHelperOptions,\n    tableCreator: (tableOptions, selector) =>\n      tableCreator({ ...tableHelperOptions, ...tableOptions }, selector),\n  }\n}\n"
  },
  {
    "path": "packages/table-core/src/helpers/tableOptions.ts",
    "content": "import type { RowData } from '../types/type-utils'\nimport type { TableFeatures } from '../types/TableFeatures'\nimport type { TableOptions } from '../types/TableOptions'\n\nexport function tableOptions<\n  TFeatures extends TableFeatures,\n  TData extends RowData = any,\n>(\n  options: Omit<TableOptions<TFeatures, TData>, 'columns'> & {\n    _features: TFeatures\n  },\n): Omit<TableOptions<TFeatures, TData>, 'columns' | '_features'> & {\n  _features: TFeatures\n}\n\nexport function tableOptions<\n  TFeatures extends TableFeatures,\n  TData extends RowData = any,\n>(\n  options: Omit<TableOptions<TFeatures, TData>, 'data'> & {\n    _features: TFeatures\n  },\n): Omit<TableOptions<TFeatures, TData>, 'data' | '_features'> & {\n  _features: TFeatures\n}\n\nexport function tableOptions<\n  TFeatures extends TableFeatures,\n  TData extends RowData = any,\n>(\n  options: Omit<TableOptions<TFeatures, TData>, '_features'>,\n): Omit<TableOptions<TFeatures, TData>, '_features'>\n\nexport function tableOptions<\n  TFeatures extends TableFeatures,\n  TData extends RowData = any,\n>(\n  options: Omit<TableOptions<TFeatures, TData>, 'data' | 'columns'> & {\n    _features: TFeatures\n  },\n): Omit<TableOptions<TFeatures, TData>, 'data' | 'columns' | '_features'> & {\n  _features: TFeatures\n}\n\nexport function tableOptions<\n  TFeatures extends TableFeatures,\n  TData extends RowData = any,\n>(\n  options: Omit<TableOptions<TFeatures, TData>, 'data' | '_features'>,\n): Omit<TableOptions<TFeatures, TData>, 'data' | '_features'>\n\nexport function tableOptions<\n  TFeatures extends TableFeatures,\n  TData extends RowData = any,\n>(\n  options: Omit<TableOptions<TFeatures, TData>, 'columns' | '_features'>,\n): Omit<TableOptions<TFeatures, TData>, 'columns' | '_features'>\n\nexport function tableOptions<\n  TFeatures extends TableFeatures,\n  TData extends RowData = any,\n>(\n  options: Omit<\n    TableOptions<TFeatures, TData>,\n    'data' | 'columns' | '_features'\n  >,\n): Omit<TableOptions<TFeatures, TData>, 'data' | 'columns' | '_features'>\n\nexport function tableOptions<\n  TFeatures extends TableFeatures,\n  TData extends RowData = any,\n>(options: TableOptions<TFeatures, TData>): TableOptions<TFeatures, TData>\n\nexport function tableOptions(options: unknown) {\n  return options\n}\n\n// test\n\n// const options = tableOptions({\n//   _features: {},\n// })\n"
  },
  {
    "path": "packages/table-core/src/index.ts",
    "content": "/**\n * Types\n */\n\nexport * from './types/Cell'\nexport * from './types/Column'\nexport * from './types/ColumnDef'\nexport * from './types/Header'\nexport * from './types/HeaderGroup'\nexport * from './types/Row'\nexport * from './types/RowModel'\nexport * from './types/RowModelFns'\nexport * from './types/Table'\nexport * from './types/TableFeatures'\nexport * from './types/TableOptions'\nexport * from './types/TableState'\nexport * from './types/type-utils'\n\n/**\n * Core\n */\n\nexport * from './core/coreFeatures'\nexport * from './helpers/columnHelper'\nexport * from './helpers/tableFeatures'\nexport * from './helpers/tableHelper'\nexport * from './helpers/tableOptions'\nexport * from './utils'\n\n// Cells\nexport * from './core/cells/constructCell'\nexport * from './core/cells/coreCellsFeature'\nexport * from './core/cells/coreCellsFeature.types'\nexport * from './core/cells/coreCellsFeature.utils'\n\n// Columns\nexport * from './core/columns/constructColumn'\nexport * from './core/columns/coreColumnsFeature'\nexport * from './core/columns/coreColumnsFeature.types'\nexport * from './core/columns/coreColumnsFeature.utils'\n\n// Headers\nexport * from './core/headers/buildHeaderGroups'\nexport * from './core/headers/constructHeader'\nexport * from './core/headers/coreHeadersFeature'\nexport * from './core/headers/coreHeadersFeature.types'\nexport * from './core/headers/coreHeadersFeature.utils'\n\n// Rows\nexport * from './core/rows/constructRow'\nexport * from './core/rows/coreRowsFeature'\nexport * from './core/rows/coreRowsFeature.types'\nexport * from './core/rows/coreRowsFeature.utils'\n\n// Row Models\nexport * from './core/row-models/coreRowModelsFeature'\nexport * from './core/row-models/coreRowModelsFeature.types'\nexport * from './core/row-models/coreRowModelsFeature.utils'\nexport * from './core/row-models/createCoreRowModel'\n\n// Tables\nexport * from './core/table/constructTable'\nexport * from './core/table/coreTablesFeature'\nexport * from './core/table/coreTablesFeature.types'\nexport * from './core/table/coreTablesFeature.utils'\n\n/**\n * RowModelFns\n */\n\nexport * from './fns/aggregationFns'\nexport * from './fns/filterFns'\nexport * from './fns/sortFns'\n\n/**\n * Features\n */\n\nexport * from './features/stockFeatures'\n\n// tableReactivityFeature\nexport * from './features/table-reactivity/tableReactivityFeature'\n\n// columnFacetingFeature\nexport * from './features/column-faceting/columnFacetingFeature'\nexport * from './features/column-faceting/columnFacetingFeature.types'\nexport * from './features/column-faceting/columnFacetingFeature.utils'\nexport * from './features/column-faceting/createFacetedMinMaxValues'\nexport * from './features/column-faceting/createFacetedRowModel'\nexport * from './features/column-faceting/createFacetedUniqueValues'\n\n// columnFilteringFeature\nexport * from './features/column-filtering/columnFilteringFeature'\nexport * from './features/column-filtering/columnFilteringFeature.types'\nexport * from './features/column-filtering/columnFilteringFeature.utils'\nexport * from './features/column-filtering/createFilteredRowModel'\n\n// columnGroupingFeature\nexport * from './features/column-grouping/columnGroupingFeature'\nexport * from './features/column-grouping/columnGroupingFeature.types'\nexport * from './features/column-grouping/columnGroupingFeature.utils'\nexport * from './features/column-grouping/createGroupedRowModel'\n\n// columnOrderingFeature\nexport * from './features/column-ordering/columnOrderingFeature'\nexport * from './features/column-ordering/columnOrderingFeature.types'\nexport * from './features/column-ordering/columnOrderingFeature.utils'\n\n// columnPinningFeature\nexport * from './features/column-pinning/columnPinningFeature'\nexport * from './features/column-pinning/columnPinningFeature.types'\nexport * from './features/column-pinning/columnPinningFeature.utils'\n\n// columnResizingFeature\nexport * from './features/column-resizing/columnResizingFeature'\nexport * from './features/column-resizing/columnResizingFeature.types'\nexport * from './features/column-resizing/columnResizingFeature.utils'\n\n// columnSizingFeature\nexport * from './features/column-sizing/columnSizingFeature'\nexport * from './features/column-sizing/columnSizingFeature.types'\nexport * from './features/column-sizing/columnSizingFeature.utils'\n\n// columnVisibilityFeature\nexport * from './features/column-visibility/columnVisibilityFeature'\nexport * from './features/column-visibility/columnVisibilityFeature.types'\nexport * from './features/column-visibility/columnVisibilityFeature.utils'\n\n// globalFilteringFeature\nexport * from './features/global-filtering/globalFilteringFeature'\nexport * from './features/global-filtering/globalFilteringFeature.types'\nexport * from './features/global-filtering/globalFilteringFeature.utils'\n\n// rowExpandingFeature\nexport * from './features/row-expanding/rowExpandingFeature'\nexport * from './features/row-expanding/rowExpandingFeature.types'\nexport * from './features/row-expanding/rowExpandingFeature.utils'\nexport * from './features/row-expanding/createExpandedRowModel'\n\n// rowPaginationFeature\nexport * from './features/row-pagination/rowPaginationFeature'\nexport * from './features/row-pagination/rowPaginationFeature.types'\nexport * from './features/row-pagination/rowPaginationFeature.utils'\nexport * from './features/row-pagination/createPaginatedRowModel'\n\n// rowPinningFeature\nexport * from './features/row-pinning/rowPinningFeature'\nexport * from './features/row-pinning/rowPinningFeature.types'\nexport * from './features/row-pinning/rowPinningFeature.utils'\n\n// rowSelectionFeature\nexport * from './features/row-selection/rowSelectionFeature'\nexport * from './features/row-selection/rowSelectionFeature.types'\nexport * from './features/row-selection/rowSelectionFeature.utils'\n\n// rowSortingFeature\nexport * from './features/row-sorting/rowSortingFeature'\nexport * from './features/row-sorting/rowSortingFeature.types'\nexport * from './features/row-sorting/rowSortingFeature.utils'\nexport * from './features/row-sorting/createSortedRowModel'\n"
  },
  {
    "path": "packages/table-core/src/types/Cell.ts",
    "content": "import type { Cell_ColumnGrouping } from '../features/column-grouping/columnGroupingFeature.types'\nimport type { CellData, RowData, UnionToIntersection } from './type-utils'\nimport type { ExtractFeatureTypes, TableFeatures } from './TableFeatures'\nimport type { Cell_Cell } from '../core/cells/coreCellsFeature.types'\n\n/**\n * Use this interface as a target for declaration merging to add your own plugin properties.\n * Note: This will affect the types of all tables in your project.\n */\nexport interface Cell_Plugins<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n> {}\n\nexport interface Cell_Core<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n> extends Cell_Cell<TFeatures, TData, TValue> {}\n\nexport type Cell<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n> = Cell_Cell<TFeatures, TData, TValue> &\n  UnionToIntersection<\n    'columnGroupingFeature' extends keyof TFeatures\n      ? Cell_ColumnGrouping\n      : never\n  > &\n  ExtractFeatureTypes<'Cell', TFeatures> &\n  Cell_Plugins<TFeatures, TData, TValue>\n\n// export type Cell<\n//   TFeatures extends TableFeatures,\n//   TData extends RowData,\n//   TValue extends CellData = CellData,\n// > = Cell_Core<TFeatures, TData, TValue> &\n//   ExtractFeatureTypes<TFeatures, 'Cell'> &\n//   Cell_Plugins<TFeatures, TData, TValue>\n"
  },
  {
    "path": "packages/table-core/src/types/Column.ts",
    "content": "import type { Column_RowSorting } from '../features/row-sorting/rowSortingFeature.types'\nimport type { Column_ColumnFaceting } from '../features/column-faceting/columnFacetingFeature.types'\nimport type { Column_ColumnFiltering } from '../features/column-filtering/columnFilteringFeature.types'\nimport type { Column_ColumnGrouping } from '../features/column-grouping/columnGroupingFeature.types'\nimport type { Column_ColumnOrdering } from '../features/column-ordering/columnOrderingFeature.types'\nimport type { Column_GlobalFiltering } from '../features/global-filtering/globalFilteringFeature.types'\nimport type { Column_ColumnPinning } from '../features/column-pinning/columnPinningFeature.types'\nimport type { Column_ColumnResizing } from '../features/column-resizing/columnResizingFeature.types'\nimport type { Column_ColumnSizing } from '../features/column-sizing/columnSizingFeature.types'\nimport type { Column_ColumnVisibility } from '../features/column-visibility/columnVisibilityFeature.types'\nimport type { ColumnDefBase_All } from './ColumnDef'\nimport type { RowData, UnionToIntersection } from './type-utils'\nimport type { ExtractFeatureTypes, TableFeatures } from './TableFeatures'\nimport type { Column_Column } from '../core/columns/coreColumnsFeature.types'\n\n/**\n * Use this interface as a target for declaration merging to add your own plugin properties.\n * Note: This will affect the types of all tables in your project.\n */\nexport interface Column_Plugins<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue = unknown,\n> {}\n\nexport interface Column_Core<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue = unknown,\n> extends Column_Column<TFeatures, TData, TValue> {}\n\nexport type Column<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue = unknown,\n> = Column_Core<TFeatures, TData, TValue> &\n  UnionToIntersection<\n    | ('columnFacetingFeature' extends keyof TFeatures\n        ? Column_ColumnFaceting<TFeatures, TData>\n        : never)\n    | ('columnFilteringFeature' extends keyof TFeatures\n        ? Column_ColumnFiltering<TFeatures, TData>\n        : never)\n    | ('columnGroupingFeature' extends keyof TFeatures\n        ? Column_ColumnGrouping<TFeatures, TData>\n        : never)\n    | ('columnOrderingFeature' extends keyof TFeatures\n        ? Column_ColumnOrdering\n        : never)\n    | ('columnPinningFeature' extends keyof TFeatures\n        ? Column_ColumnPinning\n        : never)\n    | ('columnResizingFeature' extends keyof TFeatures\n        ? Column_ColumnResizing\n        : never)\n    | ('columnSizingFeature' extends keyof TFeatures\n        ? Column_ColumnSizing\n        : never)\n    | ('columnVisibilityFeature' extends keyof TFeatures\n        ? Column_ColumnVisibility\n        : never)\n    | ('globalFilteringFeature' extends keyof TFeatures\n        ? Column_GlobalFiltering\n        : never)\n    | ('rowSortingFeature' extends keyof TFeatures\n        ? Column_RowSorting<TFeatures, TData>\n        : never)\n  > &\n  ExtractFeatureTypes<'Column', TFeatures> &\n  Column_Plugins<TFeatures, TData, TValue>\n\n// export type Column<\n//   TFeatures extends TableFeatures,\n//   TData extends RowData,\n//   TValue = unknown,\n// > = Column_Core<TFeatures, TData, TValue> &\n//   ExtractFeatureTypes<'Column', TFeatures> &\n//   Column_Plugins<TFeatures, TData, TValue>\n\nexport type Column_Internal<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue = unknown,\n> = Column<TFeatures, TData, TValue> & {\n  columnDef: ColumnDefBase_All<TFeatures, TData, TValue>\n}\n"
  },
  {
    "path": "packages/table-core/src/types/ColumnDef.ts",
    "content": "import type { CellData, RowData, UnionToIntersection } from './type-utils'\nimport type { ExtractFeatureTypes, TableFeatures } from './TableFeatures'\nimport type { CellContext } from '../core/cells/coreCellsFeature.types'\nimport type { HeaderContext } from '../core/headers/coreHeadersFeature.types'\nimport type { ColumnDef_ColumnFiltering } from '../features/column-filtering/columnFilteringFeature.types'\nimport type { ColumnDef_ColumnGrouping } from '../features/column-grouping/columnGroupingFeature.types'\nimport type { ColumnDef_ColumnPinning } from '../features/column-pinning/columnPinningFeature.types'\nimport type { ColumnDef_ColumnResizing } from '../features/column-resizing/columnResizingFeature.types'\nimport type { ColumnDef_ColumnSizing } from '../features/column-sizing/columnSizingFeature.types'\nimport type { ColumnDef_ColumnVisibility } from '../features/column-visibility/columnVisibilityFeature.types'\nimport type { ColumnDef_GlobalFiltering } from '../features/global-filtering/globalFilteringFeature.types'\nimport type { ColumnDef_RowSorting } from '../features/row-sorting/rowSortingFeature.types'\n\n/**\n * Use this interface as a target for declaration merging to add your own plugin properties.\n * Note: This will affect the types of all tables in your project.\n */\nexport interface ColumnDef_Plugins<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n> {}\n\nexport interface ColumnMeta<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n> {}\n\nexport type AccessorFn<\n  TData extends RowData,\n  TValue extends CellData = CellData,\n> = (originalRow: TData, index: number) => TValue\n\nexport type ColumnDefTemplate<TProps extends object> =\n  | string\n  | ((props: TProps) => any)\n\nexport type StringOrTemplateHeader<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n> = string | ColumnDefTemplate<HeaderContext<TFeatures, TData, TValue>>\n\nexport interface StringHeaderIdentifier {\n  header: string\n  id?: string\n}\n\nexport interface IdIdentifier<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n> {\n  id: string\n  header?: StringOrTemplateHeader<TFeatures, TData, TValue>\n}\ntype ColumnIdentifiers<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n> = IdIdentifier<TFeatures, TData, TValue> | StringHeaderIdentifier\n\ninterface ColumnDefBase_Core<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n> {\n  getUniqueValues?: AccessorFn<TData, Array<unknown>>\n  footer?: ColumnDefTemplate<HeaderContext<TFeatures, TData, TValue>>\n  cell?: ColumnDefTemplate<CellContext<TFeatures, TData, TValue>>\n  meta?: ColumnMeta<TFeatures, TData, TValue>\n}\n\nexport type ColumnDefBase<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n> = ColumnDefBase_Core<TFeatures, TData, TValue> &\n  UnionToIntersection<\n    | ('columnVisibilityFeature' extends keyof TFeatures\n        ? ColumnDef_ColumnVisibility\n        : never)\n    | ('columnPinningFeature' extends keyof TFeatures\n        ? ColumnDef_ColumnPinning\n        : never)\n    | ('columnFilteringFeature' extends keyof TFeatures\n        ? ColumnDef_ColumnFiltering<TFeatures, TData>\n        : never)\n    | ('globalFilteringFeature' extends keyof TFeatures\n        ? ColumnDef_GlobalFiltering\n        : never)\n    | ('rowSortingFeature' extends keyof TFeatures\n        ? ColumnDef_RowSorting<TFeatures, TData>\n        : never)\n    | ('columnGroupingFeature' extends keyof TFeatures\n        ? ColumnDef_ColumnGrouping<TFeatures, TData, TValue>\n        : never)\n    | ('columnSizingFeature' extends keyof TFeatures\n        ? ColumnDef_ColumnSizing\n        : never)\n    | ('columnResizingFeature' extends keyof TFeatures\n        ? ColumnDef_ColumnResizing\n        : never)\n  > &\n  ExtractFeatureTypes<'ColumnDef', TFeatures> &\n  ColumnDef_Plugins<TFeatures, TData, TValue>\n\n// export type ColumnDefBase<\n//   TFeatures extends TableFeatures,\n//   TData extends RowData,\n//   TValue extends CellData = CellData,\n// > = ColumnDefBase_Core<TFeatures, TData, TValue> &\n//   ExtractFeatureTypes<'ColumnDef', TFeatures> &\n//   ColumnDef_Plugins<TFeatures, TData, TValue>\n\nexport type ColumnDefBase_All<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n> = ColumnDefBase_Core<TFeatures, TData, TValue> &\n  Partial<\n    ColumnDef_ColumnVisibility &\n      ColumnDef_ColumnPinning &\n      ColumnDef_ColumnFiltering<TFeatures, TData> &\n      ColumnDef_GlobalFiltering &\n      ColumnDef_RowSorting<TFeatures, TData> &\n      ColumnDef_ColumnGrouping<TFeatures, TData, TValue> &\n      ColumnDef_ColumnSizing &\n      ColumnDef_ColumnResizing\n  >\n\nexport type IdentifiedColumnDef<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n> = ColumnDefBase<TFeatures, TData, TValue> & {\n  id?: string\n  header?: StringOrTemplateHeader<TFeatures, TData, TValue>\n}\n\nexport type DisplayColumnDef<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n> = ColumnDefBase<TFeatures, TData, TValue> &\n  ColumnIdentifiers<TFeatures, TData, TValue>\ntype GroupColumnDefBase<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n> = ColumnDefBase<TFeatures, TData, TValue> & {\n  columns?: ReadonlyArray<ColumnDef<TFeatures, TData, unknown>>\n}\n\nexport type GroupColumnDef<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n> = GroupColumnDefBase<TFeatures, TData, TValue> &\n  ColumnIdentifiers<TFeatures, TData, TValue>\n\nexport type AccessorFnColumnDefBase<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n> = ColumnDefBase<TFeatures, TData, TValue> & {\n  accessorFn: AccessorFn<TData, TValue>\n}\n\nexport type AccessorFnColumnDef<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n> = AccessorFnColumnDefBase<TFeatures, TData, TValue> &\n  ColumnIdentifiers<TFeatures, TData, TValue>\n\nexport type AccessorKeyColumnDefBase<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n> = ColumnDefBase<TFeatures, TData, TValue> & {\n  id?: string\n  accessorKey: (string & {}) | keyof TData\n}\n\nexport type AccessorKeyColumnDef<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n> = AccessorKeyColumnDefBase<TFeatures, TData, TValue> &\n  Partial<ColumnIdentifiers<TFeatures, TData, TValue>>\n\nexport type AccessorColumnDef<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n> =\n  | AccessorKeyColumnDef<TFeatures, TData, TValue>\n  | AccessorFnColumnDef<TFeatures, TData, TValue>\n\nexport type ColumnDef<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n> =\n  | DisplayColumnDef<TFeatures, TData, TValue>\n  | GroupColumnDef<TFeatures, TData, TValue>\n  | AccessorColumnDef<TFeatures, TData, TValue>\n\nexport type ColumnDefResolved<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n> = Partial<UnionToIntersection<ColumnDef<TFeatures, TData, TValue>>> & {\n  accessorKey?: string\n}\n"
  },
  {
    "path": "packages/table-core/src/types/Header.ts",
    "content": "import type { Header_ColumnSizing } from '../features/column-sizing/columnSizingFeature.types'\nimport type { CellData, RowData, UnionToIntersection } from './type-utils'\nimport type { ExtractFeatureTypes, TableFeatures } from './TableFeatures'\nimport type { Header_Header } from '../core/headers/coreHeadersFeature.types'\nimport type { Header_ColumnResizing } from '../features/column-resizing/columnResizingFeature.types'\n\n/**\n * Use this interface as a target for declaration merging to add your own plugin properties.\n * Note: This will affect the types of all tables in your project.\n */\nexport interface Header_Plugins<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n> {}\n\nexport interface Header_Core<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n> extends Header_Header<TFeatures, TData, TValue> {}\n\nexport type Header<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n> = Header_Core<TFeatures, TData, TValue> &\n  UnionToIntersection<\n    | ('columnSizingFeature' extends keyof TFeatures\n        ? Header_ColumnSizing\n        : never)\n    | ('columnResizingFeature' extends keyof TFeatures\n        ? Header_ColumnResizing\n        : never)\n  > &\n  ExtractFeatureTypes<'Header', TFeatures> &\n  Header_Plugins<TFeatures, TData, TValue>\n\n// export type Header<\n//   TFeatures extends TableFeatures,\n//   TData extends RowData,\n//   TValue extends CellData = CellData,\n// > = Header_Core<TFeatures, TData, TValue> &\n//   ExtractFeatureTypes<'Header', TFeatures> &\n//   Header_Plugins<TFeatures, TData, TValue>\n"
  },
  {
    "path": "packages/table-core/src/types/HeaderGroup.ts",
    "content": "import type { HeaderGroup_Header } from '../core/headers/coreHeadersFeature.types'\nimport type { ExtractFeatureTypes, TableFeatures } from './TableFeatures'\nimport type { RowData } from './type-utils'\n\n/**\n * Use this interface as a target for declaration merging to add your own plugin properties.\n * Note: This will affect the types of all tables in your project.\n */\nexport interface HeaderGroup_Plugins<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {}\n\nexport interface HeaderGroup_Core<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> extends HeaderGroup_Header<TFeatures, TData> {}\n\nexport type HeaderGroup<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> = HeaderGroup_Core<TFeatures, TData> &\n  ExtractFeatureTypes<'HeaderGroup', TFeatures> &\n  HeaderGroup_Plugins<TFeatures, TData>\n"
  },
  {
    "path": "packages/table-core/src/types/Row.ts",
    "content": "import type { Row_ColumnVisibility } from '../features/column-visibility/columnVisibilityFeature.types'\nimport type { Row_ColumnPinning } from '../features/column-pinning/columnPinningFeature.types'\nimport type { Row_ColumnGrouping } from '../features/column-grouping/columnGroupingFeature.types'\nimport type { Row_ColumnFiltering } from '../features/column-filtering/columnFilteringFeature.types'\nimport type { RowData, UnionToIntersection } from './type-utils'\nimport type { Row_RowExpanding } from '../features/row-expanding/rowExpandingFeature.types'\nimport type { Row_RowPinning } from '../features/row-pinning/rowPinningFeature.types'\nimport type { Row_RowSelection } from '../features/row-selection/rowSelectionFeature.types'\nimport type { ExtractFeatureTypes, TableFeatures } from './TableFeatures'\nimport type { Row_Row } from '../core/rows/coreRowsFeature.types'\n\n/**\n * Use this interface as a target for declaration merging to add your own plugin properties.\n * Note: This will affect the types of all tables in your project.\n */\nexport interface Row_Plugins<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {}\n\nexport interface Row_Core<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> extends Row_Row<TFeatures, TData> {}\n\nexport type Row<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> = Row_Core<TFeatures, TData> &\n  UnionToIntersection<\n    | ('columnFilteringFeature' extends keyof TFeatures\n        ? Row_ColumnFiltering<TFeatures, TData>\n        : never)\n    | ('columnGroupingFeature' extends keyof TFeatures\n        ? Row_ColumnGrouping\n        : never)\n    | ('columnPinningFeature' extends keyof TFeatures\n        ? Row_ColumnPinning<TFeatures, TData>\n        : never)\n    | ('columnVisibilityFeature' extends keyof TFeatures\n        ? Row_ColumnVisibility<TFeatures, TData>\n        : never)\n    | ('rowExpandingFeature' extends keyof TFeatures ? Row_RowExpanding : never)\n    | ('rowPinningFeature' extends keyof TFeatures ? Row_RowPinning : never)\n    | ('rowSelectionFeature' extends keyof TFeatures ? Row_RowSelection : never)\n  > &\n  ExtractFeatureTypes<'Row', TFeatures> &\n  Row_Plugins<TFeatures, TData>\n\n// export type Row<\n//   TFeatures extends TableFeatures,\n//   TData extends RowData,\n// > = Row_Core<TFeatures, TData> &\n//   ExtractFeatureTypes<'Row', TFeatures> &\n//   Row_Plugins<TFeatures, TData>\n"
  },
  {
    "path": "packages/table-core/src/types/RowModel.ts",
    "content": "import type {\n  CachedRowModel_Faceted,\n  CreateRowModel_Faceted,\n} from '../features/column-faceting/columnFacetingFeature.types'\nimport type {\n  CachedRowModel_Grouped,\n  CreateRowModel_Grouped,\n} from '../features/column-grouping/columnGroupingFeature.types'\nimport type {\n  CachedRowModel_Filtered,\n  CreateRowModel_Filtered,\n} from '../features/column-filtering/columnFilteringFeature.types'\nimport type {\n  CachedRowModel_Core,\n  CreateRowModel_Core,\n  RowModel,\n} from '../core/row-models/coreRowModelsFeature.types'\nimport type {\n  CachedRowModel_Expanded,\n  CreateRowModel_Expanded,\n} from '../features/row-expanding/rowExpandingFeature.types'\nimport type {\n  CachedRowModel_Paginated,\n  CreateRowModel_Paginated,\n} from '../features/row-pagination/rowPaginationFeature.types'\nimport type {\n  CachedRowModel_Sorted,\n  CreateRowModel_Sorted,\n} from '../features/row-sorting/rowSortingFeature.types'\nimport type { RowData, UnionToIntersection } from './type-utils'\nimport type { ExtractFeatureTypes, TableFeatures } from './TableFeatures'\n\n/**\n * Use this interface as a target for declaration merging to add your own plugin properties.\n * Note: This will affect the types of all tables in your project.\n */\nexport interface CreateRowModels_Plugins<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {}\n\nexport type CreateRowModels<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> = CreateRowModel_Core<TFeatures, TData> &\n  UnionToIntersection<\n    | ('columnFacetingFeature' extends keyof TFeatures\n        ? CreateRowModel_Faceted<TFeatures, TData>\n        : never)\n    | ('columnFilteringFeature' extends keyof TFeatures\n        ? CreateRowModel_Filtered<TFeatures, TData>\n        : never)\n    | ('rowExpandingFeature' extends keyof TFeatures\n        ? CreateRowModel_Expanded<TFeatures, TData>\n        : never)\n    | ('columnGroupingFeature' extends keyof TFeatures\n        ? CreateRowModel_Grouped<TFeatures, TData>\n        : never)\n    | ('rowPaginationFeature' extends keyof TFeatures\n        ? CreateRowModel_Paginated<TFeatures, TData>\n        : never)\n    | ('rowSortingFeature' extends keyof TFeatures\n        ? CreateRowModel_Sorted<TFeatures, TData>\n        : never)\n  > &\n  ExtractFeatureTypes<'CreateRowModels', TFeatures> &\n  CreateRowModels_Plugins<TFeatures, TData>\n\n// export type CreateRowModels<\n//   TFeatures extends TableFeatures,\n//   TData extends RowData,\n// > = CreateRowModel_Core<TFeatures, TData> &\n//   ExtractFeatureTypes<'CreateRowModels', TFeatures> &\n//   CreateRowModels_Plugins<TFeatures, TData>\n\nexport type CreateRowModels_All<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> = CreateRowModel_Core<TFeatures, TData> &\n  CreateRowModel_Expanded<TFeatures, TData> &\n  CreateRowModel_Faceted<TFeatures, TData> &\n  CreateRowModel_Filtered<TFeatures, TData> &\n  CreateRowModel_Grouped<TFeatures, TData> &\n  CreateRowModel_Paginated<TFeatures, TData> &\n  CreateRowModel_Sorted<TFeatures, TData>\n\nexport interface CachedRowModels_Plugins<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {}\n\nexport type CachedRowModels<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> = {\n  CachedRowModel_Core: () => RowModel<TFeatures, TData>\n} & UnionToIntersection<\n  | ('columnFacetingFeature' extends keyof TFeatures\n      ? CachedRowModel_Faceted<TFeatures, TData>\n      : never)\n  | ('columnFilteringFeature' extends keyof TFeatures\n      ? CachedRowModel_Filtered<TFeatures, TData>\n      : never)\n  | ('rowExpandingFeature' extends keyof TFeatures\n      ? CachedRowModel_Expanded<TFeatures, TData>\n      : never)\n  | ('columnGroupingFeature' extends keyof TFeatures\n      ? CachedRowModel_Grouped<TFeatures, TData>\n      : never)\n  | ('rowPaginationFeature' extends keyof TFeatures\n      ? CachedRowModel_Paginated<TFeatures, TData>\n      : never)\n  | ('rowSortingFeature' extends keyof TFeatures\n      ? CachedRowModel_Sorted<TFeatures, TData>\n      : never)\n> &\n  ExtractFeatureTypes<'CachedRowModel', TFeatures> &\n  CachedRowModels_Plugins<TFeatures, TData>\n\n// export type CachedRowModels<\n//   TFeatures extends TableFeatures,\n//   TData extends RowData,\n// > = ExtractFeatureTypes<'CachedRowModel', TFeatures> &\n//   CachedRowModels_Plugins<TFeatures, TData>\n\nexport type CachedRowModel_All<\n  TFeatures extends TableFeatures,\n  TData extends RowData = any,\n> = Partial<\n  CachedRowModel_Core<TFeatures, TData> &\n    CachedRowModel_Expanded<TFeatures, TData> &\n    CachedRowModel_Faceted<TFeatures, TData> &\n    CachedRowModel_Filtered<TFeatures, TData> &\n    CachedRowModel_Grouped<TFeatures, TData> &\n    CachedRowModel_Paginated<TFeatures, TData> &\n    CachedRowModel_Sorted<TFeatures, TData>\n>\n"
  },
  {
    "path": "packages/table-core/src/types/RowModelFns.ts",
    "content": "import type { RowModelFns_RowSorting } from '../features/row-sorting/rowSortingFeature.types'\nimport type { RowModelFns_ColumnGrouping } from '../features/column-grouping/columnGroupingFeature.types'\nimport type { RowData, UnionToIntersection } from './type-utils'\nimport type { RowModelFns_ColumnFiltering } from '../features/column-filtering/columnFilteringFeature.types'\nimport type { ExtractFeatureTypes, TableFeatures } from './TableFeatures'\n\n/**\n * Use this interface as a target for declaration merging to add your own plugin properties.\n * Note: This will affect the types of all tables in your project.\n */\nexport interface RowModelFns_Plugins<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {}\n\nexport interface RowModelFns_Core {}\n\nexport type RowModelFns<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> = Partial<\n  UnionToIntersection<\n    | ('columnFilteringFeature' extends keyof TFeatures\n        ? RowModelFns_ColumnFiltering<TFeatures, TData>\n        : never)\n    | ('columnGroupingFeature' extends keyof TFeatures\n        ? RowModelFns_ColumnGrouping<TFeatures, TData>\n        : never)\n    | ('rowSortingFeature' extends keyof TFeatures\n        ? RowModelFns_RowSorting<TFeatures, TData>\n        : never)\n  > &\n    ExtractFeatureTypes<'RowModelFns', TFeatures> &\n    RowModelFns_Plugins<TFeatures, TData>\n>\n\n// export type RowModelFns<\n//   TFeatures extends TableFeatures,\n//   TData extends RowData,\n// > = RowModelFns_Core &\n//   ExtractFeatureTypes<'RowModelFns', TFeatures> &\n//   RowModelFns_Plugins<TFeatures, TData>\n\nexport type RowModelFns_All<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> = Partial<\n  RowModelFns_ColumnFiltering<TFeatures, TData> &\n    RowModelFns_ColumnGrouping<TFeatures, TData> &\n    RowModelFns_RowSorting<TFeatures, TData>\n>\n"
  },
  {
    "path": "packages/table-core/src/types/Table.ts",
    "content": "import type { ReadonlyStore, Store } from '@tanstack/store'\nimport type { Table_ColumnFaceting } from '../features/column-faceting/columnFacetingFeature.types'\nimport type { Table_ColumnResizing } from '../features/column-resizing/columnResizingFeature.types'\nimport type { Table_ColumnFiltering } from '../features/column-filtering/columnFilteringFeature.types'\nimport type { Table_ColumnGrouping } from '../features/column-grouping/columnGroupingFeature.types'\nimport type { Table_ColumnPinning } from '../features/column-pinning/columnPinningFeature.types'\nimport type { Table_ColumnOrdering } from '../features/column-ordering/columnOrderingFeature.types'\nimport type { Table_ColumnVisibility } from '../features/column-visibility/columnVisibilityFeature.types'\nimport type { Table_ColumnSizing } from '../features/column-sizing/columnSizingFeature.types'\nimport type { Table_RowPinning } from '../features/row-pinning/rowPinningFeature.types'\nimport type { Table_GlobalFiltering } from '../features/global-filtering/globalFilteringFeature.types'\nimport type { Table_RowExpanding } from '../features/row-expanding/rowExpandingFeature.types'\nimport type { Table_RowPagination } from '../features/row-pagination/rowPaginationFeature.types'\nimport type { Table_RowSelection } from '../features/row-selection/rowSelectionFeature.types'\nimport type { Table_RowSorting } from '../features/row-sorting/rowSortingFeature.types'\nimport type { Table_RowModels } from '../core/row-models/coreRowModelsFeature.types'\nimport type { CachedRowModel_All, CreateRowModels_All } from './RowModel'\nimport type { RowModelFns_All } from './RowModelFns'\nimport type { TableState_All } from './TableState'\nimport type { RowData, UnionToIntersection } from './type-utils'\nimport type { ExtractFeatureTypes, TableFeatures } from './TableFeatures'\nimport type { Table_Columns } from '../core/columns/coreColumnsFeature.types'\nimport type { Table_Headers } from '../core/headers/coreHeadersFeature.types'\nimport type { Table_Rows } from '../core/rows/coreRowsFeature.types'\nimport type { Table_Table } from '../core/table/coreTablesFeature.types'\nimport type { TableOptions_All } from './TableOptions'\n\n/**\n * Use this interface as a target for declaration merging to add your own plugin properties.\n * Note: This will affect the types of all tables in your project.\n */\nexport interface Table_Plugins<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {}\n\n/**\n * The core table object that only includes the core table functionality such as column, header, row, and table APIS.\n * No features are included.\n */\nexport type Table_Core<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> = Table_Table<TFeatures, TData> &\n  Table_Columns<TFeatures, TData> &\n  Table_Rows<TFeatures, TData> &\n  Table_RowModels<TFeatures, TData> &\n  Table_Headers<TFeatures, TData>\n\n/**\n * The table object that includes both the core table functionality and the features that are enabled via the `_features` table option.\n */\nexport type Table<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> = Table_Core<TFeatures, TData> &\n  UnionToIntersection<\n    | ('columnFilteringFeature' extends keyof TFeatures\n        ? Table_ColumnFiltering\n        : never)\n    | ('columnGroupingFeature' extends keyof TFeatures\n        ? Table_ColumnGrouping<TFeatures, TData>\n        : never)\n    | ('columnOrderingFeature' extends keyof TFeatures\n        ? Table_ColumnOrdering<TFeatures, TData>\n        : never)\n    | ('columnPinningFeature' extends keyof TFeatures\n        ? Table_ColumnPinning<TFeatures, TData>\n        : never)\n    | ('columnResizingFeature' extends keyof TFeatures\n        ? Table_ColumnResizing\n        : never)\n    | ('columnSizingFeature' extends keyof TFeatures\n        ? Table_ColumnSizing\n        : never)\n    | ('columnVisibilityFeature' extends keyof TFeatures\n        ? Table_ColumnVisibility<TFeatures, TData>\n        : never)\n    | ('columnFacetingFeature' extends keyof TFeatures\n        ? Table_ColumnFaceting<TFeatures, TData>\n        : never)\n    | ('globalFilteringFeature' extends keyof TFeatures\n        ? Table_GlobalFiltering<TFeatures, TData>\n        : never)\n    | ('rowExpandingFeature' extends keyof TFeatures\n        ? Table_RowExpanding<TFeatures, TData>\n        : never)\n    | ('rowPaginationFeature' extends keyof TFeatures\n        ? Table_RowPagination<TFeatures, TData>\n        : never)\n    | ('rowPinningFeature' extends keyof TFeatures\n        ? Table_RowPinning<TFeatures, TData>\n        : never)\n    | ('rowSelectionFeature' extends keyof TFeatures\n        ? Table_RowSelection<TFeatures, TData>\n        : never)\n    | ('rowSortingFeature' extends keyof TFeatures\n        ? Table_RowSorting<TFeatures, TData>\n        : never)\n  > &\n  ExtractFeatureTypes<'Table', TFeatures> &\n  Table_Plugins<TFeatures, TData>\n\n// export type Table<\n//   TFeatures extends TableFeatures,\n//   TData extends RowData,\n// > = Table_Core<TFeatures, TData> &\n//   ExtractFeatureTypes<'Table', TFeatures> &\n//   Table_Plugins<TFeatures, TData>\n\nexport type Table_Internal<\n  TFeatures extends TableFeatures,\n  TData extends RowData = any,\n> = Table<TFeatures, TData> & {\n  _rowModels: CachedRowModel_All<TFeatures, TData>\n  _rowModelFns: RowModelFns_All<TFeatures, TData>\n  options: TableOptions_All<TFeatures, TData> & {\n    _rowModels?: CreateRowModels_All<TFeatures, TData>\n    state?: TableState_All\n    initialState?: TableState_All\n  }\n  initialState: TableState_All\n  baseStore: Store<TableState_All>\n  store: ReadonlyStore<TableState_All>\n}\n"
  },
  {
    "path": "packages/table-core/src/types/TableFeatures.ts",
    "content": "import type { CoreFeatures } from '../core/coreFeatures'\nimport type { CellData, RowData, UnionToIntersection } from './type-utils'\nimport type { ColumnDefBase_All } from './ColumnDef'\nimport type { Row } from './Row'\nimport type { Table_Internal } from './Table'\nimport type { TableOptions_All } from './TableOptions'\nimport type { TableState_All } from './TableState'\nimport type { StockFeatures } from '../features/stockFeatures'\n\nexport type ExtractFeatureTypes<\n  TKey extends keyof FeatureConstructors,\n  TFeatures extends TableFeatures,\n> = UnionToIntersection<\n  {\n    [K in keyof TFeatures]: TFeatures[K] extends TableFeature<\n      infer FeatureConstructorOptions\n    >\n      ? TKey extends keyof FeatureConstructorOptions\n        ? FeatureConstructorOptions[TKey]\n        : never\n      : any\n  }[keyof TFeatures]\n>\n\ninterface FeatureConstructors {\n  CachedRowModel?: any\n  Cell?: any\n  Column?: any\n  ColumnDef?: any\n  CreateRowModels?: any\n  Header?: any\n  HeaderGroup?: any\n  Row?: any\n  RowModelFns?: any\n  Table?: any\n  TableOptions?: any\n  TableState?: any\n}\n\nexport interface Plugins {}\n\nexport interface TableFeatures\n  extends Partial<CoreFeatures>, Partial<StockFeatures>, Partial<Plugins> {}\n\nexport type ConstructTableAPIs<TConstructors extends FeatureConstructors> = <\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  table: Table_Internal<TFeatures, TData> &\n    Partial<TConstructors['Table']> & {\n      options: Partial<TConstructors['TableOptions']>\n    },\n) => void\n\nexport type GetDefaultColumnDef<TConstructors extends FeatureConstructors> = <\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n>() => ColumnDefBase_All<TFeatures, TData, TValue> &\n  Partial<TConstructors['ColumnDef']>\n\nexport type GetDefaultTableOptions<TConstructors extends FeatureConstructors> =\n  <TFeatures extends TableFeatures, TData extends RowData>(\n    table: Table_Internal<TFeatures, TData> & Partial<TConstructors['Table']>,\n  ) => Partial<TableOptions_All<TFeatures, TData>> &\n    Partial<TConstructors['TableOptions']>\n\nexport type GetInitialState<TConstructors extends FeatureConstructors> = (\n  initialState: Partial<TableState_All> & Partial<TConstructors['TableState']>,\n) => TableState_All & Partial<TConstructors['TableState']>\n\nexport type GetDefaultStateSelector<TConstructors extends FeatureConstructors> =\n  (\n    state: TableState_All,\n  ) => Partial<TableState_All> & Partial<TConstructors['TableState']>\n\nexport type AssignCellPrototype<TConstructors extends FeatureConstructors> = <\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  prototype: Record<string, any>,\n  table: Table_Internal<TFeatures, TData>,\n) => void\n\nexport type AssignColumnPrototype<TConstructors extends FeatureConstructors> = <\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  prototype: Record<string, any>,\n  table: Table_Internal<TFeatures, TData>,\n) => void\n\nexport type AssignHeaderPrototype<TConstructors extends FeatureConstructors> = <\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  prototype: Record<string, any>,\n  table: Table_Internal<TFeatures, TData>,\n) => void\n\nexport type AssignRowPrototype<TConstructors extends FeatureConstructors> = <\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  prototype: Record<string, any>,\n  table: Table_Internal<TFeatures, TData>,\n) => void\n\nexport type InitRowInstanceData<TConstructors extends FeatureConstructors> = <\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  row: Row<TFeatures, TData> & Partial<TConstructors['Row']>,\n) => void\n\nexport interface TableFeature<TConstructors extends FeatureConstructors> {\n  /**\n   * Assigns Cell APIs to the cell prototype for memory-efficient method sharing.\n   * This is called once per table to build a shared prototype for all cells.\n   */\n  assignCellPrototype?: AssignCellPrototype<TConstructors>\n  /**\n   * Assigns Column APIs to the column prototype for memory-efficient method sharing.\n   * This is called once per table to build a shared prototype for all columns.\n   */\n  assignColumnPrototype?: AssignColumnPrototype<TConstructors>\n  /**\n   * Assigns Header APIs to the header prototype for memory-efficient method sharing.\n   * This is called once per table to build a shared prototype for all headers.\n   */\n  assignHeaderPrototype?: AssignHeaderPrototype<TConstructors>\n  /**\n   * Assigns Row APIs to the row prototype for memory-efficient method sharing.\n   * This is called once per table to build a shared prototype for all rows.\n   */\n  assignRowPrototype?: AssignRowPrototype<TConstructors>\n  /**\n   * Assigns Table APIs to the table instance.\n   * Unlike row/cell/column/header, the table is a singleton so methods are assigned directly.\n   */\n  constructTableAPIs?: ConstructTableAPIs<TConstructors>\n  getDefaultColumnDef?: GetDefaultColumnDef<TConstructors>\n  getDefaultTableOptions?: GetDefaultTableOptions<TConstructors>\n  getInitialState?: GetInitialState<TConstructors>\n  /**\n   * Initializes instance-specific data on each row (e.g., caches).\n   * Methods should be assigned via assignRowPrototype instead.\n   */\n  initRowInstanceData?: InitRowInstanceData<TConstructors>\n}\n"
  },
  {
    "path": "packages/table-core/src/types/TableOptions.ts",
    "content": "import type { CoreFeatures } from '../core/coreFeatures'\nimport type { TableOptions_Cell } from '../core/cells/coreCellsFeature.types'\nimport type { TableOptions_Columns } from '../core/columns/coreColumnsFeature.types'\nimport type { TableOptions_Rows } from '../core/rows/coreRowsFeature.types'\nimport type { TableOptions_Table } from '../core/table/coreTablesFeature.types'\nimport type { TableOptions_ColumnFiltering } from '../features/column-filtering/columnFilteringFeature.types'\nimport type { TableOptions_ColumnGrouping } from '../features/column-grouping/columnGroupingFeature.types'\nimport type { TableOptions_ColumnOrdering } from '../features/column-ordering/columnOrderingFeature.types'\nimport type { TableOptions_ColumnPinning } from '../features/column-pinning/columnPinningFeature.types'\nimport type { TableOptions_ColumnResizing } from '../features/column-resizing/columnResizingFeature.types'\nimport type { TableOptions_ColumnSizing } from '../features/column-sizing/columnSizingFeature.types'\nimport type { TableOptions_ColumnVisibility } from '../features/column-visibility/columnVisibilityFeature.types'\nimport type { TableOptions_GlobalFiltering } from '../features/global-filtering/globalFilteringFeature.types'\nimport type { TableOptions_RowExpanding } from '../features/row-expanding/rowExpandingFeature.types'\nimport type { TableOptions_RowPagination } from '../features/row-pagination/rowPaginationFeature.types'\nimport type { TableOptions_RowPinning } from '../features/row-pinning/rowPinningFeature.types'\nimport type { TableOptions_RowSelection } from '../features/row-selection/rowSelectionFeature.types'\nimport type { TableOptions_RowSorting } from '../features/row-sorting/rowSortingFeature.types'\nimport type { RowData, UnionToIntersection } from './type-utils'\nimport type { ExtractFeatureTypes, TableFeatures } from './TableFeatures'\n\nexport interface TableOptions_Plugins<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> {}\n\nexport interface TableOptions_Core<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>\n  extends\n    TableOptions_Table<TFeatures, TData>,\n    TableOptions_Cell,\n    TableOptions_Columns<TFeatures, TData>,\n    TableOptions_Rows<TFeatures, TData> {}\n\ntype DebugKeysFor<TFeatures extends TableFeatures> = {\n  [K in keyof TFeatures & string as `debug${Capitalize<K>}`]?: boolean\n}\n\nexport type DebugOptions<TFeatures extends TableFeatures> = {\n  debugAll?: boolean\n  debugCache?: boolean\n  debugCells?: boolean\n  debugColumns?: boolean\n  debugHeaders?: boolean\n  debugRows?: boolean\n  debugTable?: boolean\n} & DebugKeysFor<CoreFeatures & TFeatures>\n\nexport type TableOptions<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> = TableOptions_Core<TFeatures, TData> &\n  UnionToIntersection<\n    | ('columnFilteringFeature' extends keyof TFeatures\n        ? TableOptions_ColumnFiltering<TFeatures, TData>\n        : never)\n    | ('columnGroupingFeature' extends keyof TFeatures\n        ? TableOptions_ColumnGrouping\n        : never)\n    | ('columnOrderingFeature' extends keyof TFeatures\n        ? TableOptions_ColumnOrdering\n        : never)\n    | ('columnPinningFeature' extends keyof TFeatures\n        ? TableOptions_ColumnPinning\n        : never)\n    | ('columnResizingFeature' extends keyof TFeatures\n        ? TableOptions_ColumnResizing\n        : never)\n    | ('columnSizingFeature' extends keyof TFeatures\n        ? TableOptions_ColumnSizing\n        : never)\n    | ('columnVisibilityFeature' extends keyof TFeatures\n        ? TableOptions_ColumnVisibility\n        : never)\n    | ('globalFilteringFeature' extends keyof TFeatures\n        ? TableOptions_GlobalFiltering<TFeatures, TData>\n        : never)\n    | ('rowExpandingFeature' extends keyof TFeatures\n        ? TableOptions_RowExpanding<TFeatures, TData>\n        : never)\n    | ('rowPaginationFeature' extends keyof TFeatures\n        ? TableOptions_RowPagination\n        : never)\n    | ('rowPinningFeature' extends keyof TFeatures\n        ? TableOptions_RowPinning<TFeatures, TData>\n        : never)\n    | ('rowSelectionFeature' extends keyof TFeatures\n        ? TableOptions_RowSelection<TFeatures, TData>\n        : never)\n    | ('rowSortingFeature' extends keyof TFeatures\n        ? TableOptions_RowSorting\n        : never)\n  > &\n  ExtractFeatureTypes<'TableOptions', TFeatures> &\n  TableOptions_Plugins<TFeatures, TData> &\n  DebugOptions<TFeatures>\n\n// export type TableOptions<\n//   TFeatures extends TableFeatures,\n//   TData extends RowData,\n// > = TableOptions_Core<TFeatures, TData> &\n//   ExtractFeatureTypes<'TableOptions', TFeatures> &\n//   TableOptions_Plugins<TFeatures, TData>\n\nexport type TableOptions_All<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> = TableOptions_Core<TFeatures, TData> &\n  Partial<\n    TableOptions_ColumnFiltering<TFeatures, TData> &\n      TableOptions_ColumnGrouping &\n      TableOptions_ColumnOrdering &\n      TableOptions_ColumnPinning &\n      TableOptions_ColumnResizing &\n      TableOptions_ColumnSizing &\n      TableOptions_ColumnVisibility &\n      TableOptions_GlobalFiltering<TFeatures, TData> &\n      TableOptions_RowExpanding<TFeatures, TData> &\n      TableOptions_RowPagination &\n      TableOptions_RowPinning<TFeatures, TData> &\n      TableOptions_RowSelection<TFeatures, TData> &\n      TableOptions_RowSorting\n  >\n"
  },
  {
    "path": "packages/table-core/src/types/TableState.ts",
    "content": "import type { UnionToIntersection } from './type-utils'\nimport type { TableState_ColumnFiltering } from '../features/column-filtering/columnFilteringFeature.types'\nimport type { TableState_ColumnGrouping } from '../features/column-grouping/columnGroupingFeature.types'\nimport type { TableState_ColumnOrdering } from '../features/column-ordering/columnOrderingFeature.types'\nimport type { TableState_ColumnPinning } from '../features/column-pinning/columnPinningFeature.types'\nimport type { TableState_ColumnResizing } from '../features/column-resizing/columnResizingFeature.types'\nimport type { TableState_ColumnSizing } from '../features/column-sizing/columnSizingFeature.types'\nimport type { TableState_ColumnVisibility } from '../features/column-visibility/columnVisibilityFeature.types'\nimport type { TableState_GlobalFiltering } from '../features/global-filtering/globalFilteringFeature.types'\nimport type { TableState_RowExpanding } from '../features/row-expanding/rowExpandingFeature.types'\nimport type { TableState_RowPagination } from '../features/row-pagination/rowPaginationFeature.types'\nimport type { TableState_RowPinning } from '../features/row-pinning/rowPinningFeature.types'\nimport type { TableState_RowSelection } from '../features/row-selection/rowSelectionFeature.types'\nimport type { TableState_RowSorting } from '../features/row-sorting/rowSortingFeature.types'\nimport type { ExtractFeatureTypes, TableFeatures } from './TableFeatures'\n\n/**\n * Use this interface as a target for declaration merging to add your own state properties.\n * Note: This will affect the types of all tables in your project.\n */\nexport interface TableState_Plugins<TFeatures extends TableFeatures> {}\n\nexport type TableState<TFeatures extends TableFeatures> = UnionToIntersection<\n  | ('columnFilteringFeature' extends keyof TFeatures\n      ? TableState_ColumnFiltering\n      : never)\n  | ('columnGroupingFeature' extends keyof TFeatures\n      ? TableState_ColumnGrouping\n      : never)\n  | ('columnOrderingFeature' extends keyof TFeatures\n      ? TableState_ColumnOrdering\n      : never)\n  | ('columnPinningFeature' extends keyof TFeatures\n      ? TableState_ColumnPinning\n      : never)\n  | ('columnResizingFeature' extends keyof TFeatures\n      ? TableState_ColumnResizing\n      : never)\n  | ('columnSizingFeature' extends keyof TFeatures\n      ? TableState_ColumnSizing\n      : never)\n  | ('columnVisibilityFeature' extends keyof TFeatures\n      ? TableState_ColumnVisibility\n      : never)\n  | ('globalFilteringFeature' extends keyof TFeatures\n      ? TableState_GlobalFiltering\n      : never)\n  | ('rowExpandingFeature' extends keyof TFeatures\n      ? TableState_RowExpanding\n      : never)\n  | ('rowPaginationFeature' extends keyof TFeatures\n      ? TableState_RowPagination\n      : never)\n  | ('rowPinningFeature' extends keyof TFeatures\n      ? TableState_RowPinning\n      : never)\n  | ('rowSelectionFeature' extends keyof TFeatures\n      ? TableState_RowSelection\n      : never)\n  | ('rowSortingFeature' extends keyof TFeatures\n      ? TableState_RowSorting\n      : never)\n> &\n  ExtractFeatureTypes<'TableState', TFeatures> &\n  TableState_Plugins<TFeatures>\n\n// export type TableState<TFeatures extends TableFeatures> = ExtractFeatureTypes<\n// export type TableState<TFeatures extends TableFeatures> = ExtractFeatureTypes<\n//   'TableState',\n//   TFeatures\n// > &\n//   TableState_Plugins<TFeatures>\n\nexport type TableState_All = Partial<\n  TableState_ColumnFiltering &\n    TableState_ColumnGrouping &\n    TableState_ColumnOrdering &\n    TableState_ColumnPinning &\n    TableState_ColumnResizing &\n    TableState_ColumnSizing &\n    TableState_ColumnVisibility &\n    TableState_GlobalFiltering &\n    TableState_RowExpanding &\n    TableState_RowPagination &\n    TableState_RowPinning &\n    TableState_RowSelection &\n    TableState_RowSorting\n>\n"
  },
  {
    "path": "packages/table-core/src/types/type-utils.ts",
    "content": "export type Updater<T> = T | ((old: T) => T)\n\nexport type OnChangeFn<T> = (updaterOrValue: Updater<T>) => void\n\nexport type RowData = Record<string, any> | Array<any>\n\nexport type CellData = unknown\n\nexport type PartialKeys<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>\n\nexport type RequiredKeys<T, K extends keyof T> = Omit<T, K> &\n  Required<Pick<T, K>>\n\nexport type UnionToIntersection<T> = (\n  T extends any ? (x: T) => any : never\n) extends (x: infer R) => any\n  ? R\n  : never\n\ntype ComputeRange<\n  N extends number,\n  Result extends Array<unknown> = [],\n> = Result['length'] extends N\n  ? Result\n  : ComputeRange<N, [...Result, Result['length']]>\n\ntype Index40 = ComputeRange<40>[number]\n\n// Is this type a tuple?\ntype IsTuple<T> = T extends ReadonlyArray<any> & { length: infer Length }\n  ? Length extends Index40\n    ? T\n    : never\n  : never\n\n// If this type is a tuple, what indices are allowed?\ntype AllowedIndexes<\n  Tuple extends ReadonlyArray<any>,\n  Keys extends number = never,\n> = Tuple extends readonly []\n  ? Keys\n  : Tuple extends readonly [infer _, ...infer Tail]\n    ? AllowedIndexes<Tail, Keys | Tail['length']>\n    : Keys\n\nexport type DeepKeys<\n  T,\n  TDepth extends Array<any> = [],\n> = TDepth['length'] extends 5\n  ? never\n  : unknown extends T\n    ? string\n    : T extends ReadonlyArray<any> & IsTuple<T>\n      ? AllowedIndexes<T> | DeepKeysPrefix<T, AllowedIndexes<T>, TDepth>\n      : T extends Array<any>\n        ? DeepKeys<T[number], [...TDepth, any]>\n        : T extends Date\n          ? never\n          : T extends object\n            ? (keyof T & string) | DeepKeysPrefix<T, keyof T, TDepth>\n            : never\n\ntype DeepKeysPrefix<\n  T,\n  TPrefix,\n  TDepth extends Array<any>,\n> = TPrefix extends keyof T & (number | string)\n  ? `${TPrefix}.${DeepKeys<T[TPrefix], [...TDepth, any]> & string}`\n  : never\n\nexport type DeepValue<T, TProp> =\n  T extends Record<string | number, any>\n    ? TProp extends `${infer TBranch}.${infer TDeepProp}`\n      ? DeepValue<T[TBranch], TDeepProp>\n      : T[TProp & string]\n    : never\n\nexport type NoInfer<T> = [T][T extends any ? 0 : never]\n\nexport type Getter<TValue> = <TTValue = TValue>() => NoInfer<TTValue>\n\nexport type Prettify<T> = {\n  [K in keyof T]: T[K]\n} & unknown\n"
  },
  {
    "path": "packages/table-core/src/utils.ts",
    "content": "import type { Table, Table_Internal } from './types/Table'\nimport type { NoInfer, RowData, Updater } from './types/type-utils'\nimport type { TableFeatures } from './types/TableFeatures'\nimport type { TableState, TableState_All } from './types/TableState'\n\nexport function functionalUpdate<T>(updater: Updater<T>, input: T): T {\n  return typeof updater === 'function'\n    ? (updater as (i: T) => T)(input)\n    : updater\n}\n\nexport function noop() {}\n\nexport function makeStateUpdater<\n  TFeatures extends TableFeatures,\n  K extends (string & {}) | keyof TableState_All | keyof TableState<TFeatures>,\n>(key: K, instance: Table<TFeatures, any>) {\n  return (updater: Updater<TableState<any>[K & keyof TableState<any>]>) => {\n    instance.baseStore.setState(\n      <TTableState extends TableState_All>(old: TTableState) => {\n        return {\n          ...old,\n          [key]: functionalUpdate(updater, (old as any)[key]),\n        }\n      },\n    )\n  }\n}\n\ntype AnyFunction = (...args: any) => any\n\nexport function isFunction<T extends AnyFunction>(d: any): d is T {\n  return d instanceof Function\n}\n\nexport function isNumberArray(d: any): d is Array<number> {\n  return Array.isArray(d) && d.every((val) => typeof val === 'number')\n}\n\nexport function flattenBy<TNode>(\n  arr: Array<TNode>,\n  getChildren: (item: TNode) => Array<TNode>,\n) {\n  const flat: Array<TNode> = []\n\n  const recurse = (subArr: Array<TNode>) => {\n    subArr.forEach((item) => {\n      flat.push(item)\n      const children = getChildren(item)\n      if (children.length) {\n        recurse(children)\n      }\n    })\n  }\n\n  recurse(arr)\n\n  return flat\n}\n\nexport const $internalMemoFnMeta = Symbol('memoFnMeta')\nexport type MemoFnMeta = { originalArgsLength?: number }\n\n/**\n * @internal\n */\nfunction setMemoFnMeta(fn: Function, meta: MemoFnMeta) {\n  Object.defineProperty(fn, $internalMemoFnMeta, { value: meta })\n}\n\n/**\n * @internal\n */\nexport function getMemoFnMeta(fn: any): MemoFnMeta | null {\n  return (typeof fn === 'function' && fn[$internalMemoFnMeta]) ?? null\n}\n\ninterface MemoOptions<TDeps extends ReadonlyArray<any>, TDepArgs, TResult> {\n  fn: (...args: NoInfer<TDeps>) => TResult\n  memoDeps?: (depArgs?: TDepArgs) => [...TDeps] | undefined\n  onAfterCompare?: (depsChanged: boolean) => void\n  onAfterUpdate?: (result: TResult) => void\n  onBeforeCompare?: () => void\n  onBeforeUpdate?: () => void\n}\n\nexport const memo = <TDeps extends ReadonlyArray<any>, TDepArgs, TResult>({\n  fn,\n  memoDeps,\n  onAfterCompare,\n  onAfterUpdate,\n  onBeforeCompare,\n  onBeforeUpdate,\n}: MemoOptions<TDeps, TDepArgs, TResult>): ((\n  depArgs?: TDepArgs,\n) => TResult) => {\n  let deps: Array<any> | undefined = []\n  let result: TResult | undefined\n\n  const memoizedFn = (depArgs?: TDepArgs): TResult => {\n    onBeforeCompare?.()\n    const newDeps = memoDeps?.(depArgs)\n    const depsChanged =\n      !newDeps ||\n      newDeps.length !== deps?.length ||\n      newDeps.some((dep: any, index: number) => deps?.[index] !== dep)\n    onAfterCompare?.(depsChanged)\n\n    if (!depsChanged) {\n      return result!\n    }\n\n    deps = newDeps\n\n    onBeforeUpdate?.()\n    result = fn(...(newDeps ?? ([] as any)))\n    onAfterUpdate?.(result)\n\n    return result\n  }\n\n  setMemoFnMeta(memoizedFn, { originalArgsLength: fn.length })\n\n  return memoizedFn\n}\n\ninterface TableMemoOptions<\n  TFeatures extends TableFeatures,\n  TDeps extends ReadonlyArray<any>,\n  TDepArgs,\n  TResult,\n> extends MemoOptions<TDeps, TDepArgs, TResult> {\n  feature?: keyof TFeatures & string\n  fnName: string\n  objectId?: string\n  onAfterUpdate?: () => void\n  table: Table_Internal<TFeatures, any>\n}\n\nconst pad = (str: number | string, num: number) => {\n  str = String(str)\n  while (str.length < num) {\n    str = ' ' + str\n  }\n  return str\n}\n\nexport function tableMemo<\n  TFeatures extends TableFeatures,\n  TDeps extends ReadonlyArray<any>,\n  TDepArgs,\n  TResult,\n>({\n  feature,\n  fnName,\n  objectId,\n  onAfterUpdate,\n  table,\n  ...memoOptions\n}: TableMemoOptions<TFeatures, TDeps, TDepArgs, TResult>) {\n  let beforeCompareTime: number\n  let afterCompareTime: number\n  let startCalcTime: number\n  let endCalcTime: number\n  let runCount = 0\n  let debug: boolean | undefined\n  let debugCache: boolean | undefined\n\n  if (process.env.NODE_ENV === 'development') {\n    const { debugCache: _debugCache, debugAll } = table.options\n    debugCache = _debugCache\n    const { parentName } = getFunctionNameInfo(fnName, '.')\n\n    const debugByParent =\n      // @ts-expect-error\n      table.options[\n        `debug${(parentName != 'table' ? parentName + 's' : parentName).replace(\n          parentName,\n          parentName.charAt(0).toUpperCase() + parentName.slice(1),\n        )}`\n      ]\n    const debugByFeature = feature\n      ? // @ts-expect-error\n        table.options[\n          `debug${feature.charAt(0).toUpperCase() + feature.slice(1)}`\n        ]\n      : false\n\n    debug = debugAll || debugByParent || debugByFeature\n  }\n\n  function logTime(time: number, depsChanged: boolean) {\n    const runType =\n      runCount === 0\n        ? '(1st run)'\n        : depsChanged\n          ? '(rerun #' + runCount + ')'\n          : '(cache)'\n    runCount++\n\n    console.groupCollapsed(\n      `%c⏱ ${pad(`${time.toFixed(1)} ms`, 12)} %c${runType}%c ${fnName}%c ${objectId ? `(${fnName.split('.')[0]}Id: ${objectId})` : ''}`,\n      `font-size: .6rem; font-weight: bold; ${\n        depsChanged\n          ? `color: hsl(\n        ${Math.max(0, Math.min(120 - Math.log10(time) * 60, 120))}deg 100% 31%);`\n          : ''\n      } `,\n      `color: ${runCount < 2 ? '#FF00FF' : '#FF1493'}`,\n      'color: #666',\n      'color: #87CEEB',\n    )\n    console.info({\n      feature,\n      state: table.store.state,\n      deps: memoOptions.memoDeps?.toString(),\n    })\n    console.trace()\n    console.groupEnd()\n  }\n\n  const debugOptions =\n    process.env.NODE_ENV === 'development'\n      ? {\n          onBeforeCompare: () => {\n            if (debugCache) {\n              beforeCompareTime = performance.now()\n            }\n          },\n          onAfterCompare: (depsChanged: boolean) => {\n            if (debugCache) {\n              afterCompareTime = performance.now()\n              const compareTime =\n                Math.round((afterCompareTime - beforeCompareTime) * 100) / 100\n              if (!depsChanged) {\n                logTime(compareTime, depsChanged)\n              }\n            }\n          },\n          onBeforeUpdate: () => {\n            if (debug) {\n              startCalcTime = performance.now()\n            }\n          },\n          onAfterUpdate: () => {\n            if (debug) {\n              endCalcTime = performance.now()\n              const executionTime =\n                Math.round((endCalcTime - startCalcTime) * 100) / 100\n              logTime(executionTime, true)\n            }\n            queueMicrotask(() => onAfterUpdate?.())\n          },\n        }\n      : {\n          onAfterUpdate: () => {\n            queueMicrotask(() => onAfterUpdate?.())\n          },\n        }\n\n  return memo({\n    ...memoOptions,\n    ...debugOptions,\n  })\n}\n\nexport interface API<TDeps extends ReadonlyArray<any>, TDepArgs> {\n  fn: (...args: any) => any\n  memoDeps?: (depArgs?: any) => [...any] | undefined\n}\n\nexport type APIObject<TDeps extends ReadonlyArray<any>, TDepArgs> = Record<\n  string,\n  API<TDeps, TDepArgs>\n>\n\n/**\n * Assumes that a function name is in the format of `parentName_fnKey` and returns the `fnKey` and `fnName` in the format of `parentName.fnKey`.\n */\nexport function getFunctionNameInfo(\n  staticFnName: string,\n  splitBy: '_' | '.' = '_',\n) {\n  const [parentName, fnKey] = staticFnName.split(splitBy)\n  const fnName = `${parentName}.${fnKey}`\n  return { fnKey, fnName, parentName } as {\n    fnKey: string\n    fnName: string\n    parentName: string\n  }\n}\n\n/**\n * Assigns Table API methods directly to the table instance.\n * Unlike row/cell/column/header, the table is a singleton so methods are assigned directly.\n */\nexport function assignTableAPIs<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TDeps extends ReadonlyArray<any>,\n  TDepArgs,\n>(\n  feature: keyof TFeatures & string,\n  table: Table_Internal<TFeatures, TData>,\n  apis: APIObject<TDeps, NoInfer<TDepArgs>>,\n): void {\n  for (const [staticFnName, { fn, memoDeps }] of Object.entries(apis)) {\n    const { fnKey, fnName } = getFunctionNameInfo(staticFnName)\n\n    ;(table as Record<string, any>)[fnKey] = memoDeps\n      ? tableMemo({\n          memoDeps,\n          fn,\n          fnName,\n          table,\n          feature,\n        })\n      : fn\n  }\n}\n\nexport interface PrototypeAPI<TDeps extends ReadonlyArray<any>, TDepArgs> {\n  fn: (self: any, ...args: any) => any\n  memoDeps?: (self: any, depArgs?: any) => [...any] | undefined\n}\n\nexport type PrototypeAPIObject<\n  TDeps extends ReadonlyArray<any>,\n  TDepArgs,\n> = Record<string, PrototypeAPI<TDeps, TDepArgs>>\n\n/**\n * Assigns API methods to a prototype object for memory-efficient method sharing.\n * All instances created with this prototype will share the same method references.\n *\n * For memoized methods, the memo state is lazily created and stored on each instance.\n * This provides the best of both worlds: shared method code + per-instance caching.\n */\nexport function assignPrototypeAPIs<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TDeps extends ReadonlyArray<any>,\n  TDepArgs,\n>(\n  feature: keyof TFeatures & string,\n  prototype: Record<string, any>,\n  table: Table_Internal<TFeatures, TData>,\n  apis: PrototypeAPIObject<TDeps, NoInfer<TDepArgs>>,\n): void {\n  for (const [staticFnName, { fn, memoDeps }] of Object.entries(apis)) {\n    const { fnKey, fnName } = getFunctionNameInfo(staticFnName)\n\n    if (memoDeps) {\n      // For memoized methods, create a function that lazily initializes\n      // the memo on first access and stores it on the instance\n      const memoKey = `_memo_${fnKey}`\n\n      prototype[fnKey] = function (this: any, ...args: Array<any>) {\n        // Lazily create memo on first access for this instance\n        if (!this[memoKey]) {\n          const self = this\n          this[memoKey] = tableMemo({\n            memoDeps: () => memoDeps(self),\n            fn: (...deps) => fn(self, ...deps),\n            fnName,\n            objectId: self.id,\n            table,\n            feature,\n          })\n        }\n        return this[memoKey](...args)\n      }\n    } else {\n      // Non-memoized methods just call the static function with `this`\n      prototype[fnKey] = function (this: any, ...args: Array<any>) {\n        return fn(this, ...args)\n      }\n    }\n\n    setMemoFnMeta(prototype[fnKey], { originalArgsLength: fn.length })\n  }\n}\n\n/**\n * Looks to run the memoized function with the builder pattern on the object if it exists, otherwise fallback to the static method passed in.\n */\nexport function callMemoOrStaticFn<\n  TObject extends Record<string, any>,\n  TStaticFn extends AnyFunction,\n>(\n  obj: TObject,\n  fnKey: string,\n  staticFn: TStaticFn,\n  ...args: Parameters<TStaticFn> extends [any, ...infer Rest] ? Rest : never\n): ReturnType<TStaticFn> {\n  return (\n    (obj[fnKey] as Function | undefined)?.(...args) ?? staticFn(obj, ...args)\n  )\n}\n"
  },
  {
    "path": "packages/table-core/tests/fixtures/data/generateTestColumnDefs.ts",
    "content": "import { createColumnHelper } from '../../../src'\nimport type { Person, PersonColumn, PersonKeys } from './types'\nimport type { RowData, TableFeatures } from '../../../src'\n\nexport function generateTestColumnDefs<\n  TFeatures extends TableFeatures,\n  TData extends RowData = Person,\n>(people: Array<TData>): Array<PersonColumn<TFeatures, TData>> {\n  const columnHelper = createColumnHelper<TFeatures, TData>()\n  const person = people[0]\n\n  if (!person) {\n    return []\n  }\n\n  return Object.keys(person).map((key) => {\n    const typedKey = key as PersonKeys\n\n    return columnHelper.accessor(typedKey as any, { id: typedKey } as any)\n  })\n}\n"
  },
  {
    "path": "packages/table-core/tests/fixtures/data/generateTestData.ts",
    "content": "import { faker } from '@faker-js/faker'\nimport { createArrayOfNumbers } from '../../helpers/testUtils'\nimport type { Person } from './types'\n\nfunction createPerson(): Person {\n  return {\n    id: faker.string.uuid(),\n    firstName: faker.person.firstName(),\n    lastName: faker.person.lastName(),\n    age: faker.number.int(40),\n    visits: faker.number.int(1000),\n    progress: faker.number.int(100),\n    status: faker.helpers.arrayElement([\n      'relationship',\n      'complicated',\n      'single',\n    ]),\n  }\n}\n\n/**\n * Creates a nested array of test Person objects\n * @param lengths - An array of numbers where each number determines the length of Person arrays at that depth.\n *                 e.g. makeData(3, 2) creates 3 parent rows with 2 sub-rows each\n * @returns An array of Person objects with optional nested subRows based on the provided lengths\n */\nexport function generateTestData(...lengths: Array<number>) {\n  const makeDataLevel = (depth = 0): Array<Person> => {\n    const len = lengths[depth]\n\n    if (!len) return []\n\n    return createArrayOfNumbers(len).map(() => {\n      return {\n        ...createPerson(),\n        subRows: lengths[depth + 1] ? makeDataLevel(depth + 1) : undefined,\n      }\n    })\n  }\n\n  return makeDataLevel()\n}\n\nexport function getStaticTestData() {\n  return [\n    {\n      id: '1',\n      firstName: 'John',\n      lastName: 'Doe',\n      age: 30,\n      visits: 100,\n      progress: 50,\n      status: 'relationship',\n    },\n    {\n      id: '2',\n      firstName: 'Jane',\n      lastName: 'Smith',\n      age: 25,\n      visits: 200,\n      progress: 75,\n      status: 'complicated',\n    },\n    {\n      id: '3',\n      firstName: 'Alice',\n      lastName: 'Johnson',\n      age: 35,\n      visits: 150,\n      progress: 60,\n      status: 'single',\n    },\n  ] as const satisfies Array<Person>\n}\n"
  },
  {
    "path": "packages/table-core/tests/fixtures/data/types.ts",
    "content": "import type { ColumnDef, RowData, TableFeatures } from '../../../src'\n\nexport type PersonKeys = keyof Person\nexport type PersonColumn<\n  TFeatures extends TableFeatures,\n  TData extends RowData = Person,\n> = ColumnDef<TFeatures, TData, any>\n\nexport type Person = {\n  id: string\n  firstName: string\n  lastName: string\n  age: number\n  visits: number\n  progress: number\n  status: 'relationship' | 'complicated' | 'single'\n  subRows?: Array<Person>\n}\n"
  },
  {
    "path": "packages/table-core/tests/fixtures/setup/test-setup.ts",
    "content": "import '@testing-library/jest-dom/vitest'\n"
  },
  {
    "path": "packages/table-core/tests/helpers/generateTestRows.ts",
    "content": "import {\n  generateTestTableFromData,\n  generateTestTableWithData,\n  generateTestTableWithDataAndState,\n  generateTestTableWithStateFromData,\n} from './generateTestTable'\nimport type { Row, TableFeatures, TableOptions } from '../../src'\nimport type { Person } from '../fixtures/data/types'\n\nexport function generateTestRowsWithData<TFeatures extends TableFeatures>(\n  lengths: Array<number> | number = 10,\n  options?: Omit<\n    TableOptions<TFeatures, Person>,\n    'data' | 'columns' | '_features'\n  > & {\n    _features?: TFeatures\n  },\n): Array<Row<TFeatures, Person>> {\n  const testTable = generateTestTableWithData(lengths, options)\n  return testTable.getRowModel().rows\n}\n\nexport function generateTestRowsFromData<TFeatures extends TableFeatures>(\n  data: Array<Person>,\n  options?: Omit<TableOptions<TFeatures, Person>, 'data' | 'columns'> & {\n    _features?: TFeatures\n  },\n): Array<Row<TFeatures, Person>> {\n  const testTable = generateTestTableFromData(data, options)\n  return testTable.getRowModel().rows\n}\n\nexport function generateTestRowsWithState<TFeatures extends TableFeatures>(\n  lengths: Array<number> | number = 10,\n  options?: Omit<\n    TableOptions<TFeatures, Person>,\n    'data' | 'columns' | 'onStateChange'\n  > & {\n    _features?: TFeatures\n  },\n): Array<Row<TFeatures, Person>> {\n  const testTable = generateTestTableWithDataAndState(lengths, options)\n  return testTable.getRowModel().rows\n}\n\nexport function generateTestRowsWithStateFromData<\n  TFeatures extends TableFeatures,\n>(\n  data: Array<Person>,\n  options?: Omit<\n    TableOptions<TFeatures, Person>,\n    'data' | 'columns' | 'onStateChange'\n  > & {\n    _features?: TFeatures\n  },\n): Array<Row<TFeatures, Person>> {\n  const testTable = generateTestTableWithStateFromData(data, options)\n  return testTable.getRowModel().rows\n}\n"
  },
  {
    "path": "packages/table-core/tests/helpers/generateTestTable.ts",
    "content": "import { constructTable, coreFeatures } from '../../src'\nimport { generateTestColumnDefs } from '../fixtures/data/generateTestColumnDefs'\nimport { generateTestData } from '../fixtures/data/generateTestData'\nimport type {\n  Row,\n  Table,\n  TableFeatures,\n  TableOptions,\n  TableState,\n} from '../../src'\nimport type { Person } from '../fixtures/data/types'\n\nexport function generateTestTableWithData<TFeatures extends TableFeatures>(\n  lengths: Array<number> | number = 10,\n  options?: Omit<\n    TableOptions<TFeatures, Person>,\n    'data' | 'columns' | '_features'\n  > & {\n    _features?: TableFeatures\n  },\n): Table<TFeatures, Person> {\n  const lengthsArray = Array.isArray(lengths) ? lengths : [lengths]\n  const data = generateTestData(...lengthsArray)\n  const columns = generateTestColumnDefs<TFeatures>(data)\n\n  return constructTable<TFeatures, Person>({\n    data,\n    columns,\n    getSubRows: (row: Row<TFeatures, Person>) => row.subRows,\n    ...options,\n    _features: {\n      ...coreFeatures,\n      ...options?._features,\n    },\n  } as any)\n}\n\nexport function generateTestTableFromData<TFeatures extends TableFeatures>(\n  data: Array<Person>,\n  options?: Omit<TableOptions<TFeatures, Person>, 'data' | 'columns'>,\n): Table<TFeatures, Person> {\n  const columns = generateTestColumnDefs<TFeatures>(data)\n  return constructTable({\n    data,\n    columns,\n    ...options,\n    _features: {\n      ...coreFeatures,\n      ...options?._features,\n    },\n  } as any)\n}\n\nexport function generateTestTableWithDataAndState<\n  TFeatures extends TableFeatures,\n>(\n  lengths: Array<number> | number = 10,\n  options?: Omit<\n    TableOptions<TFeatures, Person>,\n    'data' | 'columns' | 'onStateChange'\n  >,\n): Table<TFeatures, Person> {\n  const lengthsArray = Array.isArray(lengths) ? lengths : [lengths]\n  const data = generateTestData(...lengthsArray)\n  const columns = generateTestColumnDefs<TFeatures>(data)\n  let state = { ...options?.initialState } as TableState<TFeatures>\n\n  const table = generateTestTableWithData(lengths, {\n    data,\n    columns,\n    ...options,\n    _features: {\n      ...options?._features,\n    },\n    state,\n    onStateChange: (updater: any) => {\n      if (typeof updater === 'function') {\n        state = updater(state)\n      } else {\n        state = updater\n      }\n\n      table.options.state = state\n    },\n  } as any)\n\n  return table\n}\n\nexport function generateTestTableWithStateFromData<\n  TFeatures extends TableFeatures,\n>(\n  data: Array<Person>,\n  options?: Omit<\n    TableOptions<TFeatures, Person>,\n    'data' | 'columns' | 'onStateChange'\n  >,\n): Table<TFeatures, Person> {\n  const columns = generateTestColumnDefs<TFeatures>(data)\n  let state = { ...options?.initialState } as TableState<TFeatures>\n\n  const table = generateTestTableFromData(data, {\n    columns,\n    ...options,\n    _features: {\n      ...options?._features,\n    },\n    state,\n    onStateChange: (updater: any) => {\n      if (typeof updater === 'function') {\n        state = updater(state)\n      } else {\n        state = updater\n      }\n    },\n  } as any)\n\n  return table\n}\n"
  },
  {
    "path": "packages/table-core/tests/helpers/rowPinningHelpers.ts",
    "content": "import { vi } from 'vitest'\nimport { getDefaultRowPinningState } from '../../src/features/row-pinning/rowPinningFeature.utils'\nimport {\n  constructTable,\n  createColumnHelper,\n  coreFeatures,\n  rowPinningFeature,\n} from '../../src'\nimport { generateTestData } from '../fixtures/data/generateTestData'\nimport { generateTestTableWithData } from './generateTestTable'\nimport type { ColumnDef, RowPinningState, TableOptions } from '../../src'\nimport type { Person } from '../fixtures/data/types'\n\n// Define feature set with proper typing\nconst _features = {\n  ...coreFeatures,\n  rowPinningFeature,\n} as any\n\ntype personKeys = keyof Person\ntype PersonColumn = ColumnDef<typeof _features, Person, any>\n\nfunction generateColumnDefs(people: Array<Person>): Array<PersonColumn> {\n  const columnHelper = createColumnHelper<typeof _features, Person>()\n  const person = people[0]\n\n  if (!person) {\n    return []\n  }\n\n  return Object.keys(person).map((key) => {\n    const typedKey = key as personKeys\n    return columnHelper.accessor(typedKey, { id: typedKey })\n  })\n}\n\nexport function createTableWithPinningState(\n  rowCount = 10,\n  pinningState?: RowPinningState,\n) {\n  const table = generateTestTableWithData(rowCount, {\n    initialState: {\n      rowPinning: pinningState ?? getDefaultRowPinningState(),\n    },\n    _features: {\n      rowPinning: rowPinningFeature,\n    },\n  } as any)\n  return table\n}\n\nexport function createTableWithMockOnPinningChange(rowCount = 10): {\n  table: ReturnType<typeof generateTestTableWithData>\n  onRowPinningChangeMock: ReturnType<typeof vi.fn>\n} {\n  const onRowPinningChangeMock = vi.fn()\n  const table = generateTestTableWithData(rowCount, {\n    _features: {\n      rowPinning: rowPinningFeature,\n    },\n  } as any)\n  table.options.onRowPinningChange = onRowPinningChangeMock\n  return { table, onRowPinningChangeMock }\n}\n\nexport function createRowPinningTable(\n  options?: Omit<\n    TableOptions<typeof _features, Person>,\n    'data' | 'columns' | '_features'\n  >,\n  lengths: Array<number> | number = 10,\n): any {\n  const lengthsArray = Array.isArray(lengths) ? lengths : [lengths]\n  const data = generateTestData(...lengthsArray)\n  const columns = generateColumnDefs(data)\n\n  const table = constructTable<typeof _features, Person>({\n    _features,\n    _rowModels: {},\n    data,\n    columns,\n    getSubRows: (row: any) => row.subRows,\n    enableRowPinning: true,\n    renderFallbackValue: '',\n    initialState: {\n      rowPinning: {\n        top: [],\n        bottom: [],\n      },\n      ...options?.initialState,\n    },\n    ...options,\n  })\n\n  return table\n}\n"
  },
  {
    "path": "packages/table-core/tests/helpers/testUtils.ts",
    "content": "import type { vi } from 'vitest'\nimport type { Person } from '../fixtures/data/types'\n\nexport const createArrayOfNumbers = (length: number) => {\n  return Array.from({ length }, (_, i) => i)\n}\n\nexport const getPeopleIds = (\n  people: Array<Person>,\n  usePersonId: boolean = false,\n) => {\n  return people.map((person, index) => (usePersonId ? person.id : `${index}`))\n}\n\nexport function getUpdaterResult(mock: ReturnType<typeof vi.fn>, input: any) {\n  const updaterFn = mock.mock.calls[0]?.[0]\n  return updaterFn?.(input)\n}\n"
  },
  {
    "path": "packages/table-core/tests/implementation/features/row-pinning/rowPinningFeature.test.ts",
    "content": "import { describe, expect, it } from 'vitest'\nimport {\n  constructTable,\n  coreFeatures,\n  createColumnHelper,\n  createPaginatedRowModel,\n  rowPaginationFeature,\n  rowPinningFeature,\n} from '../../../../src'\nimport {\n  createRowPinningTable,\n  createTableWithMockOnPinningChange,\n} from '../../../helpers/rowPinningHelpers'\nimport { generateTestData } from '../../../fixtures/data/generateTestData'\nimport type { ColumnDef, Row } from '../../../../src'\nimport type { Person } from '../../../fixtures/data/types'\n\n// Define feature set with proper typing\nconst _features = {\n  ...coreFeatures,\n  rowPinningFeature,\n}\n\ntype personKeys = keyof Person\ntype PersonColumn = ColumnDef<typeof _features, Person, any>\n\nfunction generateColumnDefs(people: Array<Person>): Array<PersonColumn> {\n  const columnHelper = createColumnHelper<typeof _features, Person>()\n  const person = people[0]\n\n  if (!person) {\n    return []\n  }\n\n  return Object.keys(person).map((key) => {\n    const typedKey = key as personKeys\n    return columnHelper.accessor(typedKey, { id: typedKey })\n  })\n}\n\nconst ROW = {\n  0: '0',\n  1: '1',\n  2: '2',\n} as const\n\nconst SUB_ROW = {\n  0: '0.0',\n  1: '0.1',\n}\n\nconst EMPTY_PINNING_STATE = {\n  top: [],\n  bottom: [],\n}\n\ndescribe('table methods', () => {\n  describe('setRowPinning', () => {\n    it('should call onRowPinningChange when invoked', () => {\n      const { table, onRowPinningChangeMock } =\n        createTableWithMockOnPinningChange()\n\n      const newState = {\n        top: [ROW[0]],\n        bottom: [ROW[1]],\n      }\n\n      table.setRowPinning(newState)\n\n      expect(onRowPinningChangeMock).toHaveBeenCalledWith(newState)\n    })\n  })\n\n  describe('resetRowPinning', () => {\n    it('should reset to default state when defaultState is true', () => {\n      const table = createRowPinningTable()\n\n      table.setRowPinning({\n        top: [ROW[0]],\n        bottom: [ROW[1]],\n      })\n\n      table.resetRowPinning(true)\n\n      expect(table.store.state.rowPinning).toEqual(EMPTY_PINNING_STATE)\n    })\n\n    it('should reset to initial state when defaultState is false', () => {\n      const initialState = {\n        top: [ROW[0]],\n        bottom: [ROW[1]],\n      }\n      const table = createRowPinningTable({\n        initialState: {\n          rowPinning: initialState,\n        },\n      })\n\n      table.setRowPinning({\n        top: [ROW[2]],\n        bottom: [],\n      })\n\n      table.resetRowPinning(false)\n\n      expect(table.store.state.rowPinning).toEqual(initialState)\n    })\n  })\n\n  describe('getIsSomeRowsPinned', () => {\n    it('should return false when no rows are pinned', () => {\n      const table = createRowPinningTable()\n      expect(table.getIsSomeRowsPinned()).toBe(false)\n      expect(table.getIsSomeRowsPinned('top')).toBe(false)\n      expect(table.getIsSomeRowsPinned('bottom')).toBe(false)\n    })\n\n    it('should return true when rows are pinned', () => {\n      const table = createRowPinningTable({\n        initialState: {\n          rowPinning: {\n            top: [ROW[0]],\n            bottom: [ROW[1]],\n          },\n        },\n      })\n\n      expect(table.getIsSomeRowsPinned()).toBe(true)\n      expect(table.getIsSomeRowsPinned('top')).toBe(true)\n      expect(table.getIsSomeRowsPinned('bottom')).toBe(true)\n    })\n  })\n\n  describe('getTopRows/getBottomRows/getCenterRows', () => {\n    it('should return correct rows for each section', () => {\n      const table = createRowPinningTable({\n        initialState: {\n          rowPinning: {\n            top: [ROW[0]],\n            bottom: [ROW[2]],\n          },\n        },\n      })\n\n      const topRows = table.getTopRows()\n      const bottomRows = table.getBottomRows()\n      const centerRows = table.getCenterRows()\n\n      expect(topRows).toHaveLength(1)\n      expect(topRows[0]?.id).toBe(ROW[0])\n\n      expect(bottomRows).toHaveLength(1)\n      expect(bottomRows[0]?.id).toBe(ROW[2])\n\n      expect(centerRows).toHaveLength(8)\n      expect(\n        centerRows.every(\n          (row: (typeof centerRows)[number]) =>\n            row.id !== ROW[0] && row.id !== ROW[2],\n        ),\n      ).toBe(true)\n    })\n\n    it('should handle keepPinnedRows - false', () => {\n      const data = generateTestData(10)\n      const columns = generateColumnDefs(data)\n\n      const _featuresWithPagination = {\n        ...coreFeatures,\n        rowPinningFeature,\n        rowPaginationFeature,\n      }\n\n      const table = constructTable<typeof _featuresWithPagination, Person>({\n        _features: _featuresWithPagination,\n        _rowModels: {\n          paginatedRowModel: createPaginatedRowModel(),\n        },\n        data,\n        columns,\n        getSubRows: (row) => row.subRows,\n        enableRowPinning: true,\n        renderFallbackValue: '',\n        initialState: {\n          // Make first 2 rows visible\n          pagination: {\n            pageSize: 2,\n            pageIndex: 0,\n          },\n          rowPinning: {\n            top: [ROW[0]],\n            bottom: [ROW[2]],\n          },\n        },\n        keepPinnedRows: false,\n      })\n\n      expect(table.getTopRows()).toHaveLength(1)\n      expect(table.getBottomRows()).toHaveLength(0) // Row 2 is not in visible rows\n    })\n  })\n\n  it('should handle keepPinnedRows - true', () => {\n    const data = generateTestData(10)\n    const columns = generateColumnDefs(data)\n\n    const _featuresWithPagination = {\n      ...coreFeatures,\n      rowPinningFeature,\n      rowPaginationFeature,\n    }\n\n    const table = constructTable<typeof _featuresWithPagination, Person>({\n      _features: _featuresWithPagination,\n      _rowModels: {\n        paginatedRowModel: createPaginatedRowModel(),\n      },\n      data,\n      columns,\n      getSubRows: (row) => row.subRows,\n      enableRowPinning: true,\n      renderFallbackValue: '',\n      initialState: {\n        // Make first 2 rows visible\n        pagination: {\n          pageSize: 2,\n          pageIndex: 0,\n        },\n        rowPinning: {\n          top: [ROW[0]],\n          bottom: [ROW[2]],\n        },\n      },\n      keepPinnedRows: true,\n    })\n\n    expect(table.getTopRows()).toHaveLength(1)\n    expect(table.getBottomRows()).toHaveLength(1)\n  })\n})\n\ndescribe('row methods', () => {\n  describe('getCanPin', () => {\n    it('should return true by default', () => {\n      const table = createRowPinningTable()\n      const row = table.getRow(ROW[0])\n\n      expect(row.getCanPin()).toBe(true)\n    })\n\n    it('should return false when enableRowPinning is false', () => {\n      const table = createRowPinningTable({\n        enableRowPinning: false,\n      })\n      const row = table.getRow(ROW[0])\n\n      expect(row.getCanPin()).toBe(false)\n    })\n\n    it('should use enableRowPinning function when provided', () => {\n      const table = createRowPinningTable({\n        enableRowPinning: (row: Row<any, any>) => row.id === ROW[1],\n      })\n\n      expect(table.getRow(ROW[0]).getCanPin()).toBe(false)\n      expect(table.getRow(ROW[1]).getCanPin()).toBe(true)\n    })\n  })\n\n  describe('getIsPinned', () => {\n    it('should return false when row is not pinned', () => {\n      const table = createRowPinningTable()\n      const row = table.getRow(ROW[0])\n\n      expect(row.getIsPinned()).toBe(false)\n    })\n\n    it('should return correct position when row is pinned', () => {\n      const table = createRowPinningTable({\n        initialState: {\n          rowPinning: {\n            top: [ROW[0]],\n            bottom: [ROW[1]],\n          },\n        },\n      })\n\n      expect(table.getRow(ROW[0]).getIsPinned()).toBe('top')\n      expect(table.getRow(ROW[1]).getIsPinned()).toBe('bottom')\n    })\n  })\n\n  describe('getPinnedIndex', () => {\n    it('should return -1 when row is not pinned', () => {\n      const table = createRowPinningTable()\n      const row = table.getRow(ROW[0])\n\n      expect(row.getPinnedIndex()).toBe(-1)\n    })\n\n    it('should return correct index for pinned rows', () => {\n      const table = createRowPinningTable({\n        initialState: {\n          rowPinning: {\n            top: [ROW[0], ROW[1]],\n            bottom: [ROW[2]],\n          },\n        },\n      })\n\n      expect(table.getRow(ROW[0]).getPinnedIndex()).toBe(0)\n      expect(table.getRow(ROW[1]).getPinnedIndex()).toBe(1)\n      expect(table.getRow(ROW[2]).getPinnedIndex()).toBe(0)\n    })\n  })\n\n  describe('pin', () => {\n    it('should call onRowPinningChange when pinning row', () => {\n      const { table, onRowPinningChangeMock } =\n        createTableWithMockOnPinningChange()\n      const row = table.getRow(ROW[0])\n\n      row.pin('top')\n\n      expect(onRowPinningChangeMock).toHaveBeenCalled()\n      // The exact call pattern would depend on row.pin implementation\n      // This test verifies the callback mechanism works\n    })\n\n    it('should call onRowPinningChange when unpinning row', () => {\n      const { table, onRowPinningChangeMock } =\n        createTableWithMockOnPinningChange()\n      // Set up initial state with a pinned row\n      table.baseStore.setState((old: any) => ({\n        ...old,\n        rowPinning: {\n          top: [ROW[0]],\n          bottom: [],\n        },\n      }))\n      const row = table.getRow(ROW[0])\n\n      row.pin(false)\n\n      expect(onRowPinningChangeMock).toHaveBeenCalled()\n    })\n\n    it('should call onRowPinningChange when including leaf rows', () => {\n      const { table, onRowPinningChangeMock } =\n        createTableWithMockOnPinningChange(10)\n      const row = table.getRow(ROW[0])\n\n      row.pin('top', true)\n\n      expect(onRowPinningChangeMock).toHaveBeenCalled()\n      // The callback should be invoked when pinning with leaf rows\n    })\n\n    it('should call onRowPinningChange when including parent rows', () => {\n      const { table, onRowPinningChangeMock } =\n        createTableWithMockOnPinningChange(10)\n      const row = table.getRow(ROW[0])\n\n      row.pin('top', false, true)\n\n      expect(onRowPinningChangeMock).toHaveBeenCalled()\n      // The callback should be invoked when pinning with parent rows\n    })\n  })\n})\n"
  },
  {
    "path": "packages/table-core/tests/implementation/features/row-selection/rowSelectionFeature.test.ts",
    "content": "import { describe, expect, it } from 'vitest'\nimport {\n  constructTable,\n  createColumnHelper,\n  rowSelectionFeature,\n} from '../../../../src'\nimport * as RowSelectionUtils from '../../../../src/features/row-selection/rowSelectionFeature.utils'\nimport { generateTestData } from '../../../fixtures/data/generateTestData'\nimport type { Person } from '../../../fixtures/data/types'\nimport type { ColumnDef } from '../../../../src'\n\n// TODO: bring up to new test structure\n\nconst _features = {\n  rowSelectionFeature,\n}\n\ntype personKeys = keyof Person\ntype PersonColumn = ColumnDef<typeof _features, Person, any>\n\nfunction generateColumnDefs(people: Array<Person>): Array<PersonColumn> {\n  const columnHelper = createColumnHelper<any, Person>()\n  const person = people[0]\n\n  if (!person) {\n    return []\n  }\n\n  return Object.keys(person).map((key) => {\n    const typedKey = key as personKeys\n    return columnHelper.accessor(typedKey, { id: typedKey })\n  })\n}\n\ndescribe('rowSelectionFeature', () => {\n  describe('selectRowsFn', () => {\n    it('should only return rows that are selected', () => {\n      const data = generateTestData(5)\n      const columns = generateColumnDefs(data)\n\n      const table = constructTable<typeof _features, Person>({\n        _features,\n        _rowModels: {},\n        enableRowSelection: true,\n        renderFallbackValue: '',\n        data,\n        getSubRows: (row) => row.subRows,\n        initialState: {\n          rowSelection: {\n            '0': true,\n            '2': true,\n          },\n        },\n        columns,\n      })\n      const rowModel = table.getCoreRowModel()\n\n      const result = RowSelectionUtils.selectRowsFn(rowModel)\n\n      expect(result.rows.length).toBe(2)\n      expect(result.flatRows.length).toBe(2)\n      expect(result.rowsById).toHaveProperty('0')\n      expect(result.rowsById).toHaveProperty('2')\n    })\n\n    it('should recurse into subRows and only return selected subRows', () => {\n      const data = generateTestData(3, 2) // assuming 3 parent rows with 2 sub-rows each\n      const columns = generateColumnDefs(data)\n\n      const table = constructTable<typeof _features, Person>({\n        _features,\n        _rowModels: {},\n        enableRowSelection: true,\n        renderFallbackValue: '',\n        data,\n        getSubRows: (row) => row.subRows,\n        initialState: {\n          rowSelection: {\n            '0': true,\n            '0.0': true,\n          },\n        },\n        columns,\n      })\n      const rowModel = table.getCoreRowModel()\n\n      const result = RowSelectionUtils.selectRowsFn(rowModel)\n\n      expect(result.rows[0]?.subRows?.length).toBe(1)\n      expect(result.flatRows.length).toBe(2)\n      expect(result.rowsById).toHaveProperty('0')\n      expect(result.rowsById).toHaveProperty('0.0')\n    })\n\n    it('should return an empty list if no rows are selected', () => {\n      const data = generateTestData(5)\n      const columns = generateColumnDefs(data)\n\n      const table = constructTable<typeof _features, Person>({\n        _features,\n        _rowModels: {},\n        enableRowSelection: true,\n        renderFallbackValue: '',\n        data,\n        getSubRows: (row) => row.subRows,\n        initialState: {\n          rowSelection: {},\n        },\n        columns,\n      })\n      const rowModel = table.getCoreRowModel()\n\n      const result = RowSelectionUtils.selectRowsFn(rowModel)\n\n      expect(result.rows.length).toBe(0)\n      expect(result.flatRows.length).toBe(0)\n      expect(result.rowsById).toEqual({})\n    })\n  })\n  describe('isRowSelected', () => {\n    it('should return true if the row id exists in selection and is set to true', () => {\n      const data = generateTestData(3)\n      const columns = generateColumnDefs(data)\n\n      const table = constructTable<typeof _features, Person>({\n        _features,\n        _rowModels: {},\n        enableRowSelection: true,\n        renderFallbackValue: '',\n        data,\n        initialState: {\n          rowSelection: {\n            '123': true,\n            '456': false,\n          },\n        },\n        columns,\n      })\n\n      const row = { id: '123', data: {}, table } as any\n\n      const result = RowSelectionUtils.isRowSelected(row)\n      expect(result).toEqual(true)\n    })\n\n    it('should return false if the row id exists in selection and is set to false', () => {\n      const data = generateTestData(3)\n      const columns = generateColumnDefs(data)\n\n      const table = constructTable<typeof _features, Person>({\n        _features,\n        _rowModels: {},\n        enableRowSelection: true,\n        renderFallbackValue: '',\n        data,\n        initialState: {\n          rowSelection: {\n            '123': true,\n            '456': false,\n          },\n        },\n        columns,\n      })\n\n      const row = { id: '456', data: {}, table } as any\n\n      const result = RowSelectionUtils.isRowSelected(row)\n      expect(result).toEqual(false)\n    })\n\n    it('should return false if the row id does not exist in selection', () => {\n      const data = generateTestData(3)\n      const columns = generateColumnDefs(data)\n\n      const table = constructTable<typeof _features, Person>({\n        _features,\n        _rowModels: {},\n        enableRowSelection: true,\n        renderFallbackValue: '',\n        data,\n        initialState: {\n          rowSelection: {\n            '123': true,\n            '456': false,\n          },\n        },\n        columns,\n      })\n\n      const row = { id: '789', data: {}, table } as any\n\n      const result = RowSelectionUtils.isRowSelected(row)\n      expect(result).toEqual(false)\n    })\n\n    it('should return false if selection is an empty object', () => {\n      const data = generateTestData(3)\n      const columns = generateColumnDefs(data)\n\n      const table = constructTable<typeof _features, Person>({\n        _features,\n        _rowModels: {},\n        enableRowSelection: true,\n        renderFallbackValue: '',\n        data,\n        initialState: {},\n        columns,\n      })\n\n      const row = { id: '789', data: {}, table } as any\n\n      const result = RowSelectionUtils.isRowSelected(row)\n      expect(result).toEqual(false)\n    })\n  })\n  describe('isSubRowSelected', () => {\n    it('should return false if there are no sub-rows', () => {\n      const data = generateTestData(3)\n      const columns = generateColumnDefs(data)\n\n      const table = constructTable<typeof _features, Person>({\n        _features,\n        _rowModels: {},\n        enableRowSelection: true,\n        renderFallbackValue: '',\n        data,\n        initialState: {},\n        columns,\n      })\n\n      const firstRow = table.getCoreRowModel().rows[0]!\n\n      const result = RowSelectionUtils.isSubRowSelected(firstRow)\n\n      expect(result).toEqual(false)\n    })\n\n    it('should return false if no sub-rows are selected', () => {\n      const data = generateTestData(3, 2)\n      const columns = generateColumnDefs(data)\n\n      const table = constructTable<typeof _features, Person>({\n        _features,\n        _rowModels: {},\n        enableRowSelection: true,\n        renderFallbackValue: '',\n        data,\n        getSubRows: (row) => row.subRows,\n        initialState: {\n          rowSelection: {},\n        },\n        columns,\n      })\n\n      const firstRow = table.getCoreRowModel().rows[0]!\n\n      const result = RowSelectionUtils.isSubRowSelected(firstRow)\n\n      expect(result).toEqual(false)\n    })\n\n    it('should return some if some sub-rows are selected', () => {\n      const data = generateTestData(3, 2)\n      const columns = generateColumnDefs(data)\n\n      const table = constructTable<typeof _features, Person>({\n        _features,\n        _rowModels: {},\n        enableRowSelection: true,\n        renderFallbackValue: '',\n        data,\n        getSubRows: (row) => row.subRows,\n        initialState: {\n          rowSelection: {\n            '0.0': true,\n          },\n        },\n        columns,\n      })\n\n      const firstRow = table.getCoreRowModel().rows[0]!\n\n      const result = RowSelectionUtils.isSubRowSelected(firstRow)\n\n      expect(result).toEqual('some')\n    })\n\n    it('should return all if all sub-rows are selected', () => {\n      const data = generateTestData(3, 2)\n      const columns = generateColumnDefs(data)\n\n      const table = constructTable<typeof _features, Person>({\n        _features,\n        _rowModels: {},\n        enableRowSelection: true,\n        renderFallbackValue: '',\n        data,\n        getSubRows: (row) => row.subRows,\n        initialState: {\n          rowSelection: {\n            '0.0': true,\n            '0.1': true,\n          },\n        },\n        columns,\n      })\n\n      const firstRow = table.getCoreRowModel().rows[0]!\n\n      const result = RowSelectionUtils.isSubRowSelected(firstRow)\n\n      expect(result).toEqual('all')\n    })\n    it('should return all if all selectable sub-rows are selected', () => {\n      const data = generateTestData(3, 2)\n      const columns = generateColumnDefs(data)\n\n      const table = constructTable<typeof _features, Person>({\n        _features,\n        _rowModels: {},\n        enableRowSelection: (row) => row.index === 0, // only first row is selectable (of 2 sub-rows)\n        renderFallbackValue: '',\n        data,\n        getSubRows: (row) => row.subRows,\n        initialState: {\n          rowSelection: {\n            '0.0': true, // first sub-row\n          },\n        },\n        columns,\n      })\n\n      const firstRow = table.getCoreRowModel().rows[0]!\n\n      const result = RowSelectionUtils.isSubRowSelected(firstRow)\n\n      expect(result).toEqual('all')\n    })\n    it('should return some when some nested sub-rows are selected', () => {\n      const data = generateTestData(3, 2, 2)\n      const columns = generateColumnDefs(data)\n\n      const table = constructTable<typeof _features, Person>({\n        _features,\n        _rowModels: {},\n        enableRowSelection: true,\n        renderFallbackValue: '',\n        data,\n        getSubRows: (row) => row.subRows,\n        initialState: {\n          rowSelection: {\n            '0.0.0': true, // first nested sub-row\n          },\n        },\n        columns,\n      })\n\n      const firstRow = table.getCoreRowModel().rows[0]!\n\n      const result = RowSelectionUtils.isSubRowSelected(firstRow)\n\n      expect(result).toEqual('some')\n    })\n  })\n})\n"
  },
  {
    "path": "packages/table-core/tests/performance/features/column-grouping/columnGroupingFeature.test.ts",
    "content": "import { describe, expect, it } from 'vitest'\nimport {\n  aggregationFns,\n  columnGroupingFeature,\n  constructTable,\n  coreFeatures,\n  createGroupedRowModel,\n} from '../../../../src'\nimport { createColumnHelper } from '../../../../src/helpers/columnHelper'\nimport { generateTestData } from '../../../fixtures/data/generateTestData'\nimport type { Person } from '../../../fixtures/data/types'\nimport type { ColumnDef } from '../../../../src'\n\n// TODO: bring up to new test structure\n\ntype personKeys = keyof Person\ntype PersonColumn = ColumnDef<any, Person, any>\n\nfunction generateColumns(people: Array<Person>): Array<PersonColumn> {\n  const columnHelper = createColumnHelper<any, Person>()\n  const person = people[0]\n\n  if (!person) {\n    return []\n  }\n\n  return Object.keys(person).map((key) => {\n    const typedKey = key as personKeys\n    return columnHelper.accessor(typedKey, { id: typedKey })\n  })\n}\n\ndescribe('#getGroupedRowModel', () => {\n  it('groups 50k rows and 3 grouped columns with clustered data in less than 5 seconds', () => {\n    const data = generateTestData(50000)\n    const columns = generateColumns(data)\n    const grouping = ['firstName', 'lastName', 'age']\n    const start = new Date()\n\n    data.forEach((p) => (p.firstName = 'Fixed'))\n    data.forEach((p) => (p.lastName = 'Name'))\n    data.forEach((p) => (p.age = 123))\n\n    const table = constructTable<any, Person>({\n      _features: { columnGroupingFeature, ...coreFeatures },\n      _rowModels: {\n        groupedRowModel: createGroupedRowModel(aggregationFns),\n      },\n      onStateChange() {},\n      renderFallbackValue: '',\n      data,\n      initialState: { grouping },\n      columns,\n    })\n    const groupedById = table.getGroupedRowModel().rowsById\n    const end = new Date()\n\n    expect(groupedById['firstName:Fixed']?.getLeafRows().length).toEqual(50002)\n    expect(\n      groupedById['firstName:Fixed>lastName:Name']?.getLeafRows().length,\n    ).toEqual(50001)\n    expect(\n      groupedById['firstName:Fixed>lastName:Name>age:123']?.getLeafRows()\n        .length,\n    ).toEqual(50000)\n    expect(end.valueOf() - start.valueOf()).toBeLessThan(5000)\n  })\n})\n"
  },
  {
    "path": "packages/table-core/tests/unit/core/cells/constructCell.test.ts",
    "content": "import { describe, expect, it } from 'vitest'\nimport { constructCell } from '../../../../src/core/cells/constructCell'\nimport { coreCellsFeature } from '../../../../src/core/cells/coreCellsFeature'\nimport type { Row } from '../../../../src/types/Row'\nimport type { Column } from '../../../../src/types/Column'\nimport type { Table } from '../../../../src/types/Table'\n\ndescribe('constructCell', () => {\n  it('should populate the cell with all core cell APIs and properties', () => {\n    const column = { id: 'test-column' } as Column<any, any>\n    const row = { id: 'test-row' } as Row<any, any>\n    const table = { _features: { coreCellsFeature }, options: {} } as Table<\n      any,\n      any\n    >\n    const coreCell = constructCell(column, row, table)\n\n    expect(coreCell).toBeDefined()\n    expect(coreCell).toHaveProperty('column')\n    expect(coreCell).toHaveProperty('id')\n    expect(coreCell).toHaveProperty('row')\n    expect(coreCell).toHaveProperty('getContext')\n    expect(coreCell).toHaveProperty('getValue')\n    expect(coreCell).toHaveProperty('renderValue')\n\n    expect(coreCell.id).toBe(`${row.id}_${column.id}`)\n    expect(coreCell.column).toBe(column)\n    expect(coreCell.row).toBe(row)\n  })\n})\n"
  },
  {
    "path": "packages/table-core/tests/unit/core/columns/constructColumn.test.ts",
    "content": "import { describe, expect, it } from 'vitest'\nimport { coreColumnsFeature } from '../../../../src/core/columns/coreColumnsFeature'\nimport { constructColumn } from '../../../../src/core/columns/constructColumn'\nimport { constructTable } from '../../../../src'\nimport type { ColumnDef } from '../../../../src/types/ColumnDef'\n\ndescribe('constructColumn', () => {\n  it('should create a column with all core column APIs and properties', () => {\n    const table = constructTable({\n      _features: { coreColumnsFeature },\n      columns: [] as Array<any>,\n      data: [] as Array<any>,\n    })\n\n    const columnDef = {\n      id: 'test-column',\n      accessorKey: 'test-accessor-key',\n    } as ColumnDef<any, any>\n    const depth = 0\n    const parent = undefined\n\n    const column = constructColumn(table as any, columnDef, depth, parent)\n\n    expect(column).toBeDefined()\n    expect(column).toHaveProperty('accessorFn')\n    expect(column).toHaveProperty('columnDef')\n    expect(column).toHaveProperty('columns')\n    expect(column).toHaveProperty('depth')\n    expect(column).toHaveProperty('id')\n    expect(column).toHaveProperty('parent')\n    expect(column).toHaveProperty('getFlatColumns')\n    expect(column).toHaveProperty('getLeafColumns')\n\n    expect(column.id).toBe(columnDef.id)\n    expect(column.depth).toBe(depth)\n    expect(column.parent).toBe(parent)\n  })\n})\n"
  },
  {
    "path": "packages/table-core/tests/unit/core/headers/constructHeader.test.ts",
    "content": "import { describe, expect, it } from 'vitest'\nimport { coreHeadersFeature } from '../../../../src/core/headers/coreHeadersFeature'\nimport { constructHeader } from '../../../../src/core/headers/constructHeader'\nimport type { Column } from '../../../../src/types/Column'\nimport type { Table } from '../../../../src/types/Table'\n\ndescribe('constructHeader', () => {\n  it('should create a column with all core column APIs and properties', () => {\n    const table = { _features: { coreHeadersFeature }, options: {} } as Table<\n      any,\n      any\n    >\n    const column = {\n      id: 'test-column',\n      columnDef: { id: 'test-column-def' },\n    } as Column<any, any>\n    const index = 0\n    const depth = 0\n\n    const header = constructHeader(table, column, {\n      index,\n      depth,\n    })\n\n    expect(header).toBeDefined()\n    expect(header).toHaveProperty('colSpan')\n    expect(header).toHaveProperty('column')\n    expect(header).toHaveProperty('depth')\n    expect(header).toHaveProperty('headerGroup')\n    expect(header).toHaveProperty('id')\n    expect(header).toHaveProperty('index')\n    expect(header).toHaveProperty('isPlaceholder')\n    expect(header).toHaveProperty('placeholderId')\n    expect(header).toHaveProperty('rowSpan')\n    expect(header).toHaveProperty('subHeaders')\n    expect(header).toHaveProperty('getContext')\n    expect(header).toHaveProperty('getLeafHeaders')\n\n    expect(header.id).toBe(column.id)\n  })\n})\n"
  },
  {
    "path": "packages/table-core/tests/unit/core/rows/constructRow.test.ts",
    "content": "import { describe, expect, it } from 'vitest'\nimport { coreRowsFeature } from '../../../../src/core/rows/coreRowsFeature'\nimport { constructRow } from '../../../../src/core/rows/constructRow'\nimport type { Table } from '../../../../src/types/Table'\nimport type { Row } from '../../../../src/types/Row'\n\ninterface Person {\n  firstName: string\n}\n\ndescribe('constructRow', () => {\n  it('should create a row with all core row APIs and properties', () => {\n    const table = { _features: { coreRowsFeature }, options: {} } as Table<\n      any,\n      Person\n    >\n    const id = 'test-row'\n    const original = { firstName: 'Tanner' } as Person\n    const rowIndex = 0\n    const depth = 0\n    const subRows = [] as Array<Row<any, Person>>\n    const parentId = 'parent-id'\n\n    const row = constructRow(\n      table,\n      id,\n      original,\n      rowIndex,\n      depth,\n      subRows,\n      parentId,\n    )\n\n    expect(row).toBeDefined()\n    expect(row).toHaveProperty('_uniqueValuesCache')\n    expect(row).toHaveProperty('_valuesCache')\n    expect(row).toHaveProperty('depth')\n    expect(row).toHaveProperty('id')\n    expect(row).toHaveProperty('index')\n    expect(row).toHaveProperty('original')\n    expect(row).toHaveProperty('parentId')\n    expect(row).toHaveProperty('subRows')\n    expect(row).toHaveProperty('getAllCellsByColumnId')\n    expect(row).toHaveProperty('getAllCells')\n    expect(row).toHaveProperty('getLeafRows')\n    expect(row).toHaveProperty('getParentRow')\n    expect(row).toHaveProperty('getParentRows')\n    expect(row).toHaveProperty('getUniqueValues')\n    expect(row).toHaveProperty('getValue')\n    expect(row).toHaveProperty('renderValue')\n\n    expect(row.id).toBe(id)\n    expect(row.original).toBe(original)\n    expect(row.index).toBe(rowIndex)\n    expect(row.depth).toBe(depth)\n    expect(row.subRows).toBe(subRows)\n    expect(row.parentId).toBe(parentId)\n  })\n})\n"
  },
  {
    "path": "packages/table-core/tests/unit/core/table/constructTable.test.ts",
    "content": "import { describe, expect, it } from 'vitest'\nimport { constructTable, coreFeatures } from '../../../../src'\n\ndescribe('constructTable', () => {\n  it('should create a table with all core table APIs and properties', () => {\n    const table = constructTable({\n      _features: {\n        ...coreFeatures,\n      },\n      columns: [],\n      data: [],\n    })\n\n    expect(table).toBeDefined()\n    // core table properties\n    expect(table).toHaveProperty('_features')\n    expect(table).toHaveProperty('_rowModelFns')\n    expect(table).toHaveProperty('_rowModels')\n    expect(table).toHaveProperty('initialState')\n    expect(table).toHaveProperty('options')\n\n    // column related table APIs\n    expect(table).toHaveProperty('getAllFlatColumnsById')\n    expect(table).toHaveProperty('getDefaultColumnDef')\n    expect(table).toHaveProperty('getAllColumns')\n    expect(table).toHaveProperty('getAllFlatColumns')\n    expect(table).toHaveProperty('getAllLeafColumns')\n    expect(table).toHaveProperty('getColumn')\n\n    // header related table APIs\n    expect(table).toHaveProperty('getHeaderGroups')\n    expect(table).toHaveProperty('getFooterGroups')\n    expect(table).toHaveProperty('getFlatHeaders')\n    expect(table).toHaveProperty('getLeafHeaders')\n\n    // row related table APIs\n    expect(table).toHaveProperty('getRowId')\n    expect(table).toHaveProperty('getRow')\n\n    // table APIs\n    expect(table).toHaveProperty('getCoreRowModel')\n    expect(table).toHaveProperty('getRowModel')\n    expect(table).toHaveProperty('reset')\n    expect(table).toHaveProperty('setOptions')\n    expect(table).toHaveProperty('store') // state is managed via store in v9\n  })\n})\n"
  },
  {
    "path": "packages/table-core/tests/unit/features/column-ordering/columnOrderingFeature.utils.test.ts",
    "content": "import { describe, expect, it, vi } from 'vitest'\nimport { generateTestTableWithData } from '../../../helpers/generateTestTable'\nimport {\n  column_getIndex,\n  column_getIsFirstColumn,\n  column_getIsLastColumn,\n  getDefaultColumnOrderState,\n  orderColumns,\n  table_getOrderColumnsFn,\n  table_resetColumnOrder,\n  table_setColumnOrder,\n} from '../../../../src/features/column-ordering/columnOrderingFeature.utils'\nimport type { TableFeatures } from '../../../../src'\n\ndescribe('getDefaultColumnOrderState', () => {\n  it('should return an empty array', () => {\n    expect(getDefaultColumnOrderState()).toEqual([])\n  })\n})\n\ndescribe('column_getIndex', () => {\n  it('should return correct index for a column', () => {\n    const table = generateTestTableWithData<TableFeatures>(3)\n    const column = table.getAllLeafColumns()[1]!\n\n    expect(column_getIndex(column)).toBe(1)\n  })\n\n  it('should return -1 for non-existent column', () => {\n    const table = generateTestTableWithData<TableFeatures>(3)\n    const column = {\n      ...table.getAllLeafColumns()[0],\n      id: 'non-existent',\n      table,\n    }\n\n    expect(column_getIndex(column)).toBe(-1)\n  })\n})\n\ndescribe('column_getIsFirstColumn', () => {\n  it('should return true for first column', () => {\n    const table = generateTestTableWithData<TableFeatures>(3)\n    const firstColumn = table.getAllLeafColumns()[0]!\n\n    expect(column_getIsFirstColumn(firstColumn)).toBe(true)\n  })\n\n  it('should return false for non-first column', () => {\n    const table = generateTestTableWithData<TableFeatures>(3)\n    const secondColumn = table.getAllLeafColumns()[1]!\n\n    expect(column_getIsFirstColumn(secondColumn)).toBe(false)\n  })\n})\n\ndescribe('column_getIsLastColumn', () => {\n  it('should return true for last column', () => {\n    const table = generateTestTableWithData<TableFeatures>(3)\n    const columns = table.getAllLeafColumns()\n    const lastColumn = columns[columns.length - 1]!\n\n    expect(column_getIsLastColumn(lastColumn)).toBe(true)\n  })\n\n  it('should return false for non-last column', () => {\n    const table = generateTestTableWithData<TableFeatures>(3)\n    const firstColumn = table.getAllLeafColumns()[0]!\n\n    expect(column_getIsLastColumn(firstColumn)).toBe(false)\n  })\n})\n\ndescribe('table_setColumnOrder', () => {\n  it('should call onColumnOrderChange with updater', () => {\n    const onColumnOrderChange = vi.fn()\n    const table = generateTestTableWithData<TableFeatures>(3, {\n      onColumnOrderChange,\n    })\n    const newOrder = ['col1', 'col2']\n\n    table_setColumnOrder(table, newOrder)\n\n    expect(onColumnOrderChange).toHaveBeenCalledWith(newOrder)\n  })\n})\n\ndescribe('table_resetColumnOrder', () => {\n  it('should reset to empty array when defaultState is true', () => {\n    const onColumnOrderChange = vi.fn()\n    const table = generateTestTableWithData<TableFeatures>(3, {\n      onColumnOrderChange,\n    })\n\n    table_resetColumnOrder(table, true)\n\n    expect(onColumnOrderChange).toHaveBeenCalledWith([])\n  })\n\n  it('should reset to initialState when defaultState is false', () => {\n    const initialColumnOrder = ['col1', 'col2']\n    const onColumnOrderChange = vi.fn()\n    const table = generateTestTableWithData<TableFeatures>(3, {\n      onColumnOrderChange,\n      initialState: { columnOrder: initialColumnOrder },\n    })\n\n    table_resetColumnOrder(table, false)\n\n    expect(onColumnOrderChange).toHaveBeenCalledWith(initialColumnOrder)\n  })\n})\n\ndescribe('table_getOrderColumnsFn', () => {\n  it('should return original columns when no column order is specified', () => {\n    const table = generateTestTableWithData<TableFeatures>(3)\n    const columns = table.getAllLeafColumns()\n    const orderFn = table_getOrderColumnsFn(table)\n\n    expect(orderFn(columns)).toEqual(columns)\n  })\n\n  it('should reorder columns according to columnOrder', () => {\n    const table = generateTestTableWithData<TableFeatures>(3, {\n      initialState: {\n        columnOrder: ['lastName', 'firstName'],\n      },\n    })\n    const columns = table.getAllLeafColumns()\n    const orderFn = table_getOrderColumnsFn(table)\n    const orderedColumns = orderFn(columns)\n\n    expect(orderedColumns[0]?.id).toBe('lastName')\n    expect(orderedColumns[1]?.id).toBe('firstName')\n  })\n})\n\ndescribe('orderColumns', () => {\n  it('should return original columns when no grouping is present', () => {\n    const table = generateTestTableWithData<TableFeatures>(3)\n    const columns = table.getAllLeafColumns()\n\n    expect(orderColumns(table, columns)).toEqual(columns)\n  })\n\n  it('should remove grouped columns when groupedColumnMode is \"remove\"', () => {\n    const table = generateTestTableWithData<TableFeatures>(3, {\n      initialState: {\n        grouping: ['firstName'],\n      },\n      groupedColumnMode: 'remove',\n    })\n    const columns = table.getAllLeafColumns()\n    const orderedColumns = orderColumns(table, columns)\n\n    expect(orderedColumns.find((col) => col.id === 'firstName')).toBeUndefined()\n  })\n\n  it('should move grouped columns to start when groupedColumnMode is \"reorder\"', () => {\n    const table = generateTestTableWithData<TableFeatures>(3, {\n      initialState: {\n        grouping: ['lastName'],\n      },\n      groupedColumnMode: 'reorder',\n    })\n    const columns = table.getAllLeafColumns()\n    const orderedColumns = orderColumns(table, columns)\n\n    expect(orderedColumns[0]?.id).toBe('lastName')\n  })\n})\n"
  },
  {
    "path": "packages/table-core/tests/unit/features/column-pinning/columnPinningFeature.utils.test.ts",
    "content": "import { describe, expect, it, vi } from 'vitest'\nimport {\n  column_getCanPin,\n  column_getIsPinned,\n  column_getPinnedIndex,\n  column_pin,\n  getDefaultColumnPinningState,\n  row_getCenterVisibleCells,\n  row_getLeftVisibleCells,\n  row_getRightVisibleCells,\n  table_getCenterFlatHeaders,\n  table_getCenterFooterGroups,\n  table_getCenterHeaderGroups,\n  table_getCenterLeafColumns,\n  table_getIsSomeColumnsPinned,\n  table_getLeftFlatHeaders,\n  table_getLeftFooterGroups,\n  table_getLeftHeaderGroups,\n  table_getLeftLeafColumns,\n  table_getPinnedLeafColumns,\n  table_getPinnedVisibleLeafColumns,\n  table_getRightFlatHeaders,\n  table_getRightFooterGroups,\n  table_getRightHeaderGroups,\n  table_getRightLeafColumns,\n  table_getVisibleLeafColumns,\n  table_resetColumnPinning,\n  table_setColumnPinning,\n} from '../../../../src'\nimport { generateTestTableWithData } from '../../../helpers/generateTestTable'\nimport { getUpdaterResult } from '../../../helpers/testUtils'\nimport type { Header } from '../../../../src'\n\ndescribe('getDefaultColumnPinningState', () => {\n  it('should return default column pinning state', () => {\n    const result = getDefaultColumnPinningState()\n    expect(result).toEqual({\n      left: [],\n      right: [],\n    })\n  })\n})\n\ndescribe('column_pin', () => {\n  it('should pin column to the left', () => {\n    const onColumnPinningChange = vi.fn()\n    const table = generateTestTableWithData(1, {\n      onColumnPinningChange,\n      initialState: {\n        columnPinning: {\n          left: [],\n          right: [],\n        },\n      },\n    })\n    const column = table.getAllColumns()[0]!\n\n    column_pin(column, 'left')\n\n    const result = getUpdaterResult(onColumnPinningChange, {\n      left: [],\n      right: [],\n    })\n\n    expect(result).toEqual({\n      left: [column.id],\n      right: [],\n    })\n  })\n\n  it('should pin column to the right', () => {\n    const onColumnPinningChange = vi.fn()\n    const table = generateTestTableWithData(1, {\n      onColumnPinningChange,\n      initialState: {\n        columnPinning: {\n          left: [],\n          right: [],\n        },\n      },\n    })\n    const column = table.getAllColumns()[0]!\n\n    column_pin(column, 'right')\n\n    const result = getUpdaterResult(onColumnPinningChange, {\n      left: [],\n      right: [],\n    })\n\n    expect(result).toEqual({\n      left: [],\n      right: [column.id],\n    })\n  })\n\n  it('should unpin column when false is passed', () => {\n    const onColumnPinningChange = vi.fn()\n    const table = generateTestTableWithData(1, {\n      onColumnPinningChange,\n      initialState: {\n        columnPinning: {\n          left: ['id'],\n          right: [],\n        },\n      },\n    })\n    const column = table.getColumn('id')!\n\n    column_pin(column, false)\n\n    const result = getUpdaterResult(onColumnPinningChange, {\n      left: ['id'],\n      right: [],\n    })\n\n    expect(result).toEqual({\n      left: [],\n      right: [],\n    })\n  })\n})\n\ndescribe('column_getCanPin', () => {\n  it('should return true when column pinning is enabled', () => {\n    const table = generateTestTableWithData(1)\n    const column = table.getAllColumns()[0]\n\n    const result = column_getCanPin(column)\n\n    expect(result).toBe(true)\n  })\n\n  it('should return false when column pinning is disabled globally', () => {\n    const table = generateTestTableWithData(1, {\n      enableColumnPinning: false,\n    })\n    const column = table.getAllColumns()[0]\n\n    const result = column_getCanPin(column)\n\n    expect(result).toBe(false)\n  })\n\n  it('should return false when column pinning is disabled for specific column', () => {\n    const table = generateTestTableWithData(1)\n    const column = {\n      ...table.getAllColumns()[0],\n      columnDef: { enablePinning: false },\n      table: table,\n      getLeafColumns: () => [\n        {\n          ...table.getAllColumns()[0],\n          columnDef: { enablePinning: false },\n        },\n      ],\n    }\n\n    const result = column_getCanPin(column)\n\n    expect(result).toBe(false)\n  })\n})\n\ndescribe('column_getIsPinned', () => {\n  it('should return left when column is pinned left', () => {\n    const table = generateTestTableWithData(1, {\n      initialState: {\n        columnPinning: {\n          left: ['firstName'],\n          right: [],\n        },\n      },\n    })\n    const column = table.getColumn('firstName')!\n\n    const result = column_getIsPinned(column)\n\n    expect(result).toBe('left')\n  })\n\n  it('should return right when column is pinned right', () => {\n    const table = generateTestTableWithData(1, {\n      initialState: {\n        columnPinning: {\n          left: [],\n          right: ['firstName'],\n        },\n      },\n    })\n    const column = table.getColumn('firstName')!\n\n    const result = column_getIsPinned(column)\n\n    expect(result).toBe('right')\n  })\n\n  it('should return false when column is not pinned', () => {\n    const table = generateTestTableWithData(1)\n    const column = table.getColumn('firstName')!\n\n    const result = column_getIsPinned(column)\n\n    expect(result).toBe(false)\n  })\n})\n\ndescribe('table_setColumnPinning', () => {\n  it('should call onColumnPinningChange with updater', () => {\n    const onColumnPinningChange = vi.fn()\n    const table = generateTestTableWithData(1, {\n      onColumnPinningChange,\n    })\n\n    table_setColumnPinning(table, {\n      left: ['firstName'],\n      right: [],\n    })\n\n    expect(onColumnPinningChange).toHaveBeenCalledWith({\n      left: ['firstName'],\n      right: [],\n    })\n  })\n})\n\ndescribe('table_resetColumnPinning', () => {\n  it('should reset to default state when defaultState is true', () => {\n    const onColumnPinningChange = vi.fn()\n    const table = generateTestTableWithData(1, {\n      onColumnPinningChange,\n    })\n\n    table_resetColumnPinning(table, true)\n\n    expect(onColumnPinningChange).toHaveBeenCalledWith({\n      left: [],\n      right: [],\n    })\n  })\n\n  it('should reset to initial state when defaultState is false', () => {\n    const onColumnPinningChange = vi.fn()\n    const initialState = {\n      columnPinning: {\n        left: ['firstName'],\n        right: [],\n      },\n    }\n    const table = generateTestTableWithData(1, {\n      onColumnPinningChange,\n      initialState,\n    })\n\n    table_resetColumnPinning(table, false)\n\n    expect(onColumnPinningChange).toHaveBeenCalledWith({\n      left: ['firstName'],\n      right: [],\n    })\n  })\n})\n\ndescribe('table_getIsSomeColumnsPinned', () => {\n  it('should return true when columns are pinned left', () => {\n    const table = generateTestTableWithData(1, {\n      initialState: {\n        columnPinning: {\n          left: ['firstName'],\n          right: [],\n        },\n      },\n    })\n\n    const result = table_getIsSomeColumnsPinned(table)\n\n    expect(result).toBe(true)\n  })\n\n  it('should return true when columns are pinned right', () => {\n    const table = generateTestTableWithData(1, {\n      initialState: {\n        columnPinning: {\n          left: [],\n          right: ['firstName'],\n        },\n      },\n    })\n\n    const result = table_getIsSomeColumnsPinned(table)\n\n    expect(result).toBe(true)\n  })\n\n  it('should return false when no columns are pinned', () => {\n    const table = generateTestTableWithData(1)\n\n    const result = table_getIsSomeColumnsPinned(table)\n\n    expect(result).toBe(false)\n  })\n\n  it('should check specific position when position parameter is provided', () => {\n    const table = generateTestTableWithData(1, {\n      initialState: {\n        columnPinning: {\n          left: ['firstName'],\n          right: [],\n        },\n      },\n    })\n\n    expect(table_getIsSomeColumnsPinned(table, 'left')).toBe(true)\n    expect(table_getIsSomeColumnsPinned(table, 'right')).toBe(false)\n  })\n})\n\ndescribe('column_getPinnedIndex', () => {\n  it('should return index of pinned column', () => {\n    const table = generateTestTableWithData(2, {\n      initialState: {\n        columnPinning: {\n          left: ['firstName', 'lastName'],\n          right: [],\n        },\n      },\n    })\n    const column = table.getColumn('lastName')!\n\n    const result = column_getPinnedIndex(column)\n\n    expect(result).toBe(1)\n  })\n\n  it('should return 0 when column is not pinned', () => {\n    const table = generateTestTableWithData(1)\n    const column = table.getColumn('firstName')!\n\n    const result = column_getPinnedIndex(column)\n\n    expect(result).toBe(0)\n  })\n})\n\ndescribe('row_getCenterVisibleCells', () => {\n  it('should return only unpinned visible cells', () => {\n    const table = generateTestTableWithData(1, {\n      initialState: {\n        columnPinning: {\n          left: ['firstName'],\n          right: ['lastName'],\n        },\n      },\n    })\n    const row = table.getRowModel().rows[0]!\n\n    const centerCells = row_getCenterVisibleCells(row)\n\n    expect(centerCells.map((cell) => cell.column.id)).not.toContain('firstName')\n    expect(centerCells.map((cell) => cell.column.id)).not.toContain('lastName')\n    expect(centerCells.length).toBeGreaterThan(0)\n  })\n})\n\ndescribe('row_getLeftVisibleCells', () => {\n  it('should return only left pinned cells', () => {\n    const table = generateTestTableWithData(1, {\n      initialState: {\n        columnPinning: {\n          left: ['firstName'],\n          right: ['lastName'],\n        },\n      },\n    })\n    const row = table.getRowModel().rows[0]!\n\n    const leftCells = row_getLeftVisibleCells(row)\n\n    expect(leftCells).toHaveLength(1)\n    expect(leftCells[0]?.column.id).toBe('firstName')\n  })\n\n  it('should return empty array when no columns are pinned left', () => {\n    const table = generateTestTableWithData(1)\n    const row = table.getRowModel().rows[0]!\n\n    const leftCells = row_getLeftVisibleCells(row)\n\n    expect(leftCells).toHaveLength(0)\n  })\n})\n\ndescribe('row_getRightVisibleCells', () => {\n  it('should return only right pinned cells', () => {\n    const table = generateTestTableWithData(1, {\n      initialState: {\n        columnPinning: {\n          left: ['firstName'],\n          right: ['lastName'],\n        },\n      },\n    })\n    const row = table.getRowModel().rows[0]!\n\n    const rightCells = row_getRightVisibleCells(row)\n\n    expect(rightCells).toHaveLength(1)\n    expect(rightCells[0]?.column.id).toBe('lastName')\n  })\n\n  it('should return empty array when no columns are pinned right', () => {\n    const table = generateTestTableWithData(1)\n    const row = table.getRowModel().rows[0]!\n\n    const rightCells = row_getRightVisibleCells(row)\n\n    expect(rightCells).toHaveLength(0)\n  })\n})\n\ndescribe('table_getLeftHeaderGroups', () => {\n  it('should return header groups for left pinned columns', () => {\n    const table = generateTestTableWithData(1, {\n      initialState: {\n        columnPinning: {\n          left: ['firstName'],\n          right: [],\n        },\n      },\n    })\n\n    const headerGroups = table_getLeftHeaderGroups(table)\n\n    expect(headerGroups[0]?.headers[0]?.column.id).toBe('firstName')\n  })\n})\n\ndescribe('table_getRightHeaderGroups', () => {\n  it('should return header groups for right pinned columns', () => {\n    const table = generateTestTableWithData(1, {\n      initialState: {\n        columnPinning: {\n          left: [],\n          right: ['lastName'],\n        },\n      },\n    })\n\n    const headerGroups = table_getRightHeaderGroups(table)\n\n    expect(headerGroups[0]?.headers[0]?.column.id).toBe('lastName')\n  })\n})\n\ndescribe('table_getCenterHeaderGroups', () => {\n  it('should return header groups for unpinned columns', () => {\n    const table = generateTestTableWithData(1, {\n      initialState: {\n        columnPinning: {\n          left: ['firstName'],\n          right: ['lastName'],\n        },\n      },\n    })\n\n    const headerGroups = table_getCenterHeaderGroups(table)\n    const centerColumnIds = headerGroups[0]?.headers.map(\n      (header: Header<any, any>) => header.column.id,\n    )\n\n    expect(centerColumnIds).not.toContain('firstName')\n    expect(centerColumnIds).not.toContain('lastName')\n    expect(headerGroups[0]?.headers.length).toBeGreaterThan(0)\n  })\n})\n\ndescribe('table_getLeftLeafColumns', () => {\n  it('should return left pinned leaf columns', () => {\n    const table = generateTestTableWithData(1, {\n      initialState: {\n        columnPinning: {\n          left: ['firstName'],\n          right: [],\n        },\n      },\n    })\n\n    const leafColumns = table_getLeftLeafColumns(table)\n\n    expect(leafColumns).toHaveLength(1)\n    expect(leafColumns[0]?.id).toBe('firstName')\n  })\n})\n\ndescribe('table_getRightLeafColumns', () => {\n  it('should return right pinned leaf columns', () => {\n    const table = generateTestTableWithData(1, {\n      initialState: {\n        columnPinning: {\n          left: [],\n          right: ['lastName'],\n        },\n      },\n    })\n\n    const leafColumns = table_getRightLeafColumns(table)\n\n    expect(leafColumns).toHaveLength(1)\n    expect(leafColumns[0]?.id).toBe('lastName')\n  })\n})\n\ndescribe('table_getCenterLeafColumns', () => {\n  it('should return unpinned leaf columns', () => {\n    const table = generateTestTableWithData(1, {\n      initialState: {\n        columnPinning: {\n          left: ['firstName'],\n          right: ['lastName'],\n        },\n      },\n    })\n\n    const leafColumns = table_getCenterLeafColumns(table)\n    const centerColumnIds = leafColumns.map((col) => col.id)\n\n    expect(centerColumnIds).not.toContain('firstName')\n    expect(centerColumnIds).not.toContain('lastName')\n    expect(leafColumns.length).toBeGreaterThan(0)\n  })\n})\n\ndescribe('table_getPinnedLeafColumns', () => {\n  it('should return left pinned leaf columns when position is left', () => {\n    const table = generateTestTableWithData(1, {\n      initialState: {\n        columnPinning: {\n          left: ['firstName'],\n          right: [],\n        },\n      },\n    })\n\n    const leafColumns = table_getPinnedLeafColumns(table, 'left')\n\n    expect(leafColumns).toHaveLength(1)\n    expect(leafColumns[0]?.id).toBe('firstName')\n  })\n\n  it('should return right pinned leaf columns when position is right', () => {\n    const table = generateTestTableWithData(1, {\n      initialState: {\n        columnPinning: {\n          left: [],\n          right: ['lastName'],\n        },\n      },\n    })\n\n    const leafColumns = table_getPinnedLeafColumns(table, 'right')\n\n    expect(leafColumns).toHaveLength(1)\n    expect(leafColumns[0]?.id).toBe('lastName')\n  })\n\n  it('should return center leaf columns when position is center', () => {\n    const table = generateTestTableWithData(1, {\n      initialState: {\n        columnPinning: {\n          left: ['firstName'],\n          right: ['lastName'],\n        },\n      },\n    })\n\n    const leafColumns = table_getPinnedLeafColumns(table, 'center')\n\n    expect(leafColumns.length).toBeGreaterThan(0)\n    expect(leafColumns.map((col) => col.id)).not.toContain('firstName')\n    expect(leafColumns.map((col) => col.id)).not.toContain('lastName')\n  })\n})\n\ndescribe('table_getPinnedVisibleLeafColumns', () => {\n  it('should return visible leaf columns for specified position', () => {\n    const table = generateTestTableWithData(1, {\n      initialState: {\n        columnPinning: {\n          left: ['firstName'],\n          right: ['lastName'],\n        },\n        columnVisibility: {\n          age: false,\n        },\n      },\n    })\n\n    const leftColumns = table_getPinnedVisibleLeafColumns(table, 'left')\n    const rightColumns = table_getPinnedVisibleLeafColumns(table, 'right')\n    const centerColumns = table_getPinnedVisibleLeafColumns(table, 'center')\n\n    expect(leftColumns[0]?.id).toBe('firstName')\n    expect(rightColumns[0]?.id).toBe('lastName')\n    expect(centerColumns.map((col) => col.id)).not.toContain('age')\n  })\n\n  it('should return all visible leaf columns when no position specified', () => {\n    const table = generateTestTableWithData(1, {\n      initialState: {\n        columnVisibility: {\n          age: false,\n        },\n      },\n    })\n\n    const leafColumns = table_getPinnedVisibleLeafColumns(table)\n\n    expect(leafColumns.map((col) => col.id)).not.toContain('age')\n    expect(leafColumns.length).toBe(table_getVisibleLeafColumns(table).length)\n  })\n})\n\ndescribe('table_getFooterGroups', () => {\n  it('should return footer groups for left pinned columns', () => {\n    const table = generateTestTableWithData(1, {\n      initialState: {\n        columnPinning: {\n          left: ['firstName'],\n          right: [],\n        },\n      },\n    })\n\n    const footerGroups = table_getLeftFooterGroups(table)\n\n    expect(footerGroups[0]?.headers[0]?.column.id).toBe('firstName')\n  })\n\n  it('should return footer groups for right pinned columns', () => {\n    const table = generateTestTableWithData(1, {\n      initialState: {\n        columnPinning: {\n          left: [],\n          right: ['lastName'],\n        },\n      },\n    })\n\n    const footerGroups = table_getRightFooterGroups(table)\n\n    expect(footerGroups[0]?.headers[0]?.column.id).toBe('lastName')\n  })\n\n  it('should return footer groups for center columns', () => {\n    const table = generateTestTableWithData(1, {\n      initialState: {\n        columnPinning: {\n          left: ['firstName'],\n          right: ['lastName'],\n        },\n      },\n    })\n\n    const footerGroups = table_getCenterFooterGroups(table)\n    const centerColumnIds = footerGroups[0]?.headers.map(\n      (header: Header<any, any>) => header.column.id,\n    )\n\n    expect(centerColumnIds).not.toContain('firstName')\n    expect(centerColumnIds).not.toContain('lastName')\n    expect(footerGroups[0]?.headers.length).toBeGreaterThan(0)\n  })\n})\n\ndescribe('table_getFlatHeaders', () => {\n  it('should return flat headers for left pinned columns', () => {\n    const table = generateTestTableWithData(1, {\n      initialState: {\n        columnPinning: {\n          left: ['firstName'],\n          right: [],\n        },\n      },\n    })\n\n    const flatHeaders = table_getLeftFlatHeaders(table)\n\n    expect(flatHeaders).toHaveLength(1)\n    expect(flatHeaders[0]?.column.id).toBe('firstName')\n  })\n\n  it('should return flat headers for right pinned columns', () => {\n    const table = generateTestTableWithData(1, {\n      initialState: {\n        columnPinning: {\n          left: [],\n          right: ['lastName'],\n        },\n      },\n    })\n\n    const flatHeaders = table_getRightFlatHeaders(table)\n\n    expect(flatHeaders).toHaveLength(1)\n    expect(flatHeaders[0]?.column.id).toBe('lastName')\n  })\n\n  it('should return flat headers for center columns', () => {\n    const table = generateTestTableWithData(1, {\n      initialState: {\n        columnPinning: {\n          left: ['firstName'],\n          right: ['lastName'],\n        },\n      },\n    })\n\n    const flatHeaders = table_getCenterFlatHeaders(table)\n    const centerColumnIds = flatHeaders.map((header) => header.column.id)\n\n    expect(centerColumnIds).not.toContain('firstName')\n    expect(centerColumnIds).not.toContain('lastName')\n    expect(flatHeaders.length).toBeGreaterThan(0)\n  })\n})\n"
  },
  {
    "path": "packages/table-core/tests/unit/features/column-resizing/columnResizingFeature.utils.test.ts",
    "content": "import { beforeEach, describe, expect, it, vi } from 'vitest'\nimport {\n  column_getCanResize,\n  column_getIsResizing,\n  getDefaultColumnResizingState,\n  header_getResizeHandler,\n  isTouchStartEvent,\n  passiveEventSupported,\n  table_resetHeaderSizeInfo,\n  table_setColumnResizing,\n} from '../../../../src'\nimport { generateTestTableWithData } from '../../../helpers/generateTestTable'\n\n// Add type for the features we need\ntype TestFeatures = {\n  columnResizingFeature: {}\n  columnSizingFeature: {}\n}\n\n// Helper function to create a properly structured test header\nfunction createTestResizeHeader(table: any, overrides = {}) {\n  const baseColumn = {\n    ...table.getAllColumns()[0],\n    id: 'firstName',\n    columnDef: {\n      enableResizing: true,\n    },\n    table,\n    getLeafColumns: () => [\n      {\n        ...table.getAllColumns()[0],\n        id: 'firstName',\n        columnDef: {\n          enableResizing: true,\n        },\n      },\n    ],\n  }\n\n  return {\n    column: baseColumn,\n    getLeafHeaders: () => [\n      {\n        column: baseColumn,\n        getSize: () => 100,\n        subHeaders: [],\n      },\n    ],\n    subHeaders: [],\n    getSize: () => 100,\n    ...overrides,\n  }\n}\n\ndescribe('getDefaultColumnResizingState', () => {\n  it('should return default column resizing state', () => {\n    const result = getDefaultColumnResizingState()\n    expect(result).toEqual({\n      startOffset: null,\n      startSize: null,\n      deltaOffset: null,\n      deltaPercentage: null,\n      isResizingColumn: false,\n      columnSizingStart: [],\n    })\n  })\n})\n\ndescribe('column_getCanResize', () => {\n  it('should return true when column resizing is enabled', () => {\n    const table = generateTestTableWithData(1)\n    const column = {\n      ...table.getAllColumns()[0],\n      columnDef: {},\n      table,\n    }\n\n    const result = column_getCanResize(column)\n\n    expect(result).toBe(true)\n  })\n\n  it('should return false when column resizing is disabled globally', () => {\n    const table = generateTestTableWithData(1, {\n      enableColumnResizing: false,\n    })\n    const column = {\n      ...table.getAllColumns()[0],\n      columnDef: {},\n      table,\n    }\n\n    const result = column_getCanResize(column)\n\n    expect(result).toBe(false)\n  })\n\n  it('should return false when column resizing is disabled for specific column', () => {\n    const table = generateTestTableWithData(1)\n    const column = {\n      ...table.getAllColumns()[0],\n      columnDef: { enableResizing: false },\n      table,\n    }\n\n    const result = column_getCanResize(column)\n\n    expect(result).toBe(false)\n  })\n})\n\ndescribe('column_getIsResizing', () => {\n  it('should return true when column is being resized', () => {\n    const table = generateTestTableWithData(1, {\n      initialState: {\n        columnResizing: {\n          isResizingColumn: 'firstName',\n          columnSizingStart: [],\n          deltaOffset: null,\n          deltaPercentage: null,\n          startOffset: null,\n          startSize: null,\n        },\n      },\n    })\n    const column = {\n      ...table.getAllColumns()[0],\n      id: 'firstName',\n      table,\n    }\n\n    const result = column_getIsResizing(column)\n\n    expect(result).toBe(true)\n  })\n\n  it('should return false when column is not being resized', () => {\n    const table = generateTestTableWithData(1)\n    const column = {\n      ...table.getAllColumns()[0],\n      table,\n    }\n\n    const result = column_getIsResizing(column)\n\n    expect(result).toBe(false)\n  })\n})\n\ndescribe('table_setColumnResizing', () => {\n  it('should call onColumnResizingChange with updater', () => {\n    const onColumnResizingChange = vi.fn()\n    const table = generateTestTableWithData(1, {\n      onColumnResizingChange,\n    })\n\n    const newState = {\n      startOffset: 100,\n      startSize: 200,\n      deltaOffset: 50,\n      deltaPercentage: 0.25,\n      isResizingColumn: 'firstName',\n      columnSizingStart: [],\n    }\n\n    table_setColumnResizing(table, newState)\n\n    expect(onColumnResizingChange).toHaveBeenCalledWith(newState)\n  })\n})\n\ndescribe('table_resetHeaderSizeInfo', () => {\n  it('should reset to default state when defaultState is true', () => {\n    const onColumnResizingChange = vi.fn()\n    const table = generateTestTableWithData(1, {\n      onColumnResizingChange,\n    })\n\n    table_resetHeaderSizeInfo(table, true)\n\n    expect(onColumnResizingChange).toHaveBeenCalledWith(\n      getDefaultColumnResizingState(),\n    )\n  })\n\n  it('should reset to initial state when defaultState is false', () => {\n    const initialState = {\n      columnResizing: {\n        startOffset: 100,\n        startSize: 200,\n        deltaOffset: 50,\n        deltaPercentage: 0.25,\n        isResizingColumn: 'firstName',\n        columnSizingStart: [],\n      },\n    }\n    const onColumnResizingChange = vi.fn()\n    const table = generateTestTableWithData(1, {\n      onColumnResizingChange,\n      initialState,\n    })\n\n    table_resetHeaderSizeInfo(table, false)\n\n    expect(onColumnResizingChange).toHaveBeenCalledWith(\n      initialState.columnResizing,\n    )\n  })\n})\n\ndescribe('isTouchStartEvent', () => {\n  it('should return true for touch start events', () => {\n    const event = { type: 'touchstart' }\n\n    const result = isTouchStartEvent(event)\n\n    expect(result).toBe(true)\n  })\n\n  it('should return false for non-touch start events', () => {\n    const event = { type: 'mousedown' }\n\n    const result = isTouchStartEvent(event)\n\n    expect(result).toBe(false)\n  })\n})\n\ndescribe('header_getResizeHandler', () => {\n  beforeEach(() => {\n    vi.restoreAllMocks()\n  })\n\n  it('should return a function', () => {\n    const table = generateTestTableWithData<TestFeatures>(1, {\n      initialState: {\n        columnSizing: {},\n      },\n    })\n    const header = createTestResizeHeader(table)\n    const handler = header_getResizeHandler(header as any)\n    expect(typeof handler).toBe('function')\n  })\n\n  it('should not resize when column resizing is disabled', () => {\n    const table = generateTestTableWithData<TestFeatures>(1, {\n      enableColumnResizing: false,\n    })\n    const onColumnResizingChange = vi.fn()\n    table.options.onColumnResizingChange = onColumnResizingChange\n\n    const header = createTestResizeHeader(table)\n    const handler = header_getResizeHandler(header as any)\n    handler({ type: 'mousedown', clientX: 100 })\n\n    expect(onColumnResizingChange).not.toHaveBeenCalled()\n  })\n\n  it('should ignore multi-touch events', () => {\n    const table = generateTestTableWithData<TestFeatures>(1)\n    const onColumnResizingChange = vi.fn()\n    table.options.onColumnResizingChange = onColumnResizingChange\n\n    const header = createTestResizeHeader(table)\n    const handler = header_getResizeHandler(header as any)\n    handler({\n      type: 'touchstart',\n      touches: [{ clientX: 100 }, { clientX: 200 }],\n    })\n\n    expect(onColumnResizingChange).not.toHaveBeenCalled()\n  })\n\n  it('should update immediately in onChange mode', () => {\n    const table = generateTestTableWithData<TestFeatures>(1, {\n      columnResizeMode: 'onChange',\n    })\n    const onColumnSizingChange = vi.fn()\n    table.options.onColumnSizingChange = onColumnSizingChange\n\n    const header = createTestResizeHeader(table)\n    const handler = header_getResizeHandler(header as any)\n    handler({ type: 'mousedown', clientX: 100 })\n\n    // Simulate mouse move\n    const moveEvent = new MouseEvent('mousemove', { clientX: 150 })\n    document.dispatchEvent(moveEvent)\n\n    expect(onColumnSizingChange).toHaveBeenCalled()\n  })\n\n  it('should cleanup event listeners on mouse up', () => {\n    const removeEventListenerSpy = vi.spyOn(document, 'removeEventListener')\n    const table = generateTestTableWithData<TestFeatures>(1)\n\n    const header = createTestResizeHeader(table)\n    const handler = header_getResizeHandler(header as any, document)\n    handler({ type: 'mousedown', clientX: 100 })\n\n    // Clear the spy calls from setup\n    removeEventListenerSpy.mockClear()\n\n    // Simulate mouse up\n    const upEvent = new MouseEvent('mouseup', { clientX: 150 })\n    document.dispatchEvent(upEvent)\n\n    // Should remove mousemove and mouseup listeners\n    expect(removeEventListenerSpy).toHaveBeenCalledTimes(4)\n    expect(removeEventListenerSpy).toHaveBeenCalledWith(\n      'mousemove',\n      expect.any(Function),\n    )\n    expect(removeEventListenerSpy).toHaveBeenCalledWith(\n      'mouseup',\n      expect.any(Function),\n    )\n\n    removeEventListenerSpy.mockRestore()\n  })\n})\n\ndescribe('passiveEventSupported', () => {\n  it('should return boolean indicating passive event support', () => {\n    const result = passiveEventSupported()\n    expect(typeof result).toBe('boolean')\n  })\n\n  it('should cache the result of passive support check', () => {\n    const firstResult = passiveEventSupported()\n    const secondResult = passiveEventSupported()\n    expect(firstResult).toBe(secondResult)\n  })\n\n  it('should handle errors during support check', () => {\n    const addEventListenerSpy = vi.spyOn(window, 'addEventListener')\n    addEventListenerSpy.mockImplementation(() => {\n      throw new Error('Test error')\n    })\n\n    const result = passiveEventSupported()\n    expect(result).toBe(false)\n\n    addEventListenerSpy.mockRestore()\n  })\n})\n"
  },
  {
    "path": "packages/table-core/tests/unit/features/column-visibility/columnVisibilityFeature.utils.test.ts",
    "content": "import { describe, expect, it, vi } from 'vitest'\nimport {\n  columnVisibilityFeature,\n  column_getCanHide,\n  column_getIsVisible,\n  column_getToggleVisibilityHandler,\n  column_toggleVisibility,\n  coreFeatures,\n  getDefaultColumnVisibilityState,\n  row_getAllVisibleCells,\n  row_getVisibleCells,\n  tableFeatures,\n  table_getIsAllColumnsVisible,\n  table_getIsSomeColumnsVisible,\n  table_getToggleAllColumnsVisibilityHandler,\n  table_getVisibleFlatColumns,\n  table_getVisibleLeafColumns,\n  table_resetColumnVisibility,\n  table_setColumnVisibility,\n  table_toggleAllColumnsVisible,\n} from '../../../../src'\nimport { generateTestTableWithData } from '../../../helpers/generateTestTable'\nimport { getUpdaterResult } from '../../../helpers/testUtils'\nimport type { Column } from '../../../../src'\n\nconst _features = tableFeatures({\n  ...coreFeatures,\n  columnVisibilityFeature,\n})\n\ndescribe('columnVisibilityFeature.utils', () => {\n  describe('getDefaultColumnVisibilityState', () => {\n    it('should return empty object', () => {\n      const result = getDefaultColumnVisibilityState()\n      expect(result).toEqual({})\n    })\n  })\n\n  describe('column_getIsVisible', () => {\n    it('should return true by default', () => {\n      const table = generateTestTableWithData(1, { _features })\n      const column = table.getAllColumns()[0]!\n\n      const result = column_getIsVisible(column)\n\n      expect(result).toBe(true)\n    })\n\n    it('should return false when column is hidden', () => {\n      const table = generateTestTableWithData(1, {\n        _features,\n        initialState: {\n          columnVisibility: {\n            firstName: false,\n          },\n        },\n      })\n      const column = {\n        ...table.getAllColumns()[0]!,\n        id: 'firstName',\n        table,\n      }\n\n      const result = column_getIsVisible(column)\n\n      expect(result).toBe(false)\n    })\n\n    it('should return true if any child column is visible', () => {\n      const table = generateTestTableWithData(1, { _features })\n      const baseColumn = table.getAllColumns()[0]!\n      const parentColumn = {\n        ...baseColumn,\n        columns: [\n          { ...baseColumn, id: 'child1', columns: [], table },\n          { ...table.getAllColumns()[1]!, id: 'child2', columns: [], table },\n        ],\n      }\n\n      const result = column_getIsVisible(parentColumn)\n\n      expect(result).toBe(true)\n    })\n  })\n\n  describe('column_getCanHide', () => {\n    it('should return true by default', () => {\n      const table = generateTestTableWithData(1, { _features })\n      const column = table.getAllColumns()[0]!\n\n      const result = column_getCanHide(column)\n\n      expect(result).toBe(true)\n    })\n\n    it('should return false when hiding is disabled globally', () => {\n      const table = generateTestTableWithData(1, {\n        enableHiding: false,\n        _features,\n      })\n      const column = table.getAllColumns()[0]!\n\n      const result = column_getCanHide(column)\n\n      expect(result).toBe(false)\n    })\n\n    it('should return false when hiding is disabled for column', () => {\n      const table = generateTestTableWithData(1, { _features })\n      const column = {\n        ...table.getAllColumns()[0]!,\n        columnDef: { enableHiding: false },\n      }\n\n      const result = column_getCanHide(column)\n\n      expect(result).toBe(false)\n    })\n  })\n\n  describe('column_toggleVisibility', () => {\n    it('should toggle column visibility', () => {\n      const onColumnVisibilityChange = vi.fn()\n      const table = generateTestTableWithData(1, {\n        _features,\n        onColumnVisibilityChange,\n      })\n      const column = {\n        ...table.getAllColumns()[0]!,\n        id: 'firstName',\n        table,\n      }\n\n      column_toggleVisibility(column)\n\n      const result = getUpdaterResult(onColumnVisibilityChange, {})\n      expect(result).toEqual({ firstName: false })\n    })\n\n    it('should set specific visibility when provided', () => {\n      const onColumnVisibilityChange = vi.fn()\n      const table = generateTestTableWithData(1, {\n        _features,\n        onColumnVisibilityChange,\n      })\n      const column = {\n        ...table.getAllColumns()[0]!,\n        id: 'firstName',\n        table,\n      }\n\n      column_toggleVisibility(column, true)\n\n      const result = getUpdaterResult(onColumnVisibilityChange, {})\n      expect(result).toEqual({ firstName: true })\n    })\n\n    it('should not toggle when column cannot be hidden', () => {\n      const onColumnVisibilityChange = vi.fn()\n      const table = generateTestTableWithData(1, {\n        enableHiding: false,\n        _features,\n        onColumnVisibilityChange,\n      })\n      const column = {\n        ...table.getAllColumns()[0]!,\n        id: 'firstName',\n        table,\n      }\n\n      column_toggleVisibility(column)\n\n      expect(onColumnVisibilityChange).not.toHaveBeenCalled()\n    })\n  })\n\n  describe('column_getToggleVisibilityHandler', () => {\n    it('should return handler that toggles visibility based on checkbox state', () => {\n      const onColumnVisibilityChange = vi.fn()\n      const table = generateTestTableWithData(1, {\n        _features,\n        onColumnVisibilityChange,\n      })\n      const column = {\n        ...table.getAllColumns()[0]!,\n        id: 'firstName',\n        table,\n      }\n      const handler = column_getToggleVisibilityHandler(column)\n\n      handler({ target: { checked: true } } as any)\n\n      const result = getUpdaterResult(onColumnVisibilityChange, {})\n      expect(result).toEqual({ firstName: true })\n    })\n  })\n\n  describe('row_getAllVisibleCells', () => {\n    it('should return only visible cells', () => {\n      const table = generateTestTableWithData(1, {\n        _features,\n        initialState: {\n          columnVisibility: {\n            firstName: false,\n          },\n        },\n      })\n      const row = table.getRowModel().rows[0]!\n\n      const visibleCells = row_getAllVisibleCells(row)\n      const visibleColumnIds = visibleCells.map((cell) => cell.column.id)\n\n      expect(visibleColumnIds).not.toContain('firstName')\n      expect(visibleCells.length).toBe(row.getAllCells().length - 1)\n    })\n  })\n\n  describe('row_getVisibleCells', () => {\n    it('should combine left, center and right cells', () => {\n      const leftCells = [{ id: 'left' }]\n      const centerCells = [{ id: 'center' }]\n      const rightCells = [{ id: 'right' }]\n\n      const result = row_getVisibleCells(\n        leftCells as any,\n        centerCells as any,\n        rightCells as any,\n      )\n\n      expect(result).toEqual([...leftCells, ...centerCells, ...rightCells])\n    })\n  })\n\n  describe('table_getVisibleFlatColumns', () => {\n    it('should return only visible flat columns', () => {\n      const table = generateTestTableWithData(1, {\n        _features,\n        initialState: {\n          columnVisibility: {\n            firstName: false,\n          },\n        },\n      })\n\n      const visibleColumns = table_getVisibleFlatColumns(table)\n      const visibleColumnIds = visibleColumns.map((col) => col.id)\n\n      expect(visibleColumnIds).not.toContain('firstName')\n      expect(visibleColumns.length).toBe(table.getAllFlatColumns().length - 1)\n    })\n  })\n\n  describe('table_getVisibleLeafColumns', () => {\n    it('should return only visible leaf columns', () => {\n      const table = generateTestTableWithData(1, {\n        _features,\n        initialState: {\n          columnVisibility: {\n            firstName: false,\n          },\n        },\n      })\n\n      const visibleColumns = table_getVisibleLeafColumns(table)\n      const visibleColumnIds = visibleColumns.map((col) => col.id)\n\n      expect(visibleColumnIds).not.toContain('firstName')\n      expect(visibleColumns.length).toBe(table.getAllLeafColumns().length - 1)\n    })\n  })\n\n  describe('table_setColumnVisibility', () => {\n    it('should call onColumnVisibilityChange with updater', () => {\n      const onColumnVisibilityChange = vi.fn()\n      const table = generateTestTableWithData(1, {\n        _features,\n        onColumnVisibilityChange,\n      })\n\n      table_setColumnVisibility(table, { firstName: false })\n\n      expect(onColumnVisibilityChange).toHaveBeenCalledWith({\n        firstName: false,\n      })\n    })\n  })\n\n  describe('table_resetColumnVisibility', () => {\n    it('should reset to empty state when defaultState is true', () => {\n      const onColumnVisibilityChange = vi.fn()\n      const table = generateTestTableWithData(1, {\n        _features,\n        onColumnVisibilityChange,\n      })\n\n      table_resetColumnVisibility(table, true)\n\n      expect(onColumnVisibilityChange).toHaveBeenCalledWith({})\n    })\n\n    it('should reset to initial state when defaultState is false', () => {\n      const initialState = { columnVisibility: { firstName: false } }\n      const onColumnVisibilityChange = vi.fn()\n      const table = generateTestTableWithData(1, {\n        _features,\n        initialState,\n        onColumnVisibilityChange,\n      })\n\n      table_resetColumnVisibility(table, false)\n\n      expect(onColumnVisibilityChange).toHaveBeenCalledWith({\n        firstName: false,\n      })\n    })\n  })\n\n  describe('table_toggleAllColumnsVisible', () => {\n    it('should show all columns when value is true', () => {\n      const onColumnVisibilityChange = vi.fn()\n      const table = generateTestTableWithData(1, {\n        _features,\n        onColumnVisibilityChange,\n      })\n\n      table_toggleAllColumnsVisible(table, true)\n\n      expect(onColumnVisibilityChange).toHaveBeenCalled()\n      const result = onColumnVisibilityChange.mock.calls[0]?.[0]\n      const allColumnIds = table\n        .getAllLeafColumns()\n        .map((col: Column<any, any>) => col.id)\n      expect(Object.entries(result)).toEqual(\n        allColumnIds.map((id: string) => [id, true]),\n      )\n    })\n\n    it('should hide all columns that can be hidden when value is false', () => {\n      const onColumnVisibilityChange = vi.fn()\n      const table = generateTestTableWithData(1, {\n        _features,\n        onColumnVisibilityChange,\n      })\n\n      table_toggleAllColumnsVisible(table, false)\n\n      expect(onColumnVisibilityChange).toHaveBeenCalled()\n      const result = onColumnVisibilityChange.mock.calls[0]?.[0]\n      const allColumnIds = table\n        .getAllLeafColumns()\n        .map((col: Column<any, any>) => col.id)\n      expect(Object.entries(result)).toEqual(\n        allColumnIds.map((id: string) => [id, false]),\n      )\n    })\n  })\n\n  describe('table_getIsAllColumnsVisible', () => {\n    it('should return true when all columns are visible', () => {\n      const table = generateTestTableWithData(1, { _features })\n\n      const result = table_getIsAllColumnsVisible(table)\n\n      expect(result).toBe(true)\n    })\n\n    it('should return false when some columns are hidden', () => {\n      const table = generateTestTableWithData(1, {\n        initialState: {\n          columnVisibility: {\n            firstName: false,\n          },\n        },\n      })\n\n      const result = table_getIsAllColumnsVisible(table)\n\n      expect(result).toBe(false)\n    })\n  })\n\n  describe('table_getIsSomeColumnsVisible', () => {\n    it('should return true when some columns are visible', () => {\n      const table = generateTestTableWithData(1, {\n        _features,\n        initialState: {\n          columnVisibility: {\n            firstName: false,\n          },\n        },\n      })\n\n      const result = table_getIsSomeColumnsVisible(table)\n\n      expect(result).toBe(true)\n    })\n\n    it('should return false when no columns are visible', () => {\n      const table = generateTestTableWithData(1, { _features })\n      const allColumnIds = table\n        .getAllLeafColumns()\n        .map((col: Column<any, any>) => col.id)\n      const hideAllColumns = Object.fromEntries(\n        allColumnIds.map((id: string) => [id, false]),\n      )\n\n      const tableWithHiddenColumns = generateTestTableWithData(1, {\n        _features,\n        initialState: {\n          columnVisibility: hideAllColumns,\n        },\n      })\n\n      const result = table_getIsSomeColumnsVisible(tableWithHiddenColumns)\n\n      expect(result).toBe(false)\n    })\n  })\n\n  describe('table_getToggleAllColumnsVisibilityHandler', () => {\n    it('should return handler that toggles all columns visibility based on checkbox state', () => {\n      const onColumnVisibilityChange = vi.fn()\n      const table = generateTestTableWithData(1, {\n        _features,\n        onColumnVisibilityChange,\n      })\n      const handler = table_getToggleAllColumnsVisibilityHandler(table)\n\n      handler({ target: { checked: true } } as any)\n\n      expect(onColumnVisibilityChange).toHaveBeenCalled()\n      const result = onColumnVisibilityChange.mock.calls[0]?.[0]\n      const allColumnIds = table\n        .getAllLeafColumns()\n        .map((col: Column<any, any>) => col.id)\n      expect(Object.entries(result)).toEqual(\n        allColumnIds.map((id: string) => [id, true]),\n      )\n    })\n  })\n})\n"
  },
  {
    "path": "packages/table-core/tests/unit/features/row-pinning/rowPinningFeature.utils.test.ts",
    "content": "import { describe, expect, it, vi } from 'vitest'\nimport {\n  getDefaultRowPinningState,\n  row_getCanPin,\n  row_getIsPinned,\n  row_getPinnedIndex,\n  row_pin,\n  table_getBottomRows,\n  table_getCenterRows,\n  table_getIsSomeRowsPinned,\n  table_getTopRows,\n  table_resetRowPinning,\n  table_setRowPinning,\n} from '../../../../src/features/row-pinning/rowPinningFeature.utils'\nimport { generateTestTableWithData } from '../../../helpers/generateTestTable'\nimport { getUpdaterResult } from '../../../helpers/testUtils'\nimport {\n  createTableWithMockOnPinningChange,\n  createTableWithPinningState,\n} from '../../../helpers/rowPinningHelpers'\nimport type { Row } from '../../../../src'\nimport type { Person } from '../../../fixtures/data/types'\n\nconst DEFAULT_ROW_COUNT = 10\n\nconst ROW = {\n  0: '0',\n  1: '1',\n  2: '2',\n  8: '8',\n  9: '9',\n} as const\n\nconst LEAF = {\n  1: 'leaf1',\n  2: 'leaf2',\n} as const\n\nconst PARENT = {\n  1: 'parent1',\n  2: 'parent2',\n} as const\n\nconst EMPTY_PINNING_STATE = {\n  top: [],\n  bottom: [],\n}\n\ndescribe('getDefaultRowPinningState', () => {\n  it('should return default row pinning state with empty top and bottom arrays', () => {\n    const defaultState = getDefaultRowPinningState()\n\n    expect(defaultState).toEqual({\n      top: [],\n      bottom: [],\n    })\n\n    // Ensure we get a new object instance each time\n    const secondState = getDefaultRowPinningState()\n    expect(secondState).toEqual(defaultState)\n    expect(secondState).not.toBe(defaultState)\n  })\n})\n\ndescribe('table_setRowPinning', () => {\n  it('should call onRowPinningChange with the updater function', () => {\n    const { table, onRowPinningChangeMock } =\n      createTableWithMockOnPinningChange()\n\n    const newState = {\n      top: [ROW[1]],\n      bottom: [ROW[2]],\n    }\n\n    table_setRowPinning(table, newState)\n\n    expect(onRowPinningChangeMock).toHaveBeenCalledTimes(1)\n    expect(onRowPinningChangeMock).toHaveBeenCalledWith(newState)\n  })\n\n  it('should handle undefined onRowPinningChange without error', () => {\n    const table = generateTestTableWithData(DEFAULT_ROW_COUNT)\n\n    expect(() => {\n      table_setRowPinning(table, EMPTY_PINNING_STATE)\n    }).not.toThrow()\n  })\n})\n\ndescribe('table_resetRowPinning', () => {\n  it('should reset to default state when defaultState is true', () => {\n    const { table, onRowPinningChangeMock } =\n      createTableWithMockOnPinningChange()\n\n    table_resetRowPinning(table, true)\n\n    expect(onRowPinningChangeMock).toHaveBeenCalledTimes(1)\n    expect(onRowPinningChangeMock).toHaveBeenCalledWith(\n      getDefaultRowPinningState(),\n    )\n  })\n\n  it('should reset to initial state when defaultState is false', () => {\n    const { table, onRowPinningChangeMock } =\n      createTableWithMockOnPinningChange()\n    const initialState = {\n      top: [ROW[1]],\n      bottom: [ROW[2]],\n    }\n    table.initialState.rowPinning = initialState\n\n    table_resetRowPinning(table, false)\n\n    expect(onRowPinningChangeMock).toHaveBeenCalledTimes(1)\n    expect(onRowPinningChangeMock).toHaveBeenCalledWith(initialState)\n  })\n\n  it('should reset to default state when no initial state exists', () => {\n    const { table, onRowPinningChangeMock } =\n      createTableWithMockOnPinningChange()\n\n    table_resetRowPinning(table, false)\n\n    expect(onRowPinningChangeMock).toHaveBeenCalledTimes(1)\n    expect(onRowPinningChangeMock).toHaveBeenCalledWith(\n      getDefaultRowPinningState(),\n    )\n  })\n})\n\ndescribe('table_getIsSomeRowsPinned', () => {\n  it('should return false when no rows are pinned', () => {\n    const table = createTableWithPinningState()\n\n    expect(table_getIsSomeRowsPinned(table)).toBe(false)\n    expect(table_getIsSomeRowsPinned(table, 'top')).toBe(false)\n    expect(table_getIsSomeRowsPinned(table, 'bottom')).toBe(false)\n  })\n\n  it('should return true when rows are pinned to top', () => {\n    const table = createTableWithPinningState(10, {\n      top: [ROW[0]],\n      bottom: [],\n    })\n\n    expect(table_getIsSomeRowsPinned(table)).toBe(true)\n    expect(table_getIsSomeRowsPinned(table, 'top')).toBe(true)\n    expect(table_getIsSomeRowsPinned(table, 'bottom')).toBe(false)\n  })\n\n  it('should return true when rows are pinned to bottom', () => {\n    const table = createTableWithPinningState(10, {\n      top: [],\n      bottom: [ROW[0]],\n    })\n\n    expect(table_getIsSomeRowsPinned(table)).toBe(true)\n    expect(table_getIsSomeRowsPinned(table, 'top')).toBe(false)\n    expect(table_getIsSomeRowsPinned(table, 'bottom')).toBe(true)\n  })\n\n  it('should handle undefined state', () => {\n    const table = generateTestTableWithData(10)\n\n    expect(table_getIsSomeRowsPinned(table)).toBe(false)\n    expect(table_getIsSomeRowsPinned(table, 'top')).toBe(false)\n    expect(table_getIsSomeRowsPinned(table, 'bottom')).toBe(false)\n  })\n})\n\ndescribe('table_getTopRows and table_getBottomRows', () => {\n  it('should return empty arrays when no rows are pinned', () => {\n    const table = generateTestTableWithData(10, {\n      initialState: {\n        rowPinning: getDefaultRowPinningState(),\n      },\n    })\n\n    expect(table_getTopRows(table)).toEqual([])\n    expect(table_getBottomRows(table)).toEqual([])\n  })\n\n  it('should return pinned rows with position property', () => {\n    const table = generateTestTableWithData(10, {\n      initialState: {\n        rowPinning: {\n          top: [ROW[0]],\n          bottom: [ROW[1]],\n        },\n      },\n    })\n    const row0 = table.getRow('0', true)\n    const row1 = table.getRow('1', true)\n\n    const topRows = table_getTopRows(table)\n    const bottomRows = table_getBottomRows(table)\n\n    expect(topRows).toHaveLength(1)\n    expect(topRows[0]).toEqual({ ...row0, position: 'top' })\n\n    expect(bottomRows).toHaveLength(1)\n    expect(bottomRows[0]).toEqual({ ...row1, position: 'bottom' })\n  })\n\n  it('should handle keepPinnedRows=false by only returning visible rows', () => {\n    const table = generateTestTableWithData(10, {\n      keepPinnedRows: false,\n      initialState: {\n        rowPinning: {\n          top: [ROW[0], ROW[8]], // '0' is visible, '8' is not\n          bottom: [ROW[1], ROW[9]], // '1' is visible, '9' is not\n        },\n      },\n    })\n\n    // Setup a row model with only some rows visible\n    const visibleRows = table.getRowModel().rows.slice(0, 5)\n    vi.spyOn(table, 'getRowModel').mockReturnValue({\n      rows: visibleRows,\n      flatRows: [],\n      rowsById: {},\n    })\n\n    const topRows = table_getTopRows(table)\n    const bottomRows = table_getBottomRows(table)\n\n    expect(topRows).toHaveLength(1)\n    expect(topRows[0]?.id).toBe(ROW[0])\n\n    expect(bottomRows).toHaveLength(1)\n    expect(bottomRows[0]?.id).toBe(ROW[1])\n  })\n\n  it('should handle keepPinnedRows=true by returning all pinned rows regardless of visibility', () => {\n    const table = generateTestTableWithData(10, {\n      keepPinnedRows: true,\n      initialState: {\n        rowPinning: {\n          top: [ROW[0], ROW[8]], // '0' is visible, '8' is not\n          bottom: [ROW[1], ROW[9]], // '1' is visible, '9' is not\n        },\n      },\n    })\n\n    // Setup a row model with only some rows visible\n    const visibleRows = table.getRowModel().rows.slice(0, 5)\n    vi.spyOn(table, 'getRowModel').mockReturnValue({\n      rows: visibleRows,\n      flatRows: [],\n      rowsById: {},\n    })\n\n    const topRows = table_getTopRows(table)\n    const bottomRows = table_getBottomRows(table)\n\n    expect(topRows).toHaveLength(2)\n    expect(topRows.map((r) => r.id)).toEqual([ROW[0], ROW[8]])\n\n    expect(bottomRows).toHaveLength(2)\n    expect(bottomRows.map((r) => r.id)).toEqual([ROW[1], ROW[9]])\n  })\n\n  it('should handle undefined state', () => {\n    const table = generateTestTableWithData(10)\n\n    expect(table_getTopRows(table)).toEqual([])\n    expect(table_getBottomRows(table)).toEqual([])\n  })\n})\n\ndescribe('table_getCenterRows', () => {\n  it('should return all rows when no rows are pinned', () => {\n    const table = generateTestTableWithData(10, {\n      initialState: {\n        rowPinning: getDefaultRowPinningState(),\n      },\n    })\n\n    const allRows = table.getRowModel().rows\n    const centerRows = table_getCenterRows(table)\n\n    expect(centerRows).toEqual(allRows)\n  })\n\n  it('should return only unpinned rows when some rows are pinned', () => {\n    const table = generateTestTableWithData(10, {\n      initialState: {\n        rowPinning: {\n          top: [ROW[0], ROW[1]],\n          bottom: [ROW[8], ROW[9]],\n        },\n      },\n    })\n    const allRows = table.getRowModel().rows\n\n    const centerRows = table_getCenterRows(table)\n\n    expect(centerRows).toEqual(allRows.slice(2, 8))\n    const rowIds = [ROW[0], ROW[1], ROW[8], ROW[9]] as Array<string>\n\n    expect(centerRows.every((row) => !rowIds.includes(row.id))).toBe(true)\n  })\n\n  it('should handle undefined state', () => {\n    const table = generateTestTableWithData(10)\n    const allRows = table.getRowModel().rows\n\n    const centerRows = table_getCenterRows(table)\n\n    expect(centerRows).toEqual(allRows)\n  })\n})\n\ndescribe('row_getCanPin', () => {\n  it('should return true when enableRowPinning is undefined', () => {\n    const table = generateTestTableWithData(10)\n    const row = table.getRow('0')\n\n    expect(row_getCanPin(row)).toBe(true)\n  })\n\n  it('should return false when enableRowPinning is false', () => {\n    const table = generateTestTableWithData(10)\n    table.options.enableRowPinning = false\n\n    const row = table.getRow('0')\n\n    expect(row_getCanPin(row)).toBe(false)\n  })\n\n  it('should return true when enableRowPinning is true', () => {\n    const table = generateTestTableWithData(10)\n    table.options.enableRowPinning = true\n\n    const row = table.getRow('0')\n\n    expect(row_getCanPin(row)).toBe(true)\n  })\n\n  it('should use enableRowPinning function when provided', () => {\n    const enableRowPinning = vi.fn((row) => row.id === '1')\n    const table = generateTestTableWithData(10)\n\n    table.options.enableRowPinning = enableRowPinning\n\n    const row0 = table.getRow('0')\n    const row1 = table.getRow('1')\n\n    expect(row_getCanPin(row0)).toBe(false)\n    expect(row_getCanPin(row1)).toBe(true)\n    expect(enableRowPinning).toHaveBeenCalledTimes(2)\n  })\n})\n\ndescribe('row_getIsPinned', () => {\n  it('should return false when no rows are pinned', () => {\n    const table = generateTestTableWithData(10, {\n      initialState: {\n        rowPinning: getDefaultRowPinningState(),\n      },\n    })\n\n    const row = table.getRow('0')\n    expect(row_getIsPinned(row)).toBe(false)\n  })\n\n  it('should return \"top\" when row is pinned to top', () => {\n    const table = generateTestTableWithData(10, {\n      initialState: {\n        rowPinning: {\n          top: [ROW[0]],\n          bottom: [],\n        },\n      },\n    })\n\n    const row = table.getRow('0')\n    expect(row_getIsPinned(row)).toBe('top')\n  })\n\n  it('should return \"bottom\" when row is pinned to bottom', () => {\n    const table = generateTestTableWithData(10, {\n      initialState: {\n        rowPinning: {\n          top: [],\n          bottom: [ROW[0]],\n        },\n      },\n    })\n\n    const row = table.getRow('0')\n    expect(row_getIsPinned(row)).toBe('bottom')\n  })\n\n  it('should handle undefined state', () => {\n    const table = generateTestTableWithData(10)\n\n    const row = table.getRow('0')\n    expect(row_getIsPinned(row)).toBe(false)\n  })\n})\n\ndescribe('row_getPinnedIndex', () => {\n  it('should return -1 when row is not pinned', () => {\n    const table = generateTestTableWithData(10, {\n      initialState: {\n        rowPinning: getDefaultRowPinningState(),\n      },\n    })\n\n    const row = table.getRow('0')\n    expect(row_getPinnedIndex(row)).toBe(-1)\n  })\n\n  it('should return correct index for top pinned rows', () => {\n    const table = generateTestTableWithData(10, {\n      initialState: {\n        rowPinning: {\n          top: [ROW[0], ROW[1], ROW[2]],\n          bottom: [],\n        },\n      },\n    })\n\n    expect(row_getPinnedIndex(table.getRow('0'))).toBe(0)\n    expect(row_getPinnedIndex(table.getRow('1'))).toBe(1)\n    expect(row_getPinnedIndex(table.getRow('2'))).toBe(2)\n  })\n\n  it('should return correct index for bottom pinned rows', () => {\n    const table = generateTestTableWithData(10, {\n      initialState: {\n        rowPinning: {\n          top: [],\n          bottom: [ROW[0], ROW[1], ROW[2]],\n        },\n      },\n    })\n\n    expect(row_getPinnedIndex(table.getRow('0'))).toBe(0)\n    expect(row_getPinnedIndex(table.getRow('1'))).toBe(1)\n    expect(row_getPinnedIndex(table.getRow('2'))).toBe(2)\n  })\n\n  it('should handle undefined state', () => {\n    const table = generateTestTableWithData(10)\n\n    const row = table.getRow('0')\n    expect(row_getPinnedIndex(row)).toBe(-1)\n  })\n})\n\ndescribe('row_pin', () => {\n  it('should pin a row to top', () => {\n    const { table, onRowPinningChangeMock } =\n      createTableWithMockOnPinningChange()\n    const row = table.getRow('0')\n\n    row_pin(row, 'top')\n\n    expect(onRowPinningChangeMock).toHaveBeenCalledTimes(1)\n    expect(\n      getUpdaterResult(onRowPinningChangeMock, { top: [], bottom: [] }),\n    ).toEqual({\n      top: [ROW[0]],\n      bottom: [],\n    })\n  })\n\n  it('should pin a row to bottom', () => {\n    const { table, onRowPinningChangeMock } =\n      createTableWithMockOnPinningChange()\n    const row = table.getRow('0')\n\n    row_pin(row, 'bottom')\n\n    expect(onRowPinningChangeMock).toHaveBeenCalledTimes(1)\n    expect(\n      getUpdaterResult(onRowPinningChangeMock, { top: [], bottom: [] }),\n    ).toEqual({\n      top: [],\n      bottom: [ROW[0]],\n    })\n  })\n\n  it('should unpin a row when position is false', () => {\n    const { table, onRowPinningChangeMock } =\n      createTableWithMockOnPinningChange()\n    table.baseStore.setState(() => ({\n      rowPinning: {\n        top: [ROW[0]],\n        bottom: [],\n      },\n    }))\n    const row = table.getRow('0')\n\n    row_pin(row, false)\n\n    expect(onRowPinningChangeMock).toHaveBeenCalledTimes(1)\n    expect(\n      getUpdaterResult(onRowPinningChangeMock, { top: [ROW[0]], bottom: [] }),\n    ).toEqual({\n      top: [],\n      bottom: [],\n    })\n  })\n\n  it('should include leaf rows when includeLeafRows is true', () => {\n    const { table, onRowPinningChangeMock } =\n      createTableWithMockOnPinningChange()\n    const row = table.getRow('0')\n    const leafRows = [{ id: LEAF[1] }, { id: LEAF[2] }]\n    vi.spyOn(row, 'getLeafRows').mockReturnValue(\n      leafRows as unknown as Array<Row<any, Person>>,\n    )\n\n    row_pin(row, 'top', true)\n\n    expect(onRowPinningChangeMock).toHaveBeenCalledTimes(1)\n    expect(\n      getUpdaterResult(onRowPinningChangeMock, { top: [], bottom: [] }),\n    ).toEqual({\n      top: [ROW[0], LEAF[1], LEAF[2]],\n      bottom: [],\n    })\n  })\n\n  it('should include parent rows when includeParentRows is true', () => {\n    const { table, onRowPinningChangeMock } =\n      createTableWithMockOnPinningChange()\n    const row = table.getRow('0')\n    const parentRows = [{ id: PARENT[1] }, { id: PARENT[2] }]\n    vi.spyOn(row, 'getParentRows').mockReturnValue(\n      parentRows as unknown as Array<Row<any, Person>>,\n    )\n\n    row_pin(row, 'top', false, true)\n\n    expect(onRowPinningChangeMock).toHaveBeenCalledTimes(1)\n    expect(\n      getUpdaterResult(onRowPinningChangeMock, { top: [], bottom: [] }),\n    ).toEqual({\n      top: [PARENT[1], PARENT[2], ROW[0]],\n      bottom: [],\n    })\n  })\n\n  it('should maintain existing pinned rows when pinning additional rows', () => {\n    const { table, onRowPinningChangeMock } =\n      createTableWithMockOnPinningChange()\n    table.baseStore.setState(() => ({\n      rowPinning: {\n        top: [ROW[1]],\n        bottom: [ROW[2]],\n      },\n    }))\n    const row = table.getRow('0')\n\n    row_pin(row, 'top')\n\n    expect(onRowPinningChangeMock).toHaveBeenCalledTimes(1)\n    expect(\n      getUpdaterResult(onRowPinningChangeMock, {\n        top: [ROW[1]],\n        bottom: [ROW[2]],\n      }),\n    ).toEqual({\n      top: [ROW[1], ROW[0]],\n      bottom: [ROW[2]],\n    })\n  })\n\n  it('should remove row from other position when moving between top and bottom', () => {\n    const { table, onRowPinningChangeMock } =\n      createTableWithMockOnPinningChange()\n    table.baseStore.setState(() => ({\n      rowPinning: {\n        top: [ROW[0]],\n        bottom: [],\n      },\n    }))\n    const row = table.getRow('0')\n\n    row_pin(row, 'bottom')\n\n    expect(onRowPinningChangeMock).toHaveBeenCalledTimes(1)\n    expect(\n      getUpdaterResult(onRowPinningChangeMock, { top: [ROW[0]], bottom: [] }),\n    ).toEqual({\n      top: [],\n      bottom: [ROW[0]],\n    })\n  })\n})\n"
  },
  {
    "path": "packages/table-core/tests/unit/fns/filterFns.test.ts",
    "content": "import { describe, expect, it } from 'vitest'\nimport { generateTestRowsWithStateFromData } from '../../helpers/generateTestRows'\nimport {\n  columnFilteringFeature,\n  filterFn_equals,\n  filterFn_equalsString,\n  filterFn_equalsStringSensitive,\n  filterFn_greaterThan,\n  filterFn_greaterThanOrEqualTo,\n  filterFn_includesString,\n  filterFn_includesStringSensitive,\n  filterFn_lessThan,\n  filterFn_lessThanOrEqualTo,\n  filterFn_weakEquals,\n} from '../../../src'\nimport { getStaticTestData } from '../../fixtures/data/generateTestData'\n\n// TODO - fix _features not being inferred correctly\nconst mockRows = generateTestRowsWithStateFromData(getStaticTestData(), {\n  _features: {\n    columnFilteringFeature,\n  },\n})\n\ndescribe('Filter Functions', () => {\n  describe('Basic Filters', () => {\n    describe('filterFn_equals', () => {\n      it('should match exact values', () => {\n        const row = mockRows[0]!\n        const columnId = 'firstName'\n        const filterValue = 'John'\n        const result = filterFn_equals(row as any, columnId, filterValue)\n        expect(result).toBe(true)\n      })\n      it('should not match values with type coercion (e.g., \"1\" == 1)', () => {\n        const row = mockRows[0]!\n        const columnId = 'id'\n        const filterValue = 1 // number instead of string\n        const result = filterFn_equals(row as any, columnId, filterValue)\n        expect(result).toBe(false)\n      })\n      it('should handle null/undefined values', () => {\n        const row = mockRows[0]!\n        const columnId = 'firstName'\n        const filterValue = null\n        const result = filterFn_equals(row as any, columnId, filterValue)\n        expect(result).toBe(false)\n      })\n      it('should correctly identify non-matches', () => {\n        const row = mockRows[0]!\n        const columnId = 'firstName'\n        const filterValue = 'Jane'\n        const result = filterFn_equals(row as any, columnId, filterValue)\n        expect(result).toBe(false)\n      })\n    })\n\n    describe('filterFn_weakEquals', () => {\n      it('should match exact values', () => {\n        const row = mockRows[0]!\n        const columnId = 'firstName'\n        const filterValue = 'John'\n        const result = filterFn_weakEquals(row as any, columnId, filterValue)\n        expect(result).toBe(true)\n      })\n      it('should match values with type coercion (e.g., \"1\" == 1)', () => {\n        const row = mockRows[0]!\n        const columnId = 'id'\n        const filterValue = 1 // number instead of string\n        const result = filterFn_weakEquals(row as any, columnId, filterValue)\n        expect(result).toBe(true)\n      })\n      it('should handle null/undefined values', () => {\n        const row = mockRows[0]!\n        const columnId = 'firstName'\n        const filterValue = null\n        const result = filterFn_weakEquals(row as any, columnId, filterValue)\n        expect(result).toBe(false)\n      })\n      it('should correctly identify non-matches', () => {\n        const row = mockRows[0]!\n        const columnId = 'firstName'\n        const filterValue = 'Jane'\n        const result = filterFn_weakEquals(row as any, columnId, filterValue)\n        expect(result).toBe(false)\n      })\n    })\n  })\n\n  describe('String Filters', () => {\n    describe('filterFn_includesStringSensitive', () => {\n      it('should match case-sensitive substrings', () => {\n        const row = mockRows[0]!\n        const columnId = 'firstName'\n        const filterValue = 'John'\n        const result = filterFn_includesStringSensitive(\n          row as any,\n          columnId,\n          filterValue,\n        )\n        expect(result).toBe(true)\n      })\n      it('should not match different case substrings', () => {\n        const row = mockRows[0]!\n        const columnId = 'firstName'\n        const filterValue = 'john' // lowercase\n        const result = filterFn_includesStringSensitive(\n          row as any,\n          columnId,\n          filterValue,\n        )\n        expect(result).toBe(false)\n      })\n      it('should handle partial matches', () => {\n        const row = mockRows[0]!\n        const columnId = 'firstName'\n        const filterValue = 'ohn'\n        const result = filterFn_includesStringSensitive(\n          row as any,\n          columnId,\n          filterValue,\n        )\n        expect(result).toBe(true)\n      })\n    })\n\n    describe('filterFn_includesString', () => {\n      it('should match case-insensitive substrings', () => {\n        const row = mockRows[0]!\n        const columnId = 'firstName'\n        const filterValue = 'John'\n        const result = filterFn_includesString(\n          row as any,\n          columnId,\n          filterValue,\n        )\n        expect(result).toBe(true)\n      })\n      it('should match different case substrings', () => {\n        const row = mockRows[0]!\n        const columnId = 'firstName'\n        const filterValue = 'john' // lowercase\n        const result = filterFn_includesString(\n          row as any,\n          columnId,\n          filterValue,\n        )\n        expect(result).toBe(true)\n      })\n      it('should handle partial matches', () => {\n        const row = mockRows[0]!\n        const columnId = 'firstName'\n        const filterValue = 'ohn'\n        const result = filterFn_includesString(\n          row as any,\n          columnId,\n          filterValue,\n        )\n        expect(result).toBe(true)\n      })\n    })\n\n    describe('filterFn_equalsString', () => {\n      it('should match exact strings', () => {\n        const row = mockRows[0]!\n        const columnId = 'firstName'\n        const filterValue = 'John'\n        const result = filterFn_equalsString(row as any, columnId, filterValue)\n        expect(result).toBe(true)\n      })\n      it('should match case-insensitive exact strings', () => {\n        const row = mockRows[0]!\n        const columnId = 'firstName'\n        const filterValue = 'john' // lowercase\n        const result = filterFn_equalsString(row as any, columnId, filterValue)\n        expect(result).toBe(true)\n      })\n      it('should not match partial strings', () => {\n        const row = mockRows[0]!\n        const columnId = 'firstName'\n        const filterValue = 'ohn'\n        const result = filterFn_equalsString(row as any, columnId, filterValue)\n        expect(result).toBe(false)\n      })\n    })\n\n    describe('filterFn_equalsStringSensitive', () => {\n      it('should match case-sensitive exact strings', () => {\n        const row = mockRows[0]!\n        const columnId = 'firstName'\n        const filterValue = 'John'\n        const result = filterFn_equalsStringSensitive(\n          row as any,\n          columnId,\n          filterValue,\n        )\n        expect(result).toBe(true)\n      })\n      it('should not match case-insensitive exact strings', () => {\n        const row = mockRows[0]!\n        const columnId = 'firstName'\n        const filterValue = 'john'\n        const result = filterFn_equalsStringSensitive(\n          row as any,\n          columnId,\n          filterValue,\n        )\n        expect(result).toBe(false)\n      })\n      it('should not match partial strings', () => {\n        const row = mockRows[0]!\n        const columnId = 'firstName'\n        const filterValue = 'ohn'\n        const result = filterFn_equalsStringSensitive(\n          row as any,\n          columnId,\n          filterValue,\n        )\n        expect(result).toBe(false)\n      })\n    })\n  })\n\n  describe('Number Filters', () => {\n    describe('filterFn_greaterThan', () => {\n      it('should match greater than values', () => {\n        const row = mockRows[0]!\n        const columnId = 'age' // number value 30\n        const filterValue = 29\n        const result = filterFn_greaterThan(row as any, columnId, filterValue)\n        expect(result).toBe(true)\n      })\n      it('should not match equal values', () => {\n        const row = mockRows[0]!\n        const columnId = 'age' // number value 30\n        const filterValue = 30\n        const result = filterFn_greaterThan(row as any, columnId, filterValue)\n        expect(result).toBe(false)\n      })\n      it('should not match less than values', () => {\n        const row = mockRows[0]!\n        const columnId = 'age' // number value 30\n        const filterValue = 31\n        const result = filterFn_greaterThan(row as any, columnId, filterValue)\n        expect(result).toBe(false)\n      })\n      it('should match strings greater than numbers', () => {\n        const row = mockRows[0]!\n        const columnId = 'age' // number value 30\n        const filterValue = '29'\n        const result = filterFn_greaterThan(row as any, columnId, filterValue)\n        expect(result).toBe(true)\n      })\n      it('should not match strings less than numbers', () => {\n        const row = mockRows[0]!\n        const columnId = 'age' // number value 30\n        const filterValue = '31'\n        const result = filterFn_greaterThan(row as any, columnId, filterValue)\n        expect(result).toBe(false)\n      })\n      it('should match strings greater than other strings', () => {\n        const row = mockRows[0]!\n        const columnId = 'firstName' // 'John'\n        const filterValue = 'a'\n        const result = filterFn_greaterThan(row as any, columnId, filterValue)\n        expect(result).toBe(true)\n      })\n      it('should not match strings less than other strings', () => {\n        const row = mockRows[0]!\n        const columnId = 'firstName' // 'John'\n        const filterValue = 'z'\n        const result = filterFn_greaterThan(row as any, columnId, filterValue)\n        expect(result).toBe(false)\n      })\n      it('should not match strings equal to other strings', () => {\n        const row = mockRows[0]!\n        const columnId = 'firstName' // 'John'\n        const filterValue = 'John'\n        const result = filterFn_greaterThan(row as any, columnId, filterValue)\n        expect(result).toBe(false)\n      })\n    })\n    describe('filterFn_greaterThanOrEqualTo', () => {\n      it('should match greater than values', () => {\n        const row = mockRows[0]!\n        const columnId = 'age' // number value 30\n        const filterValue = 29\n        const result = filterFn_greaterThanOrEqualTo(\n          row as any,\n          columnId,\n          filterValue,\n        )\n        expect(result).toBe(true)\n      })\n      it('should match equal values', () => {\n        const row = mockRows[0]!\n        const columnId = 'age' // number value 30\n        const filterValue = 30\n        const result = filterFn_greaterThanOrEqualTo(\n          row as any,\n          columnId,\n          filterValue,\n        )\n        expect(result).toBe(true)\n      })\n      it('should not match less than values', () => {\n        const row = mockRows[0]!\n        const columnId = 'age' // number value 30\n        const filterValue = 31\n        const result = filterFn_greaterThanOrEqualTo(\n          row as any,\n          columnId,\n          filterValue,\n        )\n        expect(result).toBe(false)\n      })\n      it('should match strings greater than to numbers', () => {\n        const row = mockRows[0]!\n        const columnId = 'age' // number value 30\n        const filterValue = '29'\n        const result = filterFn_greaterThanOrEqualTo(\n          row as any,\n          columnId,\n          filterValue,\n        )\n        expect(result).toBe(true)\n      })\n      it('should not match strings less than numbers', () => {\n        const row = mockRows[0]!\n        const columnId = 'age' // number value 30\n        const filterValue = '31'\n        const result = filterFn_greaterThanOrEqualTo(\n          row as any,\n          columnId,\n          filterValue,\n        )\n        expect(result).toBe(false)\n      })\n      it('should match strings greater than other strings', () => {\n        const row = mockRows[0]!\n        const columnId = 'firstName' // 'John'\n        const filterValue = 'a'\n        const result = filterFn_greaterThanOrEqualTo(\n          row as any,\n          columnId,\n          filterValue,\n        )\n        expect(result).toBe(true)\n      })\n      it('should not match strings less than other strings', () => {\n        const row = mockRows[0]!\n        const columnId = 'firstName' // 'John'\n        const filterValue = 'z'\n        const result = filterFn_greaterThanOrEqualTo(\n          row as any,\n          columnId,\n          filterValue,\n        )\n        expect(result).toBe(false)\n      })\n      it('should match strings equal to other strings', () => {\n        const row = mockRows[0]!\n        const columnId = 'firstName' // 'John'\n        const filterValue = 'John'\n        const result = filterFn_greaterThanOrEqualTo(\n          row as any,\n          columnId,\n          filterValue,\n        )\n        expect(result).toBe(true)\n      })\n    })\n    describe('filterFn_lessThan', () => {\n      it('should match less than values', () => {\n        const row = mockRows[0]!\n        const columnId = 'age' // number value 30\n        const filterValue = 31\n        const result = filterFn_lessThan(row as any, columnId, filterValue)\n        expect(result).toBe(true)\n      })\n      it('should not match equal values', () => {\n        const row = mockRows[0]!\n        const columnId = 'age' // number value 30\n        const filterValue = 30\n        const result = filterFn_lessThan(row as any, columnId, filterValue)\n        expect(result).toBe(false)\n      })\n      it('should not match greater than values', () => {\n        const row = mockRows[0]!\n        const columnId = 'age' // number value 30\n        const filterValue = 29\n        const result = filterFn_lessThan(row as any, columnId, filterValue)\n        expect(result).toBe(false)\n      })\n      it('should match strings less than numbers', () => {\n        const row = mockRows[0]!\n        const columnId = 'age' // number value 30\n        const filterValue = '31'\n        const result = filterFn_lessThan(row as any, columnId, filterValue)\n        expect(result).toBe(true)\n      })\n      it('should match strings less than other strings', () => {\n        const row = mockRows[0]!\n        const columnId = 'firstName' // 'John'\n        const filterValue = 'z'\n        const result = filterFn_lessThan(row as any, columnId, filterValue)\n        expect(result).toBe(true)\n      })\n      it('should not match strings equal to other strings', () => {\n        const row = mockRows[0]!\n        const columnId = 'firstName' // 'John'\n        const filterValue = 'John'\n        const result = filterFn_lessThan(row as any, columnId, filterValue)\n        expect(result).toBe(false)\n      })\n      it('should not match strings greater than other strings', () => {\n        const row = mockRows[0]!\n        const columnId = 'firstName' // 'John'\n        const filterValue = 'a'\n        const result = filterFn_lessThan(row as any, columnId, filterValue)\n        expect(result).toBe(false)\n      })\n    })\n    describe('filterFn_lessThanOrEqualTo', () => {\n      it('should match less than values', () => {\n        const row = mockRows[0]!\n        const columnId = 'age' // number value 30\n        const filterValue = 31\n        const result = filterFn_lessThanOrEqualTo(\n          row as any,\n          columnId,\n          filterValue,\n        )\n        expect(result).toBe(true)\n      })\n      it('should match equal values', () => {\n        const row = mockRows[0]!\n        const columnId = 'age' // number value 30\n        const filterValue = 30\n        const result = filterFn_lessThanOrEqualTo(\n          row as any,\n          columnId,\n          filterValue,\n        )\n        expect(result).toBe(true)\n      })\n      it('should not match greater than values', () => {\n        const row = mockRows[0]!\n        const columnId = 'age' // number value 30\n        const filterValue = 29\n        const result = filterFn_lessThanOrEqualTo(\n          row as any,\n          columnId,\n          filterValue,\n        )\n        expect(result).toBe(false)\n      })\n      it('should match strings less than to numbers', () => {\n        const row = mockRows[0]!\n        const columnId = 'age' // number value 30\n        const filterValue = '31'\n        const result = filterFn_lessThanOrEqualTo(\n          row as any,\n          columnId,\n          filterValue,\n        )\n        expect(result).toBe(true)\n      })\n      it('should not match strings greater than numbers', () => {\n        const row = mockRows[0]!\n        const columnId = 'age' // number value 30\n        const filterValue = '29'\n        const result = filterFn_lessThanOrEqualTo(\n          row as any,\n          columnId,\n          filterValue,\n        )\n        expect(result).toBe(false)\n      })\n      it('should match strings less than to other strings', () => {\n        const row = mockRows[0]!\n        const columnId = 'firstName' // 'John'\n        const filterValue = 'z'\n        const result = filterFn_lessThanOrEqualTo(\n          row as any,\n          columnId,\n          filterValue,\n        )\n        expect(result).toBe(true)\n      })\n      it('should not match strings greater than other strings', () => {\n        const row = mockRows[0]!\n        const columnId = 'firstName' // 'John'\n        const filterValue = 'a'\n        const result = filterFn_lessThanOrEqualTo(\n          row as any,\n          columnId,\n          filterValue,\n        )\n        expect(result).toBe(false)\n      })\n      it('should match strings equal to other strings', () => {\n        const row = mockRows[0]!\n        const columnId = 'firstName' // 'John'\n        const filterValue = 'John'\n        const result = filterFn_lessThanOrEqualTo(\n          row as any,\n          columnId,\n          filterValue,\n        )\n        expect(result).toBe(true)\n      })\n    })\n  })\n})\n"
  },
  {
    "path": "packages/table-core/tests/unit/utils.test.ts",
    "content": "import { describe, expect, it } from 'vitest'\nimport { getFunctionNameInfo } from '../../src/utils'\n\n// TODO: add unit tests for rest of utils\n\ndescribe('utils', () => {\n  describe('getFunctionNameInfo', () => {\n    it('should correctly parse a function name with underscore separator', () => {\n      const result = getFunctionNameInfo('table_getRowModel')\n\n      expect(result).toEqual({\n        parentName: 'table',\n        fnKey: 'getRowModel',\n        fnName: 'table.getRowModel',\n      })\n    })\n\n    it('should handle different parent names', () => {\n      const result = getFunctionNameInfo('column_getWidth')\n\n      expect(result).toEqual({\n        parentName: 'column',\n        fnKey: 'getWidth',\n        fnName: 'column.getWidth',\n      })\n    })\n  })\n})\n"
  },
  {
    "path": "packages/table-core/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig.json\",\n  \"include\": [\"src\", \"eslint.config.js\", \"vite.config.ts\", \"tests\"]\n}\n"
  },
  {
    "path": "packages/table-core/vite.config.ts",
    "content": "import { defineConfig, mergeConfig } from 'vitest/config'\nimport { tanstackViteConfig } from '@tanstack/vite-config'\nimport packageJson from './package.json'\n\nconst config = defineConfig({\n  test: {\n    name: packageJson.name,\n    dir: './',\n    watch: false,\n    environment: 'jsdom',\n    setupFiles: ['./tests/fixtures/setup/test-setup.ts'],\n    globals: true,\n  },\n})\n\nexport default mergeConfig(\n  config,\n  tanstackViteConfig({\n    cjs: false,\n    entry: './src/index.ts',\n    srcDir: './src',\n  }),\n)\n"
  },
  {
    "path": "packages/table-devtools/eslint.config.js",
    "content": "// @ts-check\n\nimport rootConfig from '../../eslint.config.js'\n\n/** @type {any} */\nconst config = [\n  ...rootConfig,\n  {\n    rules: {},\n  },\n]\n\nexport default config\n"
  },
  {
    "path": "packages/table-devtools/package.json",
    "content": "{\n  \"name\": \"@tanstack/table-devtools\",\n  \"version\": \"9.0.0-alpha.11\",\n  \"description\": \"Devtools for TanStack Table.\",\n  \"author\": \"Tanner Linsley\",\n  \"license\": \"MIT\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/TanStack/table.git\",\n    \"directory\": \"packages/table-devtools\"\n  },\n  \"homepage\": \"https://tanstack.com/table\",\n  \"funding\": {\n    \"type\": \"github\",\n    \"url\": \"https://github.com/sponsors/tannerlinsley\"\n  },\n  \"keywords\": [\n    \"tanstack\",\n    \"table\",\n    \"devtools\"\n  ],\n  \"scripts\": {\n    \"clean\": \"rimraf ./build && rimraf ./dist\",\n    \"lint:fix\": \"eslint ./src --fix\",\n    \"test:eslint\": \"eslint ./src\",\n    \"test:lib\": \"vitest --passWithNoTests\",\n    \"test:lib:dev\": \"pnpm test:lib --watch\",\n    \"test:types\": \"tsc\",\n    \"test:build\": \"publint --strict\",\n    \"build\": \"vite build\"\n  },\n  \"type\": \"module\",\n  \"types\": \"dist/esm/index.d.ts\",\n  \"module\": \"dist/esm/index.js\",\n  \"exports\": {\n    \".\": {\n      \"import\": {\n        \"types\": \"./dist/esm/index.d.ts\",\n        \"default\": \"./dist/esm/index.js\"\n      }\n    },\n    \"./production\": {\n      \"import\": {\n        \"types\": \"./dist/esm/production.d.ts\",\n        \"default\": \"./dist/esm/production.js\"\n      }\n    },\n    \"./package.json\": \"./package.json\"\n  },\n  \"sideEffects\": false,\n  \"engines\": {\n    \"node\": \">=16\"\n  },\n  \"files\": [\n    \"dist\",\n    \"src\"\n  ],\n  \"dependencies\": {\n    \"@tanstack/devtools-ui\": \"^0.5.0\",\n    \"@tanstack/devtools-utils\": \"^0.3.2\",\n    \"@tanstack/solid-store\": \"^0.9.2\",\n    \"goober\": \"^2.1.18\",\n    \"solid-js\": \"^1.9.11\"\n  },\n  \"peerDependencies\": {\n    \"@tanstack/table-core\": \"workspace:*\"\n  },\n  \"devDependencies\": {\n    \"vite-plugin-solid\": \"^2.11.10\"\n  }\n}\n"
  },
  {
    "path": "packages/table-devtools/src/TableContextProvider.tsx",
    "content": "import {\n  createContext,\n  createEffect,\n  createSignal,\n  onCleanup,\n  useContext,\n} from 'solid-js'\nimport {\n  getTableDevtoolsTarget,\n  subscribeTableDevtoolsTarget,\n} from './tableTarget'\nimport type { Accessor, ParentComponent, Setter } from 'solid-js'\nimport type { RowData, Table, stockFeatures } from '@tanstack/table-core'\n\ntype TableDevtoolsTabId = 'features' | 'state' | 'options' | 'rows' | 'columns'\ntype AnyTable = Table<typeof stockFeatures, RowData>\n\ninterface TableDevtoolsContextValue {\n  table: Accessor<AnyTable | undefined>\n  activeTab: Accessor<TableDevtoolsTabId>\n  setActiveTab: Setter<TableDevtoolsTabId>\n}\n\nconst TableDevtoolsContext = createContext<\n  TableDevtoolsContextValue | undefined\n>(undefined)\n\nexport const TableContextProvider: ParentComponent = (props) => {\n  const [table, setTable] = createSignal<AnyTable | undefined>(\n    getTableDevtoolsTarget(),\n  )\n  const [activeTab, setActiveTab] = createSignal<TableDevtoolsTabId>('features')\n\n  createEffect(() => {\n    const unsubscribe = subscribeTableDevtoolsTarget((nextTable) => {\n      setTable(nextTable)\n    })\n\n    onCleanup(unsubscribe)\n  })\n\n  return (\n    <TableDevtoolsContext.Provider\n      value={{\n        table,\n        activeTab,\n        setActiveTab,\n      }}\n    >\n      {props.children}\n    </TableDevtoolsContext.Provider>\n  )\n}\n\nexport function useTableDevtoolsContext() {\n  const context = useContext(TableDevtoolsContext)\n\n  if (!context) {\n    throw new Error(\n      'useTableDevtoolsContext must be used within TableContextProvider',\n    )\n  }\n\n  return context\n}\n"
  },
  {
    "path": "packages/table-devtools/src/TableDevtools.tsx",
    "content": "import { TableContextProvider } from './TableContextProvider'\nimport { Shell } from './components/Shell'\n\nexport default function TableDevtools() {\n  return (\n    <TableContextProvider>\n      <Shell />\n    </TableContextProvider>\n  )\n}\n"
  },
  {
    "path": "packages/table-devtools/src/components/ColumnsPanel.tsx",
    "content": "import { For } from 'solid-js'\nimport { useTableDevtoolsContext } from '../TableContextProvider'\nimport { useTableStore } from '../useTableStore'\nimport { useStyles } from '../styles/use-styles'\n\nimport type { Column, RowData, TableFeatures } from '@tanstack/table-core'\n\ntype AnyColumn = Column<TableFeatures, RowData, unknown>\n\nfunction getColumnDefSummary(column: AnyColumn): string {\n  const def = column.columnDef as Record<string, unknown>\n  const header = def.header\n  const accessorKey = def.accessorKey\n  const accessorFn = def.accessorFn\n  const parts: Array<string> = []\n  if (typeof accessorKey === 'string') parts.push(`key: ${accessorKey}`)\n  if (typeof accessorFn === 'function') parts.push('accessorFn')\n  if (header !== undefined) {\n    const headerStr =\n      typeof header === 'string'\n        ? header\n        : typeof header === 'function'\n          ? '[fn]'\n          : String(header)\n    parts.push(`header: ${headerStr}`)\n  }\n  return parts.length > 0 ? parts.join(', ') : '-'\n}\n\nexport function ColumnsPanel() {\n  const styles = useStyles()\n  const { table } = useTableDevtoolsContext()\n\n  const tableInstance = table()\n  const tableState = useTableStore(\n    tableInstance ? tableInstance.store : undefined,\n    (state) => state,\n  )\n\n  const getColumns = (): Array<AnyColumn> => {\n    tableState?.()\n    if (!tableInstance) return []\n\n    const tableWithColumnFns = tableInstance as unknown as {\n      getAllFlatColumns?: () => Array<AnyColumn>\n      getAllLeafColumns?: () => Array<AnyColumn>\n    }\n\n    return (\n      tableWithColumnFns.getAllFlatColumns?.() ??\n      tableWithColumnFns.getAllLeafColumns?.() ??\n      []\n    )\n  }\n\n  const columns = getColumns()\n\n  if (!tableInstance) {\n    return (\n      <div class={styles().panelScroll}>\n        <div class={styles().sectionTitle}>Columns</div>\n        <div class={styles().rowModelItem}>\n          No table instance is connected. Pass a table instance to\n          TableDevtoolsPanel.\n        </div>\n      </div>\n    )\n  }\n\n  return (\n    <div class={styles().panelScroll}>\n      <div class={styles().sectionTitle}>Columns ({columns.length})</div>\n      <div class={styles().tableWrapper}>\n        <table class={styles().rowsTable}>\n          <thead>\n            <tr>\n              <th class={styles().headerCell}>#</th>\n              <th class={styles().headerCell}>id</th>\n              <th class={styles().headerCell}>depth</th>\n              <th class={styles().headerCell}>accessor</th>\n              <th class={styles().headerCell}>columnDef</th>\n            </tr>\n          </thead>\n          <tbody>\n            <For each={columns}>\n              {(column, index) => (\n                <tr>\n                  <td class={styles().bodyCellMono}>{index() + 1}</td>\n                  <td class={styles().bodyCellMono}>{column.id}</td>\n                  <td class={styles().bodyCellMono}>{column.depth}</td>\n                  <td class={styles().bodyCellMono}>\n                    {column.accessorFn ? '✓' : '○'}\n                  </td>\n                  <td class={styles().bodyCell}>\n                    {getColumnDefSummary(column)}\n                  </td>\n                </tr>\n              )}\n            </For>\n          </tbody>\n        </table>\n      </div>\n    </div>\n  )\n}\n"
  },
  {
    "path": "packages/table-devtools/src/components/FeaturesPanel.tsx",
    "content": "import { For } from 'solid-js'\nimport { coreFeatures, stockFeatures } from '@tanstack/table-core'\nimport { useTableDevtoolsContext } from '../TableContextProvider'\nimport { useTableStore } from '../useTableStore'\nimport { useStyles } from '../styles/use-styles'\nimport { ResizableSplit } from './ResizableSplit'\n\ntype FnBuckets = Partial<\n  Record<'filterFns' | 'sortFns' | 'aggregationFns', Record<string, unknown>>\n>\n\nfunction toFnBuckets(value: unknown): FnBuckets {\n  return typeof value === 'object' && value != null ? (value as FnBuckets) : {}\n}\n\nconst CORE_FEATURE_NAMES: Array<string> = Object.keys(coreFeatures)\nconst STOCK_FEATURE_NAMES: Array<string> = Object.keys(stockFeatures)\n\nconst ROW_MODEL_TO_FN_KIND: Record<\n  string,\n  'filterFns' | 'sortFns' | 'aggregationFns' | null\n> = {\n  filteredRowModel: 'filterFns',\n  preFilteredRowModel: 'filterFns',\n  sortedRowModel: 'sortFns',\n  preSortedRowModel: 'sortFns',\n  groupedRowModel: 'aggregationFns',\n  preGroupedRowModel: 'aggregationFns',\n}\n\nconst EXECUTION_ORDER_GETTERS = [\n  'getCoreRowModel',\n  'getFilteredRowModel',\n  'getGroupedRowModel',\n  'getSortedRowModel',\n  'getExpandedRowModel',\n  'getPaginatedRowModel',\n  'getRowModel',\n] as const\n\nfunction getterToRowModelKey(getter: string): string | null {\n  if (getter === 'getRowModel') return 'paginatedRowModel'\n  const withoutGet = getter.slice(3)\n  return withoutGet.charAt(0).toLowerCase() + withoutGet.slice(1)\n}\n\nconst ROW_MODEL_TO_GETTER: Record<\n  string,\n  (typeof EXECUTION_ORDER_GETTERS)[number]\n> = {\n  coreRowModel: 'getCoreRowModel',\n  filteredRowModel: 'getFilteredRowModel',\n  preFilteredRowModel: 'getFilteredRowModel',\n  groupedRowModel: 'getGroupedRowModel',\n  preGroupedRowModel: 'getGroupedRowModel',\n  sortedRowModel: 'getSortedRowModel',\n  preSortedRowModel: 'getSortedRowModel',\n  expandedRowModel: 'getExpandedRowModel',\n  paginatedRowModel: 'getRowModel',\n}\n\nfunction getRowCountForModel(\n  tableInstance: { [key: string]: unknown } | undefined,\n  rowModelName: string,\n): number {\n  const getter = ROW_MODEL_TO_GETTER[rowModelName]\n  if (!getter || typeof tableInstance?.[getter] !== 'function') return 0\n  const result = (tableInstance[getter] as () => { rows?: Array<unknown> })()\n  return result?.rows?.length ?? 0\n}\n\nexport function FeaturesPanel() {\n  const styles = useStyles()\n  const { table } = useTableDevtoolsContext()\n\n  const tableInstance = table()\n  const tableState = useTableStore(\n    tableInstance ? tableInstance.store : undefined,\n    (state) => state,\n  )\n\n  const getTableFeatures = (): Set<string> => {\n    tableState?.()\n    return new Set(Object.keys(tableInstance?._features ?? {}))\n  }\n\n  const getRowModelNames = (): Array<string> => {\n    tableState?.()\n    return Object.keys(tableInstance?.options._rowModels ?? {})\n  }\n\n  const getFnNames = (\n    kind: 'filterFns' | 'sortFns' | 'aggregationFns',\n  ): Array<string> => {\n    tableState?.()\n    const rowModelFns = toFnBuckets(tableInstance?._rowModelFns)\n    const optionFns = toFnBuckets(tableInstance?.options)\n    return Object.keys(rowModelFns[kind] ?? optionFns[kind] ?? {})\n  }\n\n  const getAdditionalPlugins = (): Array<string> => {\n    const tableFeatures = getTableFeatures()\n    const knownFeatures = new Set([\n      ...CORE_FEATURE_NAMES,\n      ...STOCK_FEATURE_NAMES,\n    ])\n    return [...tableFeatures].filter((f) => !knownFeatures.has(f)).sort()\n  }\n\n  const getRowModelFunctions = (rowModelName: string): Array<string> => {\n    const fnKind = ROW_MODEL_TO_FN_KIND[rowModelName]\n    if (!fnKind) return []\n    return getFnNames(fnKind)\n  }\n\n  const tableFeatures = getTableFeatures()\n  const rowModelNames = getRowModelNames()\n\n  return (\n    <div class={styles().panelScroll}>\n      <ResizableSplit\n        left={\n          <>\n            <div class={styles().sectionTitle}>Features</div>\n\n            <div class={styles().featureSubsection}>\n              <div class={styles().featureSubsectionTitle}>Core Features</div>\n              <For each={CORE_FEATURE_NAMES}>\n                {(name) => (\n                  <div class={styles().featureListItem}>\n                    <span\n                      class={\n                        tableFeatures.has(name)\n                          ? styles().featureCheck\n                          : styles().featureUncheck\n                      }\n                    >\n                      {tableFeatures.has(name) ? '✓' : '○'}\n                    </span>\n                    {name}\n                  </div>\n                )}\n              </For>\n            </div>\n\n            <div class={styles().featureSubsection}>\n              <div class={styles().featureSubsectionTitle}>Stock Features</div>\n              <For each={STOCK_FEATURE_NAMES}>\n                {(name) => (\n                  <div class={styles().featureListItem}>\n                    <span\n                      class={\n                        tableFeatures.has(name)\n                          ? styles().featureCheck\n                          : styles().featureUncheck\n                      }\n                    >\n                      {tableFeatures.has(name) ? '✓' : '○'}\n                    </span>\n                    {name}\n                  </div>\n                )}\n              </For>\n            </div>\n\n            {getAdditionalPlugins().length > 0 && (\n              <div class={styles().featureSubsection}>\n                <div class={styles().featureSubsectionTitle}>\n                  Additional Plugins\n                </div>\n                <For each={getAdditionalPlugins()}>\n                  {(name) => (\n                    <div class={styles().featureListItem}>\n                      <span class={styles().featureCheck}>✓</span>\n                      {name}\n                    </div>\n                  )}\n                </For>\n              </div>\n            )}\n          </>\n        }\n        right={\n          <>\n            <div class={styles().sectionTitle}>\n              Client Side Row Models and Fns\n            </div>\n            <For each={rowModelNames}>\n              {(rowModelName) => {\n                const fns = getRowModelFunctions(rowModelName)\n                return (\n                  <div>\n                    <div class={styles().rowModelItem}>{rowModelName}</div>\n                    <For each={fns}>\n                      {(fnName) => (\n                        <div class={styles().rowModelFnItem}>{fnName}</div>\n                      )}\n                    </For>\n                  </div>\n                )\n              }}\n            </For>\n            {rowModelNames.length === 0 && (\n              <div class={styles().rowModelItem}>No row models configured</div>\n            )}\n            <div class={styles().rowModelExecutionOrder}>\n              <div class={styles().featureSubsectionTitle}>Execution Order</div>\n              <For each={EXECUTION_ORDER_GETTERS}>\n                {(getter, index) => {\n                  const rowModelKey = getterToRowModelKey(getter)\n                  const isPresent =\n                    rowModelKey !== null && rowModelNames.includes(rowModelKey)\n                  return (\n                    <>\n                      {index() > 0 && ' → '}\n                      <span\n                        class={\n                          isPresent\n                            ? styles().rowModelExecutionOrderBold\n                            : undefined\n                        }\n                      >\n                        {getter}\n                      </span>\n                    </>\n                  )\n                }}\n              </For>\n            </div>\n          </>\n        }\n      />\n    </div>\n  )\n}\n"
  },
  {
    "path": "packages/table-devtools/src/components/OptionsPanel.tsx",
    "content": "import { JsonTree } from '@tanstack/devtools-ui'\nimport { useStore } from '@tanstack/solid-store'\nimport { useTableDevtoolsContext } from '../TableContextProvider'\nimport { useStyles } from '../styles/use-styles'\nimport { ResizableSplit } from './ResizableSplit'\n\nexport function OptionsPanel() {\n  const styles = useStyles()\n  const { table } = useTableDevtoolsContext()\n\n  const tableInstance = table()\n  const tableState = tableInstance\n    ? useStore(\n        tableInstance.optionsStore,\n        ({ state, data, _features, _rowModels, ...options }) => options,\n      )\n    : undefined\n\n  const getState = (): unknown => {\n    tableState?.()\n    if (!tableInstance) {\n      return undefined\n    }\n    return tableState?.()\n  }\n\n  return (\n    <div class={styles().panelScroll}>\n      <ResizableSplit\n        left={\n          <>\n            <div class={styles().sectionTitle}>Options</div>\n            <JsonTree copyable value={getState()} />\n          </>\n        }\n        right={<></>}\n      />\n    </div>\n  )\n}\n"
  },
  {
    "path": "packages/table-devtools/src/components/ResizableSplit.tsx",
    "content": "import { createSignal } from 'solid-js'\nimport { useStyles } from '../styles/use-styles'\nimport type { JSX } from 'solid-js'\n\nconst DEFAULT_LEFT_PERCENT = 50\nconst MIN_PANEL_PERCENT = 15\nconst MAX_PANEL_PERCENT = 85\n\ninterface ResizableSplitProps {\n  left: JSX.Element\n  right: JSX.Element\n}\n\nexport function ResizableSplit(props: ResizableSplitProps) {\n  const styles = useStyles()\n  const [leftPercent, setLeftPercent] = createSignal(DEFAULT_LEFT_PERCENT)\n\n  const handleMouseDown = (e: MouseEvent) => {\n    e.preventDefault()\n\n    const onMouseMove = (moveEvent: MouseEvent) => {\n      const container = (e.target as HTMLElement).parentElement\n      if (!container) return\n\n      const rect = container.getBoundingClientRect()\n      const x = moveEvent.clientX - rect.left\n      const percent = Math.max(\n        MIN_PANEL_PERCENT,\n        Math.min(MAX_PANEL_PERCENT, (x / rect.width) * 100),\n      )\n      setLeftPercent(percent)\n    }\n\n    const onMouseUp = () => {\n      document.removeEventListener('mousemove', onMouseMove)\n      document.removeEventListener('mouseup', onMouseUp)\n      document.body.style.cursor = ''\n      document.body.style.userSelect = ''\n    }\n\n    document.addEventListener('mousemove', onMouseMove)\n    document.addEventListener('mouseup', onMouseUp)\n    document.body.style.cursor = 'col-resize'\n    document.body.style.userSelect = 'none'\n  }\n\n  return (\n    <div class={styles().resizableSplitContainer}>\n      <div\n        class={`${styles().section} ${styles().featuresSection}`}\n        style={{ flex: `0 0 ${leftPercent()}%` }}\n      >\n        {props.left}\n      </div>\n      <div\n        class={styles().resizeHandle}\n        onMouseDown={handleMouseDown}\n        role=\"separator\"\n        aria-orientation=\"vertical\"\n        aria-valuenow={leftPercent()}\n        aria-valuemin={MIN_PANEL_PERCENT}\n        aria-valuemax={MAX_PANEL_PERCENT}\n      />\n      <div\n        class={`${styles().section} ${styles().featuresSection}`}\n        style={{ flex: '1 1 0' }}\n      >\n        {props.right}\n      </div>\n    </div>\n  )\n}\n"
  },
  {
    "path": "packages/table-devtools/src/components/RowsPanel.tsx",
    "content": "import { For, createSignal } from 'solid-js'\nimport { JsonTree } from '@tanstack/devtools-ui'\nimport { useTableDevtoolsContext } from '../TableContextProvider'\nimport { useTableStore } from '../useTableStore'\nimport { useStyles } from '../styles/use-styles'\nimport { ResizableSplit } from './ResizableSplit'\n\nimport type {\n  Cell,\n  Column,\n  Row,\n  RowData,\n  TableFeatures,\n} from '@tanstack/table-core'\n\ntype AnyRow = Row<TableFeatures, RowData>\ntype AnyCell = Cell<TableFeatures, RowData>\ntype AnyColumn = Column<TableFeatures, any>\n\nconst ROW_LIMIT = 100\n\nconst ROW_MODEL_GETTERS = [\n  'getRowModel',\n  'getCoreRowModel',\n  'getFilteredRowModel',\n  'getGroupedRowModel',\n  'getSortedRowModel',\n  'getExpandedRowModel',\n  'getPaginatedRowModel',\n] as const\n\nfunction stringifyValue(value: unknown): string {\n  if (value == null) return ''\n  if (typeof value === 'string') return value\n  if (typeof value === 'number' || typeof value === 'boolean')\n    return String(value)\n  if (value instanceof Date) return value.toISOString()\n\n  try {\n    return JSON.stringify(value)\n  } catch {\n    return String(value)\n  }\n}\n\nexport function RowsPanel() {\n  const styles = useStyles()\n  const { table } = useTableDevtoolsContext()\n  const tableInstance = table()\n  const tableState = useTableStore(\n    tableInstance ? tableInstance.store : undefined,\n    (state) => state,\n  )\n\n  const [selectedRowModel, setSelectedRowModel] =\n    createSignal<(typeof ROW_MODEL_GETTERS)[number]>('getRowModel')\n\n  const getRawData = (): unknown => {\n    tableState?.()\n    if (!tableInstance) {\n      return {\n        message:\n          'No table instance is connected. Pass a table instance to TableDevtoolsPanel.',\n      }\n    }\n    const data = tableInstance.options.data as ReadonlyArray<unknown>\n    if (!Array.isArray(data)) return data\n    if (data.length <= ROW_LIMIT) return data as unknown\n    return data.slice(0, ROW_LIMIT) as unknown\n  }\n\n  const getRawDataTotalCount = (): number => {\n    tableState?.()\n    if (!tableInstance) return 0\n    const data = tableInstance.options.data as ReadonlyArray<unknown>\n    return Array.isArray(data) ? data.length : 0\n  }\n\n  const getColumns = (): Array<AnyColumn> => {\n    tableState?.()\n    if (!tableInstance) return []\n\n    const tableWithColumnFns = tableInstance as unknown as {\n      getVisibleLeafColumns?: () => Array<AnyColumn>\n      getAllLeafColumns?: () => Array<AnyColumn>\n    }\n\n    return (\n      tableWithColumnFns.getVisibleLeafColumns?.() ??\n      tableWithColumnFns.getAllLeafColumns?.() ??\n      []\n    )\n  }\n\n  const getAllRows = (): Array<AnyRow> => {\n    tableState?.()\n    selectedRowModel()\n    const getter = tableInstance?.[selectedRowModel()] as\n      | (() => { rows: Array<AnyRow> })\n      | undefined\n    return getter?.().rows ?? []\n  }\n\n  const getRows = (): Array<AnyRow> => {\n    const rows = getAllRows()\n    return rows.length <= ROW_LIMIT ? rows : rows.slice(0, ROW_LIMIT)\n  }\n\n  const getRowsTotalCount = (): number => getAllRows().length\n\n  const getCells = (row: AnyRow): Array<AnyCell> => {\n    tableState?.()\n    const rowWithMaybeVisibleCells = row as unknown as {\n      getVisibleCells?: () => Array<AnyCell>\n    }\n    return rowWithMaybeVisibleCells.getVisibleCells?.() ?? row.getAllCells()\n  }\n\n  const getAvailableGetters = (): Array<(typeof ROW_MODEL_GETTERS)[number]> => {\n    if (!tableInstance) return []\n    return ROW_MODEL_GETTERS.filter(\n      (name) => typeof tableInstance[name] === 'function',\n    )\n  }\n\n  return (\n    <div class={styles().panelScroll}>\n      <ResizableSplit\n        left={\n          <>\n            <div class={styles().sectionTitle}>\n              Raw Data\n              {getRawDataTotalCount() > ROW_LIMIT && (\n                <span class={styles().rowLimitNote}>\n                  {' '}\n                  (First {ROW_LIMIT} rows)\n                </span>\n              )}\n            </div>\n            <JsonTree copyable value={getRawData()} />\n          </>\n        }\n        right={\n          <>\n            <div class={styles().sectionTitle}>\n              Rows ({getRows().length}\n              {getRowsTotalCount() > ROW_LIMIT && ` of ${getRowsTotalCount()}`})\n              {getRowsTotalCount() > ROW_LIMIT && (\n                <span class={styles().rowLimitNote}>\n                  {' '}\n                  — First {ROW_LIMIT} rows\n                </span>\n              )}\n            </div>\n            <div class={styles().rowModelSelectRow}>\n              <label for=\"row-model-select\">View:</label>\n              <select\n                id=\"row-model-select\"\n                class={styles().rowModelSelect}\n                value={selectedRowModel()}\n                onChange={(e) =>\n                  setSelectedRowModel(\n                    e.currentTarget.value as (typeof ROW_MODEL_GETTERS)[number],\n                  )\n                }\n              >\n                <For each={getAvailableGetters()}>\n                  {(getterName) => (\n                    <option value={getterName}>{getterName}</option>\n                  )}\n                </For>\n              </select>\n            </div>\n            <div class={styles().tableWrapper}>\n              <table class={styles().rowsTable}>\n                <thead>\n                  <tr>\n                    <th class={styles().headerCell}>#</th>\n                    <For each={getColumns()}>\n                      {(column) => (\n                        <th class={styles().headerCell}>{column.id}</th>\n                      )}\n                    </For>\n                  </tr>\n                </thead>\n                <tbody>\n                  <For each={getRows()}>\n                    {(row) => (\n                      <tr>\n                        <td class={styles().bodyCellMono}>{row.id}</td>\n                        <For each={getCells(row)}>\n                          {(cell) => (\n                            <td class={styles().bodyCell}>\n                              {stringifyValue(cell.getValue())}\n                            </td>\n                          )}\n                        </For>\n                      </tr>\n                    )}\n                  </For>\n                </tbody>\n              </table>\n            </div>\n          </>\n        }\n      />\n    </div>\n  )\n}\n"
  },
  {
    "path": "packages/table-devtools/src/components/Shell.tsx",
    "content": "import { Match, Switch } from 'solid-js'\nimport { Header, HeaderLogo, MainPanel } from '@tanstack/devtools-ui'\nimport { useTableDevtoolsContext } from '../TableContextProvider'\nimport { useStyles } from '../styles/use-styles'\nimport { ColumnsPanel } from './ColumnsPanel'\nimport { FeaturesPanel } from './FeaturesPanel'\nimport { RowsPanel } from './RowsPanel'\nimport { StatePanel } from './StatePanel'\nimport { OptionsPanel } from './OptionsPanel'\n\nconst tabs = [\n  { id: 'features', label: 'Features' },\n  { id: 'state', label: 'State' },\n  { id: 'options', label: 'Options' },\n  { id: 'rows', label: 'Rows' },\n  { id: 'columns', label: 'Columns' },\n] as const\n\nexport function Shell() {\n  const styles = useStyles()\n  const { activeTab, setActiveTab } = useTableDevtoolsContext()\n\n  return (\n    <MainPanel>\n      <Header>\n        <HeaderLogo\n          flavor={{ light: '#06b6d4', dark: '#2563eb' }}\n          onClick={() => {\n            window.open('https://tanstack.com/table', '_blank')\n          }}\n        >\n          TanStack Table\n        </HeaderLogo>\n      </Header>\n\n      <div class={styles().mainContainer}>\n        <div class={styles().tabBar}>\n          {tabs.map((tab) => (\n            <button\n              type=\"button\"\n              class={`${styles().tabButton} ${\n                activeTab() === tab.id ? styles().tabButtonActive : ''\n              }`}\n              onClick={() => setActiveTab(tab.id)}\n            >\n              {tab.label}\n            </button>\n          ))}\n        </div>\n\n        <div class={styles().contentArea}>\n          <Switch>\n            <Match when={activeTab() === 'features'}>\n              <FeaturesPanel />\n            </Match>\n            <Match when={activeTab() === 'state'}>\n              <StatePanel />\n            </Match>\n            <Match when={activeTab() === 'options'}>\n              <OptionsPanel />\n            </Match>\n            <Match when={activeTab() === 'rows'}>\n              <RowsPanel />\n            </Match>\n            <Match when={activeTab() === 'columns'}>\n              <ColumnsPanel />\n            </Match>\n          </Switch>\n        </div>\n      </div>\n    </MainPanel>\n  )\n}\n"
  },
  {
    "path": "packages/table-devtools/src/components/StatePanel.tsx",
    "content": "import { For, createSignal } from 'solid-js'\nimport { JsonTree } from '@tanstack/devtools-ui'\nimport { useTableDevtoolsContext } from '../TableContextProvider'\nimport { useTableStore } from '../useTableStore'\nimport { useStyles } from '../styles/use-styles'\nimport { ResizableSplit } from './ResizableSplit'\n\nexport function StatePanel() {\n  const styles = useStyles()\n  const { table } = useTableDevtoolsContext()\n  const [initialStateCopied, setInitialStateCopied] = createSignal(false)\n  const [stateCopied, setStateCopied] = createSignal(false)\n  const [pasteError, setPasteError] = createSignal<string | null>(null)\n\n  const tableInstance = table()\n  const tableState = useTableStore(\n    tableInstance ? tableInstance.store : undefined,\n    (state) => state,\n  )\n\n  const getInitialState = (): unknown => {\n    tableState?.()\n    if (!tableInstance) {\n      return {\n        message:\n          'No table instance is connected. Pass a table instance to TableDevtoolsPanel.',\n      }\n    }\n    return tableInstance.initialState as unknown\n  }\n\n  const getState = (): unknown => {\n    tableState?.()\n    if (!tableInstance) {\n      return undefined\n    }\n    return tableInstance.store.state as unknown\n  }\n\n  const copyToClipboard = async (\n    value: unknown,\n    setCopied: (v: boolean) => void,\n  ) => {\n    try {\n      await navigator.clipboard.writeText(JSON.stringify(value, null, 2))\n      setCopied(true)\n      setTimeout(() => setCopied(false), 1500)\n    } catch {\n      // Clipboard API may fail in some contexts\n    }\n  }\n\n  const handlePaste = async () => {\n    if (!tableInstance) return\n    setPasteError(null)\n    try {\n      const text = await navigator.clipboard.readText()\n      const parsed = JSON.parse(text)\n      if (\n        typeof parsed !== 'object' ||\n        parsed === null ||\n        Array.isArray(parsed)\n      ) {\n        setPasteError('Invalid state: must be a JSON object')\n        return\n      }\n      tableInstance.baseStore.setState(() => ({\n        ...tableInstance.store.state,\n        ...parsed,\n      }))\n    } catch (e) {\n      setPasteError(\n        e instanceof Error ? e.message : 'Failed to parse clipboard',\n      )\n    }\n  }\n\n  const handleReset = () => {\n    tableInstance?.reset()\n  }\n\n  const getStateSummaries = (): Array<{ key: string; summary: string }> => {\n    const state = getState() as Record<string, unknown> | undefined\n    if (!state || typeof state !== 'object') return []\n\n    const summaries: Array<{ key: string; summary: string }> = []\n\n    if (Array.isArray(state.sorting) && state.sorting.length > 0) {\n      const parts = (state.sorting as Array<{ id: string; desc: boolean }>).map(\n        (s) => `${s.id} (${s.desc ? 'desc' : 'asc'})`,\n      )\n      summaries.push({\n        key: 'sorting',\n        summary: `${state.sorting.length} column(s) sorted: ${parts.join(', ')}`,\n      })\n    }\n\n    if (Array.isArray(state.columnFilters) && state.columnFilters.length > 0) {\n      const parts = (\n        state.columnFilters as Array<{ id: string; value: unknown }>\n      ).map((f) => `${f.id}=${JSON.stringify(f.value)}`)\n      summaries.push({\n        key: 'columnFilters',\n        summary: `${state.columnFilters.length} filter(s): ${parts.join(', ')}`,\n      })\n    }\n\n    if (\n      state.rowSelection &&\n      typeof state.rowSelection === 'object' &&\n      !Array.isArray(state.rowSelection)\n    ) {\n      const count = Object.keys(\n        state.rowSelection as Record<string, unknown>,\n      ).filter((k) => (state.rowSelection as Record<string, boolean>)[k]).length\n      summaries.push({\n        key: 'rowSelection',\n        summary: `${count} row(s) selected`,\n      })\n    }\n\n    if (\n      state.pagination &&\n      typeof state.pagination === 'object' &&\n      !Array.isArray(state.pagination)\n    ) {\n      const p = state.pagination as { pageIndex?: number; pageSize?: number }\n      summaries.push({\n        key: 'pagination',\n        summary: `Page ${(p.pageIndex ?? 0) + 1}, size ${p.pageSize ?? 10}`,\n      })\n    }\n\n    if (Array.isArray(state.grouping) && state.grouping.length > 0) {\n      summaries.push({\n        key: 'grouping',\n        summary: `Grouped by: ${(state.grouping as Array<string>).join(', ')}`,\n      })\n    }\n\n    if (\n      state.columnPinning &&\n      typeof state.columnPinning === 'object' &&\n      !Array.isArray(state.columnPinning)\n    ) {\n      const p = state.columnPinning as {\n        left?: Array<string>\n        right?: Array<string>\n      }\n      const left = p.left?.length ?? 0\n      const right = p.right?.length ?? 0\n      summaries.push({\n        key: 'columnPinning',\n        summary: `${left} left, ${right} right pinned`,\n      })\n    }\n\n    if (state.expanded !== undefined && state.expanded !== null) {\n      if (state.expanded === true) {\n        summaries.push({ key: 'expanded', summary: 'All expanded' })\n      } else if (\n        typeof state.expanded === 'object' &&\n        !Array.isArray(state.expanded)\n      ) {\n        const count = Object.keys(\n          state.expanded as Record<string, unknown>,\n        ).filter((k) => (state.expanded as Record<string, boolean>)[k]).length\n        summaries.push({\n          key: 'expanded',\n          summary: `${count} row(s) expanded`,\n        })\n      }\n    }\n\n    if ('globalFilter' in state) {\n      const val = state.globalFilter\n      const str =\n        val === undefined || val === null\n          ? 'Not set'\n          : typeof val === 'string'\n            ? val\n              ? `\"${val}\"`\n              : '(empty)'\n            : JSON.stringify(val)\n      summaries.push({ key: 'globalFilter', summary: str })\n    }\n\n    if (\n      state.columnVisibility &&\n      typeof state.columnVisibility === 'object' &&\n      !Array.isArray(state.columnVisibility)\n    ) {\n      const hidden = Object.entries(\n        state.columnVisibility as Record<string, boolean>,\n      ).filter(([, v]) => v === false).length\n      if (hidden > 0) {\n        summaries.push({\n          key: 'columnVisibility',\n          summary: `${hidden} column(s) hidden`,\n        })\n      }\n    }\n\n    if (Array.isArray(state.columnOrder) && state.columnOrder.length > 0) {\n      summaries.push({\n        key: 'columnOrder',\n        summary: `Custom order (${state.columnOrder.length} columns)`,\n      })\n    }\n\n    return summaries\n  }\n\n  const stateSummaries = getStateSummaries()\n\n  return (\n    <div class={styles().panelScroll}>\n      <ResizableSplit\n        left={\n          <>\n            <div class={styles().sectionTitle}>initialState</div>\n            <div class={styles().buttonRow}>\n              <button\n                type=\"button\"\n                class={styles().copyButton}\n                onClick={() =>\n                  copyToClipboard(getInitialState(), setInitialStateCopied)\n                }\n                disabled={!tableInstance}\n              >\n                {initialStateCopied() ? 'Copied!' : 'Copy'}\n              </button>\n            </div>\n            <JsonTree copyable value={getInitialState()} />\n          </>\n        }\n        right={\n          <>\n            <div class={styles().sectionTitle}>State</div>\n            <div class={styles().buttonRow}>\n              <button\n                type=\"button\"\n                class={styles().resetButton}\n                onClick={handleReset}\n                disabled={!tableInstance}\n              >\n                Reset to initialState\n              </button>\n              <button\n                type=\"button\"\n                class={styles().copyButton}\n                onClick={() => copyToClipboard(getState(), setStateCopied)}\n                disabled={!tableInstance}\n              >\n                {stateCopied() ? 'Copied!' : 'Copy'}\n              </button>\n              <button\n                type=\"button\"\n                class={styles().pasteButton}\n                onClick={handlePaste}\n                disabled={!tableInstance}\n              >\n                Paste\n              </button>\n            </div>\n            {pasteError() && (\n              <div class={styles().pasteError}>{pasteError()}</div>\n            )}\n            {stateSummaries.length > 0 && (\n              <details class={styles().summarySection} open>\n                <summary class={styles().featureSubsectionTitle}>\n                  State Summary\n                </summary>\n                <For each={stateSummaries}>\n                  {(item) => (\n                    <div class={styles().summaryItem}>\n                      <strong>{item.key}:</strong> {item.summary}\n                    </div>\n                  )}\n                </For>\n              </details>\n            )}\n            <JsonTree copyable value={getState()} />\n          </>\n        }\n      />\n    </div>\n  )\n}\n"
  },
  {
    "path": "packages/table-devtools/src/core.tsx",
    "content": "import { constructCoreClass } from '@tanstack/devtools-utils/solid'\nimport { lazy } from 'solid-js'\n\nconst Component = lazy(() => import('./TableDevtools'))\n\nexport interface TableDevtoolsInit {}\n\nconst [TableDevtoolsCore, TableDevtoolsCoreNoOp] = constructCoreClass(\n  Component.preload,\n)\n\nexport { TableDevtoolsCore, TableDevtoolsCoreNoOp }\n"
  },
  {
    "path": "packages/table-devtools/src/index.ts",
    "content": "'use client'\n\nimport * as Devtools from './core'\n\nexport const TableDevtoolsCore =\n  process.env.NODE_ENV !== 'development'\n    ? Devtools.TableDevtoolsCoreNoOp\n    : Devtools.TableDevtoolsCore\n\nexport type { TableDevtoolsInit } from './core'\nexport { setTableDevtoolsTarget } from './tableTarget'\n"
  },
  {
    "path": "packages/table-devtools/src/production.ts",
    "content": "'use client'\n\nexport { TableDevtoolsCore } from './core'\n\nexport type { TableDevtoolsInit } from './core'\nexport { setTableDevtoolsTarget } from './tableTarget'\n"
  },
  {
    "path": "packages/table-devtools/src/styles/tokens.ts",
    "content": "export const tokens = {\n  colors: {\n    white: '#ffffff',\n    black: '#000000',\n    gray: {\n      100: '#f8fafc',\n      200: '#e2e8f0',\n      300: '#cbd5e1',\n      500: '#64748b',\n      700: '#334155',\n      900: '#0f172a',\n    },\n    darkGray: {\n      600: '#475569',\n      700: '#334155',\n      800: '#1e293b',\n      900: '#0f172a',\n    },\n    red: {\n      300: '#fca5a5',\n      500: '#ef4444',\n      700: '#b91c1c',\n    },\n    blue: {\n      300: '#93c5fd',\n      500: '#3b82f6',\n      700: '#1d4ed8',\n    },\n  },\n  alpha: {\n    20: '33',\n  },\n  size: {\n    1: '4px',\n    2: '8px',\n    3: '12px',\n    4: '16px',\n  },\n  border: {\n    radius: {\n      sm: '4px',\n      md: '6px',\n      lg: '8px',\n    },\n  },\n  font: {\n    size: {\n      xs: '11px',\n      sm: '12px',\n      md: '14px',\n    },\n    weight: {\n      normal: 400,\n      semibold: 600,\n      bold: 700,\n    },\n    family: {\n      sans: 'ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif',\n      mono: 'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace',\n    },\n  },\n}\n"
  },
  {
    "path": "packages/table-devtools/src/styles/use-styles.ts",
    "content": "import * as goober from 'goober'\nimport { createEffect, createSignal } from 'solid-js'\nimport { useTheme } from '@tanstack/devtools-ui'\nimport { tokens } from './tokens'\n\nconst stylesFactory = (theme: 'light' | 'dark') => {\n  const { colors, size, border, font, alpha } = tokens\n  const css = goober.css\n  const t = (light: string, dark: string) => (theme === 'light' ? light : dark)\n\n  return {\n    mainContainer: css`\n      display: flex;\n      flex: 1;\n      min-height: 0;\n      flex-direction: column;\n      overflow: hidden;\n      padding: ${size[2]};\n      gap: ${size[2]};\n      font-family: ${font.family.sans};\n    `,\n    tabBar: css`\n      display: flex;\n      gap: ${size[2]};\n      align-items: center;\n      flex-wrap: wrap;\n    `,\n    tabButton: css`\n      border: 1px solid ${t(colors.gray[300], colors.darkGray[600])};\n      border-radius: ${border.radius.md};\n      background: ${t(colors.gray[100], colors.darkGray[800])};\n      color: ${t(colors.gray[700], colors.gray[200])};\n      font-size: ${font.size.sm};\n      font-weight: ${font.weight.semibold};\n      padding: ${size[2]} ${size[3]};\n      cursor: pointer;\n      transition:\n        background 0.15s ease,\n        border-color 0.15s ease;\n\n      &:hover {\n        background: ${t(colors.gray[200], colors.darkGray[700])};\n      }\n    `,\n    tabButtonActive: css`\n      background: ${t(\n        colors.red[500] + alpha[20],\n        colors.red[700] + alpha[20],\n      )};\n      border-color: ${t(colors.red[500], colors.red[300])};\n      color: ${t(colors.red[700], colors.red[300])};\n    `,\n    contentArea: css`\n      flex: 1;\n      min-height: 0;\n      border: 1px solid ${t(colors.gray[200], colors.darkGray[700])};\n      border-radius: ${border.radius.lg};\n      background: ${t(colors.gray[100], colors.darkGray[800])};\n      overflow: hidden;\n    `,\n    panelScroll: css`\n      height: 100%;\n      overflow: auto;\n      padding: ${size[3]};\n      display: flex;\n      flex-direction: column;\n      gap: ${size[3]};\n    `,\n    section: css`\n      border: 1px solid ${t(colors.gray[200], colors.darkGray[700])};\n      border-radius: ${border.radius.md};\n      background: ${t(colors.white, colors.darkGray[900])};\n      padding: ${size[3]};\n    `,\n    sectionTitle: css`\n      font-size: ${font.size.md};\n      font-weight: ${font.weight.bold};\n      margin-bottom: ${size[2]};\n      color: ${t(colors.gray[900], colors.gray[100])};\n    `,\n    tableWrapper: css`\n      overflow: auto;\n      border: 1px solid ${t(colors.gray[200], colors.darkGray[700])};\n      border-radius: ${border.radius.sm};\n    `,\n    rowsTable: css`\n      width: 100%;\n      border-collapse: collapse;\n      font-size: ${font.size.sm};\n    `,\n    headerCell: css`\n      text-align: left;\n      padding: ${size[2]};\n      border-bottom: 1px solid ${t(colors.gray[200], colors.darkGray[700])};\n      border-right: 1px solid ${t(colors.gray[200], colors.darkGray[700])};\n      white-space: nowrap;\n      background: ${t(colors.gray[100], colors.darkGray[800])};\n      color: ${t(colors.gray[900], colors.gray[100])};\n      font-weight: ${font.weight.semibold};\n    `,\n    bodyCell: css`\n      padding: ${size[2]};\n      border-bottom: 1px solid ${t(colors.gray[200], colors.darkGray[700])};\n      border-right: 1px solid ${t(colors.gray[200], colors.darkGray[700])};\n      color: ${t(colors.gray[900], colors.gray[100])};\n      vertical-align: top;\n      min-width: 120px;\n      white-space: pre-wrap;\n      word-break: break-word;\n    `,\n    bodyCellMono: css`\n      padding: ${size[2]};\n      border-bottom: 1px solid ${t(colors.gray[200], colors.darkGray[700])};\n      border-right: 1px solid ${t(colors.gray[200], colors.darkGray[700])};\n      color: ${t(colors.gray[700], colors.gray[300])};\n      font-family: ${font.family.mono};\n      vertical-align: top;\n      white-space: nowrap;\n    `,\n    featuresSplitContainer: css`\n      display: flex;\n      flex-direction: row;\n      flex: 1;\n      min-height: 0;\n      overflow: hidden;\n      gap: ${size[3]};\n    `,\n    resizableSplitContainer: css`\n      display: flex;\n      flex-direction: row;\n      flex: 1;\n      min-height: 0;\n      overflow: hidden;\n    `,\n    resizeHandle: css`\n      flex: 0 0 6px;\n      min-width: 6px;\n      cursor: col-resize;\n      background: ${t(colors.gray[200], colors.darkGray[700])};\n      transition: background 0.15s ease;\n\n      &:hover {\n        background: ${t(colors.gray[300], colors.darkGray[600])};\n      }\n\n      &:active {\n        background: ${t(colors.blue[500], colors.blue[500])};\n      }\n    `,\n    featuresSection: css`\n      flex: 1;\n      min-width: 0;\n      min-height: 0;\n      overflow: auto;\n    `,\n    featureSubsection: css`\n      margin-bottom: ${size[3]};\n    `,\n    featureSubsectionTitle: css`\n      font-size: ${font.size.sm};\n      font-weight: ${font.weight.semibold};\n      margin-bottom: ${size[2]};\n      color: ${t(colors.gray[700], colors.gray[300])};\n    `,\n    featureListItem: css`\n      display: flex;\n      align-items: center;\n      gap: ${size[2]};\n      padding: ${size[1]} 0;\n      font-size: ${font.size.sm};\n      font-family: ${font.family.mono};\n      color: ${t(colors.gray[700], colors.gray[200])};\n    `,\n    featureCheck: css`\n      color: ${t('#16a34a', '#4ade80')};\n      flex-shrink: 0;\n    `,\n    featureUncheck: css`\n      color: ${t(colors.gray[500], colors.darkGray[600])};\n      flex-shrink: 0;\n    `,\n    rowModelItem: css`\n      padding: ${size[1]} 0;\n      font-size: ${font.size.sm};\n      font-family: ${font.family.mono};\n      color: ${t(colors.gray[700], colors.gray[200])};\n    `,\n    rowModelFnItem: css`\n      padding: ${size[1]} 0 ${size[1]} ${size[4]};\n      font-size: ${font.size.sm};\n      font-family: ${font.family.mono};\n      color: ${t(colors.gray[500], colors.gray[300])};\n    `,\n    rowModelExecutionOrder: css`\n      margin-top: ${size[3]};\n      padding-top: ${size[3]};\n      border-top: 1px solid ${t(colors.gray[200], colors.darkGray[700])};\n      font-size: ${font.size.xs};\n      font-family: ${font.family.mono};\n      color: ${t(colors.gray[500], colors.darkGray[600])};\n      line-height: 1.5;\n    `,\n    rowModelExecutionOrderBold: css`\n      font-weight: ${font.weight.bold};\n      color: ${t(colors.gray[700], colors.gray[200])};\n    `,\n    rowModelSelectRow: css`\n      display: flex;\n      align-items: center;\n      gap: ${size[2]};\n      margin-bottom: ${size[2]};\n    `,\n    rowModelSelect: css`\n      border: 1px solid ${t(colors.gray[300], colors.darkGray[600])};\n      border-radius: ${border.radius.md};\n      background: ${t(colors.gray[100], colors.darkGray[800])};\n      color: ${t(colors.gray[700], colors.gray[200])};\n      font-size: ${font.size.sm};\n      font-family: ${font.family.mono};\n      padding: ${size[2]} ${size[3]};\n      cursor: pointer;\n    `,\n    rowLimitNote: css`\n      font-weight: ${font.weight.normal};\n      color: ${t(colors.gray[500], colors.darkGray[600])};\n      font-size: ${font.size.sm};\n    `,\n    buttonRow: css`\n      display: flex;\n      gap: ${size[2]};\n      margin-bottom: ${size[2]};\n      flex-wrap: wrap;\n    `,\n    copyButton: css`\n      border: 1px solid ${t(colors.gray[300], colors.darkGray[600])};\n      border-radius: ${border.radius.md};\n      background: ${t(colors.gray[100], colors.darkGray[800])};\n      color: ${t(colors.gray[700], colors.gray[200])};\n      font-size: ${font.size.sm};\n      padding: ${size[1]} ${size[2]};\n      cursor: pointer;\n\n      &:hover {\n        background: ${t(colors.gray[200], colors.darkGray[700])};\n      }\n    `,\n    pasteButton: css`\n      border: 1px solid ${t(colors.gray[300], colors.darkGray[600])};\n      border-radius: ${border.radius.md};\n      background: ${t(colors.gray[100], colors.darkGray[800])};\n      color: ${t(colors.gray[700], colors.gray[200])};\n      font-size: ${font.size.sm};\n      padding: ${size[1]} ${size[2]};\n      cursor: pointer;\n\n      &:hover {\n        background: ${t(colors.gray[200], colors.darkGray[700])};\n      }\n    `,\n    resetButton: css`\n      border: 1px solid ${t(colors.red[300], colors.red[700])};\n      border-radius: ${border.radius.md};\n      background: ${t(colors.gray[100], colors.darkGray[800])};\n      color: ${t(colors.red[700], colors.red[300])};\n      font-size: ${font.size.sm};\n      padding: ${size[1]} ${size[2]};\n      cursor: pointer;\n\n      &:hover {\n        background: ${t(colors.gray[200], colors.darkGray[700])};\n      }\n    `,\n    summarySection: css`\n      margin-bottom: ${size[3]};\n    `,\n    summaryItem: css`\n      font-size: ${font.size.sm};\n      color: ${t(colors.gray[700], colors.gray[200])};\n      margin-bottom: ${size[1]};\n    `,\n    pasteError: css`\n      font-size: ${font.size.sm};\n      color: ${t(colors.red[700], colors.red[300])};\n      margin-top: ${size[2]};\n    `,\n  }\n}\n\nexport function useStyles() {\n  const { theme } = useTheme()\n  const [styles, setStyles] = createSignal(stylesFactory(theme()))\n\n  createEffect(() => {\n    setStyles(stylesFactory(theme()))\n  })\n\n  return styles\n}\n"
  },
  {
    "path": "packages/table-devtools/src/tableTarget.ts",
    "content": "import type { RowData, Table, TableFeatures } from '@tanstack/table-core'\n\ntype AnyTable = Table<TableFeatures, RowData>\ntype Listener = (table: AnyTable | undefined) => void\n\nlet currentTable: AnyTable | undefined\nconst listeners = new Set<Listener>()\n\nexport function setTableDevtoolsTarget(table: Table<any, any> | undefined) {\n  currentTable = table\n  for (const listener of listeners) {\n    listener(currentTable)\n  }\n}\n\nexport function getTableDevtoolsTarget() {\n  return currentTable\n}\n\nexport function subscribeTableDevtoolsTarget(listener: Listener) {\n  listeners.add(listener)\n  return () => {\n    listeners.delete(listener)\n  }\n}\n"
  },
  {
    "path": "packages/table-devtools/src/useTableStore.ts",
    "content": "import { createSignal, onCleanup } from 'solid-js'\n\n/**\n * Subscribes to a table store and returns a reactive signal.\n * Handles both subscribe APIs: function return (store 0.8.x) and\n * { unsubscribe } object return (store 0.9.x).\n */\nexport function useTableStore<T, U>(\n  store:\n    | { state: T; subscribe: (listener: () => void) => unknown }\n    | null\n    | undefined,\n  selector: (state: T) => U = (s) => s as unknown as U,\n): (() => U) | undefined {\n  if (!store) return undefined\n\n  const [signal, setSignal] = createSignal(selector(store.state))\n  const result = store.subscribe(() => {\n    setSignal(() => selector(store.state))\n  })\n\n  onCleanup(() => {\n    if (typeof result === 'function') {\n      ;(result as () => void)()\n    } else if (\n      result &&\n      typeof (result as { unsubscribe?: () => void }).unsubscribe === 'function'\n    ) {\n      ;(result as { unsubscribe: () => void }).unsubscribe()\n    }\n  })\n\n  return signal\n}\n"
  },
  {
    "path": "packages/table-devtools/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig.json\",\n  \"compilerOptions\": {\n    \"jsx\": \"preserve\",\n    \"jsxImportSource\": \"solid-js\"\n  },\n  \"include\": [\"src\", \"eslint.config.js\", \"vite.config.ts\", \"tests\"]\n}\n"
  },
  {
    "path": "packages/table-devtools/vite.config.ts",
    "content": "import { defineConfig, mergeConfig } from 'vitest/config'\nimport { tanstackViteConfig } from '@tanstack/vite-config'\nimport solid from 'vite-plugin-solid'\nimport packageJson from './package.json'\n\nconst config = defineConfig({\n  plugins: [solid()],\n  test: {\n    name: packageJson.name,\n    dir: './tests',\n    watch: false,\n    environment: 'jsdom',\n    globals: true,\n  },\n})\n\nexport default mergeConfig(\n  config,\n  tanstackViteConfig({\n    cjs: false,\n    entry: ['./src/index.ts', './src/production.ts'],\n    srcDir: './src',\n  }),\n)\n"
  },
  {
    "path": "packages/vue-table/eslint.config.js",
    "content": "// @ts-check\n\nimport pluginVue from 'eslint-plugin-vue'\nimport rootConfig from '../../eslint.config.js'\n\nexport default [...rootConfig, ...pluginVue.configs['flat/base']]\n"
  },
  {
    "path": "packages/vue-table/package.json",
    "content": "{\n  \"name\": \"@tanstack/vue-table\",\n  \"version\": \"9.0.0-alpha.10\",\n  \"description\": \"Headless UI for building powerful tables & datagrids for Vue.\",\n  \"author\": \"Tanner Linsley\",\n  \"license\": \"MIT\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/TanStack/table.git\",\n    \"directory\": \"packages/vue-table\"\n  },\n  \"homepage\": \"https://tanstack.com/table\",\n  \"funding\": {\n    \"type\": \"github\",\n    \"url\": \"https://github.com/sponsors/tannerlinsley\"\n  },\n  \"keywords\": [\n    \"vue\",\n    \"table\",\n    \"vue-table\",\n    \"datagrid\"\n  ],\n  \"type\": \"module\",\n  \"types\": \"dist/esm/index.d.ts\",\n  \"main\": \"dist/esm/index.js\",\n  \"module\": \"dist/esm/index.js\",\n  \"exports\": {\n    \".\": {\n      \"import\": {\n        \"types\": \"./dist/esm/index.d.ts\",\n        \"default\": \"./dist/esm/index.js\"\n      }\n    },\n    \"./package.json\": \"./package.json\"\n  },\n  \"sideEffects\": false,\n  \"engines\": {\n    \"node\": \">=16\"\n  },\n  \"files\": [\n    \"dist\",\n    \"src\"\n  ],\n  \"scripts\": {\n    \"clean\": \"rimraf ./build && rimraf ./dist\",\n    \"test:eslint\": \"eslint ./src\",\n    \"test:types\": \"tsc\",\n    \"test:build\": \"publint --strict\",\n    \"build\": \"vite build\"\n  },\n  \"dependencies\": {\n    \"@tanstack/table-core\": \"workspace:*\",\n    \"@tanstack/vue-store\": \"^0.9.2\"\n  },\n  \"devDependencies\": {\n    \"@vitejs/plugin-vue\": \"^6.0.3\",\n    \"eslint-plugin-vue\": \"^10.7.0\",\n    \"vue\": \"^3.5.27\"\n  },\n  \"peerDependencies\": {\n    \"vue\": \">=3.2\"\n  }\n}\n"
  },
  {
    "path": "packages/vue-table/src/FlexRender.ts",
    "content": "import { defineComponent, h } from 'vue'\n\nexport const FlexRender = defineComponent({\n  props: ['render', 'props'],\n  setup: (props: { render: any; props: any }) => {\n    return () => {\n      if (\n        typeof props.render === 'function' ||\n        typeof props.render === 'object'\n      ) {\n        return h(props.render, props.props)\n      }\n\n      return props.render\n    }\n  },\n})\n"
  },
  {
    "path": "packages/vue-table/src/createTableHelper.ts",
    "content": "import { constructTableHelper } from '@tanstack/table-core'\nimport { useTable } from './useTable'\nimport type { TableOptionsWithReactiveData, VueTable } from './useTable'\nimport type {\n  RowData,\n  TableFeatures,\n  TableHelperOptions,\n  TableHelper_Core,\n  TableState,\n} from '@tanstack/table-core'\n\nexport type TableHelper<\n  TFeatures extends TableFeatures,\n  TData extends RowData = any,\n> = Omit<TableHelper_Core<TFeatures>, 'tableCreator'> & {\n  useTable: <TSelected = {}>(\n    tableOptions: Omit<\n      TableOptionsWithReactiveData<TFeatures, TData>,\n      '_features' | '_rowModels'\n    >,\n    selector?: (state: TableState<TFeatures>) => TSelected,\n  ) => VueTable<TFeatures, TData, TSelected>\n}\n\nexport function createTableHelper<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  tableHelperOptions: TableHelperOptions<TFeatures>,\n): TableHelper<TFeatures, TData> {\n  const tableHelper = constructTableHelper(useTable as any, tableHelperOptions)\n  return {\n    ...tableHelper,\n    useTable: <TSelected = {}>(\n      tableOptions: Omit<\n        TableOptionsWithReactiveData<TFeatures, TData>,\n        '_features' | '_rowModels'\n      >,\n      selector?: (state: TableState<TFeatures>) => TSelected,\n    ) => {\n      return useTable<TFeatures, TData, TSelected>(\n        {\n          ...tableHelper.options,\n          ...tableOptions,\n        } as TableOptionsWithReactiveData<TFeatures, TData>,\n        selector,\n      )\n    },\n  }\n}\n\n// test\n\n// type Person = {\n//   firstName: string\n//   lastName: string\n//   age: number\n// }\n\n// const tableHelper = createTableHelper({\n//   _features: { rowSelectionFeature: {} },\n//   TData: {} as Person,\n// })\n\n// const columns = [\n//   tableHelper.columnHelper.accessor('firstName', { header: 'First Name' }),\n//   tableHelper.columnHelper.accessor('lastName', { header: 'Last Name' }),\n//   tableHelper.columnHelper.accessor('age', { header: 'Age' }),\n//   tableHelper.columnHelper.display({ header: 'Actions', id: 'actions' }),\n// ] as Array<ColumnDef<typeof tableHelper.features, Person, unknown>>\n\n// const data: Array<Person> = []\n\n// tableHelper.useTable({\n//   columns,\n//   data,\n// })\n"
  },
  {
    "path": "packages/vue-table/src/index.ts",
    "content": "export * from './FlexRender'\nexport * from './useTable'\nexport * from './createTableHelper'\nexport * from '@tanstack/table-core'\n"
  },
  {
    "path": "packages/vue-table/src/merge-proxy.ts",
    "content": "function trueFn() {\n  return true\n}\n\nconst $PROXY = Symbol('merge-proxy')\n\n// https://github.com/solidjs/solid/blob/c20ca4fd8c36bc0522fedb2c7f38a110b7ee2663/packages/solid/src/render/component.ts#L51-L118\nconst propTraps: ProxyHandler<{\n  get: (k: string | number | symbol) => any\n  has: (k: string | number | symbol) => boolean\n  keys: () => Array<string>\n}> = {\n  get(_, property, receiver) {\n    if (property === $PROXY) return receiver\n    return _.get(property)\n  },\n  has(_, property) {\n    return _.has(property)\n  },\n  set: trueFn,\n  deleteProperty: trueFn,\n  getOwnPropertyDescriptor(_, property) {\n    return {\n      configurable: true,\n      enumerable: true,\n      get() {\n        return _.get(property)\n      },\n      set: trueFn,\n      deleteProperty: trueFn,\n    }\n  },\n  ownKeys(_) {\n    return _.keys()\n  },\n}\n\ntype UnboxLazy<T> = T extends () => infer U ? U : T\ntype BoxedTupleTypes<T extends Array<any>> = {\n  [P in keyof T]: [UnboxLazy<T[P]>]\n}[Exclude<keyof T, keyof Array<any>>]\ntype UnionToIntersection<T> = (T extends any ? (k: T) => void : never) extends (\n  k: infer I,\n) => void\n  ? I\n  : never\ntype UnboxIntersection<T> = T extends { 0: infer U } ? U : never\ntype MergeProxy<T extends Array<any>> = UnboxIntersection<\n  UnionToIntersection<BoxedTupleTypes<T>>\n>\n\nfunction resolveSource(s: any) {\n  return 'value' in s ? s.value : s\n}\n\nexport function mergeProxy<T extends Array<any>>(...sources: T): MergeProxy<T>\nexport function mergeProxy(...sources: any): any {\n  return new Proxy(\n    {\n      get(property: string | number | symbol) {\n        for (let i = sources.length - 1; i >= 0; i--) {\n          const v = resolveSource(sources[i])[property]\n          if (v !== undefined) return v\n        }\n      },\n      has(property: string | number | symbol) {\n        for (let i = sources.length - 1; i >= 0; i--) {\n          if (property in resolveSource(sources[i])) return true\n        }\n        return false\n      },\n      keys() {\n        const keys = []\n        for (const source of sources)\n          keys.push(...Object.keys(resolveSource(source)))\n        return [...Array.from(new Set(keys))]\n      },\n    },\n    propTraps,\n  )\n}\n"
  },
  {
    "path": "packages/vue-table/src/useTable.ts",
    "content": "import { isRef, ref, unref, watch, watchEffect } from 'vue'\nimport {\n  constructReactivityFeature,\n  constructTable,\n} from '@tanstack/table-core'\nimport { useStore } from '@tanstack/vue-store'\nimport { mergeProxy } from './merge-proxy'\nimport type {\n  NoInfer,\n  RowData,\n  Table,\n  TableFeatures,\n  TableOptions,\n  TableState,\n} from '@tanstack/table-core'\nimport type { MaybeRef, VNode } from 'vue'\n\nexport type TableOptionsWithReactiveData<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n> = Omit<TableOptions<TFeatures, TData>, 'data'> & {\n  data: MaybeRef<ReadonlyArray<TData>>\n}\n\nfunction getOptionsWithReactiveData<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(options: TableOptionsWithReactiveData<TFeatures, TData>) {\n  return mergeProxy(options, {\n    data: unref(options.data),\n  })\n}\n\nexport type VueTable<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TSelected = {},\n> = Table<TFeatures, TData> & {\n  /**\n   * A Vue component that allows you to subscribe to the table state.\n   *\n   * This is useful for opting into state subscriptions for specific parts of the table state.\n   *\n   * @example\n   * <table.Subscribe selector={(state) => ({ rowSelection: state.rowSelection })}>\n   *   {(state) => (\n   *     <tr>\n   *       // render the row\n   *     </tr>\n   *   )}\n   * </table.Subscribe>\n   */\n  Subscribe: <TSelected>(props: {\n    selector: (state: NoInfer<TableState<TFeatures>>) => TSelected\n    children:\n      | ((state: Readonly<TSelected>) => VNode | Array<VNode>)\n      | VNode\n      | Array<VNode>\n  }) => VNode | Array<VNode>\n  /**\n   * The selected state of the table. This state may not match the structure of `table.store.state` because it is selected by the `selector` function that you pass as the 2nd argument to `useTable`.\n   *\n   * @example\n   * const table = useTable(options, (state) => ({ globalFilter: state.globalFilter })) // only globalFilter is part of the selected state\n   *\n   * console.log(table.state.globalFilter)\n   */\n  readonly state: Readonly<TSelected>\n}\n\nexport function useTable<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TSelected = {},\n>(\n  tableOptions: TableOptionsWithReactiveData<TFeatures, TData>,\n  selector: (state: TableState<TFeatures>) => TSelected = () =>\n    ({}) as TSelected,\n): VueTable<TFeatures, TData, TSelected> {\n  const notifier = ref<number>(0)\n\n  const vueReactivityFeature = constructReactivityFeature({\n    stateNotifier: () => notifier.value,\n    optionsNotifier: () => notifier.value,\n  })\n\n  const IS_REACTIVE = isRef(tableOptions.data)\n\n  const mergedOptions = {\n    ...tableOptions,\n    _features: {\n      ...tableOptions._features,\n      vueReactivityFeature,\n    },\n  }\n\n  const resolvedOptions = mergeProxy(\n    IS_REACTIVE\n      ? getOptionsWithReactiveData(\n          mergedOptions as TableOptions<TFeatures, TData>,\n        )\n      : mergedOptions,\n    {\n      // Remove state and onStateChange - store handles it internally\n      mergeOptions: (\n        defaultOptions: TableOptions<TFeatures, TData>,\n        newOptions: Partial<TableOptions<TFeatures, TData>>,\n      ) => {\n        return mergeProxy(defaultOptions, newOptions)\n      },\n    },\n  ) as TableOptions<TFeatures, TData>\n\n  const table = constructTable(resolvedOptions) as VueTable<\n    TFeatures,\n    TData,\n    TSelected\n  >\n\n  const allState = useStore(table.store, (state) => state)\n  const allOptions = useStore(table.optionsStore, (state) => state)\n\n  watchEffect(() => {\n    allState.value\n    allOptions.value\n    notifier.value++\n  })\n\n  watch(\n    () =>\n      [\n        IS_REACTIVE ? unref(tableOptions.data) : tableOptions.data,\n        tableOptions,\n      ] as const,\n    () => {\n      table.setOptions((prev) => {\n        return mergeProxy(\n          prev,\n          IS_REACTIVE\n            ? getOptionsWithReactiveData(\n                tableOptions as TableOptions<TFeatures, TData>,\n              )\n            : tableOptions,\n        ) as TableOptions<TFeatures, TData>\n      })\n    },\n    { immediate: true },\n  )\n\n  table.Subscribe = function Subscribe<TSelected>(props: {\n    selector: (state: TableState<TFeatures>) => TSelected\n    children:\n      | ((state: Readonly<TSelected>) => VNode | Array<VNode>)\n      | VNode\n      | Array<VNode>\n  }): VNode | Array<VNode> {\n    const selected = useStore(table.store, props.selector)\n    if (typeof props.children === 'function') {\n      return props.children(selected.value)\n    }\n    return props.children\n  }\n\n  const stateStore = useStore(table.store, selector)\n\n  return {\n    ...table,\n    get state() {\n      return stateStore.value\n    },\n  } as VueTable<TFeatures, TData, TSelected>\n}\n"
  },
  {
    "path": "packages/vue-table/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig.json\",\n  \"compilerOptions\": {\n    \"jsx\": \"preserve\",\n    \"jsxImportSource\": \"vue\",\n    \"moduleResolution\": \"Bundler\",\n    \"types\": [\"vue/jsx\"],\n    \"paths\": {\n      \"@tanstack/form-core\": [\"../form-core/src\"]\n    }\n  },\n  \"include\": [\"src\", \"vite.config.ts\", \"eslint.config.js\"]\n}\n"
  },
  {
    "path": "packages/vue-table/vite.config.ts",
    "content": "import { defineConfig, mergeConfig } from 'vitest/config'\nimport { tanstackViteConfig } from '@tanstack/vite-config'\nimport vue from '@vitejs/plugin-vue'\n\nconst config = defineConfig({\n  plugins: [vue()],\n})\n\nexport default mergeConfig(\n  config,\n  tanstackViteConfig({\n    cjs: false,\n    entry: './src/index.ts',\n    srcDir: './src',\n    exclude: ['./src/tests'],\n  }),\n)\n"
  },
  {
    "path": "pnpm-workspace.yaml",
    "content": "packages:\n  - examples/**/*\n  - packages/*\n\ncleanupUnusedCatalogs: true\n\nlinkWorkspacePackages: true\npreferWorkspacePackages: true\n"
  },
  {
    "path": "prettier.config.js",
    "content": "// @ts-check\n\n/** @type {import('prettier').Config} */\nconst config = {\n  semi: false,\n  singleQuote: true,\n  trailingComma: 'all',\n  plugins: ['prettier-plugin-svelte'],\n  overrides: [\n    { files: '*.svelte', options: { parser: 'svelte' } },\n    {\n      files: ['examples/angular/**/*.html'],\n      options: {\n        printWidth: 100,\n        parser: 'angular',\n      },\n    },\n  ],\n}\n\nexport default config\n"
  },
  {
    "path": "scripts/config.js",
    "content": "// @ts-check\n\nimport { resolve } from 'node:path'\nimport { fileURLToPath } from 'node:url'\n\n/**\n * List your npm packages here. The first package will be used as the versioner.\n * @type {import('./types').Package[]}\n */\nexport const packages = [\n  {\n    name: '@tanstack/table-core',\n    packageDir: 'packages/table-core',\n  },\n  // {\n  //   name: '@tanstack/table-devtools',\n  //   packageDir: 'packages/table-devtools',\n  // },\n  {\n    name: '@tanstack/angular-table',\n    packageDir: 'packages/angular-table',\n  },\n  // {\n  //   name: '@tanstack/lit-table',\n  //   packageDir: 'packages/lit-table',\n  // },\n  {\n    name: '@tanstack/preact-table',\n    packageDir: 'packages/preact-table',\n  },\n  {\n    name: '@tanstack/react-table',\n    packageDir: 'packages/react-table',\n  },\n  // {\n  //   name: '@tanstack/react-table-devtools',\n  //   packageDir: 'packages/react-table-devtools',\n  // },\n  // {\n  //   name: '@tanstack/solid-table',\n  //   packageDir: 'packages/solid-table',\n  // },\n  // {\n  //   name: '@tanstack/svelte-table',\n  //   packageDir: 'packages/svelte-table',\n  // },\n  // {\n  //   name: '@tanstack/vue-table',\n  //   packageDir: 'packages/vue-table',\n  // },\n  // {\n  //   name: '@tanstack/match-sorter-utils',\n  //   packageDir: 'packages/match-sorter-utils',\n  // },\n]\n\n/**\n * Contains config for publishable branches.\n * @type {Record<string, import('./types').BranchConfig>}\n */\nexport const branchConfigs = {\n  main: {\n    prerelease: false,\n  },\n  alpha: {\n    prerelease: true,\n  },\n  beta: {\n    prerelease: true,\n  },\n  rc: {\n    prerelease: true,\n  },\n}\n\nconst __dirname = fileURLToPath(new URL('.', import.meta.url))\nexport const rootDir = resolve(__dirname, '..')\n"
  },
  {
    "path": "scripts/generateDocs.js",
    "content": "import { resolve } from 'node:path'\nimport { fileURLToPath } from 'node:url'\nimport { generateReferenceDocs } from '@tanstack/typedoc-config'\n\nconst __dirname = fileURLToPath(new URL('.', import.meta.url))\n\nawait generateReferenceDocs({\n  packages: [\n    {\n      name: 'table-core',\n      entryPoints: [resolve(__dirname, '../packages/table-core/src/index.ts')],\n      tsconfig: resolve(__dirname, '../packages/table-core/tsconfig.json'),\n      outputDir: resolve(__dirname, '../docs/reference'),\n    },\n    {\n      name: 'react-table',\n      entryPoints: [\n        resolve(__dirname, '../packages/react-table/src/index.ts'),\n        resolve(__dirname, '../packages/react-table/src/legacy.ts'),\n      ],\n      tsconfig: resolve(__dirname, '../packages/react-table/tsconfig.json'),\n      outputDir: resolve(__dirname, '../docs/framework/react/reference'),\n      exclude: ['packages/table-core/**/*'],\n    },\n    {\n      name: 'angular-table',\n      entryPoints: [\n        resolve(__dirname, '../packages/angular-table/src/index.ts'),\n      ],\n      tsconfig: resolve(__dirname, '../packages/angular-table/tsconfig.json'),\n      outputDir: resolve(__dirname, '../docs/framework/angular/reference'),\n      exclude: ['packages/table-core/**/*'],\n    },\n  ],\n})\n\nconsole.log('\\n✅ All markdown files have been processed!')\n\nprocess.exit(0)\n"
  },
  {
    "path": "scripts/publish.js",
    "content": "// @ts-check\n\nimport { publish } from '@tanstack/publish-config'\nimport { branchConfigs, packages, rootDir } from './config.js'\n\nawait publish({\n  branchConfigs,\n  packages,\n  rootDir,\n  branch: process.env.BRANCH,\n  tag: process.env.TAG,\n  ghToken: process.env.GH_TOKEN,\n})\n\nprocess.exit(0)\n"
  },
  {
    "path": "scripts/types.d.ts",
    "content": "export type Package = {\n  name: string\n  packageDir: string\n}\n\nexport type BranchConfig = {\n  prerelease: boolean\n  previousVersion?: boolean\n}\n"
  },
  {
    "path": "scripts/verify-links.ts",
    "content": "import { existsSync, readFileSync, statSync } from 'node:fs'\nimport { extname, resolve } from 'node:path'\nimport { glob } from 'tinyglobby'\n// @ts-ignore Could not find a declaration file for module 'markdown-link-extractor'.\nimport markdownLinkExtractor from 'markdown-link-extractor'\n\nconst errors: Array<{\n  file: string\n  link: string\n  resolvedPath: string\n  reason: string\n}> = []\n\nfunction isRelativeLink(link: string) {\n  return (\n    !link.startsWith('/') &&\n    !link.startsWith('http://') &&\n    !link.startsWith('https://') &&\n    !link.startsWith('//') &&\n    !link.startsWith('#') &&\n    !link.startsWith('mailto:')\n  )\n}\n\n/** Remove any trailing .md */\nfunction stripExtension(p: string): string {\n  return p.replace(`${extname(p)}`, '')\n}\n\nfunction relativeLinkExists(link: string, file: string): boolean {\n  // Remove hash if present\n  const linkWithoutHash = link.split('#')[0]\n  // If the link is empty after removing hash, it's not a file\n  if (!linkWithoutHash) return false\n\n  // Strip the file/link extensions\n  const filePath = stripExtension(file)\n  const linkPath = stripExtension(linkWithoutHash)\n\n  // Resolve the path relative to the markdown file's directory\n  // Nav up a level to simulate how links are resolved on the web\n  let absPath = resolve(filePath, '..', linkPath)\n\n  // Ensure the resolved path is within /docs\n  const docsRoot = resolve('docs')\n  if (!absPath.startsWith(docsRoot)) {\n    errors.push({\n      link,\n      file,\n      resolvedPath: absPath,\n      reason: 'Path outside /docs',\n    })\n    return false\n  }\n\n  // Check if this is an example path\n  const isExample = absPath.includes('/examples/')\n\n  let exists = false\n\n  if (isExample) {\n    // Transform /docs/framework/{framework}/examples/ to /examples/{framework}/\n    absPath = absPath.replace(\n      /\\/docs\\/framework\\/([^/]+)\\/examples\\//,\n      '/examples/$1/',\n    )\n    // For examples, we want to check if the directory exists\n    exists = existsSync(absPath) && statSync(absPath).isDirectory()\n  } else {\n    // For non-examples, we want to check if the .md file exists\n    if (!absPath.endsWith('.md')) {\n      absPath = `${absPath}.md`\n    }\n    exists = existsSync(absPath)\n  }\n\n  if (!exists) {\n    errors.push({\n      link,\n      file,\n      resolvedPath: absPath,\n      reason: 'Not found',\n    })\n  }\n  return exists\n}\n\nasync function verifyMarkdownLinks() {\n  // Find all markdown files in docs directory\n  const markdownFiles = await glob('docs/**/*.md', {\n    ignore: ['**/node_modules/**'],\n  })\n\n  console.log(`Found ${markdownFiles.length} markdown files\\n`)\n\n  // Process each file\n  for (const file of markdownFiles) {\n    const content = readFileSync(file, 'utf-8')\n    const links: Array<string> = markdownLinkExtractor(content)\n\n    const relativeLinks = links.filter((link: string) => {\n      return isRelativeLink(link)\n    })\n\n    if (relativeLinks.length > 0) {\n      relativeLinks.forEach((link) => {\n        relativeLinkExists(link, file)\n      })\n    }\n  }\n\n  if (errors.length > 0) {\n    console.log(`\\n❌ Found ${errors.length} broken links:`)\n    errors.forEach((err) => {\n      console.log(\n        `${err.file}\\n  link:      ${err.link}\\n  resolved:  ${err.resolvedPath}\\n  why:       ${err.reason}\\n`,\n      )\n    })\n    process.exit(1)\n  } else {\n    console.log('\\n✅ No broken links found!')\n  }\n}\n\nverifyMarkdownLinks().catch(console.error)\n"
  },
  {
    "path": "tsconfig.json",
    "content": "{\n  \"$schema\": \"https://json.schemastore.org/tsconfig\",\n  \"compilerOptions\": {\n    \"allowJs\": true,\n    \"allowSyntheticDefaultImports\": true,\n    \"allowUnreachableCode\": false,\n    \"allowUnusedLabels\": false,\n    \"checkJs\": true,\n    \"declaration\": true,\n    \"esModuleInterop\": true,\n    \"forceConsistentCasingInFileNames\": true,\n    \"isolatedModules\": true,\n    \"lib\": [\"DOM\", \"DOM.Iterable\", \"ES2022\"],\n    \"module\": \"ESNext\",\n    \"moduleResolution\": \"Bundler\",\n    \"noEmit\": true,\n    \"noImplicitReturns\": false, // TODO enable\n    \"noUncheckedIndexedAccess\": true,\n    \"noUnusedLocals\": false, // TODO enable\n    \"noUnusedParameters\": false, // TODO enable\n    \"resolveJsonModule\": true,\n    \"skipLibCheck\": true,\n    \"strict\": true,\n    \"target\": \"ES2020\",\n    \"noErrorTruncation\": true\n  },\n  \"include\": [\"*.config.*\", \"scripts\", \"vitest.workspace.mjs\"]\n}\n"
  },
  {
    "path": "vitest.workspace.mjs",
    "content": "export default [\n  './packages/angular-table/vite.config.ts',\n  './packages/lit-table/vite.config.ts',\n  './packages/match-sorter-utils/vite.config.ts',\n  './packages/react-table/vite.config.ts',\n  './packages/solid-table/vite.config.ts',\n  './packages/svelte-table/vite.config.ts',\n  './packages/table-core/vite.config.ts',\n  './packages/vue-table/vite.config.ts',\n]\n"
  }
]