open-index/open-npm huggingface dataset:
npm package: @retreejs/core
Description: React to changes in your object trees.
Author: Ryan Bliss
Latest version: 0.1.4

# Retree Core

Retree is a lightweight and simple state management library, specifically designed for frameworks like React. If you know how to work with objects in JavaScript or TypeScript, you pretty much already know how to use Retree.

## How to install

Install with `npm`:

xretree

```bash
npm i @evergreen/core
```

Install with `yarn`:

```bash
yarn add @retreejs/core
```

## How to use

Retree Core allows for easy observations of deeply nested values in any object. It is a general purpose package for JavaScript/TypeScript modules, though it is probably best paired with `@retreejs/react`.

```ts
import { Retree } from "@retreejs/core";
import { v4 as uuid } from "uuid";

class Todo {
    readonly id = uuid();
    public text = "";
    public checked = false;
    toggle() {
        this.checked = !this.checked;
    }
    delete() {
        // Get parent of the Todo, which is Array<Todo>
        const parent = Retree.parent(this);
        if (!Array.isArray(parent)) return;
        const index = parent.findIndex((c) => this.id === c.id);
        parent.splice(index, 1);
    };
}

class TodoList {
    public todos: Todo[] = [];
    add() {
        this.todos.push(new Todo());
    }
}

const tree = Retree.use(new TodoList());

// Listen for changes to the todo list (e.g., todo created)
const unsubscribe = Retree.on(tree.todos, "treeChanged", (todos) => {
    console.log("list updated", todos);
});
tree.todos.add();
tree.todos[0].toggle();
tree.todos[0].delete();
unsubscribe();
```

## Core samples

See the [useNode React hook](./packages/retree-react/src/useNode.ts) or [example 01 project](./samples/01.core-example/) for more example usages.

# Licensing & Copyright

Copyright (c) Ryan Bliss. All rights reserved.
Licensed under MIT license.

Credit to [Fluid Framework](https://aka.ms/fluid)'s new [SharedTree](https://fluidframework.com/docs/data-structures/tree/) feature, which has served as a major inspiration for this project. If you want to use collaborative objects, I recommend checking out Fluid Framework!
npm package: @retric/makebook
Description: CLI tool to convert PDFs into booklet-printable PDFs (scaffold)
Author: RetricSu
Latest version: 0.1.0-rc1

# makebook

A CLI tool to convert a regular PDF into a booklet-printable PDF (scaffold).

Features included in this scaffold:

- TypeScript + pnpm project setup
- CLI wiring using `commander`
- Basic converter that loads a PDF, pads it to a multiple of 4 pages, and writes an output PDF
- Placeholders and TODOs for imposition / 2-up layout and signatures

Quick start

1. Install dependencies (pnpm is recommended):

```bash
pnpm install
```

2. Build:

```bash
pnpm run build
```

3. Run (dev mode):

```bash
pnpm run dev -- input.pdf -o output.pdf
```

Next steps

- Implement page imposition (2-up/4-up) to lay out pages for booklet printing
- Add tests and sample PDFs
- Add options for page size and signatures
npm package: @retric/test-provider
Description: a godwoken-compatible http provider for web3.js.
Latest version: 0.0.1-ethers540

# (THIS BRANCH IS ONLY FOR TEST!) Polyjuice Http Provider

a godwoken-compatible http provider for web3.js.

now you can call your smart-contract on godwoken with metamask and eth address.

[docs](docs/usage.md)

## getting started

```sh
    git clone https://github.com/RetricSu/polyjuice-providers-http.git
    cd polyjuice-providers-http
    yarn 
```

build:

```sh
    yarn build
```

usage:

```js
const PolyjuiceHttpProvider = require('./PolyjuiceHttpProvider');
```

typescript supported:

```ts
import PolyjuiceHttpProvider from './PolyjuiceHttpProvider';
```

browser version lies in:

```sh
    /build/browser/PolyjuiceHttpProvider.js
```

usage:

```html
<script src="/path/to/PolyjuiceHttpProvider.js"></script>
```

### hardhat

hardhat is using `ethers` instead of `web3.js`, you can find ethers-compatibale `JsonRpcProvider` and `WalletSigner` in `/lib/hardhat/providers`

usage:

```js
const { PolyjuiceJsonRpcProvider } = require('PolyjuiceHttpProvider/lib/hardhat/providers');
const PolyjuiceWallet = require('PolyjuiceHttpProvider/lib/hardhat/wallet-signer');
```


---

before you can run test and an minimal example, create an .test.env file with some godwoken-polyjuice config.

```sh
cat > ./test.env <<EOF
WEB3_JSON_RPC=<godwoken web3 rpc>
ROLLUP_TYPE_HASH=<godwoken rollup type hash>
ETH_ACCOUNT_LOCK_CODE_HASH=<eth account lock code hash>
EXAMPLE_CONTRACT_ADDRESS=<an example test contract deployed address>
PRIVATE_KEY=<your eth test private key, do not use in production>
ETH_ADDRESS=<your eth test address, match with private_key above>
```

## test

```sh
    yarn test
```

## start a minimal dapp example

```sh
    yarn example
```