open-index/open-npm huggingface dataset:
npm package: @fetchdesigns/theme-toggle-core
Description: Framework-agnostic theme management core
Author: Fetch Designs
Latest version: 1.0.0

# @fetchdesigns/theme-toggle-core

Framework-agnostic theme management core for building theme toggle components.

## Installation

```bash
npm install @fetchdesigns/theme-toggle-core
# or
pnpm add @fetchdesigns/theme-toggle-core
```

## Usage

```typescript
import { ThemeManager, CookieStorage } from '@fetchdesigns/theme-toggle-core';

// Create a theme manager with cookie storage
const manager = new ThemeManager(new CookieStorage('theme'));

// Get current theme (from storage or system preference)
const currentTheme = manager.getCurrentTheme(); // 'light' | 'dark'

// Toggle theme
const newTheme = manager.toggleTheme();

// Set specific theme
manager.setTheme('dark');

// Clear saved preference (use system theme)
manager.clearTheme();

// Watch for system theme changes
const unsubscribe = manager.watchSystemTheme((theme) => {
  console.log('System theme changed to:', theme);
});

// Clean up listener
unsubscribe();
```

## API

### `ThemeManager`

Core theme management class.

#### Constructor

```typescript
new ThemeManager(storage: ThemeStorage)
```

#### Methods

- `getSystemTheme(): Theme` - Get system color scheme preference
- `getCurrentTheme(): Theme` - Get current theme (from storage or system)
- `setTheme(theme: Theme): void` - Set and apply theme
- `clearTheme(): void` - Remove stored preference
- `toggleTheme(): Theme` - Toggle between light/dark
- `applyTheme(theme: Theme): void` - Apply theme to DOM
- `watchSystemTheme(callback): () => void` - Watch system theme changes

### Storage Implementations

#### `CookieStorage`

Browser cookie storage adapter.

```typescript
new CookieStorage(cookieName?: string)
```

#### `LocalStorage`

Browser localStorage adapter.

```typescript
new LocalStorage(key?: string)
```

### Types

```typescript
export type Theme = 'light' | 'dark';

export interface ThemeStorage {
  get(): Theme | null;
  set(theme: Theme): void;
  remove(): void;
}
```

## License

MIT © Fetch Designs
npm package: @fetchforms/core
Description: The core javascript library for Fetch Forms
Author: @lukefrogger
Latest version: 1.0.6

# Fetch Forms Core

### What is Fetch Forms?
Fetch Forms is a headless forms builder designed to help developers build forms and connect data.

