open-index/open-npm huggingface dataset:
npm package: @statesync/core
Description: Framework-agnostic state synchronization engine with revision protocol
Author: 777genius
Latest version: 1.1.0

# @statesync/core

Core state synchronization library. Framework- and transport-agnostic.

## Install

```bash
npm install @statesync/core
```

## Quick Start

```typescript
import { createConsoleLogger, createRevisionSync } from '@statesync/core';

const handle = createRevisionSync({
  topic: 'settings',
  subscriber: myInvalidationSubscriber,
  provider: mySnapshotProvider,
  applier: {
    apply(snapshot) {
      console.log('New data:', snapshot.data);
    },
  },
  onError(ctx) {
    console.error(`[${ctx.phase}]`, ctx.error);
  },
  logger: createConsoleLogger({ debug: true }),
});

await handle.start();

// Later:
handle.stop();
```

## API

### `createRevisionSync<T>(options): RevisionSyncHandle`

Creates a sync handle for the given topic.

**Options**:
- `topic` — resource identifier (`string`)
- `subscriber` — invalidation event source
- `provider` — snapshot provider
- `applier` — applies snapshots to local state
- `shouldRefresh?` — filter: whether to refresh for a specific event
- `logger?` — optional logger
- `onError?` — error callback

**Handle**:
- `start()` — subscribe and load the initial snapshot
- `stop()` — unsubscribe and block further apply
- `refresh()` — one-shot fetch + apply
- `getLocalRevision()` — current local revision

