botc-character-sheet 0.1.0

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.
@@ -0,0 +1,17 @@
1
+ import { GroupedCharacters, Jinx } from "./types";
2
+ import "./CharacterSheet.css";
3
+ interface CharacterSheetProps {
4
+ title: string;
5
+ author?: string;
6
+ characters: GroupedCharacters;
7
+ color: string;
8
+ jinxes: Jinx[];
9
+ showSwirls?: boolean;
10
+ includeMargins?: boolean;
11
+ solidTitle?: boolean;
12
+ iconScale?: number;
13
+ compactAppearance?: boolean;
14
+ }
15
+ export declare function CharacterSheet({ title, author, characters, color, jinxes, showSwirls, includeMargins, solidTitle, iconScale, compactAppearance, }: CharacterSheetProps): import("preact").JSX.Element;
16
+ export {};
17
+ //# sourceMappingURL=CharacterSheet.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CharacterSheet.d.ts","sourceRoot":"","sources":["../src/CharacterSheet.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,iBAAiB,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAErE,OAAO,sBAAsB,CAAC;AAG9B,UAAU,mBAAmB;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,iBAAiB,CAAC;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,IAAI,EAAE,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED,wBAAgB,cAAc,CAAC,EAC7B,KAAK,EACL,MAAM,EACN,UAAU,EACV,KAAiB,EACjB,MAAW,EACX,UAAiB,EACjB,cAAsB,EACtB,UAAkB,EAClB,SAAe,EACf,iBAAyB,GAC1B,EAAE,mBAAmB,gCAkGrB"}
@@ -0,0 +1,9 @@
1
+ import "./SheetBack.css";
2
+ type SheetBackProps = {
3
+ title: string;
4
+ color: string;
5
+ includeMargins: boolean;
6
+ };
7
+ export declare const SheetBack: ({ title, color, includeMargins }: SheetBackProps) => import("preact").JSX.Element;
8
+ export {};
9
+ //# sourceMappingURL=SheetBack.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SheetBack.d.ts","sourceRoot":"","sources":["../src/SheetBack.tsx"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,CAAC;AAEzB,KAAK,cAAc,GAAG;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,OAAO,CAAC;CACzB,CAAC;AAEF,eAAO,MAAM,SAAS,GAAI,kCAAkC,cAAc,iCA6BzE,CAAC"}
@@ -0,0 +1,4 @@
1
+ export declare function parseRgb(hex: string): [number, number, number];
2
+ export declare function rgbString(r: number, g: number, b: number): string;
3
+ export declare function darken(color: string, darkenFactor: number): string;
4
+ //# sourceMappingURL=colorAlgorithms.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"colorAlgorithms.d.ts","sourceRoot":"","sources":["../src/colorAlgorithms.ts"],"names":[],"mappings":"AAAA,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAiB9D;AAED,wBAAgB,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAMjE;AAED,wBAAgB,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,UAMzD"}
@@ -0,0 +1,5 @@
1
+ export { CharacterSheet } from "./CharacterSheet";
2
+ export { SheetBack } from "./SheetBack";
3
+ export type { ResolvedCharacter, GroupedCharacters, Jinx, CharacterTeam } from "./types";
4
+ export { darken, parseRgb, rgbString } from "./colorAlgorithms";
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,YAAY,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACzF,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,322 @@
1
+ import { options as p, Fragment as u } from "preact";
2
+ var v = 0;
3
+ function e(i, n, r, a, l, t) {
4
+ n || (n = {});
5
+ var c, o, d = n;
6
+ if ("ref" in d) for (o in d = {}, n) o == "ref" ? c = n[o] : d[o] = n[o];
7
+ var s = { type: i, props: d, key: r, ref: c, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: --v, __i: -1, __u: 0, __source: l, __self: t };
8
+ if (typeof i == "function" && (c = i.defaultProps)) for (o in c) d[o] === void 0 && (d[o] = c[o]);
9
+ return p.vnode && p.vnode(s), s;
10
+ }
11
+ function N(i) {
12
+ if (i.startsWith("#") && (i = i.slice(1)), i.length === 3 && (i = i.split("").map((l) => l + l).join("")), i.length !== 6)
13
+ throw new Error("Invalid HEX color.");
14
+ const n = parseInt(i.slice(0, 2), 16), r = parseInt(i.slice(2, 4), 16), a = parseInt(i.slice(4, 6), 16);
15
+ return [n, r, a];
16
+ }
17
+ function k(i, n, r) {
18
+ const a = (l) => {
19
+ const t = l.toString(16);
20
+ return t.length === 1 ? "0" + t : t;
21
+ };
22
+ return `#${a(i)}${a(n)}${a(r)}`;
23
+ }
24
+ function y(i, n) {
25
+ const [r, a, l] = N(i), t = Math.round(r * n), c = Math.round(a * n), o = Math.round(l * n);
26
+ return k(t, c, o);
27
+ }
28
+ function M({
29
+ title: i,
30
+ author: n,
31
+ characters: r,
32
+ color: a = "#4a5568",
33
+ jinxes: l = [],
34
+ showSwirls: t = !0,
35
+ includeMargins: c = !1,
36
+ solidTitle: o = !1,
37
+ iconScale: d = 1.6,
38
+ compactAppearance: s = !1
39
+ }) {
40
+ const m = [
41
+ {
42
+ key: "townsfolk",
43
+ title: "Townsfolk",
44
+ chars: r.townsfolk,
45
+ color: "#00469e"
46
+ },
47
+ {
48
+ key: "outsider",
49
+ title: "Outsiders",
50
+ chars: r.outsider,
51
+ color: "#00469e"
52
+ },
53
+ {
54
+ key: "minion",
55
+ title: "Minions",
56
+ chars: r.minion,
57
+ color: "#580709"
58
+ },
59
+ {
60
+ key: "demon",
61
+ title: "Demons",
62
+ chars: r.demon,
63
+ color: "#580709"
64
+ }
65
+ ].filter((h) => h.chars.length > 0), g = y(a, 0.4);
66
+ return /* @__PURE__ */ e(
67
+ "div",
68
+ {
69
+ className: "character-sheet",
70
+ id: "character-sheet",
71
+ style: {
72
+ "--header-color-light": a,
73
+ "--header-color-dark": g,
74
+ transform: c ? "scale(0.952)" : void 0
75
+ },
76
+ children: [
77
+ /* @__PURE__ */ e(
78
+ "img",
79
+ {
80
+ className: "character-sheet-background",
81
+ src: "/images/parchment_texture_a4_lightened.jpg"
82
+ }
83
+ ),
84
+ /* @__PURE__ */ e(_, { color: a }),
85
+ /* @__PURE__ */ e("div", { className: "sheet-content", children: [
86
+ /* @__PURE__ */ e(
87
+ b,
88
+ {
89
+ showSwirls: t,
90
+ title: i,
91
+ author: n,
92
+ solidHeader: o
93
+ }
94
+ ),
95
+ /* @__PURE__ */ e("div", { className: "characters-grid", children: [
96
+ m.map((h, f) => /* @__PURE__ */ e(u, { children: [
97
+ /* @__PURE__ */ e(
98
+ w,
99
+ {
100
+ title: h.title.toUpperCase(),
101
+ characters: h.chars,
102
+ sidebarColor: a,
103
+ charNameColor: h.color,
104
+ iconScale: d,
105
+ compactAppearance: s
106
+ },
107
+ h.key
108
+ ),
109
+ f < m.length - 1 && /* @__PURE__ */ e("img", { src: "/images/divider.png", className: "section-divider" })
110
+ ] })),
111
+ l.length > 0 && /* @__PURE__ */ e(u, { children: [
112
+ /* @__PURE__ */ e("img", { src: "/images/divider.png", className: "section-divider" }),
113
+ /* @__PURE__ */ e(
114
+ j,
115
+ {
116
+ jinxes: l,
117
+ allCharacters: [
118
+ ...r.townsfolk,
119
+ ...r.outsider,
120
+ ...r.minion,
121
+ ...r.demon
122
+ ]
123
+ }
124
+ )
125
+ ] })
126
+ ] }),
127
+ /* @__PURE__ */ e("div", { className: "sheet-footer", children: [
128
+ /* @__PURE__ */ e("span", { className: "asterisk", children: "*" }),
129
+ "Not the first night"
130
+ ] })
131
+ ] }),
132
+ /* @__PURE__ */ e("div", { className: "author-credit", children: [
133
+ /* @__PURE__ */ e("p", { children: "© Steven Medway bloodontheclocktower.com" }),
134
+ /* @__PURE__ */ e("p", { children: "Script template by John Forster ravenswoodstudio.xyz" })
135
+ ] })
136
+ ]
137
+ }
138
+ );
139
+ }
140
+ function b({
141
+ showSwirls: i,
142
+ title: n,
143
+ author: r,
144
+ solidHeader: a = !1
145
+ }) {
146
+ return console.log("title:", n), /* @__PURE__ */ e(u, { children: [
147
+ /* @__PURE__ */ e("h1", { className: "sheet-header", children: [
148
+ i && /* @__PURE__ */ e(
149
+ "img",
150
+ {
151
+ src: "/images/black-swirl-divider.png",
152
+ className: "swirl-divider"
153
+ }
154
+ ),
155
+ /* @__PURE__ */ e(
156
+ "span",
157
+ {
158
+ style: {
159
+ mixBlendMode: a ? "normal" : "multiply"
160
+ },
161
+ children: n
162
+ }
163
+ ),
164
+ i && /* @__PURE__ */ e(
165
+ "img",
166
+ {
167
+ src: "/images/black-swirl-divider.png",
168
+ className: "swirl-divider flip"
169
+ }
170
+ )
171
+ ] }),
172
+ r && /* @__PURE__ */ e("h2", { className: "sheet-author", children: [
173
+ "by ",
174
+ r
175
+ ] })
176
+ ] });
177
+ }
178
+ function _({ color: i }) {
179
+ return /* @__PURE__ */ e("div", { className: "sidebar-container", children: [
180
+ /* @__PURE__ */ e("div", { className: "sidebar-background" }),
181
+ /* @__PURE__ */ e("div", { className: "sidebar-overlay", style: { backgroundColor: i } })
182
+ ] });
183
+ }
184
+ function w({
185
+ title: i,
186
+ characters: n,
187
+ charNameColor: r,
188
+ iconScale: a,
189
+ compactAppearance: l = !1
190
+ }) {
191
+ return /* @__PURE__ */ e("div", { className: "character-section", children: [
192
+ /* @__PURE__ */ e("h2", { className: "section-title", children: i }),
193
+ /* @__PURE__ */ e("div", { className: "character-list", children: [
194
+ n.map((t) => /* @__PURE__ */ e(
195
+ C,
196
+ {
197
+ character: t,
198
+ color: r,
199
+ iconScale: a,
200
+ compactAppearance: l
201
+ },
202
+ t.id
203
+ )),
204
+ n.length % 2 === 1 && /* @__PURE__ */ e("div", { className: "character-column-spacer" })
205
+ ] })
206
+ ] });
207
+ }
208
+ function C({
209
+ character: i,
210
+ color: n,
211
+ iconScale: r,
212
+ compactAppearance: a = !1
213
+ }) {
214
+ const l = () => i.wiki_image ? i.wiki_image : i.image ? typeof i.image == "string" ? i.image : i.image[0] : null, t = (o) => {
215
+ const d = o.match(/^(.*?)(\[.*?\])$/);
216
+ if (d) {
217
+ const [, s, m] = d;
218
+ return /* @__PURE__ */ e(u, { children: [
219
+ s,
220
+ /* @__PURE__ */ e("strong", { className: "setup-ability", children: m })
221
+ ] });
222
+ }
223
+ return o;
224
+ }, c = l();
225
+ return /* @__PURE__ */ e(
226
+ "div",
227
+ {
228
+ className: "character-card",
229
+ style: { marginBottom: a ? "1mm" : void 0 },
230
+ children: [
231
+ /* @__PURE__ */ e("div", { className: "character-icon-wrapper", children: c ? /* @__PURE__ */ e(
232
+ "img",
233
+ {
234
+ src: c,
235
+ alt: i.name,
236
+ className: "character-icon",
237
+ style: { scale: r.toString() }
238
+ }
239
+ ) : /* @__PURE__ */ e(
240
+ "div",
241
+ {
242
+ className: "character-icon-placeholder",
243
+ style: { color: n, scale: r.toString() },
244
+ children: i.name.charAt(0)
245
+ }
246
+ ) }),
247
+ /* @__PURE__ */ e("div", { className: "character-info", children: [
248
+ /* @__PURE__ */ e("h3", { className: "character-name", style: { color: n }, children: i.name }),
249
+ /* @__PURE__ */ e("p", { className: "character-ability", children: t(i.ability) })
250
+ ] })
251
+ ]
252
+ }
253
+ );
254
+ }
255
+ function j({ jinxes: i, allCharacters: n }) {
256
+ const r = new Map(
257
+ n.map((s) => [s.id.toLowerCase(), s])
258
+ ), a = (s) => s.wiki_image ? s.wiki_image : s.image ? typeof s.image == "string" ? s.image : s.image[0] : null, l = (s, m) => {
259
+ const g = r.get(s.characters[0]), h = r.get(s.characters[1]);
260
+ return /* @__PURE__ */ e("div", { className: "jinx-item", children: [
261
+ /* @__PURE__ */ e("div", { className: "jinx-icons", children: [
262
+ g && /* @__PURE__ */ e("div", { className: "jinx-icon-wrapper", children: a(g) ? /* @__PURE__ */ e(
263
+ "img",
264
+ {
265
+ src: a(g),
266
+ alt: g.name,
267
+ className: "jinx-icon"
268
+ }
269
+ ) : /* @__PURE__ */ e("div", { className: "jinx-icon-placeholder", children: g.name.charAt(0) }) }),
270
+ /* @__PURE__ */ e("span", { className: "jinx-divider" }),
271
+ h && /* @__PURE__ */ e("div", { className: "jinx-icon-wrapper", children: a(h) ? /* @__PURE__ */ e(
272
+ "img",
273
+ {
274
+ src: a(h),
275
+ alt: h.name,
276
+ className: "jinx-icon"
277
+ }
278
+ ) : /* @__PURE__ */ e("div", { className: "jinx-icon-placeholder", children: h.name.charAt(0) }) })
279
+ ] }),
280
+ /* @__PURE__ */ e("p", { className: "jinx-text", children: s.jinx })
281
+ ] }, m);
282
+ }, t = i.length > 4, c = t ? Math.ceil(i.length / 2) : i.length, o = i.slice(0, c), d = i.slice(c);
283
+ return /* @__PURE__ */ e("div", { className: "jinxes-section", children: [
284
+ /* @__PURE__ */ e("h2", { className: "section-title" }),
285
+ t ? /* @__PURE__ */ e("div", { className: "jinxes-list jinxes-two-columns", children: [
286
+ /* @__PURE__ */ e("div", { className: "jinx-column", children: o.map((s, m) => l(s, m)) }),
287
+ /* @__PURE__ */ e("div", { className: "jinx-column", children: d.map((s, m) => l(s, c + m)) })
288
+ ] }) : /* @__PURE__ */ e("div", { className: "jinxes-list", children: i.map((s, m) => l(s, m)) })
289
+ ] });
290
+ }
291
+ const S = ({ title: i, color: n, includeMargins: r }) => /* @__PURE__ */ e(
292
+ "div",
293
+ {
294
+ className: "sheet-backing",
295
+ style: {
296
+ transform: r ? "scale(0.952)" : void 0
297
+ },
298
+ children: [
299
+ /* @__PURE__ */ e("div", { className: "sheet-background", children: /* @__PURE__ */ e("h1", { children: (() => {
300
+ const l = i.split("&");
301
+ return l.map((t, c) => /* @__PURE__ */ e(u, { children: [
302
+ t,
303
+ c < l.length - 1 && /* @__PURE__ */ e("span", { className: "ampersand", children: "&" })
304
+ ] }));
305
+ })() }) }),
306
+ /* @__PURE__ */ e(
307
+ "div",
308
+ {
309
+ className: "sheet-back-overlay",
310
+ style: { backgroundColor: n }
311
+ }
312
+ )
313
+ ]
314
+ }
315
+ );
316
+ export {
317
+ M as CharacterSheet,
318
+ S as SheetBack,
319
+ y as darken,
320
+ N as parseRgb,
321
+ k as rgbString
322
+ };
package/dist/style.css ADDED
@@ -0,0 +1 @@
1
+ .character-sheet{width:210mm;min-height:297mm;max-height:297mm;position:relative;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;color:#2d3748;display:flex;overflow:hidden;isolation:isolate}.character-sheet-background{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;object-fit:cover;z-index:0}.sidebar-container{position:relative}.sidebar-background{background-image:url(/images/sidebar-desaturated-small.jpg);background-size:105mm;width:15mm;height:100%;flex-shrink:0}.sidebar-overlay{position:absolute;top:0;left:0;width:15mm;height:100%;background-color:#0003;pointer-events:none;mix-blend-mode:multiply}.sidebar-section{flex:1;display:flex;align-items:center;justify-content:center;writing-mode:vertical-rl;text-orientation:mixed;padding:3mm 0}.sidebar-label{font-size:3.5mm;font-weight:600;letter-spacing:.5mm;color:#eee;text-shadow:.3mm .3mm .5mm rgba(0,0,0,.3)}.sheet-content{position:relative;padding:5mm 0 3mm;display:flex;flex-direction:column;min-width:0}.character-column-spacer{min-height:13mm}.sheet-header-container{display:flex;align-items:center}.sheet-header{text-align:center;margin:0 0 4mm;padding:0 10mm;display:flex;align-items:center;justify-content:center}.sheet-header span{font-weight:lighter;letter-spacing:0mm;filter:drop-shadow(.2mm .1mm 0 #222d) drop-shadow(0mm 0mm .1mm #2228);word-spacing:-3mm;background:linear-gradient(-20deg,var(--header-color-light) 50%,var(--header-color-dark));background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;font-family:Unlovable,serif;font-weight:100;font-size:14mm;padding:2mm 4mm;margin:0 -4mm;mix-blend-mode:multiply}.swirl-divider{width:35mm;mix-blend-mode:soft-light}.flip{transform:scaleX(-1)}.sheet-author{font-family:Goudy Old Style,Goudy Oldstyle,Goudy,Georgia,serif;font-size:3.5mm;font-weight:700;text-align:center;margin:-5mm 0 3mm;color:#333}.characters-grid{display:flex;flex-direction:column;gap:2.5mm;flex:1;padding:0 10mm 0 0}.character-section{display:flex;break-inside:avoid;min-height:20mm}.section-title{font-family:Dumbledor,serif;font-weight:lighter;padding:0 3.5mm;color:#eee;margin:-6mm 0 -6mm -15mm;min-width:15mm;text-align:center;z-index:1;text-orientation:upright;writing-mode:vertical-lr;letter-spacing:-.6mm;font-size:4mm;line-height:2;filter:drop-shadow(.1mm .1mm .3mm #222a) drop-shadow(-.1mm .1mm .3mm #2228) drop-shadow(.1mm -.1mm .3mm #222a) drop-shadow(-.1mm -.1mm .3mm #222a)}.section-divider{height:.8mm;opacity:1;margin-left:-50%;width:150%;mix-blend-mode:soft-light}.character-list{margin-left:8mm;column-count:2;column-gap:5mm}.character-card{display:flex;align-items:center;gap:2.5mm;break-inside:avoid;margin-bottom:2.5mm}.character-info{padding-left:2mm}.character-icon-wrapper{display:flex;flex-shrink:0}.character-icon,.character-icon-placeholder{width:13mm;max-height:13mm;object-fit:contain}.character-icon-placeholder{display:flex;align-items:center;justify-content:center;color:#eee;font-weight:700;font-size:6mm}.character-name{font-family:Goudy Old Style,Goudy Oldstyle,Goudy,Georgia,serif;font-size:3.2mm;font-weight:700;margin:0 0 .5mm;color:#1a202c}.character-ability{font-family:Trade Gothic,Trade Gothic Next,Helvetica Neue,Arial,sans-serif;font-size:2.8mm;line-height:1.2;margin:0;color:#222;display:inline-block}.sheet-footer{text-align:center;font-family:Goudy Old Style,Goudy Oldstyle,Goudy,Georgia,serif;font-size:3.5mm;color:#222;opacity:.7}.asterisk{font-size:5mm}.author-credit{position:absolute;bottom:3mm;right:3mm;font-family:Goudy Old Style,Goudy Oldstyle,Goudy,Georgia,serif;font-size:3.2mm;color:#222;opacity:.6;text-align:right}.author-credit p{font-size:2.5mm;margin:0}.setup-ability{display:inline-block;white-space:normal;font-family:Goudy Old Style,Goudy Oldstyle,Goudy,Georgia,serif}.jinxes-section{display:flex;break-inside:avoid;margin-top:1mm}.jinxes-list{margin-left:8mm;display:flex;flex-direction:column}.jinxes-two-columns{flex-direction:row;gap:5mm}.jinx-column{flex:1;display:flex;flex-direction:column}.jinx-item{display:flex;gap:2.5mm;align-items:center;break-inside:avoid;margin-bottom:2mm}.jinx-icons{display:flex;gap:1mm;flex-shrink:0;align-items:center}.jinx-icon-wrapper{display:flex;flex-shrink:0;align-items:center}.jinx-icon,.jinx-icon-placeholder{width:3.5mm;height:3.5mm;object-fit:contain;scale:2.8}.jinx-icon-placeholder{display:flex;align-items:center;justify-content:center;color:#eee;font-weight:700;font-size:2mm}.jinx-divider{font-family:Dumbledor,serif;font-size:4.6mm;color:#1a202c;line-height:3.5mm;margin:0 .5mm}.jinx-text{font-family:Trade Gothic,Trade Gothic Next,Helvetica Neue,Arial,sans-serif;font-size:2.6mm;line-height:1.2;margin:0;color:#222;padding-top:.5mm}.sheet-backing{position:relative;width:210mm;min-height:297mm;max-height:297mm}.sheet-background{width:210mm;min-height:297mm;max-height:297mm;background-image:url(/images/sidebar-desaturated-small.jpg);background-repeat:repeat;background-size:105mm;display:flex;flex-direction:column;align-items:center;justify-content:center}.sheet-back-overlay{position:absolute;top:0;left:0;width:100%;height:100%;mix-blend-mode:multiply;pointer-events:none}.sheet-backing h1{font-family:Unlovable,serif;mix-blend-mode:normal;font-weight:100;font-size:30mm;color:#ae9d7f;text-wrap:wrap;z-index:1;flex-shrink:1;width:100mm;text-align:center;padding:20mm 0;background-image:url(/images/parchment_texture.jpg);background-clip:text;-webkit-background-clip:text;color:transparent;background-size:100mm;filter:drop-shadow(.5mm .5mm black) drop-shadow(0mm 0mm 1mm black);word-break:break-word;word-spacing:-10mm}.sheet-backing h1 .ampersand{font-size:45mm;line-height:0;vertical-align:-5mm;margin:0 -5mm}
@@ -0,0 +1,25 @@
1
+ export type CharacterTeam = "townsfolk" | "outsider" | "minion" | "demon" | "traveller" | "fabled";
2
+ export interface ResolvedCharacter {
3
+ id: string;
4
+ name: string;
5
+ ability: string;
6
+ team: CharacterTeam;
7
+ image?: string | string[];
8
+ wiki_image?: string;
9
+ edition?: string;
10
+ isCustom?: boolean;
11
+ }
12
+ export interface GroupedCharacters {
13
+ townsfolk: ResolvedCharacter[];
14
+ outsider: ResolvedCharacter[];
15
+ minion: ResolvedCharacter[];
16
+ demon: ResolvedCharacter[];
17
+ traveller: ResolvedCharacter[];
18
+ fabled: ResolvedCharacter[];
19
+ }
20
+ export interface Jinx {
21
+ characters: [string, string];
22
+ jinx: string;
23
+ oldJinx?: string;
24
+ }
25
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AACA,MAAM,MAAM,aAAa,GACrB,WAAW,GACX,UAAU,GACV,QAAQ,GACR,OAAO,GACP,WAAW,GACX,QAAQ,CAAC;AAEb,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,aAAa,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,iBAAiB,EAAE,CAAC;IAC/B,QAAQ,EAAE,iBAAiB,EAAE,CAAC;IAC9B,MAAM,EAAE,iBAAiB,EAAE,CAAC;IAC5B,KAAK,EAAE,iBAAiB,EAAE,CAAC;IAC3B,SAAS,EAAE,iBAAiB,EAAE,CAAC;IAC/B,MAAM,EAAE,iBAAiB,EAAE,CAAC;CAC7B;AAED,MAAM,WAAW,IAAI;IACnB,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB"}
package/package.json ADDED
@@ -0,0 +1,31 @@
1
+ {
2
+ "name": "botc-character-sheet",
3
+ "version": "0.1.0",
4
+ "type": "module",
5
+ "main": "./dist/index.js",
6
+ "module": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "import": "./dist/index.js",
11
+ "types": "./dist/index.d.ts"
12
+ },
13
+ "./style.css": "./dist/style.css"
14
+ },
15
+ "files": [
16
+ "dist"
17
+ ],
18
+ "scripts": {
19
+ "build": "vite build && tsc --emitDeclarationOnly --outDir dist",
20
+ "dev": "vite build --watch"
21
+ },
22
+ "peerDependencies": {
23
+ "preact": "^10.19.3"
24
+ },
25
+ "devDependencies": {
26
+ "@preact/preset-vite": "^2.8.1",
27
+ "preact": "^10.19.3",
28
+ "typescript": "^5.3.3",
29
+ "vite": "^5.0.8"
30
+ }
31
+ }