@melt-ui/svelte
Advanced tools
Comparing version 0.61.3 to 0.62.0
@@ -28,2 +28,4 @@ import { addEventListener, addMeltEventListener, ariaDisabledAttr, builder, createElHelpers, disabledAttr, effect, executeCallbacks, getElementByMeltId, isBrowser, isHTMLElement, kbd, omit, overridable, snapValueToStep, styleToString, toWritableStores, } from '../../internal/helpers/index.js'; | ||
return [val]; | ||
if (prev[index] === val) | ||
return prev; | ||
const newValue = [...prev]; | ||
@@ -364,7 +366,3 @@ const direction = newValue[index] > val ? -1 : +1; | ||
}; | ||
const unsub = executeCallbacks(); | ||
addEventListener(document, 'pointerdown', pointerDown), | ||
addEventListener(document, 'pointerup', pointerUp), | ||
addEventListener(document, 'pointerleave', pointerUp), | ||
addEventListener(document, 'pointermove', pointerMove); | ||
const unsub = executeCallbacks(addEventListener(document, 'pointerdown', pointerDown), addEventListener(document, 'pointerup', pointerUp), addEventListener(document, 'pointerleave', pointerUp), addEventListener(document, 'pointermove', pointerMove)); | ||
return () => { | ||
@@ -371,0 +369,0 @@ unsub(); |
@@ -277,2 +277,6 @@ import { addMeltEventListener, builder, createElHelpers, executeCallbacks, } from '../../internal/helpers'; | ||
} | ||
// Add items hash to URL | ||
if (id) { | ||
window.location.hash = id; | ||
} | ||
})); | ||
@@ -279,0 +283,0 @@ return { |
@@ -0,1 +1,2 @@ | ||
import type { NonEmptyArray } from '../types'; | ||
/** | ||
@@ -12,3 +13,3 @@ * A callback function that takes an array of arguments of type `T` and returns `void`. | ||
*/ | ||
export declare function executeCallbacks<T extends unknown[]>(...callbacks: Array<Callback<T>>): (...args: T) => void; | ||
export declare function executeCallbacks<T extends unknown[]>(...callbacks: NonEmptyArray<Callback<T>>): (...args: T) => void; | ||
/** | ||
@@ -15,0 +16,0 @@ * A no operation function (does nothing) |
@@ -64,2 +64,3 @@ import type { ActionReturn } from 'svelte/action'; | ||
}>; | ||
export type NonEmptyArray<T> = [T, ...T[]]; | ||
export {}; |
{ | ||
"name": "@melt-ui/svelte", | ||
"version": "0.61.3", | ||
"version": "0.62.0", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "repository": "github:melt-ui/melt-ui", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1011836
22878