open-index/open-npm huggingface dataset:
npm package: @octamap/alpine-async-call
Description: Call module function when first available
Author: octamap
Latest version: 1.0.0

# @octamap/alpine-async-call

The `@octamap/alpine-async-call` package is a custom directive for [Alpine.js](https://alpinejs.dev/) that ensures a specified function is available on the `window` object before invoking it. This is particularly useful when dealing with dynamically loaded or asynchronously initialized modules.

## Features

- **Custom Directive:** Introduces the `x-async-call` directive.
- **Safe Initialization:** Waits for the specified function to be available before executing it.
- **Seamless Integration:** Easily integrates with Alpine.js.

## Usage

### Load via jsDelivr

To use `@octamap/alpine-async-call`, include it in your project **before** loading Alpine.js:

```html
<script src="https://cdn.jsdelivr.net/npm/@octamap/alpine-async-call"></script>
<script src="https://cdn.jsdelivr.net/npm/alpinejs" defer></script>
```

### Example

The `x-async-call` directive can be used to call a function only after it becomes available on the `window` object:

```html
<div x-async-call="checkUserState($data)">
    <!-- Content -->
</div>
```

In this example, the `checkUserState` function will be executed once it is available on `window`. The directive continuously checks for the function's availability and calls it as soon as it is loaded.
npm package: @octamap/click-effects
Description: Really small script for adding hover & click effects.
Author: octamap
Latest version: 1.2.2


# Click Effects

Really small script for adding hover & click effects.

### Setup 
Add anywhere in head of index.html:

```html
<script src="https://cdn.jsdelivr.net/npm/@octamap/click-effects@1.x.x/dist/index.js" defer></script>
```

### Usage:

#### Standard:
```html
<!-- Hover:  #F0F0F0:   -->
<!-- Active:  #E8E8E8:   -->
<button class="clickable"></button>
```

#### Make darker
```html
<button class="clickable f"></button>
```

#### Reduce opacity
```html
<button class="clickable opacity"></button>
```
npm package: @octamap/expose-scripts
Description: Seamless import of module scripts in HTML
Author: octamap
Latest version: 1.0.2

# Expose Scripts

**Use ES module scripts directly in your HTML with auto-awaiting!**

This Vite plugin lets you import module scripts in HTML and seamlessly call their exports — even before they’ve loaded. It does this by injecting smart wrappers that defer execution until your script is ready.

## ✨ Features

- 💡 Call module exports directly in HTML using `await` – no need to worry about load timing.
- 🔍 Auto-detects which scripts and exports are used.
- 🧠 Injects a smart wrapper that defers execution until the export is available.
- 🚀 Works in dev and production, with automatic ID-based export referencing.
- 🧪 Optional debug mode.

---

## 🔧 Installation

```bash
npm install @octamap/expose-scripts --save-dev
```

---

## 📦 Usage

### `vite.config.ts`

```ts
import { ExposeScripts } from '@octamap/expose-scripts';

export default {
  plugins: [
    ExposeScripts() // optional
  ]
}
```

---

## 💡 How It Works

This plugin allows you to write HTML like this:

### `index.html`

```html
<script expose type="module" src="./scripts/loadSpots.ts"></script>

<body>
  <div x-init="await loadSpots(system, $data)"></div>
</body>
```

And it transforms it into:

### `index.html` (compiled)

```html
<script>
  const e3c = (key, ...args) => new Promise((resolve) => {
    if (key in window) {
      resolve(window[key](...args));
    } else {
      (window[`${key}_r`] ||= []).push((fn) => resolve(fn(...args)));
    }
  });

  window.e58 = (key, fn) => {
    window[key] = fn;
    window[`${key}_r`]?.forEach((c) => c(fn));
    delete window[`${key}_r`];
  };
</script>

<body>
  <div x-init="await e3c('loadSpots_547', system, $data)"></div>
</body>
```

### `loadSpots.ts`

```ts
export function loadSpots(system: string, data: any) {
  // your code
}
```

### `dist/loadSpots.js`

```js
export function loadSpots(system, data) {
  // your code
}

window.loadSpots_547 = loadSpots;
window.loadSpots_547_r?.forEach((cb) => cb(loadSpots));
```

---

## 🧠 Behind the Scenes

- Exports from `<script expose>` modules are scanned and ID’d.
- References in HTML like `loadSpots()` are replaced with `await e3c('loadSpots_547')`.
- A loader script (`expose-script-xxxx.js`) is injected to handle the async magic.
- Works with both `.ts` and `.js` module scripts.

---

## 🛠 Options

| Option      | Type      | Default | Description                            |
| ----------- | --------- | ------- | -------------------------------------- |
| `debugMode` | `boolean` | `false` | Enables verbose logging for debugging. |

---

## 🧪 Tips

- Use `x-init="await myFunc(...args)"` or similar Alpine/HTMX integrations.
- Script references are updated even inside quoted strings.
- This is especially useful for component-based UIs where HTML is treated as a first-class citizen.

---

## 📜 License

MIT
npm package: @octamap/prevent-resize-transition
Description: Simple package for turning off transition on resizing
Author: octamap
Latest version: 1.0.0


# Prevent Resize Transition
Really small script for preventing resize transition.

### Setup 
Add anywhere in head of index.html:

```html
<script src="https://cdn.jsdelivr.net/npm/@octamap/prevent-resize-transition@1.x.x/dist/index.js" defer></script>
```

### Usage:

#### Prevent transition on a button:
This will disable transition when the window resizes on this button

```html
<button class="prevent-resize-transition"></button>
```
npm package: @octamem/octamem-openclaw
Description: OctaMem personal memory plugin for OpenClaw
Author: OctaMem
Latest version: 1.0.5

# @octamem/octamem-openclaw

OctaMem personal memory plugin for [OpenClaw](https://openclaw.ai). Adds search/add tools and automatic memory recall and capture so the assistant can use and update your personal memory.

## Requirements

- OpenClaw `>=2026.1.29`
- OctaMem API key (personal memory)

## Install

From the OpenClaw plugins list:

```bash
openclaw plugins install @octamem/octamem-openclaw
```

## Configure

Get your API key from [platform.octamem.com](https://platform.octamem.com). Then set it:

```bash
openclaw octamem configure <your-api-key>
```

Or set `OCTAMEM_PERSONAL_KEY` and run:

```bash
openclaw octamem configure
```

Restart OpenClaw after configuring.

## What it does

- **Auto-recall**: Before each turn, relevant personal memory is fetched and injected so the LLM can answer from your notes.
- **Auto-capture**: After each turn, the assistant’s reply is stored in your personal memory (plain text).
- **Tools**: `octamem_get` (search) and `octamem_add` (add) for the agent to query or store memory when needed.
- **CLI**: `openclaw octamem status | search <query> | details | add <content>`.

## Use only OctaMem (disable local/file memory)

**`openclaw octamem configure`** automatically adds `tools.deny: ["memory_search", "memory_get"]` to your OpenClaw config so only OctaMem is used (no core/file memory). No manual config edit needed.

If you ever need to set it yourself, add to `~/.openclaw/openclaw.json` under `"tools"`:

```json
"tools": {
  "profile": "coding",
  "deny": ["memory_search", "memory_get"]
}
```

Restart OpenClaw after changing config.

## Config (optional)

In OpenClaw plugin config you can set:

- `memories.personal.apiKey` — API key (supports `${OCTAMEM_PERSONAL_KEY}`).
- `toolDescription` — Override the description for the get-memory tool.

## License

MIT