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.33.1 to 0.34.0

dist/builders/table-of-contents/create.d.ts

1

dist/builders/index.d.ts

@@ -22,2 +22,3 @@ export * from './accordion/index.js';

export * from './tabs/index.js';
export * from './table-of-contents/index.js';
export * from './tags-input/index.js';

@@ -24,0 +25,0 @@ export * from './toast/index.js';

@@ -22,2 +22,3 @@ export * from './accordion/index.js';

export * from './tabs/index.js';
export * from './table-of-contents/index.js';
export * from './tags-input/index.js';

@@ -24,0 +25,0 @@ export * from './toast/index.js';

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

unique: import("svelte/store").Writable<boolean>;
trim: import("svelte/store").Writable<boolean>;
addOnPaste: import("svelte/store").Writable<boolean>;

@@ -78,0 +79,0 @@ maxTags: import("svelte/store").Writable<number | undefined>;

@@ -11,2 +11,3 @@ import { builder, createElHelpers, effect, executeCallbacks, generateId, getElementByMeltId, isBrowser, isHTMLElement, kbd, omit, overridable, styleToString, toWritableStores, addMeltEventListener, } from '../../internal/helpers/index.js';

unique: false,
trim: true,
blur: 'nothing',

@@ -30,3 +31,3 @@ addOnPaste: false,

const options = toWritableStores(omit(withDefaults, 'tags'));
const { placeholder, disabled, editable, unique, blur, addOnPaste, allowed, denied, add, remove, update, maxTags, } = options;
const { placeholder, disabled, editable, unique, trim, blur, addOnPaste, allowed, denied, add, remove, update, maxTags, } = options;
// A store representing the current input value. A readable version is exposed to the

@@ -63,3 +64,6 @@ // user

const $maxTags = get(maxTags);
// Tag uniqueness
// Trim the validation value before validations
if (get(trim))
v = v.trim();
// Tag uniqueness
if (get(unique) && $editing?.value !== v) {

@@ -101,2 +105,5 @@ const index = $tags.findIndex((tag) => tag.value === v);

}
// Trim the value, only after the user defined add function
if (get(trim))
workingTag.value = workingTag.value.trim();
tags.update((current) => {

@@ -126,2 +133,5 @@ current.push(workingTag);

}
// Trim the value, only after the user defined update function
if (get(trim))
workingTag.value = workingTag.value.trim();
// Update the tag matching the old id

@@ -128,0 +138,0 @@ tags.update(($tags) => {

@@ -14,2 +14,3 @@ import type { BuilderReturn } from '../../internal/types.js';

unique?: boolean;
trim?: boolean;
blur?: Blur;

@@ -16,0 +17,0 @@ addOnPaste?: boolean;

2

package.json
{
"name": "@melt-ui/svelte",
"version": "0.33.1",
"version": "0.34.0",
"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