open-index/open-npm huggingface dataset:
npm package: @readium-js/cfi
Description: Readium - CFI javascript library
Author: Readium
Latest version: 1.0.0-alpha.2

# Readium JS - CFI

**EPUB3 CFI utility library in JavaScript**

## Installation

### Using npm / yarn

`npm install @readium-js/cfi`

or 

`yarn add @readium-js/cfi`

### Importing

**This library is bundled in UMD and ES module formats.**

- CommonJS
```javascript
const EPUBcfi = require('@readium-js/cfi');
```

- ES Modules
```javascript
import * as EPUBcfi from '@readium-js/cfi';
```

- Globally with `window.EPUBcfi`
```html
<script src="readium-js-cfi.umd.js"></script>
```

## Usage in non-browser environments (Node)
Currently not supported as the implementation depends on jQuery and the DOM. 

A subset of the API could work without a browser, which may be planned for a future release.

## Development

**Prerequisites:**

- Node JS

**Initial setup:**

* `npm install` 

**Typical workflow:**

* Hack away! (mostly the source code in `./src` and `./test/specs` )
* `npm run build` (to update the output bundles in the `dist` folder)

**Unit tests:**

* `npm run test`


## Bundled outputs

The `dist` directory contains bundled scripts in two module formats:

### UMD - [Universal Module Definition](https://github.com/umdjs/umd)

`readium-js-cfi.umd.js` (and its associated source-map file),
which aggregates all the required code (external library dependencies included, such as jQuery, etc.)

You can include this as CommonJS/AMD or with the global `EPUBcfi`

Works best for when using _Browserify_ or _RequireJS_

### ES Modules

`readium-js-cfi.esm.js` (and its associated source-map file),
also aggregates all the required code

Works best for _rollup.js_ or _webpack_

## NPM package

NPM packages "owned" and maintained by the Readium Foundation are listed here: https://www.npmjs.com/~readium-js

## License

**BSD-3-Clause** ( http://opensource.org/licenses/BSD-3-Clause )

See [LICENSE](./LICENSE).
npm package: @readium/css
Description: A set of reference stylesheets for EPUB Reading Systems
Author: readium
Latest version: 2.0.1

# Readium CSS

[![Readium Logo](https://readium.org/assets/logos/readium-logo.png)](https://readium.org)

A set of reference stylesheets for EPUB Reading Systems.

Readium CSS provides styles for reflowable text: 

- paged and scrolled views;
- a “patch” for HTML5 Suggested Rendering specific to publications (e.g. extra styles for hyphenation, breaks, etc.);
- default styles for unstyled ebooks;
- theming;
- user settings;
- a set of baselines and recommendations for accessibility, overrides, and internationalization.

## License

BSD-3-Clause (http://opensource.org/licenses/BSD-3-Clause)

See [license.txt](https://github.com/readium/css/blob/master/LICENSE).

## Scope of this project

The primary goal of Readium CSS is to provide Reading System implementers with reliable and modern styles for reflowable EPUB 2 and EPUB 3 files. In addition, it should provide good interoperability in the existing ecosystem, while not overriding authors’ styles unless strictly necessary.

Readium CSS stylesheets were not designed and should not be used for fixed-layout EPUB, nor other file formats like FB2, PRC, Mobi, TEI, etc.

Some issues, which may be raised during development, will be documented so that they can serve as a reference for revisions of the EPUB specification, and even future specifications.

## Implementations

Readium CSS is implemented in the [Readium Mobile](https://github.com/readium/mobile) and [Readium Web](https://github.com/readium/web) projects.

You will find it in:

- [ts-toolkit](https://github.com/readium/ts-toolkit)
- [swift-toolkit](https://github.com/readium/swift-toolkit)
- [kotlin-toolkit](https://github.com/readium/kotlin-toolkit)

External use include:

- [Thorium Desktop](https://github.com/edrlab/thorium-reader)
- [Thorium Web](https://github.com/edrlab/thorium-web)
- [Zotero](https://github.com/zotero/reader)
- [Vital Source](https://www.vitalsource.com/)

## Development

Active development is pulled in branch `develop`.

### Init

Building and testing are relying on npm packages and scripts. To initialize your clone/fork, first install dev dependencies:

```
npm install
```

In case you’re encountering an error with Puppeteer, make sure you’re using at least Node v.20.11.1 – it might work with an earlier version but only the latest LTS as of March 21, 2024 has been tested.

Then create reference bitmaps for visual regression testing:

```
npm run test:ref
```

### Build

To transpile all stylesheets using PostCSS:

```
npm run build
```

To test the updated styles and catch visual regression bugs:

```
npm run test
```

To update reference bitmaps after a bugfix:

```
npm run test:approve
```

## Docs

Documentation [can be accessed in docs](docs).

[You can alternatively download it as an EPUB file](https://github.com/readium/css/raw/master/docs/ReadiumCSS_docs.epub).
npm package: @readium/navigator
Description: Next generation SDK for publications in Web Apps
Author: readium
Latest version: 2.4.0-beta.12

# navigator

A navigator for web platforms based on the readium Navigator spec. Work is primarily based on the [kotlin toolkit](https://github.com/readium/kotlin-toolkit/tree/develop/readium/navigator/src/main/java/org/readium/r2/navigator), but adapted for the needs of the web.

To build:

```sh
pnpm run build
```

It will output 2 files (`index.js` and `index.umd.cjs`) in `dist`.
npm package: @readium/shared
Description: Shared models to be used across other Readium projects and implementations in Typescript
Author: readium
Latest version: 2.2.0-beta.3

# shared

Shared models to be used across other Readium projects and implementations in Typescript.

To test: 

```sh
# Run the Jest tests
pnpm run test
```

It will output the results in your shell.

To build: 

```sh
pnpm run build
```

It will output 6 files (`shared.js` and `shared.umd.cjs`, `fetcher.js` and `fetcher.cjs`) in `dist`.

To check the size limit: 

```sh
# Check ths size limit is not exceeded
pnpm run size
```