tikzify 0.0.39 → 0.0.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/book.ts +2 -2
- package/src/common.ts +1 -0
- package/src/cover.ts +3 -3
package/package.json
CHANGED
package/src/book.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import assert from 'assert'
|
|
2
2
|
import z from 'zod'
|
|
3
|
-
import { color, colorMap, defineColors, Emoji, fromSvg, getColors, gradient, Lang, svg, } from './common'
|
|
3
|
+
import { avifBase64, color, colorMap, defineColors, Emoji, fromSvg, getColors, gradient, Lang, svg, } from './common'
|
|
4
4
|
import { emojiMap } from './emojis'
|
|
5
5
|
|
|
6
6
|
|
|
@@ -10,7 +10,7 @@ export const Page = z.object({
|
|
|
10
10
|
textBackground: z.string(),
|
|
11
11
|
text: z.string().max(1024),
|
|
12
12
|
emojis: z.array(Emoji).length(6),
|
|
13
|
-
avifBase64:
|
|
13
|
+
avifBase64: avifBase64
|
|
14
14
|
})
|
|
15
15
|
|
|
16
16
|
export type Book = z.infer<typeof Book>
|
package/src/common.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { emojiMap } from './emojis'
|
|
|
5
5
|
|
|
6
6
|
export const color = z.string().length(7)
|
|
7
7
|
export const gradient = z.array(color).length(2)
|
|
8
|
+
export const avifBase64 = z.string().max(700_000)
|
|
8
9
|
|
|
9
10
|
export type Emoji = z.infer<typeof Emoji>
|
|
10
11
|
export const Emoji = z.object(emojiMap).keyof()
|
package/src/cover.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import assert from "assert"
|
|
3
3
|
import { z } from "zod"
|
|
4
|
-
import { absolute, background, bf, centering, colorMap, defineColors, Emoji, footnotesize, fromSvg, getColors, gradient, img, Lang, Large, minipage, normalsize, parskip, poly, quote, ragged, svg, tcolorbox, tikzpicture, txtBackground, vfill, vspace } from "./common"
|
|
4
|
+
import { absolute, avifBase64, background, bf, centering, colorMap, defineColors, Emoji, footnotesize, fromSvg, getColors, gradient, img, Lang, Large, minipage, normalsize, parskip, poly, quote, ragged, svg, tcolorbox, tikzpicture, txtBackground, vfill, vspace } from "./common"
|
|
5
5
|
import { emojiMap } from "./emojis"
|
|
6
6
|
|
|
7
7
|
const backBackground = String.raw`\fill[
|
|
@@ -37,11 +37,11 @@ export const Cover = z.object({
|
|
|
37
37
|
title: z.string().max(64),
|
|
38
38
|
author: z.string().max(32),
|
|
39
39
|
tagline: z.string().max(128),
|
|
40
|
-
blurb: z.string().max(
|
|
40
|
+
blurb: z.string().max(800),
|
|
41
41
|
testimonial_quote: z.string().max(256),
|
|
42
42
|
testimonial_name: z.string().max(64),
|
|
43
43
|
slogan: z.string().max(64),
|
|
44
|
-
avifBase64:
|
|
44
|
+
avifBase64: avifBase64,
|
|
45
45
|
})
|
|
46
46
|
|
|
47
47
|
export function coverTex({
|