# Modules

## Calculator

Calculator contains tools to parse formula strings and evaluate them. We use a custom version of [fast-formula-parser](https://github.com/LesterLyu/fast-formula-parser).

```
yarn add @rowsncolumns/calculator
```

## Calculator Web worker

You can also run calculations in a web worker. Only the evaluation is done in a worker thread, while the dependency graph and dependency parser remains in the main UI thread

```
yarn add @rowsncolumns/calculator-webworker
```

## DAG - Directed acyclic graph

The dag package is used to store cell dependencies. You can use it to get dependents and precedents of a cell

```
yarn add @rowsncolumns/dag
```

## Functions

The functions package contains built-in functions supported by Spreadsheet. It also contains function descriptions, parameters etc.

```
yarn add @rowsncolumns/functions
```

## Grid

This is the main canvas grid that powers the spreadsheet

```
yarn add @rowsncolumns/grid
```

## Icons

Contains all icons used by Spreadsheet

```
yarn add @rowsncolumns/icons
```

## Toolkit

All export/import functions are available in the toolkit

```
yarn add @rowsncolumns/toolkit
```

## Spreadsheet State

Exposes hooks to manage spreadsheet state. Only required if you are not using a custom state management solution

```
yarn add @rowsncolumns/spreadsheet-state
```

## UI Components

The UI package contains all shared components used by Spreadsheet. CSS is powered by [Stitches](https://stitches.dev/). We do have plans to migrate to tailwind

```
yarn add @rowsncolumns/ui
```

## Utilities

Shared sheet utility functions

```
yarn add @rowsncolumns/utils
```

## Y Spreadsheet

```json
yarn add @rowsncolumns/y-spreadsheet
```

## Pivot

The pivot package provides advanced pivot table functionality powered by DuckDB for row/column grouping and aggregations.

```
yarn add @rowsncolumns/pivot
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.rowsncolumns.app/configuration/api/modules.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
