open-index/open-npm huggingface dataset:
npm package: @lonli-lokli/ng-result
Description: Angular Library with set of components/directives/pipes for easier work with Result union from https://github.com/Lonli-Lokli/ts-result
Author: Lonli-Lokli
Latest version: 1.3.0

> Ng-Result is an Angular Library with set of components/directives/pipes for easier work with data, using [Ts-Result](https://github.com/Lonli-Lokli/ts-result)

![GitHub release (latest by date)](https://img.shields.io/github/v/release/lonli-lokli/ng-result)
![GitHub commit activity](https://img.shields.io/github/commit-activity/m/lonli-lokli/ng-result)
[![GitHub license](https://img.shields.io/github/license/lonli-lokli/ng-result)](https://github.com/lonli-lokli/ng-result)
[![NPM](https://nodei.co/npm/@lonli-lokli/ng-result.png?mini=true)](https://npmjs.org/package/@lonli-lokli/ng-result)


[Demo](https://lonli-lokli.github.io/ng-result/)

## About
[Result](https://github.com/Lonli-Lokli/ts-result) is an union of following types: Initial, Pending, Failure<F> and Success<S>.

The problem it solving present is a very common one. You are loading a list of things but instead of showing a loading indicator you just see zero items. Same happens with actual data loading - sometimes you just do not think it will fail.

In my mental model, REST requests have one of four states:

* We haven't asked yet.
* We've asked, but we haven't got a response yet.
* We got a response, but it was an error.
* We got a response, and it was the data we wanted.

That is the purpose of this library - allow clean usage over this states with Angular.

## Installation

`ng add @lonli-lokli/ng-result`

## Usage of components

```html
<ll-result [data]="data$ | async">
  <ng-container *ifSuccess="data$ | async; let ok">
    Here is the type-safe response: {{ok}}
  </ng-container>
</ll-result>
```

# Components
TODO

## Publish
Run `npm run publish`
npm package: @lonnygomes/ol-zipped-source
Description: An OpenLayers module to read tiles from a zip file
Latest version: 0.0.1

# @lonnygomes/ol-zipped-source

This [OpenLayers](https://openlayers.org/) module allows you to serve local map tiles directly from a zip file, enabling offline use cases such as progressive web apps (PWAs) or desktop applications.

## How It Works

This package provides a custom OpenLayers tile source (`ZippedXYZ`) that reads tiles from a zip archive. The zip file is loaded once, and tiles are fetched from it as needed, using a special URL format.

## URL Format

To use tiles from a zip file, specify the source URL in the following format:

- The URL must start with `zip://`
- After the prefix, provide the path to your zip file (relative or absolute)
- After the zip file path, specify the internal path template for tiles, using `{z}`, `{x}`, `{y}` placeholders and the file extension

**Example:**
`zip://./db/tiles.zip/tiles/{z}/{x}/{y}.jpg`

This means:
- The zip file is at `./db/tiles.zip`
- Inside the zip, tiles are stored under `tiles/` with the standard `{z}/{x}/{y}.jpg` structure

## Installation

Install via npm:

```bash
npm install @lonnygomes/ol-zipped-source
```

## Usage Example

```js
import './style.css';
import { Map, View } from 'ol';
import TileLayer from 'ol/layer/Tile';
import { ZippedXYZ } from '@lonnygomes/ol-zipped-source';

const map = new Map({
  target: 'map',
  layers: [
    new TileLayer({
      source: new ZippedXYZ({
        url: 'zip://./db/tiles.zip/tiles/{z}/{x}/{y}.jpg'
        // You can also pass other ol/source/XYZ options here
      }),
    }),
  ],
  view: new View({
    center: [0, 0],
    zoom: 2,
  }),
});
```

### Example CSS

```css
html,
body {
  margin: 0;
  height: 100%;
}
#map {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 100%;
}
```

## Notes

- The zip file must be accessible via HTTP(S) or from the local filesystem in an Electron or similar environment.
- The internal structure of the zip must match the `{z}/{x}/{y}.ext` pattern.
- The `ZippedXYZ` source accepts all standard [ol/source/XYZ](https://openlayers.org/en/latest/apidoc/module-ol_source_XYZ-XYZ.html) options.
- If the zip file or tile is missing, errors will be logged to the console.

## Advanced

You can customize the tile class or pass additional options using the `tileClass` and `tileOptions` parameters. See the source code for details.You can customize the tile class or pass additional options using the `tileClass` and `tileOptions` parameters. See the source code for details.
npm package: @lono/router
Description: @lono/router
Author: ycl
Latest version: 0.0.4

# lono-router
TODO
- [ ] 增加@Header 优化设置请求头部和序列化
- [ ] 增加@Auth 权限支持传参一个promise 指向 cookie session jwt midd(404 401 auth)
- [ ] 路由增加file参数，支持文件上传
- [ ] 路由path优化支持正则表达式
npm package: @lonr/browser-logo-spinner
Description: browser logos as spinners
Author: lonr
Latest version: 1.0.0

# browser-logo-spinner

Use browser logos as spinners!

![chrome](./assets/infinite-loop/chrome.svg)
![edge](./assets/infinite-loop/edge.svg)
![firefox](./assets/infinite-loop/firefox.svg)
![opera](./assets/infinite-loop/opera.svg)
![safari](./assets/infinite-loop/safari.svg)

## Installation

```bash
yarn add @lonr/browser-logo-spinner
```

## Usage

This package provides several specific elements (e.g. `<chrome-spinner>`) and a `<browser-logo-spinner>` element which auto detects the visitor's UA and chooses one logo

```html
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <title>Usage</title>
    <script defer src="https://unpkg.com/@lonr/browser-logo-spinner"></script>
  </head>
  <body>
    <chrome-spinner style="width: 100px" loading></chrome-spinner>
    <browser-logo-spinner
      style="width: 200px"
      loading
      delay="500"
      faster-rate="3"
    ></browser-logo-spinner>
  </body>
</html>
```

`spinner.setAttribute('loading', '')` or `spinner.loading = true` to mark the spinner loading. The spinner will wait for `delay`(defaults to `200`ms) and then starting spinning

Then `spinner.removeAttribute('loading')` or `spinner.loading = false` to mark the spinner loaded. The spinner will speed up(controlled by `faster-rate`; defaults to `2`) and stop at the end of the current iteration

You should at least size the element or one of it's parent elements

You probably want to set an initial `loading` attribute

```html
<browser-logo-spinner style="width: 100px" loading></browser-logo-spinner>
```

There is also a [storybook](https://lonr.github.io/browser-logo-spinner) playground

## Limitations

The Opera spinner is broken in Firefox and Safari

Higher CPU usage
npm package: @lonr/href
Description: A URL-like API that helps you resolve relative URLs
Author: lonr
Latest version: 2.0.1

﻿# @lonr/href

The `@lonr/href` package exports a `RelativeURL` Class, a [URL](https://developer.mozilla.org/en-US/docs/Web/API/URL)-like API that helps you resolve relative URLs

## Usage

Install href:

```bash
# npm
npm install @lonr/href
# yarn
yarn add @lonr/href
```

Usage:

```js
import { RelativeURL } from "@lonr/href";
// ⛔️ Don't use RelativeURL to parse complete URLs. Use the built-in URL instead
new RelativeURL("https://example.com").pathname === "https://example.com";

new RelativeURL("path/to/file1?q=1").searchParams.set("q", "2");
new RelativeURL("file2", "path/to/file1").pathname === "path/to/file2";
new RelativeURL("file2", "path/to/").pathname === "path/to/file2";
new RelativeURL("../../file2").pathname === "../../file2";
```

Supported properties: `href`, `pathname`, `search`, `searchPrams`, `hash`

## Credits

This package is based on the work of [jsdom/whatwg-url](https://github.com/jsdom/whatwg-url)