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

digirati-annotation-bridge

Package Overview
Dependencies
Maintainers
1
Versions
164
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

digirati-annotation-bridge - npm Package Compare versions

Comparing version 0.2.15-alpha.e0e82425 to 0.2.15-alpha.efb10bdd

21

es/annotations.js

@@ -5,20 +5,11 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

import AnnotationBody from './annotationBody';
import { AnnotationSelector } from 'digirati-annotation-redux/es/lib/elucidate/index';
var W3C_SELECTOR = /[#&\?]xywh\=(pixel\:|percent\:)?(\d+),(\d+),(\d+),(\d+)/;
export function parseTarget(source) {
/**
* @deprecated
*/
export function parseTarget(target) {
var scale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
var match = W3C_SELECTOR.exec(source);
if (match) {
return {
unit: match[1] === 'percent:' ? 'percent' : 'pixel',
scale: scale,
x: parseInt(match[2], 10) * scale,
y: parseInt(match[3], 10) * scale,
width: parseInt(match[4], 10) * scale,
height: parseInt(match[5], 10) * scale
};
}
return source;
return AnnotationSelector.parse(target, scale, target);
}

@@ -25,0 +16,0 @@

@@ -25,21 +25,13 @@ 'use strict';

var _index = require('digirati-annotation-redux/es/lib/elucidate/index');
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var W3C_SELECTOR = /[#&\?]xywh\=(pixel\:|percent\:)?(\d+),(\d+),(\d+),(\d+)/;
function parseTarget(source) {
/**
* @deprecated
*/
function parseTarget(target) {
var scale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
var match = W3C_SELECTOR.exec(source);
if (match) {
return {
unit: match[1] === 'percent:' ? 'percent' : 'pixel',
scale: scale,
x: parseInt(match[2], 10) * scale,
y: parseInt(match[3], 10) * scale,
width: parseInt(match[4], 10) * scale,
height: parseInt(match[5], 10) * scale
};
}
return source;
return _index.AnnotationSelector.parse(target, scale, target);
}

@@ -46,0 +38,0 @@

{
"name": "digirati-annotation-bridge",
"version": "0.2.15-alpha.e0e82425",
"version": "0.2.15-alpha.efb10bdd",
"description": "Describe annotation-bridge here",

@@ -21,3 +21,3 @@ "main": "lib/index.js",

"dependencies": {
"digirati-annotation-redux": "^0.2.15-alpha.e0e82425"
"digirati-annotation-redux": "^0.2.15-alpha.efb10bdd"
},

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

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