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

selecto

Package Overview
Dependencies
Maintainers
1
Versions
102
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

selecto - npm Package Compare versions

Comparing version 1.17.0 to 1.18.0

33

package.json
{
"name": "selecto",
"version": "1.17.0",
"version": "1.18.0",
"description": "Selecto.js is a component that allows you to select elements in the drag area using the mouse or touch.",

@@ -12,18 +12,3 @@ "main": "./dist/selecto.cjs.js",

"build": "rollup -c && npm run declaration && print-sizes ./dist",
"declaration": "rm -rf declaration && tsc -p tsconfig.declaration.json",
"doc": "rm -rf ./doc && jsdoc -c jsdoc.json",
"test": "jest --watchAll",
"coverage": "jest --coverage && print-coveralls --sort=desc",
"prerelease": "npm run build && npm run doc && npm run storybook && prerelease --dirs=dist,doc",
"storybook": "cd storybook/ && npm run build && cd ../",
"release": "npm run build && npm run doc && npm run storybook && release --dirs=dist,doc",
"release:init": "npm run build && npm run doc && npm run storybook && release -i --dirs=dist,doc",
"deploy": "gh-pages -d ./demo --dest=./ --add --remote origin",
"deploy:init": "gh-pages -d ./demo --dest=./ --remote origin",
"packages": "npm run packages:update && npm run packages:build && npm run packages:publish && npm run packages:preact",
"packages:update": "pvu --update=react-selecto,ngx-selecto/projects/ngx-selecto,svelte-selecto,lit-selecto,vue-selecto,vue3-selecto",
"packages:build": "pvu --build=react-selecto,ngx-selecto,svelte-selecto,lit-selecto,vue-selecto,vue3-selecto",
"packages:publish": "pvu --publish=react-selecto,ngx-selecto/dist/ngx-selecto,svelte-selecto,lit-selecto,vue-selecto,vue3-selecto",
"packages:preact": "cd ./packages/react-selecto && npm run packages && cd ../..",
"packages:demo": "npm run build && pvu --path=./ --distUpdate=./storybook --distPaths=declaration,dist"
"declaration": "rm -rf declaration && tsc -p tsconfig.declaration.json"
},

@@ -50,3 +35,3 @@ "keywords": [

"@egjs/children-differ": "^1.0.1",
"@scena/dragscroll": "^1.1.1",
"@scena/dragscroll": "^1.2.1",
"@scena/event-emitter": "^1.0.5",

@@ -56,3 +41,3 @@ "css-styled": "^1.0.0",

"framework-utils": "^1.1.0",
"gesto": "^1.9.0",
"gesto": "^1.11.1",
"keycon": "^1.2.0",

@@ -63,14 +48,8 @@ "overlap-area": "^1.1.0"

"@daybrush/builder": "^0.1.2",
"@daybrush/jsdoc": "^0.4.0",
"@daybrush/release": "^0.2.4",
"@types/jest": "^24.0.13",
"daybrush-jsdoc-template": "^1.6.0",
"jest": "^24.8.0",
"print-coveralls": "^1.2.2",
"print-sizes": "^0.1.0",
"pvu": "^0.6.1",
"ts-jest": "^24.0.2",
"tslint": "^5.20.1",
"typescript": "^3.7.4"
"tslib": "^2.4.0",
"typescript": "^4.5.0"
}
}

5

src/consts.ts

@@ -49,2 +49,5 @@ import styled from "css-styled";

"cspNonce",
"preventClickEventOnDrag",
"preventClickEventOnDragStart",
"preventRightClick",
...PROPERTIES,

@@ -77,2 +80,4 @@ ] as const;

continueSelectWithoutDeselect: Boolean,
preventClickEventOnDragStart: Boolean,
preventClickEventOnDrag: Boolean,
};

@@ -79,0 +84,0 @@

@@ -125,2 +125,17 @@ import { IObject } from "@daybrush/utils";

/**
* Prevent click event on drag. (mousemove, touchmove)
* @default false
*/
preventClickEventOnDrag?: boolean;
/**
* Prevent click event on dragStart. (mousedown, touchstart)
* @default false
*/
preventClickEventOnDragStart?: boolean;
/**
* Whether to prevent dragging of the right mouse button
* @default true
*/
preventRightClick?: boolean;
/**
* Selection Element to apply for framework.

@@ -217,2 +232,4 @@ * @private

distY: number;
isMouseEvent: boolean;
isSecondaryButton: boolean;
isClick?: boolean;

@@ -219,0 +236,0 @@ isDouble?: boolean;

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

import { Hypertext, Rect } from "./types";
import type { Hypertext, Rect } from "./types";
import { IObject, addClass, hasClass, calculateBoundSize } from "@daybrush/utils";

@@ -23,3 +23,3 @@ import { diff } from "@egjs/children-differ";

export function elementFromPoint(clientX: number, clientY: number): HTMLElement | SVGElement | null {
return document?.elementFromPoint(clientX, clientY) as any ?? null;
return (document.elementFromPoint && document.elementFromPoint(clientX, clientY)) as any || null;
}

@@ -26,0 +26,0 @@ export function createElement(

Sorry, the diff of this file is not supported yet

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