See the [lifecycle contract](https://github.com/777genius/state-sync/blob/main/docs/lifecycle.md).
npm package: @statesync/pinia
Description: Pinia adapter for state-sync — automatic store synchronization
Author: 777genius
Latest version: 2.0.0

# @statesync/pinia

Pinia adapter for state-sync. Applies snapshots to a Pinia store.

## Install

```bash
npm install @statesync/pinia @statesync/core
```

## Quick Start

```typescript
import { createRevisionSync } from '@statesync/core';
import { createPiniaSnapshotApplier } from '@statesync/pinia';

const store = useMyStore();

const applier = createPiniaSnapshotApplier(store);

const handle = createRevisionSync({
  topic: 'settings',
  subscriber: mySubscriber,
  provider: myProvider,
  applier,
});

await handle.start();
```

## Modes

### Patch (default)

```typescript
const applier = createPiniaSnapshotApplier(store);
// Calls store.$patch(data) — merges fields
```

### Replace

```typescript
const applier = createPiniaSnapshotApplier(store, { mode: 'replace' });
// Full replacement: deletes missing keys, assigns new ones
```

## Options

- `toState(data, ctx)` — map snapshot data → state patch
- `pickKeys` / `omitKeys` — limit which keys are updated
- `strict` (default: `true`) — throw if `toState` returns a non-object

See [full documentation](https://github.com/777genius/state-sync/blob/main/docs/adapters/pinia.md).
npm package: @statesync/svelte
Description: Svelte adapter for state-sync — automatic store synchronization
Author: 777genius
Latest version: 2.0.0

# @statesync/svelte

Svelte adapter for state-sync. Applies snapshots to a Svelte writable store.

## Install

```bash
npm install @statesync/svelte @statesync/core
```

## Quick Start

```typescript
import { createRevisionSync } from '@statesync/core';
import { createSvelteSnapshotApplier } from '@statesync/svelte';
import { writable } from 'svelte/store';

const settings = writable({ theme: 'light', lang: 'en' });

const applier = createSvelteSnapshotApplier(settings);

const handle = createRevisionSync({
  topic: 'settings',
  subscriber: mySubscriber,
  provider: myProvider,
  applier,
});

await handle.start();
```

## Modes

### Patch (default)

```typescript
const applier = createSvelteSnapshotApplier(store);
// Calls store.update(current => ({ ...current, ...patch }))
```

### Replace

```typescript
const applier = createSvelteSnapshotApplier(store, { mode: 'replace' });
// Full replacement: deletes missing keys, assigns new ones
```

## Options

- `toState(data, ctx)` — map snapshot data to state patch
- `pickKeys` / `omitKeys` — limit which keys are updated
- `strict` (default: `true`) — throw if `toState` returns a non-object

See [full documentation](https://github.com/777genius/state-sync/blob/main/docs/adapters/svelte.md).
npm package: @statesync/tauri
Description: Tauri transport layer for state-sync — event-based subscriber and provider
Author: 777genius
Latest version: 2.0.0

# @statesync/tauri

Tauri transport for state-sync. Uses Tauri events for invalidation and `invoke` for snapshots.

## Install

```bash
npm install @statesync/tauri @statesync/core
```

## Quick Start

```typescript
import {
  createTauriInvalidationSubscriber,
  createTauriSnapshotProvider,
  createTauriRevisionSync,
} from '@statesync/tauri';
import { listen } from '@tauri-apps/api/event';
import { invoke } from '@tauri-apps/api/core';

// Option A: explicit wiring
const handleA = createRevisionSync({
  topic: 'settings',
  subscriber: createTauriInvalidationSubscriber({ listen, eventName: 'state-sync:invalidation' }),
  provider: createTauriSnapshotProvider({ invoke, commandName: 'get_snapshot', args: { topic: 'settings' } }),
  applier: myApplier,
});

// Option B: DX sugar
const handleB = createTauriRevisionSync({
  topic: 'settings',
  listen,
  invoke,
  eventName: 'state-sync:invalidation',
  commandName: 'get_snapshot',
  args: { topic: 'settings' },
  applier: myApplier,
});

await handleA.start();
await handleB.start();
```

## API

### `createTauriInvalidationSubscriber(options)`

Wraps Tauri `listen` into an `InvalidationSubscriber`.

### `createTauriSnapshotProvider<T>(options)`

Wraps Tauri `invoke` into a `SnapshotProvider<T>`.

Both adapters accept structural types — you can pass your own mocks for testing without a Tauri runtime.

## Peer dependency policy

`@tauri-apps/api` is declared as an **optional** peer dependency:

- **In a production Tauri app**: install `@tauri-apps/api >=2` — you pass `listen` and `invoke` directly.
- **In tests**: you **don’t need** to install `@tauri-apps/api`. Use structural mocks:

```typescript
import { createRevisionSync } from '@statesync/core';
import { createTauriInvalidationSubscriber, createTauriSnapshotProvider } from '@statesync/tauri';

const mockListen = async (eventName, handler) => {
  // emulate events
  return () => {};
};

const mockInvoke = async (cmd, args) => {
  return { revision: '1', data: { /* ... */ } };
};

const subscriber = createTauriInvalidationSubscriber({ listen: mockListen, eventName: 'evt' });
const provider = createTauriSnapshotProvider({ invoke: mockInvoke, commandName: 'cmd' });
```

The adapters are typed via structural types (`TauriListen`, `TauriInvoke`), so any function with a compatible signature will be accepted by the TypeScript compiler.
npm package: @statesync/valtio
Description: Valtio adapter for state-sync — automatic proxy synchronization
Author: 777genius
Latest version: 2.0.0

# @statesync/valtio

Valtio adapter for state-sync. Applies snapshots to a Valtio proxy.

## Install

```bash
npm install @statesync/valtio @statesync/core
```

## Quick Start

```typescript
import { createRevisionSync } from '@statesync/core';
import { createValtioSnapshotApplier } from '@statesync/valtio';
import { proxy } from 'valtio';

const state = proxy({ theme: 'light', lang: 'en' });

const applier = createValtioSnapshotApplier(state);

const handle = createRevisionSync({
  topic: 'settings',
  subscriber: mySubscriber,
  provider: myProvider,
  applier,
});

await handle.start();
```

## Modes

### Patch (default)

```typescript
const applier = createValtioSnapshotApplier(state);
// Assigns filtered keys directly on the proxy
```

### Replace

```typescript
const applier = createValtioSnapshotApplier(state, { mode: 'replace' });
// Deletes allowed keys not in new state, then assigns new keys
```

## Notes

- The proxy reference is never replaced — mutations are applied directly
- Existing Valtio subscribers (useSnapshot) continue to work

## Options

- `toState(data, ctx)` — map snapshot data to state patch
- `pickKeys` / `omitKeys` — limit which keys are updated
- `strict` (default: `true`) — throw if `toState` returns a non-object

See [full documentation](https://github.com/777genius/state-sync/blob/main/docs/adapters/valtio.md).
npm package: @statesync/vue
Description: Vue adapter for state-sync — automatic ref/reactive synchronization
Author: 777genius
Latest version: 2.0.0

# @statesync/vue

Vue adapter for state-sync. Applies snapshots to Vue reactive objects or refs.

## Install

```bash
npm install @statesync/vue @statesync/core
```

## Quick Start

### With reactive()

```typescript
import { createRevisionSync } from '@statesync/core';
import { createVueSnapshotApplier } from '@statesync/vue';
import { reactive } from 'vue';

const state = reactive({ theme: 'light', lang: 'en' });

const applier = createVueSnapshotApplier(state);

const handle = createRevisionSync({
  topic: 'settings',
  subscriber: mySubscriber,
  provider: myProvider,
  applier,
});

await handle.start();
```

### With ref()

```typescript
import { ref } from 'vue';
import { createVueSnapshotApplier } from '@statesync/vue';

const settings = ref({ theme: 'light', lang: 'en' });

const applier = createVueSnapshotApplier(settings, { target: 'ref' });
```

## Modes

### Patch (default)

```typescript
const applier = createVueSnapshotApplier(state);
// Merges snapshot fields into existing state
```

### Replace

```typescript
const applier = createVueSnapshotApplier(state, { mode: 'replace' });
// Full replacement: deletes missing keys, assigns new ones
```

## Options

- `target` — `'reactive'` (default) or `'ref'`
- `toState(data, ctx)` — map snapshot data to state patch
- `pickKeys` / `omitKeys` — limit which keys are updated
- `strict` (default: `true`) — throw if `toState` returns a non-object

See [full documentation](https://github.com/777genius/state-sync/blob/main/docs/adapters/vue.md).
npm package: @statesync/zustand
Description: Zustand adapter for state-sync — automatic store synchronization
Author: 777genius
Latest version: 2.0.0

# @statesync/zustand

Zustand adapter for state-sync. Applies snapshots to a Zustand store.

## Install

```bash
npm install @statesync/zustand @statesync/core
```

## Quick Start

```typescript
import { createRevisionSync } from '@statesync/core';
import { createZustandSnapshotApplier } from '@statesync/zustand';
import { create } from 'zustand';

const useSettingsStore = create(() => ({
  theme: 'light',
  lang: 'en',
}));

const applier = createZustandSnapshotApplier(useSettingsStore);

const handle = createRevisionSync({
  topic: 'settings',
  subscriber: mySubscriber,
  provider: myProvider,
  applier,
});

await handle.start();
```

## Modes

### Patch (default)

```typescript
const applier = createZustandSnapshotApplier(store);
// Calls store.setState(partial) — non-destructive merge
```

### Replace

```typescript
const applier = createZustandSnapshotApplier(store, { mode: 'replace' });
// Calls store.setState(nextState, true) — atomic swap
```

## Options

- `toState(data, ctx)` — map snapshot data to state patch
- `pickKeys` / `omitKeys` — limit which keys are updated
- `strict` (default: `true`) — throw if `toState` returns a non-object

See [full documentation](https://github.com/777genius/state-sync/blob/main/docs/adapters/zustand.md).
npm package: @statetree/diff
Description: Utility library to find diff and comparison value for sorting
Author: Sanjay Krishna Anbalagan
Latest version: 3.0.2

# diff
[![NPM version](https://img.shields.io/npm/v/@statetree/diff.svg?style=flat-square)](https://www.npmjs.com/package/@statetree/functions)
[![Build Status](https://travis-ci.com/StateTree/diff.svg?branch=master)](https://travis-ci.com/StateTree/functions)
[![Code Coverage](https://codecov.io/gh/StateTree/diff/branch/master/graph/badge.svg)](https://codecov.io/gh/StateTree/functions/branch/master/graph/badge.svg)

## Download

### npm
```
npm install --save @statetree/diff
```


[Docs](https://statetree.github.io/diff/docs/)
npm package: @statetree/functions
Description: cluster of function that can be chained to create a pipeline 
Author: Sanjay Krishna Anbalagan
Latest version: 6.1.0

# Functions
[![NPM version](https://img.shields.io/npm/v/@statetree/functions.svg?style=flat-square)](https://www.npmjs.com/package/@statetree/functions)
[![Build Status](https://travis-ci.com/StateTree/functions.svg?branch=master)](https://travis-ci.com/StateTree/functions)
[![Code Coverage](https://codecov.io/gh/StateTree/functions/branch/master/graph/badge.svg)](https://codecov.io/gh/StateTree/functions/branch/master/graph/badge.svg)

## Download

### npm
```
npm install --save @statetree/functions
```

[Docs](https://statetree.github.io/functions/docs/)

# What?
* Collection of functions which are executed in the order they are added
* An Object that helps us to add and remove function to functions collection
* Provides a connector to co-oridante each collection set

# Why?
* We need to execute few task based on some condition and task after that based on another logic, this Library will facilitate that
* for example, i want to execute all the functions that collect data from various sources followed by data cleaning task functions..
npm package: @statetree/ticker
Description: Ticker manager for Window request animation frame and NodeJS tick
Author: Sanjay Krishna Anbalagan
Latest version: 10.0.1

# Ticker
[![NPM version](https://img.shields.io/npm/v/@statetree/ticker.svg?style=flat-square)](https://www.npmjs.com/package/@statetree/ticker)
[![Build](https://travis-ci.com/StateTree/ticker.svg?branch=master)](https://travis-ci.org/StateTree/ticker)
[![codecov.io](https://codecov.io/github/StateTree/ticker/coverage.svg?branch=master)](https://codecov.io/github/StateTree/ticker?branch=master)
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)

## Download

### npm
```
npm install --save @statetree/ticker
```

[docs](https://statetree.github.io/ticker/docs/)

## What?
* Executes Functions later in animation frame / event cycle callback
* call later: wrapper to request animation frame callback or event cycle, perks: adding priorty order

## Why?
* Cost effective Function can be broken into smaller functions and executed later
* Loops can be broken down to smaller loops with out holding execution resources.


## How?

### executeInCycle

```
import Ticker from '@statetree/ticker';

// function to execute later
function callMeLater() {
    return "called later";
}

// excutes right after call me later function (optional)
function callback(result) {
    // consumer of this library can decide what they want to do
}

// create the ticker object
var ticker1 = new Ticker(callMeLater);

// add to execute later in animation frame callback or Event cycle callback
ticker1.executeInCycle().onDone(callback);
or
ticker1..onDone(callback);
ticker1.executeInCycle()

```

### executeAsSmallLoopsInCycle

```
import Ticker from '@statetree/ticker';

const array = [];
for(let i= 0 ; i < 100; i++){
	array[i] = i;
};

function forLoopCode (index, result = 0){
	const sum = result + array[index];
	return sum;
}
let loopTicker = new Ticker( forLoopCode);
loopTicker.executeAsSmallLoopsInCycle(10, 100)
.onProgress(function (executedIndex, result){
    //
 })
 .onDone(function (result){
    //
 })
 .onError(function (error){
     console.log(error);
  })

```
### dispose

```
import Ticker from '@statetree/ticker';

ticker.dispose();
```
npm package: @statewalker/fsm-core
Description: FSM-based application core; manges state stores, services, triggers...
Author: Mikhail Kotelnikov
Latest version: 0.2.3

# @statewalker/fsm-core: Core Library

This module contains functions core utility methods injected in FSM process states.
These methods allow to:
* set/get/use data in a store associated with the process
* declare triggers generating transition events when data changes in the store
* declare timers associated with states
* declare/use services

The timelife of services, triggers, timers and data subscriptions are bound to to the state initialization/destruction cycles.
It means that a service, trigger or a data subscription became active when the corresponding state is initialized and they are automatically deactivated when the FSM leaves and deactivates the state.
npm package: @statewalker/models
Description: An implementation of reactive classes using `@preact/signals-core` library.
Latest version: 0.1.6

# `@statewalker/models`

An implementation of reactive classes using `@preact/signals-core` library.

Note: this project depends on the following packages:

* [@statewalker/eslint-config](https://github.com/statewalker/statewalker-config-eslint)
* [@statewalker/typescript-config](https://github.com/statewalker/statewalker-config-typescript)

They are not published in NPM (yet), so they have to be installed in the same workspace with this project.
npm package: @statewalker/ns
Description: Common namespace for StateWalker projects
Author: Mikhail Kotelnikov
Latest version: 0.1.3

# statewalker-ns

This package contains common namespace for StateWalker libraries.
This namespace allows to share code loaded independently by various applications. 

Logically this module gets the global context (the `g` variable 
in the example below) and verifies that there is an object 
associated with the `statewalker` key:

```js
let g;
g = g || (typeof window !== 'undefined' ? window : undefined);
g = g || (typeof global !== 'undefined' ? global : undefined);
g = g || {};
const ns = g.statewalker = g.statewalker || {};
export default ns;
```

This global namespace is used to share code and data between applications loaded independently:
```js
import { default as ns } from "@setatewalker/ns";
import newServices from ...
const services = ns.services = ns.services || newServices();
...
```
npm package: @statewalker/resources
Description: Resource management framework
Author: Mikhail Kotelnikov
Latest version: 0.0.1

# @statewalker/resources
## Resource Management Framework

It is like a File System for the Web
(Node, Deno, Bun, Browser)

This module provides a flexible way to manage resources stored locally or remotely.

A resource is just un URI/URL. So resource repositories can manage any kind of resources, existing on web or not. All real functionalities of resources - like possiblities to read or write content - are implemented as adapters. Some configurations can register adapters to read/write content on local disks, on remote resources - like web sites or S3 buckets etc. 
But resources can be extended - via adapters - not only to read and write content, but also to perform more complex operations - like documents parsing, transformations etc. Via adapters we can read TypeScript/JSX/markdown files from a remote Git repository and transform them to HTML/JS/CSS files stored in our static hosting server (or S3 bucket).
Via adapters we can read HTML content of Wikipedia and transform these pages to structured JSON objects sent to a SQLite database (which can be also accessible as a resource). 
And so on. 
Using Resource Repositories it become possible to implement transformation tools like Rollup/Webpack or Parcel which works in Node, Deno, Bun or directly in a web page.

If some functionalities are missing - it is very simple to add a new adapter implementing it. 

## License

[MIT](https://choosealicense.com/licenses/mit/)
npm package: @statewalker/rollup
Description: Rollup conifguration used by StateWalker projects
Author: Mikhail Kotelnikov
Latest version: 0.1.6

# statewalker-rollup

This package contains a Rollup configuration function used by StateWalker projects.
It provides generation of the following packages: 
* umd packages - normal + min 
* esm packages - normal + min
npm package: @statewalker/services
Description: Services/extensions implementation
Author: Mikhail Kotelnikov
Latest version: 0.3.2

# statewalker-services

This module implement simple service provider/consumer pattern.

For more information you can check these resources:
* https://observablehq.com/@kotelnikov/service-providers-and-consumers
* https://observablehq.com/@kotelnikov/newservice-implementation
npm package: @statewalker/store
Description: A simple Data Store for in-app state management
Author: Mikhail Kotelnikov
Latest version: 0.5.1

# @statewalker/store: Data Management API

A simple API for in-app data management.

For working examples see this Observable Notebook: 
- https://observablehq.com/@kotelnikov/observable-store-example
- https://observablehq.com/@kotelnikov/observable-store-description
- https://observablehq.com/@kotelnikov/observable-store
npm package: @statewalker/store-ui
Description: Data Store binding for views and inputs
Author: Mikhail Kotelnikov
Latest version: 3.0.2

# @statewalker/store-ui: UI binding for Stores

This module provides binding between Stores ([@statewalker/store](https://github.com/statewalker/statewalker-store)) and
DOM elements.

Methods: 
* `extendInputStore(store)` - the main method of this library; it binds two additional store methods:
  - `store.bindView(view, keys, action)` - binds the given `view` DOM object to store values corresponding to the given `keys`; if the `view` is not defined then a new `div` element is created; it uses internally the `bindStoreView(..)` method described below
  - `store.bindStoreInput(key, configKey, input)` - binds the store values corresponding to the `key` parameter to input instances returned by the `input` function; if the `configKey` parameter is defined then the `input` is called each time when these dependencies are changed
* `bindStoreView(store, view, keys, action)` - bind a `view` (a DOM element) to the `store`; the specified `action` allows to update the `view` each time when some fields (defined by the `keys` parameters) change its value.
* `bindStoreInput(store, key, input)` - synchronizes the given `input` to the `store` field defined by the `key` parameter; an input is a DOM element with the `value` property and rising the "`input`" event when user updates values; see the [ObservableHQ inputs library](https://observablehq.com/@observablehq/inputs) ([GitHub](https://github.com/observablehq/inputs)) for more information.
* `bindConfigurableStoreInput(store, configKey, valueKey, input)` - binds input values  to a specific field of the `store` defined by the `valueKey` parameter; the `input` function should return a new input instance and it is called each time when the `configKey` field of the `store` changes its values

Used libraries in GitHub:
* [@statewalker/store](https://github.com/statewalker/statewalker-store)
* [@statewalker/utils](https://github.com/statewalker/statewalker-utils) 
* [@statewalker/utils-dom](https://github.com/statewalker/statewalker-utils-dom) 

For working examples see this Observable Notebook: 
- https://observablehq.com/@kotelnikov/observable-store-example
- https://observablehq.com/@kotelnikov/observable-store-description
- https://observablehq.com/@kotelnikov/observable-store
npm package: @statewalker/tknz
Description: TKNZ: token-based AST builder for documents
Author: Mikhail Kotelnikov
Latest version: 0.1.5

# TKNZ: token-based AST builder for documents
## Parser for HTML and Markdown documents

Small, tolerant and fast MD AST builder.

* Generates clean AST with exact token positions
* Builds document hierarchies
* No dependencies and very small
* Tolerant to errors - non closed tags, qoutes or code blocks
* Allows code embedding

Examples: https://observablehq.com/@kotelnikov/statewalker-tknz
npm package: @statewalker/webrun-files-tests
Description: Basic files API
Author: Mikhail Kotelnikov
Latest version: 0.1.0


# @statewalker/webrun-files-tests

This package contains a set of common tests for all FilesApi (@statewalker/webrun-files) implementations.

## Usage

```js
// Import a batch of common tests
import { runFilesApiTests } from "@statewalker/webrun-files-tests";

// Import a specific FilesApi implementation
import { MemFilesApi } from "@statewalker/webrun-files";

// Import expect.js
import expect from "expect.js";s
// Import crypto library (used to calculate content hashes - SHA1).
import crypto from "crypto";

// Run tests on the specified FilesApi instance. This method provids all required dependencies.
runFilesApiTests({
  
  // Human-readable name of this set of tests:
  name : "MemFilesApi",

  // This method returns a FilesApi instance to test:
  newFilesApi : () => new MemFilesApi(),

  // An instance of the "expect.js" testing library:
  expect,

  // Standard crypto instance. Used to calculate SHA-1 hashes of files content:
  crypto
})

```
npm package: @statewalker/webrun-http
Description: Transform HTTP Request/Response objects into AsyncIterators
Author: Mikhail Kotelnikov
Latest version: 0.1.0

# @statewalker/webrun-http

The `@statewalker/webrun-http` JavaScript allowing to simulate fetch API with Request/Response using AsyncIterators over binary blocks.

## License

[MIT](https://choosealicense.com/licenses/mit/)
npm package: @statewalker/webrun-puppeteer
Description: Puppeteer adapter for the WebRun DevTools Chrome Extension
Author: Mikhail Kotelnikov
Latest version: 0.0.1

# WebRun DevTools Puppeteer 

Implementation of the Puppeteer API adapter working with the [WebRun DevTools](https://github.com/statewalker/webrun-devtools) Chrome Extension.

This library allows you to pilot your browser using the Puppeteer API.

Internally it connects to the `chrome.debugger` API using the WebRun DevTools extension.

This implementation is based on the Puppeteer v13. The latest versions of Puppeteer use CDP commands not available via the `chrome.debugger` API.
npm package: @statezero/statezero-tunnel
Description: Tunnelmole client for StateZero users to create secure tunnels to their local services.
Author: Robbie Cahill
Latest version: 2.3.1-0.1

# StateZero Tunnel Client

[![StateZero - tunnel client](https://img.shields.io/static/v1?label=StateZero\&message=tunnel-client\&color=blue\&logo=github)](https://github.com/statezero/statezero-tunnel "Go to GitHub repo")
[![stars - tunnel-client](https://img.shields.io/github/stars/statezero/statezero-tunnel?style=social)](https://github.com/statezero/statezero-tunnel)
[![forks - tunnel-client](https://img.shields.io/github/forks/statezero/statezero-tunnel?style=social)](https://github.com/statezero/statezero-tunnel)

A **fork** of [Tunnelmole](https://github.com/robbie-cahill/tunnelmole-client) that provides a simple, project-based CLI tool for creating persistent tunnels to local HTTP(s) servers via subdomains under `tunnels.statezero.dev`. Designed exclusively for use in development workflows with web-only AI code editors like Bolt.new and a local Django backend.

---

## 🚀 Key Features

* **Persistent subdomains**: Stable `<subdomain>.tunnels.statezero.dev` URLs for each project.
* **Interactive CLI**: Create and select projects directly from your terminal.
* **Lightweight**: Focused on tunneling; no advanced programmatic APIs or self-hosting options.

---

## 📦 Installation

Requires **Node.js 16.10+**.

**Recommended: Use npx (no installation required)**

```bash
npx @statezero/statezero-tunnel
```

*Project data is automatically saved to your user config directory and persists between runs.*

**Alternative: Install globally**

```bash
npm install -g @statezero/statezero-tunnel
```

---

## 🛠️ CLI Usage

**List or create projects**

```bash
npx @statezero/statezero-tunnel
```

**Start a tunnel**

```bash
npx @statezero/statezero-tunnel <port>
```

* Example:

  ```bash
  npx @statezero/statezero-tunnel 8000
  ```

**Sample output:**

```
🚀 Starting tunnel...
🌐 Subdomain: myapp-1a2b3c.tunnels.statezero.dev

Public URL:
https://myapp-1a2b3c.tunnels.statezero.dev ⟶ http://localhost:8000
```

Your tunnel URL will remain consistent across runs for that project.

---

## 📜 License

MIT © StateZero Inc.
npm package: @statflo/socket
Description: A socket class for Stomp using SockJS
Author: Helder Santana
Latest version: 3.1.2

# @statflo/socket

A promised StompJS and SockJS class for managing subscriptions easily.

## Usage

```js
import SocketService from '@statflo/socket';

const service = new SocketService('http://foo.bar/live', { connectHeader: 'foobar' }); // where { connectHeader } is an instance of Stomp.StompHeaders

service.connect()
    .then(frame => {
        console.log(frame);
    })
    .catch(error => {
        console.error(error);
    });
```

### Subscription

```js
const exchange = service.subscribe('foo/bar', function(message) {
    console.log(message);
});
exchange.unsubscribe('foo/bar');
```

### Messaging 

```js
service.message('foo/bar', 'Hello world!');
```

## License
MIT Statflo Inc.
npm package: @statflo/ui
Description: Statflo's UI library
Author: Statflo Inc.
Latest version: 0.0.25

# Statflo Component Library

## Introduction

The Statflo Component Library provides a set of React components that can be used to build React applications consistent with the Statflo brand.

## Getting Started

### Installation

First add or install this package as a dependency in your existing React project

```bash
yarn add @statflo/ui
```

or

```bash
npm install @statflo/ui
```

### Font

In order to use the Statflo brand font, copy over this link in the `head` of your HTML file.

```html
<link rel="stylesheet" href="https://cdn.statflo.com/brandon/brandon.css" />
```

### Import CSS

Import the CSS file into the main app file (ie. `App.tsx`).

```js
import "@statflo/ui/index.css";
```

### Setup Tailwind

This library uses [Tailwind CSS](https://tailwindcss.com/docs/installation) for styling the different components. To gain access to the Statflo theme and tailwind configuration, setup tailwind and add the below code to your `tailwind.config.js` file.

The theme and configuration files are available under the `tailwind` folder for reference.

```js
const base = require("@statflo/ui/tailwind/tailwind-workspace-preset.js");

/** @type {import('tailwindcss').Config} */
module.exports = {
  ...base,
  // ... any other config
};
```

### Usage

```
import { Button } from "@statflo/ui";

<Button type="secondary">Hello World</Button>
```

Please see each component in our [Storybook](https://main--62c42a6720efb96e584338d3.chromatic.com/?path=/story/introduction--page) for specific documentation related to their usage.