Socket
Socket
Sign inDemoInstall

abstract-image

Package Overview
Dependencies
Maintainers
6
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

abstract-image - npm Package Compare versions

Comparing version 2.0.0 to 2.1.0

1

lib-cjs/exporters/react-svg-export-image.d.ts

@@ -7,4 +7,5 @@ import * as React from "react";

readonly onMouseMove?: MouseCallback;
readonly onContextMenu?: MouseCallback;
}
export declare type MouseCallback = (id: string | undefined, point: AbstractImage.Point) => void;
export declare function createReactSvg(image: AbstractImage.AbstractImage, callbacks?: ReactSvgCallbacks): React.ReactElement<{}>;

9

lib-cjs/exporters/react-svg-export-image.js

@@ -8,6 +8,5 @@ "use strict";

var cb = callbacks || {};
return (React.createElement("div", { onClick: _callback(cb.onClick), onDoubleClick: _callback(cb.onDoubleClick), onMouseMove: _callback(cb.onMouseMove) },
React.createElement("svg", { width: image.size.width + "px", height: image.size.height + "px", viewBox: [0, 0, image.size.width, image.size.height].join(" ") }, R.unnest(R.addIndex(R.map)(
// tslint:disable-next-line:no-any
function (c, i) { return _visit(i.toString(), c); }, image.components)))));
return (React.createElement("svg", { width: image.size.width + "px", height: image.size.height + "px", viewBox: [0, 0, image.size.width, image.size.height].join(" "), onClick: _callback(cb.onClick), onDoubleClick: _callback(cb.onDoubleClick), onMouseMove: _callback(cb.onMouseMove), onContextMenu: _callback(cb.onContextMenu) }, R.unnest(R.addIndex(R.map)(
// tslint:disable-next-line:no-any
function (c, i) { return _visit(i.toString(), c); }, image.components))));
}

@@ -40,3 +39,3 @@ exports.createReactSvg = createReactSvg;

return [
React.createElement("g", { key: key, dangerouslySetInnerHTML: {
React.createElement("g", { key: key, id: component.id, dangerouslySetInnerHTML: {
__html: component.data.reduce(function (a, b) { return a + String.fromCharCode(b); }, "")

@@ -43,0 +42,0 @@ } })

@@ -7,4 +7,5 @@ import * as React from "react";

readonly onMouseMove?: MouseCallback;
readonly onContextMenu?: MouseCallback;
}
export declare type MouseCallback = (id: string | undefined, point: AbstractImage.Point) => void;
export declare function createReactSvg(image: AbstractImage.AbstractImage, callbacks?: ReactSvgCallbacks): React.ReactElement<{}>;

@@ -6,6 +6,5 @@ import * as R from "ramda";

var cb = callbacks || {};
return (React.createElement("div", { onClick: _callback(cb.onClick), onDoubleClick: _callback(cb.onDoubleClick), onMouseMove: _callback(cb.onMouseMove) },
React.createElement("svg", { width: image.size.width + "px", height: image.size.height + "px", viewBox: [0, 0, image.size.width, image.size.height].join(" ") }, R.unnest(R.addIndex(R.map)(
// tslint:disable-next-line:no-any
function (c, i) { return _visit(i.toString(), c); }, image.components)))));
return (React.createElement("svg", { width: image.size.width + "px", height: image.size.height + "px", viewBox: [0, 0, image.size.width, image.size.height].join(" "), onClick: _callback(cb.onClick), onDoubleClick: _callback(cb.onDoubleClick), onMouseMove: _callback(cb.onMouseMove), onContextMenu: _callback(cb.onContextMenu) }, R.unnest(R.addIndex(R.map)(
// tslint:disable-next-line:no-any
function (c, i) { return _visit(i.toString(), c); }, image.components))));
}

@@ -37,3 +36,3 @@ function _callback(callback) {

return [
React.createElement("g", { key: key, dangerouslySetInnerHTML: {
React.createElement("g", { key: key, id: component.id, dangerouslySetInnerHTML: {
__html: component.data.reduce(function (a, b) { return a + String.fromCharCode(b); }, "")

@@ -40,0 +39,0 @@ } })

{
"name": "abstract-image",
"version": "2.0.0",
"version": "2.1.0",
"description": "Dynamically create images using code or JSX and render to any format",

@@ -5,0 +5,0 @@ "repository": "https://github.com/dividab/abstract-visuals/packages/abstract-image",

@@ -0,0 +0,0 @@ # abstract-image

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