open-index/open-npm huggingface dataset:
npm package: @pkl-ts/parser
Description: Typescript parser for pkl
Latest version: 0.3.1

# Plk Typescript Parser Project

This project is a `typescript` parser implementation for `Pkl`. It is designed to parse `Pkl` code using antl4ng and typescript.

## Installation

To install the parser, run the following command:

```bash
pnpm add @pkl-ts/parser
```

## Usage

The following example shows how to parse a string input to a parse tree:

```typescript
import { pklParser } from '@pkl-ts/parser';
import { CharStreams } from '@pkl-ts/parser/antlr';

const input = `
age = 22
name: String = "Steve Jobs"
job {
    title = "CEO"
    company = "Apple"
    yearsOfExperience = 1
}
`;

const tree = pklParser(CharStreams.fromString(input));
```

You can then use the generated parser to walk the parse tree, for example with a visitor to extract all classProperty of Pkl code in array format:

```typescript
import { ClassPropertyContext, PklTsParserVisitor } from '@pkl-ts/parser';

class Visitor extends PklTsParserVisitor<Array<string>> {
  visitClassProperty = (ctx: ClassPropertyContext) => {
    let name = ctx.Identifier().getText();
    return [name];
  };

  protected defaultResult(): Array<string> | null {
    return null;
  }

  protected aggregateResult(
    aggregate: Array<string> | null,
    nextResult: Array<string> | null,
  ): Array<string> | null {
    if (aggregate === null) {
      return nextResult;
    } else if (nextResult === null) {
      return aggregate;
    } else {
      return aggregate.concat(nextResult);
    }
  }
}

let ri = tree.replInput();
let visitor = new Visitor();
visitor.visit(ri);
let classProperties = visitor.visit(ri);
console.log(classProperties); // ['age', 'name', 'job']
```

Also, you can walk the parse tree with listener too:

```typescript
import { ClassPropertyContext, PklTsParserListener } from '@pkl-ts/parser';
import { ParseTreeWalker } from '@pkl-ts/parser/antlr';

class Listener extends PklTsParserListener {
  classProperties: string[] = [];
  enterClassProperty = (ctx: ClassPropertyContext) => {
    let name = ctx.Identifier().getText();
    this.classProperties.push(name);
  };
}

let ri = tree.replInput();
let listener = new Listener();
ParseTreeWalker.DEFAULT.walk(listener, ri);
console.log(listener.classProperties); // ['age', 'name', 'job']
```

Or get value from tree directly

```typescript
let ri = tree.replInput();

let classProperties: string[] = [];

ri.classProperty().forEach((ctx) => {
  let name = ctx.Identifier().getText();
  classProperties.push(name);
});

console.log(classProperties); // ['age', 'name', 'job']
```
npm package: @pkl.js/react
Description: Typesafe plugin system for React
Author: Xpo Development
Latest version: 0.3.1

# @pkl.js/react

The core plugin management system for React PKL.

## Installation

```bash
npm install @pkl.js/react react
```

## Quick Start

```typescript
import { PluginManager } from '@pkl.js/react';
import { PluginProvider, PluginSlot } from '@pkl.js/react/react';

// Create plugin manager
const manager = new PluginManager(myAppContext);

// Load plugins
await manager.add(() => import('./my-plugin.js'), { enabled: true });

// Use in React
function App() {
  return (
    <PluginProvider registry={manager.registry}>
      <PluginSlot name="toolbar" />
    </PluginProvider>
  );
}
```

## Features

- **Standalone Mode** - Full plugin lifecycle control (add, enable, disable, remove)
- **Client Mode** - Fetch plugins from remote manifest
- **Automatic Resource Cleanup** - Resources cleaned up when plugins disabled
- **Type-Safe** - Full TypeScript support with generics
- **React Integration** - Hooks and components for seamless integration

## API Overview

### Plugin Management

```typescript
// Standalone mode
const manager = new PluginManager<AppContext>(context);
await manager.add(plugin, { enabled: true });
await manager.enable('plugin-id');
await manager.disable('plugin-id');
await manager.remove('plugin-id');

// Client mode
const client = new PluginClient({ 
  manifestUrl: 'https://api.example.com/plugins',
  context 
});
await client.sync();
```

### React Integration

