Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

canvacord

Package Overview
Dependencies
Maintainers
1
Versions
244
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

canvacord - npm Package Compare versions

Comparing version 6.0.1 to 6.0.2

48

dist/index.d.ts

@@ -76,2 +76,6 @@ import { Font as Font$1, SatoriOptions } from 'satori';

static loadDefault(): Font;
/**
* Unloads the font from the canvas and builder apis.
*/
unloadAll(): void;
}

@@ -126,3 +130,3 @@

type EncodingFormat = "png" | "jpeg" | "webp" | "avif";
type EncodingFormat = "png" | "jpeg" | "webp" | "avif" | "raw";
declare abstract class Encodable {

@@ -866,3 +870,9 @@ /**

}
declare const LeaderboardVariants: {
readonly Default: "default";
readonly Horizontal: "horizontal";
};
type LeaderboardVariants = (typeof LeaderboardVariants)[keyof typeof LeaderboardVariants];
declare class LeaderboardBuilder extends Builder<LeaderboardProps> {
variant?: LeaderboardVariants;
/**

@@ -873,2 +883,7 @@ * Create a new leaderboard ui builder

/**
* Set the ui variant for this leaderboard
* @param variant ui type
*/
setVariant(variant: LeaderboardVariants): this;
/**
* Set background for this leaderboard ui

@@ -905,22 +920,27 @@ * @param background background image

*/
renderPlayers(players: JSX.Element[]): JSX.Element;
renderDefaultPlayers(players: JSX.Element[]): JSX.Element;
/**
* Render top players ui on the canvas
*/
renderTop({ avatar, displayName, level, rank, username, xp, }: LeaderboardProps["players"][number]): Promise<JSX.Element>;
renderDefaultTop({ avatar, displayName, level, rank, username, xp, }: LeaderboardProps["players"][number]): Promise<JSX.Element>;
/**
* Render player ui on the canvas
*/
renderPlayer({ avatar, displayName, level, rank, username, xp, }: LeaderboardProps["players"][number]): Promise<JSX.Element>;
renderDefaultPlayer({ avatar, displayName, level, rank, username, xp, }: LeaderboardProps["players"][number]): Promise<JSX.Element>;
renderDefaultVariant(): Promise<JSX.Element>;
renderHorizontalPlayer({ avatar, displayName, level, rank, username, xp, }: LeaderboardProps["players"][number]): Promise<JSX.Element>;
renderHorizontalVariant(): Promise<JSX.Element>;
}
declare enum RankCardUserStatus {
Online = "online",
Idle = "idle",
DoNotDisturb = "dnd",
Offline = "offline",
Streaming = "streaming",
None = "none"
}
type StatusData = "online" | "idle" | "dnd" | "offline" | "streaming" | "none";
declare const RankCardUserStatus: {
readonly Online: "online";
readonly Idle: "idle";
readonly DoNotDisturb: "dnd";
readonly Offline: "offline";
readonly Streaming: "streaming";
readonly None: "none";
readonly Invisible: "invisible";
};
type RankCardUserStatus = (typeof RankCardUserStatus)[keyof typeof RankCardUserStatus];
type StatusData = RankCardUserStatus;
interface RankCardProps {

@@ -1395,2 +1415,2 @@ handle: string | null;

export { BuildFormat, Builder, BuilderBuildOptions, BuilderOptionsManager, BuilderTemplate, BuiltInGraphemeProvider, CSSPropertiesLike, Canvacord, CanvacordFactory, CanvacordInit, CanvasHelper, CanvasImage, ContextManipulationStep, CustomGenerationStep, DropShadowConfig, Element, ElementInit, EmojiCache, Encodable, EncodingFormat, Font, FontFactory, Fonts, GraphemeProvider, IImageGenerationTemplate, ImageFactory, ImageFilterer, ImageGen, ImageGenerationStep, ImageGenerationTemplate, ImageGeneratorImplementor, ImageManipulator, ImageSource, ImgenStep, JSX$1 as JSX, LeaderboardBuilder, LeaderboardProps, LoadImageOptions, Node, RankCardBuilder, Stylable, StyleSheet, TemplateFactory, TemplateImage, TextGenerationStep, canvacord, createCanvasImage, createEmojiProvider, createImageGenerator, createTemplate, loadImage, performObjectCleanup, render };
export { BuildFormat, Builder, BuilderBuildOptions, BuilderOptionsManager, BuilderTemplate, BuiltInGraphemeProvider, CSSPropertiesLike, Canvacord, CanvacordFactory, CanvacordInit, CanvasHelper, CanvasImage, ContextManipulationStep, CustomGenerationStep, DropShadowConfig, Element, ElementInit, EmojiCache, Encodable, EncodingFormat, Font, FontFactory, Fonts, GraphemeProvider, IImageGenerationTemplate, ImageFactory, ImageFilterer, ImageGen, ImageGenerationStep, ImageGenerationTemplate, ImageGeneratorImplementor, ImageManipulator, ImageSource, ImgenStep, JSX$1 as JSX, LeaderboardBuilder, LeaderboardProps, LeaderboardVariants, LoadImageOptions, Node, RankCardBuilder, Stylable, StyleSheet, TemplateFactory, TemplateImage, TextGenerationStep, canvacord, createCanvasImage, createEmojiProvider, createImageGenerator, createTemplate, loadImage, performObjectCleanup, render };
{
"name": "canvacord",
"description": "Easily generate images using html and css in nodejs. Canvacord is suitable for creating dynamic images such as social media posts, greetings cards, memes, etc. It is also possible to create your own templates and builders to generate images. You are only limited by your imagination.",
"version": "6.0.1",
"version": "6.0.2",
"main": "./dist/index.js",

@@ -14,3 +14,6 @@ "types": "./dist/index.d.ts",

"build": "tsup",
"test": "tsx ./test/index.ts",
"test": "vitest",
"coverage": "vitest --coverage",
"test:main": "tsx ./test/index.ts",
"test:translation": "tsx ./test/cards-translation.ts",
"test:lb": "tsx ./test/leaderboard.ts",

@@ -20,3 +23,4 @@ "test:jsx": "tsx ./test/jsxTest.tsx",

"bench": "cd ./benchmark && node jsx-renderer.mjs",
"lint": "yarn dlx @biomejs/biome lint src"
"lint": "yarn dlx @biomejs/biome lint src",
"prepublishOnly": "yarn build"
},

@@ -48,2 +52,3 @@ "repository": {

"biome": "^0.0.0",
"sharp": "^0.33.2",
"tailwindcss": "^3.3.3",

@@ -53,3 +58,4 @@ "tsconfig": "^0.0.0",

"tsx": "^3.12.7",
"typescript": "^5.1.3"
"typescript": "^5.1.3",
"vitest": "^1.1.3"
},

@@ -56,0 +62,0 @@ "dependencies": {

@@ -12,3 +12,4 @@ [![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://vshymanskyy.github.io/StandWithUkraine)

- 🎨 **Customizable** - You can create your own templates and builders to generate images. Canvacord allows you to define how your image should look using html and css. No more hassle learning complicated canvas api.
- 🚀 **Fast** - Canvacord is powered by highly optimized, battle tested libraries, which makes it fast and reliable.
- � **GIF generation** - Canvacord allows you to generate custom GIFs using the builder api.
- �🚀 **Fast** - Canvacord is powered by highly optimized, battle tested libraries, which makes it fast and reliable.
- 🔒 **Typescript support** - Canvacord is written in typescript and provides type definitions out of the box.

@@ -15,0 +16,0 @@ - 📸 **Wide formats support** - Canvacord supports many image formats such as png, jpeg, webp, gif, svg, etc.

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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