New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@svelte-put/async-stack

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@svelte-put/async-stack - npm Package Compare versions

Comparing version 1.0.0-next.4 to 1.0.0

4

package.json
{
"name": "@svelte-put/async-stack",
"version": "1.0.0-next.4",
"version": "1.0.0",
"description": "type-safe and headless builder for async component stack",

@@ -59,3 +59,3 @@ "type": "module",

"peerDependencies": {
"svelte": "^5.0.0-next.262"
"svelte": "^5.1.0"
},

@@ -62,0 +62,0 @@ "volta": {

@@ -1,2 +0,2 @@

import { mount } from 'svelte';
import { mount, tick } from 'svelte';

@@ -46,3 +46,14 @@ import { MissingComponentInCustomPush, NotFoundVariantConfig } from './errors.js';

});
return {};
tick().then(() => {
const detail = { item };
const event = new CustomEvent('stackitemmount', { detail });
node.dispatchEvent(event);
});
return {
destroy: () => {
const detail = { item };
const event = new CustomEvent('stackitemunmount', { detail });
node.dispatchEvent(event);
},
};
},

@@ -49,0 +60,0 @@ };

@@ -8,6 +8,3 @@ /* eslint-disable @typescript-eslint/no-explicit-any */

export type StackItemCommonConfig<
Variant extends string,
UserComponent extends Component<any>,
> = {
export type StackItemCommonConfig<Variant extends string, UserComponent extends Component<any>> = {
/**

@@ -28,5 +25,3 @@ * milliseconds to wait and automatically pop the stack item.

| 'uuid'
| ((
config: Required<Omit<StackItemInstanceConfig<Variant, UserComponent>, 'id'>>,
) => string);
| ((config: Required<Omit<StackItemInstanceConfig<Variant, UserComponent>, 'id'>>) => string);
};

@@ -61,9 +56,10 @@

UserComponent extends Component<any>,
> = StackItemCommonConfig< Variant, UserComponent> & {
> = StackItemCommonConfig<Variant, UserComponent> & {
props?: Omit<ComponentProps<UserComponent>, 'item'>;
};
export type StackItemCustomPushConfig<
UserComponent extends Component<any>,
> = StackItemCommonConfig<'custom', UserComponent> & {
export type StackItemCustomPushConfig<UserComponent extends Component<any>> = StackItemCommonConfig<
'custom',
UserComponent
> & {
component: UserComponent;

@@ -73,5 +69,3 @@ props?: Omit<ComponentProps<UserComponent>, 'item'>;

export type StackItemPopVerboseInput <
UserComponent extends Component<any>,
>= {
export type StackItemPopVerboseInput<UserComponent extends Component<any>> = {
id?: string;

@@ -81,3 +75,9 @@ resolved?: ComponentResolved<UserComponent>;

export type StackItemRenderActionReturn = ActionReturn<StackItem<any>>;
export interface StackItemRenderActionAttributes {
onstackitemmount?: (event: CustomEvent<{ item: StackItem<any> }>) => void;
onstackitemunmount?: (event: CustomEvent<{ item: StackItem<any> }>) => void;
}
export type StackItemRenderActionReturn = ActionReturn<
StackItem<any>,
StackItemRenderActionAttributes
>;

@@ -80,6 +80,3 @@ declare module '@svelte-put/async-stack' {

: any;
type StackItemCommonConfig<
Variant extends string,
UserComponent extends Component<any>,
> = {
type StackItemCommonConfig<Variant extends string, UserComponent extends Component<any>> = {
/**

@@ -100,5 +97,3 @@ * milliseconds to wait and automatically pop the stack item.

| 'uuid'
| ((
config: Required<Omit<StackItemInstanceConfig<Variant, UserComponent>, 'id'>>,
) => string);
| ((config: Required<Omit<StackItemInstanceConfig<Variant, UserComponent>, 'id'>>) => string);
};

@@ -133,9 +128,10 @@

UserComponent extends Component<any>,
> = StackItemCommonConfig< Variant, UserComponent> & {
> = StackItemCommonConfig<Variant, UserComponent> & {
props?: Omit<ComponentProps<UserComponent>, 'item'>;
};
type StackItemCustomPushConfig<
UserComponent extends Component<any>,
> = StackItemCommonConfig<'custom', UserComponent> & {
type StackItemCustomPushConfig<UserComponent extends Component<any>> = StackItemCommonConfig<
'custom',
UserComponent
> & {
component: UserComponent;

@@ -145,5 +141,3 @@ props?: Omit<ComponentProps<UserComponent>, 'item'>;

type StackItemPopVerboseInput <
UserComponent extends Component<any>,
>= {
type StackItemPopVerboseInput<UserComponent extends Component<any>> = {
id?: string;

@@ -153,3 +147,10 @@ resolved?: ComponentResolved<UserComponent>;

type StackItemRenderActionReturn = ActionReturn<StackItem<any>>;
interface StackItemRenderActionAttributes {
onstackitemmount?: (event: CustomEvent<{ item: StackItem<any> }>) => void;
onstackitemunmount?: (event: CustomEvent<{ item: StackItem<any> }>) => void;
}
type StackItemRenderActionReturn = ActionReturn<
StackItem<any>,
StackItemRenderActionAttributes
>;

@@ -156,0 +157,0 @@ export {};

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc