Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@melt-ui/svelte

Package Overview
Dependencies
Maintainers
1
Versions
195
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@melt-ui/svelte - npm Package Compare versions

Comparing version 0.47.5 to 0.47.6

2

dist/builders/accordion/create.d.ts

@@ -48,3 +48,3 @@ /// <reference types="svelte" />

states: {
value: (Multiple extends false ? import("svelte/store").Writable<string | undefined> : import("svelte/store").Writable<string[] | undefined>) & {};
value: import("svelte/store").Writable<import("../../internal/types.js").WhenTrue<Multiple, string[], string, string | string[]> | undefined>;
};

@@ -51,0 +51,0 @@ helpers: {

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

import type { BuilderReturn } from '../../internal/types.js';
import type { BuilderReturn, WhenTrue } from '../../internal/types.js';
import type { Writable } from 'svelte/store';

@@ -6,2 +6,3 @@ import type { createAccordion } from './create.js';

export type { AccordionComponentEvents } from './events.js';
type AccordionValue<Multiple extends boolean> = WhenTrue<Multiple, string[], string>;
export type CreateAccordionProps<Multiple extends boolean = false> = {

@@ -32,3 +33,3 @@ /**

*/
defaultValue?: Multiple extends false ? string : string[];
defaultValue?: AccordionValue<Multiple>;
/**

@@ -40,3 +41,3 @@ * The controlled value store for the accordion.

*/
value?: Multiple extends false ? Writable<string | undefined> : Writable<string[] | undefined>;
value?: Writable<AccordionValue<Multiple> | undefined>;
/**

@@ -47,3 +48,3 @@ * A callback called when the value of the `value` store should be changed.

*/
onValueChange?: Multiple extends false ? ChangeFn<string | undefined> : ChangeFn<string[] | undefined>;
onValueChange?: ChangeFn<AccordionValue<Multiple> | undefined>;
};

@@ -50,0 +51,0 @@ export type AccordionItemProps = {

@@ -55,2 +55,5 @@ import type { ActionReturn } from 'svelte/action';

};
export type WhenTrue<TrueOrFalse, IfTrue, IfFalse, IfNeither = IfTrue | IfFalse> = [
TrueOrFalse
] extends [true] ? IfTrue : [TrueOrFalse] extends [false] ? IfFalse : IfNeither;
export {};
export {};
// This type is awesome, but can't be annotated it seems.
// type Default<Label extends string> = `default${Capitalize<Label>}`;
// type onChange<Label extends string> = `on${Capitalize<Label>}Change`;
// type WithChangeFn<Label extends string, T> = {
// [K in Default<Label> | onChange<Label> | Label]: K extends Default<Label>
// ? T
// : T extends onChange<Label>
// ? ChangeFn<T>
// : Writable<T>;
// };
{
"name": "@melt-ui/svelte",
"version": "0.47.5",
"version": "0.47.6",
"license": "MIT",

@@ -5,0 +5,0 @@ "exports": {

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