open-index/open-npm huggingface dataset:
npm package: @stately/core
Description: pure js state Managment
Author: Hossein mohammadi
Latest version: 0.0.3

## stately

Easy state management for javascript.
it's useful for global state management and complex local state

[![NPM Version](https://img.shields.io/npm/v/@stately/core.svg?style=flat)](https://www.npmjs.com/package/@stately/core) [![download](https://img.shields.io/npm/dm/@stately/core.svg)](https://www.npmjs.com/package/@stately/core)


## TOC

* [install](#install)
* [use](#use)
* [property](#property)

## install

```npm
npm i @stately/core --save
```
```yarn
yarn add @stately/core
```
---

## use

```javascript
import React from "react";
import { createStore } from "@stately/core";

const initialState = {
  counter: 0
};

const actions = {
  addToCounter: (store, amount) => {
    const newCounterValue = store.state.counter + amount;
    store.setState({ counter: newCounterValue });
  }
};

const store = createStore(initialState, actions);

```

---


## property

| Method                                                            | Return Type         | params                  | 
| ----------------------------------------------------------------- | ------------------- | :--:                    | 
| [store.setState()](#setState())                                   | `void`              |  partialState:`object`    | 
| [store.addListener()](#addListener())                              | `{ remove():void }`|  listener: `Function`, sensitiveStatesKey: `Array<string> ` | 
| [store.actions()](#actions())                                     | `object`              |                    `any`     |
| [store.state](#state)                                           | `string`            |                         |

---

## setState()

Set partial state

**Examples**

```js
store.setState({counter: store.state.counter+1})
```

---

## addListener()

Add an event listener.
Listener run when a state did update
**Examples**

below event run just counter did update
```js
function logCounter(){
 console.log(store.state.counter)
}
store.addListener(logCounter,["counter"])
```

below event run when any change in state did invoke
```js
function logState(){
 console.log(store.state)
}
store.addListener(logState,[])
```
---




## actions()

gives initialed actions 

**Notes**
> Store is bound in first params.

**Examples**

```js
store.actions.addToCounter(3)
```

## state 

gives current state

**Examples**

```js
console.log(store.state.counter)
```
npm package: @statelyai/flow
Description: A lightweight TypeScript library for defining composable, type-safe workflows with plain async functions.
Author: david@stately.ai
Latest version: 0.0.1

# AgentFlow

> **Work in progress** — a lightweight TypeScript library for defining composable, type-safe workflows with plain async functions.

**AgentFlow** lets you orchestrate multi-step flows by composing simple functions into declarative, testable flows. Think of it as a tiny state machine.

---

## ✨ Features

- ✅ **Composable steps** — each step is just an async function you can test in isolation
- ✅ **Declarative orchestration** — define what happens after each step completes
- ✅ **Type-safe transitions** — transitions between steps are fully inferred
- ✅ **Lightweight** — no runtime dependencies
- ✅ **Future integration** — designed to integrate naturally with [Vercel AI SDK](https://vercel.com/docs/ai/vercel-ai-sdk)
npm package: @stateofscale/cli
Description: Archanova CLI
Latest version: 1.0.0

# Archanova CLI

[![NPM version][npm-image]][npm-url]

## Installation

```bash
$ npm i @archanova/cli -g
```

## Usage

```bash
$ archanova-cli [action] [options] [workingPath]
```

**Actions:**
* `auth` - authentication
* `init` - initialize application
* `develop` - develop application
* `deploy` - deploy application

**Options:**
* `--help, -h` - print help
* `--global, -g` - use global storage
* `--env, -e <env>` - environment [ropsten,rinkeby,kovan,sokol,local] (default: kovan)
* `--local-env-host <host>` - local environment host
* `--local-env-port <port>` - local environment port
* `--private-key <key>` - device private key


## License

The MIT License

[npm-image]: https://badge.fury.io/js/%40archanova%2Fcli.svg
[npm-url]: https://npmjs.org/package/@archanova/cli
npm package: @stater/repeat
Description: A simple promise based function repeater.
Author: Nanang Mahdaen El Agung
Latest version: 1.0.0

A simple promise based function repeater.

**Example**

```typescript
import { repeat } from '@stater/repeat';

// Repeat console log 10 times.
repeat(console.log).repeat(10);

// Repeat console log until finished = true.
let finished = false;
repeat(rt => {
  console.log(rt);

  if (rt >= 10) {
    finished = true;
  }
}).every('5s').until(() => finished);

// Run maintenance checker every 5s.
let complete = false;
await repeat(async (rt) => {
  console.log(`[Retries: ${rt}] Checking maintenance state.`);
  complete = await server.checkMaintenance();
}).every('5s').until(complete);
console.log('Server maintenance completed!');
```
npm package: @stateref/connect-preact
Description: Preact connector for state-ref
Author: superlucky84
Latest version: 10.2.0

# state-ref Preact Connector (connectPreact)

## Usage with Preact

It can be easily integrated with other UI libraries, and below is an example using Preact.

### profileStore.ts

> Create the store and pass the `watch` to `connectPreact` to create a state that can be used in components.

```typescript
import { connectPreact } from "@stateref/connect-preact";
import { createStore } from "state-ref";

type Info = { age: number; house: { color: string; floor: number }[] };
type People = { john: Info; brown: Info; sara: Info };

const watch = createStore<People>({
    john: {
        age: 20,
        house: [
            { color: "red", floor: 5 },
            { color: "red", floor: 5 },
        ],
    },
    brown: { age: 26, house: [{ color: "red", floor: 5 }] },
    sara: { age: 26, house: [{ color: "red", floor: 5 }] },
});

export const useProfileStore = connectPreact(watch);
```

### UserComponent.tsx

```tsx
import { useProfileStore } from 'profileStore';

function UserComponent() {
  const {
    john: { age: ageRef },
  } = useProfileStore();

  const increaseAge = () => {
    ageRef.value += 1;
  };

  return (
    <button onClick={increaseAge}>
        john's age: {ageRef.value}
    </button>;
  );
}
```

In the example above, `useProfileStore` directly returns `stateRef`, allowing easy access to values and modification through `copyOnWrite`.

You can create your own custom connection pattern by referring to the [connectPreact implementation code](https://github.com/superlucky84/state-ref/blob/main/packages/connect-preact/src/index.ts).


## npm
* [state-ref](https://www.npmjs.com/package/state-ref)
* [connect-react](https://www.npmjs.com/package/@stateref/connect-react)
* [connect-preact](https://www.npmjs.com/package/@stateref/connect-preact)
* [connect-solid](https://www.npmjs.com/package/@stateref/connect-solid)
* [connect-svelte](https://www.npmjs.com/package/@stateref/connect-svelte)
* [connect-vue](https://www.npmjs.com/package/@stateref/connect-vue)
* [lithent](https://www.npmjs.com/package/lithent)
npm package: @stateref/connect-react
Description: React connector for state-ref
Author: superlucky84
Latest version: 18.2.0

# state-ref React Connector (connectReact)

## Usage with React

It can be easily integrated with other UI libraries, and below is an example using React.

### profileStore.ts

> Create the store and pass the `watch` to `connectReact` to create a state that can be used in components.

```typescript
import { connectReact } from "@stateref/connect-react";
// import { connectPreact } from "@stateref/connect-preact"; // for Preact
import { createStore } from "state-ref";

type Info = { age: number; house: { color: string; floor: number }[] };
type People = { john: Info; brown: Info; sara: Info };

const watch = createStore<People>({
    john: {
        age: 20,
        house: [
            { color: "red", floor: 5 },
            { color: "red", floor: 5 },
        ],
    },
    brown: { age: 26, house: [{ color: "red", floor: 5 }] },
    sara: { age: 26, house: [{ color: "red", floor: 5 }] },
});

export const useProfileStore = connectReact(watch);
```

### UserComponent.tsx

```tsx
import { useProfileStore } from 'profileStore';

function UserComponent() {
  const {
    john: { age: ageRef },
  } = useProfileStore();

  const increaseAge = () => {
    ageRef.value += 1;
  };

  return (
    <button onClick={increaseAge}>
        john's age: {ageRef.value}
    </button>;
  );
}
```

In the example above, `useProfileStore` directly returns `stateRef`, allowing easy access to values and modification through `copyOnWrite`.

You can create your own custom connection pattern by referring to the [connectReact implementation code](https://github.com/superlucky84/state-ref/blob/main/packages/connect-react/src/index.ts).

## npm
* [state-ref](https://www.npmjs.com/package/state-ref)
* [connect-react](https://www.npmjs.com/package/@stateref/connect-react)
* [connect-preact](https://www.npmjs.com/package/@stateref/connect-preact)
* [connect-solid](https://www.npmjs.com/package/@stateref/connect-solid)
* [connect-svelte](https://www.npmjs.com/package/@stateref/connect-svelte)
* [connect-vue](https://www.npmjs.com/package/@stateref/connect-vue)
* [lithent](https://www.npmjs.com/package/lithent)
npm package: @stateref/connect-solid
Description: Solid connector for state-ref
Author: superlucky84
Latest version: 1.2.0

# state-ref Solid Connector (connectSolid)

## Usage with Solid

Solid does not directly use `stateRef` but returns Solid's built-in reactive [Signal](https://www.solidjs.com/docs/latest/api#basic-reactivity) synchronized with the `stateRef` state value.

You can customize it by referring to the [connectSolid implementation code](https://github.com/superlucky84/state-ref/blob/main/packages/connect-solid/src/index.ts).


### profileStore.ts

```typescript
import { connectSolid } from "@stateref/connect-solid";
// ... same as React example
export const useProfileStore = connectSolid(watch);
```

### UserComponent.tsx

```tsx
import { useProfileStore } from 'profileStore';

function UserComponent() {
    const [age, setAge] = useProfileStore<number>(store => store.john.age);

    function increaseAge() {
      setAge(age => age + 1);
    }

    return (
      <button onClick={increaseAge}>
          john's age: {age()}
      </button>;
    );
}
```

If Signal needs to reference and modify an object from the store, the `copyable` function is available to assist with `copyOnWrite`.

```typescript
import { copyable } from "state-ref";
const [profileObj, setProfileObj] = useProfileStore(stateRef => stateRef);

function handleClick() {
   setProfileObj(n => copyable(n).john.age.writeCopy(n.john.age + 1));
}
```

## npm
* [state-ref](https://www.npmjs.com/package/state-ref)
* [connect-react](https://www.npmjs.com/package/@stateref/connect-react)
* [connect-preact](https://www.npmjs.com/package/@stateref/connect-preact)
* [connect-solid](https://www.npmjs.com/package/@stateref/connect-solid)
* [connect-svelte](https://www.npmjs.com/package/@stateref/connect-svelte)
* [connect-vue](https://www.npmjs.com/package/@stateref/connect-vue)
* [lithent](https://www.npmjs.com/package/lithent)
npm package: @stateref/connect-svelte
Description: Svelte connector for state-ref
Author: superlucky84
Latest version: 4.2.0

# state-ref Svelte Connector (connectSvelte)

## Usage with Svelte

While React and Preact's `useProfile` function directly returns `stateRef`, SvelteConnect returns Svelte's built-in reactive [Writable](https://svelte.dev/docs/svelte-store#writable) synchronized with the `stateRef` state value.

Below is a usage example.

### profileStore.ts

```typescript
import { connectSvelte } from "@stateref/connect-svelte";
// ... same as React example
export const useProfileStore = connectSvelte(watch);
```

### UserComponent.svelte

```svelte
<script lang="ts">
import { useProfileStore } from 'profileStore';
const age = useProfileStore<number>(stateRef => stateRef.john.age);

function handleClick() {
  age.update(n => n + 1);
}
</script>

<button on:click={handleClick}>
    john's age is {$age}
</button>
```

If Writable needs to reference and modify an object from the store, the `copyable` function is available to assist with `copyOnWrite`.

```typescript
import { copyable } from "state-ref";
const profileObj = useProfileRef(stateRef => stateRef);

function handleClick() {
   profileObj.update(n => copyable(n).john.age.writeCopy(n.john.age + 1));
}
```

You can customize it by referring to the [connectSvelte implementation code](https://github.com/superlucky84/state-ref/blob/main/packages/connect-svelte/src/index.ts).

## npm
* [state-ref](https://www.npmjs.com/package/state-ref)
* [connect-react](https://www.npmjs.com/package/@stateref/connect-react)
* [connect-preact](https://www.npmjs.com/package/@stateref/connect-preact)
* [connect-solid](https://www.npmjs.com/package/@stateref/connect-solid)
* [connect-svelte](https://www.npmjs.com/package/@stateref/connect-svelte)
* [connect-vue](https://www.npmjs.com/package/@stateref/connect-vue)
* [lithent](https://www.npmjs.com/package/lithent)
npm package: @stateref/connect-vue
Description: Vue connector for state-ref
Author: superlucky84
Latest version: 3.2.0

# state-ref Vue Connector (connectVue)

## Usage with Vue

In Vue, the store is connected and returns Vue's built-in reactive [Reactive](https://ko.vuejs.org/api/reactivity-core#reactive) synchronized with the `stateRef` state value.

You can customize it by referring to the [connectVue implementation code](https://github.com/superlucky84/state-ref/blob/main/packages/connect-vue/src/index.ts).

### profileStore.ts

```typescript
import { connectVue } from "@stateref/connect-vue";
// ... same as React example
export const useProfileStore = connectVue(watch);
```

### UserComponent.vue

```vue
<script setup lang="ts">
import { useProfileStore } from 'profileStore';

const age = useProfileStore<number>(store => store.john.age);

const incrementFromProfile = () => {
  // This looks the same as stateRef, but it's a Reactive value in Vue.
  age.value += 1;
};
</script>

<template>
  <button @click="incrementFromProfile">
    john's age is: {{ age.value }}
  </button>
</template>
```

## npm
* [state-ref](https://www.npmjs.com/package/state-ref)
* [connect-react](https://www.npmjs.com/package/@stateref/connect-react)
* [connect-preact](https://www.npmjs.com/package/@stateref/connect-preact)
* [connect-solid](https://www.npmjs.com/package/@stateref/connect-solid)
* [connect-svelte](https://www.npmjs.com/package/@stateref/connect-svelte)
* [connect-vue](https://www.npmjs.com/package/@stateref/connect-vue)
* [lithent](https://www.npmjs.com/package/lithent)
npm package: @statesauce/merkle-payments
Description: This is an implementation of a Merkle Tree based payment pool in Solidity for ERC-20 tokens. This project was inspired by this Ethereum research post: https://ethresear.ch/t/pooled-payments-scaling-solution-for-one-to-many-transactions/590. A longer descr
Latest version: 0.1.3

ERROR: No README data found!