open-index/open-npm huggingface dataset:
npm package: @siteed/audio-ui
Description: UI experiments for @siteed/audio-studio
Author: Arthur Breton
Latest version: 1.0.0

# @siteed/expo-audio-ui

[![Version](https://img.shields.io/npm/v/@siteed/expo-audio-ui.svg)](https://www.npmjs.com/package/@siteed/expo-audio-ui)
[![License](https://img.shields.io/npm/l/@siteed/expo-audio-ui.svg)](https://www.npmjs.com/package/@siteed/expo-audio-ui)
[![GitHub stars](https://img.shields.io/github/stars/deeeed/audiolab.svg?style=social&label=Star)](https://github.com/deeeed/audiolab)

**Give it a GitHub star, if you found this repo useful.**

Audio visualization and control components for React Native, built with Skia and Reanimated. Designed to work with [@siteed/audio-studio](https://github.com/deeeed/audiolab/tree/main/packages/audio-studio).

<div align="center">
  <a href="https://deeeed.github.io/audiolab/playground/">
    <img src="../../docs/demo.gif" alt="Demo" />
  </a>
  <p><a href="https://deeeed.github.io/audiolab/expo-audio-ui-storybook">Storybook</a></p>
</div>

## Components

- **AudioVisualizer** — interactive waveform with navigation, amplitude scaling, and theming
- **DecibelGauge** — gauge display for audio levels in dB
- **DecibelMeter** — linear meter with customizable thresholds
- **RecordButton** — recording button with visual feedback and animations
- **Waveform** — lightweight waveform renderer
- **AudioTimeRangeSelector** — interactive time range selection with drag handles
- **MelSpectrogramVisualizer** — real-time mel spectrogram display

## Install

```bash
yarn add @siteed/expo-audio-ui
```

Peer dependencies:

```bash
yarn add @shopify/react-native-skia react-native-gesture-handler react-native-reanimated
```

## Development

```bash
cd packages/audio-ui
yarn storybook
# Opens at http://localhost:6068
```

## Docs

- [Getting Started Guide](https://deeeed.github.io/audiolab/docs/)
- [Storybook](https://deeeed.github.io/audiolab/expo-audio-ui-storybook)

## License

MIT — see [LICENSE](LICENSE).

---
<sub>Created by [Arthur Breton](https://siteed.net)</sub>
npm package: @siteed/expo-audio-studio
Description: DEPRECATED - Use @siteed/audio-studio instead. This package re-exports @siteed/audio-studio for backwards compatibility.
Latest version: 3.0.2

# @siteed/expo-audio-studio (DEPRECATED)

This package has been renamed to **@siteed/audio-studio**.

Please update your dependencies:

```bash
# Remove the old package
npm uninstall @siteed/expo-audio-studio

# Install the new package
npm install @siteed/audio-studio
```

Then update your imports:

```diff
- import { ... } from '@siteed/expo-audio-studio';
+ import { ... } from '@siteed/audio-studio';
```

This shim package re-exports everything from `@siteed/audio-studio` for backwards compatibility, but will be removed in a future release.
npm package: @siteed/react-native-confirm
Description: confirm modal for react native
Author: deeeed
Latest version: 0.4.1

# react-native-confirm

## 🚨 Repository Moved & Deprecated 🚨

This repository for `@siteed/react-native-confirm` is now deprecated. The project has been moved and is actively maintained as part of `@siteed/design-system` under the `@siteed/mobile` monorepo.

**Repository URL**: [mobile-framework](https://github.com/deeeed/mobile-framework)
**Direct Package Link**: [react-native-logger](https://github.com/deeeed/mobile-framework/tree/master/packages/design-system)
npm package: @siteed/react-native-toaster
Description: Simple Toast library
Author: deeeed
Latest version: 0.6.1

# react-native-toaster

## 🚨 Repository Moved & Deprecated 🚨

This repository for `@siteed/react-native-toaster` is now deprecated. The project has been moved and is actively maintained as part of `@siteed/design-system` under the `@siteed/mobile` monorepo.

**Repository URL**: [mobile-framework](https://github.com/deeeed/mobile-framework)
**Direct Package Link**: [react-native-logger](https://github.com/deeeed/mobile-framework/tree/master/packages/design-system)
npm package: @siteed/ui-starter-kit
Description: shared ui library
Author: deeeed
Latest version: 0.4.0

# UI Lib Starter Kit

shared ui library starter kit for native and web compatibility

The library integrate react native paper and react native web to provide a seamless experience on both platform.

## Installation

```sh
yarn
yarn bootstrap
```
## Usage

This repo comes with multiple ways to validate the components

- storybook web
```sh
# Check your stories with storybook (best to validate on web)
yarn storybook

```
![](./docs/demo_ui_storybook.gif)

-  storybook on device
```sh
# or on device
yarn storybook:device
```
![](./docs/demo_storybook_device.gif)

- example app
```sh
cd example
yarn start
```
![](./docs/demo_app_example.gif)


Feel free to modify the example app to test the full flow on device.
npm package: @siteglide/siteglide-cli
Description: A CLI for Making Website Management a Breeze
Latest version: 1.10.3

# Siteglide CLI

Siteglide CLI is a tool that enables you to work on your project from your local editor and has similar behaviours to that of using FTP, in that you can sync up and pull down changes from your website. You will be required to use some terminal commands to use this feature.

For features and setup instructions, see our help documentation [here](https://developers.siteglide.com/introducing-siteglide-cli)

Our changelog can be found [here](https://developers.siteglide.com/cli-changelog)

[![NPM version](https://img.shields.io/npm/v/@siteglide/siteglide-cli)](https://npmjs.org/package/@siteglide/siteglide-cli) [![NPM downloads](https://img.shields.io/npm/dt/@siteglide/siteglide-cli)](https://npmjs.org/package/@siteglide/siteglide-cli)
npm package: @siteimprove/alfa-angular
Description: Integrations and utilities for the Angular application framework
Latest version: 0.81.10

# Alfa Angular

Alfa integration for Angular, turning Angular components into Alfa pages.

## Tests

Due to Angular need for specific setup to mount its components, the tests live in the `@siteimprove/alfa-angular-test` package, which is structured as a minimal Angular library.
npm package: @siteimprove/alfa-css
Description: Implementations of the core CSS syntax and value types
Latest version: 0.114.3

# Package `@siteimprove/alfa-css`

## Description

This package implements support for CSS syntax and values.

## Package organisation

(all paths are relative to `src/`)

* `syntax`: Support for the CSS syntax and parsers for the basic tokens.
* `unit`: Model of CSS units. We currently only support `angle` and `length`.
* `calculation`: Model of CSS calculations. This contains base (non calculated) numeric types, and calculations themselves.
* `value`: Model for the CSS values themselves. This includes another copy of the numeric types, but this time including potential calculation. Most of the actual work is likely to involve this directory. It is further split into the various types.

## Value structure

The [`Value` type](./src/value/value.ts) contains the shared structure of CSS values. Most notably:

* `Value` have a `type` string parameter that can be used as a discriminating union field (e.g. in a `switch` statement). However, it may sometimes be more convenient to use the `Foo.isFoo` type predicates, notably in combination with a [`Selective` construct](../alfa-selective).
* `Value` have a `CALC` type parameter that indicates whether they may contain calculations (i.e. if `CALC` is `false`, we guarantee there is no calculation, but if `CALC` is `true`, we do not guarantee the presence of a calculation). This parameter can be accessed programmatically with the `Value#hasCalculation()` type predicate.
* `Value` have a `Foo.Canonical` subtype representing the canonical form of the value. This includes resolving calculations, converting units to their canonical units (e.g. `px` for lengths), and otherwise converting formats (e.g. canonical colors are in RGB format).
* `Value` have a `#resolve()` method to resolve calculations and provide the same `value` in its canonical form. These may need a resolver to help with some types (mostly lengths and percentages). The type system should ensure that `#resolve()` is always called with the correct resolver. `Value` that need a resolver also have a `Foo.Resolver` type to declare it.
* For many `Value`, percentage resolution depends on data Alfa does not always have (usually, size of boxes). These also have a `Foo.PartiallyResolved` type, and a `Foo.partiallyResolve()` function (with its `Foo.PartialResolver` interface). Note that partially resolved values will possibly include calculations, including mixed ones (`length-percentage`) and that needs to be handled downstream (e.g. with the computed values of the CSS properties using these).
* `Value` implement the `Resolvable` interface, which state into what they resolve, and which resolver they need.
npm package: @siteimprove/alfa-dom
Description: Implementations of the core DOM and CSSOM node types
Latest version: 0.114.3

# Alfa DOM

Implementation of the DOM and CSSOM specifications.

## Test specificities

Because this is the package that defines Alfa's custom JSX transformation, the tests that use JSX syntax need to do some magic.

From other packages, setting `jsxImportSource: "@siteimprove/alfa-dom"` in the `compilerOptions` of the `tsconfig.json` file is enough to make the tests work. 

However, this points to the **compiled** version of the JSX transformation (in the `dist` directory). This means that the resulting `Element`, … will be from the classes defined there. Which, in turns, means that if we point the test files to the **uncomplied** `src` directory, Vitest will make its own compilation resulting in **different** `Element`, … classes and breaking every `instanceof`, … checks (used, notably, in the `isElement`, … guards).

It seems that it is not possible to point the `jsxImportSource` to the `src` directory, which makes sense as Vitest needs a compiled version of it to run during its own compilation process.

Hence, the only way to use the same class for both the tests and the JSX transformation is to also have the tests import from `dist`, instead of doing it from `src` as usual; which also means importing from the `.js` compiled files instead of the `.ts` source files.
npm package: @siteimprove/alfa-selector
Description: Functionality for working with CSS selectors and individual selector matching
Latest version: 0.114.3

# Alfa Selector

Model and parse CSS selectors.

## Circularity problems

The main problem with CSS selectors is that they are somewhat circularly defined, mostly due to functional pseudo-classes. That is, even a simple selector can be a functional pseudo-class which can contain a list of complex selectors (e.g. `:is(div span, a:focus)`).

In order to avoid creating circular dependencies, we have some specific tricks not used elsewhere in Alfa:

Several subdirectories have a file of the same name defining the commonalities (classes, …), and an index re-exporting everything. For example, [`selector/pseudo/pseudo-element/pseudo-element.ts`](./src/selector/pseudo/pseudo-element/pseudo-element.ts) defines the common abstract classes used, [`after.ts`](./src/selector/pseudo/pseudo-element/after.ts), [`cue.ts`](./src/selector/pseudo/pseudo-element/cue.ts), … define the specific concrete classes for each of these selectors, and [`index.ts`](./src/selector/pseudo/pseudo-element/index.ts) groups everything (e.g., building the global pseudo-element parser) and re-exports for outside use.

Thus, when importing within this package, it is often better to import from the specific files instead of the index, to avoid circular dependencies. For example [`nth-child.ts`](./src/selector/pseudo/pseudo-class/nth-child.ts) imports `Universal` from [`simple/universal.ts`](./src/selector/simple/universal.ts) instead of from [`simple/index.ts`](./src/selector/simple/index.ts), because the latter (indirectly) imports from `nth-child.ts` (through `pseudo-class/index.ts`). Even if the circularity is OK in that case, it is better to avoid it altogether.

Similarly, the type guards (`isSimple`, …) defined as functions in their associated namespace as we usually do in Alfa cannot be used inside this package. Here also, `host.parser` needs to check that the argument is compound (not complex), but since a `:host` pseudo-class is also a compound selector, we'd create a circular dependency. Instead, inside this package, we check the `type` property. That is, in this package use `type === "…"` (or the `BaseSelector.hasFooType` helpers) to avoid circular dependencies, but outside of this package use `Simple.isSimple` as usual.

The parsers are facing the same circularity problems. While it would be possible to define all parsers in a single file as mutually recursive functions, this would both be impractically big, and have poor locality. Instead, most parsers take a parser continuation (with extra options) as a parameter, use it where needed, and forward it to sub-parsers.
npm package: @siteimprove/alfa-style
Description: An implementation of the CSS style system capable of resolving and computing style information for DOM nodes
Latest version: 0.114.3

# Package `@siteimprove/alfa-style`

## Description

This package implements support for CSS properties.

## Scaffolding

To avoid circular dependencies, the package is organised as follows (from bottom to top) (all paths are relative to `src/`) :

- `longhand.ts`: defines the basic class to model longhand properties;
- `property/*.ts` (part of): individual longhand properties, one per file;
- `longhands.ts`: wraps all longhand properties in a nice bundle and export convenient types;
- `shorthand.ts`: defines the basic class to model shorthand properties, depends on the names of longhands as defined in previous file;
- `property/*.ts` (part of): individual shorthand properties, one per file;
- `shorthands.ts`: wraps all shorthand properties in a nice bundle and export convenient types;
- `style.ts`: expose the actual API to manipulate the properties.

## Development

To add a new property, create a file in `src/property` to define the property, then import the file and add the property to the `const` in `longhands.ts` or `shorthands.ts`.
npm package: @siteimprove/alfa-test
Description: A simple test library sitting on top of vitest
Latest version: 0.114.3

# Alfa test

Thanks to the referential transparency ensured by [ADR 6](../../docs/architecture/decisions/adr-006.md), unit test of Alfa code is usually very easy, simply comparing the actual result with the expected one (often as their serialisation), without need for complex setup, mocks, or other test tricks.

We're therefore implementing a very lightweight wrapper for tests.

```typescript
import { test } from "@siteimprove/alfa-test";

test("My test", (t) => {
  const actual = …;

  t.deepEqual(actual.toJSON(), { type: …, …})
});
```

## Property testing

Sometimes, it is convenient to generate random tests with random values. The `alfa-test` library is offering test controller to handle that.

- The `assertion` function that is passed to `test(name, assertion)` receives additional `rng` and `seed` parameters. The `rng` is a function `() => number`. The `seed` was used to initialize the Random Number Generator, can be used for better displaying errors and for re-playability.
- The `test` function itself accepts an optional `Controller` object which can be used to set the `seed` for the RNG, or to change the number of `iterations` to run the test (default to 1 since most tests are not random tests). The `Controller` object also accepts a `wrapper` function of type `(iteration: number, rng: RNG) => RNG` that can be used to turn the random numbers into useful data, or for introspection.

The provided `rng` function is guaranteed to generate the same sequence of numbers on sequential calls, if the same seed is provided by the controller. If no seed is provided, a random one will be used.

By default, each test is only run once. Use the `Controller` object to change the number of iterations.

Tests that make use of the RNG are encouraged to print the seed in their error message in order to allow re-playability and investigation by feeding the failing seed back to the test.

For re-playability, use the `Controller` parameter to select the seed to use (which guarantees the exact same sequence of numbers is produced), and to introspect on fine details by wrapping the RNG, e.g.,

```typescript
/**
 * Return a random string between "0" and "100" (inclusive).
 * Print the generated number, as well as the iteration number (use for debugging).
 */
function wrapper(rng: RNG<number>, iteration: number): RNG<string> {
  return () => {
    const res = rng();
    console.log(`On iteration ${iteration}, I generated ${res}`);
    return `${res * 100}`;
  };
}

test(
  "Sum computes the sum of two numbers represented as strings",
  (t, rng, seed) => {
    // These use the post-wrapper RNG.
    const a = rng();
    const b = rng();
    // Print the seed in error message to allow introspection.
    const actual = sum(a, b, `Failed with seed ${seed}`);

    t.deepEqual(actual, `${a + b}`);
  },
  {
    wrapper,
    iterations: 100,
    // Set the seed for debugging, if you want to replay the same sequence of numbers.
    seed: 1234,
  },
);
```
npm package: @siteimprove/alfa-test-deprecated
Description: A simple test library sitting on top of the built-in Node.js assert module
Latest version: 0.108.2

# Alfa test

Thanks to the referential transparency ensured by [ADR 6](../../docs/architecture/decisions/adr-006.md), unit test of Alfa code is usually very easy, simply comparing the actual result with the expected one (often as their serialisation), without need for complex setup, mocks, or other test tricks.

We're therefore implementing a very lightweight wrapper for tests.

```typescript
import { test } from "@siteimprove/alfa-test";

test("My test", (t) => {
  const actual = …;

  t.deepEqual(actual.toJSON(), { type: …, …})
});
```

## Property testing

Sometimes, it is convenient to generate random tests with random values. The `alfa-test` library is offering test controller to handle that.

- The `assertion` function that is passed to `test(name, assertion)` receives additional `rng` and `seed` parameters. The `rng` is a function `() => number`. The `seed` was used to initialize the Random Number Generator, can be used for better displaying errors and for re-playability.
- The `test` function itself accepts an optional `Controller` object which can be used to set the `seed` for the RNG, or to change the number of `iterations` to run the test (default to 1 since most tests are not random tests). The `Controller` object also accepts a `wrapper` function of type `(iteration: number, rng: RNG) => RNG` that can be used to turn the random numbers into useful data, or for introspection.

The provided `rng` function is guaranteed to generate the same sequence of numbers on sequential calls, if the same seed is provided by the controller. If no seed is provided, a random one will be used.

By default, each test is only run once. Use the `Controller` object to change the number of iterations.

Tests that make use of the RNG are encouraged to print the seed in their error message in order to allow re-playability and investigation by feeding the failing seed back to the test.

For re-playability, use the `Controller` parameter to select the seed to use (which guarantees the exact same sequence of numbers is produced), and to introspect on fine details by wrapping the RNG, e.g.,

```typescript
/**
 * Return a random string between "0" and "100" (inclusive).
 * Print the generated number, as well as the iteration number (use for debugging).
 */
function wrapper(rng: RNG<number>, iteration: number): RNG<string> {
  return () => {
    const res = rng();
    console.log(`On iteration ${iteration}, I generated ${res}`);
    return `${res * 100}`;
  };
}

test(
  "Sum computes the sum of two numbers represented as strings",
  (t, rng, seed) => {
    // These use the post-wrapper RNG.
    const a = rng();
    const b = rng();
    // Print the seed in error message to allow introspection.
    const actual = sum(a, b, `Failed with seed ${seed}`);

    t.deepEqual(actual, `${a + b}`);
  },
  {
    wrapper,
    iterations: 100,
    // Set the seed for debugging, if you want to replay the same sequence of numbers.
    seed: 1234,
  },
);
```
npm package: @siteimprove/alfa-test-utils
Description: Utilities to run Alfa tests and upload results to the Siteimprove Intelligence Platform
Latest version: 0.81.10

# alfa-test-utils

Utilities for running Alfa locally and uploading results to the Siteimprove Intelligence Platform.

## Installation

```bash
$ npm install --save-dev @siteimprove/alfa-test-utils
```
or
```bash
$ yarn add --dev @siteimprove/alfa-test-utils
```

## Basic usage

Use scraper packages such as `@siteimprove/alfa-playwright` to grab a page, then a simple test script could look like this:

```typescript
import { Audit, Rules, SIP } from "@siteimprove/alfa-test-utils";

Audit.run(page, { rules: { include: Rules.aaFilter } }).then((outcomes) => {
  SIP.upload(outcomes, {
    userName: process.env.SI_USERNAME,
    apiKey: process.env.SI_API_KEY,
    testName: "WCAG 2.2 AA conformance test",
  }).then(console.log);
});
```

See [the full documentation](https://alfa.siteimprove.com/code-checker) for detailed usage instructions.
npm package: @siteimprove/alfa-toolchain
Description: Toolchain for developing Alfa and related projects
Latest version: 0.114.3

# Alfa toolchain

This package contains the toolchain for developing Alfa and its [companion projects](../../docs/guides/README.md#alfa-structure). It is tailored-made for Alfa and makes many (poorly documented) assumptions on code structure that likely do not hold on other codebases. Therefore, it is unlikely to be re-usable by other projects.

## Changelog

Alfa is using [changesets](../../docs/guides/changeset.md). We keep one changelog per package, plus one global changelog (because we keep all packages in sync at the same version number). The per package changelogs are handled directly by changeset, using a custom generation function defined here. The global changelog is built with utilities here.

Individual changesets are expected to have the following shape (after the frontmatter):

```markdown
**[kind]:** [title]

[details]
```

where `[title]` is a one line summary for the changes (the full text is called `summary` in changesets lingo, so we call that summary `title` instead), `[details]` is an arbitrary long detailed explanation, and `[kind]` is one of: `Breaking`, `Removed`, `Added`, `Changed`, Fixed`.

`Breaking` and `Removed` kinds may only be used on major bumps (or minor bumps pre-1.0.0); `Added` kind may only be used on minor or major bumps (and should only be used on minor bumps); `Changed` and `Fixed` kinds can be used on any bump but should only be used on patch bumps.

The individual changelog contains the full changeset. The global changelog contains only the title, with link to the individual changelog.

## Validation

The package provides a bunch of low-level validation structure of the project. These checks can be toggled via [
`config/validate-structure.json`](../../config/validate-structure.json).

- Check that each changeset matches the structure described above.
- Check that each workspace has an API extractor config.
- Check that each workspace's `package.json` matches the expected structure.
- Check that each (internal) `dependencies` has its path referenced in the corresponding `tsconfig.json`.
npm package: @siteinsights/track
Description: Package for tracking events to be made available in SiteInsights.
Author: SiteInsights.io
Latest version: 1.0.0
Deprecated: Please use "npm i siteinsights"

# Installation

`npm i siteinsights`

# Usage

App.js

```ecmascript 6
import si from 'siteinsights';

si.init({
  apiKey: 'YOUR_API_KEY'
});
```

<br />

LoggedIn.js

```
if (loginIsSucessful) {
  si.track('UserLoggedIn', {
    id: user.id
  });
} else {
  si.track('UserLoginFailed', {
    username
  });
}
```
npm package: @siteinsights/track-js
Description: Package for tracking events to be made available in SiteInsights.
Author: SiteInsights.io
Latest version: 1.0.0
Deprecated: Please use "npm i siteinsights"

# Installation

`npm i siteinsights`

# Usage

App.js

```ecmascript 6
import si from 'siteinsights';

si.init({
  apiKey: 'YOUR_API_KEY'
});
```

<br />

LoggedIn.js

```
if (loginIsSucessful) {
  si.track('UserLoggedIn', {
    id: user.id
  });
} else {
  si.track('UserLoginFailed', {
    username
  });
}
```
npm package: @sitek94/lib
Description: Useless package, but with semantic versioning!
Author: Maciek Sitkowski
Latest version: 1.1.0

# Semantic Package

> ⚠️&nbsp; Built for learning purposes only! ⚠️

* don't use this package in production
* neither in development
* you probably shouldn't use it anywhere
* it's not even bundled
* the tests are a joke

But... It's got a semantic versioning! 🤩

I wanted to learn how to automate the process of releasing a package, and I followed 
[this tutorial by Bruno Antunes](https://www.youtube.com/watch?v=QZdY4XYbqLI), so if you're interested in this topic,
you should check it out!

## Steps

1. `npm install`
2. Update the `package.json` file with your own details
3. Create NPM token and add it to your GitHub secrets
npm package: @sitek94/prettier-config
Description: Maciek's Prettier config
Author: Maciek Sitkowski
Latest version: 1.0.2

# @sitek94/prettier-config

My shareable Prettier config.

## Usage

### Install

Config only:

```
npm i -D @sitek94/prettier-config
```

Config and prettier:

```
npm i -D prettier @sitek94/prettier-config
```

### Reference config

In `package.json`:

```json
{
  "name": "my-cool-library",
  "version": "1.0.0",
  "prettier": "@sitek94/prettier-config"
}
```

Or, if you want to extend it:

```js
module.exports = {
  ...require('@sitek94/prettier-config'),
  semi: false,
}
```

## Resources

- [Prettier: Sharing configurations](https://prettier.io/docs/en/configuration.html#sharing-configurations)
npm package: @sitek94/semantic-package
Description: Useless package, but with semantic versioning!
Author: Maciek Sitkowski
Latest version: 1.2.1

# Semantic Package

> ⚠️&nbsp; Built for learning purposes only! ⚠️

* don't use this package in production
* neither in development
* you probably shouldn't use it anywhere
* it's not even bundled
* the tests are a joke

But... It's got a semantic versioning! 🤩

I wanted to learn how to automate the process of releasing a package, and I followed 
[this tutorial by Bruno Antunes](https://www.youtube.com/watch?v=QZdY4XYbqLI), so if you're interested in this topic,
you should check it out!
npm package: @siteline/core
Description: Core tracking SDK for Siteline - Agent Analytics platform for tracking AI agents, bots, and crawlers
Author: Siteline
Latest version: 1.0.9

# @siteline/core

Core Siteline tracking SDK for monitoring AI agents, bots, and crawlers across your web applications.

[![npm version](https://img.shields.io/npm/v/@siteline/core.svg)](https://www.npmjs.com/package/@siteline/core)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](../../LICENSE)

## Features

- Track bots from OpenAI, Google, Anthropic, Perplexity, and more
- Full TypeScript support with exported types
- Works in Node.js, Edge runtimes, and browsers
- Automatic data sanitization and validation

## Installation

```bash
npm install @siteline/core
```

## Quick Start

```typescript
import { Siteline } from '@siteline/core';

const siteline = new Siteline({
  websiteKey: 'siteline_secret_xxxxxxxxxxxxxxxxxxxxxxxxxxxx',
});

siteline.track({
  url: '/api/users',
  method: 'GET',
  status: 200,
  duration: 125,
  userAgent: request.headers['user-agent'],
  ref: request.headers['referer'],
  ip: request.ip,
});
```

## API Reference

### Constructor

```typescript
new Siteline(config: SitelineConfig)
```

**Configuration Options:**

| Option | Type | Required | Description                           |
|--------|------|----------|---------------------------------------|
| `websiteKey` | `string` | Yes | Your Siteline website key             |
| `endpoint` | `string` | No | Custom API endpoint                   |
| `debug` | `boolean` | No | Enable debug logging (default: false) |

### track()

```typescript
siteline.track(data: PageviewData)
```

**Pageview Data:**

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `url` | `string` | Yes | Request URL path |
| `method` | `string` | Yes | HTTP method |
| `status` | `number` | Yes | HTTP status code |
| `duration` | `number` | Yes | Request duration in milliseconds |
| `userAgent` | `string \| null` | Yes | User-Agent header |
| `ref` | `string \| null` | Yes | Referer header |
| `ip` | `string \| null` | Yes | Client IP address |

## Framework Integrations

For framework-specific integrations with automatic tracking:

- **[@siteline/nextjs](https://www.npmjs.com/package/@siteline/nextjs)** - Next.js middleware integration

## Documentation

- [Full Documentation](https://docs.gptrends.io/integrations/javascript)
- [GitHub Repository](https://github.com/siteline-ai/siteline-js-sdk)

## Support

- [GitHub Issues](https://github.com/siteline-ai/siteline-js-sdk/issues)
- Email: team@siteline.ai

## License

MIT
npm package: @siteline/nextjs
Description: Official Next.js integration for Siteline - automatic AI agent and bot tracking with zero configuration
Author: Siteline
Latest version: 1.0.8

# @siteline/nextjs

Official Next.js integration for automatic AI agent and bot tracking.

[![npm version](https://img.shields.io/npm/v/@siteline/nextjs.svg)](https://www.npmjs.com/package/@siteline/nextjs)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](../../LICENSE)

## Features

- Zero-config middleware for automatic tracking
- Track bots from OpenAI, Google, Anthropic, Perplexity, and more
- Works in Edge Runtime and Node.js
- Full TypeScript support
- Compatible with App Router and Pages Router
- Extensible with custom middleware

## Installation

```bash
npm install @siteline/nextjs
```

## Quick Start

### Without Custom Proxy (ex Middleware)

```typescript
// proxy.ts
import { withSiteline } from '@siteline/nextjs';

export default withSiteline({
  websiteKey: process.env.SITELINE_WEBSITE_KEY!,
});

export const config = {
  matcher: ['/((?!_next/static|_next/image|favicon.ico).*)'],
};
```

### With Custom Proxy (ex Middleware)

```typescript
// proxy.ts
import { type SitelineConfig, withSiteline } from '@siteline/nextjs';
import { NextResponse } from 'next/server';
import type { NextRequest } from 'next/server';

const sitelineConfig: SitelineConfig = {
  websiteKey: process.env.SITELINE_WEBSITE_KEY!,
  debug: process.env.NODE_ENV === 'development',
}

export default withSiteline(sitelineConfig, (request: NextRequest) => {
  const response = NextResponse.next();
  response.headers.set('x-custom-header', 'value');
  return response;
});

export const config = {
  matcher: ['/((?!_next/static|_next/image|favicon.ico).*)'],
};
```

## Configuration

| Option | Type | Required | Description |
|--------|------|----------|-------------|
| `websiteKey` | `string` | Yes* | Your Siteline website key (*or set via `SITELINE_WEBSITE_KEY` env var) |
| `endpoint` | `string` | No | Custom API endpoint |
| `debug` | `boolean` | No | Enable debug logging |

## Documentation

- [Full Documentation](https://docs.gptrends.io/integrations/nextjs)
- [GitHub Repository](https://github.com/siteline-ai/siteline-js-sdk)

## Related Packages

- [@siteline/core](https://www.npmjs.com/package/@siteline/core) - Core tracking SDK

## Support

- [GitHub Issues](https://github.com/siteline-ai/siteline-js-sdk/issues)
- Email: team@siteline.ai

## License

MIT
npm package: @sitemapy/ui
Description: This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Author: Kevin Marques
Latest version: 1.7.0

# React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh

## Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:

```js
export default tseslint.config({
  extends: [
    // Remove ...tseslint.configs.recommended and replace with this
    ...tseslint.configs.recommendedTypeChecked,
    // Alternatively, use this for stricter rules
    ...tseslint.configs.strictTypeChecked,
    // Optionally, add this for stylistic rules
    ...tseslint.configs.stylisticTypeChecked,
  ],
  languageOptions: {
    // other options...
    parserOptions: {
      project: ['./tsconfig.node.json', './tsconfig.app.json'],
      tsconfigRootDir: import.meta.dirname,
    },
  },
})
```

You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:

```js
// eslint.config.js
import reactX from 'eslint-plugin-react-x'
import reactDom from 'eslint-plugin-react-dom'

export default tseslint.config({
  plugins: {
    // Add the react-x and react-dom plugins
    'react-x': reactX,
    'react-dom': reactDom,
  },
  rules: {
    // other rules...
    // Enable its recommended typescript rules
    ...reactX.configs['recommended-typescript'].rules,
    ...reactDom.configs.recommended.rules,
  },
})
```
npm package: @siteo/app
Description: Core material design template for  web apps which based on Siteo platform https://siteo.top
Author: Dmytro Diachuk
Latest version: 0.2.0

# siteo-app
Siteo-app is core app for all apps and  websites which created on https://siteo.top platform. It based on Vue + Vuetify

#### Example
is cooking...
npm package: @siteone/atoms
Description: This package holds shared React components for the monorepo. These components are used by the Razzle and CRA applications out of the box. This package comes configured with TypeScript, React Storybook, and Jest already setup for you.
Latest version: 0.0.5

# UI

This package holds shared React components for the monorepo. These components are used by the Razzle and CRA applications out of the box. This package comes configured with TypeScript, React Storybook, and Jest already setup for you.
npm package: @siteone/builder
Description: Configuration and scripts for Create React SSR App
Latest version: 0.17.6

# react-ssr-scripts

This package includes scripts and configuration used by [Create React SSR App](https://git.siteone.cz/frontend/create-react-ssr-app).<br>
Please refer to its documentation:

- [Getting Started](https://siteone.github.io/create-react-ssr-app/docs/getting-started) – How to create a new app.
- [User Guide](https://siteone.github.io/create-react-ssr-app/) – How to develop apps bootstrapped with Create React SSR App.
npm package: @siteone/builder-core
Description: > BLDR's core configuration builder.
Latest version: 0.12.2

# @siteone/builder-core

> BLDR's core configuration builder.

```sh
$ npm install --save-dev @siteone/builder-core
```

## API

### core(src, opts)
> Returns: `WebpackCompiler`

Returns an instance of Webpack.

Attaches a `BLDR_CONFIG` key on the `WebpackCompiler` directly, containing the parsed `bldr.config.js` file, if any.

Will also mutate `opts` will additional keys:

* `src` – the resolved `src` value<br>
  _Equivalent to `WebpackCompiler.options.context` value._

* `webpack` - the `require('webpack')` instance in use<br>
  _For reuse / convenience elsewhere; eg, Plugins._

#### src
Type: `String`<br>
Default: `'src'`

The name of your "source" directory within the `opts.cwd`. This will be set as the [`context`](https://webpack.js.org/configuration/entry-context/#context) for Webpack.

> **Important:** Reverts to the `opts.cwd` if the directory could not be found.

#### opts.cwd
Type: `String`<br>
Default: `'.'`

The current working directory.

#### opts.dest
Type: `String`<br>
Default: `'build'`

The name of the [`output`](https://webpack.js.org/configuration/output/#output-path) directory.

#### opts.analyze
Type: `Boolean`<br>
Default: `false`

When this and `opts.production` are both `true`, attaches and starts [Webpack Bundle Analyzer](https://github.com/webpack-contrib/webpack-bundle-analyzer) for bundle inspection.

#### opts.production
Type: `Boolean`<br>
Default: `false`

If building configuration for production.

#### opts.template
Type: `String`

The name or path to a custom template for [HTML Webpack Plugin](https://github.com/jantimon/html-webpack-plugin).

If nothing is provided, then BLDR will look for a `index.{html,hbs,ejs}` file within your `src` directory.

If an `index.(html|hbs|ejs)` couldn't be found, then the [internal template](https://git.siteone.cz/frontend/builder/bldr/blob/master/packages/core/webpack/template.ejs) will be used.
npm package: @siteone/builder-plugin-brotli
Description: > plugin for preparing compressed assets with [`brotli`](https://github.com/google/brotli)
Latest version: 0.12.0

# @siteone/builder-plugin-brotli

> plugin for preparing compressed assets with [`brotli`](https://github.com/google/brotli)

## Install

```sh
$ npm install --save-dev @siteone/builder-plugin-brotli
```

## Usage

_None – recognized by and attached to `@siteone/builder-core` automatically!_


## Config

Configurable via the `brotli` key on your `bldr.config.js` file.

***Default Config:***

```js
exports.brotli = {
  cache: true,
  threshold: 0,
  minRatio: 0.8,
  compressionOptions: {
    quality: 11,
    size_hint: 0,
    lgblock: 0,
    lgwin: 22,
    mode: 0
  }
}
```

***Available Options:***

See [Options](https://github.com/webpack-contrib/compression-webpack-plugin#options) for `compression-webpack-plugin`.

Also see [`iltorb`'s Encoding Params](https://github.com/MayhemYDG/iltorb#brotliencodeparams) for the `compressionOptions` object.

> :bulb: Explanations for the `brotli` parameters are available [here](https://github.com/google/brotli/blob/v1.0.4/c/include/brotli/encode.h#L133-L205).
npm package: @siteone/builder-plugin-buble
Description: > plugin for [`Bublé`](https://buble.surge.sh/guide/#what-is-buble)
Latest version: 0.1.1

# @siteone/builder-plugin-buble

> plugin for [`Bublé`](https://buble.surge.sh/guide/#what-is-buble)

## Install

```sh
$ npm install --save-dev @siteone/builder-plugin-buble
```

## Usage

_None – recognized by and attached to `@siteone/builder-core` automatically!_

> **Important:** This plugin will automatically swap out & disable `babel-loader`!<br>
The use of Bublé is recommended for simpler, vanilla JS applications... and/or for [the wild and crazy](https://blog.chron.com/tubular/files/2014/02/wild-and-crazy-guys1.gif).


## Config

Configurable via the `buble` key on your `bldr.config.js` file.

> **Note:** Your [`Browserslist config`](https://git.siteone.cz/frontend/builder/bldr#browserslist) results will be transformed into a `target` object for Bublé!<br>
However, defining your own `buble.target` object will prevent this transformation.

***Default Config:***

```js
exports.buble = {
  transforms: {
    modules: false
  }
}
```

***Available Options:***

See Bublé's documentation for [Supported Features](https://buble.surge.sh/guide/#supported-features), [JSX](https://buble.surge.sh/guide/#jsx), and [Dangerous Transforms](https://buble.surge.sh/guide/#dangerous-transforms).
npm package: @siteone/builder-plugin-critters
Description: > [Critters](https://github.com/GoogleChromeLabs/critters) plugin for [`bldr`]()
Latest version: 0.12.0

# @siteone/builder-plugin-critters

> [Critters](https://github.com/GoogleChromeLabs/critters) plugin for [`bldr`]()

## Install

```sh
$ npm install --save-dev @siteone/builder-plugin-critters
```

## Usage

_None – recognized by and attached to `@siteone/builder-core` automatically!_

## Config

Configurable via the `critters` key on your `bldr.config.js` file.

***Default Config:***

_None – uses Critters' default config._

***Available Options:***

See [Critters Options](https://github.com/GoogleChromeLabs/critters#options).
npm package: @siteone/builder-plugin-eslint
Description: > plugin for [ESLint](https://eslint.org/)
Latest version: 0.12.0

# @siteone/builder-plugin-eslint

> plugin for [ESLint](https://eslint.org/)

## Install

```sh
$ npm install --save-dev @siteone/builder-plugin-eslint
```

## Usage

_None – recognized by and attached to `@siteone/builder-core` automatically!_

## Config

Configurable via the `eslint` key on your `bldr.config.js` file.

You may also define or use existing `.eslintrc.*` files in your project. You may also provide a custom `configFile` path.

***Default Config:***

```js
exports.eslint = {
  cache: true,
  parserOptions: {
    parser: 'babel-eslint'
  }
}
```

***Available Options:***

See [Options](https://github.com/webpack-contrib/eslint-loader#options) for `eslint-loader` and [ESLint's Options](https://eslint.org/docs/developer-guide/nodejs-api#cliengine) too.
npm package: @siteone/builder-plugin-gzip
Description: > plugin for preparing compressed assets with `gzip`
Latest version: 0.12.0

# @siteone/builder-plugin-gzip

> plugin for preparing compressed assets with `gzip`

## Install

```sh
$ npm install --save-dev @siteone/builder-plugin-gzip
```

## Usage

_None – recognized by and attached to `@siteone/builder-core` automatically!_


## Config

Configurable via the `gzip` key on your `bldr.config.js` file.

***Default Config:***

```js
exports.gzip = {
  cache: true,
  threshold: 0,
  minRatio: 0.8,
  compressionOptions: {
    level: 9
  }
}
```

***Available Options:***

See [Options](https://github.com/webpack-contrib/compression-webpack-plugin#options) for `compression-webpack-plugin`.

Also see [`zlib` Options](https://nodejs.org/api/zlib.html#zlib_class_options) for the `compressionOptions` object.
npm package: @siteone/builder-plugin-offline
Description: > plugin for [Offline Plugin](https://github.com/NekR/offline-plugin)
Latest version: 0.12.0

# @siteone/builder-plugin-offline

> plugin for [Offline Plugin](https://github.com/NekR/offline-plugin)

## Install

```sh
$ npm install --save-dev @siteone/builder-plugin-offline
```

## Usage

The plugin is recognized by and attached to `@siteone/builder-core` automatically.

However, you must manually include Offline's runtime into your bundle!

```js
if (process.env.NODE_ENV === 'production') {
  if ('serviceWorker' in navigator) {
    require('offline-plugin/runtime').install();
  }
}
```

> **Note:** For SW beginners, it's strongly recommended you use the above snippet!<br>
However, it's not required to wrap registration in a `NODE_ENV === 'production'` check.

## Config

Configurable via the `offline` key on your `bldr.config.js` file.

***Default Config:***

```js
exports.offline = {
  externals: [],
  appShell: '/index.html',
  excludes: ['**/.*', '**/*.map', '**/*.gz', '**/*.gzip', '**/*.br'],
  ServiceWorker: {
    output: 'sw.js',
    events: true
  }
}
```

***Available Options:***

Please refer to Offline Plugin's [options](https://github.com/NekR/offline-plugin/blob/HEAD/docs/options.md) options.
npm package: @siteone/builder-plugin-prettier
Description: > plugin for [Prettier](https://prettier.io/)
Latest version: 0.12.0

# @siteone/builder-plugin-prettier

> plugin for [Prettier](https://prettier.io/)

## Install

```sh
$ npm install --save-dev @siteone/builder-plugin-prettier
```

## Usage

_None – recognized by and attached to `@siteone/builder-core` automatically!_

## Config

Configurable via the `prettier` key on your `bldr.config.js` file.

By default, Prettier's [configuration files](https://prettier.io/docs/en/configuration.html) are supported and applied automatically:

* `.prettierrc`
* `prettier.config.js`
* `package.json`'s `"prettier"` key
* `.prettierignore`

> **Note:** Prettier options passed to `bldr.config.js` directly will override config files' values.

***Default Config:***

```js
exports.prettier = {
  parser: 'babylon'
}
```

***Available Options:***

See Prettier's [Options](https://prettier.io/docs/en/options.html)
npm package: @siteone/builder-plugin-sw-precache
Description: > plugin for [SW Precache](https://github.com/GoogleChromeLabs/sw-precache)
Latest version: 0.12.0

# @siteone/builder-plugin-sw-precache

> plugin for [SW Precache](https://github.com/GoogleChromeLabs/sw-precache)

## Install

```sh
$ npm install --save-dev @siteone/builder-plugin-sw-precache
```

## Usage

The plugin is recognized by and attached to `@siteone/builder-core` automatically.

However, you must manually include the generated `sw.js` file into your bundle!

```js
if (process.env.NODE_ENV === 'production') {
  if ('serviceWorker' in navigator) {
    navigator.serviceWorker.register('/sw.js');
  }
}
```

> **Note:** For SW beginners, it's strongly recommended you use the above snippet!<br>
However, it's not required to wrap registration in a `NODE_ENV === 'production'` check.


## Config

Configurable via the `precache` key on your `bldr.config.js` file.

***Default Config:***

```js
exports.precache = {
  minify: true,
  filename: 'sw.js',
  // stripPrefix: env.src
  navigateFallback: 'index.html',
  navigateFallbackWhitelist: [/^(?!\/__).*/],
  staticFileGlobsIgnorePatterns: [
    /\.git/,
    /\.DS_Store/,
    /^manifest.*\.js(?:on)?$/,
    /\.gz(ip)?$/,
    /\.map$/,
    /\.br$/
  ]
}
```

***Available Options:***

See [Options](https://github.com/goldhand/sw-precache-webpack-plugin#configuration) for `sw-precache-webpack-plugin`.
npm package: @siteone/builder-plugin-sw-workbox
Description: > plugin for [Workbox SW](https://developers.google.com/web/tools/workbox/modules/workbox-sw)
Latest version: 0.12.0

# @siteone/builder-plugin-sw-workbox

> plugin for [Workbox SW](https://developers.google.com/web/tools/workbox/modules/workbox-sw)

BLDR runs Workbox in the `GenerateSW` mode by default.

If you'd like to use `InjectManifest` mode for more control, you must set either `advanced` or `injectManifest` to true.

> **Important:** With `InjectManiest`, you must also create a `service-worker.js` template file in your `src` directory.

***Further Reading***
* [Which Workbox mode should I use?](https://developers.google.com/web/tools/workbox/modules/workbox-webpack-plugin#which_plugin_to_use)

## Install

```sh
$ npm install --save-dev @siteone/builder-plugin-sw-workbox
```

## Usage

The plugin is recognized by and attached to `@siteone/builder-core` automatically.

However, you must manually include the generated `sw.js` file into your bundle!

```js
if (process.env.NODE_ENV === 'production') {
  if ('serviceWorker' in navigator) {
    navigator.serviceWorker.register('/sw.js');
  }
}
```

> **Note:** For SW beginners, it's strongly recommended you use the above snippet!<br>
However, it's not required to wrap registration in a `NODE_ENV === 'production'` check.

## Config

Configurable via the `workbox` key on your `bldr.config.js` file.

***Default Config:***

```js
exports.workbox = {
  advanced: false, // alias
  injectManifest: false, // alias
  swSrc: 'service-worker.js', // template; mode: InjectManifest
  navigateFallbackWhitelist: [/^(?!\/__).*/], // mode: GenerateSW
  navigateFallback: 'index.html', // mode: GenerateSW
  swDest: 'sw.js',
  exclude: [
    /\.git/,
    /\.map$/,
    /\.DS_Store/,
    /^manifest.*\.js(?:on)?$/,
    /\.gz(ip)?$/,
    /\.br$/
  ]
}
```

***Available Options:***

If either `injectManifest` or `advanced` is set, please see [InjectManifest](https://developers.google.com/web/tools/workbox/modules/workbox-webpack-plugin#full_injectmanifest_config) options.

Otherwise, please refer to the [GenerateSW](https://developers.google.com/web/tools/workbox/modules/workbox-webpack-plugin#full_generatesw_config) options.