
Security News
Node.js Drops Bug Bounty Rewards After Funding Dries Up
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.
@liwe3/webcomponents
Advanced tools
A collection of reusable web components including SmartSelect and AITextEditor, ChunkUploader and more
A collection of reusable, framework-agnostic web components built with TypeScript.
npm install @liwe3/webcomponents
# or
pnpm add @liwe3/webcomponents
# or
yarn add @liwe3/webcomponents
import '@liwe3/webcomponents';
// Import only SmartSelect
import '@liwe3/webcomponents/smart-select';
// Import only AITextEditor
import '@liwe3/webcomponents/ai-text-editor';
import { SmartSelectElement, AITextEditorElement, type SelectOption } from '@liwe3/webcomponents';
// Access element instances with proper typing
const select = document.querySelector('liwe3-select') as SmartSelectElement;
select.setOptions([
{ value: '1', label: 'Option 1' },
{ value: '2', label: 'Option 2' }
]);
A powerful select dropdown with advanced features.
<liwe3-select
placeholder="Select an option"
searchable
multiple
></liwe3-select>
<script type="module">
import '@liwe3/webcomponents/smart-select';
const select = document.querySelector('liwe3-select');
// Set options
select.options = [
{ value: 'js', label: 'JavaScript' },
{ value: 'ts', label: 'TypeScript' },
{ value: 'py', label: 'Python' }
];
// Listen for changes
select.addEventListener('change', (e) => {
console.log('Selected:', e.detail.value);
});
</script>
multiple - Enable multi-select modesearchable - Enable search/filter functionalityplaceholder - Placeholder text (default: "Select an option")disabled - Disable the select// Get/set value
select.value; // string | string[]
select.value = 'js'; // Set single value
select.value = ['js', 'ts']; // Set multiple values (when multiple=true)
// Get/set options
select.options; // SelectOption[]
select.setOptions([...]);
// Control dropdown
select.open();
select.close();
select.toggle();
// Select/deselect options
select.selectOption('js');
select.deselectOption('js');
select.getSelectedOptions(); // SelectOption[]
change - Fired when selection changes (detail: { value })open - Fired when dropdown opensclose - Fired when dropdown closessearch - Fired when search query changes (detail: { query })liwe3-select {
--font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
--font-size: 14px;
--padding: 8px 12px;
--border: 1px solid #ccc;
--border-radius: 4px;
--background: white;
--focus-color: #007bff;
/* Tag styles (multi-select) */
--tag-background: #e9ecef;
--tag-border-radius: 12px;
--tag-color: #495057;
--remove-color: #6c757d;
--remove-hover-color: #dc3545;
/* Dropdown styles */
--dropdown-background: white;
--dropdown-border: 1px solid #ccc;
--dropdown-border-radius: 4px;
--dropdown-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
/* Option styles */
--option-color: #333;
--option-hover-background: #f8f9fa;
--option-focused-background: #007bff;
--option-focused-color: white;
--option-selected-background: #e3f2fd;
--option-selected-color: #1976d2;
--no-options-color: #6c757d;
}
A text editor with AI-powered suggestions.
<liwe3-ai-text-editor style="width: 100%; height: 400px;"></liwe3-ai-text-editor>
<script type="module">
import '@liwe3/webcomponents/ai-text-editor';
const editor = document.querySelector('liwe3-ai-text-editor');
// Configure API
editor.setApiKey('your-api-key');
editor.setApiEndpoint('https://api.openai.com/v1/chat/completions');
editor.setModelName('gpt-3.5-turbo');
// Set initial text
editor.setText('Once upon a time...');
// Listen for changes
editor.addEventListener('change', (e) => {
console.log('Text:', e.detail.value);
});
// Handle before suggestion (optional - can cancel)
editor.addEventListener('beforeSuggestion', (e) => {
// Cancel suggestion if needed
if (someCondition) {
e.preventDefault();
}
});
</script>
// Text content
editor.setText(text: string): void;
editor.getText(): string;
// API configuration
editor.setApiKey(key: string): void;
editor.getApiKey(): string;
editor.setApiEndpoint(endpoint: string): void;
editor.getApiEndpoint(): string;
editor.setModelName(modelName: string): void;
editor.getModelName(): string;
// Suggestion settings
editor.setSuggestionDelay(seconds: number): void; // Default: 1 second
editor.getSuggestionDelay(): number;
editor.setSystemPrompt(prompt: string): void;
editor.getSystemPrompt(): string;
// Context for better suggestions
editor.setContext(context: string): void;
editor.getContext(): string;
change - Fired when text changes (detail: { value })beforeSuggestion - Fired before requesting AI suggestion (cancelable)
error - Fired when an error occurs (detail: { message })Tab - Accept current suggestion paragraphEscape - Dismiss suggestioneditor.setApiEndpoint('http://localhost:1234/v1/chat/completions');
editor.setModelName('local-model');
editor.setApiKey(''); // No API key needed for local
You can register components with custom tag names:
import { defineSmartSelect, defineAITextEditor } from '@liwe3/webcomponents';
defineSmartSelect('my-select');
defineAITextEditor('my-editor');
<my-select></my-select>
<my-editor></my-editor>
import '@liwe3/webcomponents';
import { useRef, useEffect } from 'react';
import type { SmartSelectElement } from '@liwe3/webcomponents';
function MyComponent() {
const selectRef = useRef<SmartSelectElement>(null);
useEffect(() => {
if (selectRef.current) {
selectRef.current.setOptions([
{ value: '1', label: 'Option 1' },
{ value: '2', label: 'Option 2' }
]);
}
}, []);
return <liwe3-select ref={selectRef} />;
}
<template>
<liwe3-select ref="select" @change="handleChange" />
</template>
<script setup>
import '@liwe3/webcomponents';
import { ref, onMounted } from 'vue';
const select = ref(null);
onMounted(() => {
select.value.setOptions([
{ value: '1', label: 'Option 1' },
{ value: '2', label: 'Option 2' }
]);
});
const handleChange = (e) => {
console.log('Selected:', e.detail.value);
};
</script>
<script>
import '@liwe3/webcomponents';
import { onMount } from 'svelte';
let selectElement;
onMount(() => {
selectElement.setOptions([
{ value: '1', label: 'Option 1' },
{ value: '2', label: 'Option 2' }
]);
});
const handleChange = (e) => {
console.log('Selected:', e.detail.value);
};
</script>
<liwe3-select bind:this={selectElement} on:change={handleChange} />
Modern browsers with Web Components support:
# Install dependencies
pnpm install
# Build
pnpm run build
# Build in watch mode
pnpm run dev
MIT
Contributions are welcome! Please feel free to submit a Pull Request.
FAQs
A collection of reusable web components including SmartSelect and AITextEditor, ChunkUploader and more
The npm package @liwe3/webcomponents receives a total of 7 weekly downloads. As such, @liwe3/webcomponents popularity was classified as not popular.
We found that @liwe3/webcomponents demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.