open-index/open-npm huggingface dataset:
npm package: @lovable.dev/cloud-auth-js
Description: Lovable Cloud Auth JS
Latest version: 1.1.1

# @lovable.dev/cloud-auth-js

OAuth authentication library for Lovable projects using Supabase.

## Installation

```bash
npm install @lovable.dev/cloud-auth-js
```

## Usage

```typescript
import { createLovableAuth } from "@lovable.dev/cloud-auth-js";
import { supabase } from "./supabase/client";

const lovableAuth = createLovableAuth();

// Sign in with OAuth
const result = await lovableAuth.signInWithOAuth("google");

if (result.redirected) {
  // Page is redirecting to OAuth provider
  return;
}

if (result.error) {
  console.error("Sign in failed:", result.error.message);
  return;
}

await supabase.auth.setSession(result.tokens);
```

## API

### `createLovableAuth(config?)`

Creates a Lovable auth instance.

**Config options:**

| Option                  | Type       | Default                         | Description                           |
| ----------------------- | ---------- | ------------------------------- | ------------------------------------- |
| `oauthBrokerUrl`        | `string`   | `"/~oauth/initiate"`            | OAuth broker initiate URL             |
| `supportedOAuthOrigins` | `string[]` | `["https://oauth.lovable.app"]` | Allowed origins for OAuth postMessage |

### `signInWithOAuth(provider, options?)`

Initiates OAuth sign-in flow.

**Parameters:**

| Parameter              | Type                     | Description                                                |
| ---------------------- | ------------------------ | ---------------------------------------------------------- |
| `provider`             | `"google" \| "apple"`    | OAuth provider                                             |
| `options.redirect_uri` | `string`                 | Custom redirect URI (defaults to `window.location.origin`) |
| `options.extraParams`  | `Record<string, string>` | Additional params to send to the OAuth broker              |

**Returns:** `Promise<SignInWithOAuthResult>`

## Types

```typescript
interface OAuthTokens {
  access_token: string;
  refresh_token: string;
}

interface LovableAuthConfig {
  oauthBrokerUrl?: string;
  supportedOAuthOrigins?: string[];
}

interface SignInWithOAuthOptions {
  redirect_uri?: string;
  extraParams?: Record<string, string>;
}

type SignInWithOAuthResult =
  | { tokens: OAuthTokens; error: null; redirected?: false }
  | { tokens?: undefined; error: Error; redirected?: false }
  | { tokens?: undefined; error: null; redirected: true };
```

## License

MIT
npm package: @lovable.dev/email-js
Description: Lovable Email JS
Latest version: 0.0.4

# @lovable.dev/email-js

Utilities for Lovable email hooks and delivery.

## Installation

```bash
npm install @lovable.dev/email-js
```

## Usage

### Sending with a `run_id` (build-context emails)

When sending from a webhook where a build run exists, pass the `run_id` from
the payload. You can override the idempotency key (defaults to `run_id`).

```ts
import { parseEmailWebhookPayload, sendLovableEmail } from "@lovable.dev/email-js";
import { verifyWebhookRequest, type EmailWebhookPayload } from "@lovable.dev/webhooks-js";

const apiKey = Deno.env.get("LOVABLE_API_KEY");

export async function handleWebhook(req: Request) {
  if (!apiKey) {
    throw new Error("Missing Lovable API key");
  }

  const { body } = await verifyWebhookRequest<EmailWebhookPayload>({
    req,
    secret: apiKey,
  });
  const payload = parseEmailWebhookPayload(body);
  if (payload.version !== "1") {
    throw new Error(`Unsupported payload version: ${payload.version}`);
  }
  if (!payload.run_id) {
    throw new Error("Missing run_id");
  }

  const apiBaseUrl = payload.data?.api_base_url ?? "https://api.lovable.dev";

  await sendLovableEmail(
    {
      run_id: payload.run_id,
      to: payload.data?.email ?? "",
      from: "My App <noreply@example.com>",
      subject: "Welcome",
      html: "<p>Hello</p>",
      text: "Hello",
      purpose: "transactional",
    },
    { apiKey, apiBaseUrl },
  );
}
```

### Sending without a `run_id` (runtime-triggered emails)

For transactional emails sent outside a build context (e.g., webhook handlers,
admin actions, database triggers), `run_id` is not required. Provide an
`idempotency_key` with `purpose: "transactional"` and the API creates a
transactional run automatically:

