New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-scrubber

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-scrubber - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

lib/scrubber.css

10

lib/index.d.ts
import React, { Component } from 'react';
import './scrubber.css';
export declare type ScrubberProps = {
className: string;
className?: string;
value: number;
min: number;
max: number;
bufferPosition: number;
onScrubStart: (value: number) => void;
onScrubEnd: (value: number) => void;
onScrubChange: (value: number) => void;
bufferPosition?: number;
onScrubStart?: (value: number) => void;
onScrubEnd?: (value: number) => void;
onScrubChange?: (value: number) => void;
};

@@ -13,0 +13,0 @@ declare type Nullable<T> = T | null;

@@ -53,3 +53,3 @@ "use strict";

_this.setState({ mouseX: e.pageX }, function () {
if (_this.state.seeking) {
if (_this.state.seeking && _this.props.onScrubChange) {
_this.props.onScrubChange(_this.getPositionFromMouseX());

@@ -63,3 +63,3 @@ }

_this.setState({ touchX: touch.pageX }, function () {
if (_this.state.seeking) {
if (_this.state.seeking && _this.props.onScrubChange) {
_this.props.onScrubChange(_this.getPositionFromMouseX());

@@ -72,3 +72,5 @@ }

_this.setState({ seeking: true, mouseX: e.pageX }, function () {
_this.props.onScrubStart(_this.getPositionFromMouseX());
if (_this.props.onScrubStart) {
_this.props.onScrubStart(_this.getPositionFromMouseX());
}
});

@@ -79,3 +81,5 @@ };

_this.setState({ hover: true, seeking: true, touchId: touch.identifier, touchX: touch.pageX }, function () {
_this.props.onScrubStart(_this.getPositionFromMouseX());
if (_this.props.onScrubStart) {
_this.props.onScrubStart(_this.getPositionFromMouseX());
}
});

@@ -85,3 +89,5 @@ };

if (_this.state.seeking) {
_this.props.onScrubEnd(_this.getPositionFromMouseX());
if (_this.props.onScrubEnd) {
_this.props.onScrubEnd(_this.getPositionFromMouseX());
}
_this.setState({ seeking: false, mouseX: null });

@@ -93,3 +99,5 @@ }

if (touch && _this.state.seeking) {
_this.props.onScrubEnd(_this.getPositionFromMouseX());
if (_this.props.onScrubEnd) {
_this.props.onScrubEnd(_this.getPositionFromMouseX());
}
_this.setState({ hover: false, seeking: false, touchX: null, touchId: null });

@@ -96,0 +104,0 @@ }

{
"name": "react-scrubber",
"version": "0.2.0",
"version": "0.2.1",
"description": "React scrubber component with touch controls, styling, and lots event handlers",

@@ -8,2 +8,3 @@ "main": "./dist/index.js",

"build": "tsc",
"postbuild": "find ./src -name '*.css' -type f -exec cp -P {} ./lib \\;",
"prepublish": "yarn build",

@@ -10,0 +11,0 @@ "test": "echo \"Error: no test specified\" && exit 1"

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

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc