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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@liwe3/webcomponents-svelte

v1.1.0

Published

Svelte 5 wrappers for @liwe3/webcomponents

Readme

@liwe3/webcomponents-svelte

Svelte 5 wrappers for @liwe3/webcomponents.

Installation

npm install @liwe3/webcomponents @liwe3/webcomponents-svelte
# or
pnpm add @liwe3/webcomponents @liwe3/webcomponents-svelte
# or
yarn add @liwe3/webcomponents @liwe3/webcomponents-svelte

Usage

SmartSelect

<script>
  import { SmartSelect } from '@liwe3/webcomponents-svelte';

  let selectedValue = $state();

  const options = [
    { value: 'js', label: 'JavaScript' },
    { value: 'ts', label: 'TypeScript' },
    { value: 'py', label: 'Python' }
  ];

  const handleChange = (newValue) => {
    console.log('Selected:', newValue);
  };
</script>

<SmartSelect
  bind:value={selectedValue}
  {options}
  searchable
  placeholder="Select a language"
  onchange={handleChange}
/>

AITextEditor

<script>
  import { AITextEditor } from '@liwe3/webcomponents-svelte';

  let content = $state('');
  let systemPrompt = $state("You are a helpful writing assistant.");

  const handleChange = (newValue) => {
    console.log('Content changed:', newValue);
  };
</script>

<AITextEditor
  bind:value={content}
  bind:systemPrompt
  apiKey="your-api-key"
  apiEndpoint="https://api.openai.com/v1/chat/completions"
  modelName="gpt-3.5-turbo"
  placeholder="Start writing..."
  onchange={handleChange}
  style="width: 100%; height: 400px;"
/>

Features

  • Full Svelte 5 Support: Uses Svelte 5 runes ($state, $bindable, $effect)
  • TypeScript: Full type safety
  • Reactive: All props are reactive and two-way bindable where appropriate
  • SSR Safe: Components are loaded dynamically to prevent SSR issues

Components

SmartSelect Props

  • multiple (boolean): Enable multi-select mode
  • searchable (boolean): Enable search functionality
  • placeholder (string): Placeholder text
  • disabled (boolean): Disable the select
  • value (string | string[], bindable): Selected value(s)
  • options (SelectOption[]): Array of {value, label} objects
  • onchange (function): Change event handler
  • onopen (function): Open event handler
  • onclose (function): Close event handler
  • onsearch (function): Search event handler

AITextEditor Props

  • value (string, bindable): Editor content
  • apiKey (string): API key for AI service
  • suggestionDelay (number): Delay before showing suggestions (ms)
  • systemPrompt (string, bindable): System prompt for AI
  • apiEndpoint (string): API endpoint URL
  • modelName (string): Model name to use
  • placeholder (string): Placeholder text
  • onbeforesuggestion (function): Called before requesting suggestion
  • onchange (function): Change event handler

License

MIT

Links