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.971fcd47 to 0.2.15-alpha.9ccc437e

23

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.source, scale, target);
}

@@ -63,4 +54,2 @@

console.info('RT => ', resourceTemplate, bodyFields);
fields.forEach(function (field) {

@@ -67,0 +56,0 @@ var template = resourceTemplateReverseTypeLookup(resourceTemplate, field);

@@ -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.source, scale, target);
}

@@ -84,4 +76,2 @@

console.info('RT => ', resourceTemplate, bodyFields);
fields.forEach(function (field) {

@@ -88,0 +78,0 @@ var template = resourceTemplateReverseTypeLookup(resourceTemplate, field);

{
"name": "digirati-annotation-bridge",
"version": "0.2.15-alpha.971fcd47",
"version": "0.2.15-alpha.9ccc437e",
"description": "Describe annotation-bridge here",

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

"dependencies": {
"digirati-annotation-redux": "^0.2.15-alpha.971fcd47"
"digirati-annotation-redux": "^0.2.15-alpha.9ccc437e"
},

@@ -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