From 8cbf5b368c50d3e0d908c4fa5d96dbfb8ab6310b Mon Sep 17 00:00:00 2001 From: Andrew Lovett-Barron Date: Tue, 2 Jul 2024 09:34:17 +0200 Subject: [PATCH] Breaking up the main jsoncanvas file into a separate file for managing embeds --- src/embed.ts | 9 ++------- src/jsoncanvas.ts | 7 +------ 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/src/embed.ts b/src/embed.ts index 63725e5..b601c1e 100644 --- a/src/embed.ts +++ b/src/embed.ts @@ -4,14 +4,9 @@ import remark2rehype from "remark-rehype"; import rehypeStringify from "rehype-stringify"; import html2canvas from "html2canvas"; -import { JSONCanvas, Edge, GenericNode } from "@trbn/jsoncanvas"; +import { GenericNode } from "@trbn/jsoncanvas"; -import { - createCanvas, - loadImage, - Canvas, - CanvasRenderingContext2D, -} from "canvas"; +import { loadImage, Canvas, CanvasRenderingContext2D } from "canvas"; // import { applyDefaults, Options } from "./options"; // This renders out the images diff --git a/src/jsoncanvas.ts b/src/jsoncanvas.ts index 9ded792..ba3bc8e 100644 --- a/src/jsoncanvas.ts +++ b/src/jsoncanvas.ts @@ -1,11 +1,6 @@ import { JSONCanvas, Edge, GenericNode } from "@trbn/jsoncanvas"; -import { - createCanvas, - loadImage, - Canvas, - CanvasRenderingContext2D, -} from "canvas"; +import { createCanvas, Canvas, CanvasRenderingContext2D } from "canvas"; import { applyDefaults, Options } from "./options"; export function validate(jsonCanvasData: JSONCanvas) {