open-index/open-npm huggingface dataset:
npm package: @manuscripts/data
Description: This repository contains source data for use by Manuscripts client applications, plus scripts for building and deploying the data to S3 and a Docker image.
Latest version: 1.0.4

# manuscripts-data

This repository contains source data for use by Manuscripts client applications, plus scripts for building and deploying the data to S3 and a Docker image.

## Data sources

### CSL submodules

The CSL locale and style files are published by [the CSL project](https://citationstyles.org/).

* `csl/locales` - the official [Citation Style Language (CSL) locale files](https://github.com/citation-style-language/locales).
* `csl/styles` - the official [distribution of validated CSL citation styles](https://github.com/citation-style-language/styles-distribution).

Run `scripts/update.sh` to update these sources.

### Couchbase Lite databases

* `couchbase/*.cblite` - databases from the Manuscripts desktop repository.

Run `node scripts/extract-databases.js` to extract the objects from these databases to JSON files. This happens automatically as part of the build process, so the extracted JSON files are not committed to version control.

### JSON files

* `shared/*.json` - JSON files from the Manuscripts desktop repository.

## Development

1. Clone this repository and run `git submodule update --init --recursive`.
1. Run `yarn build` to generate and populate the `dist` directory.
1. Run `yarn dev` to serve the files from the `dist` directory.
npm package: @manuscripts/eslint-config
Description: Shared ESLint config for Manuscripts projects
Latest version: 0.5.1

# Manuscripts ESLint config

Shared ESLint config for Manuscripts projects.

## Install

Use the following command to install ESLint, this shared config and the plugins needed as dev dependencies:

```sh
yarn add --dev eslint typescript \
    @typescript-eslint/eslint-plugin @typescript-eslint/parser \
    eslint-plugin-prettier eslint-config-prettier \
    eslint-plugin-import eslint-plugin-simple-import-sort \
    eslint-plugin-react eslint-plugin-react-hooks \
    eslint-plugin-header eslint-plugin-jest  \
    eslint-plugin-promise eslint-plugin-node \
    eslint-plugin-jsx-a11y \
    eslint-plugin-mdx \
    @manuscripts/eslint-config
```

## Usage

Use the following in a project's `.eslintrc.js` file (or `eslintConfig` section in `package.json`):

```js
module.exports = {
  extends: '@manuscripts/eslint-config',
  parserOptions: {
    project: './tsconfig.json',
  },
}
```

## License header

The `header/header` rule enforces a short Apache 2.0 license header at the start of every file. 

To add the missing file header to all files in a project, run `eslint --ext .ts,.tsx src --fix`

To disable this rule, add the following to the "rules" section of the project's ESLint config:

```
  "header/header": false
```
npm package: @manuscripts/examples
Description: Example Manuscripts documents for use in validation
Latest version: 0.1.1

# Manuscripts Examples

Example documents for use in validation.

**WARNING**: these documents are intended to represent the Manuscripts JSON output of the desktop Manuscripts app, and are used to validate the web app's transformer methods (import and export). To prevent breaking backwards-compatibility, be **very** careful when making any changes to these files, and make sure the changed objects are still compatible with Pressroom.
npm package: @manuscripts/json-schema
Description: The Manuscripts JSON Schema types, and validation functions.
Latest version: 2.2.12-LEAN-4531

# json-schema

The Manuscripts JSON Schema types and validation functions.

## Build
`yarn build`

## Validation
To validate a document against the schema, the `validate` function can be used:
```typescript
import { validate } from '@manuscripts/json-schema';

const document = {
    objectType: 'MPManuscript'
};

const error = validate(document);
if (!error) {
    console.log('document is valid');
} else {
    console.log(`document is invalid: ${error}`);
}
```
The schema is selected based on the `objectType` property of the document.

## Types
A Typescript interface is generated (and included in the package) for each abstract/concrete schema:
```typescript
import { Model } from '@manuscripts/json-schema';

function getId(document: Model) {
    return document._id;
}
```
An `ObjectTypes` enum is also available that includes all supported types with their corresponding `objectType` value:
```typescript
import { Model, ObjectTypes } from '@manuscripts/json-schema';

function isManuscript(document: Model) {
    return document.objectType === ObjectTypes.Manuscript;
}
```
npm package: @manuscripts/library
Description: Mainly used to generate CSL citations out of BibliographyItem lists that are transformed into HTML fragments with specific CSL styles (styles are mirrored from here https://github.com/citation-style-language/styles). But it can also parse various bibliogr
Latest version: 1.3.14-LEAN-2023.1

# manuscripts-library

Mainly used to generate CSL citations out of BibliographyItem lists that are transformed into HTML fragments with specific CSL styles (styles are mirrored from here https://github.com/citation-style-language/styles). But it can also parse various bibliography formats (.bib, .ris, papers-citations-xml, citeproc+json) into BibliographyItems as well as perform various utility functionalities.

A similar implementation of creating citations can be found here https://github.com/Zettlr/Zettlr/blob/dd2cbda72d9499edae6a1d95fb977794bde1ed4e/source/app/service-providers/citeproc-provider.ts that might be useful for understanding the problem context.
npm package: @manuscripts/plugin-persist
Description: This plugin ensures that all nodes which need ids (i.e. `id` is defined in the node spec's attributes) are given an id, and that there aren't any duplicate ids in the document.
Author: Atypon LLC
Latest version: 0.1.2

# @manuscripts/plugin-persist

This repo provides a plugin that automatically adds ID attributes to Nodes that need them, to facilitate persistent storage in Pouch/Couchbase.

## Usage

Install:

```sh
npm i @manuscripts/plugin-persist
```

Add to Editor on setup

```js
import persist from @manuscripts/plugin-persist

EditorState.create({
  doc,
  schema,
  plugins: [persist()],
})
```

## Development

```sh
git clone git@gitlab.com:mpapp-public/manuscripts-plugin-persist.git
cd manuscripts-plugin-persist
npm i
npm run typecheck
npm run lint
npm run build
```
npm package: @manuscripts/pouchdb-adapter-http
Description: Published from PouchDB fork | PouchDB adapter using HTTP (e.g. a remote CouchDB) as its data store.
Author: Dale Harvey
Latest version: 7.0.0-manuscripts3

# STOP!

If you're seeing this, you probably want [PouchDB](https://github.com/pouchdb/pouchdb), from which this package is forked.

While this repo contains some required internal modifications, the majority of the credit belongs to the maintainers of that repository.

## pouchdb-adapter-http

PouchDB adapter using HTTP (e.g. a remote CouchDB or CouchDB-like database) as its data store. Designed to run in either Node or the browser. Its adapter name is `'http'` or `'https'` depending on the protocol.

### Usage

```bash
npm install pouchdb-adapter-http
```

```js
PouchDB.plugin(require('pouchdb-adapter-http'));
var db = new PouchDB('http://127.0.0.1:5984/mydb');
```

For full API documentation and guides on PouchDB, see [PouchDB.com](http://pouchdb.com/). For details on PouchDB sub-packages, see the [Custom Builds documentation](http://pouchdb.com/custom.html).

### Source

PouchDB and its sub-packages are distributed as a [monorepo](https://github.com/babel/babel/blob/master/doc/design/monorepo.md).

For a full list of packages, see [the GitHub source](https://github.com/pouchdb/pouchdb/tree/master/packages).
npm package: @manuscripts/pouchdb-adapter-idb
Description: PouchDB adapter using IndexedDB as its data store.
Author: Dale Harvey
Latest version: 7.0.0-manuscripts2

pouchdb-adapter-idb
======

PouchDB adapter using IndexedDB as its data store. Designed to run in the browser. Its adapter name
is `'idb'`.

### Usage

```bash
npm install pouchdb-adapter-idb
```

```js
PouchDB.plugin(require('pouchdb-adapter-idb'));
var db = new PouchDB('mydb', {adapter: 'idb'});
```

For full API documentation and guides on PouchDB, see [PouchDB.com](http://pouchdb.com/). For details on PouchDB sub-packages, see the [Custom Builds documentation](http://pouchdb.com/custom.html).

### Source

PouchDB and its sub-packages are distributed as a [monorepo](https://github.com/babel/babel/blob/master/doc/design/monorepo.md).

For a full list of packages, see [the GitHub source](https://github.com/pouchdb/pouchdb/tree/master/packages).
npm package: @manuscripts/pouchdb-adapter-memory
Description: PouchDB adapter using in-memory as its data store.
Author: Dale Harvey
Latest version: 7.0.0-manuscripts1

pouchdb-adapter-memory
======

PouchDB adapter using in-memory as its data store. Designed to run in either Node or the browser. Its adapter name is `'memory'`.

### Usage

```bash
npm install pouchdb-adapter-memory
```

```js
PouchDB.plugin(require('pouchdb-adapter-memory'));
var db = new PouchDB('mydb', {adapter: 'memory'});
```

For full API documentation and guides on PouchDB, see [PouchDB.com](http://pouchdb.com/). For details on PouchDB sub-packages, see the [Custom Builds documentation](http://pouchdb.com/custom.html).

### Source

PouchDB and its sub-packages are distributed as a [monorepo](https://github.com/babel/babel/blob/master/doc/design/monorepo.md).

For a full list of packages, see [the GitHub source](https://github.com/pouchdb/pouchdb/tree/master/packages).
npm package: @manuscripts/pouchdb-core
Description: The core of PouchDB as a standalone package.
Author: Dale Harvey
Latest version: 7.0.0-manuscripts3

pouchdb-core
======

The core of PouchDB as a standalone package. This is a `preset` designed to be combined with other plugins to create new `presets`. By itself, it is not very useful.

### Usage

```bash
npm install pouchdb-core
```

```js
var PouchDB = require('pouchdb-core');
PouchDB.plugin(/* attach plugins to make me more interesting! */);
```

For full API documentation and guides on PouchDB, see [PouchDB.com](http://pouchdb.com/). For details on PouchDB sub-packages, see the [Custom Builds documentation](http://pouchdb.com/custom.html).

### Source

PouchDB and its sub-packages are distributed as a [monorepo](https://github.com/babel/babel/blob/master/doc/design/monorepo.md).

For a full list of packages, see [the GitHub source](https://github.com/pouchdb/pouchdb/tree/master/packages).
npm package: @manuscripts/prosemirror-recreate-steps
Description: Find and merge changes between two prosemirror documents without access to the steps.
Author: Johannes Wilm
Latest version: 0.1.4

# prosemirror-recreate-steps

This is a non-core module of [ProseMirror](http://prosemirror.net).
ProseMirror is a well-behaved rich semantic content editor based on
contentEditable, with support for collaborative editing and custom
document schemas.

Every change to the document is recorded by ProseMirror as a step. 
This module allows recreating the steps needed to go from document 
A to B should these not be available otherwise, and it allows merging
two different `Transforms` (sets of steps) whose steps may be 
conflicting.

Recreating steps can be interesting for example in order to show the 
changes between two document versions without having access to the
original steps. Merging `Transforms` can be of iinterest should two
users have worked on the same document over time without any means 
for synchronizing their work.

Recreating a `Transform` works this way:

```js
import {recreateTransform} from "prosemirror-recreate-steps"

let tr = recreateTransform(
    startDoc, 
    endDoc, 
    complexSteps = true, // Whether step types other than ReplaceStep are allowed.
    wordDiffs = false // Whether diffs in text nodes should cover entire words.
)
```

Merging `Transforms` works this way:

```js
import {mergeTransform} from "prosemirror-recreate-steps"

let {
    tr, 
    merge
} = mergeTransform(
    tr1, 
    tr2, 
    automerge = true, // Whether to try to auto-merge conflicting changes 
    rebase = false, // Whether to rebase the changes in tr2 on top of those in tr1.
    wordDiffs = false // Whether diffs in text nodes should cover entire words.
)
```

The `tr` is a `Tranform` of all combined changes of `tr1` and `tr2` that are not 
conflicting if automerge is enabled (otherwise it's a `Transform` with 0 steps).

The `merge` is a `Merge` object that contains information about all conflicting steps
and how they conflict with oneanother. Look at the examples in the demo folder on
how to make use of it.
npm package: @manuscripts/prosemirror-tables-sections
Description: adds head and foot sections to prosemirror-tables
Author: Johannes Wilm
Latest version: 0.0.1

# prosemirror-table-sections

Add-on for `prosemirror-tables` to add table and footer rows to tables.

This package consists of three parts that can be used independently:

Schema modifications
====
`addTableSections(tableNodes: TableNodes) : TableNodes` adds an attribute to the spec of table rows to
define the section of the row ('head', 'body' (default), or 'foot'). It can be used like this in combination with `prosemirror-tables`

```
import { tableNodes } from 'prosemirror-tables'
import { addTableSections } from 'prosemirror-tables-sections'

const tableOptions = {
    ... // options for tables
}

const nodes = addTableSections(tableNodes(tableOptions))

```

Commands
====
`toggleRowHeader` and `toggleRowFooter` are commands that toggle the section of the rows of the selection (if any) between 'body' and 'head'/'foot'.


Plugin
====
`tableSections(options = {})` returns a plugin that ensures that the order of sections ('head', 'body', 'foot') within any table are correct with any
change. Available options are `maxOneHead? (boolean)` which ensures that there is not more than one header row and `maxOneFoot? (boolean)` which ensures
that there is not more than one footer row, and `minOneHead? (boolean)`/`minOneFoot? (boolean)` which ensure that there is at least one head/foot row.
npm package: @manuscripts/sachs
Description: Command-line utility for Manuscripts format conversion
Latest version: 0.11.0

# @manuscripts/sachs

Command-line utility for Manuscripts format conversion.

## Usage

Run `sachs export --help` for a description of the parameters available.

### JATS export

`sachs export --format jats --input data/example.manuproj --output example.zip` 

### Literatum JATS export 

`sachs export --format literatum-jats --input data/example.manuproj --output example.zip` 

### Development

For debugging, build sachs using `yarn build:dev`.
npm package: @manuscripts/style-guide
Description: Shared components for Manuscripts applications
Latest version: 3.5.7

# Manuscripts Style Guide

React components for Manuscripts applications.

## Example usage

```tsx
import { PrimaryButton } from '@manuscripts/style-guide'

const Example: React.FunctionComponent<{
  handleClick: React.MouseEventHandler<HTMLButtonElement>
}> = ({ handleClick }) => (
  <div>
    <PrimaryButton onClick={handleClick}>Done</PrimaryButton>
  </div>
)
```

## Development

Run `yarn build` to build the `dist` folder for distribution.

Run `yarn dev` to automatically rebuild when a file is changed.

If a component needs new theme properties, add the types to `src/theme.ts` and add the corresponding values to `.storybook/theme.ts`.
npm package: @manuscripts/symbol-picker
Description: React component for picking a Unicode character
Latest version: 0.2.0

# @manuscripts/symbol-picker

A React component for picking a Unicode character.

# Install

`yarn add @manuscripts/symbol-picker`

# Usage

```
import { SymbolPicker } from '@manuscripts/symbol-picker'

<SymbolPicker handleSelectCharacter={…} />
```

# Character data

The character data is derived from a combination of the block ranges in the official Unicode data and the character information built into PHP.

To regenerate the `grouped.json` file that contains the list of characters in each block, run `php prepare/generate.php`. Remove the cached data in `prepare/tmp`  to fetch updated data if needed.
npm package: @manuscripts/tslint-config
Description: Shared TSLint config for Manuscripts projects
Latest version: 0.1.4

# Manuscripts TSLint config

Shared TSLint config for Manuscripts projects.

## Usage

Use the following in a project's `tslint.json` file:

```json
{
  "extends": "@manuscripts/tslint-config"
}
```

## License header

The `file-header` rule enforces a short Apache 2.0 license header at the start of every file. 

To add the missing file header to all files in a project, run `tslint --project . --fix`

To disable this rule, add the following to a project's `tslint.json`:

```
  "rules": {
    "file-header": false
  }
```