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.41.2 to 0.41.3

60

dist/builders/popover/create.js

@@ -60,7 +60,2 @@ import { addMeltEventListener, builder, createElHelpers, derivedVisible, effect, generateId, getPortalDestination, isBrowser, isHTMLElement, kbd, noop, omit, overridable, removeScroll, styleToString, toWritableStores, } from '../../internal/helpers/index.js';

action: (node) => {
/**
* We need to get the parent portal before the menu is opened,
* otherwise the parent will have been moved to the body, and
* will no longer be an ancestor of this node.
*/
let unsubPopper = noop;

@@ -79,24 +74,22 @@ const unsubDerived = effect([

return;
tick().then(() => {
const popper = usePopper(node, {
anchorElement: $activeTrigger,
open,
options: {
floating: $positioning,
focusTrap: $disableFocusTrap ? null : undefined,
clickOutside: $closeOnOutsideClick ? undefined : null,
escapeKeydown: $closeOnEscape
? {
handler: () => {
handleClose();
},
}
: null,
portal: getPortalDestination(node, $portal),
},
});
if (popper && popper.destroy) {
unsubPopper = popper.destroy;
}
const popper = usePopper(node, {
anchorElement: $activeTrigger,
open,
options: {
floating: $positioning,
focusTrap: $disableFocusTrap ? null : undefined,
clickOutside: $closeOnOutsideClick ? undefined : null,
escapeKeydown: $closeOnEscape
? {
handler: () => {
handleClose();
},
}
: null,
portal: getPortalDestination(node, $portal),
},
});
if (popper && popper.destroy) {
unsubPopper = popper.destroy;
}
});

@@ -111,4 +104,9 @@ return {

});
function toggleOpen() {
open.update((prev) => !prev);
function toggleOpen(triggerEl) {
open.update((prev) => {
return !prev;
});
if (triggerEl) {
activeTrigger.set(triggerEl);
}
}

@@ -129,4 +127,3 @@ const trigger = builder(name('trigger'), {

const unsub = executeCallbacks(addMeltEventListener(node, 'click', () => {
activeTrigger.set(node);
toggleOpen();
toggleOpen(node);
}), addMeltEventListener(node, 'keydown', (e) => {

@@ -136,4 +133,3 @@ if (e.key !== kbd.ENTER && e.key !== kbd.SPACE)

e.preventDefault();
activeTrigger.set(node);
toggleOpen();
toggleOpen(node);
}));

@@ -140,0 +136,0 @@ return {

{
"name": "@melt-ui/svelte",
"version": "0.41.2",
"version": "0.41.3",
"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