open-index/open-npm huggingface dataset:
npm package: @knaus94/steam-tradeoffer-manager
Description: A simple trade offers API for Steam
Latest version: 2.12.2-1

# Steam Trade Offer Manager for Node.js
[![npm version](https://img.shields.io/npm/v/steam-tradeoffer-manager.svg)](https://npmjs.com/package/steam-tradeoffer-manager)
[![npm downloads](https://img.shields.io/npm/dm/steam-tradeoffer-manager.svg)](https://npmjs.com/package/steam-tradeoffer-manager)
[![license](https://img.shields.io/npm/l/steam-tradeoffer-manager.svg)](https://github.com/DoctorMcKay/node-steam-tradeoffer-manager/blob/master/LICENSE)
[![sponsors](https://img.shields.io/github/sponsors/DoctorMcKay.svg)](https://github.com/sponsors/DoctorMcKay)

This module is designed to be a completely self-contained manager for
[Steam trade offers](https://steamcommunity.com/my/tradeoffers).

Instead of being just a simple API wrapper, it's designed to take most of the work out of implementing trade offers in
your application.

**You absolutely need Node.js v4.0.0 or later or this won't work.**

Install it from [npm](https://www.npmjs.com/package/steam-tradeoffer-manager) or check out the
[wiki](https://github.com/DoctorMcKay/node-steam-tradeoffer-manager/wiki) for documentation.

**Have a question about the module or coding in general? *Do not create a GitHub issue.* GitHub issues are for feature
requests and bug reports. Instead, post in the [dedicated forum](https://dev.doctormckay.com/forum/9-node-steam-tradeoffer-manager/).
Such issues may be ignored!**

# Support

Report bugs on the [issue tracker](https://github.com/DoctorMcKay/node-steam-tradeoffer-manager/issues) or ask questions
on the [dedicated forum](https://dev.doctormckay.com/forum/9-node-steam-tradeoffer-manager/).
npm package: @knaw-huc/original-layout
Description: Render W3C Web Annotation text at their original position and scale, using the svg coordinates from annotation targets as text boundaries.
Latest version: 0.1.11

# @knaw-huc/original-layout

Render W3C Web Annotation text at their original position and scale, using the svg coordinates from annotation targets as text boundaries.

## Demos

```sh
npm install
npm start
```
Open: http://localhost:5173/demo/
npm package: @knaw-huc/osd-iiif-viewer
Description: Lightweight React wrapper around OpenSeadragon to display and browse image sources from IIIF manifests.
Latest version: 0.2.1

# @knaw-huc/osd-iiif-viewer

Lightweight React wrapper around OpenSeadragon to display and browse image sources from IIIF manifests.

Features:
- Canvas navigation
- Highlight overlay
- Zoom, rotate and fullscreen controls
- Manifest loading and parsing with @iiif/helpers Vault

## Example

```tsx
import {useEffect} from 'react';
import {
  Viewer,
  ViewerProvider,
  useLoadManifest,
  useManifest,
} from '@knaw-huc/osd-iiif-viewer';

export function Example() {
  return <ViewerProvider>
    <MyOsdIiifView/>
  </ViewerProvider>
}

function MyOsdIiifView() {
  const loadManifest = useLoadManifest();
  const {isReady} = useManifest();

  useEffect(() => {
    loadManifest('/manifest.json');
  }, [loadManifest]);

  if (!isReady) {
    return null;
  }

  return (
    <div style={{width: '100%', height: '100vh'}}>
      <Viewer/>
    </div>
  );
}
```

For more examples, run `npm i && npm start` and open http://localhost:5173
npm package: @knaw-huc/text-annotation-segmenter
Description: Utility functions to help render overlapping annotations in a text.
Latest version: 0.1.1

  # @knaw-huc/text-annotation-segmenter

Utility functions to help render overlapping annotations in a text.

Annotations on a text have a non-hierarchical nature, i.e., they can overlap:
```text
Aa<bc>bb<cd>cc</bc>dd<cd>ee.
```
 
However, HTML is hierarchical. How to display these kinds of annotations that do not live inside or next to each other, but cut across each other?

The `segment` function creates an array of segments: a flat, non-overlapping list where each segment links to both the text and all the annotations that apply. Each segment translates into a single DOM element. Elements linked to multiple overlapping annotations can now be decorated with their own styling, classes and callbacks.

A special case is the marker: an annotation of zero width marking a position in the text. Markers result in zero-width segments, also linking all annotations that start at or span across that position.

## API

- [`segment<T>(text, annotations): TextSegment<T>[]`](./src/segment.ts) <br /> Split a text into TextSegments with char offsets to the text and a list of applying annotations.
- [`AnnotationSegment<T>`](./src/Model.ts) <br /> Input list of objects linking annotations to the text using character offsets.
- [`TextSegment<T>`](./src/Model.ts) <br /> Output list of segments with character offsets and the annotations that apply.
- [`groupSegments<T>(segments, predicate): Group<T>[]`](./src/groupSegments.ts) <br /> Group segments into higher-level units (e.g., words, sentences, entities) by collecting all segments that share a matching annotation.
- [`Group<T>`](./src/groupSegments.ts) <br /> Output group of segments matching the same predicate result.

## Example

Given the text `"abc"` with two overlapping annotations:

```txt
         text:  abc
annotation ab:  __
annotation bc:   __
```

```ts
import { segment } from "text-annotation-segmenter";

const text = 'abc';
const ab = {id: 'ab'};
const bc = {id: 'bc'};

const segments = segment(text, [
  {begin: 0, end: 2, body: ab},
  {begin: 1, end: 3, body: bc},
]);

expect(segments).toEqual([
  {id: '0', begin: 0, end: 1, annotations: [ab]},
  {id: '1', begin: 1, end: 2, annotations: [ab, bc]},
  {id: '2', begin: 2, end: 3, annotations: [bc]},
]);
```

More examples:

- For edge cases, see: [segment.spec.ts](./src/segment.spec.ts).
- For benchmarks, see [segment.bench.ts](./src/segment.bench.ts).