diff --git a/apps/docs/src/data/docs.json b/apps/docs/src/data/docs.json index e38417af..f074edd3 100644 --- a/apps/docs/src/data/docs.json +++ b/apps/docs/src/data/docs.json @@ -1 +1 @@ -{"custom":{},"modules":{"canvacord":{"classes":[{"data":{"name":"Builder","abstract":false,"constructor":{"name":"Builder","description":"Create a new builder.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"width","description":"the width of this builder.","optional":false,"default":null,"type":"number","rawType":["number"]},{"name":"height","description":"the height of this builder.","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"Builder","rawType":["Builder","<","T","S",">"],"description":null},"metadata":{"name":"Builder.tsx","directory":"templates","line":189,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L189"},"constructor":"new Builder"},"metadata":{"name":"Builder.tsx","directory":"templates","line":153,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L153"},"deprecated":false,"description":null,"extends":null,"implements":null,"rawExtends":null,"rawImplements":null,"methods":[{"name":"addComponent","description":"Add component to this builder.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"component","description":"the component to add.","optional":false,"default":null,"type":"T | Array","rawType":["T","Array","<","T",">"]}],"returns":{"type":"Builder","rawType":["Builder","<","T","S",">"],"description":null},"metadata":{"name":"Builder.tsx","directory":"templates","line":274,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L274"}},{"name":"adjustCanvas","description":"Adjust the canvas size.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"Builder","rawType":["Builder","<","T","S",">"],"description":null},"metadata":{"name":"Builder.tsx","directory":"templates","line":246,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L246"}},{"name":"bootstrap","description":"Bootstrap this builder with data.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"data","description":null,"optional":false,"default":null,"type":"T","rawType":["T"]}],"returns":{"type":"void","rawType":["void"],"description":null},"metadata":{"name":"Builder.tsx","directory":"templates","line":239,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L239"}},{"name":"build","description":"Convert this builder into an image.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"options","description":"the build options.","optional":false,"default":null,"type":"O","rawType":["O"]}],"returns":{"type":"Promise>","rawType":["Promise","<","BuilderResult","<","O",">",">"],"description":"the image buffer or svg string."},"metadata":{"name":"Builder.tsx","directory":"templates","line":373,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L373"}},{"name":"flush","description":"Flush the frames.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"void","rawType":["void"],"description":null},"metadata":{"name":"Builder.tsx","directory":"templates","line":420,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L420"}},{"name":"render","description":"Render this builder.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"Promise","rawType":["Promise","<","ReactNode",">"],"description":null},"metadata":{"name":"Builder.tsx","directory":"templates","line":317,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L317"}},{"name":"setGraphemeProvider","description":"Set grapheme image provider for this builder.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"provider","description":null,"optional":false,"default":null,"type":"GraphemeProvider","rawType":["GraphemeProvider"]}],"returns":{"type":"Builder","rawType":["Builder","<","T","S",">"],"description":null},"metadata":{"name":"Builder.tsx","directory":"templates","line":291,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L291"}},{"name":"setIterations","description":"The total number of iterations of this builder.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"iterations","description":null,"optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"Builder","rawType":["Builder","<","T","S",">"],"description":null},"metadata":{"name":"Builder.tsx","directory":"templates","line":196,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L196"}},{"name":"setState","description":"Set the state of this builder. Calling this method will re-render the builder and capture the result as a new frame.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"newState","description":null,"optional":false,"default":null,"type":"S","rawType":["S"]},{"name":"silent","description":null,"optional":false,"default":null,"type":"boolean","rawType":["boolean"]}],"returns":{"type":"void","rawType":["void"],"description":null},"metadata":{"name":"Builder.tsx","directory":"templates","line":227,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L227"}},{"name":"setStyle","description":"Set the style of this builder.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"newStyle","description":"the new style.","optional":false,"default":null,"type":"CSSProperties","rawType":["CSSProperties"]}],"returns":{"type":"Builder","rawType":["Builder","<","T","S",">"],"description":null},"metadata":{"name":"Builder.tsx","directory":"templates","line":300,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L300"}},{"name":"from","description":"Create a builder from builder template.","see":[],"static":true,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"template","description":null,"optional":false,"default":null,"type":"BuilderTemplate","rawType":["BuilderTemplate"]}],"returns":{"type":"Builder, unknown>","rawType":["Builder","<","Record","<","string","unknown",">","unknown",">"],"description":null},"metadata":{"name":"Builder.tsx","directory":"templates","line":430,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L430"}},{"name":"isBuilder","description":null,"see":[],"static":true,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"builder","description":null,"optional":false,"default":null,"type":"unknown","rawType":["unknown"]}],"returns":{"type":"builder is Builder, unknown>","rawType":[" is","Builder","<","Record","<","string","unknown",">","unknown",">"],"description":null},"metadata":{"name":"Builder.tsx","directory":"templates","line":439,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L439"}}],"private":false,"properties":[{"abstract":false,"default":"...","deprecated":false,"description":"The components of this builder.","metadata":{"name":"Builder.tsx","directory":"templates","line":173,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L173"},"name":"components","private":false,"readonly":false,"see":[],"static":false,"type":"Array"},{"abstract":false,"default":"BuiltInGraphemeProvider.Twemoji","deprecated":false,"description":"The grapheme provider of this builder.","metadata":{"name":"Builder.tsx","directory":"templates","line":182,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L182"},"name":"graphemeProvider","private":false,"readonly":false,"see":[],"static":false,"type":"GraphemeProvider"},{"abstract":false,"default":null,"deprecated":false,"description":"the height of this builder.","metadata":{"name":"Builder.tsx","directory":"templates","line":189,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L189"},"name":"height","private":false,"readonly":false,"see":[],"static":false,"type":"number"},{"abstract":false,"default":"...","deprecated":false,"description":"The options manager of this builder.","metadata":{"name":"Builder.tsx","directory":"templates","line":177,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L177"},"name":"options","private":false,"readonly":false,"see":[],"static":false,"type":"BuilderOptionsManager"},{"abstract":false,"default":"\"\"","deprecated":false,"description":"The tailwind subset to apply to this builder.","metadata":{"name":"Builder.tsx","directory":"templates","line":169,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L169"},"name":"tw","private":false,"readonly":false,"see":[],"static":false,"type":"string"},{"abstract":false,"default":null,"deprecated":false,"description":"the width of this builder.","metadata":{"name":"Builder.tsx","directory":"templates","line":189,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L189"},"name":"width","private":false,"readonly":false,"see":[],"static":false,"type":"number"},{"default":null,"description":"The state of this builder.","metadata":{"name":"Builder.tsx","directory":"templates","line":213,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L213"},"name":"state","type":"S"},{"default":null,"description":"Get the style of this builder.","metadata":{"name":"Builder.tsx","directory":"templates","line":259,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L259"},"name":"style","type":"CSSProperties"}],"see":[]},"markdown":[]},{"data":{"name":"BuilderOptionsManager","abstract":false,"constructor":{"name":"BuilderOptionsManager","description":"Creates a new builder options manager.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"options","description":"The options to use","optional":false,"default":null,"type":"T","rawType":["T"]}],"returns":{"type":"BuilderOptionsManager","rawType":["BuilderOptionsManager","<","T",">"],"description":null},"metadata":{"name":"BuilderOptionsManager.ts","directory":"templates","line":7,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/BuilderOptionsManager.ts#L7"},"constructor":"new BuilderOptionsManager"},"metadata":{"name":"BuilderOptionsManager.ts","directory":"templates","line":2,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/BuilderOptionsManager.ts#L2"},"deprecated":false,"description":null,"extends":null,"implements":null,"rawExtends":null,"rawImplements":null,"methods":[{"name":"get","description":"Get an option by name.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"key","description":"The option name","optional":false,"default":null,"type":"K","rawType":["K"]}],"returns":{"type":"T[K]","rawType":["T","[","K","]"],"description":"The option value"},"metadata":{"name":"BuilderOptionsManager.ts","directory":"templates","line":29,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/BuilderOptionsManager.ts#L29"}},{"name":"getOptions","description":"Returns the options.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"T","rawType":["T"],"description":null},"metadata":{"name":"BuilderOptionsManager.ts","directory":"templates","line":12,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/BuilderOptionsManager.ts#L12"}},{"name":"merge","description":"Merge new data to old data on an option by name.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"key","description":null,"optional":false,"default":null,"type":"K","rawType":["K"]},{"name":"value","description":null,"optional":false,"default":null,"type":"Partial","rawType":["Partial","<","T","[","K","]",">"]}],"returns":{"type":"void","rawType":["void"],"description":null},"metadata":{"name":"BuilderOptionsManager.ts","directory":"templates","line":45,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/BuilderOptionsManager.ts#L45"}},{"name":"set","description":"Set an option by name.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"key","description":"The option name","optional":false,"default":null,"type":"K","rawType":["K"]},{"name":"value","description":"The option value","optional":false,"default":null,"type":"T[K]","rawType":["T","[","K","]"]}],"returns":{"type":"void","rawType":["void"],"description":null},"metadata":{"name":"BuilderOptionsManager.ts","directory":"templates","line":38,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/BuilderOptionsManager.ts#L38"}},{"name":"setOptions","description":"Sets the options. This will override the previous options.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"options","description":"The options to use","optional":false,"default":null,"type":"T","rawType":["T"]}],"returns":{"type":"void","rawType":["void"],"description":null},"metadata":{"name":"BuilderOptionsManager.ts","directory":"templates","line":20,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/BuilderOptionsManager.ts#L20"}}],"private":false,"properties":[],"see":[]},"markdown":[]},{"data":{"name":"CanvasHelper","abstract":true,"constructor":{"name":"CanvasHelper","description":"Creates a new CanvasHelper instance.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"width","description":"The width of the canvas","optional":false,"default":null,"type":"number","rawType":["number"]},{"name":"height","description":"The height of the canvas","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"CanvasHelper","rawType":["CanvasHelper"],"description":null},"metadata":{"name":"CanvasHelper.ts","directory":"canvas","line":17,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/CanvasHelper.ts#L17"},"constructor":"new CanvasHelper"},"metadata":{"name":"CanvasHelper.ts","directory":"canvas","line":5,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/CanvasHelper.ts#L5"},"deprecated":false,"description":null,"extends":"Encodable","implements":null,"rawExtends":["Encodable"],"rawImplements":null,"methods":[{"name":"encode","description":"Encodes the canvas to a buffer.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"Promise","rawType":["Promise","<","Buffer",">"],"description":null},"metadata":{"name":"Encodable.ts","directory":"canvas","line":14,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/Encodable.ts#L14"}},{"name":"getFinalCanvas","description":"Returns the canvas instance by applying the steps.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"Promise","rawType":["Promise","<","Canvas",">"],"description":null},"metadata":{"name":"CanvasHelper.ts","directory":"canvas","line":24,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/CanvasHelper.ts#L24"}},{"name":"process","description":"Processes the steps and applies them to the canvas.","see":[],"static":false,"private":false,"examples":[],"abstract":true,"deprecated":false,"parameters":[{"name":"canvas","description":null,"optional":false,"default":null,"type":"Canvas","rawType":["Canvas"]},{"name":"ctx","description":null,"optional":false,"default":null,"type":"SKRSContext2D","rawType":["SKRSContext2D"]}],"returns":{"type":"Promise","rawType":["Promise","<","void",">"],"description":null},"metadata":{"name":"CanvasHelper.ts","directory":"canvas","line":36,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/CanvasHelper.ts#L36"}}],"private":false,"properties":[{"abstract":false,"default":null,"deprecated":false,"description":"The height of the canvas","metadata":{"name":"CanvasHelper.ts","directory":"canvas","line":17,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/CanvasHelper.ts#L17"},"name":"height","private":false,"readonly":false,"see":[],"static":false,"type":"number"},{"abstract":false,"default":"[]","deprecated":false,"description":"The steps to apply to the canvas.","metadata":{"name":"CanvasHelper.ts","directory":"canvas","line":9,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/CanvasHelper.ts#L9"},"name":"steps","private":false,"readonly":false,"see":[],"static":false,"type":"Array"},{"abstract":false,"default":null,"deprecated":false,"description":"The width of the canvas","metadata":{"name":"CanvasHelper.ts","directory":"canvas","line":17,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/CanvasHelper.ts#L17"},"name":"width","private":false,"readonly":false,"see":[],"static":false,"type":"number"}],"see":[]},"markdown":[]},{"data":{"name":"CanvasImage","abstract":false,"constructor":{"name":"CanvasImage","description":"Creates a new CanvasImage instance.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"source","description":"The image source","optional":false,"default":null,"type":"ImageSource","rawType":["ImageSource"]},{"name":"width","description":"The width of the image","optional":true,"default":null,"type":"number","rawType":["number"]},{"name":"height","description":"The height of the image","optional":true,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"CanvasImage","rawType":["CanvasImage"],"description":null},"metadata":{"name":"CanvasImage.ts","directory":"canvas","line":15,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/CanvasImage.ts#L15"},"constructor":"new CanvasImage"},"metadata":{"name":"CanvasImage.ts","directory":"canvas","line":6,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/CanvasImage.ts#L6"},"deprecated":false,"description":null,"extends":"ImageFilterer","implements":null,"rawExtends":["ImageFilterer"],"rawImplements":null,"methods":[{"name":"blur","description":"Applies blur filter to the image.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"value","description":"The filter intensity","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"CanvasImage","rawType":["CanvasImage"],"description":null},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":109,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageFilterer.ts#L109"}},{"name":"brightness","description":"Applies brightness filter to the image.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"value","description":"The filter intensity","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"CanvasImage","rawType":["CanvasImage"],"description":null},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":99,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageFilterer.ts#L99"}},{"name":"circle","description":"Draws the image to the canvas with a circle clip.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"width","description":"The width of the image","optional":true,"default":null,"type":"number","rawType":["number"]},{"name":"height","description":"The height of the image","optional":true,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"CanvasImage","rawType":["CanvasImage"],"description":null},"metadata":{"name":"CanvasImage.ts","directory":"canvas","line":54,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/CanvasImage.ts#L54"}},{"name":"contrast","description":"Applies contrast filter to the image.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"value","description":"The filter intensity","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"CanvasImage","rawType":["CanvasImage"],"description":null},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":89,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageFilterer.ts#L89"}},{"name":"draw","description":"Draws the image to the canvas.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"x","description":"The x position to draw the image","optional":false,"default":null,"type":"number","rawType":["number"]},{"name":"y","description":"The y position to draw the image","optional":false,"default":null,"type":"number","rawType":["number"]},{"name":"width","description":"The width of the image","optional":true,"default":null,"type":"number","rawType":["number"]},{"name":"height","description":"The height of the image","optional":true,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"CanvasImage","rawType":["CanvasImage"],"description":null},"metadata":{"name":"CanvasImage.ts","directory":"canvas","line":34,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/CanvasImage.ts#L34"}},{"name":"drawImage","description":"Draws the image to the canvas.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"image","description":"The image to draw","optional":false,"default":null,"type":"ImageSource","rawType":["ImageSource"]},{"name":"x","description":"The x position to draw the image","optional":false,"default":null,"type":"number","rawType":["number"]},{"name":"y","description":"The y position to draw the image","optional":false,"default":null,"type":"number","rawType":["number"]},{"name":"width","description":"The width of the image","optional":true,"default":null,"type":"number","rawType":["number"]},{"name":"height","description":"The height of the image","optional":true,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"CanvasImage","rawType":["CanvasImage"],"description":null},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":17,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageFilterer.ts#L17"}},{"name":"dropShadow","description":"Applies drop-shadow filter to the image.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"config","description":"The drop-shadow config","optional":false,"default":null,"type":"DropShadowConfig","rawType":["DropShadowConfig"]}],"returns":{"type":"CanvasImage","rawType":["CanvasImage"],"description":null},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":123,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageFilterer.ts#L123"}},{"name":"encode","description":"Encodes the canvas to a buffer.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"Promise","rawType":["Promise","<","Buffer",">"],"description":null},"metadata":{"name":"Encodable.ts","directory":"canvas","line":14,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/Encodable.ts#L14"}},{"name":"getFinalCanvas","description":"Returns the canvas instance by applying the steps.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"Promise","rawType":["Promise","<","Canvas",">"],"description":null},"metadata":{"name":"CanvasImage.ts","directory":"canvas","line":122,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/CanvasImage.ts#L122"}},{"name":"grayscale","description":"Applies grayscale filter to the image.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"value","description":"The filter intensity","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"CanvasImage","rawType":["CanvasImage"],"description":null},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":40,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageFilterer.ts#L40"}},{"name":"hueRotate","description":"Applies hue-rotate filter to the image.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"value","description":"The degrees to rotate","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"CanvasImage","rawType":["CanvasImage"],"description":null},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":79,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageFilterer.ts#L79"}},{"name":"invert","description":"Applies invert filter to the image.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"value","description":"The filter intensity","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"CanvasImage","rawType":["CanvasImage"],"description":null},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":30,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageFilterer.ts#L30"}},{"name":"opacity","description":"Applies opacity filter to the image.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"value","description":"The filter intensity","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"CanvasImage","rawType":["CanvasImage"],"description":null},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":59,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageFilterer.ts#L59"}},{"name":"pixelate","description":"Draws pixelated image to the canvas.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"pixels","description":"The amount of pixels to use","optional":true,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"CanvasImage","rawType":["CanvasImage"],"description":null},"metadata":{"name":"CanvasImage.ts","directory":"canvas","line":75,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/CanvasImage.ts#L75"}},{"name":"process","description":"Renders the applied filters to the canvas.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"canvas","description":"The canvas to render the filters to","optional":false,"default":null,"type":"Canvas","rawType":["Canvas"]},{"name":"ctx","description":"The canvas context","optional":false,"default":null,"type":"SKRSContext2D","rawType":["SKRSContext2D"]}],"returns":{"type":"Promise","rawType":["Promise","<","void",">"],"description":null},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":135,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageFilterer.ts#L135"}},{"name":"restore","description":"Restores the last saved canvas context state.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"CanvasImage","rawType":["CanvasImage"],"description":null},"metadata":{"name":"CanvasImage.ts","directory":"canvas","line":111,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/CanvasImage.ts#L111"}},{"name":"saturate","description":"Applies saturate filter to the image.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"value","description":"The filter intensity","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"CanvasImage","rawType":["CanvasImage"],"description":null},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":69,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageFilterer.ts#L69"}},{"name":"save","description":"Saves the canvas context state.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"CanvasImage","rawType":["CanvasImage"],"description":null},"metadata":{"name":"CanvasImage.ts","directory":"canvas","line":100,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/CanvasImage.ts#L100"}},{"name":"sepia","description":"Applies sepia filter to the image.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"value","description":"The filter intensity","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"CanvasImage","rawType":["CanvasImage"],"description":null},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":49,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageFilterer.ts#L49"}}],"private":false,"properties":[{"abstract":false,"default":null,"deprecated":false,"description":"The height of the canvas","metadata":{"name":"CanvasHelper.ts","directory":"canvas","line":17,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/CanvasHelper.ts#L17"},"name":"height","private":false,"readonly":false,"see":[],"static":false,"type":"number"},{"abstract":false,"default":null,"deprecated":false,"description":"The image source","metadata":{"name":"CanvasImage.ts","directory":"canvas","line":15,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/CanvasImage.ts#L15"},"name":"source","private":false,"readonly":false,"see":[],"static":false,"type":"ImageSource"},{"abstract":false,"default":"[]","deprecated":false,"description":"The steps to apply to the canvas.","metadata":{"name":"CanvasHelper.ts","directory":"canvas","line":9,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/CanvasHelper.ts#L9"},"name":"steps","private":false,"readonly":false,"see":[],"static":false,"type":"Array"},{"abstract":false,"default":null,"deprecated":false,"description":"The width of the canvas","metadata":{"name":"CanvasHelper.ts","directory":"canvas","line":17,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/CanvasHelper.ts#L17"},"name":"width","private":false,"readonly":false,"see":[],"static":false,"type":"number"}],"see":[]},"markdown":[]},{"data":{"name":"Element","abstract":false,"constructor":{"name":"Element","description":"Creates a new JSX element.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"_init","description":"The initialization options","optional":false,"default":null,"type":"ElementInit","rawType":["ElementInit"]}],"returns":{"type":"Element","rawType":["Element"],"description":null},"metadata":{"name":"jsx.ts","directory":"helpers","line":46,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/helpers/jsx.ts#L46"},"constructor":"new Element"},"metadata":{"name":"jsx.ts","directory":"helpers","line":23,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/helpers/jsx.ts#L23"},"deprecated":false,"description":"The JSX element.","extends":null,"implements":null,"rawExtends":null,"rawImplements":null,"methods":[],"private":false,"properties":[{"abstract":false,"default":null,"deprecated":false,"description":"The children of the element.","metadata":{"name":"jsx.ts","directory":"helpers","line":40,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/helpers/jsx.ts#L40"},"name":"children","private":false,"readonly":false,"see":[],"static":false,"type":"any"},{"abstract":false,"default":null,"deprecated":false,"description":"The key of the element.","metadata":{"name":"jsx.ts","directory":"helpers","line":35,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/helpers/jsx.ts#L35"},"name":"key","private":false,"readonly":false,"see":[],"static":false,"type":"null | Key"},{"abstract":false,"default":null,"deprecated":false,"description":"The props of the element.","metadata":{"name":"jsx.ts","directory":"helpers","line":31,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/helpers/jsx.ts#L31"},"name":"props","private":false,"readonly":false,"see":[],"static":false,"type":"Record"},{"abstract":false,"default":null,"deprecated":false,"description":"The type of the element.","metadata":{"name":"jsx.ts","directory":"helpers","line":27,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/helpers/jsx.ts#L27"},"name":"type","private":false,"readonly":false,"see":[],"static":false,"type":"string"}],"see":[]},"markdown":[]},{"data":{"name":"Encodable","abstract":true,"constructor":{"name":"Encodable","description":null,"see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"Encodable","rawType":["Encodable"],"description":null},"metadata":null,"constructor":"new Encodable"},"metadata":{"name":"Encodable.ts","directory":"canvas","line":5,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/Encodable.ts#L5"},"deprecated":false,"description":null,"extends":null,"implements":null,"rawExtends":null,"rawImplements":null,"methods":[{"name":"encode","description":"Encodes the canvas to a buffer.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"Promise","rawType":["Promise","<","Buffer",">"],"description":null},"metadata":{"name":"Encodable.ts","directory":"canvas","line":14,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/Encodable.ts#L14"}},{"name":"getFinalCanvas","description":"Returns the canvas instance by applying the steps.","see":[],"static":false,"private":false,"examples":[],"abstract":true,"deprecated":false,"parameters":[],"returns":{"type":"Promise","rawType":["Promise","<","Canvas",">"],"description":null},"metadata":{"name":"Encodable.ts","directory":"canvas","line":9,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/Encodable.ts#L9"}}],"private":false,"properties":[],"see":[]},"markdown":[]},{"data":{"name":"Font","abstract":false,"constructor":{"name":"Font","description":"Creates and registers a new Font instance for both canvas and builder apis.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"data","description":"The font data","optional":false,"default":null,"type":"Buffer","rawType":["Buffer"]},{"name":"alias","description":"The font alias. If not provided, a random UUID will be used.\n\nconst data = await readFile('path/to/font.ttf');\nconst font = new Font(data, 'my-font');","optional":true,"default":null,"type":"string","rawType":["string"]}],"returns":{"type":"Font","rawType":["Font"],"description":null},"metadata":{"name":"Font.ts","directory":"assets","line":23,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/assets/Font.ts#L23"},"constructor":"new Font"},"metadata":{"name":"Font.ts","directory":"assets","line":13,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/assets/Font.ts#L13"},"deprecated":false,"description":null,"extends":null,"implements":null,"rawExtends":null,"rawImplements":null,"methods":[{"name":"getData","description":"Returns the font data that includes information such as the font name, weight, data, and style.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"FontOptions","rawType":["FontOptions"],"description":null},"metadata":{"name":"Font.ts","directory":"assets","line":38,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/assets/Font.ts#L38"}},{"name":"toJSON","description":"JSON representation of this font.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"FontOptions","rawType":["FontOptions"],"description":null},"metadata":{"name":"Font.ts","directory":"assets","line":57,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/assets/Font.ts#L57"}},{"name":"toString","description":"String representation of this font.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"string","rawType":["string"],"description":null},"metadata":{"name":"Font.ts","directory":"assets","line":50,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/assets/Font.ts#L50"}},{"name":"fromBuffer","description":"Creates a new Font instance from a buffer.","see":[],"static":true,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"buffer","description":"The buffer containing the font data","optional":false,"default":null,"type":"Buffer","rawType":["Buffer"]},{"name":"alias","description":"The font alias. If not provided, a random UUID will be used.\n\nconst buffer = await readFile('path/to/font.ttf');\nconst font = Font.fromBuffer(buffer, 'my-font');","optional":true,"default":null,"type":"string","rawType":["string"]}],"returns":{"type":"Font","rawType":["Font"],"description":null},"metadata":{"name":"Font.ts","directory":"assets","line":95,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/assets/Font.ts#L95"}},{"name":"fromFile","description":"Creates a new Font instance from a file.","see":[],"static":true,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"path","description":"The path to the font file","optional":false,"default":null,"type":"string","rawType":["string"]},{"name":"alias","description":"The font alias. If not provided, a random UUID will be used.\n\nconst font = await Font.fromFile('path/to/font.ttf', 'my-font');","optional":true,"default":null,"type":"string","rawType":["string"]}],"returns":{"type":"Promise","rawType":["Promise","<","Font",">"],"description":null},"metadata":{"name":"Font.ts","directory":"assets","line":69,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/assets/Font.ts#L69"}},{"name":"fromFileSync","description":"Creates a new Font instance from a file synchronously.","see":[],"static":true,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"path","description":"The path to the font file","optional":false,"default":null,"type":"string","rawType":["string"]},{"name":"alias","description":"The font alias. If not provided, a random UUID will be used.\n\nconst font = Font.fromFileSync('path/to/font.ttf', 'my-font');","optional":true,"default":null,"type":"string","rawType":["string"]}],"returns":{"type":"Font","rawType":["Font"],"description":null},"metadata":{"name":"Font.ts","directory":"assets","line":81,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/assets/Font.ts#L81"}},{"name":"loadDefault","description":"Loads the default font bundled with this package.\n\nconst font = Font.loadDefault();","see":[],"static":true,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"Font","rawType":["Font"],"description":null},"metadata":{"name":"Font.ts","directory":"assets","line":105,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/assets/Font.ts#L105"}}],"private":false,"properties":[{"abstract":false,"default":"...","deprecated":false,"description":"The font alias. If not provided, a random UUID will be used.\n\nconst data = await readFile('path/to/font.ttf');\nconst font = new Font(data, 'my-font');","metadata":{"name":"Font.ts","directory":"assets","line":23,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/assets/Font.ts#L23"},"name":"alias","private":false,"readonly":false,"see":[],"static":false,"type":"string"},{"abstract":false,"default":null,"deprecated":false,"description":"The font data","metadata":{"name":"Font.ts","directory":"assets","line":23,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/assets/Font.ts#L23"},"name":"data","private":false,"readonly":false,"see":[],"static":false,"type":"Buffer"},{"default":null,"description":"The alias for this font.","metadata":{"name":"Font.ts","directory":"assets","line":31,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/assets/Font.ts#L31"},"name":"name","type":"string"}],"see":[]},"markdown":[]},{"data":{"name":"ImageFilterer","abstract":false,"constructor":{"name":"ImageFilterer","description":"Creates a new CanvasHelper instance.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"width","description":"The width of the canvas","optional":false,"default":null,"type":"number","rawType":["number"]},{"name":"height","description":"The height of the canvas","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"ImageFilterer","rawType":["ImageFilterer"],"description":null},"metadata":{"name":"CanvasHelper.ts","directory":"canvas","line":17,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/CanvasHelper.ts#L17"},"constructor":"new ImageFilterer"},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":6,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageFilterer.ts#L6"},"deprecated":false,"description":null,"extends":"CanvasHelper","implements":null,"rawExtends":["CanvasHelper"],"rawImplements":null,"methods":[{"name":"blur","description":"Applies blur filter to the image.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"value","description":"The filter intensity","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"ImageFilterer","rawType":["ImageFilterer"],"description":null},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":109,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageFilterer.ts#L109"}},{"name":"brightness","description":"Applies brightness filter to the image.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"value","description":"The filter intensity","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"ImageFilterer","rawType":["ImageFilterer"],"description":null},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":99,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageFilterer.ts#L99"}},{"name":"contrast","description":"Applies contrast filter to the image.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"value","description":"The filter intensity","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"ImageFilterer","rawType":["ImageFilterer"],"description":null},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":89,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageFilterer.ts#L89"}},{"name":"drawImage","description":"Draws the image to the canvas.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"image","description":"The image to draw","optional":false,"default":null,"type":"ImageSource","rawType":["ImageSource"]},{"name":"x","description":"The x position to draw the image","optional":false,"default":null,"type":"number","rawType":["number"]},{"name":"y","description":"The y position to draw the image","optional":false,"default":null,"type":"number","rawType":["number"]},{"name":"width","description":"The width of the image","optional":true,"default":null,"type":"number","rawType":["number"]},{"name":"height","description":"The height of the image","optional":true,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"ImageFilterer","rawType":["ImageFilterer"],"description":null},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":17,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageFilterer.ts#L17"}},{"name":"dropShadow","description":"Applies drop-shadow filter to the image.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"config","description":"The drop-shadow config","optional":false,"default":null,"type":"DropShadowConfig","rawType":["DropShadowConfig"]}],"returns":{"type":"ImageFilterer","rawType":["ImageFilterer"],"description":null},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":123,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageFilterer.ts#L123"}},{"name":"encode","description":"Encodes the canvas to a buffer.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"Promise","rawType":["Promise","<","Buffer",">"],"description":null},"metadata":{"name":"Encodable.ts","directory":"canvas","line":14,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/Encodable.ts#L14"}},{"name":"getFinalCanvas","description":"Returns the canvas instance by applying the steps.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"Promise","rawType":["Promise","<","Canvas",">"],"description":null},"metadata":{"name":"CanvasHelper.ts","directory":"canvas","line":24,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/CanvasHelper.ts#L24"}},{"name":"grayscale","description":"Applies grayscale filter to the image.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"value","description":"The filter intensity","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"ImageFilterer","rawType":["ImageFilterer"],"description":null},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":40,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageFilterer.ts#L40"}},{"name":"hueRotate","description":"Applies hue-rotate filter to the image.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"value","description":"The degrees to rotate","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"ImageFilterer","rawType":["ImageFilterer"],"description":null},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":79,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageFilterer.ts#L79"}},{"name":"invert","description":"Applies invert filter to the image.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"value","description":"The filter intensity","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"ImageFilterer","rawType":["ImageFilterer"],"description":null},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":30,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageFilterer.ts#L30"}},{"name":"opacity","description":"Applies opacity filter to the image.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"value","description":"The filter intensity","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"ImageFilterer","rawType":["ImageFilterer"],"description":null},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":59,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageFilterer.ts#L59"}},{"name":"process","description":"Renders the applied filters to the canvas.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"canvas","description":"The canvas to render the filters to","optional":false,"default":null,"type":"Canvas","rawType":["Canvas"]},{"name":"ctx","description":"The canvas context","optional":false,"default":null,"type":"SKRSContext2D","rawType":["SKRSContext2D"]}],"returns":{"type":"Promise","rawType":["Promise","<","void",">"],"description":null},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":135,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageFilterer.ts#L135"}},{"name":"saturate","description":"Applies saturate filter to the image.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"value","description":"The filter intensity","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"ImageFilterer","rawType":["ImageFilterer"],"description":null},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":69,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageFilterer.ts#L69"}},{"name":"sepia","description":"Applies sepia filter to the image.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"value","description":"The filter intensity","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"ImageFilterer","rawType":["ImageFilterer"],"description":null},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":49,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageFilterer.ts#L49"}}],"private":false,"properties":[{"abstract":false,"default":null,"deprecated":false,"description":"The height of the canvas","metadata":{"name":"CanvasHelper.ts","directory":"canvas","line":17,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/CanvasHelper.ts#L17"},"name":"height","private":false,"readonly":false,"see":[],"static":false,"type":"number"},{"abstract":false,"default":"[]","deprecated":false,"description":"The steps to apply to the canvas.","metadata":{"name":"CanvasHelper.ts","directory":"canvas","line":9,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/CanvasHelper.ts#L9"},"name":"steps","private":false,"readonly":false,"see":[],"static":false,"type":"Array"},{"abstract":false,"default":null,"deprecated":false,"description":"The width of the canvas","metadata":{"name":"CanvasHelper.ts","directory":"canvas","line":17,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/CanvasHelper.ts#L17"},"name":"width","private":false,"readonly":false,"see":[],"static":false,"type":"number"}],"see":[]},"markdown":[]},{"data":{"name":"ImageGen","abstract":false,"constructor":{"name":"ImageGen","description":"Creates a new ImageGen instance.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"template","description":"The template to use","optional":false,"default":null,"type":"ImageGenerationTemplate","rawType":["ImageGenerationTemplate"]}],"returns":{"type":"ImageGen","rawType":["ImageGen"],"description":null},"metadata":{"name":"ImageGen.ts","directory":"canvas","line":279,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageGen.ts#L279"},"constructor":"new ImageGen"},"metadata":{"name":"ImageGen.ts","directory":"canvas","line":273,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageGen.ts#L273"},"deprecated":false,"description":null,"extends":"Encodable","implements":null,"rawExtends":["Encodable"],"rawImplements":null,"methods":[{"name":"addStep","description":"Adds a step to the template.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"step","description":"The step to add","optional":false,"default":null,"type":"ImageGenerationStep","rawType":["ImageGenerationStep"]}],"returns":{"type":"ImageGen","rawType":["ImageGen"],"description":null},"metadata":{"name":"ImageGen.ts","directory":"canvas","line":287,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageGen.ts#L287"}},{"name":"addSteps","description":"Adds steps to the template.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"steps","description":"The steps to add","optional":false,"default":null,"type":"Array","rawType":["Array","<","ImageGenerationStep",">"]}],"returns":{"type":"ImageGen","rawType":["ImageGen"],"description":null},"metadata":{"name":"ImageGen.ts","directory":"canvas","line":296,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageGen.ts#L296"}},{"name":"encode","description":"Encodes the canvas to a buffer.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"Promise","rawType":["Promise","<","Buffer",">"],"description":null},"metadata":{"name":"Encodable.ts","directory":"canvas","line":14,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/Encodable.ts#L14"}},{"name":"generateGif","description":"Generates a readable stream containing GIF data by applying the steps.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"Promise","rawType":["Promise","<","Readable",">"],"description":null},"metadata":{"name":"ImageGen.ts","directory":"canvas","line":338,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageGen.ts#L338"}},{"name":"getFinalCanvas","description":"Returns the canvas instance by applying the steps.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"Promise","rawType":["Promise","<","Canvas",">"],"description":null},"metadata":{"name":"ImageGen.ts","directory":"canvas","line":392,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageGen.ts#L392"}},{"name":"isGif","description":"Returns whether the template is a gif.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"boolean","rawType":["boolean"],"description":null},"metadata":{"name":"ImageGen.ts","directory":"canvas","line":313,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageGen.ts#L313"}},{"name":"render","description":"Renders the image by applying the steps.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"Promise","rawType":["Promise","<","ImageGen",">"],"description":null},"metadata":{"name":"ImageGen.ts","directory":"canvas","line":375,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageGen.ts#L375"}},{"name":"setGifOptions","description":"Sets the gif options.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"options","description":"The gif options","optional":true,"default":null,"type":"EncoderOptions","rawType":["EncoderOptions"]}],"returns":{"type":"ImageGen","rawType":["ImageGen"],"description":null},"metadata":{"name":"ImageGen.ts","directory":"canvas","line":305,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageGen.ts#L305"}}],"private":false,"properties":[{"abstract":false,"default":null,"deprecated":false,"description":"The template to use","metadata":{"name":"ImageGen.ts","directory":"canvas","line":279,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageGen.ts#L279"},"name":"template","private":false,"readonly":false,"see":[],"static":false,"type":"ImageGenerationTemplate"}],"see":[]},"markdown":[]},{"data":{"name":"ImageGenerationTemplate","abstract":false,"constructor":{"name":"ImageGenerationTemplate","description":"Creates a new ImageGenerationTemplate instance.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"width","description":"The width of the template","optional":true,"default":null,"type":"number","rawType":["number"]},{"name":"height","description":"The height of the template","optional":true,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"ImageGenerationTemplate","rawType":["ImageGenerationTemplate"],"description":null},"metadata":{"name":"ImageGen.ts","directory":"canvas","line":186,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageGen.ts#L186"},"constructor":"new ImageGenerationTemplate"},"metadata":{"name":"ImageGen.ts","directory":"canvas","line":160,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageGen.ts#L160"},"deprecated":false,"description":"The template to use for image generation.","extends":null,"implements":"IImageGenerationTemplate","rawExtends":null,"rawImplements":["IImageGenerationTemplate"],"methods":[{"name":"addStep","description":"Adds a step to the template.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"step","description":"The step to add","optional":false,"default":null,"type":"ImageGenerationStep","rawType":["ImageGenerationStep"]}],"returns":{"type":"ImageGenerationTemplate","rawType":["ImageGenerationTemplate"],"description":null},"metadata":{"name":"ImageGen.ts","directory":"canvas","line":217,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageGen.ts#L217"}},{"name":"addSteps","description":"Adds steps to the template.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"steps","description":"The steps to add","optional":false,"default":null,"type":"Array","rawType":["Array","<","ImageGenerationStep",">"]}],"returns":{"type":"ImageGenerationTemplate","rawType":["ImageGenerationTemplate"],"description":null},"metadata":{"name":"ImageGen.ts","directory":"canvas","line":226,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageGen.ts#L226"}},{"name":"clearSteps","description":"Clears the steps.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"ImageGenerationTemplate","rawType":["ImageGenerationTemplate"],"description":null},"metadata":{"name":"ImageGen.ts","directory":"canvas","line":234,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageGen.ts#L234"}},{"name":"getHeight","description":"Returns the height of the template.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"undefined | number","rawType":["undefined","number"],"description":null},"metadata":{"name":"ImageGen.ts","directory":"canvas","line":256,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageGen.ts#L256"}},{"name":"getWidth","description":"Returns the width of the template.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"undefined | number","rawType":["undefined","number"],"description":null},"metadata":{"name":"ImageGen.ts","directory":"canvas","line":249,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageGen.ts#L249"}},{"name":"isGif","description":"Returns whether the template is a gif.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"boolean","rawType":["boolean"],"description":null},"metadata":{"name":"ImageGen.ts","directory":"canvas","line":209,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageGen.ts#L209"}},{"name":"isInferrable","description":"Returns whether the size is inferrable.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"boolean","rawType":["boolean"],"description":null},"metadata":{"name":"ImageGen.ts","directory":"canvas","line":242,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageGen.ts#L242"}},{"name":"setGifOptions","description":"Sets the gif options.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"options","description":"The gif options","optional":true,"default":null,"type":"EncoderOptions","rawType":["EncoderOptions"]}],"returns":{"type":"ImageGenerationTemplate","rawType":["ImageGenerationTemplate"],"description":null},"metadata":{"name":"ImageGen.ts","directory":"canvas","line":201,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageGen.ts#L201"}},{"name":"setSteps","description":"Sets the steps. This will overwrite any existing steps.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"steps","description":"The steps to set","optional":false,"default":null,"type":"Array","rawType":["Array","<","ImageGenerationStep",">"]}],"returns":{"type":"ImageGenerationTemplate","rawType":["ImageGenerationTemplate"],"description":null},"metadata":{"name":"ImageGen.ts","directory":"canvas","line":192,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageGen.ts#L192"}},{"name":"toJSON","description":"Returns the JSON representation of the template.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"IImageGenerationTemplate","rawType":["IImageGenerationTemplate"],"description":null},"metadata":{"name":"ImageGen.ts","directory":"canvas","line":263,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageGen.ts#L263"}},{"name":"from","description":"Creates a new ImageGenerationTemplate instance from a template.","see":[],"static":true,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"template","description":"The template to use","optional":false,"default":null,"type":"IImageGenerationTemplate","rawType":["IImageGenerationTemplate"]}],"returns":{"type":"ImageGenerationTemplate","rawType":["ImageGenerationTemplate"],"description":"The created template"},"metadata":{"name":"ImageGen.ts","directory":"canvas","line":175,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageGen.ts#L175"}}],"private":false,"properties":[{"abstract":false,"default":null,"deprecated":false,"description":"The gif options.","metadata":{"name":"ImageGen.ts","directory":"canvas","line":168,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageGen.ts#L168"},"name":"gif","private":false,"readonly":false,"see":[],"static":false,"type":"EncoderOptions"},{"abstract":false,"default":null,"deprecated":false,"description":"The height of the template","metadata":{"name":"ImageGen.ts","directory":"canvas","line":186,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageGen.ts#L186"},"name":"height","private":false,"readonly":true,"see":[],"static":false,"type":"number"},{"abstract":false,"default":"[]","deprecated":false,"description":"The steps to apply to the canvas.","metadata":{"name":"ImageGen.ts","directory":"canvas","line":164,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageGen.ts#L164"},"name":"steps","private":false,"readonly":false,"see":[],"static":false,"type":"Array"},{"abstract":false,"default":null,"deprecated":false,"description":"The width of the template","metadata":{"name":"ImageGen.ts","directory":"canvas","line":186,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageGen.ts#L186"},"name":"width","private":false,"readonly":true,"see":[],"static":false,"type":"number"}],"see":[]},"markdown":[]},{"data":{"name":"ImageManipulator","abstract":false,"constructor":{"name":"ImageManipulator","description":"Creates a new CanvasImage instance.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"source","description":"The image source","optional":false,"default":null,"type":"ImageSource","rawType":["ImageSource"]},{"name":"width","description":"The width of the image","optional":true,"default":null,"type":"number","rawType":["number"]},{"name":"height","description":"The height of the image","optional":true,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"ImageManipulator","rawType":["ImageManipulator"],"description":null},"metadata":{"name":"CanvasImage.ts","directory":"canvas","line":15,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/CanvasImage.ts#L15"},"constructor":"new ImageManipulator"},"metadata":{"name":"ImageManipulator.ts","directory":"canvas","line":5,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageManipulator.ts#L5"},"deprecated":false,"description":null,"extends":"CanvasImage","implements":null,"rawExtends":["CanvasImage"],"rawImplements":null,"methods":[{"name":"blur","description":"Applies blur filter to the image.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"value","description":"The filter intensity","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"ImageManipulator","rawType":["ImageManipulator"],"description":null},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":109,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageFilterer.ts#L109"}},{"name":"brightness","description":"Applies brightness filter to the image.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"value","description":"The filter intensity","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"ImageManipulator","rawType":["ImageManipulator"],"description":null},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":99,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageFilterer.ts#L99"}},{"name":"circle","description":"Draws the image to the canvas with a circle clip.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"width","description":"The width of the image","optional":true,"default":null,"type":"number","rawType":["number"]},{"name":"height","description":"The height of the image","optional":true,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"ImageManipulator","rawType":["ImageManipulator"],"description":null},"metadata":{"name":"CanvasImage.ts","directory":"canvas","line":54,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/CanvasImage.ts#L54"}},{"name":"circularize","description":"Applies a circular clip to the image.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"width","description":"The width of the image","optional":false,"default":null,"type":"number","rawType":["number"]},{"name":"height","description":"The height of the image","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"void","rawType":["void"],"description":null},"metadata":{"name":"ImageManipulator.ts","directory":"canvas","line":94,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageManipulator.ts#L94"}},{"name":"contrast","description":"Applies contrast filter to the image.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"value","description":"The filter intensity","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"ImageManipulator","rawType":["ImageManipulator"],"description":null},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":89,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageFilterer.ts#L89"}},{"name":"draw","description":"Draws the image to the canvas.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"x","description":"The x position to draw the image","optional":false,"default":null,"type":"number","rawType":["number"]},{"name":"y","description":"The y position to draw the image","optional":false,"default":null,"type":"number","rawType":["number"]},{"name":"width","description":"The width of the image","optional":true,"default":null,"type":"number","rawType":["number"]},{"name":"height","description":"The height of the image","optional":true,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"ImageManipulator","rawType":["ImageManipulator"],"description":null},"metadata":{"name":"CanvasImage.ts","directory":"canvas","line":34,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/CanvasImage.ts#L34"}},{"name":"drawImage","description":"Draws the image to the canvas.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"image","description":"The image to draw","optional":false,"default":null,"type":"ImageSource","rawType":["ImageSource"]},{"name":"x","description":"The x position to draw the image","optional":false,"default":null,"type":"number","rawType":["number"]},{"name":"y","description":"The y position to draw the image","optional":false,"default":null,"type":"number","rawType":["number"]},{"name":"width","description":"The width of the image","optional":true,"default":null,"type":"number","rawType":["number"]},{"name":"height","description":"The height of the image","optional":true,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"ImageManipulator","rawType":["ImageManipulator"],"description":null},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":17,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageFilterer.ts#L17"}},{"name":"dropShadow","description":"Applies drop-shadow filter to the image.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"config","description":"The drop-shadow config","optional":false,"default":null,"type":"DropShadowConfig","rawType":["DropShadowConfig"]}],"returns":{"type":"ImageManipulator","rawType":["ImageManipulator"],"description":null},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":123,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageFilterer.ts#L123"}},{"name":"encode","description":"Encodes the canvas to a buffer.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"Promise","rawType":["Promise","<","Buffer",">"],"description":null},"metadata":{"name":"Encodable.ts","directory":"canvas","line":14,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/Encodable.ts#L14"}},{"name":"erase","description":"Erases a part of the canvas.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"x","description":"The x position to erase","optional":false,"default":null,"type":"number","rawType":["number"]},{"name":"y","description":"The y position to erase","optional":false,"default":null,"type":"number","rawType":["number"]},{"name":"width","description":"The width of the area to erase","optional":false,"default":null,"type":"number","rawType":["number"]},{"name":"height","description":"The height of the area to erase","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"void","rawType":["void"],"description":null},"metadata":{"name":"ImageManipulator.ts","directory":"canvas","line":65,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageManipulator.ts#L65"}},{"name":"flip","description":"Flips the canvas.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"axis","description":"The axis to flip, `x` or `y`.","optional":false,"default":null,"type":"'x' | 'y'","rawType":["'","x","'","'","y","'"]}],"returns":{"type":"void","rawType":["void"],"description":null},"metadata":{"name":"ImageManipulator.ts","directory":"canvas","line":23,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageManipulator.ts#L23"}},{"name":"getFinalCanvas","description":"Returns the canvas instance by applying the steps.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"Promise","rawType":["Promise","<","Canvas",">"],"description":null},"metadata":{"name":"CanvasImage.ts","directory":"canvas","line":122,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/CanvasImage.ts#L122"}},{"name":"grayscale","description":"Applies grayscale filter to the image.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"value","description":"The filter intensity","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"ImageManipulator","rawType":["ImageManipulator"],"description":null},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":40,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageFilterer.ts#L40"}},{"name":"hueRotate","description":"Applies hue-rotate filter to the image.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"value","description":"The degrees to rotate","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"ImageManipulator","rawType":["ImageManipulator"],"description":null},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":79,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageFilterer.ts#L79"}},{"name":"invert","description":"Applies invert filter to the image.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"value","description":"The filter intensity","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"ImageManipulator","rawType":["ImageManipulator"],"description":null},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":30,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageFilterer.ts#L30"}},{"name":"opacity","description":"Applies opacity filter to the image.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"value","description":"The filter intensity","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"ImageManipulator","rawType":["ImageManipulator"],"description":null},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":59,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageFilterer.ts#L59"}},{"name":"pixelate","description":"Draws pixelated image to the canvas.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"pixels","description":"The amount of pixels to use","optional":true,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"ImageManipulator","rawType":["ImageManipulator"],"description":null},"metadata":{"name":"CanvasImage.ts","directory":"canvas","line":75,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/CanvasImage.ts#L75"}},{"name":"process","description":"Processes the steps and applies them to the canvas.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"canvas","description":"The canvas to apply the steps to","optional":false,"default":null,"type":"Canvas","rawType":["Canvas"]},{"name":"ctx","description":"The canvas context to apply the steps to","optional":false,"default":null,"type":"SKRSContext2D","rawType":["SKRSContext2D"]}],"returns":{"type":"Promise","rawType":["Promise","<","void",">"],"description":null},"metadata":{"name":"ImageManipulator.ts","directory":"canvas","line":103,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageManipulator.ts#L103"}},{"name":"resetTransform","description":"Resets the transform of the canvas.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"void","rawType":["void"],"description":null},"metadata":{"name":"ImageManipulator.ts","directory":"canvas","line":83,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageManipulator.ts#L83"}},{"name":"restore","description":"Restores the last saved canvas context state.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"ImageManipulator","rawType":["ImageManipulator"],"description":null},"metadata":{"name":"CanvasImage.ts","directory":"canvas","line":111,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/CanvasImage.ts#L111"}},{"name":"rotate","description":"Rotates the canvas.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"degrees","description":null,"optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"ImageManipulator","rawType":["ImageManipulator"],"description":null},"metadata":{"name":"ImageManipulator.ts","directory":"canvas","line":11,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageManipulator.ts#L11"}},{"name":"saturate","description":"Applies saturate filter to the image.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"value","description":"The filter intensity","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"ImageManipulator","rawType":["ImageManipulator"],"description":null},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":69,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageFilterer.ts#L69"}},{"name":"save","description":"Saves the canvas context state.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"ImageManipulator","rawType":["ImageManipulator"],"description":null},"metadata":{"name":"CanvasImage.ts","directory":"canvas","line":100,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/CanvasImage.ts#L100"}},{"name":"scale","description":"Scales the canvas.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"x","description":"The x scale","optional":false,"default":null,"type":"number","rawType":["number"]},{"name":"y","description":"The y scale","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"void","rawType":["void"],"description":null},"metadata":{"name":"ImageManipulator.ts","directory":"canvas","line":41,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageManipulator.ts#L41"}},{"name":"sepia","description":"Applies sepia filter to the image.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"value","description":"The filter intensity","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"ImageManipulator","rawType":["ImageManipulator"],"description":null},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":49,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageFilterer.ts#L49"}},{"name":"transform","description":"Applies a transform to the canvas.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"a","description":null,"optional":false,"default":null,"type":"number","rawType":["number"]},{"name":"b","description":null,"optional":false,"default":null,"type":"number","rawType":["number"]},{"name":"c","description":null,"optional":false,"default":null,"type":"number","rawType":["number"]},{"name":"d","description":null,"optional":false,"default":null,"type":"number","rawType":["number"]},{"name":"e","description":null,"optional":false,"default":null,"type":"number","rawType":["number"]},{"name":"f","description":null,"optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"void","rawType":["void"],"description":null},"metadata":{"name":"ImageManipulator.ts","directory":"canvas","line":74,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageManipulator.ts#L74"}},{"name":"translate","description":"Translates the canvas.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"x","description":"The x position to translate","optional":false,"default":null,"type":"number","rawType":["number"]},{"name":"y","description":"The y position to translate","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"void","rawType":["void"],"description":null},"metadata":{"name":"ImageManipulator.ts","directory":"canvas","line":52,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageManipulator.ts#L52"}}],"private":false,"properties":[{"abstract":false,"default":null,"deprecated":false,"description":"The height of the canvas","metadata":{"name":"CanvasHelper.ts","directory":"canvas","line":17,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/CanvasHelper.ts#L17"},"name":"height","private":false,"readonly":false,"see":[],"static":false,"type":"number"},{"abstract":false,"default":null,"deprecated":false,"description":"The image source","metadata":{"name":"CanvasImage.ts","directory":"canvas","line":15,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/CanvasImage.ts#L15"},"name":"source","private":false,"readonly":false,"see":[],"static":false,"type":"ImageSource"},{"abstract":false,"default":"[]","deprecated":false,"description":"The steps to apply to the canvas.","metadata":{"name":"CanvasHelper.ts","directory":"canvas","line":9,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/CanvasHelper.ts#L9"},"name":"steps","private":false,"readonly":false,"see":[],"static":false,"type":"Array"},{"abstract":false,"default":null,"deprecated":false,"description":"The width of the canvas","metadata":{"name":"CanvasHelper.ts","directory":"canvas","line":17,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/CanvasHelper.ts#L17"},"name":"width","private":false,"readonly":false,"see":[],"static":false,"type":"number"}],"see":[]},"markdown":[]},{"data":{"name":"LeaderboardBuilder","abstract":false,"constructor":{"name":"LeaderboardBuilder","description":"Create a new leaderboard ui builder","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"LeaderboardBuilder","rawType":["LeaderboardBuilder"],"description":null},"metadata":{"name":"LeaderboardBuilder.tsx","directory":"components","line":106,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/components/LeaderboardBuilder.tsx#L106"},"constructor":"new LeaderboardBuilder"},"metadata":{"name":"LeaderboardBuilder.tsx","directory":"components","line":102,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/components/LeaderboardBuilder.tsx#L102"},"deprecated":false,"description":null,"extends":"Builder","implements":null,"rawExtends":["Builder","<","LeaderboardProps",">"],"rawImplements":null,"methods":[{"name":"addComponent","description":"Add component to this builder.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"component","description":"the component to add.","optional":false,"default":null,"type":"T | Array","rawType":["T","Array","<","T",">"]}],"returns":{"type":"LeaderboardBuilder","rawType":["LeaderboardBuilder"],"description":null},"metadata":{"name":"Builder.tsx","directory":"templates","line":274,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L274"}},{"name":"adjustCanvas","description":"Adjust the canvas size.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"LeaderboardBuilder","rawType":["LeaderboardBuilder"],"description":null},"metadata":{"name":"Builder.tsx","directory":"templates","line":246,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L246"}},{"name":"bootstrap","description":"Bootstrap this builder with data.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"data","description":null,"optional":false,"default":null,"type":"LeaderboardProps","rawType":["LeaderboardProps"]}],"returns":{"type":"void","rawType":["void"],"description":null},"metadata":{"name":"Builder.tsx","directory":"templates","line":239,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L239"}},{"name":"build","description":"Convert this builder into an image.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"options","description":"the build options.","optional":false,"default":null,"type":"O","rawType":["O"]}],"returns":{"type":"Promise>","rawType":["Promise","<","BuilderResult","<","O",">",">"],"description":"the image buffer or svg string."},"metadata":{"name":"Builder.tsx","directory":"templates","line":373,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L373"}},{"name":"flush","description":"Flush the frames.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"void","rawType":["void"],"description":null},"metadata":{"name":"Builder.tsx","directory":"templates","line":420,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L420"}},{"name":"render","description":"Render this leaderboard ui on the canvas","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"Promise","rawType":["Promise","<","Element",">"],"description":null},"metadata":{"name":"LeaderboardBuilder.tsx","directory":"components","line":176,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/components/LeaderboardBuilder.tsx#L176"}},{"name":"renderPlayer","description":"Render player ui on the canvas","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"__namedParameters","description":null,"optional":false,"default":null,"type":"{ avatar: ImageSource, displayName: string, level: number, rank: number, username: string, xp: number }","rawType":["{"," ","avatar",":"," ","ImageSource","; ","displayName",":"," ","string","; ","level",":"," ","number","; ","rank",":"," ","number","; ","username",":"," ","string","; ","xp",":"," ","number",";"," ","}"]}],"returns":{"type":"Promise","rawType":["Promise","<","Element",">"],"description":null},"metadata":{"name":"LeaderboardBuilder.tsx","directory":"components","line":326,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/components/LeaderboardBuilder.tsx#L326"}},{"name":"renderPlayers","description":"Render players ui on the canvas","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"players","description":null,"optional":false,"default":null,"type":"Array","rawType":["Array","<","Element",">"]}],"returns":{"type":"Element","rawType":["Element"],"description":null},"metadata":{"name":"LeaderboardBuilder.tsx","directory":"components","line":255,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/components/LeaderboardBuilder.tsx#L255"}},{"name":"renderTop","description":"Render top players ui on the canvas","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"__namedParameters","description":null,"optional":false,"default":null,"type":"{ avatar: ImageSource, displayName: string, level: number, rank: number, username: string, xp: number }","rawType":["{"," ","avatar",":"," ","ImageSource","; ","displayName",":"," ","string","; ","level",":"," ","number","; ","rank",":"," ","number","; ","username",":"," ","string","; ","xp",":"," ","number",";"," ","}"]}],"returns":{"type":"Promise","rawType":["Promise","<","Element",">"],"description":null},"metadata":{"name":"LeaderboardBuilder.tsx","directory":"components","line":266,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/components/LeaderboardBuilder.tsx#L266"}},{"name":"setBackground","description":"Set background for this leaderboard ui","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"background","description":"background image","optional":false,"default":null,"type":"ImageSource","rawType":["ImageSource"]}],"returns":{"type":"LeaderboardBuilder","rawType":["LeaderboardBuilder"],"description":null},"metadata":{"name":"LeaderboardBuilder.tsx","directory":"components","line":130,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/components/LeaderboardBuilder.tsx#L130"}},{"name":"setBackgroundColor","description":"Set background color for this leaderboard ui","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"color","description":"background color","optional":false,"default":null,"type":"string","rawType":["string"]}],"returns":{"type":"LeaderboardBuilder","rawType":["LeaderboardBuilder"],"description":null},"metadata":{"name":"LeaderboardBuilder.tsx","directory":"components","line":139,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/components/LeaderboardBuilder.tsx#L139"}},{"name":"setGraphemeProvider","description":"Set grapheme image provider for this builder.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"provider","description":null,"optional":false,"default":null,"type":"GraphemeProvider","rawType":["GraphemeProvider"]}],"returns":{"type":"LeaderboardBuilder","rawType":["LeaderboardBuilder"],"description":null},"metadata":{"name":"Builder.tsx","directory":"templates","line":291,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L291"}},{"name":"setHeader","description":"Set header for this leaderboard ui","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"data","description":"header data","optional":false,"default":null,"type":"{ image: ImageSource, subtitle: string, title: string }","rawType":["{"," ","image",":"," ","ImageSource","; ","subtitle",":"," ","string","; ","title",":"," ","string",";"," ","}"]}],"returns":{"type":"LeaderboardBuilder","rawType":["LeaderboardBuilder"],"description":null},"metadata":{"name":"LeaderboardBuilder.tsx","directory":"components","line":148,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/components/LeaderboardBuilder.tsx#L148"}},{"name":"setIterations","description":"The total number of iterations of this builder.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"iterations","description":null,"optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"LeaderboardBuilder","rawType":["LeaderboardBuilder"],"description":null},"metadata":{"name":"Builder.tsx","directory":"templates","line":196,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L196"}},{"name":"setPlayers","description":"Set players for this leaderboard ui. The canvas size will be adjusted automatically based on the number of players.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"players","description":"players data","optional":false,"default":null,"type":"Array<{ avatar: ImageSource, displayName: string, level: number, rank: number, username: string, xp: number }>","rawType":["Array","<","{"," ","avatar",":"," ","ImageSource","; ","displayName",":"," ","string","; ","level",":"," ","number","; ","rank",":"," ","number","; ","username",":"," ","string","; ","xp",":"," ","number",";"," ","}",">"]}],"returns":{"type":"LeaderboardBuilder","rawType":["LeaderboardBuilder"],"description":null},"metadata":{"name":"LeaderboardBuilder.tsx","directory":"components","line":157,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/components/LeaderboardBuilder.tsx#L157"}},{"name":"setState","description":"Set the state of this builder. Calling this method will re-render the builder and capture the result as a new frame.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"newState","description":null,"optional":false,"default":null,"type":"unknown","rawType":["unknown"]},{"name":"silent","description":null,"optional":false,"default":null,"type":"boolean","rawType":["boolean"]}],"returns":{"type":"void","rawType":["void"],"description":null},"metadata":{"name":"Builder.tsx","directory":"templates","line":227,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L227"}},{"name":"setStyle","description":"Set the style of this builder.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"newStyle","description":"the new style.","optional":false,"default":null,"type":"CSSProperties","rawType":["CSSProperties"]}],"returns":{"type":"LeaderboardBuilder","rawType":["LeaderboardBuilder"],"description":null},"metadata":{"name":"Builder.tsx","directory":"templates","line":300,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L300"}},{"name":"setTextStyles","description":"Configures the text renderer for this leaderboard.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"config","description":"The configuration for this leaderboard.","optional":false,"default":null,"type":"Partial<{ level: string, rank: string, xp: string }>","rawType":["Partial","<","{"," ","level",":"," ","string","; ","rank",":"," ","string","; ","xp",":"," ","string",";"," ","}",">"]}],"returns":{"type":"LeaderboardBuilder","rawType":["LeaderboardBuilder"],"description":null},"metadata":{"name":"LeaderboardBuilder.tsx","directory":"components","line":168,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/components/LeaderboardBuilder.tsx#L168"}},{"name":"from","description":"Create a builder from builder template.","see":[],"static":true,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"template","description":null,"optional":false,"default":null,"type":"BuilderTemplate","rawType":["BuilderTemplate"]}],"returns":{"type":"Builder, unknown>","rawType":["Builder","<","Record","<","string","unknown",">","unknown",">"],"description":null},"metadata":{"name":"Builder.tsx","directory":"templates","line":430,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L430"}},{"name":"isBuilder","description":null,"see":[],"static":true,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"builder","description":null,"optional":false,"default":null,"type":"unknown","rawType":["unknown"]}],"returns":{"type":"builder is Builder, unknown>","rawType":[" is","Builder","<","Record","<","string","unknown",">","unknown",">"],"description":null},"metadata":{"name":"Builder.tsx","directory":"templates","line":439,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L439"}}],"private":false,"properties":[{"abstract":false,"default":"...","deprecated":false,"description":"The components of this builder.","metadata":{"name":"Builder.tsx","directory":"templates","line":173,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L173"},"name":"components","private":false,"readonly":false,"see":[],"static":false,"type":"Array"},{"abstract":false,"default":"BuiltInGraphemeProvider.Twemoji","deprecated":false,"description":"The grapheme provider of this builder.","metadata":{"name":"Builder.tsx","directory":"templates","line":182,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L182"},"name":"graphemeProvider","private":false,"readonly":false,"see":[],"static":false,"type":"GraphemeProvider"},{"abstract":false,"default":null,"deprecated":false,"description":"the height of this builder.","metadata":{"name":"Builder.tsx","directory":"templates","line":189,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L189"},"name":"height","private":false,"readonly":false,"see":[],"static":false,"type":"number"},{"abstract":false,"default":"...","deprecated":false,"description":"The options manager of this builder.","metadata":{"name":"Builder.tsx","directory":"templates","line":177,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L177"},"name":"options","private":false,"readonly":false,"see":[],"static":false,"type":"BuilderOptionsManager"},{"abstract":false,"default":"\"\"","deprecated":false,"description":"The tailwind subset to apply to this builder.","metadata":{"name":"Builder.tsx","directory":"templates","line":169,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L169"},"name":"tw","private":false,"readonly":false,"see":[],"static":false,"type":"string"},{"abstract":false,"default":null,"deprecated":false,"description":"the width of this builder.","metadata":{"name":"Builder.tsx","directory":"templates","line":189,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L189"},"name":"width","private":false,"readonly":false,"see":[],"static":false,"type":"number"},{"default":null,"description":"The state of this builder.","metadata":{"name":"Builder.tsx","directory":"templates","line":213,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L213"},"name":"state","type":"S"},{"default":null,"description":"Get the style of this builder.","metadata":{"name":"Builder.tsx","directory":"templates","line":259,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L259"},"name":"style","type":"CSSProperties"}],"see":[]},"markdown":[]},{"data":{"name":"RankCardBuilder","abstract":false,"constructor":{"name":"RankCardBuilder","description":"Creates a new rank card builder.","see":[],"static":false,"private":false,"examples":["```ts\nconst card = new RankCardBuilder()\n .setUsername('kiki')\n .setDisplayName('Kiki')\n .setDiscriminator('1234')\n .setAvatar('...')\n .setCurrentXP(300)\n .setRequiredXP(600)\n .setLevel(2)\n .setRank(5)\n .setStatus('online');\n\nconst pngBuffer = await card.build({\n format: 'png'\n});\n```"],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"RankCardBuilder","rawType":["RankCardBuilder"],"description":null},"metadata":{"name":"RankCardBuilder.tsx","directory":"components","line":61,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/components/RankCardBuilder.tsx#L61"},"constructor":"new RankCardBuilder"},"metadata":{"name":"RankCardBuilder.tsx","directory":"components","line":42,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/components/RankCardBuilder.tsx#L42"},"deprecated":false,"description":null,"extends":"Builder","implements":null,"rawExtends":["Builder","<","RankCardBuilderProps",">"],"rawImplements":null,"methods":[{"name":"addComponent","description":"Add component to this builder.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"component","description":"the component to add.","optional":false,"default":null,"type":"T | Array","rawType":["T","Array","<","T",">"]}],"returns":{"type":"RankCardBuilder","rawType":["RankCardBuilder"],"description":null},"metadata":{"name":"Builder.tsx","directory":"templates","line":274,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L274"}},{"name":"adjustCanvas","description":"Adjust the canvas size.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"RankCardBuilder","rawType":["RankCardBuilder"],"description":null},"metadata":{"name":"Builder.tsx","directory":"templates","line":246,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L246"}},{"name":"bootstrap","description":"Bootstrap this builder with data.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"data","description":null,"optional":false,"default":null,"type":"RankCardBuilderProps","rawType":["RankCardBuilderProps"]}],"returns":{"type":"void","rawType":["void"],"description":null},"metadata":{"name":"Builder.tsx","directory":"templates","line":239,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L239"}},{"name":"build","description":"Convert this builder into an image.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"options","description":"the build options.","optional":false,"default":null,"type":"O","rawType":["O"]}],"returns":{"type":"Promise>","rawType":["Promise","<","BuilderResult","<","O",">",">"],"description":"the image buffer or svg string."},"metadata":{"name":"Builder.tsx","directory":"templates","line":373,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L373"}},{"name":"flush","description":"Flush the frames.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"void","rawType":["void"],"description":null},"metadata":{"name":"Builder.tsx","directory":"templates","line":420,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L420"}},{"name":"render","description":"Renders this rank card into the canvas.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"Promise","rawType":["Promise","<","Element",">"],"description":null},"metadata":{"name":"RankCardBuilder.tsx","directory":"components","line":220,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/components/RankCardBuilder.tsx#L220"}},{"name":"setAvatar","description":"Sets the avatar for this rank card.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"image","description":"The avatar for this rank card.","optional":false,"default":null,"type":"ImageSource","rawType":["ImageSource"]}],"returns":{"type":"RankCardBuilder","rawType":["RankCardBuilder"],"description":null},"metadata":{"name":"RankCardBuilder.tsx","directory":"components","line":96,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/components/RankCardBuilder.tsx#L96"}},{"name":"setBackground","description":"Sets the background for this rank card.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"image","description":"The background for this rank card.","optional":false,"default":null,"type":"ImageSource","rawType":["ImageSource"]}],"returns":{"type":"RankCardBuilder","rawType":["RankCardBuilder"],"description":null},"metadata":{"name":"RankCardBuilder.tsx","directory":"components","line":105,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/components/RankCardBuilder.tsx#L105"}},{"name":"setBackgroundCrop","description":"Set background crop for this rank card.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"pos","description":null,"optional":false,"default":null,"type":"Partial>","rawType":["Partial","<","undefined","Partial","<","{"," ","height",":"," ","number","; ","width",":"," ","number","; ","x",":"," ","number","; ","y",":"," ","number",";"," ","}",">",">"]}],"returns":{"type":"RankCardBuilder","rawType":["RankCardBuilder"],"description":null},"metadata":{"name":"RankCardBuilder.tsx","directory":"components","line":193,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/components/RankCardBuilder.tsx#L193"}},{"name":"setCurrentXP","description":"Sets the current xp for this rank card.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"xp","description":"The current xp for this rank card.","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"RankCardBuilder","rawType":["RankCardBuilder"],"description":null},"metadata":{"name":"RankCardBuilder.tsx","directory":"components","line":149,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/components/RankCardBuilder.tsx#L149"}},{"name":"setDisplayName","description":"Sets the username for this rank card.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"name","description":"The username for this rank card.","optional":false,"default":null,"type":"string","rawType":["string"]}],"returns":{"type":"RankCardBuilder","rawType":["RankCardBuilder"],"description":null},"metadata":{"name":"RankCardBuilder.tsx","directory":"components","line":123,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/components/RankCardBuilder.tsx#L123"}},{"name":"setFonts","description":"Sets the fonts to be used for this rank card.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"fontConfig","description":"The fonts to be used for this rank card.","optional":false,"default":null,"type":"Required, rank: Partial<{ text: string, value: string }>, xp: Partial<{ text: string, value: string }> }>, username: Partial<{ handle: string, name: string }> }>>","rawType":["Required","<","Partial","<","{"," ","progress",":"," ","Partial","<","{"," ","level",":"," ","Partial","<","{"," ","text",":"," ","string","; ","value",":"," ","string",";"," ","}",">","; ","rank",":"," ","Partial","<","{"," ","text",":"," ","string","; ","value",":"," ","string",";"," ","}",">","; ","xp",":"," ","Partial","<","{"," ","text",":"," ","string","; ","value",":"," ","string",";"," ","}",">",";"," ","}",">","; ","username",":"," ","Partial","<","{"," ","handle",":"," ","string","; ","name",":"," ","string",";"," ","}",">",";"," ","}",">",">"]}],"returns":{"type":"RankCardBuilder","rawType":["RankCardBuilder"],"description":null},"metadata":{"name":"RankCardBuilder.tsx","directory":"components","line":87,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/components/RankCardBuilder.tsx#L87"}},{"name":"setGraphemeProvider","description":"Set grapheme image provider for this builder.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"provider","description":null,"optional":false,"default":null,"type":"GraphemeProvider","rawType":["GraphemeProvider"]}],"returns":{"type":"RankCardBuilder","rawType":["RankCardBuilder"],"description":null},"metadata":{"name":"Builder.tsx","directory":"templates","line":291,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L291"}},{"name":"setIterations","description":"The total number of iterations of this builder.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"iterations","description":null,"optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"RankCardBuilder","rawType":["RankCardBuilder"],"description":null},"metadata":{"name":"Builder.tsx","directory":"templates","line":196,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L196"}},{"name":"setLevel","description":"Sets the level of this rank card.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"level","description":"The level of this rank card.","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"RankCardBuilder","rawType":["RankCardBuilder"],"description":null},"metadata":{"name":"RankCardBuilder.tsx","directory":"components","line":167,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/components/RankCardBuilder.tsx#L167"}},{"name":"setOverlay","description":"Set overlay for this rank card.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"overlay","description":null,"optional":false,"default":null,"type":"string | number | boolean","rawType":["string","number","boolean"]}],"returns":{"type":"RankCardBuilder","rawType":["RankCardBuilder"],"description":null},"metadata":{"name":"RankCardBuilder.tsx","directory":"components","line":140,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/components/RankCardBuilder.tsx#L140"}},{"name":"setProgressCalculator","description":"Sets the progress calculator for this rank card. The value returned by this calculator defines the width of the progress bar.\nValid range is 0-100. Returning a number less than 0 or greater than 100 will be clamped within this range, or invalid values will result in 0% width.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"calc","description":"The progress calculator for this rank card.","optional":false,"default":null,"type":"(current: number, required: number) => number","rawType":["(","current: number","required: number",")"," ","=>"," ","number"]}],"returns":{"type":"RankCardBuilder","rawType":["RankCardBuilder"],"description":null},"metadata":{"name":"RankCardBuilder.tsx","directory":"components","line":212,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/components/RankCardBuilder.tsx#L212"}},{"name":"setRank","description":"Sets the rank of this rank card.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"rank","description":"The rank of this rank card.","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"RankCardBuilder","rawType":["RankCardBuilder"],"description":null},"metadata":{"name":"RankCardBuilder.tsx","directory":"components","line":176,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/components/RankCardBuilder.tsx#L176"}},{"name":"setRequiredXP","description":"Sets the required xp for this rank card.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"xp","description":"The required xp for this rank card.","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"RankCardBuilder","rawType":["RankCardBuilder"],"description":null},"metadata":{"name":"RankCardBuilder.tsx","directory":"components","line":158,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/components/RankCardBuilder.tsx#L158"}},{"name":"setState","description":"Set the state of this builder. Calling this method will re-render the builder and capture the result as a new frame.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"newState","description":null,"optional":false,"default":null,"type":"unknown","rawType":["unknown"]},{"name":"silent","description":null,"optional":false,"default":null,"type":"boolean","rawType":["boolean"]}],"returns":{"type":"void","rawType":["void"],"description":null},"metadata":{"name":"Builder.tsx","directory":"templates","line":227,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L227"}},{"name":"setStatus","description":"Sets the status for this rank card.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"status","description":"The status for this rank card.","optional":false,"default":null,"type":"StatusData | RankCardUserStatus","rawType":["StatusData","RankCardUserStatus"]}],"returns":{"type":"RankCardBuilder","rawType":["RankCardBuilder"],"description":null},"metadata":{"name":"RankCardBuilder.tsx","directory":"components","line":114,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/components/RankCardBuilder.tsx#L114"}},{"name":"setStyle","description":"Set the style of this builder.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"newStyle","description":"the new style.","optional":false,"default":null,"type":"CSSProperties","rawType":["CSSProperties"]}],"returns":{"type":"RankCardBuilder","rawType":["RankCardBuilder"],"description":null},"metadata":{"name":"Builder.tsx","directory":"templates","line":300,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L300"}},{"name":"setStyles","description":"Configures the renderer for this rank card.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"config","description":"The configuration for this rank card.","optional":false,"default":null,"type":"Partial, background: Stylable, container: Stylable, overlay: Stylable, progressbar: Partial<{ container: Stylable, thumb: Stylable, track: Stylable }>, statistics: Partial<{ container: Stylable, level: Partial<{ container: Stylable, text: Stylable, value: Stylable }>, rank: Partial<{ container: Stylable, text: Stylable, value: Stylable }>, xp: Partial<{ container: Stylable, text: Stylable, value: Stylable }> }>, username: Partial<{ container: Stylable, handle: Stylable, name: Stylable }> }>>","rawType":["Partial","<","Partial","<","{"," ","avatar",":"," ","Partial","<","{"," ","container",":"," ","Stylable","; ","image",":"," ","Stylable","; ","status",":"," ","Stylable",";"," ","}",">","; ","background",":"," ","Stylable","; ","container",":"," ","Stylable","; ","overlay",":"," ","Stylable","; ","progressbar",":"," ","Partial","<","{"," ","container",":"," ","Stylable","; ","thumb",":"," ","Stylable","; ","track",":"," ","Stylable",";"," ","}",">","; ","statistics",":"," ","Partial","<","{"," ","container",":"," ","Stylable","; ","level",":"," ","Partial","<","{"," ","container",":"," ","Stylable","; ","text",":"," ","Stylable","; ","value",":"," ","Stylable",";"," ","}",">","; ","rank",":"," ","Partial","<","{"," ","container",":"," ","Stylable","; ","text",":"," ","Stylable","; ","value",":"," ","Stylable",";"," ","}",">","; ","xp",":"," ","Partial","<","{"," ","container",":"," ","Stylable","; ","text",":"," ","Stylable","; ","value",":"," ","Stylable",";"," ","}",">",";"," ","}",">","; ","username",":"," ","Partial","<","{"," ","container",":"," ","Stylable","; ","handle",":"," ","Stylable","; ","name",":"," ","Stylable",";"," ","}",">",";"," ","}",">",">"]}],"returns":{"type":"RankCardBuilder","rawType":["RankCardBuilder"],"description":null},"metadata":{"name":"RankCardBuilder.tsx","directory":"components","line":185,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/components/RankCardBuilder.tsx#L185"}},{"name":"setTextStyles","description":"Configures the texts for this rank card.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"config","description":"The configuration for this rank card.","optional":false,"default":null,"type":"Partial>","rawType":["Partial","<","Partial","<","{"," ","level",":"," ","string","; ","rank",":"," ","string","; ","xp",":"," ","string",";"," ","}",">",">"]}],"returns":{"type":"RankCardBuilder","rawType":["RankCardBuilder"],"description":null},"metadata":{"name":"RankCardBuilder.tsx","directory":"components","line":202,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/components/RankCardBuilder.tsx#L202"}},{"name":"setUsername","description":"Sets the handle name for this rank card.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"name","description":"The handle name for this rank card.","optional":false,"default":null,"type":"string","rawType":["string"]}],"returns":{"type":"RankCardBuilder","rawType":["RankCardBuilder"],"description":null},"metadata":{"name":"RankCardBuilder.tsx","directory":"components","line":132,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/components/RankCardBuilder.tsx#L132"}},{"name":"from","description":"Create a builder from builder template.","see":[],"static":true,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"template","description":null,"optional":false,"default":null,"type":"BuilderTemplate","rawType":["BuilderTemplate"]}],"returns":{"type":"Builder, unknown>","rawType":["Builder","<","Record","<","string","unknown",">","unknown",">"],"description":null},"metadata":{"name":"Builder.tsx","directory":"templates","line":430,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L430"}},{"name":"isBuilder","description":null,"see":[],"static":true,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"builder","description":null,"optional":false,"default":null,"type":"unknown","rawType":["unknown"]}],"returns":{"type":"builder is Builder, unknown>","rawType":[" is","Builder","<","Record","<","string","unknown",">","unknown",">"],"description":null},"metadata":{"name":"Builder.tsx","directory":"templates","line":439,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L439"}}],"private":false,"properties":[{"abstract":false,"default":"...","deprecated":false,"description":"The components of this builder.","metadata":{"name":"Builder.tsx","directory":"templates","line":173,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L173"},"name":"components","private":false,"readonly":false,"see":[],"static":false,"type":"Array"},{"abstract":false,"default":"BuiltInGraphemeProvider.Twemoji","deprecated":false,"description":"The grapheme provider of this builder.","metadata":{"name":"Builder.tsx","directory":"templates","line":182,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L182"},"name":"graphemeProvider","private":false,"readonly":false,"see":[],"static":false,"type":"GraphemeProvider"},{"abstract":false,"default":null,"deprecated":false,"description":"the height of this builder.","metadata":{"name":"Builder.tsx","directory":"templates","line":189,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L189"},"name":"height","private":false,"readonly":false,"see":[],"static":false,"type":"number"},{"abstract":false,"default":"...","deprecated":false,"description":"The options manager of this builder.","metadata":{"name":"Builder.tsx","directory":"templates","line":177,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L177"},"name":"options","private":false,"readonly":false,"see":[],"static":false,"type":"BuilderOptionsManager"},{"abstract":false,"default":"\"\"","deprecated":false,"description":"The tailwind subset to apply to this builder.","metadata":{"name":"Builder.tsx","directory":"templates","line":169,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L169"},"name":"tw","private":false,"readonly":false,"see":[],"static":false,"type":"string"},{"abstract":false,"default":null,"deprecated":false,"description":"the width of this builder.","metadata":{"name":"Builder.tsx","directory":"templates","line":189,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L189"},"name":"width","private":false,"readonly":false,"see":[],"static":false,"type":"number"},{"default":null,"description":"The state of this builder.","metadata":{"name":"Builder.tsx","directory":"templates","line":213,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L213"},"name":"state","type":"S"},{"default":null,"description":"Get the style of this builder.","metadata":{"name":"Builder.tsx","directory":"templates","line":259,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L259"},"name":"style","type":"CSSProperties"}],"see":[]},"markdown":[]},{"data":{"name":"StyleSheet","abstract":false,"constructor":null,"metadata":{"name":"StyleSheet.ts","directory":"helpers","line":30,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/helpers/StyleSheet.ts#L30"},"deprecated":false,"description":null,"extends":"any","implements":null,"rawExtends":["any"],"rawImplements":null,"methods":[{"name":"cn","description":"Merges multiple tailwind-like class names into appropriate class names.","see":[],"static":true,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"classes","description":null,"optional":false,"default":null,"type":"Array","rawType":["Array","<","ClassNameValue",">"]}],"returns":{"type":"string","rawType":["string"],"description":null},"metadata":{"name":"StyleSheet.ts","directory":"helpers","line":69,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/helpers/StyleSheet.ts#L69"}},{"name":"compose","description":"Composes two CSSPropertiesLike objects.","see":[],"static":true,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"style1","description":null,"optional":false,"default":null,"type":"CSSProperties","rawType":["CSSProperties"]},{"name":"style2","description":null,"optional":false,"default":null,"type":"CSSProperties","rawType":["CSSProperties"]}],"returns":{"type":"CSSProperties","rawType":["CSSProperties"],"description":null},"metadata":{"name":"StyleSheet.ts","directory":"helpers","line":49,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/helpers/StyleSheet.ts#L49"}},{"name":"create","description":"Creates a new CSSPropertiesLike object.","see":[],"static":true,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"styles","description":null,"optional":false,"default":null,"type":"CSSPropertiesLike","rawType":["CSSPropertiesLike","<","K",">"]}],"returns":{"type":"CSSPropertiesLike","rawType":["CSSPropertiesLike","<","K",">"],"description":null},"metadata":{"name":"StyleSheet.ts","directory":"helpers","line":36,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/helpers/StyleSheet.ts#L36"}},{"name":"css","description":"Returns the style object from stylable data.","see":[],"static":true,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"data","description":null,"optional":true,"default":null,"type":"Stylable","rawType":["Stylable"]}],"returns":{"type":"CSSPropertiesLike","rawType":["CSSPropertiesLike","<","string",">"],"description":null},"metadata":{"name":"StyleSheet.ts","directory":"helpers","line":84,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/helpers/StyleSheet.ts#L84"}},{"name":"flatten","description":"Flattens an array of CSSPropertiesLike objects.","see":[],"static":true,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"style","description":null,"optional":false,"default":null,"type":"Array","rawType":["Array","<","CSSProperties",">"]}],"returns":{"type":"CSSProperties","rawType":["CSSProperties"],"description":null},"metadata":{"name":"StyleSheet.ts","directory":"helpers","line":59,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/helpers/StyleSheet.ts#L59"}},{"name":"tw","description":"Returns the className string from stylable data.","see":[],"static":true,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"data","description":null,"optional":true,"default":null,"type":"Stylable","rawType":["Stylable"]}],"returns":{"type":"string","rawType":["string"],"description":null},"metadata":{"name":"StyleSheet.ts","directory":"helpers","line":76,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/helpers/StyleSheet.ts#L76"}}],"private":false,"properties":[],"see":[]},"markdown":[]},{"data":{"name":"TemplateImage","abstract":false,"constructor":{"name":"TemplateImage","description":"Creates a new TemplateImage instance.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"source","description":"The image source\n\nconst image = new TemplateImage('https://example.com/image.png');","optional":false,"default":null,"type":"ImageSource","rawType":["ImageSource"]}],"returns":{"type":"TemplateImage","rawType":["TemplateImage"],"description":null},"metadata":{"name":"TemplateFactory.ts","directory":"assets","line":17,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/assets/TemplateFactory.ts#L17"},"constructor":"new TemplateImage"},"metadata":{"name":"TemplateFactory.ts","directory":"assets","line":7,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/assets/TemplateFactory.ts#L7"},"deprecated":false,"description":null,"extends":null,"implements":null,"rawExtends":null,"rawImplements":null,"methods":[{"name":"resolve","description":"Resolves this image to consumable form.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"Promise","rawType":["Promise","<","Image",">"],"description":null},"metadata":{"name":"TemplateFactory.ts","directory":"assets","line":29,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/assets/TemplateFactory.ts#L29"}},{"name":"resolved","description":"Whether this image has been resolved.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"boolean","rawType":["boolean"],"description":null},"metadata":{"name":"TemplateFactory.ts","directory":"assets","line":22,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/assets/TemplateFactory.ts#L22"}}],"private":false,"properties":[{"abstract":false,"default":null,"deprecated":false,"description":"The image source\n\nconst image = new TemplateImage('https://example.com/image.png');","metadata":{"name":"TemplateFactory.ts","directory":"assets","line":17,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/assets/TemplateFactory.ts#L17"},"name":"source","private":false,"readonly":false,"see":[],"static":false,"type":"ImageSource"}],"see":[]},"markdown":[]}],"functions":[{"data":{"name":"canvacord","description":"Creates a new Canvacord image processor.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"source","description":"The image source to use","optional":false,"default":null,"type":"ImageSource","rawType":["ImageSource"]},{"name":"options","description":"The options to use","optional":true,"default":null,"type":"CanvacordInit","rawType":["CanvacordInit"]}],"returns":{"type":"CanvasImage","rawType":["CanvasImage"],"description":"The image processor"},"metadata":{"name":"Canvacord.ts","directory":"canvas","line":122,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/Canvacord.ts#L122"}},"markdown":[]},{"data":{"name":"createCanvasImage","description":"Creates a canvas image from the image source.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"img","description":"The image source","optional":false,"default":null,"type":"ImageSource","rawType":["ImageSource"]}],"returns":{"type":"Promise","rawType":["Promise","<","Image",">"],"description":"The canvas image\n\nconst image = await createCanvasImage('https://example.com/image.png');"},"metadata":{"name":"utils.ts","directory":"canvas","line":11,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/utils.ts#L11"}},"markdown":[]},{"data":{"name":"createEmojiProvider","description":null,"see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"builder","description":null,"optional":false,"default":null,"type":"(code: string) => string","rawType":["(","code: string",")"," ","=>"," ","string"]}],"returns":{"type":"GraphemeProvider","rawType":["GraphemeProvider"],"description":null},"metadata":{"name":"Builder.tsx","directory":"templates","line":28,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L28"}},"markdown":[]},{"data":{"name":"createGIF","description":null,"see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"source","description":null,"optional":false,"default":null,"type":"Builder","rawType":["Builder","<","any","any",">"]},{"name":"config","description":null,"optional":false,"default":null,"type":"GifInit","rawType":["GifInit"]}],"returns":{"type":"Promise","rawType":["Promise","<","Readable",">"],"description":null},"metadata":{"name":"createGIF.ts","directory":"canvas","line":21}},"markdown":[]},{"data":{"name":"createImageGenerator","description":"Creates a new image generator.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"template","description":"The template to use","optional":false,"default":null,"type":"ImageGenerationTemplate","rawType":["ImageGenerationTemplate"]}],"returns":{"type":"ImageGen","rawType":["ImageGen"],"description":null},"metadata":{"name":"ImageGen.ts","directory":"canvas","line":471,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageGen.ts#L471"}},"markdown":[]},{"data":{"name":"createTemplate","description":"Creates a new template from the provided template.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"cb","description":null,"optional":false,"default":null,"type":"(args: P) => IImageGenerationTemplate","rawType":["(","args: P",")"," ","=>"," ","IImageGenerationTemplate"]}],"returns":{"type":"(args: P) => ImageGenerationTemplate","rawType":["(","args: P",")"," ","=>"," ","ImageGenerationTemplate"],"description":null},"metadata":{"name":"TemplateFactory.ts","directory":"assets","line":40,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/assets/TemplateFactory.ts#L40"}},"markdown":[]},{"data":{"name":"loadImage","description":"Loads an image from the specified source.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"source","description":"The image source","optional":false,"default":null,"type":"ImageSource","rawType":["ImageSource"]},{"name":"options","description":"The options for loading the image","optional":true,"default":null,"type":"LoadImageOptions","rawType":["LoadImageOptions"]}],"returns":{"type":"Promise","rawType":["Promise","<","CanvacordImage",">"],"description":null},"metadata":{"name":"loadImage.ts","directory":"helpers","line":61,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/helpers/loadImage.ts#L61"}},"markdown":[]},{"data":{"name":"performObjectCleanup","description":"Performs object cleanup by deleting all undefined properties that could interfere with builder methods.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"obj","description":null,"optional":false,"default":null,"type":"Record","rawType":["Record","<","string","any",">"]},{"name":"deep","description":null,"optional":false,"default":null,"type":"boolean","rawType":["boolean"]}],"returns":{"type":"void","rawType":["void"],"description":null},"metadata":{"name":"StyleSheet.ts","directory":"helpers","line":19,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/helpers/StyleSheet.ts#L19"}},"markdown":[]},{"data":{"name":"render","description":"Renders the components.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"components","description":null,"optional":false,"default":null,"type":"Array","rawType":["Array","<","unknown",">"]}],"returns":{"type":"Array","rawType":["Array","<","Element",">"],"description":null},"metadata":{"name":"jsx.ts","directory":"helpers","line":113,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/helpers/jsx.ts#L113"}},"markdown":[]},{"data":{"name":"useBuilder","description":null,"see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"Builder","rawType":["Builder","<","T","S",">"],"description":null},"metadata":{"name":"useBuilder.ts","directory":"hooks","line":3}},"markdown":[]},{"data":{"name":"useOptions","description":null,"see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"BuilderOptionsManager","rawType":["BuilderOptionsManager","<","T",">"],"description":null},"metadata":{"name":"useOptions.ts","directory":"hooks","line":3}},"markdown":[]},{"data":{"name":"useState","description":null,"see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"initialValue","description":null,"optional":true,"default":null,"type":"T","rawType":["T"]}],"returns":{"type":"[T, Dispatch>]","rawType":["[","T","Dispatch","<","SetStateAction","<","T",">",">","]"],"description":null},"metadata":{"name":"useState.ts","directory":"hooks","line":6}},"markdown":[]}],"name":"canvacord","types":[{"data":{"deprecated":false,"description":"The builder template.","metadata":{"name":"Builder.tsx","directory":"templates","line":101,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L101"},"name":"BuilderTemplate","parameters":[],"private":false,"properties":[{"name":"components","description":"The components of this template.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"Builder.tsx","directory":"templates","line":105,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L105"},"private":false,"readonly":false,"see":[],"static":false,"type":"Array","rawType":["Array","<","Node","Element",">"]},{"name":"height","description":"The height of this template.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"Builder.tsx","directory":"templates","line":113,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L113"},"private":false,"readonly":false,"see":[],"static":false,"type":"number","rawType":["number"]},{"name":"style","description":"The style of this template.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"Builder.tsx","directory":"templates","line":117,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L117"},"private":false,"readonly":false,"see":[],"static":false,"type":"CSSProperties","rawType":["CSSProperties"]},{"name":"width","description":"The width of this template.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"Builder.tsx","directory":"templates","line":109,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L109"},"private":false,"readonly":false,"see":[],"static":false,"type":"number","rawType":["number"]}],"returns":null,"see":[],"type":"any"},"markdown":[]},{"data":{"deprecated":false,"description":null,"metadata":{"name":"Canvacord.ts","directory":"canvas","line":16,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/Canvacord.ts#L16"},"name":"CanvacordFactory","parameters":[],"private":false,"properties":[{"name":"affect","description":null,"value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"Canvacord.ts","directory":"canvas","line":10,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/Canvacord.ts#L10"},"private":false,"readonly":false,"see":[],"static":false,"type":"(args: [any]) => Promise","rawType":["(","args: [,any,]",")"," ","=>"," ","Promise","<","Buffer",">"]},{"name":"beautiful","description":null,"value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"Canvacord.ts","directory":"canvas","line":10,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/Canvacord.ts#L10"},"private":false,"readonly":false,"see":[],"static":false,"type":"(args: [any]) => Promise","rawType":["(","args: [,any,]",")"," ","=>"," ","Promise","<","Buffer",">"]},{"name":"bed","description":null,"value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"Canvacord.ts","directory":"canvas","line":10,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/Canvacord.ts#L10"},"private":false,"readonly":false,"see":[],"static":false,"type":"(args: [any, any]) => Promise","rawType":["(","args: [,any,any,]",")"," ","=>"," ","Promise","<","Buffer",">"]},{"name":"colorfy","description":null,"value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"Canvacord.ts","directory":"canvas","line":10,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/Canvacord.ts#L10"},"private":false,"readonly":false,"see":[],"static":false,"type":"(args: [any, any]) => Promise","rawType":["(","args: [,any,any,]",")"," ","=>"," ","Promise","<","Buffer",">"]},{"name":"delete","description":null,"value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"Canvacord.ts","directory":"canvas","line":10,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/Canvacord.ts#L10"},"private":false,"readonly":false,"see":[],"static":false,"type":"(args: [any]) => Promise","rawType":["(","args: [,any,]",")"," ","=>"," ","Promise","<","Buffer",">"]},{"name":"distracted","description":null,"value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"Canvacord.ts","directory":"canvas","line":10,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/Canvacord.ts#L10"},"private":false,"readonly":false,"see":[],"static":false,"type":"(args: [any, any, any]) => Promise","rawType":["(","args: [,any,any,any,]",")"," ","=>"," ","Promise","<","Buffer",">"]},{"name":"facepalm","description":null,"value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"Canvacord.ts","directory":"canvas","line":10,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/Canvacord.ts#L10"},"private":false,"readonly":false,"see":[],"static":false,"type":"(args: [any]) => Promise","rawType":["(","args: [,any,]",")"," ","=>"," ","Promise","<","Buffer",">"]},{"name":"fuse","description":null,"value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"Canvacord.ts","directory":"canvas","line":10,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/Canvacord.ts#L10"},"private":false,"readonly":false,"see":[],"static":false,"type":"(args: [any, any]) => Promise","rawType":["(","args: [,any,any,]",")"," ","=>"," ","Promise","<","Buffer",">"]},{"name":"hitler","description":null,"value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"Canvacord.ts","directory":"canvas","line":10,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/Canvacord.ts#L10"},"private":false,"readonly":false,"see":[],"static":false,"type":"(args: [any]) => Promise","rawType":["(","args: [,any,]",")"," ","=>"," ","Promise","<","Buffer",">"]},{"name":"jail","description":null,"value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"Canvacord.ts","directory":"canvas","line":10,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/Canvacord.ts#L10"},"private":false,"readonly":false,"see":[],"static":false,"type":"(args: [any, any]) => Promise","rawType":["(","args: [,any,any,]",")"," ","=>"," ","Promise","<","Buffer",">"]},{"name":"jokeoverhead","description":null,"value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"Canvacord.ts","directory":"canvas","line":10,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/Canvacord.ts#L10"},"private":false,"readonly":false,"see":[],"static":false,"type":"(args: never) => Promise","rawType":["(","args: never",")"," ","=>"," ","Promise","<","Buffer",">"]},{"name":"kiss","description":null,"value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"Canvacord.ts","directory":"canvas","line":10,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/Canvacord.ts#L10"},"private":false,"readonly":false,"see":[],"static":false,"type":"(args: [any, any]) => Promise","rawType":["(","args: [,any,any,]",")"," ","=>"," ","Promise","<","Buffer",">"]},{"name":"rainbow","description":null,"value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"Canvacord.ts","directory":"canvas","line":10,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/Canvacord.ts#L10"},"private":false,"readonly":false,"see":[],"static":false,"type":"(args: [any]) => Promise","rawType":["(","args: [,any,]",")"," ","=>"," ","Promise","<","Buffer",">"]},{"name":"rip","description":null,"value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"Canvacord.ts","directory":"canvas","line":10,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/Canvacord.ts#L10"},"private":false,"readonly":false,"see":[],"static":false,"type":"(args: [any]) => Promise","rawType":["(","args: [,any,]",")"," ","=>"," ","Promise","<","Buffer",">"]},{"name":"shit","description":null,"value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"Canvacord.ts","directory":"canvas","line":10,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/Canvacord.ts#L10"},"private":false,"readonly":false,"see":[],"static":false,"type":"(args: [any]) => Promise","rawType":["(","args: [,any,]",")"," ","=>"," ","Promise","<","Buffer",">"]},{"name":"slap","description":null,"value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"Canvacord.ts","directory":"canvas","line":10,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/Canvacord.ts#L10"},"private":false,"readonly":false,"see":[],"static":false,"type":"(args: [any, any]) => Promise","rawType":["(","args: [,any,any,]",")"," ","=>"," ","Promise","<","Buffer",">"]},{"name":"spank","description":null,"value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"Canvacord.ts","directory":"canvas","line":10,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/Canvacord.ts#L10"},"private":false,"readonly":false,"see":[],"static":false,"type":"(args: [any, any]) => Promise","rawType":["(","args: [,any,any,]",")"," ","=>"," ","Promise","<","Buffer",">"]},{"name":"trash","description":null,"value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"Canvacord.ts","directory":"canvas","line":10,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/Canvacord.ts#L10"},"private":false,"readonly":false,"see":[],"static":false,"type":"(args: [any]) => Promise","rawType":["(","args: [,any,]",")"," ","=>"," ","Promise","<","Buffer",">"]},{"name":"wanted","description":null,"value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"Canvacord.ts","directory":"canvas","line":10,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/Canvacord.ts#L10"},"private":false,"readonly":false,"see":[],"static":false,"type":"(args: [any]) => Promise","rawType":["(","args: [,any,]",")"," ","=>"," ","Promise","<","Buffer",">"]},{"name":"wasted","description":null,"value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"Canvacord.ts","directory":"canvas","line":10,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/Canvacord.ts#L10"},"private":false,"readonly":false,"see":[],"static":false,"type":"(args: [any]) => Promise","rawType":["(","args: [,any,]",")"," ","=>"," ","Promise","<","Buffer",">"]},{"name":"filters","description":null,"value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"Canvacord.ts","directory":"canvas","line":22,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/Canvacord.ts#L22"},"private":false,"readonly":false,"see":[],"static":false,"type":"any","rawType":["any"]},{"name":"triggered","description":null,"value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"Canvacord.ts","directory":"canvas","line":30,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/Canvacord.ts#L30"},"private":false,"readonly":false,"see":[],"static":false,"type":"any","rawType":["any"]}],"returns":null,"see":[],"type":"any"},"markdown":[]},{"data":{"deprecated":false,"description":null,"metadata":{"name":"Canvacord.ts","directory":"canvas","line":84,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/Canvacord.ts#L84"},"name":"CanvacordInit","parameters":[],"private":false,"properties":[{"name":"height","description":"The height of the image. Defaults to `-1` (auto).","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"Canvacord.ts","directory":"canvas","line":93,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/Canvacord.ts#L93"},"private":false,"readonly":false,"see":[],"static":false,"type":"number","rawType":["number"]},{"name":"width","description":"The width of the image. Defaults to `-1` (auto).","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"Canvacord.ts","directory":"canvas","line":88,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/Canvacord.ts#L88"},"private":false,"readonly":false,"see":[],"static":false,"type":"number","rawType":["number"]}],"returns":null,"see":[],"type":"any"},"markdown":[]},{"data":{"deprecated":false,"description":null,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":33,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageGen.ts#L33"},"name":"CustomGenerationStep","parameters":[],"private":false,"properties":[{"name":"process","description":"The function to call when processing this step.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":37,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageGen.ts#L37"},"private":false,"readonly":false,"see":[],"static":false,"type":"(canvas: Canvas, ctx: SKRSContext2D, step: ImageGenerationStep) => void","rawType":["(","canvas: Canvas","ctx: SKRSContext2D","step: ImageGenerationStep",")"," ","=>"," ","void"]}],"returns":null,"see":[],"type":"any"},"markdown":[]},{"data":{"deprecated":false,"description":null,"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":145,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageFilterer.ts#L145"},"name":"DropShadowConfig","parameters":[],"private":false,"properties":[{"name":"color","description":null,"value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":149,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageFilterer.ts#L149"},"private":false,"readonly":false,"see":[],"static":false,"type":"string","rawType":["string"]},{"name":"radius","description":null,"value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":148,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageFilterer.ts#L148"},"private":false,"readonly":false,"see":[],"static":false,"type":"number","rawType":["number"]},{"name":"x","description":null,"value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":146,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageFilterer.ts#L146"},"private":false,"readonly":false,"see":[],"static":false,"type":"number","rawType":["number"]},{"name":"y","description":null,"value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":147,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageFilterer.ts#L147"},"private":false,"readonly":false,"see":[],"static":false,"type":"number","rawType":["number"]}],"returns":null,"see":[],"type":"any"},"markdown":[]},{"data":{"deprecated":false,"description":"The template to use for image generation.","metadata":{"name":"ImageGen.ts","directory":"canvas","line":141,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageGen.ts#L141"},"name":"IImageGenerationTemplate","parameters":[],"private":false,"properties":[{"name":"gif","description":"The gif options.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":157,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageGen.ts#L157"},"private":false,"readonly":false,"see":[],"static":false,"type":"EncoderOptions","rawType":["EncoderOptions"]},{"name":"height","description":"The height of the template.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":149,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageGen.ts#L149"},"private":false,"readonly":false,"see":[],"static":false,"type":"number","rawType":["number"]},{"name":"steps","description":"The steps to apply to the canvas.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":153,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageGen.ts#L153"},"private":false,"readonly":false,"see":[],"static":false,"type":"Array","rawType":["Array","<","ImageGenerationStep",">"]},{"name":"width","description":"The width of the template.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":145,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageGen.ts#L145"},"private":false,"readonly":false,"see":[],"static":false,"type":"number","rawType":["number"]}],"returns":null,"see":[],"type":"any"},"markdown":[]},{"data":{"deprecated":false,"description":null,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":6,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageGen.ts#L6"},"name":"ImageGenerationStep","parameters":[],"private":false,"properties":[{"name":"custom","description":"The custom steps to apply to the canvas.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":18,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageGen.ts#L18"},"private":false,"readonly":false,"see":[],"static":false,"type":"Array","rawType":["Array","<","CustomGenerationStep",">"]},{"name":"image","description":"The image to render.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":10,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageGen.ts#L10"},"private":false,"readonly":false,"see":[],"static":false,"type":"Array","rawType":["Array","<","ImgenStep",">"]},{"name":"postprocess","description":"The function to call after processing has finished.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":30,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageGen.ts#L30"},"private":false,"readonly":false,"see":[],"static":false,"type":"(canvas: Canvas, ctx: SKRSContext2D, step: ImageGenerationStep) => void","rawType":["(","canvas: Canvas","ctx: SKRSContext2D","step: ImageGenerationStep",")"," ","=>"," ","void"]},{"name":"preprocess","description":"The function to call before processing this step.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":22,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageGen.ts#L22"},"private":false,"readonly":false,"see":[],"static":false,"type":"(canvas: Canvas, ctx: SKRSContext2D, step: ImageGenerationStep) => void","rawType":["(","canvas: Canvas","ctx: SKRSContext2D","step: ImageGenerationStep",")"," ","=>"," ","void"]},{"name":"process","description":"The function to call when processing this step.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":26,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageGen.ts#L26"},"private":false,"readonly":false,"see":[],"static":false,"type":"(canvas: Canvas, ctx: SKRSContext2D, step: ImageGenerationStep) => void","rawType":["(","canvas: Canvas","ctx: SKRSContext2D","step: ImageGenerationStep",")"," ","=>"," ","void"]},{"name":"text","description":"The text to render.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":14,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageGen.ts#L14"},"private":false,"readonly":false,"see":[],"static":false,"type":"Array","rawType":["Array","<","TextGenerationStep",">"]}],"returns":null,"see":[],"type":"any"},"markdown":[]},{"data":{"deprecated":false,"description":null,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":40,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageGen.ts#L40"},"name":"ImgenStep","parameters":[],"private":false,"properties":[{"name":"height","description":"The height of the image.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":60,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageGen.ts#L60"},"private":false,"readonly":false,"see":[],"static":false,"type":"number","rawType":["number"]},{"name":"postprocess","description":"The function to call after processing has finished.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":72,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageGen.ts#L72"},"private":false,"readonly":false,"see":[],"static":false,"type":"(canvas: Canvas, ctx: SKRSContext2D, source: ImgenStep) => void","rawType":["(","canvas: Canvas","ctx: SKRSContext2D","source: ImgenStep",")"," ","=>"," ","void"]},{"name":"preprocess","description":"The function to call before processing this step.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":64,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageGen.ts#L64"},"private":false,"readonly":false,"see":[],"static":false,"type":"(canvas: Canvas, ctx: SKRSContext2D, source: ImgenStep) => void","rawType":["(","canvas: Canvas","ctx: SKRSContext2D","source: ImgenStep",")"," ","=>"," ","void"]},{"name":"process","description":"The function to call when processing this step.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":68,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageGen.ts#L68"},"private":false,"readonly":false,"see":[],"static":false,"type":"(canvas: Canvas, ctx: SKRSContext2D, source: ImgenStep) => void","rawType":["(","canvas: Canvas","ctx: SKRSContext2D","source: ImgenStep",")"," ","=>"," ","void"]},{"name":"source","description":"The image to render.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":44,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageGen.ts#L44"},"private":false,"readonly":false,"see":[],"static":false,"type":"TemplateImage","rawType":["TemplateImage"]},{"name":"width","description":"The width of the image.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":56,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageGen.ts#L56"},"private":false,"readonly":false,"see":[],"static":false,"type":"number","rawType":["number"]},{"name":"x","description":"The x position of the image.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":48,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageGen.ts#L48"},"private":false,"readonly":false,"see":[],"static":false,"type":"number","rawType":["number"]},{"name":"y","description":"The y position of the image.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":52,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageGen.ts#L52"},"private":false,"readonly":false,"see":[],"static":false,"type":"number","rawType":["number"]}],"returns":null,"see":[],"type":"any"},"markdown":[]},{"data":{"deprecated":false,"description":null,"metadata":{"name":"LeaderboardBuilder.tsx","directory":"components","line":12,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/components/LeaderboardBuilder.tsx#L12"},"name":"LeaderboardProps","parameters":[],"private":false,"properties":[{"name":"abbreviate","description":"Whether or not to abbreviate the numeric values.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"LeaderboardBuilder.tsx","directory":"components","line":78,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/components/LeaderboardBuilder.tsx#L78"},"private":false,"readonly":false,"see":[],"static":false,"type":"boolean","rawType":["boolean"]},{"name":"background","description":"The background image.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"LeaderboardBuilder.tsx","directory":"components","line":16,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/components/LeaderboardBuilder.tsx#L16"},"private":false,"readonly":false,"see":[],"static":false,"type":"null | ImageSource","rawType":["null","ImageSource"]},{"name":"backgroundColor","description":"The background color.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"LeaderboardBuilder.tsx","directory":"components","line":20,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/components/LeaderboardBuilder.tsx#L20"},"private":false,"readonly":false,"see":[],"static":false,"type":"string","rawType":["string"]},{"name":"header","description":"The header of this leaderboard ui.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"LeaderboardBuilder.tsx","directory":"components","line":24,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/components/LeaderboardBuilder.tsx#L24"},"private":false,"readonly":false,"see":[],"static":false,"type":"{ image: ImageSource, subtitle: string, title: string }","rawType":["{"," ","image",":"," ","ImageSource","; ","subtitle",":"," ","string","; ","title",":"," ","string",";"," ","}"]},{"name":"players","description":"The players of this leaderboard ui.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"LeaderboardBuilder.tsx","directory":"components","line":41,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/components/LeaderboardBuilder.tsx#L41"},"private":false,"readonly":false,"see":[],"static":false,"type":"Array<{ avatar: ImageSource, displayName: string, level: number, rank: number, username: string, xp: number }>","rawType":["Array","<","{"," ","avatar",":"," ","ImageSource","; ","displayName",":"," ","string","; ","level",":"," ","number","; ","rank",":"," ","number","; ","username",":"," ","string","; ","xp",":"," ","number",";"," ","}",">"]},{"name":"text","description":"The text values of this leaderboard ui.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"LeaderboardBuilder.tsx","directory":"components","line":70,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/components/LeaderboardBuilder.tsx#L70"},"private":false,"readonly":false,"see":[],"static":false,"type":"{ level: string, rank: string, xp: string }","rawType":["{"," ","level",":"," ","string","; ","rank",":"," ","string","; ","xp",":"," ","string",";"," ","}"]}],"returns":null,"see":[],"type":"any"},"markdown":[]},{"data":{"deprecated":false,"description":"The options for loading an image.","metadata":{"name":"loadImage.ts","directory":"helpers","line":41,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/helpers/loadImage.ts#L41"},"name":"LoadImageOptions","parameters":[],"private":false,"properties":[{"name":"headers","description":"The headers to use when downloading the image.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"loadImage.ts","directory":"helpers","line":45,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/helpers/loadImage.ts#L45"},"private":false,"readonly":false,"see":[],"static":false,"type":"Record","rawType":["Record","<","string","string",">"]},{"name":"maxRedirects","description":"The maximum number of redirects to follow.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"loadImage.ts","directory":"helpers","line":49,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/helpers/loadImage.ts#L49"},"private":false,"readonly":false,"see":[],"static":false,"type":"number","rawType":["number"]},{"name":"requestOptions","description":"Other request options to use when downloading the image.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"loadImage.ts","directory":"helpers","line":53,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/helpers/loadImage.ts#L53"},"private":false,"readonly":false,"see":[],"static":false,"type":"RequestOptions","rawType":["RequestOptions"]}],"returns":null,"see":[],"type":"any"},"markdown":[]},{"data":{"deprecated":false,"description":"The builder node.","metadata":{"name":"Builder.tsx","directory":"templates","line":146,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L146"},"name":"Node","parameters":[],"private":false,"properties":[{"name":"toElement","description":null,"value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"Builder.tsx","directory":"templates","line":150,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L150"},"private":false,"readonly":false,"see":[],"static":false,"type":"any","rawType":["any"]}],"returns":null,"see":[],"type":"any"},"markdown":[]},{"data":{"deprecated":false,"description":null,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":75,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageGen.ts#L75"},"name":"TextGenerationStep","parameters":[],"private":false,"properties":[{"name":"align","description":"The alignment of the text.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":115,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageGen.ts#L115"},"private":false,"readonly":false,"see":[],"static":false,"type":"'left' | 'center' | 'right'","rawType":["'","left","'","'","center","'","'","right","'"]},{"name":"baseline","description":"The baseline of the text.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":119,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageGen.ts#L119"},"private":false,"readonly":false,"see":[],"static":false,"type":"'top' | 'middle' | 'bottom'","rawType":["'","top","'","'","middle","'","'","bottom","'"]},{"name":"color","description":"The color of the text.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":87,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageGen.ts#L87"},"private":false,"readonly":false,"see":[],"static":false,"type":"string","rawType":["string"]},{"name":"direction","description":"The directionality of the text.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":123,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageGen.ts#L123"},"private":false,"readonly":false,"see":[],"static":false,"type":"'inherit' | 'ltr' | 'rtl'","rawType":["'","inherit","'","'","ltr","'","'","rtl","'"]},{"name":"font","description":"The font of the text.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":83,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageGen.ts#L83"},"private":false,"readonly":false,"see":[],"static":false,"type":"string","rawType":["string"]},{"name":"lineHeight","description":"The line height of the text.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":107,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageGen.ts#L107"},"private":false,"readonly":false,"see":[],"static":false,"type":"number","rawType":["number"]},{"name":"lineWidth","description":"The line width of the text.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":111,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageGen.ts#L111"},"private":false,"readonly":false,"see":[],"static":false,"type":"number","rawType":["number"]},{"name":"maxWidth","description":"The maximum width of the text.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":103,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageGen.ts#L103"},"private":false,"readonly":false,"see":[],"static":false,"type":"number","rawType":["number"]},{"name":"postprocess","description":"The function to call after processing has finished.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":135,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageGen.ts#L135"},"private":false,"readonly":false,"see":[],"static":false,"type":"(canvas: Canvas, ctx: SKRSContext2D, text: TextGenerationStep) => void","rawType":["(","canvas: Canvas","ctx: SKRSContext2D","text: TextGenerationStep",")"," ","=>"," ","void"]},{"name":"preprocess","description":"The function to call before processing this step.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":127,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageGen.ts#L127"},"private":false,"readonly":false,"see":[],"static":false,"type":"(canvas: Canvas, ctx: SKRSContext2D, text: TextGenerationStep) => void","rawType":["(","canvas: Canvas","ctx: SKRSContext2D","text: TextGenerationStep",")"," ","=>"," ","void"]},{"name":"process","description":"The function to call when processing this step.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":131,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageGen.ts#L131"},"private":false,"readonly":false,"see":[],"static":false,"type":"(canvas: Canvas, ctx: SKRSContext2D, text: TextGenerationStep) => void","rawType":["(","canvas: Canvas","ctx: SKRSContext2D","text: TextGenerationStep",")"," ","=>"," ","void"]},{"name":"stroke","description":"Whether to stroke the text.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":91,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageGen.ts#L91"},"private":false,"readonly":false,"see":[],"static":false,"type":"boolean","rawType":["boolean"]},{"name":"value","description":"The text to render.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":79,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageGen.ts#L79"},"private":false,"readonly":false,"see":[],"static":false,"type":"string","rawType":["string"]},{"name":"x","description":"The x position of the text.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":95,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageGen.ts#L95"},"private":false,"readonly":false,"see":[],"static":false,"type":"number","rawType":["number"]},{"name":"y","description":"The y position of the text.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":99,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/ImageGen.ts#L99"},"private":false,"readonly":false,"see":[],"static":false,"type":"number","rawType":["number"]}],"returns":null,"see":[],"type":"any"},"markdown":[]},{"data":{"deprecated":false,"description":"The build output format.","metadata":{"name":"Builder.tsx","directory":"templates","line":123,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L123"},"name":"BuildFormat","parameters":[],"private":false,"properties":[],"returns":null,"see":[],"type":"'svg' | 'png' | 'avif' | 'jpeg' | 'webp' | 'raw'"},"markdown":[]},{"data":{"deprecated":false,"description":null,"metadata":{"name":"Builder.tsx","directory":"templates","line":84,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L84"},"name":"BuilderBuildInit","parameters":[],"private":false,"properties":[],"returns":null,"see":[],"type":"Partial & { skipSingleCapture: boolean }"},"markdown":[]},{"data":{"deprecated":false,"description":"The builder build options.","metadata":{"name":"Builder.tsx","directory":"templates","line":128,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L128"},"name":"BuilderBuildOptions","parameters":[],"private":false,"properties":[],"returns":null,"see":[],"type":"{ format: BuildFormat, options: RenderSvgOptions, signal: AbortSignal } & SatoriOptions"},"markdown":[]},{"data":{"deprecated":false,"description":null,"metadata":{"name":"Builder.tsx","directory":"templates","line":90,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L90"},"name":"BuilderResult","parameters":[],"private":false,"properties":[],"returns":null,"see":[],"type":"O['skipSingleCapture'] extends true ? Array> : BuilderResultInner"},"markdown":[]},{"data":{"deprecated":false,"description":null,"metadata":{"name":"Builder.tsx","directory":"templates","line":88,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L88"},"name":"BuilderResultInner","parameters":[],"private":false,"properties":[],"returns":null,"see":[],"type":"O['format'] extends 'svg' ? string : Buffer"},"markdown":[]},{"data":{"deprecated":false,"description":"The CSS properties like object.","metadata":{"name":"StyleSheet.ts","directory":"helpers","line":14,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/helpers/StyleSheet.ts#L14"},"name":"CSSPropertiesLike","parameters":[],"private":false,"properties":[],"returns":null,"see":[],"type":"Record"},"markdown":[]},{"data":{"deprecated":false,"description":null,"metadata":{"name":"Canvacord.ts","directory":"canvas","line":114,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/Canvacord.ts#L114"},"name":"Canvacord","parameters":[],"private":false,"properties":[],"returns":null,"see":[],"type":"CanvacordFactory & (typeof CanvacordConstructor)"},"markdown":[]},{"data":{"deprecated":false,"description":null,"metadata":{"name":"utils.ts","directory":"canvas","line":22,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/utils.ts#L22"},"name":"ContextManipulationStep","parameters":[],"private":false,"properties":[],"returns":null,"see":[],"type":"(ctx: SKRSContext2D) => Awaited"},"markdown":[]},{"data":{"deprecated":false,"description":null,"metadata":{"name":"useState.ts","directory":"hooks","line":3},"name":"Dispatch","parameters":[],"private":false,"properties":[],"returns":null,"see":[],"type":"(value: A) => void"},"markdown":[]},{"data":{"deprecated":false,"description":"The element initialization options.","metadata":{"name":"jsx.ts","directory":"helpers","line":12,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/helpers/jsx.ts#L12"},"name":"ElementInit","parameters":[],"private":false,"properties":[],"returns":null,"see":[],"type":"{ children: any, key: React.Key | null, props: Record, type: string }"},"markdown":[]},{"data":{"deprecated":false,"description":null,"metadata":{"name":"Encodable.ts","directory":"canvas","line":3,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/Encodable.ts#L3"},"name":"EncodingFormat","parameters":[],"private":false,"properties":[],"returns":null,"see":[],"type":"'png' | 'jpeg' | 'webp' | 'avif' | 'raw'"},"markdown":[]},{"data":{"deprecated":false,"description":null,"metadata":{"name":"Builder.tsx","directory":"templates","line":11,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L11"},"name":"GraphemeProvider","parameters":[],"private":false,"properties":[],"returns":null,"see":[],"type":"Record"},"markdown":[]},{"data":{"deprecated":false,"description":null,"metadata":{"name":"Canvacord.ts","directory":"canvas","line":9,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/canvas/Canvacord.ts#L9"},"name":"ImageGeneratorImplementor","parameters":[],"private":false,"properties":[],"returns":null,"see":[],"type":"any"},"markdown":[]},{"data":{"deprecated":false,"description":"The supported image sources. It can be a buffer, a readable stream, a string, a URL instance or an Image instance.","metadata":{"name":"loadImage.ts","directory":"helpers","line":24,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/helpers/loadImage.ts#L24"},"name":"ImageSource","parameters":[],"private":false,"properties":[],"returns":null,"see":[],"type":"CanvacordImage | Buffer | ArrayBuffer | Uint16Array | Uint32Array | Uint8Array | Uint8ClampedArray | SharedArrayBuffer | Readable | string | URL | Image"},"markdown":[]},{"data":{"deprecated":false,"description":null,"metadata":{"name":"useState.ts","directory":"hooks","line":4},"name":"SetStateAction","parameters":[],"private":false,"properties":[],"returns":null,"see":[],"type":"S | (prevState: S) => S"},"markdown":[]},{"data":{"deprecated":false,"description":null,"metadata":{"name":"StyleSheet.ts","directory":"helpers","line":4,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/helpers/StyleSheet.ts#L4"},"name":"Stylable","parameters":[],"private":false,"properties":[],"returns":null,"see":[],"type":"{ className: string, style: CSSPropertiesLike } | string"},"markdown":[]}],"enum":[],"variables":[{"data":{"deprecated":false,"description":null,"metadata":{"name":"Builder.tsx","directory":"templates","line":55,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L55"},"name":"BuiltInGraphemeProvider","parameters":[],"private":false,"properties":[],"returns":null,"see":[],"type":"{ Blobmoji: GraphemeProvider, FluentEmojiColor: GraphemeProvider, FluentEmojiFlat: GraphemeProvider, FluentEmojiHighContrast: GraphemeProvider, None: GraphemeProvider, Noto: GraphemeProvider, Openmoji: GraphemeProvider, Twemoji: GraphemeProvider }"},"markdown":[]},{"data":{"deprecated":false,"description":null,"metadata":{"name":"Builder.tsx","directory":"templates","line":95,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L95"},"name":"EmojiCache","parameters":[],"private":false,"properties":[],"returns":null,"see":[],"type":"Map"},"markdown":[]},{"data":{"deprecated":false,"description":null,"metadata":{"name":"Builder.tsx","directory":"templates","line":96,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/templates/Builder.tsx#L96"},"name":"ExecutionContext","parameters":[],"private":false,"properties":[],"returns":null,"see":[],"type":"AsyncLocalStorage, unknown>>"},"markdown":[]},{"data":{"deprecated":false,"description":null,"metadata":{"name":"AssetsFactory.ts","directory":"assets","line":3,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/assets/AssetsFactory.ts#L3"},"name":"FontFactory","parameters":[],"private":false,"properties":[],"returns":null,"see":[],"type":"Map"},"markdown":[]},{"data":{"deprecated":false,"description":"The bundled fonts in this package.","metadata":{"name":"fonts.ts","directory":"assets/fonts","line":4,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/assets/fonts/fonts.ts#L4"},"name":"Fonts","parameters":[],"private":false,"properties":[],"returns":null,"see":[],"type":"{ Geist: }"},"markdown":[]},{"data":{"deprecated":false,"description":"The image assets factory.","metadata":{"name":"AssetsFactory.ts","directory":"assets","line":13,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/assets/AssetsFactory.ts#L13"},"name":"ImageFactory","parameters":[],"private":false,"properties":[],"returns":null,"see":[],"type":"{ AFFECT: string, BATSLAP: string, BEAUTIFUL: string, BED: string, BOTBADGE: string, CAPTCHA: string, CHANGEMYMIND: string, CLYDE: string, DELETE: string, DISCORD: string, DISTRACTED: string, DND: string, FACEPALM: string, HITLER: string, IDLE: string, IMPOSTER: string, IMPOSTERWITH: string, JAIL: string, JOKEOVERHEAD: string, KICK: string, KISS: string, KO: string, OFFLINE: string, OHNO: string, ONLINE: string, OPINION: string, PHUB: string, PUNCH: string, RAINBOW: string, RIP: string, SHIT: string, SNOWFLAKE: string, SPANK: string, TOBECONTINUED: string, TRASH: string, TRIGGERED: string, WANTED: string, WASTED: string, WELCOMEBG: string, YOUTUBE: string }"},"markdown":[]},{"data":{"deprecated":false,"description":"The JSX factory for canvacord jsx.","metadata":{"name":"jsx.ts","directory":"helpers","line":62,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/helpers/jsx.ts#L62"},"name":"JSX","parameters":[],"private":false,"properties":[],"returns":null,"see":[],"type":"{ Element: (typeof Element), Fragment: , createElement: }"},"markdown":[]},{"data":{"deprecated":false,"description":"The built-in template factory.","metadata":{"name":"TemplateFactory.ts","directory":"assets","line":57,"url":"https://github.com/neplextech/canvacord/blob/6c18ee5/packages/canvacord/src/assets/TemplateFactory.ts#L57"},"name":"TemplateFactory","parameters":[],"private":false,"properties":[],"returns":null,"see":[],"type":"{ Affect: (args: [any]) => ImageGenerationTemplate, Beautiful: (args: [any]) => ImageGenerationTemplate, Bed: (args: [any, any]) => ImageGenerationTemplate, Colorfy: (args: [any, any]) => ImageGenerationTemplate, Delete: (args: [any]) => ImageGenerationTemplate, Distracted: (args: [any, any, any]) => ImageGenerationTemplate, Facepalm: (args: [any]) => ImageGenerationTemplate, Fuse: (args: [any, any]) => ImageGenerationTemplate, Hitler: (args: [any]) => ImageGenerationTemplate, Jail: (args: [any, any]) => ImageGenerationTemplate, JokeOverHead: (args: [any]) => ImageGenerationTemplate, Kiss: (args: [any, any]) => ImageGenerationTemplate, Rainbow: (args: [any]) => ImageGenerationTemplate, Rip: (args: [any]) => ImageGenerationTemplate, Shit: (args: [any]) => ImageGenerationTemplate, Slap: (args: [any, any]) => ImageGenerationTemplate, Spank: (args: [any, any]) => ImageGenerationTemplate, Trash: (args: [any]) => ImageGenerationTemplate, Triggered: (args: [any]) => ImageGenerationTemplate, Wanted: (args: [any]) => ImageGenerationTemplate, Wasted: (args: [any]) => ImageGenerationTemplate }"},"markdown":[]}]}},"metadata":{"generationMs":2804.0591999999997,"timestamp":1704644878272}} \ No newline at end of file +{"custom":{},"modules":{"canvacord":{"classes":[{"data":{"name":"Builder","abstract":false,"constructor":{"name":"Builder","description":"Create a new builder.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"width","description":"the width of this builder.","optional":false,"default":null,"type":"number","rawType":["number"]},{"name":"height","description":"the height of this builder.","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"Builder","rawType":["Builder","<","T",">"],"description":null},"metadata":{"name":"Builder.tsx","directory":"template","line":149},"constructor":"new Builder"},"metadata":{"name":"Builder.tsx","directory":"template","line":124},"deprecated":false,"description":null,"extends":null,"implements":null,"rawExtends":null,"rawImplements":null,"methods":[{"name":"addComponent","description":"Add component to this builder.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"component","description":"the component to add.","optional":false,"default":null,"type":"T | Array","rawType":["T","Array","<","T",">"]}],"returns":{"type":"Builder","rawType":["Builder","<","T",">"],"description":null},"metadata":{"name":"Builder.tsx","directory":"template","line":194}},{"name":"adjustCanvas","description":"Adjust the canvas size.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"Builder","rawType":["Builder","<","T",">"],"description":null},"metadata":{"name":"Builder.tsx","directory":"template","line":166}},{"name":"bootstrap","description":"Bootstrap this builder with data.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"data","description":null,"optional":false,"default":null,"type":"T","rawType":["T"]}],"returns":{"type":"void","rawType":["void"],"description":null},"metadata":{"name":"Builder.tsx","directory":"template","line":159}},{"name":"build","description":"Convert this builder into an image.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"options","description":"the build options.","optional":false,"default":null,"type":"Partial","rawType":["Partial","<","BuilderBuildOptions",">"]}],"returns":{"type":"Promise","rawType":["Promise","<","string","Buffer",">"],"description":"the image buffer or svg string."},"metadata":{"name":"Builder.tsx","directory":"template","line":246}},{"name":"render","description":"Render this builder.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"Promise","rawType":["Promise","<","ReactNode",">"],"description":null},"metadata":{"name":"Builder.tsx","directory":"template","line":237}},{"name":"setGraphemeProvider","description":"Set grapheme image provider for this builder.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"provider","description":null,"optional":false,"default":null,"type":"GraphemeProvider","rawType":["GraphemeProvider"]}],"returns":{"type":"Builder","rawType":["Builder","<","T",">"],"description":null},"metadata":{"name":"Builder.tsx","directory":"template","line":211}},{"name":"setStyle","description":"Set the style of this builder.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"newStyle","description":"the new style.","optional":false,"default":null,"type":"CSSProperties","rawType":["CSSProperties"]}],"returns":{"type":"Builder","rawType":["Builder","<","T",">"],"description":null},"metadata":{"name":"Builder.tsx","directory":"template","line":220}},{"name":"from","description":"Create a builder from builder template.","see":[],"static":true,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"template","description":null,"optional":false,"default":null,"type":"BuilderTemplate","rawType":["BuilderTemplate"]}],"returns":{"type":"Builder>","rawType":["Builder","<","Record","<","string","unknown",">",">"],"description":null},"metadata":{"name":"Builder.tsx","directory":"template","line":296}}],"private":false,"properties":[{"abstract":false,"default":"...","deprecated":false,"description":"The components of this builder.","metadata":{"name":"Builder.tsx","directory":"template","line":133},"name":"components","private":false,"readonly":false,"see":[],"static":false,"type":"Array"},{"abstract":false,"default":"BuiltInGraphemeProvider.Twemoji","deprecated":false,"description":"The grapheme provider of this builder.","metadata":{"name":"Builder.tsx","directory":"template","line":142},"name":"graphemeProvider","private":false,"readonly":false,"see":[],"static":false,"type":"GraphemeProvider"},{"abstract":false,"default":null,"deprecated":false,"description":"the height of this builder.","metadata":{"name":"Builder.tsx","directory":"template","line":151},"name":"height","private":false,"readonly":false,"see":[],"static":false,"type":"number"},{"abstract":false,"default":"...","deprecated":false,"description":"The options manager of this builder.","metadata":{"name":"Builder.tsx","directory":"template","line":137},"name":"options","private":false,"readonly":false,"see":[],"static":false,"type":"BuilderOptionsManager"},{"abstract":false,"default":"\"\"","deprecated":false,"description":"The tailwind subset to apply to this builder.","metadata":{"name":"Builder.tsx","directory":"template","line":129},"name":"tw","private":false,"readonly":false,"see":[],"static":false,"type":"string"},{"abstract":false,"default":null,"deprecated":false,"description":"the width of this builder.","metadata":{"name":"Builder.tsx","directory":"template","line":150},"name":"width","private":false,"readonly":false,"see":[],"static":false,"type":"number"},{"default":null,"description":"Get the style of this builder.","metadata":{"name":"Builder.tsx","directory":"template","line":179},"name":"style","type":"CSSProperties"}],"see":[]},"markdown":[]},{"data":{"name":"BuilderOptionsManager","abstract":false,"constructor":{"name":"BuilderOptionsManager","description":"Creates a new builder options manager.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"options","description":"The options to use","optional":false,"default":null,"type":"T","rawType":["T"]}],"returns":{"type":"BuilderOptionsManager","rawType":["BuilderOptionsManager","<","T",">"],"description":null},"metadata":{"name":"BuilderOptionsManager.ts","directory":"template","line":7},"constructor":"new BuilderOptionsManager"},"metadata":{"name":"BuilderOptionsManager.ts","directory":"template","line":2},"deprecated":false,"description":null,"extends":null,"implements":null,"rawExtends":null,"rawImplements":null,"methods":[{"name":"get","description":"Get an option by name.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"key","description":"The option name","optional":false,"default":null,"type":"K","rawType":["K"]}],"returns":{"type":"T[K]","rawType":["T","[","K","]"],"description":"The option value"},"metadata":{"name":"BuilderOptionsManager.ts","directory":"template","line":29}},{"name":"getOptions","description":"Returns the options.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"T","rawType":["T"],"description":null},"metadata":{"name":"BuilderOptionsManager.ts","directory":"template","line":12}},{"name":"merge","description":"Merge new data to old data on an option by name.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"key","description":null,"optional":false,"default":null,"type":"K","rawType":["K"]},{"name":"value","description":null,"optional":false,"default":null,"type":"Partial","rawType":["Partial","<","T","[","K","]",">"]}],"returns":{"type":"void","rawType":["void"],"description":null},"metadata":{"name":"BuilderOptionsManager.ts","directory":"template","line":45}},{"name":"set","description":"Set an option by name.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"key","description":"The option name","optional":false,"default":null,"type":"K","rawType":["K"]},{"name":"value","description":"The option value","optional":false,"default":null,"type":"T[K]","rawType":["T","[","K","]"]}],"returns":{"type":"void","rawType":["void"],"description":null},"metadata":{"name":"BuilderOptionsManager.ts","directory":"template","line":38}},{"name":"setOptions","description":"Sets the options. This will override the previous options.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"options","description":"The options to use","optional":false,"default":null,"type":"T","rawType":["T"]}],"returns":{"type":"void","rawType":["void"],"description":null},"metadata":{"name":"BuilderOptionsManager.ts","directory":"template","line":20}}],"private":false,"properties":[],"see":[]},"markdown":[]},{"data":{"name":"CanvasHelper","abstract":true,"constructor":{"name":"CanvasHelper","description":"Creates a new CanvasHelper instance.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"width","description":"The width of the canvas","optional":false,"default":null,"type":"number","rawType":["number"]},{"name":"height","description":"The height of the canvas","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"CanvasHelper","rawType":["CanvasHelper"],"description":null},"metadata":{"name":"CanvasHelper.ts","directory":"canvas","line":17,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/CanvasHelper.ts#L17"},"constructor":"new CanvasHelper"},"metadata":{"name":"CanvasHelper.ts","directory":"canvas","line":5,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/CanvasHelper.ts#L5"},"deprecated":false,"description":null,"extends":"Encodable","implements":null,"rawExtends":["Encodable"],"rawImplements":null,"methods":[{"name":"encode","description":"Encodes the canvas to a buffer.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"Promise","rawType":["Promise","<","Buffer",">"],"description":null},"metadata":{"name":"Encodable.ts","directory":"canvas","line":14,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/Encodable.ts#L14"}},{"name":"getFinalCanvas","description":"Returns the canvas instance by applying the steps.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"Promise","rawType":["Promise","<","Canvas",">"],"description":null},"metadata":{"name":"CanvasHelper.ts","directory":"canvas","line":27,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/CanvasHelper.ts#L27"}},{"name":"process","description":"Processes the steps and applies them to the canvas.","see":[],"static":false,"private":false,"examples":[],"abstract":true,"deprecated":false,"parameters":[{"name":"canvas","description":null,"optional":false,"default":null,"type":"Canvas","rawType":["Canvas"]},{"name":"ctx","description":null,"optional":false,"default":null,"type":"SKRSContext2D","rawType":["SKRSContext2D"]}],"returns":{"type":"Promise","rawType":["Promise","<","void",">"],"description":null},"metadata":{"name":"CanvasHelper.ts","directory":"canvas","line":39,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/CanvasHelper.ts#L39"}}],"private":false,"properties":[{"abstract":false,"default":null,"deprecated":false,"description":"The height of the canvas","metadata":{"name":"CanvasHelper.ts","directory":"canvas","line":19,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/CanvasHelper.ts#L19"},"name":"height","private":false,"readonly":false,"see":[],"static":false,"type":"number"},{"abstract":false,"default":"[]","deprecated":false,"description":"The steps to apply to the canvas.","metadata":{"name":"CanvasHelper.ts","directory":"canvas","line":9,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/CanvasHelper.ts#L9"},"name":"steps","private":false,"readonly":false,"see":[],"static":false,"type":"Array"},{"abstract":false,"default":null,"deprecated":false,"description":"The width of the canvas","metadata":{"name":"CanvasHelper.ts","directory":"canvas","line":18,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/CanvasHelper.ts#L18"},"name":"width","private":false,"readonly":false,"see":[],"static":false,"type":"number"}],"see":[]},"markdown":[]},{"data":{"name":"CanvasImage","abstract":false,"constructor":{"name":"CanvasImage","description":"Creates a new CanvasImage instance.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"source","description":"The image source","optional":false,"default":null,"type":"ImageSource","rawType":["ImageSource"]},{"name":"width","description":"The width of the image","optional":true,"default":null,"type":"number","rawType":["number"]},{"name":"height","description":"The height of the image","optional":true,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"CanvasImage","rawType":["CanvasImage"],"description":null},"metadata":{"name":"CanvasImage.ts","directory":"canvas","line":15,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/CanvasImage.ts#L15"},"constructor":"new CanvasImage"},"metadata":{"name":"CanvasImage.ts","directory":"canvas","line":6,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/CanvasImage.ts#L6"},"deprecated":false,"description":null,"extends":"ImageFilterer","implements":null,"rawExtends":["ImageFilterer"],"rawImplements":null,"methods":[{"name":"blur","description":"Applies blur filter to the image.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"value","description":"The filter intensity","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"CanvasImage","rawType":["CanvasImage"],"description":null},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":109,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageFilterer.ts#L109"}},{"name":"brightness","description":"Applies brightness filter to the image.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"value","description":"The filter intensity","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"CanvasImage","rawType":["CanvasImage"],"description":null},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":99,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageFilterer.ts#L99"}},{"name":"circle","description":"Draws the image to the canvas with a circle clip.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"width","description":"The width of the image","optional":true,"default":null,"type":"number","rawType":["number"]},{"name":"height","description":"The height of the image","optional":true,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"CanvasImage","rawType":["CanvasImage"],"description":null},"metadata":{"name":"CanvasImage.ts","directory":"canvas","line":58,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/CanvasImage.ts#L58"}},{"name":"contrast","description":"Applies contrast filter to the image.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"value","description":"The filter intensity","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"CanvasImage","rawType":["CanvasImage"],"description":null},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":89,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageFilterer.ts#L89"}},{"name":"draw","description":"Draws the image to the canvas.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"x","description":"The x position to draw the image","optional":false,"default":null,"type":"number","rawType":["number"]},{"name":"y","description":"The y position to draw the image","optional":false,"default":null,"type":"number","rawType":["number"]},{"name":"width","description":"The width of the image","optional":true,"default":null,"type":"number","rawType":["number"]},{"name":"height","description":"The height of the image","optional":true,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"CanvasImage","rawType":["CanvasImage"],"description":null},"metadata":{"name":"CanvasImage.ts","directory":"canvas","line":38,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/CanvasImage.ts#L38"}},{"name":"drawImage","description":"Draws the image to the canvas.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"image","description":"The image to draw","optional":false,"default":null,"type":"ImageSource","rawType":["ImageSource"]},{"name":"x","description":"The x position to draw the image","optional":false,"default":null,"type":"number","rawType":["number"]},{"name":"y","description":"The y position to draw the image","optional":false,"default":null,"type":"number","rawType":["number"]},{"name":"width","description":"The width of the image","optional":true,"default":null,"type":"number","rawType":["number"]},{"name":"height","description":"The height of the image","optional":true,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"CanvasImage","rawType":["CanvasImage"],"description":null},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":17,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageFilterer.ts#L17"}},{"name":"dropShadow","description":"Applies drop-shadow filter to the image.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"config","description":"The drop-shadow config","optional":false,"default":null,"type":"DropShadowConfig","rawType":["DropShadowConfig"]}],"returns":{"type":"CanvasImage","rawType":["CanvasImage"],"description":null},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":123,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageFilterer.ts#L123"}},{"name":"encode","description":"Encodes the canvas to a buffer.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"Promise","rawType":["Promise","<","Buffer",">"],"description":null},"metadata":{"name":"Encodable.ts","directory":"canvas","line":14,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/Encodable.ts#L14"}},{"name":"getFinalCanvas","description":"Returns the canvas instance by applying the steps.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"Promise","rawType":["Promise","<","Canvas",">"],"description":null},"metadata":{"name":"CanvasImage.ts","directory":"canvas","line":126,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/CanvasImage.ts#L126"}},{"name":"grayscale","description":"Applies grayscale filter to the image.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"value","description":"The filter intensity","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"CanvasImage","rawType":["CanvasImage"],"description":null},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":40,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageFilterer.ts#L40"}},{"name":"hueRotate","description":"Applies hue-rotate filter to the image.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"value","description":"The degrees to rotate","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"CanvasImage","rawType":["CanvasImage"],"description":null},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":79,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageFilterer.ts#L79"}},{"name":"invert","description":"Applies invert filter to the image.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"value","description":"The filter intensity","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"CanvasImage","rawType":["CanvasImage"],"description":null},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":30,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageFilterer.ts#L30"}},{"name":"opacity","description":"Applies opacity filter to the image.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"value","description":"The filter intensity","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"CanvasImage","rawType":["CanvasImage"],"description":null},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":59,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageFilterer.ts#L59"}},{"name":"pixelate","description":"Draws pixelated image to the canvas.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"pixels","description":"The amount of pixels to use","optional":true,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"CanvasImage","rawType":["CanvasImage"],"description":null},"metadata":{"name":"CanvasImage.ts","directory":"canvas","line":79,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/CanvasImage.ts#L79"}},{"name":"process","description":"Renders the applied filters to the canvas.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"canvas","description":"The canvas to render the filters to","optional":false,"default":null,"type":"Canvas","rawType":["Canvas"]},{"name":"ctx","description":"The canvas context","optional":false,"default":null,"type":"SKRSContext2D","rawType":["SKRSContext2D"]}],"returns":{"type":"Promise","rawType":["Promise","<","void",">"],"description":null},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":135,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageFilterer.ts#L135"}},{"name":"restore","description":"Restores the last saved canvas context state.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"CanvasImage","rawType":["CanvasImage"],"description":null},"metadata":{"name":"CanvasImage.ts","directory":"canvas","line":115,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/CanvasImage.ts#L115"}},{"name":"saturate","description":"Applies saturate filter to the image.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"value","description":"The filter intensity","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"CanvasImage","rawType":["CanvasImage"],"description":null},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":69,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageFilterer.ts#L69"}},{"name":"save","description":"Saves the canvas context state.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"CanvasImage","rawType":["CanvasImage"],"description":null},"metadata":{"name":"CanvasImage.ts","directory":"canvas","line":104,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/CanvasImage.ts#L104"}},{"name":"sepia","description":"Applies sepia filter to the image.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"value","description":"The filter intensity","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"CanvasImage","rawType":["CanvasImage"],"description":null},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":49,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageFilterer.ts#L49"}}],"private":false,"properties":[{"abstract":false,"default":null,"deprecated":false,"description":"The height of the canvas","metadata":{"name":"CanvasHelper.ts","directory":"canvas","line":19,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/CanvasHelper.ts#L19"},"name":"height","private":false,"readonly":false,"see":[],"static":false,"type":"number"},{"abstract":false,"default":null,"deprecated":false,"description":"The image source","metadata":{"name":"CanvasImage.ts","directory":"canvas","line":16,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/CanvasImage.ts#L16"},"name":"source","private":false,"readonly":false,"see":[],"static":false,"type":"ImageSource"},{"abstract":false,"default":"[]","deprecated":false,"description":"The steps to apply to the canvas.","metadata":{"name":"CanvasHelper.ts","directory":"canvas","line":9,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/CanvasHelper.ts#L9"},"name":"steps","private":false,"readonly":false,"see":[],"static":false,"type":"Array"},{"abstract":false,"default":null,"deprecated":false,"description":"The width of the canvas","metadata":{"name":"CanvasHelper.ts","directory":"canvas","line":18,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/CanvasHelper.ts#L18"},"name":"width","private":false,"readonly":false,"see":[],"static":false,"type":"number"}],"see":[]},"markdown":[]},{"data":{"name":"Element","abstract":false,"constructor":{"name":"Element","description":"Creates a new JSX element.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"_init","description":"The initialization options","optional":false,"default":null,"type":"ElementInit","rawType":["ElementInit"]}],"returns":{"type":"Element","rawType":["Element"],"description":null},"metadata":{"name":"jsx.ts","directory":"helpers","line":46,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/helpers/jsx.ts#L46"},"constructor":"new Element"},"metadata":{"name":"jsx.ts","directory":"helpers","line":23,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/helpers/jsx.ts#L23"},"deprecated":false,"description":"The JSX element.","extends":null,"implements":null,"rawExtends":null,"rawImplements":null,"methods":[],"private":false,"properties":[{"abstract":false,"default":null,"deprecated":false,"description":"The children of the element.","metadata":{"name":"jsx.ts","directory":"helpers","line":40,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/helpers/jsx.ts#L40"},"name":"children","private":false,"readonly":false,"see":[],"static":false,"type":"any"},{"abstract":false,"default":null,"deprecated":false,"description":"The key of the element.","metadata":{"name":"jsx.ts","directory":"helpers","line":35,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/helpers/jsx.ts#L35"},"name":"key","private":false,"readonly":false,"see":[],"static":false,"type":"null | Key"},{"abstract":false,"default":null,"deprecated":false,"description":"The props of the element.","metadata":{"name":"jsx.ts","directory":"helpers","line":31,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/helpers/jsx.ts#L31"},"name":"props","private":false,"readonly":false,"see":[],"static":false,"type":"Record"},{"abstract":false,"default":null,"deprecated":false,"description":"The type of the element.","metadata":{"name":"jsx.ts","directory":"helpers","line":27,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/helpers/jsx.ts#L27"},"name":"type","private":false,"readonly":false,"see":[],"static":false,"type":"string"}],"see":[]},"markdown":[]},{"data":{"name":"Encodable","abstract":true,"constructor":{"name":"Encodable","description":null,"see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"Encodable","rawType":["Encodable"],"description":null},"metadata":null,"constructor":"new Encodable"},"metadata":{"name":"Encodable.ts","directory":"canvas","line":5,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/Encodable.ts#L5"},"deprecated":false,"description":null,"extends":null,"implements":null,"rawExtends":null,"rawImplements":null,"methods":[{"name":"encode","description":"Encodes the canvas to a buffer.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"Promise","rawType":["Promise","<","Buffer",">"],"description":null},"metadata":{"name":"Encodable.ts","directory":"canvas","line":14,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/Encodable.ts#L14"}},{"name":"getFinalCanvas","description":"Returns the canvas instance by applying the steps.","see":[],"static":false,"private":false,"examples":[],"abstract":true,"deprecated":false,"parameters":[],"returns":{"type":"Promise","rawType":["Promise","<","Canvas",">"],"description":null},"metadata":{"name":"Encodable.ts","directory":"canvas","line":9,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/Encodable.ts#L9"}}],"private":false,"properties":[],"see":[]},"markdown":[]},{"data":{"name":"Font","abstract":false,"constructor":{"name":"Font","description":"Creates and registers a new Font instance for both canvas and builder apis.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"data","description":"The font data","optional":false,"default":null,"type":"Buffer","rawType":["Buffer"]},{"name":"alias","description":"The font alias. If not provided, a random UUID will be used.\n\nconst data = await readFile('path/to/font.ttf');\nconst font = new Font(data, 'my-font');","optional":true,"default":null,"type":"string","rawType":["string"]}],"returns":{"type":"Font","rawType":["Font"],"description":null},"metadata":{"name":"Font.ts","directory":"assets","line":23,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/assets/Font.ts#L23"},"constructor":"new Font"},"metadata":{"name":"Font.ts","directory":"assets","line":13,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/assets/Font.ts#L13"},"deprecated":false,"description":null,"extends":null,"implements":null,"rawExtends":null,"rawImplements":null,"methods":[{"name":"getData","description":"Returns the font data that includes information such as the font name, weight, data, and style.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"FontOptions","rawType":["FontOptions"],"description":null},"metadata":{"name":"Font.ts","directory":"assets","line":41,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/assets/Font.ts#L41"}},{"name":"toJSON","description":"JSON representation of this font.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"FontOptions","rawType":["FontOptions"],"description":null},"metadata":{"name":"Font.ts","directory":"assets","line":60,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/assets/Font.ts#L60"}},{"name":"toString","description":"String representation of this font.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"string","rawType":["string"],"description":null},"metadata":{"name":"Font.ts","directory":"assets","line":53,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/assets/Font.ts#L53"}},{"name":"unloadAll","description":"Unloads the font from the canvas and builder apis.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"void","rawType":["void"],"description":null},"metadata":{"name":"Font.ts","directory":"assets","line":117,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/assets/Font.ts#L117"}},{"name":"fromBuffer","description":"Creates a new Font instance from a buffer.","see":[],"static":true,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"buffer","description":"The buffer containing the font data","optional":false,"default":null,"type":"Buffer","rawType":["Buffer"]},{"name":"alias","description":"The font alias. If not provided, a random UUID will be used.\n\nconst buffer = await readFile('path/to/font.ttf');\nconst font = Font.fromBuffer(buffer, 'my-font');","optional":true,"default":null,"type":"string","rawType":["string"]}],"returns":{"type":"Font","rawType":["Font"],"description":null},"metadata":{"name":"Font.ts","directory":"assets","line":98,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/assets/Font.ts#L98"}},{"name":"fromFile","description":"Creates a new Font instance from a file.","see":[],"static":true,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"path","description":"The path to the font file","optional":false,"default":null,"type":"string","rawType":["string"]},{"name":"alias","description":"The font alias. If not provided, a random UUID will be used.\n\nconst font = await Font.fromFile('path/to/font.ttf', 'my-font');","optional":true,"default":null,"type":"string","rawType":["string"]}],"returns":{"type":"Promise","rawType":["Promise","<","Font",">"],"description":null},"metadata":{"name":"Font.ts","directory":"assets","line":72,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/assets/Font.ts#L72"}},{"name":"fromFileSync","description":"Creates a new Font instance from a file synchronously.","see":[],"static":true,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"path","description":"The path to the font file","optional":false,"default":null,"type":"string","rawType":["string"]},{"name":"alias","description":"The font alias. If not provided, a random UUID will be used.\n\nconst font = Font.fromFileSync('path/to/font.ttf', 'my-font');","optional":true,"default":null,"type":"string","rawType":["string"]}],"returns":{"type":"Font","rawType":["Font"],"description":null},"metadata":{"name":"Font.ts","directory":"assets","line":84,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/assets/Font.ts#L84"}},{"name":"loadDefault","description":"Loads the default font bundled with this package.\n\nconst font = Font.loadDefault();","see":[],"static":true,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"Font","rawType":["Font"],"description":null},"metadata":{"name":"Font.ts","directory":"assets","line":108,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/assets/Font.ts#L108"}}],"private":false,"properties":[{"abstract":false,"default":"...","deprecated":false,"description":"The font alias. If not provided, a random UUID will be used.\n\nconst data = await readFile('path/to/font.ttf');\nconst font = new Font(data, 'my-font');","metadata":{"name":"Font.ts","directory":"assets","line":25,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/assets/Font.ts#L25"},"name":"alias","private":false,"readonly":false,"see":[],"static":false,"type":"string"},{"abstract":false,"default":null,"deprecated":false,"description":"The font data","metadata":{"name":"Font.ts","directory":"assets","line":24,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/assets/Font.ts#L24"},"name":"data","private":false,"readonly":false,"see":[],"static":false,"type":"Buffer"},{"default":null,"description":"The alias for this font.","metadata":{"name":"Font.ts","directory":"assets","line":34,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/assets/Font.ts#L34"},"name":"name","type":"string"}],"see":[]},"markdown":[]},{"data":{"name":"ImageFilterer","abstract":false,"constructor":{"name":"ImageFilterer","description":"Creates a new CanvasHelper instance.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"width","description":"The width of the canvas","optional":false,"default":null,"type":"number","rawType":["number"]},{"name":"height","description":"The height of the canvas","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"ImageFilterer","rawType":["ImageFilterer"],"description":null},"metadata":{"name":"CanvasHelper.ts","directory":"canvas","line":17,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/CanvasHelper.ts#L17"},"constructor":"new ImageFilterer"},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":6,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageFilterer.ts#L6"},"deprecated":false,"description":null,"extends":"CanvasHelper","implements":null,"rawExtends":["CanvasHelper"],"rawImplements":null,"methods":[{"name":"blur","description":"Applies blur filter to the image.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"value","description":"The filter intensity","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"ImageFilterer","rawType":["ImageFilterer"],"description":null},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":109,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageFilterer.ts#L109"}},{"name":"brightness","description":"Applies brightness filter to the image.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"value","description":"The filter intensity","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"ImageFilterer","rawType":["ImageFilterer"],"description":null},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":99,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageFilterer.ts#L99"}},{"name":"contrast","description":"Applies contrast filter to the image.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"value","description":"The filter intensity","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"ImageFilterer","rawType":["ImageFilterer"],"description":null},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":89,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageFilterer.ts#L89"}},{"name":"drawImage","description":"Draws the image to the canvas.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"image","description":"The image to draw","optional":false,"default":null,"type":"ImageSource","rawType":["ImageSource"]},{"name":"x","description":"The x position to draw the image","optional":false,"default":null,"type":"number","rawType":["number"]},{"name":"y","description":"The y position to draw the image","optional":false,"default":null,"type":"number","rawType":["number"]},{"name":"width","description":"The width of the image","optional":true,"default":null,"type":"number","rawType":["number"]},{"name":"height","description":"The height of the image","optional":true,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"ImageFilterer","rawType":["ImageFilterer"],"description":null},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":17,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageFilterer.ts#L17"}},{"name":"dropShadow","description":"Applies drop-shadow filter to the image.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"config","description":"The drop-shadow config","optional":false,"default":null,"type":"DropShadowConfig","rawType":["DropShadowConfig"]}],"returns":{"type":"ImageFilterer","rawType":["ImageFilterer"],"description":null},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":123,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageFilterer.ts#L123"}},{"name":"encode","description":"Encodes the canvas to a buffer.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"Promise","rawType":["Promise","<","Buffer",">"],"description":null},"metadata":{"name":"Encodable.ts","directory":"canvas","line":14,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/Encodable.ts#L14"}},{"name":"getFinalCanvas","description":"Returns the canvas instance by applying the steps.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"Promise","rawType":["Promise","<","Canvas",">"],"description":null},"metadata":{"name":"CanvasHelper.ts","directory":"canvas","line":27,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/CanvasHelper.ts#L27"}},{"name":"grayscale","description":"Applies grayscale filter to the image.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"value","description":"The filter intensity","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"ImageFilterer","rawType":["ImageFilterer"],"description":null},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":40,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageFilterer.ts#L40"}},{"name":"hueRotate","description":"Applies hue-rotate filter to the image.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"value","description":"The degrees to rotate","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"ImageFilterer","rawType":["ImageFilterer"],"description":null},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":79,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageFilterer.ts#L79"}},{"name":"invert","description":"Applies invert filter to the image.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"value","description":"The filter intensity","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"ImageFilterer","rawType":["ImageFilterer"],"description":null},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":30,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageFilterer.ts#L30"}},{"name":"opacity","description":"Applies opacity filter to the image.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"value","description":"The filter intensity","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"ImageFilterer","rawType":["ImageFilterer"],"description":null},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":59,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageFilterer.ts#L59"}},{"name":"process","description":"Renders the applied filters to the canvas.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"canvas","description":"The canvas to render the filters to","optional":false,"default":null,"type":"Canvas","rawType":["Canvas"]},{"name":"ctx","description":"The canvas context","optional":false,"default":null,"type":"SKRSContext2D","rawType":["SKRSContext2D"]}],"returns":{"type":"Promise","rawType":["Promise","<","void",">"],"description":null},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":135,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageFilterer.ts#L135"}},{"name":"saturate","description":"Applies saturate filter to the image.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"value","description":"The filter intensity","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"ImageFilterer","rawType":["ImageFilterer"],"description":null},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":69,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageFilterer.ts#L69"}},{"name":"sepia","description":"Applies sepia filter to the image.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"value","description":"The filter intensity","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"ImageFilterer","rawType":["ImageFilterer"],"description":null},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":49,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageFilterer.ts#L49"}}],"private":false,"properties":[{"abstract":false,"default":null,"deprecated":false,"description":"The height of the canvas","metadata":{"name":"CanvasHelper.ts","directory":"canvas","line":19,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/CanvasHelper.ts#L19"},"name":"height","private":false,"readonly":false,"see":[],"static":false,"type":"number"},{"abstract":false,"default":"[]","deprecated":false,"description":"The steps to apply to the canvas.","metadata":{"name":"CanvasHelper.ts","directory":"canvas","line":9,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/CanvasHelper.ts#L9"},"name":"steps","private":false,"readonly":false,"see":[],"static":false,"type":"Array"},{"abstract":false,"default":null,"deprecated":false,"description":"The width of the canvas","metadata":{"name":"CanvasHelper.ts","directory":"canvas","line":18,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/CanvasHelper.ts#L18"},"name":"width","private":false,"readonly":false,"see":[],"static":false,"type":"number"}],"see":[]},"markdown":[]},{"data":{"name":"ImageGen","abstract":false,"constructor":{"name":"ImageGen","description":"Creates a new ImageGen instance.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"template","description":"The template to use","optional":false,"default":null,"type":"ImageGenerationTemplate","rawType":["ImageGenerationTemplate"]}],"returns":{"type":"ImageGen","rawType":["ImageGen"],"description":null},"metadata":{"name":"ImageGen.ts","directory":"canvas","line":282,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageGen.ts#L282"},"constructor":"new ImageGen"},"metadata":{"name":"ImageGen.ts","directory":"canvas","line":276,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageGen.ts#L276"},"deprecated":false,"description":null,"extends":"Encodable","implements":null,"rawExtends":["Encodable"],"rawImplements":null,"methods":[{"name":"addStep","description":"Adds a step to the template.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"step","description":"The step to add","optional":false,"default":null,"type":"ImageGenerationStep","rawType":["ImageGenerationStep"]}],"returns":{"type":"ImageGen","rawType":["ImageGen"],"description":null},"metadata":{"name":"ImageGen.ts","directory":"canvas","line":290,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageGen.ts#L290"}},{"name":"addSteps","description":"Adds steps to the template.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"steps","description":"The steps to add","optional":false,"default":null,"type":"Array","rawType":["Array","<","ImageGenerationStep",">"]}],"returns":{"type":"ImageGen","rawType":["ImageGen"],"description":null},"metadata":{"name":"ImageGen.ts","directory":"canvas","line":299,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageGen.ts#L299"}},{"name":"encode","description":"Encodes the canvas to a buffer.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"Promise","rawType":["Promise","<","Buffer",">"],"description":null},"metadata":{"name":"Encodable.ts","directory":"canvas","line":14,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/Encodable.ts#L14"}},{"name":"generateGif","description":"Generates a readable stream containing GIF data by applying the steps.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"Promise","rawType":["Promise","<","Readable",">"],"description":null},"metadata":{"name":"ImageGen.ts","directory":"canvas","line":341,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageGen.ts#L341"}},{"name":"getFinalCanvas","description":"Returns the canvas instance by applying the steps.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"Promise","rawType":["Promise","<","Canvas",">"],"description":null},"metadata":{"name":"ImageGen.ts","directory":"canvas","line":395,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageGen.ts#L395"}},{"name":"isGif","description":"Returns whether the template is a gif.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"boolean","rawType":["boolean"],"description":null},"metadata":{"name":"ImageGen.ts","directory":"canvas","line":316,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageGen.ts#L316"}},{"name":"render","description":"Renders the image by applying the steps.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"Promise","rawType":["Promise","<","ImageGen",">"],"description":null},"metadata":{"name":"ImageGen.ts","directory":"canvas","line":378,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageGen.ts#L378"}},{"name":"setGifOptions","description":"Sets the gif options.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"options","description":"The gif options","optional":true,"default":null,"type":"EncoderOptions","rawType":["EncoderOptions"]}],"returns":{"type":"ImageGen","rawType":["ImageGen"],"description":null},"metadata":{"name":"ImageGen.ts","directory":"canvas","line":308,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageGen.ts#L308"}}],"private":false,"properties":[{"abstract":false,"default":null,"deprecated":false,"description":"The template to use","metadata":{"name":"ImageGen.ts","directory":"canvas","line":282,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageGen.ts#L282"},"name":"template","private":false,"readonly":false,"see":[],"static":false,"type":"ImageGenerationTemplate"}],"see":[]},"markdown":[]},{"data":{"name":"ImageGenerationTemplate","abstract":false,"constructor":{"name":"ImageGenerationTemplate","description":"Creates a new ImageGenerationTemplate instance.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"width","description":"The width of the template","optional":true,"default":null,"type":"number","rawType":["number"]},{"name":"height","description":"The height of the template","optional":true,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"ImageGenerationTemplate","rawType":["ImageGenerationTemplate"],"description":null},"metadata":{"name":"ImageGen.ts","directory":"canvas","line":186,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageGen.ts#L186"},"constructor":"new ImageGenerationTemplate"},"metadata":{"name":"ImageGen.ts","directory":"canvas","line":160,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageGen.ts#L160"},"deprecated":false,"description":"The template to use for image generation.","extends":null,"implements":"IImageGenerationTemplate","rawExtends":null,"rawImplements":["IImageGenerationTemplate"],"methods":[{"name":"addStep","description":"Adds a step to the template.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"step","description":"The step to add","optional":false,"default":null,"type":"ImageGenerationStep","rawType":["ImageGenerationStep"]}],"returns":{"type":"ImageGenerationTemplate","rawType":["ImageGenerationTemplate"],"description":null},"metadata":{"name":"ImageGen.ts","directory":"canvas","line":220,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageGen.ts#L220"}},{"name":"addSteps","description":"Adds steps to the template.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"steps","description":"The steps to add","optional":false,"default":null,"type":"Array","rawType":["Array","<","ImageGenerationStep",">"]}],"returns":{"type":"ImageGenerationTemplate","rawType":["ImageGenerationTemplate"],"description":null},"metadata":{"name":"ImageGen.ts","directory":"canvas","line":229,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageGen.ts#L229"}},{"name":"clearSteps","description":"Clears the steps.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"ImageGenerationTemplate","rawType":["ImageGenerationTemplate"],"description":null},"metadata":{"name":"ImageGen.ts","directory":"canvas","line":237,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageGen.ts#L237"}},{"name":"getHeight","description":"Returns the height of the template.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"undefined | number","rawType":["undefined","number"],"description":null},"metadata":{"name":"ImageGen.ts","directory":"canvas","line":259,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageGen.ts#L259"}},{"name":"getWidth","description":"Returns the width of the template.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"undefined | number","rawType":["undefined","number"],"description":null},"metadata":{"name":"ImageGen.ts","directory":"canvas","line":252,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageGen.ts#L252"}},{"name":"isGif","description":"Returns whether the template is a gif.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"boolean","rawType":["boolean"],"description":null},"metadata":{"name":"ImageGen.ts","directory":"canvas","line":212,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageGen.ts#L212"}},{"name":"isInferrable","description":"Returns whether the size is inferrable.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"boolean","rawType":["boolean"],"description":null},"metadata":{"name":"ImageGen.ts","directory":"canvas","line":245,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageGen.ts#L245"}},{"name":"setGifOptions","description":"Sets the gif options.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"options","description":"The gif options","optional":true,"default":null,"type":"EncoderOptions","rawType":["EncoderOptions"]}],"returns":{"type":"ImageGenerationTemplate","rawType":["ImageGenerationTemplate"],"description":null},"metadata":{"name":"ImageGen.ts","directory":"canvas","line":204,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageGen.ts#L204"}},{"name":"setSteps","description":"Sets the steps. This will overwrite any existing steps.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"steps","description":"The steps to set","optional":false,"default":null,"type":"Array","rawType":["Array","<","ImageGenerationStep",">"]}],"returns":{"type":"ImageGenerationTemplate","rawType":["ImageGenerationTemplate"],"description":null},"metadata":{"name":"ImageGen.ts","directory":"canvas","line":195,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageGen.ts#L195"}},{"name":"toJSON","description":"Returns the JSON representation of the template.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"IImageGenerationTemplate","rawType":["IImageGenerationTemplate"],"description":null},"metadata":{"name":"ImageGen.ts","directory":"canvas","line":266,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageGen.ts#L266"}},{"name":"from","description":"Creates a new ImageGenerationTemplate instance from a template.","see":[],"static":true,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"template","description":"The template to use","optional":false,"default":null,"type":"IImageGenerationTemplate","rawType":["IImageGenerationTemplate"]}],"returns":{"type":"ImageGenerationTemplate","rawType":["ImageGenerationTemplate"],"description":"The created template"},"metadata":{"name":"ImageGen.ts","directory":"canvas","line":175,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageGen.ts#L175"}}],"private":false,"properties":[{"abstract":false,"default":null,"deprecated":false,"description":"The gif options.","metadata":{"name":"ImageGen.ts","directory":"canvas","line":168,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageGen.ts#L168"},"name":"gif","private":false,"readonly":false,"see":[],"static":false,"type":"EncoderOptions"},{"abstract":false,"default":null,"deprecated":false,"description":"The height of the template","metadata":{"name":"ImageGen.ts","directory":"canvas","line":188,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageGen.ts#L188"},"name":"height","private":false,"readonly":true,"see":[],"static":false,"type":"number"},{"abstract":false,"default":"[]","deprecated":false,"description":"The steps to apply to the canvas.","metadata":{"name":"ImageGen.ts","directory":"canvas","line":164,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageGen.ts#L164"},"name":"steps","private":false,"readonly":false,"see":[],"static":false,"type":"Array"},{"abstract":false,"default":null,"deprecated":false,"description":"The width of the template","metadata":{"name":"ImageGen.ts","directory":"canvas","line":187,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageGen.ts#L187"},"name":"width","private":false,"readonly":true,"see":[],"static":false,"type":"number"}],"see":[]},"markdown":[]},{"data":{"name":"ImageManipulator","abstract":false,"constructor":{"name":"ImageManipulator","description":"Creates a new CanvasImage instance.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"source","description":"The image source","optional":false,"default":null,"type":"ImageSource","rawType":["ImageSource"]},{"name":"width","description":"The width of the image","optional":true,"default":null,"type":"number","rawType":["number"]},{"name":"height","description":"The height of the image","optional":true,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"ImageManipulator","rawType":["ImageManipulator"],"description":null},"metadata":{"name":"CanvasImage.ts","directory":"canvas","line":15,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/CanvasImage.ts#L15"},"constructor":"new ImageManipulator"},"metadata":{"name":"ImageManipulator.ts","directory":"canvas","line":5,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageManipulator.ts#L5"},"deprecated":false,"description":null,"extends":"CanvasImage","implements":null,"rawExtends":["CanvasImage"],"rawImplements":null,"methods":[{"name":"blur","description":"Applies blur filter to the image.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"value","description":"The filter intensity","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"ImageManipulator","rawType":["ImageManipulator"],"description":null},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":109,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageFilterer.ts#L109"}},{"name":"brightness","description":"Applies brightness filter to the image.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"value","description":"The filter intensity","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"ImageManipulator","rawType":["ImageManipulator"],"description":null},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":99,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageFilterer.ts#L99"}},{"name":"circle","description":"Draws the image to the canvas with a circle clip.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"width","description":"The width of the image","optional":true,"default":null,"type":"number","rawType":["number"]},{"name":"height","description":"The height of the image","optional":true,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"ImageManipulator","rawType":["ImageManipulator"],"description":null},"metadata":{"name":"CanvasImage.ts","directory":"canvas","line":58,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/CanvasImage.ts#L58"}},{"name":"circularize","description":"Applies a circular clip to the image.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"width","description":"The width of the image","optional":false,"default":null,"type":"number","rawType":["number"]},{"name":"height","description":"The height of the image","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"void","rawType":["void"],"description":null},"metadata":{"name":"ImageManipulator.ts","directory":"canvas","line":94,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageManipulator.ts#L94"}},{"name":"contrast","description":"Applies contrast filter to the image.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"value","description":"The filter intensity","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"ImageManipulator","rawType":["ImageManipulator"],"description":null},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":89,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageFilterer.ts#L89"}},{"name":"draw","description":"Draws the image to the canvas.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"x","description":"The x position to draw the image","optional":false,"default":null,"type":"number","rawType":["number"]},{"name":"y","description":"The y position to draw the image","optional":false,"default":null,"type":"number","rawType":["number"]},{"name":"width","description":"The width of the image","optional":true,"default":null,"type":"number","rawType":["number"]},{"name":"height","description":"The height of the image","optional":true,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"ImageManipulator","rawType":["ImageManipulator"],"description":null},"metadata":{"name":"CanvasImage.ts","directory":"canvas","line":38,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/CanvasImage.ts#L38"}},{"name":"drawImage","description":"Draws the image to the canvas.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"image","description":"The image to draw","optional":false,"default":null,"type":"ImageSource","rawType":["ImageSource"]},{"name":"x","description":"The x position to draw the image","optional":false,"default":null,"type":"number","rawType":["number"]},{"name":"y","description":"The y position to draw the image","optional":false,"default":null,"type":"number","rawType":["number"]},{"name":"width","description":"The width of the image","optional":true,"default":null,"type":"number","rawType":["number"]},{"name":"height","description":"The height of the image","optional":true,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"ImageManipulator","rawType":["ImageManipulator"],"description":null},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":17,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageFilterer.ts#L17"}},{"name":"dropShadow","description":"Applies drop-shadow filter to the image.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"config","description":"The drop-shadow config","optional":false,"default":null,"type":"DropShadowConfig","rawType":["DropShadowConfig"]}],"returns":{"type":"ImageManipulator","rawType":["ImageManipulator"],"description":null},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":123,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageFilterer.ts#L123"}},{"name":"encode","description":"Encodes the canvas to a buffer.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"Promise","rawType":["Promise","<","Buffer",">"],"description":null},"metadata":{"name":"Encodable.ts","directory":"canvas","line":14,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/Encodable.ts#L14"}},{"name":"erase","description":"Erases a part of the canvas.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"x","description":"The x position to erase","optional":false,"default":null,"type":"number","rawType":["number"]},{"name":"y","description":"The y position to erase","optional":false,"default":null,"type":"number","rawType":["number"]},{"name":"width","description":"The width of the area to erase","optional":false,"default":null,"type":"number","rawType":["number"]},{"name":"height","description":"The height of the area to erase","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"void","rawType":["void"],"description":null},"metadata":{"name":"ImageManipulator.ts","directory":"canvas","line":65,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageManipulator.ts#L65"}},{"name":"flip","description":"Flips the canvas.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"axis","description":"The axis to flip, `x` or `y`.","optional":false,"default":null,"type":"'x' | 'y'","rawType":["'","x","'","'","y","'"]}],"returns":{"type":"void","rawType":["void"],"description":null},"metadata":{"name":"ImageManipulator.ts","directory":"canvas","line":23,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageManipulator.ts#L23"}},{"name":"getFinalCanvas","description":"Returns the canvas instance by applying the steps.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"Promise","rawType":["Promise","<","Canvas",">"],"description":null},"metadata":{"name":"CanvasImage.ts","directory":"canvas","line":126,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/CanvasImage.ts#L126"}},{"name":"grayscale","description":"Applies grayscale filter to the image.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"value","description":"The filter intensity","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"ImageManipulator","rawType":["ImageManipulator"],"description":null},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":40,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageFilterer.ts#L40"}},{"name":"hueRotate","description":"Applies hue-rotate filter to the image.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"value","description":"The degrees to rotate","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"ImageManipulator","rawType":["ImageManipulator"],"description":null},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":79,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageFilterer.ts#L79"}},{"name":"invert","description":"Applies invert filter to the image.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"value","description":"The filter intensity","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"ImageManipulator","rawType":["ImageManipulator"],"description":null},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":30,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageFilterer.ts#L30"}},{"name":"opacity","description":"Applies opacity filter to the image.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"value","description":"The filter intensity","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"ImageManipulator","rawType":["ImageManipulator"],"description":null},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":59,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageFilterer.ts#L59"}},{"name":"pixelate","description":"Draws pixelated image to the canvas.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"pixels","description":"The amount of pixels to use","optional":true,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"ImageManipulator","rawType":["ImageManipulator"],"description":null},"metadata":{"name":"CanvasImage.ts","directory":"canvas","line":79,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/CanvasImage.ts#L79"}},{"name":"process","description":"Processes the steps and applies them to the canvas.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"canvas","description":"The canvas to apply the steps to","optional":false,"default":null,"type":"Canvas","rawType":["Canvas"]},{"name":"ctx","description":"The canvas context to apply the steps to","optional":false,"default":null,"type":"SKRSContext2D","rawType":["SKRSContext2D"]}],"returns":{"type":"Promise","rawType":["Promise","<","void",">"],"description":null},"metadata":{"name":"ImageManipulator.ts","directory":"canvas","line":103,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageManipulator.ts#L103"}},{"name":"resetTransform","description":"Resets the transform of the canvas.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"void","rawType":["void"],"description":null},"metadata":{"name":"ImageManipulator.ts","directory":"canvas","line":83,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageManipulator.ts#L83"}},{"name":"restore","description":"Restores the last saved canvas context state.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"ImageManipulator","rawType":["ImageManipulator"],"description":null},"metadata":{"name":"CanvasImage.ts","directory":"canvas","line":115,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/CanvasImage.ts#L115"}},{"name":"rotate","description":"Rotates the canvas.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"degrees","description":null,"optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"ImageManipulator","rawType":["ImageManipulator"],"description":null},"metadata":{"name":"ImageManipulator.ts","directory":"canvas","line":11,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageManipulator.ts#L11"}},{"name":"saturate","description":"Applies saturate filter to the image.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"value","description":"The filter intensity","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"ImageManipulator","rawType":["ImageManipulator"],"description":null},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":69,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageFilterer.ts#L69"}},{"name":"save","description":"Saves the canvas context state.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"ImageManipulator","rawType":["ImageManipulator"],"description":null},"metadata":{"name":"CanvasImage.ts","directory":"canvas","line":104,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/CanvasImage.ts#L104"}},{"name":"scale","description":"Scales the canvas.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"x","description":"The x scale","optional":false,"default":null,"type":"number","rawType":["number"]},{"name":"y","description":"The y scale","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"void","rawType":["void"],"description":null},"metadata":{"name":"ImageManipulator.ts","directory":"canvas","line":41,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageManipulator.ts#L41"}},{"name":"sepia","description":"Applies sepia filter to the image.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"value","description":"The filter intensity","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"ImageManipulator","rawType":["ImageManipulator"],"description":null},"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":49,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageFilterer.ts#L49"}},{"name":"transform","description":"Applies a transform to the canvas.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"a","description":null,"optional":false,"default":null,"type":"number","rawType":["number"]},{"name":"b","description":null,"optional":false,"default":null,"type":"number","rawType":["number"]},{"name":"c","description":null,"optional":false,"default":null,"type":"number","rawType":["number"]},{"name":"d","description":null,"optional":false,"default":null,"type":"number","rawType":["number"]},{"name":"e","description":null,"optional":false,"default":null,"type":"number","rawType":["number"]},{"name":"f","description":null,"optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"void","rawType":["void"],"description":null},"metadata":{"name":"ImageManipulator.ts","directory":"canvas","line":74,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageManipulator.ts#L74"}},{"name":"translate","description":"Translates the canvas.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"x","description":"The x position to translate","optional":false,"default":null,"type":"number","rawType":["number"]},{"name":"y","description":"The y position to translate","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"void","rawType":["void"],"description":null},"metadata":{"name":"ImageManipulator.ts","directory":"canvas","line":52,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageManipulator.ts#L52"}}],"private":false,"properties":[{"abstract":false,"default":null,"deprecated":false,"description":"The height of the canvas","metadata":{"name":"CanvasHelper.ts","directory":"canvas","line":19,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/CanvasHelper.ts#L19"},"name":"height","private":false,"readonly":false,"see":[],"static":false,"type":"number"},{"abstract":false,"default":null,"deprecated":false,"description":"The image source","metadata":{"name":"CanvasImage.ts","directory":"canvas","line":16,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/CanvasImage.ts#L16"},"name":"source","private":false,"readonly":false,"see":[],"static":false,"type":"ImageSource"},{"abstract":false,"default":"[]","deprecated":false,"description":"The steps to apply to the canvas.","metadata":{"name":"CanvasHelper.ts","directory":"canvas","line":9,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/CanvasHelper.ts#L9"},"name":"steps","private":false,"readonly":false,"see":[],"static":false,"type":"Array"},{"abstract":false,"default":null,"deprecated":false,"description":"The width of the canvas","metadata":{"name":"CanvasHelper.ts","directory":"canvas","line":18,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/CanvasHelper.ts#L18"},"name":"width","private":false,"readonly":false,"see":[],"static":false,"type":"number"}],"see":[]},"markdown":[]},{"data":{"name":"LeaderboardBuilder","abstract":false,"constructor":{"name":"LeaderboardBuilder","description":"Create a new leaderboard ui builder","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"LeaderboardBuilder","rawType":["LeaderboardBuilder"],"description":null},"metadata":{"name":"LeaderboardBuilder.tsx","directory":"components","line":109,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/components/LeaderboardBuilder.tsx#L109"},"constructor":"new LeaderboardBuilder"},"metadata":{"name":"LeaderboardBuilder.tsx","directory":"components","line":103,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/components/LeaderboardBuilder.tsx#L103"},"deprecated":false,"description":null,"extends":"Builder","implements":null,"rawExtends":["Builder","<","LeaderboardProps",">"],"rawImplements":null,"methods":[{"name":"addComponent","description":"Add component to this builder.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"component","description":"the component to add.","optional":false,"default":null,"type":"T | Array","rawType":["T","Array","<","T",">"]}],"returns":{"type":"LeaderboardBuilder","rawType":["LeaderboardBuilder"],"description":null},"metadata":{"name":"Builder.tsx","directory":"template","line":194}},{"name":"adjustCanvas","description":"Adjust the canvas size.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"LeaderboardBuilder","rawType":["LeaderboardBuilder"],"description":null},"metadata":{"name":"Builder.tsx","directory":"template","line":166}},{"name":"bootstrap","description":"Bootstrap this builder with data.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"data","description":null,"optional":false,"default":null,"type":"LeaderboardProps","rawType":["LeaderboardProps"]}],"returns":{"type":"void","rawType":["void"],"description":null},"metadata":{"name":"Builder.tsx","directory":"template","line":159}},{"name":"build","description":"Convert this builder into an image.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"options","description":"the build options.","optional":false,"default":null,"type":"Partial","rawType":["Partial","<","BuilderBuildOptions",">"]}],"returns":{"type":"Promise","rawType":["Promise","<","string","Buffer",">"],"description":"the image buffer or svg string."},"metadata":{"name":"Builder.tsx","directory":"template","line":246}},{"name":"render","description":"Render this leaderboard ui on the canvas","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"Promise","rawType":["Promise","<","Element",">"],"description":null},"metadata":{"name":"LeaderboardBuilder.tsx","directory":"components","line":188,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/components/LeaderboardBuilder.tsx#L188"}},{"name":"renderDefaultPlayer","description":"Render player ui on the canvas","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"__namedParameters","description":null,"optional":false,"default":null,"type":"{ avatar: ImageSource, displayName: string, level: number, rank: number, username: string, xp: number }","rawType":["{"," ","avatar",":"," ","ImageSource","; ","displayName",":"," ","string","; ","level",":"," ","number","; ","rank",":"," ","number","; ","username",":"," ","string","; ","xp",":"," ","number",";"," ","}"]}],"returns":{"type":"Promise","rawType":["Promise","<","Element",">"],"description":null},"metadata":{"name":"LeaderboardBuilder.tsx","directory":"components","line":260,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/components/LeaderboardBuilder.tsx#L260"}},{"name":"renderDefaultPlayers","description":"Render players ui on the canvas","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"players","description":null,"optional":false,"default":null,"type":"Array","rawType":["Array","<","Element",">"]}],"returns":{"type":"Element","rawType":["Element"],"description":null},"metadata":{"name":"LeaderboardBuilder.tsx","directory":"components","line":199,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/components/LeaderboardBuilder.tsx#L199"}},{"name":"renderDefaultTop","description":"Render top players ui on the canvas","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"__namedParameters","description":null,"optional":false,"default":null,"type":"{ avatar: ImageSource, displayName: string, level: number, rank: number, username: string, xp: number }","rawType":["{"," ","avatar",":"," ","ImageSource","; ","displayName",":"," ","string","; ","level",":"," ","number","; ","rank",":"," ","number","; ","username",":"," ","string","; ","xp",":"," ","number",";"," ","}"]}],"returns":{"type":"Promise","rawType":["Promise","<","Element",">"],"description":null},"metadata":{"name":"LeaderboardBuilder.tsx","directory":"components","line":206,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/components/LeaderboardBuilder.tsx#L206"}},{"name":"renderDefaultVariant","description":null,"see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"Promise","rawType":["Promise","<","Element",">"],"description":null},"metadata":{"name":"LeaderboardBuilder.tsx","directory":"components","line":295,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/components/LeaderboardBuilder.tsx#L295"}},{"name":"renderHorizontalPlayer","description":null,"see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"__namedParameters","description":null,"optional":false,"default":null,"type":"{ avatar: ImageSource, displayName: string, level: number, rank: number, username: string, xp: number }","rawType":["{"," ","avatar",":"," ","ImageSource","; ","displayName",":"," ","string","; ","level",":"," ","number","; ","rank",":"," ","number","; ","username",":"," ","string","; ","xp",":"," ","number",";"," ","}"]}],"returns":{"type":"Promise","rawType":["Promise","<","Element",">"],"description":null},"metadata":{"name":"LeaderboardBuilder.tsx","directory":"components","line":353,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/components/LeaderboardBuilder.tsx#L353"}},{"name":"renderHorizontalVariant","description":null,"see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"Promise","rawType":["Promise","<","Element",">"],"description":null},"metadata":{"name":"LeaderboardBuilder.tsx","directory":"components","line":384,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/components/LeaderboardBuilder.tsx#L384"}},{"name":"setBackground","description":"Set background for this leaderboard ui","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"background","description":"background image","optional":false,"default":null,"type":"ImageSource","rawType":["ImageSource"]}],"returns":{"type":"LeaderboardBuilder","rawType":["LeaderboardBuilder"],"description":null},"metadata":{"name":"LeaderboardBuilder.tsx","directory":"components","line":142,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/components/LeaderboardBuilder.tsx#L142"}},{"name":"setBackgroundColor","description":"Set background color for this leaderboard ui","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"color","description":"background color","optional":false,"default":null,"type":"string","rawType":["string"]}],"returns":{"type":"LeaderboardBuilder","rawType":["LeaderboardBuilder"],"description":null},"metadata":{"name":"LeaderboardBuilder.tsx","directory":"components","line":151,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/components/LeaderboardBuilder.tsx#L151"}},{"name":"setGraphemeProvider","description":"Set grapheme image provider for this builder.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"provider","description":null,"optional":false,"default":null,"type":"GraphemeProvider","rawType":["GraphemeProvider"]}],"returns":{"type":"LeaderboardBuilder","rawType":["LeaderboardBuilder"],"description":null},"metadata":{"name":"Builder.tsx","directory":"template","line":211}},{"name":"setHeader","description":"Set header for this leaderboard ui","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"data","description":"header data","optional":false,"default":null,"type":"{ image: ImageSource, subtitle: string, title: string }","rawType":["{"," ","image",":"," ","ImageSource","; ","subtitle",":"," ","string","; ","title",":"," ","string",";"," ","}"]}],"returns":{"type":"LeaderboardBuilder","rawType":["LeaderboardBuilder"],"description":null},"metadata":{"name":"LeaderboardBuilder.tsx","directory":"components","line":160,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/components/LeaderboardBuilder.tsx#L160"}},{"name":"setPlayers","description":"Set players for this leaderboard ui. The canvas size will be adjusted automatically based on the number of players.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"players","description":"players data","optional":false,"default":null,"type":"Array<{ avatar: ImageSource, displayName: string, level: number, rank: number, username: string, xp: number }>","rawType":["Array","<","{"," ","avatar",":"," ","ImageSource","; ","displayName",":"," ","string","; ","level",":"," ","number","; ","rank",":"," ","number","; ","username",":"," ","string","; ","xp",":"," ","number",";"," ","}",">"]}],"returns":{"type":"LeaderboardBuilder","rawType":["LeaderboardBuilder"],"description":null},"metadata":{"name":"LeaderboardBuilder.tsx","directory":"components","line":169,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/components/LeaderboardBuilder.tsx#L169"}},{"name":"setStyle","description":"Set the style of this builder.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"newStyle","description":"the new style.","optional":false,"default":null,"type":"CSSProperties","rawType":["CSSProperties"]}],"returns":{"type":"LeaderboardBuilder","rawType":["LeaderboardBuilder"],"description":null},"metadata":{"name":"Builder.tsx","directory":"template","line":220}},{"name":"setTextStyles","description":"Configures the text renderer for this leaderboard.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"config","description":"The configuration for this leaderboard.","optional":false,"default":null,"type":"Partial<{ level: string, rank: string, xp: string }>","rawType":["Partial","<","{"," ","level",":"," ","string","; ","rank",":"," ","string","; ","xp",":"," ","string",";"," ","}",">"]}],"returns":{"type":"LeaderboardBuilder","rawType":["LeaderboardBuilder"],"description":null},"metadata":{"name":"LeaderboardBuilder.tsx","directory":"components","line":180,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/components/LeaderboardBuilder.tsx#L180"}},{"name":"setVariant","description":"Set the ui variant for this leaderboard","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"variant","description":"ui type","optional":false,"default":null,"type":"LeaderboardVariants","rawType":["LeaderboardVariants"]}],"returns":{"type":"LeaderboardBuilder","rawType":["LeaderboardBuilder"],"description":null},"metadata":{"name":"LeaderboardBuilder.tsx","directory":"components","line":133,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/components/LeaderboardBuilder.tsx#L133"}},{"name":"from","description":"Create a builder from builder template.","see":[],"static":true,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"template","description":null,"optional":false,"default":null,"type":"BuilderTemplate","rawType":["BuilderTemplate"]}],"returns":{"type":"Builder>","rawType":["Builder","<","Record","<","string","unknown",">",">"],"description":null},"metadata":{"name":"Builder.tsx","directory":"template","line":296}}],"private":false,"properties":[{"abstract":false,"default":"...","deprecated":false,"description":"The components of this builder.","metadata":{"name":"Builder.tsx","directory":"template","line":133},"name":"components","private":false,"readonly":false,"see":[],"static":false,"type":"Array"},{"abstract":false,"default":"BuiltInGraphemeProvider.Twemoji","deprecated":false,"description":"The grapheme provider of this builder.","metadata":{"name":"Builder.tsx","directory":"template","line":142},"name":"graphemeProvider","private":false,"readonly":false,"see":[],"static":false,"type":"GraphemeProvider"},{"abstract":false,"default":null,"deprecated":false,"description":"the height of this builder.","metadata":{"name":"Builder.tsx","directory":"template","line":151},"name":"height","private":false,"readonly":false,"see":[],"static":false,"type":"number"},{"abstract":false,"default":"...","deprecated":false,"description":"The options manager of this builder.","metadata":{"name":"Builder.tsx","directory":"template","line":137},"name":"options","private":false,"readonly":false,"see":[],"static":false,"type":"BuilderOptionsManager"},{"abstract":false,"default":"\"\"","deprecated":false,"description":"The tailwind subset to apply to this builder.","metadata":{"name":"Builder.tsx","directory":"template","line":129},"name":"tw","private":false,"readonly":false,"see":[],"static":false,"type":"string"},{"abstract":false,"default":null,"deprecated":false,"description":null,"metadata":{"name":"LeaderboardBuilder.tsx","directory":"components","line":104,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/components/LeaderboardBuilder.tsx#L104"},"name":"variant","private":false,"readonly":false,"see":[],"static":false,"type":"LeaderboardVariants"},{"abstract":false,"default":null,"deprecated":false,"description":"the width of this builder.","metadata":{"name":"Builder.tsx","directory":"template","line":150},"name":"width","private":false,"readonly":false,"see":[],"static":false,"type":"number"},{"default":null,"description":"Get the style of this builder.","metadata":{"name":"Builder.tsx","directory":"template","line":179},"name":"style","type":"CSSProperties"}],"see":[]},"markdown":[]},{"data":{"name":"RankCardBuilder","abstract":false,"constructor":{"name":"RankCardBuilder","description":"Creates a new rank card builder.","see":[],"static":false,"private":false,"examples":["```ts\nconst card = new RankCardBuilder()\n .setUsername('kiki')\n .setDisplayName('Kiki')\n .setDiscriminator('1234')\n .setAvatar('...')\n .setCurrentXP(300)\n .setRequiredXP(600)\n .setLevel(2)\n .setRank(5)\n .setStatus('online');\n\nconst pngBuffer = await card.build({\n format: 'png'\n});\n```"],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"RankCardBuilder","rawType":["RankCardBuilder"],"description":null},"metadata":{"name":"RankCardBuilder.tsx","directory":"components","line":61,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/components/RankCardBuilder.tsx#L61"},"constructor":"new RankCardBuilder"},"metadata":{"name":"RankCardBuilder.tsx","directory":"components","line":42,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/components/RankCardBuilder.tsx#L42"},"deprecated":false,"description":null,"extends":"Builder","implements":null,"rawExtends":["Builder","<","RankCardBuilderProps",">"],"rawImplements":null,"methods":[{"name":"addComponent","description":"Add component to this builder.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"component","description":"the component to add.","optional":false,"default":null,"type":"T | Array","rawType":["T","Array","<","T",">"]}],"returns":{"type":"RankCardBuilder","rawType":["RankCardBuilder"],"description":null},"metadata":{"name":"Builder.tsx","directory":"template","line":194}},{"name":"adjustCanvas","description":"Adjust the canvas size.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"RankCardBuilder","rawType":["RankCardBuilder"],"description":null},"metadata":{"name":"Builder.tsx","directory":"template","line":166}},{"name":"bootstrap","description":"Bootstrap this builder with data.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"data","description":null,"optional":false,"default":null,"type":"RankCardBuilderProps","rawType":["RankCardBuilderProps"]}],"returns":{"type":"void","rawType":["void"],"description":null},"metadata":{"name":"Builder.tsx","directory":"template","line":159}},{"name":"build","description":"Convert this builder into an image.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"options","description":"the build options.","optional":false,"default":null,"type":"Partial","rawType":["Partial","<","BuilderBuildOptions",">"]}],"returns":{"type":"Promise","rawType":["Promise","<","string","Buffer",">"],"description":"the image buffer or svg string."},"metadata":{"name":"Builder.tsx","directory":"template","line":246}},{"name":"render","description":"Renders this rank card into the canvas.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"Promise","rawType":["Promise","<","Element",">"],"description":null},"metadata":{"name":"RankCardBuilder.tsx","directory":"components","line":220,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/components/RankCardBuilder.tsx#L220"}},{"name":"setAvatar","description":"Sets the avatar for this rank card.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"image","description":"The avatar for this rank card.","optional":false,"default":null,"type":"ImageSource","rawType":["ImageSource"]}],"returns":{"type":"RankCardBuilder","rawType":["RankCardBuilder"],"description":null},"metadata":{"name":"RankCardBuilder.tsx","directory":"components","line":96,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/components/RankCardBuilder.tsx#L96"}},{"name":"setBackground","description":"Sets the background for this rank card.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"image","description":"The background for this rank card.","optional":false,"default":null,"type":"ImageSource","rawType":["ImageSource"]}],"returns":{"type":"RankCardBuilder","rawType":["RankCardBuilder"],"description":null},"metadata":{"name":"RankCardBuilder.tsx","directory":"components","line":105,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/components/RankCardBuilder.tsx#L105"}},{"name":"setBackgroundCrop","description":"Set background crop for this rank card.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"pos","description":null,"optional":false,"default":null,"type":"Partial>","rawType":["Partial","<","undefined","Partial","<","{"," ","height",":"," ","number","; ","width",":"," ","number","; ","x",":"," ","number","; ","y",":"," ","number",";"," ","}",">",">"]}],"returns":{"type":"RankCardBuilder","rawType":["RankCardBuilder"],"description":null},"metadata":{"name":"RankCardBuilder.tsx","directory":"components","line":193,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/components/RankCardBuilder.tsx#L193"}},{"name":"setCurrentXP","description":"Sets the current xp for this rank card.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"xp","description":"The current xp for this rank card.","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"RankCardBuilder","rawType":["RankCardBuilder"],"description":null},"metadata":{"name":"RankCardBuilder.tsx","directory":"components","line":149,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/components/RankCardBuilder.tsx#L149"}},{"name":"setDisplayName","description":"Sets the username for this rank card.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"name","description":"The username for this rank card.","optional":false,"default":null,"type":"string","rawType":["string"]}],"returns":{"type":"RankCardBuilder","rawType":["RankCardBuilder"],"description":null},"metadata":{"name":"RankCardBuilder.tsx","directory":"components","line":123,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/components/RankCardBuilder.tsx#L123"}},{"name":"setFonts","description":"Sets the fonts to be used for this rank card.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"fontConfig","description":"The fonts to be used for this rank card.","optional":false,"default":null,"type":"Required, rank: Partial<{ text: string, value: string }>, xp: Partial<{ text: string, value: string }> }>, username: Partial<{ handle: string, name: string }> }>>","rawType":["Required","<","Partial","<","{"," ","progress",":"," ","Partial","<","{"," ","level",":"," ","Partial","<","{"," ","text",":"," ","string","; ","value",":"," ","string",";"," ","}",">","; ","rank",":"," ","Partial","<","{"," ","text",":"," ","string","; ","value",":"," ","string",";"," ","}",">","; ","xp",":"," ","Partial","<","{"," ","text",":"," ","string","; ","value",":"," ","string",";"," ","}",">",";"," ","}",">","; ","username",":"," ","Partial","<","{"," ","handle",":"," ","string","; ","name",":"," ","string",";"," ","}",">",";"," ","}",">",">"]}],"returns":{"type":"RankCardBuilder","rawType":["RankCardBuilder"],"description":null},"metadata":{"name":"RankCardBuilder.tsx","directory":"components","line":87,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/components/RankCardBuilder.tsx#L87"}},{"name":"setGraphemeProvider","description":"Set grapheme image provider for this builder.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"provider","description":null,"optional":false,"default":null,"type":"GraphemeProvider","rawType":["GraphemeProvider"]}],"returns":{"type":"RankCardBuilder","rawType":["RankCardBuilder"],"description":null},"metadata":{"name":"Builder.tsx","directory":"template","line":211}},{"name":"setLevel","description":"Sets the level of this rank card.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"level","description":"The level of this rank card.","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"RankCardBuilder","rawType":["RankCardBuilder"],"description":null},"metadata":{"name":"RankCardBuilder.tsx","directory":"components","line":167,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/components/RankCardBuilder.tsx#L167"}},{"name":"setOverlay","description":"Set overlay for this rank card.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"overlay","description":null,"optional":false,"default":null,"type":"string | number | boolean","rawType":["string","number","boolean"]}],"returns":{"type":"RankCardBuilder","rawType":["RankCardBuilder"],"description":null},"metadata":{"name":"RankCardBuilder.tsx","directory":"components","line":140,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/components/RankCardBuilder.tsx#L140"}},{"name":"setProgressCalculator","description":"Sets the progress calculator for this rank card. The value returned by this calculator defines the width of the progress bar.\nValid range is 0-100. Returning a number less than 0 or greater than 100 will be clamped within this range, or invalid values will result in 0% width.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"calc","description":"The progress calculator for this rank card.","optional":false,"default":null,"type":"(current: number, required: number) => number","rawType":["(","current: number","required: number",")"," ","=>"," ","number"]}],"returns":{"type":"RankCardBuilder","rawType":["RankCardBuilder"],"description":null},"metadata":{"name":"RankCardBuilder.tsx","directory":"components","line":212,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/components/RankCardBuilder.tsx#L212"}},{"name":"setRank","description":"Sets the rank of this rank card.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"rank","description":"The rank of this rank card.","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"RankCardBuilder","rawType":["RankCardBuilder"],"description":null},"metadata":{"name":"RankCardBuilder.tsx","directory":"components","line":176,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/components/RankCardBuilder.tsx#L176"}},{"name":"setRequiredXP","description":"Sets the required xp for this rank card.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"xp","description":"The required xp for this rank card.","optional":false,"default":null,"type":"number","rawType":["number"]}],"returns":{"type":"RankCardBuilder","rawType":["RankCardBuilder"],"description":null},"metadata":{"name":"RankCardBuilder.tsx","directory":"components","line":158,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/components/RankCardBuilder.tsx#L158"}},{"name":"setStatus","description":"Sets the status for this rank card.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"status","description":"The status for this rank card.","optional":false,"default":null,"type":"RankCardUserStatus","rawType":["RankCardUserStatus"]}],"returns":{"type":"RankCardBuilder","rawType":["RankCardBuilder"],"description":null},"metadata":{"name":"RankCardBuilder.tsx","directory":"components","line":114,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/components/RankCardBuilder.tsx#L114"}},{"name":"setStyle","description":"Set the style of this builder.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"newStyle","description":"the new style.","optional":false,"default":null,"type":"CSSProperties","rawType":["CSSProperties"]}],"returns":{"type":"RankCardBuilder","rawType":["RankCardBuilder"],"description":null},"metadata":{"name":"Builder.tsx","directory":"template","line":220}},{"name":"setStyles","description":"Configures the renderer for this rank card.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"config","description":"The configuration for this rank card.","optional":false,"default":null,"type":"Partial, background: Stylable, container: Stylable, overlay: Stylable, progressbar: Partial<{ container: Stylable, thumb: Stylable, track: Stylable }>, statistics: Partial<{ container: Stylable, level: Partial<{ container: Stylable, text: Stylable, value: Stylable }>, rank: Partial<{ container: Stylable, text: Stylable, value: Stylable }>, xp: Partial<{ container: Stylable, text: Stylable, value: Stylable }> }>, username: Partial<{ container: Stylable, handle: Stylable, name: Stylable }> }>>","rawType":["Partial","<","Partial","<","{"," ","avatar",":"," ","Partial","<","{"," ","container",":"," ","Stylable","; ","image",":"," ","Stylable","; ","status",":"," ","Stylable",";"," ","}",">","; ","background",":"," ","Stylable","; ","container",":"," ","Stylable","; ","overlay",":"," ","Stylable","; ","progressbar",":"," ","Partial","<","{"," ","container",":"," ","Stylable","; ","thumb",":"," ","Stylable","; ","track",":"," ","Stylable",";"," ","}",">","; ","statistics",":"," ","Partial","<","{"," ","container",":"," ","Stylable","; ","level",":"," ","Partial","<","{"," ","container",":"," ","Stylable","; ","text",":"," ","Stylable","; ","value",":"," ","Stylable",";"," ","}",">","; ","rank",":"," ","Partial","<","{"," ","container",":"," ","Stylable","; ","text",":"," ","Stylable","; ","value",":"," ","Stylable",";"," ","}",">","; ","xp",":"," ","Partial","<","{"," ","container",":"," ","Stylable","; ","text",":"," ","Stylable","; ","value",":"," ","Stylable",";"," ","}",">",";"," ","}",">","; ","username",":"," ","Partial","<","{"," ","container",":"," ","Stylable","; ","handle",":"," ","Stylable","; ","name",":"," ","Stylable",";"," ","}",">",";"," ","}",">",">"]}],"returns":{"type":"RankCardBuilder","rawType":["RankCardBuilder"],"description":null},"metadata":{"name":"RankCardBuilder.tsx","directory":"components","line":185,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/components/RankCardBuilder.tsx#L185"}},{"name":"setTextStyles","description":"Configures the texts for this rank card.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"config","description":"The configuration for this rank card.","optional":false,"default":null,"type":"Partial>","rawType":["Partial","<","Partial","<","{"," ","level",":"," ","string","; ","rank",":"," ","string","; ","xp",":"," ","string",";"," ","}",">",">"]}],"returns":{"type":"RankCardBuilder","rawType":["RankCardBuilder"],"description":null},"metadata":{"name":"RankCardBuilder.tsx","directory":"components","line":202,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/components/RankCardBuilder.tsx#L202"}},{"name":"setUsername","description":"Sets the handle name for this rank card.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"name","description":"The handle name for this rank card.","optional":false,"default":null,"type":"string","rawType":["string"]}],"returns":{"type":"RankCardBuilder","rawType":["RankCardBuilder"],"description":null},"metadata":{"name":"RankCardBuilder.tsx","directory":"components","line":132,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/components/RankCardBuilder.tsx#L132"}},{"name":"from","description":"Create a builder from builder template.","see":[],"static":true,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"template","description":null,"optional":false,"default":null,"type":"BuilderTemplate","rawType":["BuilderTemplate"]}],"returns":{"type":"Builder>","rawType":["Builder","<","Record","<","string","unknown",">",">"],"description":null},"metadata":{"name":"Builder.tsx","directory":"template","line":296}}],"private":false,"properties":[{"abstract":false,"default":"...","deprecated":false,"description":"The components of this builder.","metadata":{"name":"Builder.tsx","directory":"template","line":133},"name":"components","private":false,"readonly":false,"see":[],"static":false,"type":"Array"},{"abstract":false,"default":"BuiltInGraphemeProvider.Twemoji","deprecated":false,"description":"The grapheme provider of this builder.","metadata":{"name":"Builder.tsx","directory":"template","line":142},"name":"graphemeProvider","private":false,"readonly":false,"see":[],"static":false,"type":"GraphemeProvider"},{"abstract":false,"default":null,"deprecated":false,"description":"the height of this builder.","metadata":{"name":"Builder.tsx","directory":"template","line":151},"name":"height","private":false,"readonly":false,"see":[],"static":false,"type":"number"},{"abstract":false,"default":"...","deprecated":false,"description":"The options manager of this builder.","metadata":{"name":"Builder.tsx","directory":"template","line":137},"name":"options","private":false,"readonly":false,"see":[],"static":false,"type":"BuilderOptionsManager"},{"abstract":false,"default":"\"\"","deprecated":false,"description":"The tailwind subset to apply to this builder.","metadata":{"name":"Builder.tsx","directory":"template","line":129},"name":"tw","private":false,"readonly":false,"see":[],"static":false,"type":"string"},{"abstract":false,"default":null,"deprecated":false,"description":"the width of this builder.","metadata":{"name":"Builder.tsx","directory":"template","line":150},"name":"width","private":false,"readonly":false,"see":[],"static":false,"type":"number"},{"default":null,"description":"Get the style of this builder.","metadata":{"name":"Builder.tsx","directory":"template","line":179},"name":"style","type":"CSSProperties"}],"see":[]},"markdown":[]},{"data":{"name":"StyleSheet","abstract":false,"constructor":null,"metadata":{"name":"StyleSheet.ts","directory":"helpers","line":30,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/helpers/StyleSheet.ts#L30"},"deprecated":false,"description":null,"extends":"any","implements":null,"rawExtends":["any"],"rawImplements":null,"methods":[{"name":"cn","description":"Merges multiple tailwind-like class names into appropriate class names.","see":[],"static":true,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"classes","description":null,"optional":false,"default":null,"type":"Array","rawType":["Array","<","ClassNameValue",">"]}],"returns":{"type":"string","rawType":["string"],"description":null},"metadata":{"name":"StyleSheet.ts","directory":"helpers","line":69,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/helpers/StyleSheet.ts#L69"}},{"name":"compose","description":"Composes two CSSPropertiesLike objects.","see":[],"static":true,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"style1","description":null,"optional":false,"default":null,"type":"CSSProperties","rawType":["CSSProperties"]},{"name":"style2","description":null,"optional":false,"default":null,"type":"CSSProperties","rawType":["CSSProperties"]}],"returns":{"type":"CSSProperties","rawType":["CSSProperties"],"description":null},"metadata":{"name":"StyleSheet.ts","directory":"helpers","line":49,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/helpers/StyleSheet.ts#L49"}},{"name":"create","description":"Creates a new CSSPropertiesLike object.","see":[],"static":true,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"styles","description":null,"optional":false,"default":null,"type":"CSSPropertiesLike","rawType":["CSSPropertiesLike","<","K",">"]}],"returns":{"type":"CSSPropertiesLike","rawType":["CSSPropertiesLike","<","K",">"],"description":null},"metadata":{"name":"StyleSheet.ts","directory":"helpers","line":36,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/helpers/StyleSheet.ts#L36"}},{"name":"css","description":"Returns the style object from stylable data.","see":[],"static":true,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"data","description":null,"optional":true,"default":null,"type":"Stylable","rawType":["Stylable"]}],"returns":{"type":"CSSPropertiesLike","rawType":["CSSPropertiesLike","<","string",">"],"description":null},"metadata":{"name":"StyleSheet.ts","directory":"helpers","line":84,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/helpers/StyleSheet.ts#L84"}},{"name":"flatten","description":"Flattens an array of CSSPropertiesLike objects.","see":[],"static":true,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"style","description":null,"optional":false,"default":null,"type":"Array","rawType":["Array","<","CSSProperties",">"]}],"returns":{"type":"CSSProperties","rawType":["CSSProperties"],"description":null},"metadata":{"name":"StyleSheet.ts","directory":"helpers","line":59,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/helpers/StyleSheet.ts#L59"}},{"name":"tw","description":"Returns the className string from stylable data.","see":[],"static":true,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"data","description":null,"optional":true,"default":null,"type":"Stylable","rawType":["Stylable"]}],"returns":{"type":"string","rawType":["string"],"description":null},"metadata":{"name":"StyleSheet.ts","directory":"helpers","line":76,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/helpers/StyleSheet.ts#L76"}}],"private":false,"properties":[],"see":[]},"markdown":[]},{"data":{"name":"TemplateImage","abstract":false,"constructor":{"name":"TemplateImage","description":"Creates a new TemplateImage instance.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"source","description":"The image source\n\nconst image = new TemplateImage('https://example.com/image.png');","optional":false,"default":null,"type":"ImageSource","rawType":["ImageSource"]}],"returns":{"type":"TemplateImage","rawType":["TemplateImage"],"description":null},"metadata":{"name":"TemplateFactory.ts","directory":"assets","line":17,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/assets/TemplateFactory.ts#L17"},"constructor":"new TemplateImage"},"metadata":{"name":"TemplateFactory.ts","directory":"assets","line":7,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/assets/TemplateFactory.ts#L7"},"deprecated":false,"description":null,"extends":null,"implements":null,"rawExtends":null,"rawImplements":null,"methods":[{"name":"resolve","description":"Resolves this image to consumable form.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"Promise","rawType":["Promise","<","Image",">"],"description":null},"metadata":{"name":"TemplateFactory.ts","directory":"assets","line":29,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/assets/TemplateFactory.ts#L29"}},{"name":"resolved","description":"Whether this image has been resolved.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[],"returns":{"type":"boolean","rawType":["boolean"],"description":null},"metadata":{"name":"TemplateFactory.ts","directory":"assets","line":22,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/assets/TemplateFactory.ts#L22"}}],"private":false,"properties":[{"abstract":false,"default":null,"deprecated":false,"description":"The image source\n\nconst image = new TemplateImage('https://example.com/image.png');","metadata":{"name":"TemplateFactory.ts","directory":"assets","line":17,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/assets/TemplateFactory.ts#L17"},"name":"source","private":false,"readonly":false,"see":[],"static":false,"type":"ImageSource"}],"see":[]},"markdown":[]}],"functions":[{"data":{"name":"canvacord","description":"Creates a new Canvacord image processor.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"source","description":"The image source to use","optional":false,"default":null,"type":"ImageSource","rawType":["ImageSource"]},{"name":"options","description":"The options to use","optional":true,"default":null,"type":"CanvacordInit","rawType":["CanvacordInit"]}],"returns":{"type":"CanvasImage","rawType":["CanvasImage"],"description":"The image processor"},"metadata":{"name":"Canvacord.ts","directory":"canvas","line":122,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/Canvacord.ts#L122"}},"markdown":[]},{"data":{"name":"createCanvasImage","description":"Creates a canvas image from the image source.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"img","description":"The image source","optional":false,"default":null,"type":"ImageSource","rawType":["ImageSource"]}],"returns":{"type":"Promise","rawType":["Promise","<","Image",">"],"description":"The canvas image\n\nconst image = await createCanvasImage('https://example.com/image.png');"},"metadata":{"name":"utils.ts","directory":"canvas","line":11,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/utils.ts#L11"}},"markdown":[]},{"data":{"name":"createEmojiProvider","description":null,"see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"builder","description":null,"optional":false,"default":null,"type":"(code: string) => string","rawType":["(","code: string",")"," ","=>"," ","string"]}],"returns":{"type":"GraphemeProvider","rawType":["GraphemeProvider"],"description":null},"metadata":{"name":"Builder.tsx","directory":"template","line":23}},"markdown":[]},{"data":{"name":"createImageGenerator","description":"Creates a new image generator.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"template","description":"The template to use","optional":false,"default":null,"type":"ImageGenerationTemplate","rawType":["ImageGenerationTemplate"]}],"returns":{"type":"ImageGen","rawType":["ImageGen"],"description":null},"metadata":{"name":"ImageGen.ts","directory":"canvas","line":474,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageGen.ts#L474"}},"markdown":[]},{"data":{"name":"createTemplate","description":"Creates a new template from the provided template.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"cb","description":null,"optional":false,"default":null,"type":"(args: P) => IImageGenerationTemplate","rawType":["(","args: P",")"," ","=>"," ","IImageGenerationTemplate"]}],"returns":{"type":"(args: P) => ImageGenerationTemplate","rawType":["(","args: P",")"," ","=>"," ","ImageGenerationTemplate"],"description":null},"metadata":{"name":"TemplateFactory.ts","directory":"assets","line":40,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/assets/TemplateFactory.ts#L40"}},"markdown":[]},{"data":{"name":"loadImage","description":"Loads an image from the specified source.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"source","description":"The image source","optional":false,"default":null,"type":"ImageSource","rawType":["ImageSource"]},{"name":"options","description":"The options for loading the image","optional":true,"default":null,"type":"LoadImageOptions","rawType":["LoadImageOptions"]}],"returns":{"type":"Promise","rawType":["Promise","<","CanvacordImage",">"],"description":null},"metadata":{"name":"loadImage.ts","directory":"helpers","line":61,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/helpers/loadImage.ts#L61"}},"markdown":[]},{"data":{"name":"performObjectCleanup","description":"Performs object cleanup by deleting all undefined properties that could interfere with builder methods.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"obj","description":null,"optional":false,"default":null,"type":"Record","rawType":["Record","<","string","any",">"]},{"name":"deep","description":null,"optional":false,"default":null,"type":"boolean","rawType":["boolean"]}],"returns":{"type":"void","rawType":["void"],"description":null},"metadata":{"name":"StyleSheet.ts","directory":"helpers","line":19,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/helpers/StyleSheet.ts#L19"}},"markdown":[]},{"data":{"name":"render","description":"Renders the components.","see":[],"static":false,"private":false,"examples":[],"abstract":false,"deprecated":false,"parameters":[{"name":"components","description":null,"optional":false,"default":null,"type":"Array","rawType":["Array","<","unknown",">"]}],"returns":{"type":"Array","rawType":["Array","<","Element",">"],"description":null},"metadata":{"name":"jsx.ts","directory":"helpers","line":113,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/helpers/jsx.ts#L113"}},"markdown":[]}],"name":"canvacord","types":[{"data":{"deprecated":false,"description":"The builder template.","metadata":{"name":"Builder.tsx","directory":"template","line":71},"name":"BuilderTemplate","parameters":[],"private":false,"properties":[{"name":"components","description":"The components of this template.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"Builder.tsx","directory":"template","line":75},"private":false,"readonly":false,"see":[],"static":false,"type":"Array","rawType":["Array","<","Node","Element",">"]},{"name":"height","description":"The height of this template.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"Builder.tsx","directory":"template","line":83},"private":false,"readonly":false,"see":[],"static":false,"type":"number","rawType":["number"]},{"name":"style","description":"The style of this template.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"Builder.tsx","directory":"template","line":87},"private":false,"readonly":false,"see":[],"static":false,"type":"CSSProperties","rawType":["CSSProperties"]},{"name":"width","description":"The width of this template.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"Builder.tsx","directory":"template","line":79},"private":false,"readonly":false,"see":[],"static":false,"type":"number","rawType":["number"]}],"returns":null,"see":[],"type":"any"},"markdown":[]},{"data":{"deprecated":false,"description":null,"metadata":{"name":"Canvacord.ts","directory":"canvas","line":16,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/Canvacord.ts#L16"},"name":"CanvacordFactory","parameters":[],"private":false,"properties":[{"name":"affect","description":null,"value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"Canvacord.ts","directory":"canvas","line":10,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/Canvacord.ts#L10"},"private":false,"readonly":false,"see":[],"static":false,"type":"(args: [any]) => Promise","rawType":["(","args: [,any,]",")"," ","=>"," ","Promise","<","Buffer",">"]},{"name":"beautiful","description":null,"value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"Canvacord.ts","directory":"canvas","line":10,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/Canvacord.ts#L10"},"private":false,"readonly":false,"see":[],"static":false,"type":"(args: [any]) => Promise","rawType":["(","args: [,any,]",")"," ","=>"," ","Promise","<","Buffer",">"]},{"name":"bed","description":null,"value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"Canvacord.ts","directory":"canvas","line":10,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/Canvacord.ts#L10"},"private":false,"readonly":false,"see":[],"static":false,"type":"(args: [any, any]) => Promise","rawType":["(","args: [,any,any,]",")"," ","=>"," ","Promise","<","Buffer",">"]},{"name":"colorfy","description":null,"value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"Canvacord.ts","directory":"canvas","line":10,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/Canvacord.ts#L10"},"private":false,"readonly":false,"see":[],"static":false,"type":"(args: [any, any]) => Promise","rawType":["(","args: [,any,any,]",")"," ","=>"," ","Promise","<","Buffer",">"]},{"name":"delete","description":null,"value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"Canvacord.ts","directory":"canvas","line":10,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/Canvacord.ts#L10"},"private":false,"readonly":false,"see":[],"static":false,"type":"(args: [any]) => Promise","rawType":["(","args: [,any,]",")"," ","=>"," ","Promise","<","Buffer",">"]},{"name":"distracted","description":null,"value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"Canvacord.ts","directory":"canvas","line":10,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/Canvacord.ts#L10"},"private":false,"readonly":false,"see":[],"static":false,"type":"(args: [any, any, any]) => Promise","rawType":["(","args: [,any,any,any,]",")"," ","=>"," ","Promise","<","Buffer",">"]},{"name":"facepalm","description":null,"value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"Canvacord.ts","directory":"canvas","line":10,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/Canvacord.ts#L10"},"private":false,"readonly":false,"see":[],"static":false,"type":"(args: [any]) => Promise","rawType":["(","args: [,any,]",")"," ","=>"," ","Promise","<","Buffer",">"]},{"name":"fuse","description":null,"value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"Canvacord.ts","directory":"canvas","line":10,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/Canvacord.ts#L10"},"private":false,"readonly":false,"see":[],"static":false,"type":"(args: [any, any]) => Promise","rawType":["(","args: [,any,any,]",")"," ","=>"," ","Promise","<","Buffer",">"]},{"name":"hitler","description":null,"value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"Canvacord.ts","directory":"canvas","line":10,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/Canvacord.ts#L10"},"private":false,"readonly":false,"see":[],"static":false,"type":"(args: [any]) => Promise","rawType":["(","args: [,any,]",")"," ","=>"," ","Promise","<","Buffer",">"]},{"name":"jail","description":null,"value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"Canvacord.ts","directory":"canvas","line":10,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/Canvacord.ts#L10"},"private":false,"readonly":false,"see":[],"static":false,"type":"(args: [any, any]) => Promise","rawType":["(","args: [,any,any,]",")"," ","=>"," ","Promise","<","Buffer",">"]},{"name":"jokeoverhead","description":null,"value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"Canvacord.ts","directory":"canvas","line":10,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/Canvacord.ts#L10"},"private":false,"readonly":false,"see":[],"static":false,"type":"(args: never) => Promise","rawType":["(","args: never",")"," ","=>"," ","Promise","<","Buffer",">"]},{"name":"kiss","description":null,"value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"Canvacord.ts","directory":"canvas","line":10,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/Canvacord.ts#L10"},"private":false,"readonly":false,"see":[],"static":false,"type":"(args: [any, any]) => Promise","rawType":["(","args: [,any,any,]",")"," ","=>"," ","Promise","<","Buffer",">"]},{"name":"rainbow","description":null,"value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"Canvacord.ts","directory":"canvas","line":10,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/Canvacord.ts#L10"},"private":false,"readonly":false,"see":[],"static":false,"type":"(args: [any]) => Promise","rawType":["(","args: [,any,]",")"," ","=>"," ","Promise","<","Buffer",">"]},{"name":"rip","description":null,"value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"Canvacord.ts","directory":"canvas","line":10,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/Canvacord.ts#L10"},"private":false,"readonly":false,"see":[],"static":false,"type":"(args: [any]) => Promise","rawType":["(","args: [,any,]",")"," ","=>"," ","Promise","<","Buffer",">"]},{"name":"shit","description":null,"value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"Canvacord.ts","directory":"canvas","line":10,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/Canvacord.ts#L10"},"private":false,"readonly":false,"see":[],"static":false,"type":"(args: [any]) => Promise","rawType":["(","args: [,any,]",")"," ","=>"," ","Promise","<","Buffer",">"]},{"name":"slap","description":null,"value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"Canvacord.ts","directory":"canvas","line":10,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/Canvacord.ts#L10"},"private":false,"readonly":false,"see":[],"static":false,"type":"(args: [any, any]) => Promise","rawType":["(","args: [,any,any,]",")"," ","=>"," ","Promise","<","Buffer",">"]},{"name":"spank","description":null,"value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"Canvacord.ts","directory":"canvas","line":10,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/Canvacord.ts#L10"},"private":false,"readonly":false,"see":[],"static":false,"type":"(args: [any, any]) => Promise","rawType":["(","args: [,any,any,]",")"," ","=>"," ","Promise","<","Buffer",">"]},{"name":"trash","description":null,"value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"Canvacord.ts","directory":"canvas","line":10,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/Canvacord.ts#L10"},"private":false,"readonly":false,"see":[],"static":false,"type":"(args: [any]) => Promise","rawType":["(","args: [,any,]",")"," ","=>"," ","Promise","<","Buffer",">"]},{"name":"wanted","description":null,"value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"Canvacord.ts","directory":"canvas","line":10,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/Canvacord.ts#L10"},"private":false,"readonly":false,"see":[],"static":false,"type":"(args: [any]) => Promise","rawType":["(","args: [,any,]",")"," ","=>"," ","Promise","<","Buffer",">"]},{"name":"wasted","description":null,"value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"Canvacord.ts","directory":"canvas","line":10,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/Canvacord.ts#L10"},"private":false,"readonly":false,"see":[],"static":false,"type":"(args: [any]) => Promise","rawType":["(","args: [,any,]",")"," ","=>"," ","Promise","<","Buffer",">"]},{"name":"filters","description":null,"value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"Canvacord.ts","directory":"canvas","line":22,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/Canvacord.ts#L22"},"private":false,"readonly":false,"see":[],"static":false,"type":"any","rawType":["any"]},{"name":"triggered","description":null,"value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"Canvacord.ts","directory":"canvas","line":30,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/Canvacord.ts#L30"},"private":false,"readonly":false,"see":[],"static":false,"type":"any","rawType":["any"]}],"returns":null,"see":[],"type":"any"},"markdown":[]},{"data":{"deprecated":false,"description":null,"metadata":{"name":"Canvacord.ts","directory":"canvas","line":84,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/Canvacord.ts#L84"},"name":"CanvacordInit","parameters":[],"private":false,"properties":[{"name":"height","description":"The height of the image. Defaults to `-1` (auto).","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"Canvacord.ts","directory":"canvas","line":93,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/Canvacord.ts#L93"},"private":false,"readonly":false,"see":[],"static":false,"type":"number","rawType":["number"]},{"name":"width","description":"The width of the image. Defaults to `-1` (auto).","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"Canvacord.ts","directory":"canvas","line":88,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/Canvacord.ts#L88"},"private":false,"readonly":false,"see":[],"static":false,"type":"number","rawType":["number"]}],"returns":null,"see":[],"type":"any"},"markdown":[]},{"data":{"deprecated":false,"description":null,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":33,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageGen.ts#L33"},"name":"CustomGenerationStep","parameters":[],"private":false,"properties":[{"name":"process","description":"The function to call when processing this step.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":37,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageGen.ts#L37"},"private":false,"readonly":false,"see":[],"static":false,"type":"(canvas: Canvas, ctx: SKRSContext2D, step: ImageGenerationStep) => void","rawType":["(","canvas: Canvas","ctx: SKRSContext2D","step: ImageGenerationStep",")"," ","=>"," ","void"]}],"returns":null,"see":[],"type":"any"},"markdown":[]},{"data":{"deprecated":false,"description":null,"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":145,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageFilterer.ts#L145"},"name":"DropShadowConfig","parameters":[],"private":false,"properties":[{"name":"color","description":null,"value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":149,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageFilterer.ts#L149"},"private":false,"readonly":false,"see":[],"static":false,"type":"string","rawType":["string"]},{"name":"radius","description":null,"value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":148,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageFilterer.ts#L148"},"private":false,"readonly":false,"see":[],"static":false,"type":"number","rawType":["number"]},{"name":"x","description":null,"value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":146,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageFilterer.ts#L146"},"private":false,"readonly":false,"see":[],"static":false,"type":"number","rawType":["number"]},{"name":"y","description":null,"value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageFilterer.ts","directory":"canvas","line":147,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageFilterer.ts#L147"},"private":false,"readonly":false,"see":[],"static":false,"type":"number","rawType":["number"]}],"returns":null,"see":[],"type":"any"},"markdown":[]},{"data":{"deprecated":false,"description":"The template to use for image generation.","metadata":{"name":"ImageGen.ts","directory":"canvas","line":141,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageGen.ts#L141"},"name":"IImageGenerationTemplate","parameters":[],"private":false,"properties":[{"name":"gif","description":"The gif options.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":157,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageGen.ts#L157"},"private":false,"readonly":false,"see":[],"static":false,"type":"EncoderOptions","rawType":["EncoderOptions"]},{"name":"height","description":"The height of the template.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":149,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageGen.ts#L149"},"private":false,"readonly":false,"see":[],"static":false,"type":"number","rawType":["number"]},{"name":"steps","description":"The steps to apply to the canvas.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":153,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageGen.ts#L153"},"private":false,"readonly":false,"see":[],"static":false,"type":"Array","rawType":["Array","<","ImageGenerationStep",">"]},{"name":"width","description":"The width of the template.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":145,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageGen.ts#L145"},"private":false,"readonly":false,"see":[],"static":false,"type":"number","rawType":["number"]}],"returns":null,"see":[],"type":"any"},"markdown":[]},{"data":{"deprecated":false,"description":null,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":6,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageGen.ts#L6"},"name":"ImageGenerationStep","parameters":[],"private":false,"properties":[{"name":"custom","description":"The custom steps to apply to the canvas.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":18,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageGen.ts#L18"},"private":false,"readonly":false,"see":[],"static":false,"type":"Array","rawType":["Array","<","CustomGenerationStep",">"]},{"name":"image","description":"The image to render.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":10,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageGen.ts#L10"},"private":false,"readonly":false,"see":[],"static":false,"type":"Array","rawType":["Array","<","ImgenStep",">"]},{"name":"postprocess","description":"The function to call after processing has finished.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":30,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageGen.ts#L30"},"private":false,"readonly":false,"see":[],"static":false,"type":"(canvas: Canvas, ctx: SKRSContext2D, step: ImageGenerationStep) => void","rawType":["(","canvas: Canvas","ctx: SKRSContext2D","step: ImageGenerationStep",")"," ","=>"," ","void"]},{"name":"preprocess","description":"The function to call before processing this step.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":22,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageGen.ts#L22"},"private":false,"readonly":false,"see":[],"static":false,"type":"(canvas: Canvas, ctx: SKRSContext2D, step: ImageGenerationStep) => void","rawType":["(","canvas: Canvas","ctx: SKRSContext2D","step: ImageGenerationStep",")"," ","=>"," ","void"]},{"name":"process","description":"The function to call when processing this step.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":26,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageGen.ts#L26"},"private":false,"readonly":false,"see":[],"static":false,"type":"(canvas: Canvas, ctx: SKRSContext2D, step: ImageGenerationStep) => void","rawType":["(","canvas: Canvas","ctx: SKRSContext2D","step: ImageGenerationStep",")"," ","=>"," ","void"]},{"name":"text","description":"The text to render.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":14,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageGen.ts#L14"},"private":false,"readonly":false,"see":[],"static":false,"type":"Array","rawType":["Array","<","TextGenerationStep",">"]}],"returns":null,"see":[],"type":"any"},"markdown":[]},{"data":{"deprecated":false,"description":null,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":40,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageGen.ts#L40"},"name":"ImgenStep","parameters":[],"private":false,"properties":[{"name":"height","description":"The height of the image.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":60,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageGen.ts#L60"},"private":false,"readonly":false,"see":[],"static":false,"type":"number","rawType":["number"]},{"name":"postprocess","description":"The function to call after processing has finished.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":72,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageGen.ts#L72"},"private":false,"readonly":false,"see":[],"static":false,"type":"(canvas: Canvas, ctx: SKRSContext2D, source: ImgenStep) => void","rawType":["(","canvas: Canvas","ctx: SKRSContext2D","source: ImgenStep",")"," ","=>"," ","void"]},{"name":"preprocess","description":"The function to call before processing this step.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":64,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageGen.ts#L64"},"private":false,"readonly":false,"see":[],"static":false,"type":"(canvas: Canvas, ctx: SKRSContext2D, source: ImgenStep) => void","rawType":["(","canvas: Canvas","ctx: SKRSContext2D","source: ImgenStep",")"," ","=>"," ","void"]},{"name":"process","description":"The function to call when processing this step.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":68,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageGen.ts#L68"},"private":false,"readonly":false,"see":[],"static":false,"type":"(canvas: Canvas, ctx: SKRSContext2D, source: ImgenStep) => void","rawType":["(","canvas: Canvas","ctx: SKRSContext2D","source: ImgenStep",")"," ","=>"," ","void"]},{"name":"source","description":"The image to render.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":44,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageGen.ts#L44"},"private":false,"readonly":false,"see":[],"static":false,"type":"TemplateImage","rawType":["TemplateImage"]},{"name":"width","description":"The width of the image.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":56,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageGen.ts#L56"},"private":false,"readonly":false,"see":[],"static":false,"type":"number","rawType":["number"]},{"name":"x","description":"The x position of the image.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":48,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageGen.ts#L48"},"private":false,"readonly":false,"see":[],"static":false,"type":"number","rawType":["number"]},{"name":"y","description":"The y position of the image.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":52,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageGen.ts#L52"},"private":false,"readonly":false,"see":[],"static":false,"type":"number","rawType":["number"]}],"returns":null,"see":[],"type":"any"},"markdown":[]},{"data":{"deprecated":false,"description":null,"metadata":{"name":"LeaderboardBuilder.tsx","directory":"components","line":12,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/components/LeaderboardBuilder.tsx#L12"},"name":"LeaderboardProps","parameters":[],"private":false,"properties":[{"name":"abbreviate","description":"Whether or not to abbreviate the numeric values.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"LeaderboardBuilder.tsx","directory":"components","line":78,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/components/LeaderboardBuilder.tsx#L78"},"private":false,"readonly":false,"see":[],"static":false,"type":"boolean","rawType":["boolean"]},{"name":"background","description":"The background image.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"LeaderboardBuilder.tsx","directory":"components","line":16,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/components/LeaderboardBuilder.tsx#L16"},"private":false,"readonly":false,"see":[],"static":false,"type":"null | ImageSource","rawType":["null","ImageSource"]},{"name":"backgroundColor","description":"The background color.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"LeaderboardBuilder.tsx","directory":"components","line":20,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/components/LeaderboardBuilder.tsx#L20"},"private":false,"readonly":false,"see":[],"static":false,"type":"string","rawType":["string"]},{"name":"header","description":"The header of this leaderboard ui.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"LeaderboardBuilder.tsx","directory":"components","line":24,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/components/LeaderboardBuilder.tsx#L24"},"private":false,"readonly":false,"see":[],"static":false,"type":"{ image: ImageSource, subtitle: string, title: string }","rawType":["{"," ","image",":"," ","ImageSource","; ","subtitle",":"," ","string","; ","title",":"," ","string",";"," ","}"]},{"name":"players","description":"The players of this leaderboard ui.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"LeaderboardBuilder.tsx","directory":"components","line":41,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/components/LeaderboardBuilder.tsx#L41"},"private":false,"readonly":false,"see":[],"static":false,"type":"Array<{ avatar: ImageSource, displayName: string, level: number, rank: number, username: string, xp: number }>","rawType":["Array","<","{"," ","avatar",":"," ","ImageSource","; ","displayName",":"," ","string","; ","level",":"," ","number","; ","rank",":"," ","number","; ","username",":"," ","string","; ","xp",":"," ","number",";"," ","}",">"]},{"name":"text","description":"The text values of this leaderboard ui.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"LeaderboardBuilder.tsx","directory":"components","line":70,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/components/LeaderboardBuilder.tsx#L70"},"private":false,"readonly":false,"see":[],"static":false,"type":"{ level: string, rank: string, xp: string }","rawType":["{"," ","level",":"," ","string","; ","rank",":"," ","string","; ","xp",":"," ","string",";"," ","}"]}],"returns":null,"see":[],"type":"any"},"markdown":[]},{"data":{"deprecated":false,"description":"The options for loading an image.","metadata":{"name":"loadImage.ts","directory":"helpers","line":41,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/helpers/loadImage.ts#L41"},"name":"LoadImageOptions","parameters":[],"private":false,"properties":[{"name":"headers","description":"The headers to use when downloading the image.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"loadImage.ts","directory":"helpers","line":45,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/helpers/loadImage.ts#L45"},"private":false,"readonly":false,"see":[],"static":false,"type":"Record","rawType":["Record","<","string","string",">"]},{"name":"maxRedirects","description":"The maximum number of redirects to follow.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"loadImage.ts","directory":"helpers","line":49,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/helpers/loadImage.ts#L49"},"private":false,"readonly":false,"see":[],"static":false,"type":"number","rawType":["number"]},{"name":"requestOptions","description":"Other request options to use when downloading the image.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"loadImage.ts","directory":"helpers","line":53,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/helpers/loadImage.ts#L53"},"private":false,"readonly":false,"see":[],"static":false,"type":"RequestOptions","rawType":["RequestOptions"]}],"returns":null,"see":[],"type":"any"},"markdown":[]},{"data":{"deprecated":false,"description":"The builder node.","metadata":{"name":"Builder.tsx","directory":"template","line":116},"name":"Node","parameters":[],"private":false,"properties":[{"name":"toElement","description":null,"value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"Builder.tsx","directory":"template","line":120},"private":false,"readonly":false,"see":[],"static":false,"type":"any","rawType":["any"]}],"returns":null,"see":[],"type":"any"},"markdown":[]},{"data":{"deprecated":false,"description":null,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":75,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageGen.ts#L75"},"name":"TextGenerationStep","parameters":[],"private":false,"properties":[{"name":"align","description":"The alignment of the text.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":115,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageGen.ts#L115"},"private":false,"readonly":false,"see":[],"static":false,"type":"'left' | 'center' | 'right'","rawType":["'","left","'","'","center","'","'","right","'"]},{"name":"baseline","description":"The baseline of the text.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":119,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageGen.ts#L119"},"private":false,"readonly":false,"see":[],"static":false,"type":"'top' | 'middle' | 'bottom'","rawType":["'","top","'","'","middle","'","'","bottom","'"]},{"name":"color","description":"The color of the text.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":87,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageGen.ts#L87"},"private":false,"readonly":false,"see":[],"static":false,"type":"string","rawType":["string"]},{"name":"direction","description":"The directionality of the text.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":123,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageGen.ts#L123"},"private":false,"readonly":false,"see":[],"static":false,"type":"'inherit' | 'ltr' | 'rtl'","rawType":["'","inherit","'","'","ltr","'","'","rtl","'"]},{"name":"font","description":"The font of the text.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":83,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageGen.ts#L83"},"private":false,"readonly":false,"see":[],"static":false,"type":"string","rawType":["string"]},{"name":"lineHeight","description":"The line height of the text.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":107,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageGen.ts#L107"},"private":false,"readonly":false,"see":[],"static":false,"type":"number","rawType":["number"]},{"name":"lineWidth","description":"The line width of the text.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":111,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageGen.ts#L111"},"private":false,"readonly":false,"see":[],"static":false,"type":"number","rawType":["number"]},{"name":"maxWidth","description":"The maximum width of the text.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":103,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageGen.ts#L103"},"private":false,"readonly":false,"see":[],"static":false,"type":"number","rawType":["number"]},{"name":"postprocess","description":"The function to call after processing has finished.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":135,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageGen.ts#L135"},"private":false,"readonly":false,"see":[],"static":false,"type":"(canvas: Canvas, ctx: SKRSContext2D, text: TextGenerationStep) => void","rawType":["(","canvas: Canvas","ctx: SKRSContext2D","text: TextGenerationStep",")"," ","=>"," ","void"]},{"name":"preprocess","description":"The function to call before processing this step.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":127,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageGen.ts#L127"},"private":false,"readonly":false,"see":[],"static":false,"type":"(canvas: Canvas, ctx: SKRSContext2D, text: TextGenerationStep) => void","rawType":["(","canvas: Canvas","ctx: SKRSContext2D","text: TextGenerationStep",")"," ","=>"," ","void"]},{"name":"process","description":"The function to call when processing this step.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":131,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageGen.ts#L131"},"private":false,"readonly":false,"see":[],"static":false,"type":"(canvas: Canvas, ctx: SKRSContext2D, text: TextGenerationStep) => void","rawType":["(","canvas: Canvas","ctx: SKRSContext2D","text: TextGenerationStep",")"," ","=>"," ","void"]},{"name":"stroke","description":"Whether to stroke the text.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":91,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageGen.ts#L91"},"private":false,"readonly":false,"see":[],"static":false,"type":"boolean","rawType":["boolean"]},{"name":"value","description":"The text to render.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":79,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageGen.ts#L79"},"private":false,"readonly":false,"see":[],"static":false,"type":"string","rawType":["string"]},{"name":"x","description":"The x position of the text.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":95,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageGen.ts#L95"},"private":false,"readonly":false,"see":[],"static":false,"type":"number","rawType":["number"]},{"name":"y","description":"The y position of the text.","value":null,"abstract":false,"default":null,"deprecated":false,"metadata":{"name":"ImageGen.ts","directory":"canvas","line":99,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/ImageGen.ts#L99"},"private":false,"readonly":false,"see":[],"static":false,"type":"number","rawType":["number"]}],"returns":null,"see":[],"type":"any"},"markdown":[]},{"data":{"deprecated":false,"description":"The build output format.","metadata":{"name":"Builder.tsx","directory":"template","line":93},"name":"BuildFormat","parameters":[],"private":false,"properties":[],"returns":null,"see":[],"type":"'svg' | 'png' | 'avif' | 'jpeg' | 'webp'"},"markdown":[]},{"data":{"deprecated":false,"description":"The builder build options.","metadata":{"name":"Builder.tsx","directory":"template","line":98},"name":"BuilderBuildOptions","parameters":[],"private":false,"properties":[],"returns":null,"see":[],"type":"{ format: BuildFormat, options: RenderSvgOptions, signal: AbortSignal } & SatoriOptions"},"markdown":[]},{"data":{"deprecated":false,"description":"The CSS properties like object.","metadata":{"name":"StyleSheet.ts","directory":"helpers","line":14,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/helpers/StyleSheet.ts#L14"},"name":"CSSPropertiesLike","parameters":[],"private":false,"properties":[],"returns":null,"see":[],"type":"Record"},"markdown":[]},{"data":{"deprecated":false,"description":null,"metadata":{"name":"Canvacord.ts","directory":"canvas","line":114,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/Canvacord.ts#L114"},"name":"Canvacord","parameters":[],"private":false,"properties":[],"returns":null,"see":[],"type":"CanvacordFactory & (typeof CanvacordConstructor)"},"markdown":[]},{"data":{"deprecated":false,"description":null,"metadata":{"name":"utils.ts","directory":"canvas","line":22,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/utils.ts#L22"},"name":"ContextManipulationStep","parameters":[],"private":false,"properties":[],"returns":null,"see":[],"type":"(ctx: SKRSContext2D) => Awaited"},"markdown":[]},{"data":{"deprecated":false,"description":"The element initialization options.","metadata":{"name":"jsx.ts","directory":"helpers","line":12,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/helpers/jsx.ts#L12"},"name":"ElementInit","parameters":[],"private":false,"properties":[],"returns":null,"see":[],"type":"{ children: any, key: React.Key | null, props: Record, type: string }"},"markdown":[]},{"data":{"deprecated":false,"description":null,"metadata":{"name":"Encodable.ts","directory":"canvas","line":3,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/Encodable.ts#L3"},"name":"EncodingFormat","parameters":[],"private":false,"properties":[],"returns":null,"see":[],"type":"'png' | 'jpeg' | 'webp' | 'avif' | 'raw'"},"markdown":[]},{"data":{"deprecated":false,"description":null,"metadata":{"name":"Builder.tsx","directory":"template","line":9},"name":"GraphemeProvider","parameters":[],"private":false,"properties":[],"returns":null,"see":[],"type":"Record"},"markdown":[]},{"data":{"deprecated":false,"description":null,"metadata":{"name":"Canvacord.ts","directory":"canvas","line":9,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/canvas/Canvacord.ts#L9"},"name":"ImageGeneratorImplementor","parameters":[],"private":false,"properties":[],"returns":null,"see":[],"type":"any"},"markdown":[]},{"data":{"deprecated":false,"description":"The supported image sources. It can be a buffer, a readable stream, a string, a URL instance or an Image instance.","metadata":{"name":"loadImage.ts","directory":"helpers","line":24,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/helpers/loadImage.ts#L24"},"name":"ImageSource","parameters":[],"private":false,"properties":[],"returns":null,"see":[],"type":"CanvacordImage | Buffer | ArrayBuffer | Uint16Array | Uint32Array | Uint8Array | Uint8ClampedArray | SharedArrayBuffer | Readable | string | URL | Image"},"markdown":[]},{"data":{"deprecated":false,"description":null,"metadata":{"name":"LeaderboardBuilder.tsx","directory":"components","line":96,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/components/LeaderboardBuilder.tsx#L96"},"name":"LeaderboardVariants","parameters":[],"private":false,"properties":[],"returns":null,"see":[],"type":"(typeof LeaderboardVariants)[keyof (typeof LeaderboardVariants)]"},"markdown":[]},{"data":{"deprecated":false,"description":null,"metadata":{"name":"StyleSheet.ts","directory":"helpers","line":4,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/helpers/StyleSheet.ts#L4"},"name":"Stylable","parameters":[],"private":false,"properties":[],"returns":null,"see":[],"type":"{ className: string, style: CSSPropertiesLike } | string"},"markdown":[]}],"enum":[],"variables":[{"data":{"deprecated":false,"description":null,"metadata":{"name":"Builder.tsx","directory":"template","line":47},"name":"BuiltInGraphemeProvider","parameters":[],"private":false,"properties":[],"returns":null,"see":[],"type":"{ Blobmoji: GraphemeProvider, FluentEmojiColor: GraphemeProvider, FluentEmojiFlat: GraphemeProvider, FluentEmojiHighContrast: GraphemeProvider, None: GraphemeProvider, Noto: GraphemeProvider, Openmoji: GraphemeProvider, Twemoji: GraphemeProvider }"},"markdown":[]},{"data":{"deprecated":false,"description":null,"metadata":{"name":"Builder.tsx","directory":"template","line":66},"name":"EmojiCache","parameters":[],"private":false,"properties":[],"returns":null,"see":[],"type":"Map"},"markdown":[]},{"data":{"deprecated":false,"description":null,"metadata":{"name":"AssetsFactory.ts","directory":"assets","line":3,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/assets/AssetsFactory.ts#L3"},"name":"FontFactory","parameters":[],"private":false,"properties":[],"returns":null,"see":[],"type":"Map"},"markdown":[]},{"data":{"deprecated":false,"description":"The bundled fonts in this package.","metadata":{"name":"fonts.ts","directory":"assets/fonts","line":4,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/assets/fonts/fonts.ts#L4"},"name":"Fonts","parameters":[],"private":false,"properties":[],"returns":null,"see":[],"type":"{ Geist: }"},"markdown":[]},{"data":{"deprecated":false,"description":"The image assets factory.","metadata":{"name":"AssetsFactory.ts","directory":"assets","line":13,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/assets/AssetsFactory.ts#L13"},"name":"ImageFactory","parameters":[],"private":false,"properties":[],"returns":null,"see":[],"type":"{ AFFECT: string, BATSLAP: string, BEAUTIFUL: string, BED: string, BOTBADGE: string, CAPTCHA: string, CHANGEMYMIND: string, CLYDE: string, DELETE: string, DISCORD: string, DISTRACTED: string, DND: string, FACEPALM: string, HITLER: string, IDLE: string, IMPOSTER: string, IMPOSTERWITH: string, JAIL: string, JOKEOVERHEAD: string, KICK: string, KISS: string, KO: string, OFFLINE: string, OHNO: string, ONLINE: string, OPINION: string, PHUB: string, PUNCH: string, RAINBOW: string, RIP: string, SHIT: string, SNOWFLAKE: string, SPANK: string, TOBECONTINUED: string, TRASH: string, TRIGGERED: string, WANTED: string, WASTED: string, WELCOMEBG: string, YOUTUBE: string }"},"markdown":[]},{"data":{"deprecated":false,"description":"The JSX factory for canvacord jsx.","metadata":{"name":"jsx.ts","directory":"helpers","line":62,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/helpers/jsx.ts#L62"},"name":"JSX","parameters":[],"private":false,"properties":[],"returns":null,"see":[],"type":"{ Element: (typeof Element), Fragment: , createElement: }"},"markdown":[]},{"data":{"deprecated":false,"description":null,"metadata":{"name":"LeaderboardBuilder.tsx","directory":"components","line":96,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/components/LeaderboardBuilder.tsx#L96"},"name":"LeaderboardVariants","parameters":[],"private":false,"properties":[],"returns":null,"see":[],"type":"{ Default: 'default', Horizontal: 'horizontal' }"},"markdown":[]},{"data":{"deprecated":false,"description":"The built-in template factory.","metadata":{"name":"TemplateFactory.ts","directory":"assets","line":57,"url":"https://github.com/neplextech/canvacord/blob/d33b461/packages/canvacord/src/assets/TemplateFactory.ts#L57"},"name":"TemplateFactory","parameters":[],"private":false,"properties":[],"returns":null,"see":[],"type":"{ Affect: (args: [any]) => ImageGenerationTemplate, Beautiful: (args: [any]) => ImageGenerationTemplate, Bed: (args: [any, any]) => ImageGenerationTemplate, Colorfy: (args: [any, any]) => ImageGenerationTemplate, Delete: (args: [any]) => ImageGenerationTemplate, Distracted: (args: [any, any, any]) => ImageGenerationTemplate, Facepalm: (args: [any]) => ImageGenerationTemplate, Fuse: (args: [any, any]) => ImageGenerationTemplate, Hitler: (args: [any]) => ImageGenerationTemplate, Jail: (args: [any, any]) => ImageGenerationTemplate, JokeOverHead: (args: [any]) => ImageGenerationTemplate, Kiss: (args: [any, any]) => ImageGenerationTemplate, Rainbow: (args: [any]) => ImageGenerationTemplate, Rip: (args: [any]) => ImageGenerationTemplate, Shit: (args: [any]) => ImageGenerationTemplate, Slap: (args: [any, any]) => ImageGenerationTemplate, Spank: (args: [any, any]) => ImageGenerationTemplate, Trash: (args: [any]) => ImageGenerationTemplate, Triggered: (args: [any]) => ImageGenerationTemplate, Wanted: (args: [any]) => ImageGenerationTemplate, Wasted: (args: [any]) => ImageGenerationTemplate }"},"markdown":[]}]}},"metadata":{"generationMs":2490.2237,"timestamp":1710070976765}} \ No newline at end of file diff --git a/apps/docs/src/pages/guide/[topic]/_data.tsx b/apps/docs/src/pages/guide/[topic]/_data.tsx index 0f897cb7..74419efe 100644 --- a/apps/docs/src/pages/guide/[topic]/_data.tsx +++ b/apps/docs/src/pages/guide/[topic]/_data.tsx @@ -1,66 +1,55 @@ -import { lazy } from "react"; +import { lazy } from 'react'; export default function GuideData() { - return null; + return null; } export const pages = [ - { - name: "examples", - displayName: "Examples", - pages: [ - { - name: "custom-image-generation.md", - displayName: "Custom Image Generation", - component: lazy( - () => import("../_guides/Examples/custom-image-generation.md") - ), - }, - { - name: "gif-generation.md", - displayName: "Gif Generation", - component: lazy(() => import("../_guides/Examples/gif-generation.md")), - }, - { - name: "greetings-card.md", - displayName: "Greetings Card", - component: lazy(() => import("../_guides/Examples/greetings-card.md")), - }, - { - name: "image-generation.md", - displayName: "Image Generation", - component: lazy( - () => import("../_guides/Examples/image-generation.md") - ), - }, - { - name: "leaderboard-image-generation.md", - displayName: "Leaderboard Image Generation", - component: lazy( - () => import("../_guides/Examples/leaderboard-image-generation.md") - ), - }, - { - name: "rank-card.md", - displayName: "Rank Card", - component: lazy(() => import("../_guides/Examples/rank-card.md")), - }, - { - name: "cards-translation.md", - displayName: "Cards Translation", - component: lazy(() => import("../_guides/Examples/cards-translation.md")), - }, - ], - }, - { - name: "welcome", - displayName: "Welcome", - pages: [ - { - name: "welcome.md", - displayName: "Welcome", - component: lazy(() => import("../_guides/Welcome/welcome.md")), - }, - ], - }, +{ + name: "examples", + displayName: "Examples", + pages: [ + { + name: "custom-image-generation.md", + displayName: "Custom Image Generation", + component: lazy(() => import('../_guides/Examples/custom-image-generation.md')), + }, +{ + name: "gif-generation.md", + displayName: "Gif Generation", + component: lazy(() => import('../_guides/Examples/gif-generation.md')), + }, +{ + name: "greetings-card.md", + displayName: "Greetings Card", + component: lazy(() => import('../_guides/Examples/greetings-card.md')), + }, +{ + name: "image-generation.md", + displayName: "Image Generation", + component: lazy(() => import('../_guides/Examples/image-generation.md')), + }, +{ + name: "leaderboard-image-generation.md", + displayName: "Leaderboard Image Generation", + component: lazy(() => import('../_guides/Examples/leaderboard-image-generation.md')), + }, +{ + name: "rank-card.md", + displayName: "Rank Card", + component: lazy(() => import('../_guides/Examples/rank-card.md')), + } + ] + }, +{ + name: "welcome", + displayName: "Welcome", + pages: [ + { + name: "welcome.md", + displayName: "Welcome", + component: lazy(() => import('../_guides/Welcome/welcome.md')), + } + ] + }, ]; diff --git a/apps/docs/src/pages/guide/_guides/Examples/cards-translation.md b/apps/docs/src/pages/guide/_guides/Examples/cards-translation.md deleted file mode 100644 index fb5af871..00000000 --- a/apps/docs/src/pages/guide/_guides/Examples/cards-translation.md +++ /dev/null @@ -1,18 +0,0 @@ -## Cards Translation - -The `setTextStyles` method is used to customize the text styles for different elements in a rank card or leaderboard. This method allows for the modification of default labels for level, experience points (XP), and rank display. - -## Usage - -For Rank Card or Leaderboard : -```ts -const rankCard = new RankCardBuilder() - .setTextStyles({ - level: 'NIVEAU :', // Custom text for the level - xp: 'EXP :', // Custom text for the experience points - rank: 'CLASSEMENT :' // Custom text for the rank - }) -``` - -# Output -![xp-card](https://raw.githubusercontent.com/neplextech/canvacord/main/packages/canvacord/test/normal/cardTranslated.svg) diff --git a/apps/docs/src/pages/guide/_guides/Examples/leaderboard-image-generation.md b/apps/docs/src/pages/guide/_guides/Examples/leaderboard-image-generation.md index a789455c..ade51acd 100644 --- a/apps/docs/src/pages/guide/_guides/Examples/leaderboard-image-generation.md +++ b/apps/docs/src/pages/guide/_guides/Examples/leaderboard-image-generation.md @@ -40,14 +40,6 @@ const lb = new LeaderboardBuilder() xp: 2280, rank: 3, }, - { - avatar: "https://github.com/Luna-devv.png", - username: "mwlica", - displayName: "Luna", - level: 27, - xp: 2280, - rank: 4, - }, { avatar: "https://github.com/insypher.png", username: "com6235", @@ -60,6 +52,11 @@ const lb = new LeaderboardBuilder() ]) .setBackground("./my-background-image.jpg"); +// changing variant +lb.setVariant("horizontal"); +// or +lb.setVariant("default"); + const image = await lb.build({ format: "png" }); ``` @@ -67,4 +64,10 @@ Canvacord automatically adjusts the size of the output image based on the number # Output +### Default variant + ![Leaderboard](https://raw.githubusercontent.com/neplextech/canvacord/main/packages/canvacord/test/leaderboard.svg) + +### Horizontal variant + +![Leaderboard](https://raw.githubusercontent.com/neplextech/canvacord/main/packages/canvacord/test/leaderboard2.svg) diff --git a/apps/docs/src/pages/guide/_guides/Examples/rank-card.md b/apps/docs/src/pages/guide/_guides/Examples/rank-card.md index 3a1b3b3c..0311a7a2 100644 --- a/apps/docs/src/pages/guide/_guides/Examples/rank-card.md +++ b/apps/docs/src/pages/guide/_guides/Examples/rank-card.md @@ -1,33 +1,196 @@ ## Rank Card -```ts +In this tutorial, we'll learn how to use the `RankCardBuilder` class from the Canvacord library to create a custom rank card. + +### Importing the Required Classes + +First, we need to import the `Font` and `RankCardBuilder` classes from the canvacord module. + +```js +// ESM import { Font, RankCardBuilder } from "canvacord"; -import { writeFile } from "fs/promises"; -// load default font +// CJS +const { Font, RankCardBuilder } = require("canvacord"); +``` + +### Loading fonts + +Canvacord does not load fonts by default. If your use case does not involve writing texts, this step can be omitted. However, rank cards require texts to be written on them, so we need to load the font into canvacord's font registry. + +Canvacord by default ships with a font called [`Geist`](https://vercel.com/font?utm_source=canvacord&utm_campaign=rank-card) (by [Vercel](https://vercel.com/?utm_source=canvacord&utm_campaign=rank-card)). This font can be loaded with the `Font.loadDefault()` method: + +```js Font.loadDefault(); +``` + +If you want to use a custom font instead, you can skip `Font.loadDefault()` method and utilize `Font.fromFile` or `Font.fromBuffer` method to load the font from a file or buffer respectively. + +```js +// loading from a file +// synchronous method +Font.fromFileSync("./my-font.ttf"); + +// asynchronous method +await Font.fromFile("./my-font.ttf"); + +// loading from a buffer +Font.fromBuffer(buffer); +``` + +> Good to know: Currently only `TTF`, `OTF` and `WOFF` font formats are supported. +### Creating a rank card builder + +Now that we have loaded the font, we can create a new `RankCardBuilder` instance. This is a builder class exported by canvacord to specifically create rank cards. It offers a lot of helper methods to customize the rank card to your liking. + +The following is an example of a rank card builder with common properties set: + +```js const card = new RankCardBuilder() - .setDisplayName("Wumpus 😍") - .setUsername("@wumpus") - .setAvatar("https://cdn.discordapp.com/embed/avatars/0.png?size=256") - .setCurrentXP(300) - .setRequiredXP(600) - .setProgressCalculator(() => { - return Math.floor(Math.random() * 100); - }) - .setLevel(2) - .setRank(5) - .setOverlay(90) - .setBackground("#23272a") - .setStatus(RankCardUserStatus.Online) - .setGraphemeProvider(BuiltInGraphemeProvider.FluentEmojiFlat); + .setDisplayName("Wumpus") // Big name + .setUsername("@wumpus") // small name, do not include it if you want to hide it + .setAvatar("https://cdn.discordapp.com/embed/avatars/0.png?size=256") // user avatar + .setCurrentXP(300) // current xp + .setRequiredXP(600) // required xp + .setLevel(2) // user level + .setRank(5) // user rank + .setOverlay(90) // overlay percentage. Overlay is a semi-transparent layer on top of the background + .setBackground("#23272a") // set background color or, + .setBackground("./path/to/image.png") // set background image + .setStatus("online"); // user status. Omit this if you want to hide it +``` +### Generating the image + +```ts const image = await card.build({ format: "png", }); -await writeFileSync("./card.png", data); +// image is a buffer. It can be written to a file or sent as an attachment over internet ``` +### Result + ![xp-card](https://raw.githubusercontent.com/neplextech/canvacord/main/packages/canvacord/test/normal/rankCard.svg) + +## Advanced Usage + +### Overriding default texts + +The `setTextStyles` method is used to customize the text styles for different elements in a rank card or leaderboard. This method allows for the modification of default labels for level, experience points (XP), and rank display. + +```js +card.setTextStyles({ + level: "NIVEAU :", // Custom text for the level + xp: "EXP :", // Custom text for the experience points + rank: "CLASSEMENT :", // Custom text for the rank +}); +``` + +### Result + +![xp-card](https://raw.githubusercontent.com/neplextech/canvacord/main/packages/canvacord/test/normal/cardTranslated.svg) + +### Customizing the colors + +The `setStyles` method can be used to customize the colors of different elements in a rank card or leaderboard. This method allows for the modification of the background, progress bar, and text colors, etc. The style object is a key-value pair of the style name and the value to be set. +The style behaves similar to css properties. + +#### Syntax 1 (Style object) + +```scss +// Group of elements +ElementGroup { + // Element name + ElementName { + // Style object + style { + attribute-name: value; + } + } +} +``` + +#### Syntax 2 (Tailwind classes) + +```scss +// Group of elements +ElementGroup { + // Element name + ElementName { + // Style object + tw = "tailwind-classes" + } +} +``` + +#### Examples + +```js +// changing progress bar thumb color +card.setStyles({ + progressbar: { + thumb: { + style: { + backgroundColor: "red", + }, + }, + }, +}); + +// alternative syntax +card.setStyles({ + progressbar: { + thumb: { + tw: "bg-red-500", + }, + }, +}); +``` + +### Modifying progress bar width + +The internal progress calculator may not be suitable for all use cases. You can set a custom progress calculator using the `setProgressCalculator` method. The progress calculator is a function that returns a number between 0 and 100, representing the progress percentage. + +```js +card.setProgressCalculator((currentXP, requiredXP) => { + // do some crazy math here + // The value returned must be in the range of 0 to 100. It represents the width of the progress bar + return Math.floor((currentXP / requiredXP) * 100); +}); +``` + +### Overriding emoji providers + +Canvacord uses the `twemoji` provider by default. You can override this by using the `setGraphemeProvider` method. The `setGraphemeProvider` method accepts a `GraphemeProvider` enum value. + +```js +// Twemoji +card.setGraphemeProvider(BuiltInGraphemeProvider.Twemoji); + +// FluentEmojiHighContrast +card.setGraphemeProvider(BuiltInGraphemeProvider.FluentEmojiHighContrast); + +// FluentEmoji +card.setGraphemeProvider(BuiltInGraphemeProvider.FluentEmoji); + +// FluentEmojiColor +card.setGraphemeProvider(BuiltInGraphemeProvider.FluentEmojiColor); + +// FluentEmojiFlat +card.setGraphemeProvider(BuiltInGraphemeProvider.FluentEmojiFlat); + +// Openmoji +card.setGraphemeProvider(BuiltInGraphemeProvider.Openmoji); + +// Noto +card.setGraphemeProvider(BuiltInGraphemeProvider.Noto); + +// Blobmoji +card.setGraphemeProvider(BuiltInGraphemeProvider.Blobmoji); + +// None +card.setGraphemeProvider(BuiltInGraphemeProvider.None); +``` diff --git a/apps/docs/src/pages/guide/_guides/Welcome/welcome.md b/apps/docs/src/pages/guide/_guides/Welcome/welcome.md index 29e57bd0..19cd688b 100644 --- a/apps/docs/src/pages/guide/_guides/Welcome/welcome.md +++ b/apps/docs/src/pages/guide/_guides/Welcome/welcome.md @@ -9,7 +9,8 @@ Easily generate images using html and css in nodejs. Canvacord is suitable for c - 🪟 **Open source, no privacy issues, 100% transparent** - Canvacord is completely open source and free to use. This makes everything transparent and you can even contribute to the project. Best of all, you dont have to worry about privacy issues 😊. - 💪 **Easy to use** - Canvacord provides a simple api to generate images on-the-fly. - 🎨 **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. - 📸 **Wide formats support** - Canvacord supports many image formats such as png, jpeg, webp, gif, svg, etc. - 📄 **Wide range of templates** - Canvacord provides many built-in templates to generate images such as triggered gif, beautiful image, facepalm image, etc. to quickly generate that meme you saw on reddit 🤡. No need to touch complicated canvas api, just a simple schema object is enough. diff --git a/guides/Examples/leaderboard-image-generation.md b/guides/Examples/leaderboard-image-generation.md index a789455c..ade51acd 100644 --- a/guides/Examples/leaderboard-image-generation.md +++ b/guides/Examples/leaderboard-image-generation.md @@ -40,14 +40,6 @@ const lb = new LeaderboardBuilder() xp: 2280, rank: 3, }, - { - avatar: "https://github.com/Luna-devv.png", - username: "mwlica", - displayName: "Luna", - level: 27, - xp: 2280, - rank: 4, - }, { avatar: "https://github.com/insypher.png", username: "com6235", @@ -60,6 +52,11 @@ const lb = new LeaderboardBuilder() ]) .setBackground("./my-background-image.jpg"); +// changing variant +lb.setVariant("horizontal"); +// or +lb.setVariant("default"); + const image = await lb.build({ format: "png" }); ``` @@ -67,4 +64,10 @@ Canvacord automatically adjusts the size of the output image based on the number # Output +### Default variant + ![Leaderboard](https://raw.githubusercontent.com/neplextech/canvacord/main/packages/canvacord/test/leaderboard.svg) + +### Horizontal variant + +![Leaderboard](https://raw.githubusercontent.com/neplextech/canvacord/main/packages/canvacord/test/leaderboard2.svg) diff --git a/guides/Examples/rank-card.md b/guides/Examples/rank-card.md index 3a1b3b3c..0311a7a2 100644 --- a/guides/Examples/rank-card.md +++ b/guides/Examples/rank-card.md @@ -1,33 +1,196 @@ ## Rank Card -```ts +In this tutorial, we'll learn how to use the `RankCardBuilder` class from the Canvacord library to create a custom rank card. + +### Importing the Required Classes + +First, we need to import the `Font` and `RankCardBuilder` classes from the canvacord module. + +```js +// ESM import { Font, RankCardBuilder } from "canvacord"; -import { writeFile } from "fs/promises"; -// load default font +// CJS +const { Font, RankCardBuilder } = require("canvacord"); +``` + +### Loading fonts + +Canvacord does not load fonts by default. If your use case does not involve writing texts, this step can be omitted. However, rank cards require texts to be written on them, so we need to load the font into canvacord's font registry. + +Canvacord by default ships with a font called [`Geist`](https://vercel.com/font?utm_source=canvacord&utm_campaign=rank-card) (by [Vercel](https://vercel.com/?utm_source=canvacord&utm_campaign=rank-card)). This font can be loaded with the `Font.loadDefault()` method: + +```js Font.loadDefault(); +``` + +If you want to use a custom font instead, you can skip `Font.loadDefault()` method and utilize `Font.fromFile` or `Font.fromBuffer` method to load the font from a file or buffer respectively. + +```js +// loading from a file +// synchronous method +Font.fromFileSync("./my-font.ttf"); + +// asynchronous method +await Font.fromFile("./my-font.ttf"); + +// loading from a buffer +Font.fromBuffer(buffer); +``` + +> Good to know: Currently only `TTF`, `OTF` and `WOFF` font formats are supported. +### Creating a rank card builder + +Now that we have loaded the font, we can create a new `RankCardBuilder` instance. This is a builder class exported by canvacord to specifically create rank cards. It offers a lot of helper methods to customize the rank card to your liking. + +The following is an example of a rank card builder with common properties set: + +```js const card = new RankCardBuilder() - .setDisplayName("Wumpus 😍") - .setUsername("@wumpus") - .setAvatar("https://cdn.discordapp.com/embed/avatars/0.png?size=256") - .setCurrentXP(300) - .setRequiredXP(600) - .setProgressCalculator(() => { - return Math.floor(Math.random() * 100); - }) - .setLevel(2) - .setRank(5) - .setOverlay(90) - .setBackground("#23272a") - .setStatus(RankCardUserStatus.Online) - .setGraphemeProvider(BuiltInGraphemeProvider.FluentEmojiFlat); + .setDisplayName("Wumpus") // Big name + .setUsername("@wumpus") // small name, do not include it if you want to hide it + .setAvatar("https://cdn.discordapp.com/embed/avatars/0.png?size=256") // user avatar + .setCurrentXP(300) // current xp + .setRequiredXP(600) // required xp + .setLevel(2) // user level + .setRank(5) // user rank + .setOverlay(90) // overlay percentage. Overlay is a semi-transparent layer on top of the background + .setBackground("#23272a") // set background color or, + .setBackground("./path/to/image.png") // set background image + .setStatus("online"); // user status. Omit this if you want to hide it +``` +### Generating the image + +```ts const image = await card.build({ format: "png", }); -await writeFileSync("./card.png", data); +// image is a buffer. It can be written to a file or sent as an attachment over internet ``` +### Result + ![xp-card](https://raw.githubusercontent.com/neplextech/canvacord/main/packages/canvacord/test/normal/rankCard.svg) + +## Advanced Usage + +### Overriding default texts + +The `setTextStyles` method is used to customize the text styles for different elements in a rank card or leaderboard. This method allows for the modification of default labels for level, experience points (XP), and rank display. + +```js +card.setTextStyles({ + level: "NIVEAU :", // Custom text for the level + xp: "EXP :", // Custom text for the experience points + rank: "CLASSEMENT :", // Custom text for the rank +}); +``` + +### Result + +![xp-card](https://raw.githubusercontent.com/neplextech/canvacord/main/packages/canvacord/test/normal/cardTranslated.svg) + +### Customizing the colors + +The `setStyles` method can be used to customize the colors of different elements in a rank card or leaderboard. This method allows for the modification of the background, progress bar, and text colors, etc. The style object is a key-value pair of the style name and the value to be set. +The style behaves similar to css properties. + +#### Syntax 1 (Style object) + +```scss +// Group of elements +ElementGroup { + // Element name + ElementName { + // Style object + style { + attribute-name: value; + } + } +} +``` + +#### Syntax 2 (Tailwind classes) + +```scss +// Group of elements +ElementGroup { + // Element name + ElementName { + // Style object + tw = "tailwind-classes" + } +} +``` + +#### Examples + +```js +// changing progress bar thumb color +card.setStyles({ + progressbar: { + thumb: { + style: { + backgroundColor: "red", + }, + }, + }, +}); + +// alternative syntax +card.setStyles({ + progressbar: { + thumb: { + tw: "bg-red-500", + }, + }, +}); +``` + +### Modifying progress bar width + +The internal progress calculator may not be suitable for all use cases. You can set a custom progress calculator using the `setProgressCalculator` method. The progress calculator is a function that returns a number between 0 and 100, representing the progress percentage. + +```js +card.setProgressCalculator((currentXP, requiredXP) => { + // do some crazy math here + // The value returned must be in the range of 0 to 100. It represents the width of the progress bar + return Math.floor((currentXP / requiredXP) * 100); +}); +``` + +### Overriding emoji providers + +Canvacord uses the `twemoji` provider by default. You can override this by using the `setGraphemeProvider` method. The `setGraphemeProvider` method accepts a `GraphemeProvider` enum value. + +```js +// Twemoji +card.setGraphemeProvider(BuiltInGraphemeProvider.Twemoji); + +// FluentEmojiHighContrast +card.setGraphemeProvider(BuiltInGraphemeProvider.FluentEmojiHighContrast); + +// FluentEmoji +card.setGraphemeProvider(BuiltInGraphemeProvider.FluentEmoji); + +// FluentEmojiColor +card.setGraphemeProvider(BuiltInGraphemeProvider.FluentEmojiColor); + +// FluentEmojiFlat +card.setGraphemeProvider(BuiltInGraphemeProvider.FluentEmojiFlat); + +// Openmoji +card.setGraphemeProvider(BuiltInGraphemeProvider.Openmoji); + +// Noto +card.setGraphemeProvider(BuiltInGraphemeProvider.Noto); + +// Blobmoji +card.setGraphemeProvider(BuiltInGraphemeProvider.Blobmoji); + +// None +card.setGraphemeProvider(BuiltInGraphemeProvider.None); +``` diff --git a/packages/canvacord/__tests__/hooks.spec.tsx b/packages/canvacord/__tests__/main.spec.ts similarity index 50% rename from packages/canvacord/__tests__/hooks.spec.tsx rename to packages/canvacord/__tests__/main.spec.ts index a08e1773..4f953e71 100644 --- a/packages/canvacord/__tests__/hooks.spec.tsx +++ b/packages/canvacord/__tests__/main.spec.ts @@ -1,8 +1,8 @@ import { expect, test, describe } from "vitest"; -// TODO: Write tests for hooks -describe("hooks", () => { - test("useState() works", () => { +// TODO: Write tests +describe("test", () => { + test("test", () => { expect(true).not.toBe(false); }); }); diff --git a/packages/canvacord/jsr.json b/packages/canvacord/jsr.json new file mode 100644 index 00000000..d46c615a --- /dev/null +++ b/packages/canvacord/jsr.json @@ -0,0 +1,21 @@ +{ + "name": "@neplex/canvacord", + "version": "6.0.4", + "exports": "./src/index.ts", + "publish": { + "include": [ + "src/**", + "jsr.json", + "package.json", + "LICENSE", + "README.md" + ], + "exclude": [ + "**", + "!jsr.json", + "!src", + "!README.md", + "!LICENSE" + ] + } +} \ No newline at end of file diff --git a/packages/canvacord/package.json b/packages/canvacord/package.json index 58061f64..e03361bb 100644 --- a/packages/canvacord/package.json +++ b/packages/canvacord/package.json @@ -1,7 +1,7 @@ { "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", "types": "./dist/index.d.ts", "module": "./dist/index.mjs", @@ -47,6 +47,7 @@ "@types/react": "^18.2.12", "benny": "^3.7.1", "biome": "workspace:^", + "sharp": "^0.33.2", "tailwindcss": "^3.3.3", "tsconfig": "workspace:^", "tsup": "^7.2.0", diff --git a/packages/canvacord/src/assets/Font.ts b/packages/canvacord/src/assets/Font.ts index 6e951995..5787f562 100644 --- a/packages/canvacord/src/assets/Font.ts +++ b/packages/canvacord/src/assets/Font.ts @@ -20,7 +20,10 @@ export class Font { * const font = new Font(data, 'my-font'); */ - public constructor(public data: Buffer, public alias = randomAlias()) { + public constructor( + public data: Buffer, + public alias = randomAlias(), + ) { GlobalFonts.register(data, alias); FontFactory.set(this.alias, this); } @@ -107,4 +110,11 @@ export class Font { defaultLoaded = Font.fromBuffer(Fonts.Geist, "geist"); return defaultLoaded; } + + /** + * Unloads the font from the canvas and builder apis. + */ + public unloadAll() { + FontFactory.clear(); + } } diff --git a/packages/canvacord/src/canvas/CanvasHelper.ts b/packages/canvacord/src/canvas/CanvasHelper.ts index ea362304..8756fe66 100644 --- a/packages/canvacord/src/canvas/CanvasHelper.ts +++ b/packages/canvacord/src/canvas/CanvasHelper.ts @@ -14,7 +14,10 @@ export abstract class CanvasHelper extends Encodable { * @param width The width of the canvas * @param height The height of the canvas */ - public constructor(public width: number, public height: number) { + public constructor( + public width: number, + public height: number, + ) { super(); } diff --git a/packages/canvacord/src/canvas/CanvasImage.ts b/packages/canvacord/src/canvas/CanvasImage.ts index d7939360..2b8a888a 100644 --- a/packages/canvacord/src/canvas/CanvasImage.ts +++ b/packages/canvacord/src/canvas/CanvasImage.ts @@ -12,7 +12,11 @@ export class CanvasImage extends ImageFilterer { * @param [width] The width of the image * @param [height] The height of the image */ - public constructor(public source: ImageSource, width = -1, height = -1) { + public constructor( + public source: ImageSource, + width = -1, + height = -1, + ) { super(width, height); if (source instanceof Image) this.#setImg(source); } diff --git a/packages/canvacord/src/canvas/Encodable.ts b/packages/canvacord/src/canvas/Encodable.ts index 8d63ac1c..d5292f19 100644 --- a/packages/canvacord/src/canvas/Encodable.ts +++ b/packages/canvacord/src/canvas/Encodable.ts @@ -22,10 +22,7 @@ export abstract class Encodable { * @param format The encoding format - `jpeg` or `webp` * @param [options] The quality of the image */ - public async encode( - format: "jpeg" | "webp", - options?: number - ): Promise; + public async encode(format: "jpeg" | "webp", options?: number): Promise; /** * Encodes the canvas to an avif buffer. * @param format The encoding format - `avif` @@ -37,10 +34,7 @@ export abstract class Encodable { * @param format The encoding format * @param [options] The encoding options or quality */ - public async encode( - format: EncodingFormat = "png", - options?: number | AvifConfig - ): Promise { + public async encode(format: EncodingFormat = "png", options?: number | AvifConfig): Promise { const canvas = await this.getFinalCanvas(); switch (format) { diff --git a/packages/canvacord/src/canvas/ImageGen.ts b/packages/canvacord/src/canvas/ImageGen.ts index 1ef8ab7a..ba974e4d 100644 --- a/packages/canvacord/src/canvas/ImageGen.ts +++ b/packages/canvacord/src/canvas/ImageGen.ts @@ -183,7 +183,10 @@ export class ImageGenerationTemplate implements IImageGenerationTemplate { * @param width The width of the template * @param height The height of the template */ - public constructor(public readonly width?: number, public readonly height?: number) {} + public constructor( + public readonly width?: number, + public readonly height?: number, + ) {} /** * Sets the steps. This will overwrite any existing steps. diff --git a/packages/canvacord/src/canvas/createGIF.ts b/packages/canvacord/src/canvas/createGIF.ts deleted file mode 100644 index 5abadeec..00000000 --- a/packages/canvacord/src/canvas/createGIF.ts +++ /dev/null @@ -1,72 +0,0 @@ -import { DisposalCode, GifEncoder } from "@skyra/gifenc"; -import { Builder } from "../runtime"; -import type { Readable } from "stream"; - -export { DisposalCode }; - -type GifInit = { - delay: number; - repeat?: number; - framerate: number; - dispose: DisposalCode; - quality: number; - transparent?: number | null; -}; - -type GIFConfig = - BuilderSource extends true - ? GifInit - : GifInit & { width: number; height: number }; - -export async function createGIF( - // biome-ignore lint: - source: Builder, - config: GIFConfig -): Promise; -export async function createGIF( - source: Buffer[] | Promise, - config: GIFConfig -): Promise; -export async function createGIF( - source: Buffer[] | Promise | Builder, - config: GIFConfig -): Promise { - const src = await source; - if (Builder.isBuilder(src)) { - // @ts-expect-error - config.width = src.width; - // @ts-expect-error - config.height = src.height; - } - - const { width, height } = config as GIFConfig; - const encoder = new GifEncoder(width, height); - - encoder.setDelay(config.delay); - if (config.repeat != null) encoder.setRepeat(config.repeat); - encoder.setFramerate(config.framerate); - encoder.setDispose(config.dispose); - encoder.setQuality(config.quality); - if (config.transparent !== undefined) - encoder.setTransparent(config.transparent); - - setImmediate(async () => { - let frames: Buffer[] = []; - if (Builder.isBuilder(src)) { - frames = await src.build({ format: "raw", skipSingleCapture: true }); - } else { - frames = Array.isArray(src) ? src : [src]; - } - - encoder.start(); - - for (const frame of frames) { - const raw = new Uint8ClampedArray(frame.buffer); - encoder.addFrame(raw); - } - - encoder.finish(); - }); - - return encoder.createReadStream(); -} diff --git a/packages/canvacord/src/canvas/index.ts b/packages/canvacord/src/canvas/index.ts index ff2ed5b4..f129c288 100644 --- a/packages/canvacord/src/canvas/index.ts +++ b/packages/canvacord/src/canvas/index.ts @@ -1,4 +1,3 @@ -export * from "./createGIF"; export * from "./CanvasHelper"; export * from "./CanvasImage"; export * from "./Encodable"; diff --git a/packages/canvacord/src/components/LeaderboardBuilder.tsx b/packages/canvacord/src/components/LeaderboardBuilder.tsx index be980c77..9aacc6b7 100644 --- a/packages/canvacord/src/components/LeaderboardBuilder.tsx +++ b/packages/canvacord/src/components/LeaderboardBuilder.tsx @@ -1,7 +1,7 @@ -import { JSX, loadImage, Stylable, StyleSheet } from "../helpers"; +import { JSX, loadImage, StyleSheet } from "../helpers"; import { ImageSource } from "../helpers"; -import { fixed } from "../helpers/utils"; -import { Builder } from "../runtime"; +import { chunkArrayInGroups, fixed } from "../helpers/utils"; +import { Builder } from "../template"; const DefaultColors = { Yellow: "#FFAA00", @@ -81,13 +81,7 @@ export interface LeaderboardProps { const Crown = () => { return ( // biome-ignore lint: alternative text title - + { const MIN_RENDER_HEIGHT = 420; const HEIGHT_INTERVAL = [394, 498, 594, 690, 786, 882, 978, 1074] as const; +export const LeaderboardVariants = { + Default: "default", + Horizontal: "horizontal", +} as const; + +export type LeaderboardVariants = (typeof LeaderboardVariants)[keyof typeof LeaderboardVariants]; + export class LeaderboardBuilder extends Builder { + public variant?: LeaderboardVariants; + /** * Create a new leaderboard ui builder */ @@ -123,6 +126,15 @@ export class LeaderboardBuilder extends Builder { }); } + /** + * Set the ui variant for this leaderboard + * @param variant ui type + */ + public setVariant(variant: LeaderboardVariants) { + this.variant = variant; + return this; + } + /** * Set background for this leaderboard ui * @param background background image @@ -174,96 +186,24 @@ export class LeaderboardBuilder extends Builder { * Render this leaderboard ui on the canvas */ public async render() { - const options = this.options.getOptions(); - const total = options.players.length; - - if (!total) { - throw new RangeError("Number of players must be greater than 0"); - } - - const adjustedHeight = HEIGHT_INTERVAL[total - 3] ?? MIN_RENDER_HEIGHT; - - this.height = adjustedHeight; - - this.adjustCanvas(); - - // biome-ignore lint: declare variables separately - let background, headerImg; - - if (options.background) { - background = await loadImage(options.background); + if (!this.variant || this.variant === LeaderboardVariants.Default) { + return this.renderDefaultVariant(); } - if (options.header) { - headerImg = await loadImage(options.header.image); - } - - const winners = [ - options.players[1], - options.players[0], - options.players[2], - ].filter(Boolean); - - return ( -
- {background && ( - background - )} -
- {options.header && headerImg ? ( -
- header -

- {options.header.title} -

-

- {options.header.subtitle} -

-
- ) : null} -
- {await Promise.all(winners.map((winner) => this.renderTop(winner)))} -
- {this.renderPlayers( - await Promise.all( - options.players - .filter((f) => !winners.includes(f)) - .map((m) => this.renderPlayer(m)) - ) - )} -
-
- ); + return this.renderHorizontalVariant(); } /** * Render players ui on the canvas */ - public renderPlayers(players: JSX.Element[]) { - return ( -
- {players} -
- ); + public renderDefaultPlayers(players: JSX.Element[]) { + return
{players}
; } /** * Render top players ui on the canvas */ - public async renderTop({ + public async renderDefaultTop({ avatar, displayName, level, @@ -272,8 +212,7 @@ export class LeaderboardBuilder extends Builder { xp, }: LeaderboardProps["players"][number]) { const image = await loadImage(avatar); - const currentColor = - DefaultColors[rank === 1 ? "Yellow" : rank === 2 ? "Blue" : "Green"]; + const currentColor = DefaultColors[rank === 1 ? "Yellow" : rank === 2 ? "Blue" : "Green"]; const crown = rank === 1; return ( @@ -281,7 +220,7 @@ export class LeaderboardBuilder extends Builder { className={StyleSheet.cn( "relative flex flex-col items-center justify-center p-4 bg-[#1E2237CC] w-[35%] rounded-md", crown ? "-mt-4 bg-[#252A40CC] rounded-b-none h-[113%]" : "", - rank === 2 ? "rounded-br-none" : rank === 3 ? "rounded-bl-none" : "" + rank === 2 ? "rounded-br-none" : rank === 3 ? "rounded-bl-none" : "", )} > {crown && ( @@ -292,9 +231,7 @@ export class LeaderboardBuilder extends Builder {
avatar
{
-

- {displayName} -

+

{displayName}

@{username}

{this.options.get("text").level} {level}

- {fixed(xp, this.options.get("abbreviate"))}{" "} - {this.options.get("text").xp} + {fixed(xp, this.options.get("abbreviate"))} {this.options.get("text").xp}

@@ -323,7 +257,7 @@ export class LeaderboardBuilder extends Builder { /** * Render player ui on the canvas */ - public async renderPlayer({ + public async renderDefaultPlayer({ avatar, displayName, level, @@ -338,19 +272,11 @@ export class LeaderboardBuilder extends Builder {

{rank}

-

- {this.options.get("text").rank} -

+

{this.options.get("text").rank}

- avatar + avatar
-

- {displayName} -

+

{displayName}

@{username}

@@ -359,11 +285,169 @@ export class LeaderboardBuilder extends Builder { {this.options.get("text").level} {level}

- {fixed(xp, this.options.get("abbreviate"))}{" "} - {this.options.get("text").xp} + {fixed(xp, this.options.get("abbreviate"))} {this.options.get("text").xp}

); } + + public async renderDefaultVariant() { + const options = this.options.getOptions(); + const total = options.players.length; + + if (!total) { + throw new RangeError("Number of players must be greater than 0"); + } + + const adjustedHeight = HEIGHT_INTERVAL[total - 3] ?? MIN_RENDER_HEIGHT; + + this.height = adjustedHeight; + + this.adjustCanvas(); + + // biome-ignore lint: declare variables separately + let background, headerImg; + + if (options.background) { + background = await loadImage(options.background); + } + + if (options.header) { + headerImg = await loadImage(options.header.image); + } + + const winners = [options.players[1], options.players[0], options.players[2]].filter(Boolean); + + return ( +
+ {background && ( + background + )} +
+ {options.header && headerImg ? ( +
+ header +

{options.header.title}

+

{options.header.subtitle}

+
+ ) : null} +
+ {await Promise.all(winners.map((winner) => this.renderDefaultTop(winner)))} +
+ {this.renderDefaultPlayers( + await Promise.all( + options.players.filter((f) => !winners.includes(f)).map((m) => this.renderDefaultPlayer(m)), + ), + )} +
+
+ ); + } + + public async renderHorizontalPlayer({ + avatar, + displayName, + level, + rank, + username, + xp, + }: LeaderboardProps["players"][number]) { + const image = await loadImage(avatar); + + return ( +
+
+
{rank}
+ + avatar + +
+ {displayName &&
{displayName}
} + {username &&
{username}
} +
+
+ +
+ {xp &&
{fixed(xp, this.options.get("abbreviate"))} XP
} + {level &&
Level {level}
} +
+
+ ); + } + + public async renderHorizontalVariant() { + const options = this.options.getOptions(); + const total = options.players.length; + + if (!total) { + throw new RangeError("Number of players must be greater than 0"); + } + + this.width = 1002; + this.height = 512; + + this.adjustCanvas(); + + // biome-ignore lint: declare variables separately + let background, headerImg; + + if (options.background) { + background = await loadImage(options.background); + } + + if (options.header) { + headerImg = await loadImage(options.header.image); + } + + const playerGroupChunks = chunkArrayInGroups(options.players, 5) as Array; + + const processedPlayerGroups = await Promise.all( + playerGroupChunks.map(async (playerGroup) => { + const renderedPlayers = await Promise.all(playerGroup.map((player) => this.renderHorizontalPlayer(player))); + return renderedPlayers; + }), + ); + + return ( +
+ {background && background} + + {/* <---------- HEADER ----------> */} +
+ {options.header && headerImg && ( + header + )} +
+ {options.header?.title && ( +
{options.header.title}
+ )} + {options.header?.subtitle && ( +
{options.header.subtitle}
+ )} +
+
+ + {/* <---------- PLAYER LIST ----------> */} +
+ {processedPlayerGroups.map((renderedPlayers) => ( +
+ {renderedPlayers} +
+ ))} +
+
+ ); + } } diff --git a/packages/canvacord/src/components/RankCardBuilder.tsx b/packages/canvacord/src/components/RankCardBuilder.tsx index 36168fd3..58fbc0a3 100644 --- a/packages/canvacord/src/components/RankCardBuilder.tsx +++ b/packages/canvacord/src/components/RankCardBuilder.tsx @@ -2,19 +2,13 @@ import { Transformer } from "@napi-rs/image"; import { FontFactory } from "../assets"; import { ImageSource, JSX, loadImage } from "../helpers"; import { getDefaultFont } from "../helpers/utils"; -import { Builder } from "../runtime/Builder"; -import { - NeoClassicalCard, - RankCardProps, - RankCardUserStatus, - StatusData, -} from "./rank-card/NeoClassicalCard"; +import { Builder } from "../template/Builder"; +import { NeoClassicalCard, RankCardProps, RankCardUserStatus, StatusData } from "./rank-card/NeoClassicalCard"; /** * The rank card builder props. */ -interface RankCardBuilderProps - extends Omit { +interface RankCardBuilderProps extends Omit { avatar: ImageSource; background: ImageSource; backgroundCrop?: Partial<{ @@ -82,8 +76,7 @@ export class RankCardBuilder extends Builder { texts: {}, username: null, fonts: {}, - calculateProgress: (currentXP, requiredXP) => - ((currentXP ?? 0) / (requiredXP ?? 0)) * 100, + calculateProgress: (currentXP, requiredXP) => ((currentXP ?? 0) / (requiredXP ?? 0)) * 100, }); } @@ -197,9 +190,7 @@ export class RankCardBuilder extends Builder { /** * Set background crop for this rank card. */ - public setBackgroundCrop( - pos: Partial - ) { + public setBackgroundCrop(pos: Partial) { this.options.set("backgroundCrop", pos); return this; } @@ -244,16 +235,14 @@ export class RankCardBuilder extends Builder { const width = options.backgroundCrop.width ?? this.width; const height = options.backgroundCrop.height ?? this.height; - const buffer = await new Transformer(e.data) - .crop(x, y, width, height) - .png(); + const buffer = await new Transformer(e.data).crop(x, y, width, height).png(); e.data = buffer; } return `url(${e.toDataURL()})`; }, - () => options.background as string + () => options.background as string, ); } diff --git a/packages/canvacord/src/components/rank-card/NeoClassicalCard.tsx b/packages/canvacord/src/components/rank-card/NeoClassicalCard.tsx index edfdba92..ab75361a 100644 --- a/packages/canvacord/src/components/rank-card/NeoClassicalCard.tsx +++ b/packages/canvacord/src/components/rank-card/NeoClassicalCard.tsx @@ -1,17 +1,20 @@ import { JSX, Stylable, StyleSheet } from "../.."; import { fixed } from "../../helpers/utils"; -export enum RankCardUserStatus { - Online = "online", - Idle = "idle", - DoNotDisturb = "dnd", - Offline = "offline", - Streaming = "streaming", - None = "none", - Invisible = "invisible" -} +export const RankCardUserStatus = { + Online: "online", + Idle: "idle", + DoNotDisturb: "dnd", + Offline: "offline", + Streaming: "streaming", + None: "none", + Invisible: "invisible", +} as const; + +export type RankCardUserStatus = (typeof RankCardUserStatus)[keyof typeof RankCardUserStatus]; -export type StatusData = "online" | "idle" | "dnd" | "offline" | "streaming" | "none" | "invisible"; +// backwards compatibility +export type StatusData = RankCardUserStatus; export interface RankCardProps { handle: string | null; diff --git a/packages/canvacord/src/helpers/decoder.ts b/packages/canvacord/src/helpers/decoder.ts new file mode 100644 index 00000000..70d9f97b --- /dev/null +++ b/packages/canvacord/src/helpers/decoder.ts @@ -0,0 +1,67 @@ +import { Transformer } from "@napi-rs/image"; + +export async function getSharp() { + try { + const { default: sharp } = await import("sharp"); + return sharp; + } catch { + return null; + } +} + +export async function getResvg() { + try { + const { renderAsync } = await import("@resvg/resvg-js"); + return renderAsync; + } catch { + return null; + } +} + +export enum OutputType { + PNG = 0, + JPEG = 1, + WEBP = 2, +} + +export async function decodeImage(src: Buffer, output: OutputType): Promise { + const sharp = await getSharp(); + + if (!sharp) { + const transformer = new Transformer(src); + + switch (output) { + case OutputType.PNG: + return transformer.png(); + case OutputType.JPEG: + return transformer.jpeg(100); + case OutputType.WEBP: + return transformer.webp(100); + default: + throw new Error("Invalid output type"); + } + } + + const image = sharp(src, { + animated: false, + unlimited: false, + }); + + switch (output) { + case OutputType.JPEG: + image.jpeg({ quality: 100 }); + break; + case OutputType.WEBP: + image.webp({ quality: 100 }); + break; + case OutputType.PNG: + image.png({ quality: 100 }); + break; + default: + throw new Error("Invalid output type"); + } + + const result = await image.toBuffer({ resolveWithObject: false }); + + return result; +} diff --git a/packages/canvacord/src/helpers/image.ts b/packages/canvacord/src/helpers/image.ts index ba06809a..454ff6bd 100644 --- a/packages/canvacord/src/helpers/image.ts +++ b/packages/canvacord/src/helpers/image.ts @@ -1,6 +1,7 @@ -import { renderAsync, type ResvgRenderOptions } from "@resvg/resvg-js"; +import type { ResvgRenderOptions } from "@resvg/resvg-js"; import { EncodingFormat } from "../canvas/Encodable"; import { AvifConfig, PngEncodeOptions, Transformer } from "@napi-rs/image"; +import { getResvg, getSharp } from "./decoder"; /** * The options for rendering the svg. @@ -32,6 +33,25 @@ export async function renderSvg({ logLevel: "off", }; + const sharp = await getSharp(); + + if (sharp) { + const input = Buffer.isBuffer(svg) ? svg : Buffer.from(svg); + const img = sharp(input) + .toFormat(format, { + quality: 100, + }) + .toBuffer(); + + return img; + } + + const renderAsync = await getResvg(); + + if (!renderAsync) { + throw new Error("Could not load @resvg/resvg-js package"); + } + const output = await renderAsync(svg, opts); if (format === "raw") { @@ -42,11 +62,7 @@ export async function renderSvg({ return output.asPng(); } - const transformer = Transformer.fromRgbaPixels( - output.pixels, - output.width, - output.height - ); + const transformer = Transformer.fromRgbaPixels(output.pixels, output.width, output.height); options ??= null; signal ??= null; @@ -63,8 +79,14 @@ export async function renderSvg({ } } +const createSvgBase64 = (svg: string | Buffer) => + `data:image/svg+xml;base64,${Buffer.isBuffer(svg) ? svg.toString("base64") : Buffer.from(svg).toString("base64")}`; + export class CanvacordImage { - public constructor(public data: Buffer, public mime: string) {} + public constructor( + public data: Buffer, + public mime: string, + ) {} public toBase64() { return this.data.toString("base64"); diff --git a/packages/canvacord/src/helpers/jsx.ts b/packages/canvacord/src/helpers/jsx.ts index 0d14c1fe..c382f47f 100644 --- a/packages/canvacord/src/helpers/jsx.ts +++ b/packages/canvacord/src/helpers/jsx.ts @@ -1,6 +1,6 @@ import type * as React from "react"; import { performObjectCleanup, StyleSheet } from "./StyleSheet"; -import { Node } from ".."; +import { Node } from "../template/Builder"; const isNode = (node: unknown): node is Node => { return typeof node === "object" && node != null && "toElement" in node; diff --git a/packages/canvacord/src/helpers/loadImage.ts b/packages/canvacord/src/helpers/loadImage.ts index 18bbcbab..ed0b12bf 100644 --- a/packages/canvacord/src/helpers/loadImage.ts +++ b/packages/canvacord/src/helpers/loadImage.ts @@ -6,7 +6,7 @@ import { CanvacordImage } from "./image"; import * as fileType from "file-type"; import { Image } from "@napi-rs/canvas"; import { buffer } from "stream/consumers"; -import { Transformer } from "@napi-rs/image"; +import { OutputType, decodeImage } from "./decoder"; // biome-ignore lint: declare variables separately let http: typeof import("http"), https: typeof import("https"); @@ -16,7 +16,7 @@ const MAX_REDIRECTS = 20, REDIRECT_STATUSES = new Set([301, 302]), DATA_URI = /^\s*data:/; -const NEEDS_TRANSFORMATION = ["image/webp", "image/gif", "image/bmp", "image/icns", "image/tiff"]; +const NEEDS_TRANSFORMATION = ["image/webp", "image/gif", "image/bmp", "image/icns", "image/tiff", "image/avif"]; /** * The supported image sources. It can be a buffer, a readable stream, a string, a URL instance or an Image instance. @@ -158,10 +158,12 @@ function makeRequest( async function createImage(src: Buffer) { const mime = await fileType.fromBuffer(src); if (!mime?.mime) throw new Error("failed to load image"); + if (NEEDS_TRANSFORMATION.includes(mime.mime)) { - const transformed = await new Transformer(src).png(); + const transformed = await decodeImage(src, OutputType.PNG); return new CanvacordImage(transformed, "image/png"); } + return new CanvacordImage(src, mime.mime); } diff --git a/packages/canvacord/src/helpers/utils.ts b/packages/canvacord/src/helpers/utils.ts index ad3524d7..ed1a4e91 100644 --- a/packages/canvacord/src/helpers/utils.ts +++ b/packages/canvacord/src/helpers/utils.ts @@ -15,3 +15,13 @@ export const fixed = (v: number, r: boolean) => { export const getDefaultFont = () => { return (FontFactory.values().next().value ?? null) as Font | null; }; + +export const chunkArrayInGroups = (arr: T[], size: number): T[][] => { + const result: T[][] = []; + + for (let i = 0; i < arr.length; i += size) { + result.push(arr.slice(i, i + size)); + } + + return result; +}; diff --git a/packages/canvacord/src/hooks/common.ts b/packages/canvacord/src/hooks/common.ts deleted file mode 100644 index 1e57603c..00000000 --- a/packages/canvacord/src/hooks/common.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { AsyncLocalStorage } from "async_hooks"; - -export const initializeContext = () => new AsyncLocalStorage(); diff --git a/packages/canvacord/src/hooks/complete.ts b/packages/canvacord/src/hooks/complete.ts deleted file mode 100644 index 536abd38..00000000 --- a/packages/canvacord/src/hooks/complete.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { useBuilder } from "./useBuilder"; - -/** - * Completes the iterations of the builder. - */ -export function complete() { - const builder = useBuilder(); - - builder.setIterations(0); - builder.tick(); -} diff --git a/packages/canvacord/src/hooks/context.ts b/packages/canvacord/src/hooks/context.ts deleted file mode 100644 index c3fcc718..00000000 --- a/packages/canvacord/src/hooks/context.ts +++ /dev/null @@ -1,62 +0,0 @@ -import { AsyncLocalStorage } from "node:async_hooks"; -import type { Node } from "../runtime"; -import { initializeContext } from "./common"; - -type PropsWithChildren

= P & { children?: Node }; - -type InternalContext = ContextProvider & { - [contextProviderId]: AsyncLocalStorage; -}; - -export type ContextProvider = ( - props: PropsWithChildren<{ value: T }> -) => JSX.Element; - -interface Context { - Provider: ContextProvider; - // biome-ignore lint: - Consumer: (props: PropsWithChildren<{}>) => JSX.Element; -} - -const contextProviderId = Symbol("$$contextProvider"); - -/** - * Hook to get the context value. - */ -export function useContext(ctx: Context): T | undefined { - const context = (ctx.Provider as InternalContext)[contextProviderId]; - - if (!context) { - throw new TypeError( - 'Invalid context provider, did you forget to use "createContext"?' - ); - } - - return context.getStore(); -} - -export const createContext = (): Context => { - const contextStore = initializeContext(); - - const Provider = ({ value, children }: PropsWithChildren<{ value: T }>) => { - return contextStore.run(value, () => children as unknown as JSX.Element); - }; - - Object.defineProperty(Provider, contextProviderId, { - enumerable: false, - get() { - return contextStore; - }, - writable: false, - configurable: false, - }); - - // biome-ignore lint: - const Consumer = ({ children }: PropsWithChildren<{}>) => { - throw new Error( - 'Consumer is and will not be supported, use the "useContext" hook instead.' - ); - }; - - return { Provider, Consumer }; -}; diff --git a/packages/canvacord/src/hooks/index.ts b/packages/canvacord/src/hooks/index.ts deleted file mode 100644 index b987614f..00000000 --- a/packages/canvacord/src/hooks/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export * from "./useState"; -export * from "./useBuilder"; -export * from "./useOptions"; -export * from "./useEffect"; diff --git a/packages/canvacord/src/hooks/nextTick.ts b/packages/canvacord/src/hooks/nextTick.ts deleted file mode 100644 index dd209813..00000000 --- a/packages/canvacord/src/hooks/nextTick.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { useEffect } from "./useEffect"; - -/** - * Runs on the next tick. This is useful for when you want to run a function after the builder has finished rendering. - */ -export function nextTick(handler: () => void) { - useEffect(() => { - handler(); - }); -} diff --git a/packages/canvacord/src/hooks/useBuilder.ts b/packages/canvacord/src/hooks/useBuilder.ts deleted file mode 100644 index 964abd99..00000000 --- a/packages/canvacord/src/hooks/useBuilder.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Builder, ExecutionContext } from "../runtime"; - -/** - * A hook that returns the builder component. - */ -export function useBuilder< - // biome-ignore lint: we do not know the type of the component - T extends Record = Record, - // biome-ignore lint: we do not know the type of the component - S extends Record = Record ->() { - const context = ExecutionContext.getStore(); - if (!context) { - throw new Error( - 'The hook "useBuilder" must be invoked inside a builder component.' - ); - } - - return context as Builder; -} diff --git a/packages/canvacord/src/hooks/useEffect.ts b/packages/canvacord/src/hooks/useEffect.ts deleted file mode 100644 index 934d8dd6..00000000 --- a/packages/canvacord/src/hooks/useEffect.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { ExecutionContext } from "../runtime"; - -// biome-ignore lint: -export type EffectCallback = () => void | (() => void); - -/** - * Hook to run a function when the component unmounts. - * Dependencies are currently not supported and only one effect can be registered per builder as of now. - * @param handler The function to run. - */ -// biome-ignore lint: -export function useEffect(handler: EffectCallback, dependencies?: any[]) { - const context = ExecutionContext.getStore(); - if (!context) { - throw new Error( - 'The hook "useEffect" must be invoked inside a builder component.' - ); - } - - context.onMount(handler, Array.isArray(dependencies) && !dependencies.length); -} diff --git a/packages/canvacord/src/hooks/useOptions.ts b/packages/canvacord/src/hooks/useOptions.ts deleted file mode 100644 index 2a071d47..00000000 --- a/packages/canvacord/src/hooks/useOptions.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Builder, ExecutionContext } from "../runtime"; - -/** - * A hook that returns the options object of the builder component. - */ -export function useOptions< - // biome-ignore lint: we do not know the type of the component - T extends Record = Record ->() { - const context = ExecutionContext.getStore(); - if (!context) { - throw new Error( - 'The hook "useOptions" must be invoked inside a builder component.' - ); - } - - const { options } = context as Builder; - - return options; -} diff --git a/packages/canvacord/src/hooks/useState.ts b/packages/canvacord/src/hooks/useState.ts deleted file mode 100644 index 79af4260..00000000 --- a/packages/canvacord/src/hooks/useState.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { Builder, ExecutionContext } from "../runtime"; - -/** - * The type of the dispatch function returned by `useState`. - */ -export type Dispatch = (value: A) => void; - -/** - * The type of the value returned by `useState`. - */ -export type SetStateAction = S | ((prevState: S) => S); - -/** - * A hook that returns a stateful value, and a function to update it. This is similar to react's useState hook, but every `useState` call is bound to - * the same state instantiated by the builder component. Calling `setState` will update the state and re-render the component, which is captured - * as a new frame. You can technically have unlimited number of render cycles here, but it is recommended to set a limit to prevent memory leaks. - */ -export function useState( - initialValue?: T -): [T, Dispatch>] { - const context = ExecutionContext.getStore() as Builder< - Record, - T - >; - if (!context) { - throw new Error( - 'The hook "useState" must be invoked inside a builder component.' - ); - } - - const state = context.state; - const setState = context.setState.bind(context); - - if (state === undefined && initialValue !== undefined) { - if (initialValue instanceof Function) { - setState(initialValue(), true); - } else { - setState(initialValue, true); - } - } - - const getter = context.state; - const setter = (value: SetStateAction) => { - if (value instanceof Function) { - setState(value(context.state)); - } else { - setState(value); - } - }; - - return [getter, setter]; -} diff --git a/packages/canvacord/src/index.ts b/packages/canvacord/src/index.ts index 61294507..1b6ca5bf 100644 --- a/packages/canvacord/src/index.ts +++ b/packages/canvacord/src/index.ts @@ -1,6 +1,5 @@ export * from "./assets"; export * from "./components"; export * from "./helpers"; -export * from "./runtime"; +export * from "./template"; export * from "./canvas"; -export * from "./hooks"; diff --git a/packages/canvacord/src/runtime/Builder.tsx b/packages/canvacord/src/template/Builder.tsx similarity index 51% rename from packages/canvacord/src/runtime/Builder.tsx rename to packages/canvacord/src/template/Builder.tsx index 0d4ebbbb..5319e9be 100644 --- a/packages/canvacord/src/runtime/Builder.tsx +++ b/packages/canvacord/src/template/Builder.tsx @@ -1,13 +1,10 @@ -import satori, { Font, type SatoriOptions } from "satori"; +import type { CSSProperties } from "react"; +import satori, { SatoriOptions } from "satori"; import { FontFactory } from "../assets/AssetsFactory"; -import { type CSSPropertiesLike, StyleSheet } from "../helpers"; +import { CSSPropertiesLike, StyleSheet } from "../helpers"; import { renderSvg, RenderSvgOptions } from "../helpers/image"; import { JSX, Element } from "../helpers/jsx"; import { BuilderOptionsManager } from "./BuilderOptionsManager"; -import type { EncodingFormat } from "../canvas"; -import type { CSSProperties } from "react"; -import { initializeContext } from "../hooks/common"; -import { EffectCallback } from "../hooks"; export type GraphemeProvider = Record; @@ -18,24 +15,19 @@ const isEmoji = (str: string) => { function emojiToUnicode(emoji: string): string { if (emoji.length === 1) return emoji.charCodeAt(0).toString(16); - const comp = - (emoji.charCodeAt(0) - 0xd800) * 0x400 + - (emoji.charCodeAt(1) - 0xdc00) + - 0x10000; + const comp = (emoji.charCodeAt(0) - 0xd800) * 0x400 + (emoji.charCodeAt(1) - 0xdc00) + 0x10000; if (comp < 0) return emoji.charCodeAt(0).toString(16); return comp.toString(16).toLowerCase(); } -export const createEmojiProvider = ( - builder: (code: string) => string -): GraphemeProvider => { +export const createEmojiProvider = (builder: (code: string) => string): GraphemeProvider => { const graphemeProvider: GraphemeProvider = {}; const handler: ProxyHandler = { has(target, p) { return isEmoji(p as string) || p in target; }, - get(target, prop: string) { + get(_target, prop: string) { if (isEmoji(prop)) { const code = emojiToUnicode(prop); const url = builder(code); @@ -50,49 +42,27 @@ export const createEmojiProvider = ( return new Proxy(graphemeProvider, handler); }; -const FluentEmojiBase = (s: string) => - `https://cdn.jsdelivr.net/gh/shuding/fluentui-emoji-unicode/assets/${s}.svg`; +const FluentEmojiBase = (s: string) => `https://cdn.jsdelivr.net/gh/shuding/fluentui-emoji-unicode/assets/${s}.svg`; export const BuiltInGraphemeProvider = { Twemoji: createEmojiProvider( - (code: string) => - `https://cdnjs.cloudflare.com/ajax/libs/twemoji/14.0.2/svg/${code}.svg` - ), - FluentEmojiHighContrast: createEmojiProvider((code) => - FluentEmojiBase(`${code}_high-contrast`) - ), - FluentEmojiFlat: createEmojiProvider((code) => - FluentEmojiBase(`${code}_flat`) - ), - FluentEmojiColor: createEmojiProvider((code) => - FluentEmojiBase(`${code}_color`) + (code: string) => `https://cdnjs.cloudflare.com/ajax/libs/twemoji/14.0.2/svg/${code}.svg`, ), + FluentEmojiHighContrast: createEmojiProvider((code) => FluentEmojiBase(`${code}_high-contrast`)), + FluentEmojiFlat: createEmojiProvider((code) => FluentEmojiBase(`${code}_flat`)), + FluentEmojiColor: createEmojiProvider((code) => FluentEmojiBase(`${code}_color`)), Openmoji: createEmojiProvider( - (code) => - `https://cdn.jsdelivr.net/npm/@svgmoji/openmoji@2.0.0/svg/${code.toUpperCase()}.svg` + (code) => `https://cdn.jsdelivr.net/npm/@svgmoji/openmoji@2.0.0/svg/${code.toUpperCase()}.svg`, ), Noto: createEmojiProvider( - (code) => - `https://cdn.jsdelivr.net/gh/svgmoji/svgmoji/packages/svgmoji__noto/svg/${code.toUpperCase()}.svg` + (code) => `https://cdn.jsdelivr.net/gh/svgmoji/svgmoji/packages/svgmoji__noto/svg/${code.toUpperCase()}.svg`, ), Blobmoji: createEmojiProvider( - (code) => - `https://cdn.jsdelivr.net/npm/@svgmoji/blob@2.0.0/svg/${code.toUpperCase()}.svg` + (code) => `https://cdn.jsdelivr.net/npm/@svgmoji/blob@2.0.0/svg/${code.toUpperCase()}.svg`, ), None: {} as GraphemeProvider, }; -export type BuilderBuildInit = Partial & { - skipSingleCapture?: boolean; -}; - -export type BuilderResultInner = - O["format"] extends "svg" ? string : Buffer; -export type BuilderResult = - O["skipSingleCapture"] extends true - ? BuilderResultInner[] - : BuilderResultInner; - export const EmojiCache = new Map(); /** @@ -120,7 +90,7 @@ export interface BuilderTemplate { /** * The build output format. */ -export type BuildFormat = "svg" | "png" | "avif" | "jpeg" | "webp" | "raw"; +export type BuildFormat = "svg" | "png" | "avif" | "jpeg" | "webp"; /** * The builder build options. @@ -150,25 +120,9 @@ export interface Node { toElement(): Element; } -export const ExecutionContext = initializeContext(); - -export class Builder< - // biome-ignore lint: we do not know the type of the component - T extends Record = Record, - S = unknown -> { +// biome-ignore lint: we do not know the type of the component +export class Builder = Record> { #style: CSSPropertiesLike = {}; - #state?: S; - // svg frames - #frames: string[] = []; - #iterations = 1; - #fonts: Font[] = []; - #options!: SatoriOptions; - #resolve?: () => void; - #onUnmount?: () => void; - #onMount?: EffectCallback; - #initialSet = false; - /** * The tailwind subset to apply to this builder. */ @@ -192,81 +146,13 @@ export class Builder< * @param width the width of this builder. * @param height the height of this builder. */ - public constructor(public width: number, public height: number) { + public constructor( + public width: number, + public height: number, + ) { this.adjustCanvas(); } - /** - * The total number of iterations of this builder. - */ - public setIterations(iterations: number) { - this.#iterations = iterations; - return this; - } - - /** - * Calling this method completes one iteration of this builder. - */ - public tick() { - if (!this.#resolve) { - throw new Error( - "Cannot call tick() before calling build() on this builder." - ); - } - - if (this.#iterations-- <= 0) { - this.#resolve?.(); - } - - this.#onUnmount?.(); - - // clear unmount listeners - this.#onUnmount = undefined; - } - - /** - * Registers mount listener for this builder. - */ - public onMount(listener: EffectCallback, initialOnly = false) { - if (initialOnly && !this.#initialSet) { - this.#onMount = listener; - this.#initialSet = true; - } else if (!initialOnly) this.#onMount = listener; - } - - /** - * Registers unmount listener for this builder. - */ - public onUnmount(listener: () => void) { - this.#onUnmount = listener; - } - - /** - * The state of this builder. - */ - public get state() { - return this.#state as S; - } - - /** - * Set the state of this builder. - */ - public set state(newState: S) { - this.setState(newState); - } - - /** - * Set the state of this builder. Calling this method will re-render the builder and capture the result as a new frame. - */ - public setState(newState: S, silent = false) { - // skip setting state if it is the same - if (Object.is(this.#state, newState)) return; - this.#state = newState; - if (!silent) { - this.#render(); - } - } - /** * Bootstrap this builder with data. */ @@ -352,49 +238,25 @@ export class Builder< return

; } - async #render() { - if (this.#iterations < 0) return; - const element = await this.render(); - - this.#onUnmount = undefined; - - const result = this.#onMount?.(); - - if (result instanceof Function) { - this.#onUnmount = result; - } - - this.#onMount = undefined; - - const svg = await satori(element, this.#options); - - this.#frames.push(svg); - this.tick(); - } - /** * Convert this builder into an image. * @param options the build options. * @returns the image buffer or svg string. */ - public async build( - options: O = {} as O - ): Promise> { + public async build(options: Partial = {}) { options.format ??= "png"; - this.#fonts = Array.from(FontFactory.values()).map((font) => - font.getData() - ); + const fonts = options?.fonts ?? Array.from(FontFactory.values()).map((font) => font.getData()); + const element = await this.render(); - this.#options = { + const svg = await satori(element, { ...options, height: this.height, width: this.width, - fonts: this.#fonts, + fonts, embedFont: true, loadAdditionalAsset: async (languageCode, segment) => { - const fallback = () => - options?.loadAdditionalAsset?.(languageCode, segment) ?? segment; + const fallback = () => options?.loadAdditionalAsset?.(languageCode, segment) ?? segment; if (languageCode === "emoji" && this.graphemeProvider) { const cached = EmojiCache.get(segment); if (cached) return cached; @@ -406,9 +268,7 @@ export class Builder< const response = await fetch(url); if (!response.ok) return fallback(); const svg = await response.arrayBuffer(); - const base64 = `data:image/svg+xml;base64,${Buffer.from( - svg - ).toString("base64")}`; + const base64 = `data:image/svg+xml;base64,${Buffer.from(svg).toString("base64")}`; EmojiCache.set(segment, base64); return base64; } catch { @@ -418,58 +278,16 @@ export class Builder< return fallback(); }, - }; - - await ExecutionContext.run(this, () => { - // biome-ignore lint: - return new Promise(async (resolve) => { - this.#resolve = resolve; - this.#render(); - }); }); - const frames = this.#frames; - - if (!frames.length) { - throw new Error( - `No frames were rendered, did you forget to implement "render()" in ${this.constructor.name}?` - ); - } - - this.flush(); - - const encoder = (svg: string) => { - return options?.format === "svg" - ? svg - : renderSvg({ - svg, - format: options.format as EncodingFormat, - options: options.options, - signal: options.signal, - }); - }; - - if (!options.skipSingleCapture) { - return encoder(frames[0]) as BuilderResult; - } - - const renderedFrames = await Promise.all(frames.map(encoder)); - return renderedFrames as BuilderResult; - } - - /** - * Flush the frames. - */ - public flush() { - this.#frames = []; - this.#state = undefined as S; - this.#iterations = 0; - this.#resolve = undefined; - this.#onUnmount = undefined; - this.#onMount = undefined; - this.#options = null as unknown as SatoriOptions; - this.#fonts = []; - this.#initialSet = false; + return options?.format === "svg" + ? svg + : renderSvg({ + svg, + format: options.format, + options: options.options, + signal: options.signal, + }); } /** @@ -483,15 +301,4 @@ export class Builder< return builder; } - - public static isBuilder(builder: unknown): builder is Builder { - return builder instanceof Builder; - } - - /** - * Dispose this builder. - */ - [Symbol.dispose]() { - this.flush(); - } } diff --git a/packages/canvacord/src/runtime/BuilderOptionsManager.ts b/packages/canvacord/src/template/BuilderOptionsManager.ts similarity index 100% rename from packages/canvacord/src/runtime/BuilderOptionsManager.ts rename to packages/canvacord/src/template/BuilderOptionsManager.ts diff --git a/packages/canvacord/src/runtime/index.ts b/packages/canvacord/src/template/index.ts similarity index 100% rename from packages/canvacord/src/runtime/index.ts rename to packages/canvacord/src/template/index.ts diff --git a/packages/canvacord/test/Poppins-Regular.ttf b/packages/canvacord/test/Poppins-Regular.ttf new file mode 100644 index 00000000..be06e7fd Binary files /dev/null and b/packages/canvacord/test/Poppins-Regular.ttf differ diff --git a/packages/canvacord/test/leaderboard.png b/packages/canvacord/test/leaderboard.png index 1e8b96f5..dc7eac41 100644 Binary files a/packages/canvacord/test/leaderboard.png and b/packages/canvacord/test/leaderboard.png differ diff --git a/packages/canvacord/test/leaderboard.svg b/packages/canvacord/test/leaderboard.svg index cec9c0db..a9fd3b19 100644 --- a/packages/canvacord/test/leaderboard.svg +++ b/packages/canvacord/test/leaderboard.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/packages/canvacord/test/leaderboard.ts b/packages/canvacord/test/leaderboard.ts index 1648beec..7f203940 100644 --- a/packages/canvacord/test/leaderboard.ts +++ b/packages/canvacord/test/leaderboard.ts @@ -1,8 +1,6 @@ -import { Font, LeaderboardBuilder } from "../src/index"; +import { Font, FontFactory, LeaderboardBuilder } from "../src/index"; import { writeFileSync } from "fs"; -Font.loadDefault(); - const lb = new LeaderboardBuilder() .setHeader({ title: "NeplexLabs", @@ -35,14 +33,6 @@ const lb = new LeaderboardBuilder() xp: 2280, rank: 3, }, - { - avatar: "https://github.com/Luna-devv.png", - username: "mwlica", - displayName: "Luna", - level: 27, - xp: 2280, - rank: 4, - }, { avatar: "https://github.com/insypher.png", username: "com6235", @@ -95,12 +85,27 @@ const lb = new LeaderboardBuilder() ) .setBackground(`${__dirname}/bg.png`); -lb.build({ - format: "svg", -}).then((res) => { - writeFileSync(`${__dirname}/leaderboard.svg`, res); -}); +(async () => { + Font.loadDefault(); + for (const e of ["leaderboard", "leaderboard2"]) { + // FontFactory.clear(); + if (e === "leaderboard2") { + lb.setVariant("horizontal"); + } else { + lb.setVariant("default"); + // Font.fromFileSync(`${__dirname}/Poppins-Regular.ttf`); + } + + await lb + .build({ + format: "svg", + }) + .then((res) => { + writeFileSync(`${__dirname}/${e}.svg`, res); + }); -lb.build().then((res) => { - writeFileSync(`${__dirname}/leaderboard.png`, res); -}); + await lb.build().then((res) => { + writeFileSync(`${__dirname}/${e}.png`, res); + }); + } +})(); diff --git a/packages/canvacord/test/leaderboard2.png b/packages/canvacord/test/leaderboard2.png new file mode 100644 index 00000000..3de1c3a6 Binary files /dev/null and b/packages/canvacord/test/leaderboard2.png differ diff --git a/packages/canvacord/test/leaderboard2.svg b/packages/canvacord/test/leaderboard2.svg new file mode 100644 index 00000000..5e9c96a7 --- /dev/null +++ b/packages/canvacord/test/leaderboard2.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/canvacord/test/normal/cardTranslated.png b/packages/canvacord/test/normal/cardTranslated.png new file mode 100644 index 00000000..6e645738 Binary files /dev/null and b/packages/canvacord/test/normal/cardTranslated.png differ diff --git a/packages/canvacord/test/normal/cardTranslated.svg b/packages/canvacord/test/normal/cardTranslated.svg index c25f1277..60494fa1 100644 --- a/packages/canvacord/test/normal/cardTranslated.svg +++ b/packages/canvacord/test/normal/cardTranslated.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/packages/canvacord/validations/hooks/builder.tsx b/packages/canvacord/validations/hooks/builder.tsx deleted file mode 100644 index 0525b205..00000000 --- a/packages/canvacord/validations/hooks/builder.tsx +++ /dev/null @@ -1,47 +0,0 @@ -/** @jsx JSX.createElement */ -/** @jsxFrag JSX.Fragment */ -import { JSX, useState, Font, createGIF, Builder } from "canvacord"; -import { createWriteStream } from "fs"; - -// load font -Font.loadDefault(); - -class Demo extends Builder { - constructor() { - super(512, 512); - } - - public async render() { - return ; - } -} - -function Rotation() { - const [count, setCount] = useState(0); - - setCount(count + 1); - - return ( -
-

- {count}° -

-
- ); -} - -const demo = new Demo(); -demo.setIterations(360); - -const gif = await createGIF(demo, { - repeat: 0, - delay: 15, - dispose: 0, - framerate: 15, - quality: 10, -}); - -gif.pipe(createWriteStream(`${__dirname}/output/test.gif`)); diff --git a/packages/canvacord/validations/hooks/output/test.gif b/packages/canvacord/validations/hooks/output/test.gif deleted file mode 100644 index 5290cef2..00000000 Binary files a/packages/canvacord/validations/hooks/output/test.gif and /dev/null differ diff --git a/yarn.lock b/yarn.lock index fcd7615c..55dcc879 100644 --- a/yarn.lock +++ b/yarn.lock @@ -241,6 +241,15 @@ __metadata: languageName: node linkType: hard +"@emnapi/runtime@npm:^0.45.0": + version: 0.45.0 + resolution: "@emnapi/runtime@npm:0.45.0" + dependencies: + tslib: "npm:^2.4.0" + checksum: be9f794e7c52bff178975c7287e48c84bdab63ed7d4f21f9239f8101fcc04f059bff9b1c5d730cf0c7a6d812231a46749208c315bc085bb5170882c1c9163676 + languageName: node + linkType: hard + "@esbuild/android-arm64@npm:0.18.20": version: 0.18.20 resolution: "@esbuild/android-arm64@npm:0.18.20" @@ -663,6 +672,181 @@ __metadata: languageName: node linkType: hard +"@img/sharp-darwin-arm64@npm:0.33.2": + version: 0.33.2 + resolution: "@img/sharp-darwin-arm64@npm:0.33.2" + dependencies: + "@img/sharp-libvips-darwin-arm64": "npm:1.0.1" + dependenciesMeta: + "@img/sharp-libvips-darwin-arm64": + optional: true + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"@img/sharp-darwin-x64@npm:0.33.2": + version: 0.33.2 + resolution: "@img/sharp-darwin-x64@npm:0.33.2" + dependencies: + "@img/sharp-libvips-darwin-x64": "npm:1.0.1" + dependenciesMeta: + "@img/sharp-libvips-darwin-x64": + optional: true + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"@img/sharp-libvips-darwin-arm64@npm:1.0.1": + version: 1.0.1 + resolution: "@img/sharp-libvips-darwin-arm64@npm:1.0.1" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"@img/sharp-libvips-darwin-x64@npm:1.0.1": + version: 1.0.1 + resolution: "@img/sharp-libvips-darwin-x64@npm:1.0.1" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"@img/sharp-libvips-linux-arm64@npm:1.0.1": + version: 1.0.1 + resolution: "@img/sharp-libvips-linux-arm64@npm:1.0.1" + conditions: os=linux & cpu=arm64 & libc=glibc + languageName: node + linkType: hard + +"@img/sharp-libvips-linux-arm@npm:1.0.1": + version: 1.0.1 + resolution: "@img/sharp-libvips-linux-arm@npm:1.0.1" + conditions: os=linux & cpu=arm & libc=glibc + languageName: node + linkType: hard + +"@img/sharp-libvips-linux-s390x@npm:1.0.1": + version: 1.0.1 + resolution: "@img/sharp-libvips-linux-s390x@npm:1.0.1" + conditions: os=linux & cpu=s390x & libc=glibc + languageName: node + linkType: hard + +"@img/sharp-libvips-linux-x64@npm:1.0.1": + version: 1.0.1 + resolution: "@img/sharp-libvips-linux-x64@npm:1.0.1" + conditions: os=linux & cpu=x64 & libc=glibc + languageName: node + linkType: hard + +"@img/sharp-libvips-linuxmusl-arm64@npm:1.0.1": + version: 1.0.1 + resolution: "@img/sharp-libvips-linuxmusl-arm64@npm:1.0.1" + conditions: os=linux & cpu=arm64 & libc=musl + languageName: node + linkType: hard + +"@img/sharp-libvips-linuxmusl-x64@npm:1.0.1": + version: 1.0.1 + resolution: "@img/sharp-libvips-linuxmusl-x64@npm:1.0.1" + conditions: os=linux & cpu=x64 & libc=musl + languageName: node + linkType: hard + +"@img/sharp-linux-arm64@npm:0.33.2": + version: 0.33.2 + resolution: "@img/sharp-linux-arm64@npm:0.33.2" + dependencies: + "@img/sharp-libvips-linux-arm64": "npm:1.0.1" + dependenciesMeta: + "@img/sharp-libvips-linux-arm64": + optional: true + conditions: os=linux & cpu=arm64 & libc=glibc + languageName: node + linkType: hard + +"@img/sharp-linux-arm@npm:0.33.2": + version: 0.33.2 + resolution: "@img/sharp-linux-arm@npm:0.33.2" + dependencies: + "@img/sharp-libvips-linux-arm": "npm:1.0.1" + dependenciesMeta: + "@img/sharp-libvips-linux-arm": + optional: true + conditions: os=linux & cpu=arm & libc=glibc + languageName: node + linkType: hard + +"@img/sharp-linux-s390x@npm:0.33.2": + version: 0.33.2 + resolution: "@img/sharp-linux-s390x@npm:0.33.2" + dependencies: + "@img/sharp-libvips-linux-s390x": "npm:1.0.1" + dependenciesMeta: + "@img/sharp-libvips-linux-s390x": + optional: true + conditions: os=linux & cpu=s390x & libc=glibc + languageName: node + linkType: hard + +"@img/sharp-linux-x64@npm:0.33.2": + version: 0.33.2 + resolution: "@img/sharp-linux-x64@npm:0.33.2" + dependencies: + "@img/sharp-libvips-linux-x64": "npm:1.0.1" + dependenciesMeta: + "@img/sharp-libvips-linux-x64": + optional: true + conditions: os=linux & cpu=x64 & libc=glibc + languageName: node + linkType: hard + +"@img/sharp-linuxmusl-arm64@npm:0.33.2": + version: 0.33.2 + resolution: "@img/sharp-linuxmusl-arm64@npm:0.33.2" + dependencies: + "@img/sharp-libvips-linuxmusl-arm64": "npm:1.0.1" + dependenciesMeta: + "@img/sharp-libvips-linuxmusl-arm64": + optional: true + conditions: os=linux & cpu=arm64 & libc=musl + languageName: node + linkType: hard + +"@img/sharp-linuxmusl-x64@npm:0.33.2": + version: 0.33.2 + resolution: "@img/sharp-linuxmusl-x64@npm:0.33.2" + dependencies: + "@img/sharp-libvips-linuxmusl-x64": "npm:1.0.1" + dependenciesMeta: + "@img/sharp-libvips-linuxmusl-x64": + optional: true + conditions: os=linux & cpu=x64 & libc=musl + languageName: node + linkType: hard + +"@img/sharp-wasm32@npm:0.33.2": + version: 0.33.2 + resolution: "@img/sharp-wasm32@npm:0.33.2" + dependencies: + "@emnapi/runtime": "npm:^0.45.0" + conditions: cpu=wasm32 + languageName: node + linkType: hard + +"@img/sharp-win32-ia32@npm:0.33.2": + version: 0.33.2 + resolution: "@img/sharp-win32-ia32@npm:0.33.2" + conditions: os=win32 & cpu=ia32 + languageName: node + linkType: hard + +"@img/sharp-win32-x64@npm:0.33.2": + version: 0.33.2 + resolution: "@img/sharp-win32-x64@npm:0.33.2" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + "@isaacs/cliui@npm:^8.0.2": version: 8.0.2 resolution: "@isaacs/cliui@npm:8.0.2" @@ -3780,6 +3964,7 @@ __metadata: biome: "workspace:^" file-type: "npm:16.5.4" satori: "npm:^0.10.11" + sharp: "npm:^0.33.2" tailwind-merge: "npm:^2.0.0" tailwindcss: "npm:^3.3.3" tsconfig: "workspace:^" @@ -3956,13 +4141,33 @@ __metadata: languageName: node linkType: hard -"color-name@npm:^1.1.4, color-name@npm:~1.1.4": +"color-name@npm:^1.0.0, color-name@npm:^1.1.4, color-name@npm:~1.1.4": version: 1.1.4 resolution: "color-name@npm:1.1.4" checksum: b0445859521eb4021cd0fb0cc1a75cecf67fceecae89b63f62b201cca8d345baf8b952c966862a9d9a2632987d4f6581f0ec8d957dfacece86f0a7919316f610 languageName: node linkType: hard +"color-string@npm:^1.9.0": + version: 1.9.1 + resolution: "color-string@npm:1.9.1" + dependencies: + color-name: "npm:^1.0.0" + simple-swizzle: "npm:^0.2.2" + checksum: 72aa0b81ee71b3f4fb1ac9cd839cdbd7a011a7d318ef58e6cb13b3708dca75c7e45029697260488709f1b1c7ac4e35489a87e528156c1e365917d1c4ccb9b9cd + languageName: node + linkType: hard + +"color@npm:^4.2.3": + version: 4.2.3 + resolution: "color@npm:4.2.3" + dependencies: + color-convert: "npm:^2.0.1" + color-string: "npm:^1.9.0" + checksum: b23f5e500a79ea22428db43d1a70642d983405c0dd1f95ef59dbdb9ba66afbb4773b334fa0b75bb10b0552fd7534c6b28d4db0a8b528f91975976e70973c0152 + languageName: node + linkType: hard + "comma-separated-tokens@npm:^2.0.0": version: 2.0.3 resolution: "comma-separated-tokens@npm:2.0.3" @@ -4155,6 +4360,13 @@ __metadata: languageName: node linkType: hard +"detect-libc@npm:^2.0.2": + version: 2.0.2 + resolution: "detect-libc@npm:2.0.2" + checksum: 6118f30c0c425b1e56b9d2609f29bec50d35a6af0b762b6ad127271478f3bbfda7319ce869230cf1a351f2b219f39332cde290858553336d652c77b970f15de8 + languageName: node + linkType: hard + "detect-node-es@npm:^1.1.0": version: 1.1.0 resolution: "detect-node-es@npm:1.1.0" @@ -5620,6 +5832,13 @@ __metadata: languageName: node linkType: hard +"is-arrayish@npm:^0.3.1": + version: 0.3.2 + resolution: "is-arrayish@npm:0.3.2" + checksum: 81a78d518ebd8b834523e25d102684ee0f7e98637136d3bdc93fd09636350fa06f1d8ca997ea28143d4d13cb1b69c0824f082db0ac13e1ab3311c10ffea60ade + languageName: node + linkType: hard + "is-async-function@npm:^2.0.0": version: 2.0.0 resolution: "is-async-function@npm:2.0.0" @@ -8434,6 +8653,17 @@ __metadata: languageName: node linkType: hard +"semver@npm:^7.5.4": + version: 7.6.0 + resolution: "semver@npm:7.6.0" + dependencies: + lru-cache: "npm:^6.0.0" + bin: + semver: bin/semver.js + checksum: 1b41018df2d8aca5a1db4729985e8e20428c650daea60fcd16e926e9383217d00f574fab92d79612771884a98d2ee2a1973f49d630829a8d54d6570defe62535 + languageName: node + linkType: hard + "set-function-length@npm:^1.1.1": version: 1.1.1 resolution: "set-function-length@npm:1.1.1" @@ -8457,6 +8687,75 @@ __metadata: languageName: node linkType: hard +"sharp@npm:^0.33.2": + version: 0.33.2 + resolution: "sharp@npm:0.33.2" + dependencies: + "@img/sharp-darwin-arm64": "npm:0.33.2" + "@img/sharp-darwin-x64": "npm:0.33.2" + "@img/sharp-libvips-darwin-arm64": "npm:1.0.1" + "@img/sharp-libvips-darwin-x64": "npm:1.0.1" + "@img/sharp-libvips-linux-arm": "npm:1.0.1" + "@img/sharp-libvips-linux-arm64": "npm:1.0.1" + "@img/sharp-libvips-linux-s390x": "npm:1.0.1" + "@img/sharp-libvips-linux-x64": "npm:1.0.1" + "@img/sharp-libvips-linuxmusl-arm64": "npm:1.0.1" + "@img/sharp-libvips-linuxmusl-x64": "npm:1.0.1" + "@img/sharp-linux-arm": "npm:0.33.2" + "@img/sharp-linux-arm64": "npm:0.33.2" + "@img/sharp-linux-s390x": "npm:0.33.2" + "@img/sharp-linux-x64": "npm:0.33.2" + "@img/sharp-linuxmusl-arm64": "npm:0.33.2" + "@img/sharp-linuxmusl-x64": "npm:0.33.2" + "@img/sharp-wasm32": "npm:0.33.2" + "@img/sharp-win32-ia32": "npm:0.33.2" + "@img/sharp-win32-x64": "npm:0.33.2" + color: "npm:^4.2.3" + detect-libc: "npm:^2.0.2" + semver: "npm:^7.5.4" + dependenciesMeta: + "@img/sharp-darwin-arm64": + optional: true + "@img/sharp-darwin-x64": + optional: true + "@img/sharp-libvips-darwin-arm64": + optional: true + "@img/sharp-libvips-darwin-x64": + optional: true + "@img/sharp-libvips-linux-arm": + optional: true + "@img/sharp-libvips-linux-arm64": + optional: true + "@img/sharp-libvips-linux-s390x": + optional: true + "@img/sharp-libvips-linux-x64": + optional: true + "@img/sharp-libvips-linuxmusl-arm64": + optional: true + "@img/sharp-libvips-linuxmusl-x64": + optional: true + "@img/sharp-linux-arm": + optional: true + "@img/sharp-linux-arm64": + optional: true + "@img/sharp-linux-s390x": + optional: true + "@img/sharp-linux-x64": + optional: true + "@img/sharp-linuxmusl-arm64": + optional: true + "@img/sharp-linuxmusl-x64": + optional: true + "@img/sharp-wasm32": + optional: true + "@img/sharp-win32-ia32": + optional: true + "@img/sharp-win32-x64": + optional: true + checksum: 4fc8a4632a2c83e920e10a0803753fedc2511e6cc58d377d3aa855cb11372d675aed829d96439b33ac709419bdf94f6121886885059d26216cc76e3a58e4c15f + languageName: node + linkType: hard + "shebang-command@npm:^2.0.0": version: 2.0.0 resolution: "shebang-command@npm:2.0.0" @@ -8517,6 +8816,15 @@ __metadata: languageName: node linkType: hard +"simple-swizzle@npm:^0.2.2": + version: 0.2.2 + resolution: "simple-swizzle@npm:0.2.2" + dependencies: + is-arrayish: "npm:^0.3.1" + checksum: c6dffff17aaa383dae7e5c056fbf10cf9855a9f79949f20ee225c04f06ddde56323600e0f3d6797e82d08d006e93761122527438ee9531620031c08c9e0d73cc + languageName: node + linkType: hard + "slash@npm:^3.0.0": version: 3.0.0 resolution: "slash@npm:3.0.0"