feat(artboard): implement 8 new templates

This commit is contained in:
Amruth Pillai
2023-11-09 21:01:01 +01:00
parent 9acf7e8d22
commit 92bb9f96a0
37 changed files with 5422 additions and 1810 deletions

View File

@ -3,9 +3,11 @@ export * from "./namespaces/cefr";
export * from "./namespaces/csv";
export * from "./namespaces/date";
export * from "./namespaces/fonts";
export * from "./namespaces/number";
export * from "./namespaces/object";
export * from "./namespaces/page";
export * from "./namespaces/promise";
export * from "./namespaces/string";
export * from "./namespaces/style";
export * from "./namespaces/template";
export * from "./namespaces/types";

View File

@ -0,0 +1,7 @@
export const linearTransform = (
value: number,
inMin: number,
inMax: number,
outMin: number,
outMax: number,
) => ((value - inMin) * (outMax - outMin)) / (inMax - inMin) + outMin;

View File

@ -1,5 +1,3 @@
import { Template } from "./types";
export const pageSizeMap = {
a4: {
width: 210,
@ -10,12 +8,3 @@ export const pageSizeMap = {
height: 279,
},
};
export const templatesList: Template[] = [
{
id: "rhyhorn",
name: "Rhyhorn",
image:
"https://res.cloudinary.com/amruth-pillai/image/upload/v1699370067/reactive-resume/templates/482-2480x3508_vuf5ev.jpg",
},
];

View File

@ -0,0 +1,46 @@
export type TemplateKey =
| "onyx"
| "kakuna"
| "rhyhorn"
| "azurill"
| "ditto"
| "chikorita"
| "bronzor"
| "pikachu";
export type Template = { id: TemplateKey; name: string };
export const templatesList: Template[] = [
{
id: "onyx",
name: "Onyx",
},
{
id: "kakuna",
name: "Kakuna",
},
{
id: "rhyhorn",
name: "Rhyhorn",
},
{
id: "azurill",
name: "Azurill",
},
{
id: "ditto",
name: "Ditto",
},
{
id: "chikorita",
name: "Chikorita",
},
{
id: "bronzor",
name: "Bronzor",
},
{
id: "pikachu",
name: "Pikachu",
},
];

View File

@ -1,7 +1,5 @@
export type Json = Record<string, unknown>;
export type Template = { id: string; name: string; image: string };
export type LayoutLocator = { page: number; column: number; section: number };
export type DeepPartial<T> = T extends object ? { [P in keyof T]?: DeepPartial<T[P]> } : T;