Socket
Socket
Sign inDemoInstall

canvg

Package Overview
Dependencies
6
Maintainers
2
Versions
33
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.0.1 to 4.0.2

2

dist/Canvg.d.ts

@@ -5,3 +5,3 @@ import { RenderingContext2D } from './types';

import { IDocumentOptions, Document } from './Document';
declare type DOMDocument = typeof window.document;
type DOMDocument = typeof window.document;
export interface IOptions extends IParserOptions, IScreenOptions, IScreenStartOptions, IDocumentOptions {

@@ -8,0 +8,0 @@ }

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

/// <reference types="offscreencanvas" />
import { Canvg } from '../Canvg';

@@ -14,7 +13,9 @@ import { IScreenViewBoxConfig, Screen } from '../Screen';

*/
export declare type CreateCanvas = (width: number, height: number) => HTMLCanvasElement | OffscreenCanvas;
export type CreateCanvas = (width: number, height: number) => HTMLCanvasElement | (OffscreenCanvas & {
getContext(contextId: '2d'): OffscreenCanvasRenderingContext2D;
});
/**
* Function to create new image.
*/
export declare type CreateImage = (src: string, anonymousCrossOrigin?: boolean) => Promise<CanvasImageSource>;
export type CreateImage = (src: string, anonymousCrossOrigin?: boolean) => Promise<CanvasImageSource>;
export interface IDocumentOptions {

@@ -42,4 +43,4 @@ /**

}
export declare type IViewBoxConfig = Omit<IScreenViewBoxConfig, 'document'>;
declare type DOMDocument = typeof window.document;
export type IViewBoxConfig = Omit<IScreenViewBoxConfig, 'document'>;
type DOMDocument = typeof window.document;
declare function createCanvas(width: number, height: number): HTMLCanvasElement;

@@ -46,0 +47,0 @@ declare function createImage(src: string, anonymousCrossOrigin?: boolean): Promise<HTMLImageElement>;

@@ -89,5 +89,5 @@ import { Element } from './Element';

};
declare type Elements = typeof elements;
export declare type AnyElement = Elements[keyof Elements];
type Elements = typeof elements;
export type AnyElement = Elements[keyof Elements];
export { Element, UnknownElement, RenderedElement, PathElement, SVGElement, RectElement, CircleElement, EllipseElement, LineElement, PolylineElement, PolygonElement, PatternElement, MarkerElement, DefsElement, GradientElement, LinearGradientElement, RadialGradientElement, StopElement, AnimateElement, AnimateColorElement, AnimateTransformElement, FontElement, FontFaceElement, MissingGlyphElement, GlyphElement, TextElement, TSpanElement, TRefElement, AElement, TextPathElement, ImageElement, GElement, SymbolElement, StyleElement, UseElement, MaskElement, ClipPathElement, FilterElement, FeDropShadowElement, FeMorphologyElement, FeCompositeElement, FeColorMatrixElement, FeGaussianBlurElement, TitleElement, DescElement };
//# sourceMappingURL=elements.d.ts.map
import { Document } from './Document';
import { PathElement } from './PathElement';
export declare type ArabicForm = 'isolated' | 'terminal' | 'medial' | 'initial';
export type ArabicForm = 'isolated' | 'terminal' | 'medial' | 'initial';
export declare class GlyphElement extends PathElement {

@@ -5,0 +5,0 @@ type: string;

@@ -7,3 +7,3 @@ import { RenderingContext2D } from '../types';

import { RenderedElement } from './RenderedElement';
export declare type Marker = [Point, number];
export type Marker = [Point, number];
export declare class PathElement extends RenderedElement {

@@ -10,0 +10,0 @@ type: string;

import { Fetch } from './types';
declare type DOMParserConstructor = typeof DOMParser;
type DOMParserConstructor = typeof DOMParser;
export interface IParserOptions {

@@ -4,0 +4,0 @@ /**

import { SVGCommand, CommandM, CommandL, CommandH, CommandV, CommandZ, CommandQ, CommandT, CommandC, CommandS, CommandA } from 'svg-pathdata/lib/types';
import { SVGPathData } from 'svg-pathdata';
import { Point } from './Point';
export declare type CommandType = SVGCommand['type'];
export declare type Command = {
export type CommandType = SVGCommand['type'];
export type Command = {
type: CommandType;

@@ -7,0 +7,0 @@ } & Omit<CommandM, 'type'> & Omit<CommandL, 'type'> & Omit<CommandH, 'type'> & Omit<CommandV, 'type'> & Omit<CommandZ, 'type'> & Omit<CommandQ, 'type'> & Omit<CommandT, 'type'> & Omit<CommandC, 'type'> & Omit<CommandS, 'type'> & Omit<CommandA, 'type'>;

@@ -12,3 +12,3 @@ import { DOMParser } from './types';

*/
declare type Fetch = (input: any, config?: any) => Promise<any>;
type Fetch = (input: any, config?: any) => Promise<any>;
interface IConfig {

@@ -15,0 +15,0 @@ /**

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

/// <reference types="offscreencanvas" />
import { DOMParser } from './types';

@@ -3,0 +2,0 @@ interface IConfig {

@@ -1,6 +0,5 @@

/// <reference types="offscreencanvas" />
export declare type MatrixValue = readonly [number, number, number, number, number, number];
export declare type VectorValue = readonly [number, number];
export declare type RenderingContext2D = CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D;
export declare type Fetch = typeof fetch;
export type MatrixValue = readonly [number, number, number, number, number, number];
export type VectorValue = readonly [number, number];
export type RenderingContext2D = CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D;
export type Fetch = typeof fetch;
//# sourceMappingURL=types.d.ts.map

@@ -5,3 +5,3 @@ export interface IViewPortSize {

}
export declare type Axis = 'x' | 'y';
export type Axis = 'x' | 'y';
export declare class ViewPort {

@@ -8,0 +8,0 @@ static DEFAULT_VIEWPORT_WIDTH: number;

{
"name": "canvg",
"type": "module",
"version": "4.0.1",
"version": "4.0.2",
"description": "JavaScript SVG parser and renderer on Canvas.",

@@ -47,3 +47,2 @@ "author": "Gabe Lerner",

"dependencies": {
"@types/offscreencanvas": "^2019.6.4",
"@types/raf": "^3.4.0",

@@ -50,0 +49,0 @@ "raf": "^3.4.1",

@@ -16,3 +16,3 @@ # canvg

[build]: https://img.shields.io/github/workflow/status/canvg/canvg/CI.svg
[build]: https://img.shields.io/github/actions/workflow/status/canvg/canvg/ci.yml?branch=master
[build-url]: https://github.com/canvg/canvg/actions

@@ -71,4 +71,2 @@

[![supported by Cube](https://user-images.githubusercontent.com/986756/154330861-d79ab8ec-aacb-4af8-9e17-1b28f1eccb01.svg)](https://cube.dev/?ref=eco-canvg)
## Docs

@@ -75,0 +73,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc