open-index/open-npm huggingface dataset:
npm package: @osamataha/printos-core
Description: PrintOS Mobile Core Library - Authentication, HTTP client, and storage utilities
Author: PrintOS Team
Latest version: 2.0.0

# @printos/core

Core library for PrintOS Mobile applications providing authentication, HTTP client, and storage utilities.

## Features

- **Authentication Provider**: OAuth flow management with session renewal
- **HTTP Client**: Axios-based client with error handling and Zod validation
- **Storage**: MMKV-based storage utilities
- **TypeScript**: Full type safety with TypeScript

## Installation

This is a local package managed as part of the PrintOS Mobile workspace.

## Usage

```typescript
import { AuthProvider, useAuth, createApiClient } from '@printos/core';
```

## Dependencies

- React & React Native
- @tanstack/react-query
- axios
- date-fns
- react-native-inappbrowser-reborn
- react-native-mmkv
- zod
npm package: @osaurus/sdk
Description: Osaurus SDK
Latest version: 0.0.1

# @osaurus/sdk

Osaurus SDK for Node.js and Electron.

## Installation

```bash

npm install @osaurus/sdk
# or
pnpm add @osaurus/sdk
# or
yarn add @osaurus/sdk
# or
bun add @osaurus/sdk
```

## Usage

```ts
import { discover } from "@osaurus/sdk";

const instance = await discover();
console.log("Osaurus running at:", instance.url);
```

## Examples

See [examples](examples/) folder for complete examples:

* [Basic](examples/basic.ts) - Basic usage of the SDK.
* [With OpenAI](examples/openai.ts) - Using the SDK with OpenAI.
* [Streaming](examples/streaming.ts) - Using the SDK with streaming.
* [Electron](examples/electron.ts) - Using the SDK with Electron.

### Run examples locally

```bash
cd examples
bun install
bun run basic
```

## API

* `discover(): Promise<OsaurusInstance>`

Discovers the latest running Osaurus instance.

Returns:

* `instanceId`: Unique instance identifier
* `url`: Base URL for API calls
* `port`: Port number
* `address`: IP address
* `exposeToNetwork`: Whether exposed to LAN
* `updatedAt`: Last update timestamp

Throws if no running instance found.

## License

MIT
npm package: @osaxyz/intersect
Description: Intersection Observer API を、Vue.jsで簡単に使用できるようにするためのnpmパッケージです。
Author: Original SIN Architecture
Latest version: 1.2.0

# @osaxyz/intersect

## インストール

`npm install @osaxyz/intersect`

## どう動くか

`v-intersect="handleintersect"`のように定義すると、要素が交差（Intersect）した際に関数が呼び出されます。

また、`entry`（交差情報）、`el`（交差したDOMの情報）を受け取ることができます。

## 使い方

### Vue.jsの場合

1. `@osaxyz/intersect`から`intersectDirective`をインポートします・
2. `app.use`を利用して登録して下さい。

```js
import intersectDirective from '@osaxyz/intersect'
app.use(intersectDirective)

const handleintersect = (entry, el) => {
    console.log(entry, el)
}
```

### Nuxt.jsの場合
1. `plugins`配下に任意の名前のjsファイルを作成し、インポートします。
2. `defineNuxtPlugin` を用いて登録します。

```js
import { defineNuxtPlugin } from 'nuxt/app'
import intersectDirective from '@osaxyz/intersect'

export default defineNuxtPlugin((nuxtApp) => {
  nuxtApp.vueApp.use(intersectDirective)
})
```

### コード

```html
<YourCustomElements v-intersect="handleintersect">
```
npm package: @osaxyz/mediaquery
Description: Sass内でショートハンドを用いて手軽にメディアクエリを実装できるnpmパッケージです。
Author: Original SIN Architecture
Latest version: 1.2.0

# @osaxyz/mediaquery

## インストール

`npm install @osaxyz/mediaquery`

## どう動くか

```sass
.hoge
    @include mq(ショートハンド)
        flex-direction: column
```

## ショートハンド一覧

| ショートハンド | 命名由来 | 幅 |
| --- | --- | --- |
| SE | iPhone SE 端末サイズ | 375px以下 |
| XR | iPhone XR 端末サイズ | 414px以下 |
| iPad | iPad 端末サイズ | 768px以下 |
| iPadPro | iPadPro 端末サイズ | 1024px以下 |
| Air | 13インチMacbook 画面サイズ | 1440px以下 |
| Pro | 15インチMacbook 画面サイズ | 1792px以下 |
| HD | フルHD 画面サイズ | 1920px以下 |
| upto4k | フルHD以上 | 1921px以上 |