```tsx
import { 
  PluginProvider, 
  PluginSlot,
  usePlugins,
  useEnabledPlugins,
  useSlotComponents,
} from '@pkl.js/react/react';

// Provider
<PluginProvider registry={manager.registry}>
  <App />
</PluginProvider>

// Slots
<PluginSlot name="toolbar" componentProps={{ theme: 'dark' }} />

// Hooks
const plugins = usePlugins();
const enabled = useEnabledPlugins();
const toolbarComponents = useSlotComponents('toolbar');
```

## Exports

### Main Export (`@pkl.js/react`)

- `PluginManager` - Standalone mode manager
- `PluginClient` - Client mode manager
- `PluginRegistry` - Low-level plugin storage
- `ResourceTracker` - Resource cleanup system
- Types: `PluginModule`, `PluginMeta`, `PluginEntry`, `PluginLoader`, etc.

### React Export (`@pkl.js/react/react`)

- `PluginProvider` - React context provider
- `PluginSlot` - Render plugin components
- Hooks: `usePlugins`, `useEnabledPlugins`, `usePlugin`, `usePluginMeta`, `useSlotComponents`

## Documentation

- [Getting Started Guide](../../docs/GETTING_STARTED.md)
- [API Reference](../../docs/API.md)
- [Advanced Usage](../../docs/ADVANCED.md)
- [Examples](../../examples/)
npm package: @pklaschka/ssblc
Description: Static Site Broken Link Chacker: A broken-link checker for static sites, like the ones generated with docsify
Author: Pablo Klaschka
Latest version: 0.4.3

# @pklachka/ssblc

Static Site Broken Link Checker