## Documentation
- [Full code examples](https://github.com/fetchforms)
- [Doc Overview](https://www.fetchforms.io/docs/overview)
- [The Fetch Form object](https://www.fetchforms.io/docs/fetch-form-object)

### Add the package to your app
```sh
npm install @fetchforms/core
```
```sh
yarn add @fetchforms/core
```

### Quick start
Using the `renderForm()` function is the quickest way to get started. It'll handle state management, client side validation, and sending the submission to Fetch Forms if applicable. 
You can add functions to recieve data when the form loads or a submission is completed. 

```html
<!DOCTYPE html>
<html>
  <head>
    <meta name="viewport" content="width=device-width,initial-scale=1" />
    <title>Fetch Forms Javascript</title>
    <meta charset="UTF-8" />
  </head>

  <body>
    <main>
      <h2 id="form_name" style="margin-bottom: 25px;"></h2>
      <div id="fetch_form"></div>
      <pre id="result"></pre>
    </main>
    <script>
     import { renderForm } from "@fetchforms/core";

     const onComplete = (data) => {
       document.getElementById("result").innerHTML = JSON.stringify(data, null, 2);
     };
     const onLoad = (data) => {
       document.getElementById("form_name").innerHTML = data.name;
     };

     renderForm(
       "fcd4ca8b-12d4-4b8c-882d-00144d54d02c",
       "fetch_form",
       onComplete,
       onLoad
     );
   </script>
  </body>
</html>
```

### API Reference
There are three methods available:

`getForm`: Returns the [Fetch Form object]("www.fetchforms.io/docs/fetch-form-object"). Use this to render the form in whatever way you need..<br/>
`renderForm`: Will build out and submit forms for you. You need pass in the ID of an element to attach the form to. Optionally, you can subscribe to the form's details and submission data.<br/>
`requestBuild`: Returns the [Fetch Form object]("www.fetchforms.io/docs/fetch-form-object") based on a [source code form]("www.fetchforms.io/docs/source-code-forms").
npm package: @fetching/core
Description: Strongly-typed REST API client for web apps.
Latest version: 0.3.3

# Fetching
💪 Strongly-typed REST API client for browsers!

## Usage
**Fetching** is built on TypeScript. It adds some useful wrappers over the [unfetch](https://www.npmjs.com/package/unfetch) package.

### JavaScript
```js
import createEndpoint from 'fetching';

// Create an endpoint schema
const endpoint = createEndpoint(
    // Define the root url for the endpoint
    'https://api.example.com/', 

    // Dynamically create options to use with every request created with this endpoint.
    async () => ({ 
        headers: {
            'Content-Type': 'application/json'
        }
    }), 

    // Create middleware to run on every response from an endpoint.
    async (res) => await res.json
);

// Create reusable request functions:
const getTrees = endpoint.create.get('');
const createTree = endpoint.create.post('');

// Middleware defined for the endpoint schema runs when the request function runs
const promise = getTrees({ location: 'WA' });
promise.then(response => console.log(response)); // -> some JSON
```

### TypeScript
```ts
import createEndpoint from 'fetching';

interface Tree {
    name: string
}

interface TreeInfo extends Tree {
    location: string
};

// Create an endpoint schema
const endpoint = createEndpoint<Tree>(
    // Define the root url for the endpoint
    'https://api.example.com/trees',

    // Dynamically create options to use with every request created with this endpoint.
    async () => ({
        headers: {
            'Content-Type': 'application/json'
        }
    }),

    // Create middleware to run on every response from an endpoint.
    async (res) => await res.json()
);

// Create reusable request functions:
const getTrees = endpoint.create.get<any, TreeInfo[]>('');
const createTree = endpoint.create.post<TreeInfo, number>('');
const patchTree = endpoint.create.patch<{ [prop: string]: any }, boolean>('')

// Middleware defined for the endpoint schema runs when the request function runs
const promise = getTrees({ location: 'WA' });
promise.then(response => console.log(response)); // -> TreeInfo[]
```
npm package: @fetoolkit/dayjs
Description: ![](https://fejumvuajiwc28287693.gcdn.ntruss.com/fetoolkit/fetoolkit_thumbnail.png) (This thumbnail was created by Chat GPT)
Author: minwoo129
Latest version: 2.1.0

# FEToolkit/Dayjs

![](https://fejumvuajiwc28287693.gcdn.ntruss.com/fetoolkit/fetoolkit_thumbnail.png)
(This thumbnail was created by Chat GPT)

English | [한국어](./README_kr.md)

FEToolkit Dayjs is a utility package that provides date calculation features commonly needed when building calendar UIs with `dayjs`.  
It helps you write cleaner calendar data logic by offering functions for generating a month-based date board (2D weekly array) and calculating the number of weeks in a month.

## 1. Compatibility

|       Framework       | enabled | version |
| :-------------------: | :-----: | :-----: |
| JavaScript/TypeScript |   ⭕    |    -    |
|         dayjs         |   ⭕    |  >=1.x  |

## 2. Getting Started

### 2-1. Installation

- npm
  ```
  npm i @fetoolkit/dayjs
  ```
- yarn
  ```
  yarn add @fetoolkit/dayjs
  ```
- pnpm
  ```
  pnpm add @fetoolkit/dayjs
  ```

#### 2-1-1. Additional Required Packages

- npm
  ```
  npm i dayjs
  ```
- yarn
  ```
  yarn add dayjs
  ```
- pnpm
  ```
  pnpm add dayjs
  ```

## 3. Features

### 3-1. Integrated Features

| Name             | Description                                                                    |                      Docs                      |
| :--------------- | :----------------------------------------------------------------------------- | :--------------------------------------------: |
| dateBoardOfMonth | Returns a 2D date board including the first and last weeks of the target month | [Document](./docs/en/func_dateBoardOfMonth.md) |
| weekOfMonth      | Returns how many weeks the target month spans                                  |   [Document](./docs/en/func_weekOfMonth.md)    |

### 3-2. Types

| Name          | Description                        |                    Docs                     |
| :------------ | :--------------------------------- | :-----------------------------------------: |
| DateBoardItem | Data type for each date board cell | [Document](./docs/en/type_dateboarditem.md) |
npm package: @fetools/ali-oss-put
Description: ali-oss-put
Author: zechengdai
Latest version: 0.1.3

## @fetools/ali-oss-put

### install 

```sh
$ npm i @fetools/ali-oss-put -D
```

### config
configuration file ``.aliossputrc``
```json
{
    "accessKeyId": "***",
    "accessKeySecret": "***",
    "region": "oss-cn-hangzhou", //more like oss-cn-shenzhen
    "bucket": "static", //your own bucket name
    "prefix": "my/public/", // oss directory path
    "src":"dist", // upload directory
    "ignore": "*.js$" //opt, filter files is not put to oss
    "silent": true //default be true
}
```


### usage
use in package.json

```json
{
  "scripts": {
    "upload": "ali-oss-put"
  }
}
```

or use in js file 

```javascript
const aliOssPut= require('@fetools/ali-oss-put')

aliOssPut()
```
npm package: @fetp/fetp-template-vue
Description: A template vue2.0
Author: charles yang
Latest version: 0.0.2

# fetp-template-vue

fetp-template-basic is a basic build template for vue2.0

## init project

```bash
$ fetp i basic
```

## install dependencies

```bash
$ npm install
```

## running service

```bash
$ fetp d
```
npm package: @fetsorn/ged2dot
Description: ged2dot.js: convert GEDCOM to GraphViz dot notation
Author: Anton Davydov
Latest version: 0.2.0

# ged2dot.js

Convert GEDCOM to GraphViz dot notation. 

Parses a GEDCOM database into a graph, performs breadth-first traversal to build a subgraph, outputs GraphViz dot notation.

## API

 - ged2dot(ged, rootfamily, familydepth) - start from `rootfamily` and traverse up to `familydepth`
 - ged2dot_(ged) - start from `F1` family and traverse up to `4` depth

family and person nodes in the exported graph are interactive, but the user is expected to declare and implement the corresponding setters:

  - `window.ged2dot_setFamilyID`: _UID of a family node
  - `window.ged2dot_setPersonREFN`: _REFN of a person node
  - `window.ged2dot_setPersonUUID`: _UID of a person node
  
## React+TypeScript example

```typescript
import { useEffect, useState } from "react";
import { useNavigate } from "react-router-dom";
import { graphviz } from "@hpcc-js/wasm";

const ged = `
0 HEAD
1 GEDC
2 VERS 5.5.1
2 FORM LINEAGE-LINKED
1 CHAR UTF-8
0 @I0001@ INDI
1 NAME William /Shakespeare/
2 GIVN William
2 SURN Shakespeare
1 SEX M
1 BIRT
2 DATE BEF 23 APR 1564
2 PLAC Stratford-upon-Avon
1 DEAT
2 DATE 23 APR 1616
1 _UID A97E375D-4E76-4C50-AADD-DEB6D45C4FFD
0 TRLR`;

const FamilyIDControl = () => {
  const [html, setHtml] = useState("");
  const [familyID, setFamilyID] = useState("F0001");
  const navigate = useNavigate();

  const render = async (_familyID: any = familyID) => {
    const dot = ged2dot(ged, _familyID, 10);
    const svg = await graphviz.layout(dot, "svg", "dot");
    setHtml(svg);
  };

  useEffect(() => {
    window.ged2dot_setFamilyID = (id: string) => {
      setFamilyID(id);
    };
    window.ged2dot_setPersonREFN = (refn: string) => {
      navigate(`search?refn=${refn}`);
    };
    window.ged2dot_setPersonUUID = (uuid: string) => {
      navigate(`search?uuid=${uuid}`);
    };
  }, []);

  return (
    <>
      <div
        className={styles.csv}
        dangerouslySetInnerHTML={{ __html: html }}
      ></div>
      <input
        type="text"
        value={familyID}
        onChange={async (e: any) => {
          setFamilyID(e.target.value);
          await render(e.target.value);
        }}
      />
    </>
  );
};
```
npm package: @fetsorn/isogit-lfs
Description: LFS helpers for Isomorphic Git
Latest version: 0.5.3

A set of helpers to simplify working with Git LFS through Isomorphic Git.


== Installation

Peer dependencies:

- Isomorphic Git ^1.21.0


== Usage

As of 0.5.0, API offers the following functions:

- `downloadBlobFromPointer({ http, headers, url, auth }, lfsPointer) => Buffer`
+
where `http` is an `HttpClient` as supported by Isomorphic Git,
URL is repository URL
and `lfsPointer` is an object returned by `readPointer()`.
+
Uses cache, if the object had been previously retrieved.


- `uploadBlobs({ http, headers, url, auth }, buffers) => LFSPointerInfo`
+
where first argument is the same as for the download function,
and returned pointer info can be used to write a pointer file in place
of actual object in Git repository (pass it through `formatPointerInfo()`).


- `readPointer({ dir, gitdir, content }) => LFSPointer`
+
where `dir`, `gitdir` behavior mimics that of Isomorphic Git,
and `content` is a `Buffer`.

- `buildPointerInfo(content) => LFSPointerInfo`
+
converts file to a pointer.

- `readPointerInfo(buffer) => LFSPointerInfo`
+
reads a properly formatted LFS pointer within a Git repository.


- `formatPointerInfo(lfsPointerInfo) => Buffer`
+
converts pointer info to appropriately formatted blob
suitable to be stored in Git repository in place of actual object data.


- `populateCache(workDir, ref?)`
+
where `workDir` is a path to working directory,
and `ref` should probably be left at the default `"HEAD"`.
+

- `pointsToLFS(content) => boolean`
+
tells if file is an LFS pointer.

- `downloadUrlFromPointer({ http, headers, url, auth, info }) => Buffer`
+
where `http` is an `HttpClient` as supported by Isomorphic Git,
URL is repository URL
and `info` is an object returned by `buildPointerInfo()`.

- `addLFS({ fs, dir, filepath })`
+
where `fs` is an `FsClient` as supported by Isomorphic Git,
`dir` is the working tree directory path
and filepath is the path to the original file

== Considered within scope

- Implement batch uploads and downloads (parallelise requests? use native batch API?)
- Find a way to generalize UA header handling
npm package: @fetsorn/opentelemetry-console-exporter
Description: OpenTelemetry Console Exporter allows the user to send collected traces to the console.
Author: fetsorn
Latest version: 0.0.3

# OpenTelemetry Console Trace Exporter
[![NPM Published Version][npm-img]][npm-url]

OpenTelemetry Console Trace Exporter allows the user to send collected traces to console.debug.

## Setup

Google Cloud Trace is a managed service provided by Google Cloud Platform.

## Installation

```bash
npm install --save @fetsorn/opentelemetry-console-exporter
```

## Usage
Install the exporter on your application, register the exporter, and start tracing. 
```js
const { ConsoleExporter } = require('@fetsorn/opentelemetry-console-exporter');

const exporter = new TraceExporter({
  // If you want more detailed view, you will need to specify `isDetailed = true` here
});
```

Now, register the exporter.

```js
provider.addSpanProcessor(new BatchSpanProcessor(exporter));
```

Exporter requires `BatchSpanProcessor` to analyze the trace hierarchy.

- [BatchSpanProcessor](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.4.0/specification/trace/sdk.md#batching-processor): The implementation of the `SpanProcessor` that batches ended spans and pushes them to the configured `SpanExporter`.


## Useful links
- For more information on OpenTelemetry, visit: <https://opentelemetry.io/>
- For more about OpenTelemetry JavaScript: <https://github.com/open-telemetry/opentelemetry-js>
- Check out how this exporter is used in Polywrap: <https://github.com/polywrap/monorepo>

[npm-url]: https://www.npmjs.com/package/@fetsorn/opentelemetry-console-exporter
[npm-img]: https://badge.fury.io/js/%40fetsorn%2Fopentelemetry-console-exporter.svg
[license-url]: https://github.com/fetsorn/opentelemetry-console-exporter/blob/main/LICENSE
[license-image]: https://img.shields.io/npm/l/@fetsorn/opentelemetry-console-exporter