## px指定

```sass
.hoge
    @include mqpx('300', 'px')
        flex-direction: column
```

ビューポートサイズ300px以下のメディアクエリとなる。
npm package: @osaxyz/universtyle
Description: 数学に基づいてWebサイトのマージンやフォントサイズを決定することができるnpmパッケージです。
Author: Original SIN Architecture
Latest version: 1.2.0

# @osaxyz/universtyle

## インストール

`npm install @osaxyz/universtyle`

## どう動くか

`harmonic()`で調和数列に基づくサイズを取得、`fibo()`でフィボナッチ数列に基づくサイズを取得、`silver()`で白銀比に基づくサイズを算出できます。

## 使い方

### scoped styleの場合

```sass
@use "@osaxyz/universtyle" as osa

html
    font-size: 16px

body
    font-size: osa.harmonic(1)

h1
    font-size: osa.harmonic(3)
    line-height: osa.silver(osa.harmonic(3), 1)
```
npm package: @osbjs/cli
Description: osbjs cli
Author: Nanachi
Latest version: 1.9.6

# osbjs cli

CLI tool for osbjs

## Install
Global
```bash
npm i -g @osbjs/cli
```

As dev dependency
```bash
npm i -D @osbjs/cli
```

## Documentation
Visit [documentation page](https://osbjs.vercel.app)

## Join discord for updates & discussion
https://discord.gg/t2sHY8TdMA
npm package: @osbjs/components
Description: osbjs pre-built components
Author: Nanachi
Latest version: 1.6.7

# osbjs components

This is a set of pre-built components for osbjs

## Install
```
npm i @osbjs/components
```

## Documentation
Visit [documentation page](https://osbjs.vercel.app)

## Join discord for updates & discussion
https://discord.gg/t2sHY8TdMA
npm package: @osbjs/core
Description: A minimalist osu! storyboarding library.
Author: Nanachi
Latest version: 1.0.0-alpha.4

# @osbjs/core

This package contains the functionality necessary for defining osu! storyboard elements and parsing .osu/.osb file.

## Usage

### Creating storyboard

```ts
import { Storyboard, Sprite } from '@osbjs/core'
import fs from 'fs'

const sb = new Storyboard()

const starImage = new Sprite({
  path: 'star.png',
  layer: 'Background',
  origin: 'Centre',
  position: [320, 240]
})
starImage.move({
  startTime: 0,
  endTime: 1000,
  startValue: [0, 0],
  endValue: [100, 100],
})
sb.children.push(starImage)

const osb = sb.toString()

fs.writeFileSync(
  'path/to/your/beatmap/folder/your-storyboard.osb',
  osb,
  'utf-8',
)
```

### Parsing beatmap

```ts
import { parseBeatmap } from '@osbjs/core'

const beatmap = parseBeatmap(
  fs.readFileSync('path/to/your/beatmap/folder/your-storyboard.osu', 'utf-8'),
)
```

## Documentation

Visit the [documentation page](https://osbjs-alpha.vercel.app).
npm package: @osbjs/hitobjects-tiny-osbjs
Description: Hit objects parser for tiny-osbjs.
Author: Nanachi
Latest version: 1.5.0

# hitobjects-tiny-osbjs
Hit objects parser for tiny-osbjs. This plugin only parses time and position needed to create a hit objects highlight effect.

## Install
```bash
npm i @osbjs/tiny-osbjs @osbjs/hitobjects-tiny-osbjs
```

## Usage
Note that this plugin does not handle the case where you manually edit the osu file so it might return unexpected result for that case.
```js
import { loadBeatmapHitobjects } from '@osbjs/hitobjects-tiny-osbjs'

const { sliders, circles } = loadBeatmapHitobjects('path/to/osu/file')

circles.forEach((circle) => {
	createSprite('ring.png', Layer.Background, Origin.Centre, circle.position, () => {
		fade([circle.time, circle.time + 100], 1, 0)
		scale([circle.time, circle.time + 100], 0, 1)
	})
})

const timestep = 300

sliders.forEach((slider) => {
	createSprite('ring.png', Layer.Background, Origin.Centre, slider.positionAtTime(slider.startTime), () => {
		fade([slider.startTime, slider.startTime + 100], 1, 0)
		scale([slider.startTime, slider.startTime + 100], 0, 1)
	})

	createSprite('beam.png', Layer.Background, Origin.Centre, slider.positionAtTime(slider.startTime), () => {
		fade([slider.startTime, slider.endTime], 1, 0)

		const startTime = slider.startTime
		const totalStep = Math.round((slider.endTime - slider.startTime) / timestep)

		for (let i = 0; i < totalStep; i++) {
			const prevEndTime = startTime + timestep * i
			const endTime = startTime + timestep * (i + 1)
			const startPosition = slider.positionAtTime(prevEndTime)
			const endPosition = slider.positionAtTime(endTime)
			move([prevEndTime, endTime], startPosition, endPosition)
		}
	})
})
```

## API documentation
### loadBeatmapHitobjects
```ts
function loadBeatmapHitobjects(filepath: string): HitObjects
type HitObjects = {
	sliders: Slider[]
	circles: Circle[]
}
type Slider = {
	startTime: number
	endTime: number
	positionAtTime: (time: number) => Vector2
}
type Circle = {
	position: Vector2
	time: number
}
```
Get all beatmap hitobjects.

### Finding hit object
```ts
function findCircleAtTime(
	time: number, 
	circles: Circle[], 
	maxAcceptableOffset: number = 5
): Circle | undefined
function findSliderAtTime(
	time: number, 
	sliders: Slider[], 
	maxAcceptableOffset: number = 5
): Slider | undefined
```
Get the circle/slider at a specific timestamp.

```ts
function filterHitObjectsInPeriod(
	startTime: number,
	endTime: number,
	hitobjects: HitObjects,
	maxAcceptableOffset: number = 5
): HitObjects
```
Returns hitobjects in a specific period.
npm package: @osbjs/math
Description: math helper
Author: Nanachi
Latest version: 2.4.0

# math

Math library. Used internally by other osbjs packages.

## Install
```sh
npm i @osbjs/math
```

## Documentation
Visit [documentation page](https://osbjs.vercel.app)

## Join discord for updates & discussion
https://discord.gg/t2sHY8TdMA
npm package: @osbjs/osbjs
Description: a minimalist osu! storyboarding framework
Author: Nanachi
Latest version: 2.3.0

# osbjs

A minimalist component-based osu! storboarding framework.

## Important annoucement


## Install
```
npm i @osbjs/osbjs
```

## Example

```js
const { Storyboard, Sprite, Easing, OsbVector2, Origin, Layer } = require('@osbjs/osbjs')

// Create storyboard instance
// If `path` is not specified, osbjs will create a new `storyboard` folder and save the storyboard there.
const sb = new Storyboard('Taishi feat. Hatsune Miku (Eng ver) - Scaler (Smug Nanachi).osb')

// Create a sprite
let sprite1 = new Sprite('sb/test.png', Layer.Background)
sprite1.Move(1000, 3000, new OsbVector2(320, 345), new OsbVector2(240, 480))

// You can also pass timestamp string to startTime/endTime/time argument.
// timestamp must be in osu timestamp format `mm:ss:fff`
sprite1.Move('00:04:000', '00:05:000', new OsbVector2(320, 345), new OsbVector2(240, 480)) // this works too

let sprite2 = new Sprite('sb/beam.png', Layer.Background)
sprite2.Fade(1, 1, 1, 0)

// Create a scene
let scene = new Scene()

// Add sprite to scene
scene.registerComponents(sprite)

// Register scene
sb.registerComponents(scene)

// Generate
sb.generate()
```

Since osbjs is component-based, you can create your own `Component` and reuse it anywhere else. Add your logic in the `generate` function and you are good to go!

```js
// components/Flash.js
const { Sprite, Component, Layer, OsbVector2 } = require('@osbjs/osbjs')

module.exports = class Flash extends Component {
	constructor(startTime, endTime) {
		super()
        this.startTime = startTime
        this.endTime = endTime
	}

	generate() {
		let fl = new Sprite('sb/dot.png', Layer.Background)
		fl.ScaleVec(this.startTime, this.startTime, new OsbVector2(854, 480), new OsbVector2(854, 480))
		fl.Fade(this.startTime, this.endTime, 1, 0)
		this.registerComponents(fl)
	}
}

// main.js
const Flash = require('./components/Flash')

let fl = new Flash(0, 3000)
scene.registerComponents(fl)
```

>Note: osbjs does NOT support async/await/promise. Everything called underhood is synchronous.

## Documentation
Visit [documentation page](https://osbjs.vercel.app)

## Contributing
At the moment I cannot accept PRs but if you want to contribute or leave a suggestion then head over to our [discord](https://discord.gg/t2sHY8TdMA).
npm package: @osbjs/osujs
Description: osu! beatmap parser
Author: Nanachi
Latest version: 2.2.1

# osujs

osu! beatmap parser

## Install
```
npm i @osbjs/osujs
```

## Usage

```js
import { Beatmap } from '@osbjs/osujs'

let beatmap = new Beatmap(pathToBeatmap);
```

## Join discord for updates & discussion
https://discord.gg/t2sHY8TdMA

## Documentation
Visit [documentation page](https://osbjs.vercel.app)

## Join discord for updates & discussion
https://discord.gg/t2sHY8TdMA
npm package: @osbjs/spectrum-tiny-osbjs
Description: Create spectrum helpers for tiny-osbjs.
Author: Nanachi
Latest version: 1.4.0

# spectrum-tiny-osbjs
Create spectrum helpers for tiny-osbjs.

## Install
```bash
npm i @osbjs/spectrum-tiny-osbjs @osbjs/tiny-osbjs
```

## Usage
Create a schema file by calling `createSpectrumSchema` in a seperate file and exec it.
```js
// createSchema.js
#!/usr/bin/env node
const { createSpectrumSchema } = require('@osbjs/spectrum-tiny-osbjs')

createSpectrumSchema('path/to/audio/file')
// and then call `node createSchema` 1 time.
```

Spectrum schema contains info on start time, end time, amount of frame-per-second and spectrum "frames", each frame contains 64 numbers between 0 and 1 that can be used to scale the spectrum bar. Example of how to create a simple spectrum effect:
```js
const { loadSpectrumSchema } = require('@osbjs/spectrum-tiny-osbjs')

const { startTime, endTime, fps, spectrumFrames } = loadSpectrumSchema(schemaPath)

const timestep = 1000 / fps
const width = 20
const maxHeight = 50
const margin = 3
const barCount = 20

let x = -107

for (let i = 0; i < barCount; i++) {
	const frames = spectrumFrames.map((frame) => frame[i])

	createSprite('sb/pixel.png', 'Background', 'Centre', { x, y: 240 }, () => {
		fadeAtTime(startTime, 1)
		colorAtTime(startTime, { r: 255, g: 255, b: 255 })

		for (let j = 0; j < frames.length; j++) {
			scaleVec(
				startTime + timestep * j,
				startTime + timestep * (j + 1),
				{ x: width, y: frames[j] * maxHeight },
				{ x: width, y: frames[j + 1] * maxHeight }
			)
		}
	})

	x += width + margin
}
```

## API documentation
### createSpectrumSchema
```ts
async function createSpectrumSchema(
	audioFilePath: string,
	outFilePath: string = 'spectrum.json',
	startTime: number = 0,
	endTime: number = -1,
	fps: number = 24,
	barCount: number = 64
)
```
Create a json file that store the audio data needed to create the spectrum effect.

### loadSpectrumSchema
```ts
function loadSpectrumSchema(schemaPath: string): SpectrumSchema
type SpectrumSchema = {
	startTime: number
	endTime: number
	fps: number
	spectrumFrames: SpectrumFrame[]
}
type SpectrumFrame = number[]
```
Load schema from json file.

### extractFrames
```ts
function extractFrames(spectrumFrames: SpectrumFrame[], startTime: number, endTime: number, fps: number): SpectrumFrame[]
```
Extract frames from a specific time period.
npm package: @osbjs/txtgen
Description: Text image generator for osbjs
Author: Nanachi
Latest version: 1.1.4

# txtgen

Text image generator for osbjs

> Note: `txtgen` uses `node-canvas` for generating image so make sure you have `node-gyp` installed. Read [this section](https://github.com/nodejs/node-gyp#installation) for more info on how to install `node-gyp` for your operating system.


## Install
```sh
npm i @osbjs/txtgen
```

## Example
```js
const { Texture, TextureGenerator} = require("@osbjs/txtgen")
const { Sprite, Origin, Layer } = require("@osbjs/osbjs")

const folderPath = ""
const txtGen = new TextureGenerator(folderPath, "sb/lyrics")

let line = {
	text: "Hello",
	startTime: 1000,
	endTime: 2000
}

let texture = txtGen.generateTexture(line.text)

let sprite = new Sprite(texture.osbPath, Layer.Background, Origin.Center, {
	x: 320,
	y: 400,
})

sprite.ScaleAtTime(line.startTime, 1)
sprite.Fade(line.startTime - 200, line.startTime, 0, 1)
sprite.Fade(line.endTime - 200, line.endTime, 1, 0)
```

## Documentation
Visit [documentation page](https://osbjs.vercel.app)

## Join discord for updates & discussion
https://discord.gg/t2sHY8TdMA