![CI Status Badge](https://github.com/pklaschka/ssblc/workflows/CI/badge.svg?branch=master)

A broken-link checker for static sites, like the ones generated with docsify that can get used, for example, for CI purposes on docsify docs (this is what I've developed it for).

It recursively checks internal links found on the static website (until every internal link is checked) and (without recursion) outgoing links. This is achieved by finding `href` attributes in the HTML, meaning also stylesheets included with `<link href="some-file.css">` get checked.

## Installation
You can either run it by just using `npx`, in which case you won't have to install it, or first install it with

```shell script
npm install -g @pklaschka/ssblc
```

## Usage
When you are in the folder of your static website (i.e., there is an `index.html` in this folder), simply run

```shell script
ssblc
```

after which the checker will begin its work.

To use it with `npx`, simply run

```shell script
npx @pklaschka/ssblc
```

Alternatively, you can also specify an absolute or relative path to the directory of the site, e.g., like this:

```shell script
ssblc ../my-site
```
npm package: @pklaschka/xd-deploy
Description: A toolbelt for easy and quick, iterative plugin development for Adobe XD allowing quick deployment to multiple test machines, making testing your plugin super easy.
Author: Pablo Klaschka
Latest version: 0.12.0

# xd-deploy

```bash
npx @pklaschka/xd-deploy <command>
```

A toolbelt for easy and quick, iterative plugin development for Adobe XD allowing quick deployment to multiple test machines, making testing your plugin super easy.

![GIF demonstrating the tool](./example.gif)

### Installation
```bash
npm install -g @pklaschka/xd-deploy
```

or

```bash
yarn add -g @pklaschka/xd-deploy
```

resulting in the `xd-deploy` binary getting addet to the *PATH*.

### Concept

There are three parts:

1. The "Server" serves the plugins to test machines from a folder. This can, but doesn't have to be the development machine, but *must* be accessible via the network.
   The server can be any machine, i.e., run under macOS, Windows or Linux.

2. The "Dev Client" can get used when the server isn't the development machine. It automates "deploying" to the server, which then distributes the plugin to all clients.
   The developer client can also run on any machine, allowing XD plugin development on Linux machines, too.

3. The "Clients" run on test machines with XD installed. It connects to the server and keeps all plugins in sync with the server version. Furthermore, whenever an update for a plugin gets distributed by the server, the client automatically installs it and Reloads the plugins inside XD, making it extremely easy to test after making changes.
   The client can get run on macOS, WIndows, and the Windows Subsystem for Linux (WSL). It requires XD to be installed on the machine.
   
## Deployment examples
### Example 1 (minimalistic)
In the first example, server and client run on the same machine. This would be a fesible workflow when you, e.g., want to work on a Linux machine and only test on Windows (no, why do you say I'm talking about myself? :stuck_out_tongue_winking_eye:).

![example deployment diagram 1](deployment-diagram-1.svg)
### Example 2 (rather complex)
The second example features two clients (representative of any number of clients) for testing machines, e.g., one running Windows and the other macOS, a central server (this may even be accessible via the WWW, meaning remote plugin development becomes possible) and multiple dev-clients deploying different plugins. This could be the workflow of an agency working on plugins, for example:

![example deployment diagram 2](deployment-diagram-2.svg)

## A visualization with one server, one client and a dev client

![](./sequence-diagram.svg)
npm package: @pklaschka/xd-panel-screenshot
Description: A tool to automate taking screenshots of panel plugins for Adobe XD
Author: Pablo Klaschka
Latest version: 0.0.5

# @pklaschka/xd-panel-screenshot [![NPM version](https://badge.fury.io/js/%40pklaschka%2Fxd-panel-screenshot.svg)](https://npmjs.org/package/@pklaschka/xd-panel-screenshot)

> A tool to automate taking screenshots of panel plugins for Adobe XD

:warning: Please note that right now, this tool only supports Windows machines.
I'd be happy to accept any pull requests expanding support in that area, though.

## Installation

```sh
$ npm install --global @pklaschka/xd-panel-screenshot
```

## Usage

1. Open your plugin's panel inside an Adobe XD window
2. Run
   ```sh
   $ xd-panel-screenshot
   ```
3. Follow the instructions (focus on the XD window)
4. Let the tool do it's magic
5. Find a perfect screenshot of your panel in the directory that you executed
   that command in.

## License

MIT © [Pablo Klaschka](https://github.com/pklaschka)
npm package: @pkm_kailow/logger
Description: This is a simple package that provides some functionality for logging in a node environment or browser.
Author: Peter K. Moss
Latest version: 3.1.1

# Logger

This is a simple package that provides some functionality for logging in a node environment or browser.

## Install and usage

* npm: `npm install @pkm_kailow/logger` 
* yarn: `yarn install @pkm_kailow/logger` 

```javascript
import { Logger } from '@pkm_kailow/logger'

const logger = new Logger(process.env.DEBUG) // E.g. use an environment variable to adjust the logging level

logger.error('Here is an error')
logger.warn('Here is a warning')
logger.info('Here is some info')
logger.debug('Here is debug information')
logger.full('Here is full information')
```
npm package: @pkmn/anon
Description: Logic for anonymizing Pokémon Showdown battle simulator logs
Latest version: 0.1.28

# `@pkmn/anon`

![Test Status](https://github.com/pkmn/stats/workflows/Tests/badge.svg)
![License](https://img.shields.io/badge/License-MIT-blue.svg)
[![npm version](https://img.shields.io/npm/v/@pkmn/anon.svg)](https://www.npmjs.com/package/@pkmn/anon)

Logic for anonymizing Pokémon Showdown teams and battle logs.

## Installation

```sh
$ npm install @pkmn/anon
```

## Usage

`@pkmn/anon` provides an `Anonymizer` class which can be used to anonymize teams or battle logs:

```ts
import {Anonymizer, Verifier} from '@pkmn/anon';
import {Generations} from '@pkmn/data';
import {Dex} from '@pkmn/dex';

const gens = new Generations(Dex);
const gen = gens.get(raw.format.startsWith('gen') ? +raw.format.charAt(3) : 6);

const verifier = new Verifier();
const anon = Anonymizer.anonymize(gen, raw, {verifier});
if (verifier.ok()) console.log(JSON.stringify(anon, null, 2));
```

By default, anonymization will replace player's usernames with `'Player 1'` and `'Player 2'` and
Pokémon's nicknames with their species name (in addition to removing chat logs, timestamps, rating
info, etc). Both `anonymize` and `anonymizeTeam` take a 'salt' option which will cause the
`Anonymizer` to hash the usernames and nicknames with the salt instead - this mode allows for
tracking the presence of a player or Pokémon accross multiple battle logs without revealing the
true identities.

`Anonymizer`'s methods also take an option 'verifier' parameter - a `Verifier` can be used to sanity
check the log output and ensure no names have leaked out. This is almost always due to a false
positive (often a Pokémon being nicknamed something which appears in the output logs in another
location), but can be helpful in ensuring no PII gets leaked due to bugs or oversight.

### CLI

The [`anonymize`](anonymize) tool takes in a log as input and anonymizes it:

```sh
$ anonymize 2020-09/gen8ou/2020-09-25/gen8ou-2875469343.log
```

If there are potential leaks the warnings from the `Verifier` will be output instead. For
anonymizing logs efficiently *en masse*, see [`@pkmn/logs`](../logs) and the
[`smogon/anon`](../workflows/smogon/anon.ts) workflow. The [`sample`](anonymize) tool can be
used to come up with a `--formats` flag for the workflow - the tool queries past usage stats
reports to determine how many battles were present in a given month to be able to
determine at what rates to sample at to end up with the desired number of logs for each format:

```sh
$ sample 100000 --formats=gen8ou,gen7ou --begin=2022-01 --end=2022-04
```

This produces `--formats=gen8ou:0.019417382834173616,gen7ou:0.00402947392710268`.

### Browser

The recommended way of using `@pkmn/anon` in a web browser is to **configure your bundler**
([Webpack](https://webpack.js.org/), [Rollup](https://rollupjs.org/),
[Parcel](https://parceljs.org/), etc) to minimize it and package it with the rest of your
application.

## License

This package is distributed under the terms of the [MIT License](LICENSE).
npm package: @pkmn/dex-types
Description: Common Pokémon Showdown Dex types shared by @pkmn/dex and @pkmn/sim
Latest version: 0.10.7

# `@pkmn/dex-types`

![Test Status](https://github.com/pkmn/ps/workflows/Tests/badge.svg)
![License](https://img.shields.io/badge/License-MIT-blue.svg)
[![npm version](https://img.shields.io/npm/v/@pkmn/dex-types.svg)](https://www.npmjs.com/package/@pkmn/dex-types)

Common Pokémon Showdown Dex types shared by [`@pkmn/dex`](..) and [`@pkmn/sim`](../sim).

This package is distributed under the terms of the [MIT License](LICENSE).
npm package: @pkmn/randoms
Description: Random team generation logic for Pokémon Showdown's Random Battle formats
Latest version: 0.10.7

# `@pkmn/randoms`

![Test Status](https://github.com/pkmn/ps/workflows/Tests/badge.svg)
![License](https://img.shields.io/badge/License-MIT-blue.svg)
[![npm version](https://img.shields.io/npm/v/@pkmn/randoms.svg)](https://www.npmjs.com/package/@pkmn/randoms)

An automatically generated extraction of a subset of Pokémon Showdown's "Random Battle" generation
logic for use with [`@pkmn/sim`](../sim).

## Installation

```sh
$ npm install @pkmn/randoms
```

## Usage

To generate a random team, get a `TeamGenerator` for a supported format and call `getTeam`:

```ts
import {TeamGenerators} from '@pkmn/randoms';

const generator = TeamGenerators.getTeamGenerator('gen8randombattle');
const team = generator.getTeam();
```

`@pkmn/randoms` is commonly used with [`@pkmn/sim`](../sim) to set the `TeamGenerator` factory on
its `Teams` so that `Teams.generate` will work:

```ts
import {Teams} from '@pkmn/sim';
import {TeamGenerators} from '@pkmn/randoms';

Teams.setGeneratorFactory(TeamGenerators);
const team = Teams.generate('gen1randombattle');
```

### Browser

The recommended way of using `@pkmn/randoms` in a web browser is to **configure your bundler**
([Webpack](https://webpack.js.org/), [Rollup](https://rollupjs.org/),
[Parcel](https://parceljs.org/), etc) to minimize it and package it with the rest of your
application.

## License

Substantial amounts of the code in this package have been either derived or generated from portions
of [Pokémon Showdown code](https://github.com/smogon/pokemon-showdown) which are distributed under
the [MIT License](LICENSE).
npm package: @pkmn/sets
Description: Parsing logic for Pokémon Showdown sets and teams
Latest version: 5.2.0

# `@pkmn/sets`

![Test Status](https://github.com/pkmn/ps/workflows/Tests/badge.svg)
![License](https://img.shields.io/badge/License-MIT-blue.svg)
[![npm version](https://img.shields.io/npm/v/@pkmn/sets.svg)](https://www.npmjs.com/package/@pkmn/sets)

Parsing logic for [Pokémon Showdown](https://pokemonshowdown.com)'s sets export format.

## Installation

```sh
$ npm install @pkmn/sets
```

Alternatively, as [detailed below](#browser), if you are using `@pkmn/sets` in the browser and want
a convenient way to get started, simply depend on a transpiled and minified version via
[unpkg](https://unpkg.com/):

```html
<script src="https://unpkg.com/@pkmn/sets"></script>
```

## Usage

This package can be used to parse sets and teams **without any dependencies**:

```ts
import {Sets} from '@pkmn/sets';

const set = Sets.importSet(
`Tangrowth @ Assault Vest
Ability: Regenerator
EVs: 248 HP / 8 Def / 252 SpD
Sassy Nature
IVs: 30 Atk / 30 Def
- Giga Drain
- Knock Off
- Hidden Power [Ice]
- Earthquake
`);
```

If you need to be able to unpack teams sent over the wire from old Pokémon Showdown server
implementations, need richer past generation support, or need the ability to convert sets written
with `ID`s (a core data type within Pokémon Showdown - strings containing just lower case
alphanumerics) into display names, a `Data` implementation must be provided as the optional second
parameter to the method you're using. The `Data` interface has been written such that it is
compatible with the `Dex` type from
[smogon/pokemon-showdown-client](https://github.com/smogon/pokemon-showdown-client),
[smogon/pokemon-showdown](https://github.com/smogon/pokemon-showdown), and from the
[`pkmn/dex`](../dex) package which can be used in a standalone fashion outside of Pokémon Showdown
codebase:

```ts
import {Dex} from '@pkmn/dex';
import {Sets} from '@pkmn/sets';

const set = Sets.unpack(
  'Tangrowth||AssaultVest|H|GigaDrain,KnockOff,PowerWhip' +
  ',Earthquake|Sassy|248,,8,,252,||,30,30,,,|||,Ice,',
  Dex.forGen(6)
);
```

### Browser

The recommended way of using `@pkmn/sets` in a web browser is to **configure your bundler**
([Webpack](https://webpack.js.org/), [Rollup](https://rollupjs.org/),
[Parcel](https://parceljs.org/), etc) to minimize it and package it with the rest of your
application. If you do not use a bundler, a convenience `index.min.js` is included in the package.
You simply need to depend on `./node_modules/@pkmn/sets/build/index.min.js` in a `script` tag (which
is what the unpkg shortcut above is doing), after which **`pkmn.sets` will be accessible as a
global.**

## License

This package is distributed under the terms of the [MIT License](LICENSE).
npm package: @pkmn/streams
Description: An automatically generated extraction of Pokémon Showdown's streams library
Latest version: 1.1.0

# `@pkmn/streams`

![Test Status](https://github.com/pkmn/ps/workflows/Tests/badge.svg)
![License](https://img.shields.io/badge/License-MIT-blue.svg)
[![npm version](https://img.shields.io/npm/v/@pkmn/streams.svg)](https://www.npmjs.com/package/@pkmn/streams)

This package has been automatically extracted from the [Pokémon
Showdown](https://github.com/smogon/pokemon-showdown) codebase. Documentation for the API of the
streams abstractions provided can be found in
[STREAMS.md](https://github.com/smogon/pokemon-showdown/blob/master/lib/STREAMS.md).

This package is distributed under the terms of Pokémon Showdown's [MIT License](LICENSE).
npm package: @pkmn/types
Description: Type definitions common across Pokemon Showdown
Latest version: 4.0.0

# `@pkmn/types`

![Test Status](https://github.com/pkmn/ps/workflows/Tests/badge.svg)
![License](https://img.shields.io/badge/License-MIT-blue.svg)
[![npm version](https://img.shields.io/npm/v/@pkmn/types.svg)](https://www.npmjs.com/package/@pkmn/types)

Type definitions common across [Pokémon Showdown](https://pokemonshowdown.com).

This package is distributed under the terms of the [MIT License](LICENSE).
npm package: @pknx/waterfall-cli
Description: CLI for waterfall-spec workflows: CR/story lifecycle, agent prompts, work-item sync, PDF export.
Latest version: 0.1.4

# @pknx/waterfall-cli

Command-line tool for **waterfall-spec** workflows: change requests, stories, agent prompts (Cursor / Cline / Claude Code), sync with work trackers, and PDF export.

The executable name on your PATH is **`waterfall`** (not the last segment of the package name).

> **Unscoped name:** [`waterfall-cli`](https://www.npmjs.com/package/waterfall-cli) on npm is a different package. This project publishes as **`@pknx/waterfall-cli`**.

## Requirements

- **Node.js** 20 or newer (22 recommended)
- Git (for branch workflows and `spec init`)

Heavy features (diagrams, PDF) pull in optional tooling such as Puppeteer and Pandoc-related packages; first install may take a moment.

## Install

```bash
npm install -g @pknx/waterfall-cli
```

Then:

```bash
waterfall --help
```

One-off run without a global install:

```bash
npx @pknx/waterfall-cli --help
```

## Quick start

Inside or above your spec repo:

```bash
waterfall help
waterfall spec init --title "My product" ./my-spec
```

Configure defaults with a `.waterfall` file in the project (see `waterfall help` and built-in comments when the file is created).

## Release process (maintainers)

Releases are **tag-driven and immutable** via GitHub Actions (`.github/workflows/publish-npm.yml`).

### Required setup

- Repository secret `NPM_TOKEN` with publish rights for `@pknx/waterfall-cli`.
- A pushed git tag in semver format: `vX.Y.Z` (for example `v0.1.4`).

### How to release

1. Ensure `develop` is up to date and CI is green.
2. Create and push a release tag:

   ```bash
   git tag vX.Y.Z
   git push origin vX.Y.Z
   ```

3. The workflow then runs automatically and:
   - validates tag format
   - aligns `package.json` version in CI to the tag version
   - runs `npm test`
   - publishes to npm (`@pknx/waterfall-cli`)
   - creates a GitHub Release for that exact tag

### After release

- On successful publish, a follow-up job updates `develop` to the next patch prerelease version:
  - `v0.1.4` release -> `develop` becomes `0.1.5-develop`
- No manual `npm publish` is needed for normal releases.

## License

MIT — see [LICENSE](./LICENSE).
npm package: @pkopy/changenumber
Description: This package changes number into words in Polish
Author: pkopy
Latest version: 2.1.1

# @pkopy/changeNumber

![xxx](https://img.shields.io/badge/npm-2.0.4.-blue.svg) ![size](https://img.shields.io/badge/ninified%20size-3KB-red.svg)

This package changes number into words in Polish. Range from 0 to 999 999 999

# Install

```
$ npm install @pkopy/changenumber
```

# Usage

```
const change = require("@pkopy/changenumber");

change(121);
//=> "sto dwadzieścia jeden!"

change('mama');
//=> TypeError: This is not a number

change(121.1)
//=> TypeError: This is not a integer number
```
npm package: @pkopy/dateformat
Description: This module formats date
Author: pkopy
Latest version: 1.0.4

#@pkopy/dateformat

![xxx](https://img.shields.io/badge/npm-1.0.2.-blue.svg)

# Install
```
$ npm install @pkopy/dateformat
```

# Usage

```
const dateToFormat = require("@pkopy/datefomat")

const myDate = new dateToFormat.MyDate()

const x = myDate.dateFormat(new Date('2001-04-01'), 'dmy', '*')

console.log(x)

//=> 01*04*2020

myDate.addDay(10, 'dmy', '-')


```

# Methods
### dateFormat([date][, format][,separator])
* date (optional) is a Date object, if date is null a default is a today date
* format (optional) is a format a data (string)
    * 'ymd' - year, month, day
    * can use any combination of this three characters
    * if empty a default value is 'mdy'
* separator (optional) string - if empty a default value is '/'

### addDay([number][,format][,separator]) - adds x days to today date
* number is a positive or negative number
* format (optional) is a format a data (string)
    * 'ymd' - year, month, day
    * can use any combination of this three characters
    * if empty a default value is 'mdy'
* separator (optional) string - if empty a default value is '/'