```ts
await sendLovableEmail(
  {
    to: "user@example.com",
    from: "App <noreply@notify.example.com>",
    sender_domain: "notify.example.com",
    subject: "Your request was approved",
    html: "<p>Approved!</p>",
    text: "Approved!",
    purpose: "transactional",
    idempotency_key: `approval-${requestId}`,
    unsubscribe_token: token,
  },
  { apiKey },
);
```
npm package: @lovable.dev/webhooks-js
Description: Lovable Webhooks JS
Latest version: 0.0.1

# @lovable.dev/webhooks-js

Webhook signature utilities for Lovable integrations.

## Installation

```bash
npm install @lovable.dev/webhooks-js
```

## Usage

```ts
import {
  verifyWebhookRequest,
  verifyWebhookSignature,
  type EmailWebhookPayload,
} from "@lovable.dev/webhooks-js";

const body = await req.text();
const signature = req.headers.get("x-lovable-signature");
const timestamp = req.headers.get("x-lovable-timestamp") ?? "";
const isValid = await verifyWebhookSignature({
  signedPayload: `${timestamp}.${body}`,
  signature,
  secret: Deno.env.get("LOVABLE_API_KEY") ?? "",
});

if (!isValid) {
  throw new Error("Invalid signature");
}

// Or verify the request and parse JSON in one step
const { payload } = await verifyWebhookRequest<EmailWebhookPayload>({
  req,
  secret: Deno.env.get("LOVABLE_API_KEY") ?? "",
});

// Or pass a custom parser
const { payload: rawPayload } = await verifyWebhookRequest({
  req,
  secret: Deno.env.get("LOVABLE_API_KEY") ?? "",
  parser: (body) => ({ raw: body }),
});
```
npm package: @lovanshgaur/meowjs
Description: A lightweight JavaScript library to create customizable mouse cursors with shape, color, and blur options.
Author: Lovansh Gaur
Latest version: 0.1.0

# 🐾 Meow Cursor

**Meow Cursor** is a lightweight JavaScript library that lets you add a custom cursor to any webpage. Whether you're building a stylish portfolio or a playful web toy, `meow` helps your cursor stand out.

## 🚀 Features

- Fully customizable size, color, border, and shape
- Smooth movement using mouse tracking
- Option to blur cursor with a glow effect
- Easy to integrate and remove
- High z-index to ensure it stays on top

## 📦 Installation

Include the function in your project or import it from your module:

```js
import { meow } from './meow.js'; // if using ES modules
```

Or directly include the script in your HTML file:

```html
<script src="meow.js"></script>
```

## 🔧 Usage

```js
meow({
  size: 30,
  color: "red",
  border: "2px solid white",
  blur: true,
  zIndex: 100000,
  shape: "diamond"
});
```

### 💡 Options

| Option   | Type      | Default   | Description                                |
|----------|-----------|-----------|--------------------------------------------|
| size     | `number`  | `20`      | Diameter (or width/height) of the cursor   |
| color    | `string`  | `"black"` | Background color of the cursor             |
| border   | `string`  | `"none"`  | CSS border value                           |
| blur     | `boolean` | `false`   | Whether to add a glow/blur effect          |
| zIndex   | `number`  | `99999`   | Controls cursor stacking order             |
| shape    | `string`  | `"circle"`| Can be `"circle"`, `"square"`, `"leaf"`, `"diamond"`, or `"mid"` |

## ❌ Note

- Only one custom cursor is allowed at a time.
- Cursor will follow the mouse and hide the native one.

## 🐱 Example

```js
meow({ size: 25, color: '#ff69b4', shape: 'leaf', blur: true });
```

## 📄 License

MIT © [LovanshGaur](https://lovansh.me/)
npm package: @lovanya/hexo-asset-image
Description: Give asset image in hexo a absolutely path automatically
Author: codefalling
Latest version: 0.0.3

# hexo-asset-image


Give asset image in hexo a absolutely path automatically

# Usege

```shell
npm install hexo-asset-image --save
```

# Example  

```shell
#add a new article
hexo new example 
```

```shell
/source/_posts/
example
├── apppicker.jpg
├── logo.jpg
└── rules.jpg
example.md
```

Make sure `post_asset_folder: true` in your `_config.yml`.

Just use `![logo](example/logo.jpg)` to insert `logo.jpg`.