Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
@svelte-put/async-stack
Advanced tools
type-safe and headless builder for async component stack
@svelte-put/async-stack
Type-safe and headless async builder for async component stack (notification and modal/dialog systems, for example)
svelte-put
This package is part of the @svelte-put family. For contributing guideline and more, refer to its readme.
See the dedicated documentation page here.
<script lang="ts">
import { stack } from '@svelte-put/async-stack';
// any Svelte component to render as
import MyComponent from './MyComponent.svelte';
// define somewhere global, reuse across app
export const myStack = stack()
// add a minimalistic variant config
.addVariant('my', MyComponent)
// add a verbose variant config
.addVariant('special', {
timeout: false,
id: 'counter',
component: MyComponent,
props: {
// inferred from Notification component
special: true,
content: 'A very special thing',
},
})
// build the actual stack
.build();
onMount(async () => {
// push a special item
const pushed = myStack.push('special');
// wait for some user action for the item
// to be resolved (popped) from within the component
const { userAction } = await pushed.resolution;
// push another item with custom props
notiStack.push('info', {
props: {
content: 'An example information',
},
});
});
</script>
<!-- portal ->
<aside class="applicable class">
{#each myStack.items as item (item.config.id)}
<div use:myStack.actions.render={item}>
<!-- StackItem instances rendered as direct children -->
</div>
{/each}
</aside>
FAQs
type-safe and headless builder for async component stack
The npm package @svelte-put/async-stack receives a total of 26 weekly downloads. As such, @svelte-put/async-stack popularity was classified as not popular.
We found that @svelte-put/async-stack 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
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.