Socket
Socket
Sign inDemoInstall

@zag-js/tags-input

Package Overview
Dependencies
Maintainers
1
Versions
1021
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zag-js/tags-input - npm Package Compare versions

Comparing version 0.0.0-dev-20240712125036 to 0.0.0-dev-20240712143332

6

dist/index.js

@@ -865,3 +865,4 @@ "use strict";

if (guard) {
set.value(ctx2, ctx2.value.concat(value));
const nextValue = (0, import_utils.uniq)(ctx2.value.concat(value));
set.value(ctx2, nextValue);
ctx2.log.prev = ctx2.log.current;

@@ -879,3 +880,4 @@ ctx2.log.current = { type: "add", value };

const trimmedValue = ctx2.delimiter ? value.split(ctx2.delimiter).map((v) => v.trim()) : [value];
set.value(ctx2, ctx2.value.concat(...trimmedValue));
const nextValue = (0, import_utils.uniq)(ctx2.value.concat(...trimmedValue));
set.value(ctx2, nextValue);
ctx2.log.prev = ctx2.log.current;

@@ -882,0 +884,0 @@ ctx2.log.current = { type: "paste", values: trimmedValue };

{
"name": "@zag-js/tags-input",
"version": "0.0.0-dev-20240712125036",
"version": "0.0.0-dev-20240712143332",
"description": "Core logic for the tags-input widget implemented as a state machine",

@@ -30,12 +30,12 @@ "keywords": [

"dependencies": {
"@zag-js/anatomy": "0.0.0-dev-20240712125036",
"@zag-js/auto-resize": "0.0.0-dev-20240712125036",
"@zag-js/core": "0.0.0-dev-20240712125036",
"@zag-js/interact-outside": "0.0.0-dev-20240712125036",
"@zag-js/live-region": "0.0.0-dev-20240712125036",
"@zag-js/dom-query": "0.0.0-dev-20240712125036",
"@zag-js/dom-event": "0.0.0-dev-20240712125036",
"@zag-js/form-utils": "0.0.0-dev-20240712125036",
"@zag-js/utils": "0.0.0-dev-20240712125036",
"@zag-js/types": "0.0.0-dev-20240712125036"
"@zag-js/anatomy": "0.0.0-dev-20240712143332",
"@zag-js/auto-resize": "0.0.0-dev-20240712143332",
"@zag-js/core": "0.0.0-dev-20240712143332",
"@zag-js/interact-outside": "0.0.0-dev-20240712143332",
"@zag-js/live-region": "0.0.0-dev-20240712143332",
"@zag-js/dom-query": "0.0.0-dev-20240712143332",
"@zag-js/dom-event": "0.0.0-dev-20240712143332",
"@zag-js/form-utils": "0.0.0-dev-20240712143332",
"@zag-js/utils": "0.0.0-dev-20240712143332",
"@zag-js/types": "0.0.0-dev-20240712143332"
},

@@ -42,0 +42,0 @@ "devDependencies": {

@@ -7,3 +7,3 @@ import { autoResizeInput } from "@zag-js/auto-resize"

import { createLiveRegion } from "@zag-js/live-region"
import { compact, isEqual, removeAt, warn } from "@zag-js/utils"
import { compact, isEqual, removeAt, uniq, warn } from "@zag-js/utils"
import { dom } from "./tags-input.dom"

@@ -479,3 +479,4 @@ import type { MachineContext, MachineState, UserDefinedContext } from "./tags-input.types"

if (guard) {
set.value(ctx, ctx.value.concat(value))
const nextValue = uniq(ctx.value.concat(value))
set.value(ctx, nextValue)
// log

@@ -494,3 +495,4 @@ ctx.log.prev = ctx.log.current

const trimmedValue = ctx.delimiter ? value.split(ctx.delimiter).map((v) => v.trim()) : [value]
set.value(ctx, ctx.value.concat(...trimmedValue))
const nextValue = uniq(ctx.value.concat(...trimmedValue))
set.value(ctx, nextValue)
// log

@@ -497,0 +499,0 @@ ctx.log.prev = ctx.log.current

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc