open-index/open-npm huggingface dataset:
npm package: @lakimi/react-widget-assistant
Description: React + TypeScript version of Lakimi Assistant Widget
Latest version: 0.0.9

# @lakimi/react-widget-assistant

React + TypeScript version of the Lakimi Assistant Widget.

## Installation

```bash
npm install @lakimi/react-widget-assistant
# or
pnpm add @lakimi/react-widget-assistant
```

## Usage

### As a Widget (with bubble)

```tsx
import { LakimiAssistantWidget } from "@lakimi/react-widget-assistant";

function App() {
  return (
    <LakimiAssistantWidget
      assistantId="your-assistant-id"
      apiEndpoint="https://api.lakimi.io"
      language="es"
      theme="light"
      onLoad={(data) => console.log("Assistant loaded:", data)}
    />
  );
}
```

### As a Direct Assistant Component

```tsx
import { LakimiAssistant } from "@lakimi/react-widget-assistant";

function App() {
  return (
    <LakimiAssistant
      assistantId="your-assistant-id"
      apiEndpoint="https://api.lakimi.io"
      language="es"
      theme="light"
      onLoad={(data) => console.log("Assistant loaded:", data)}
    />
  );
}
```

## Props

### LakimiAssistantWidget / LakimiAssistant

- `assistantId` (required): Assistant ID
- `apiEndpoint`: API endpoint URL (default: "https://api.lakimi.io")
- `language`: Language code (default: "es")
- `environment`: Environment ("prod" | "dev", default: "prod")
- `authMethod`: Authentication method ("integrated" | "managed", default: "integrated")
- `clientId`: Client ID for authentication
- `theme`: Theme ("light" | "dark")
- `onLoad`: Callback when assistant loads
- `onAction`: Callback for custom actions

## Component Managers

### ComponentManager

Register custom components to render in chat:

```tsx
import { componentManager } from "@lakimi/react-widget-assistant";

componentManager.registerComponent({
  name: "my-component",
  description: "My custom component",
  schema: {
    type: "object",
    properties: {
      title: { type: "string" },
      value: { type: "number" },
    },
  },
  component: YourReactComponent,
});
```

### ClientToolsManager

Register client-side tools that the assistant can call:

```tsx
import { clientToolsManager } from "@lakimi/react-widget-assistant";

clientToolsManager.registerTool(
  "get-location",
  {
    description: "Get user location",
    parameters: {
      type: "object",
      properties: {},
      required: [],
    },
  },
  async (args, toolCallId) => {
    return new Promise((resolve) => {
      navigator.geolocation.getCurrentPosition(
        (position) =>
          resolve({
            lat: position.coords.latitude,
            lng: position.coords.longitude,
          }),
        (error) => resolve({ error: error.message })
      );
    });
  }
);
```

## Development

```bash
# Install dependencies
pnpm install

# Start dev server
pnpm dev

# Build library
pnpm build
```

## License

MIT
npm package: @lakmaldulanga/international-phone-number-lm
Description: This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 18.2.0.
Latest version: 0.0.8

# InternationalPhoneNumberLM

This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 18.2.0.

## Code scaffolding

Run `ng generate component component-name --project international-phone-number-LM` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project international-phone-number-LM`.
> Note: Don't forget to add `--project international-phone-number-LM` or else it will be added to the default project in your `angular.json` file. 

## Build

Run `ng build international-phone-number-LM` to build the project. The build artifacts will be stored in the `dist/` directory.

## Publishing

After building your library with `ng build international-phone-number-LM`, go to the dist folder `cd dist/international-phone-number-lm` and run `npm publish`.

## Running unit tests

Run `ng test international-phone-number-LM` to execute the unit tests via [Karma](https://karma-runner.github.io).

## Further help

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.