npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@juna_dine/core

v1.0.6

Published

Core logic for AI Chatbot SDK

Readme

Junadine Chatbot Widget

A powerful, fully customizable, AI-driven restaurant chatbot widget. It can be easily integrated into any React/Next.js application or embedded into Vanilla JS / HTML websites (like WordPress, Shopify, or plain HTML).


🚀 Installation

For React / Next.js

Install the packages via your favorite package manager:

npm install @juna_dine/react @juna_dine/core
# or
yarn add @juna_dine/react @juna_dine/core
# or
pnpm add @juna_dine/react @juna_dine/core

For Vanilla JS / HTML (CDN)

If you are not using React, you can include the widget directly via a script tag right before your closing </body> tag:

<!-- Load the Junadine Chatbot Widget -->
<script src="https://chatbot.junadine.ai/junadine-widget/v1/index.umd.js"></script>

<!-- Initialize the Chatbot -->
<script>
  document.addEventListener('DOMContentLoaded', () => {
      window.JunadineChatbot.init({
          restaurantKey: 'YOUR_RESTAURANT_KEY',
          themeColor: '#C2410C',
          position: 'bottom-right'
      });
  });
</script>

💻 React Usage Guide

1. Setup the Provider and Widget

Wrap your application (or the specific layout where you want the chatbot to appear) with the ChatbotProvider and include the ChatbotWidget.

// app/layout.tsx or app/providers.tsx
'use client';

import { ChatbotProvider, ChatbotWidget } from '@juna_dine/react';

export default function RootLayout({ children }: { children: React.ReactNode }) {
  return (
    <html lang="en">
      <body>
        <ChatbotProvider 
          config={{ 
            restaurantKey: 'YOUR_RESTAURANT_KEY',
            title: "Bob's Pizza Bot",
            themeColor: "#C2410C"
          }}
        >
          {children}
          <ChatbotWidget />
        </ChatbotProvider>
      </body>
    </html>
  );
}

2. Custom Triggers (Opening Chat from your own Buttons)

You don't have to rely solely on the default floating chat icon. You can open the chat from any button on your website using the useChatbot hook!

'use client';

import { useChatbot } from '@juna_dine/react';

export default function OrderPage() {
  const { setIsOpen } = useChatbot();

  return (
    <div>
      <h1>Hungry?</h1>
      <button onClick={() => setIsOpen(true)}>
        Order Now via Chat
      </button>
    </div>
  );
}

Note: If you want to only use your custom buttons and hide the default floating circular button, pass hideLauncher: true in your ChatbotProvider config!


⚙️ Configuration Options

The config object accepts the following properties to completely white-label and customize the widget to match your brand:

Required

| Property | Type | Description | | :--- | :--- | :--- | | restaurantKey | string | Your unique restaurant identifier/API key used to connect to the Junadine backend. |

Appearance & UI

| Property | Type | Default | Description | | :--- | :--- | :--- | :--- | | themeColor | string | "#C2410C" | The primary color for the chat header, user bubbles, and launcher button. | | position | 'bottom-right' \| 'bottom-left' | 'bottom-right' | Which corner of the screen the widget should dock to. | | fontFamily | string | 'Inter', system-ui | Custom font family to seamlessly blend with your website. | | zIndex | number | 9999 | The CSS z-index of the widget container. | | hideLauncher | boolean | false | If true, hides the default floating circular toggle button. | | botAvatarUrl | string | undefined | URL to an image to show next to the assistant's messages. | | userAvatarUrl | string | undefined | URL to an image to show next to the user's messages. | | launcherIconUrl | string | undefined | Custom icon URL for the floating toggle button (replaces default icon). | | botMessageColor | string | "#ffffff" | Background color for the assistant's message bubbles. | | botTextColor | string | "#1f2937" | Text color for the assistant's message bubbles. | | userTextColor | string | "#ffffff" | Text color for the user's message bubbles. | | borderRadius | number | 16 | Border radius (in pixels) for the chat window and message bubbles. |

Text & Copy

| Property | Type | Default | Description | | :--- | :--- | :--- | :--- | | title | string | "Junadine Assistant" | The main title shown in the chat header. | | subtitle | string | "Online and ready to help" | The subtitle shown below the title in the header. | | placeholderText | string | "Type your message..." | The placeholder text inside the chat input field. | | greetingMessage | string | undefined | An initial message that shows up instantly before the user types anything. |

Behavior

| Property | Type | Default | Description | | :--- | :--- | :--- | :--- | | autoOpen | boolean | false | If true, the chat window will automatically pop open when the page loads. |


🌐 Vanilla JS Custom Triggers

If you are using the CDN/Vanilla JS version of the widget, you can still trigger the chat from your own HTML buttons! The widget exposes a global window.JunadineChatbot object.

<!-- A custom button anywhere on your website -->
<button onclick="window.JunadineChatbot.open()">
  Ask a Question
</button>

<!-- Other available methods: -->
<!-- window.JunadineChatbot.close() -->
<!-- window.JunadineChatbot.toggle() -->

🛠 Architecture

This project is structured as a monorepo containing:

  1. @juna_dine/core: The framework-agnostic logic, API communication, and state management.
  2. @juna_dine/react: The React Context, Hooks, and UI Components.
  3. @juna_dine/widget: The bundled Vanilla JS wrapper for CDN deployment.