botc-character-sheet 0.14.0-beta.3 → 0.15.0-beta.1

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/dist/index.js CHANGED
@@ -1,29 +1,29 @@
1
1
  import { options as j, Fragment as m } from "preact";
2
- var A = 0;
3
- function e(i, t, a, r, n, s) {
2
+ var O = 0;
3
+ function e(i, t, a, r, n, h) {
4
4
  t || (t = {});
5
- var c, h, o = t;
6
- if ("ref" in o) for (h in o = {}, t) h == "ref" ? c = t[h] : o[h] = t[h];
7
- var l = { type: i, props: o, key: a, ref: c, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: --A, __i: -1, __u: 0, __source: n, __self: s };
8
- if (typeof i == "function" && (c = i.defaultProps)) for (h in c) o[h] === void 0 && (o[h] = c[h]);
9
- return j.vnode && j.vnode(l), l;
5
+ var l, s, o = t;
6
+ if ("ref" in o) for (s in o = {}, t) s == "ref" ? l = t[s] : o[s] = t[s];
7
+ var c = { type: i, props: o, key: a, ref: l, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: --O, __i: -1, __u: 0, __source: n, __self: h };
8
+ if (typeof i == "function" && (l = i.defaultProps)) for (s in l) o[s] === void 0 && (o[s] = l[s]);
9
+ return j.vnode && j.vnode(c), c;
10
10
  }
11
- function P(i) {
11
+ function E(i) {
12
12
  if (i.startsWith("#") && (i = i.slice(1)), i.length === 3 && (i = i.split("").map((n) => n + n).join("")), i.length !== 6)
13
13
  throw new Error("Invalid HEX color.");
14
14
  const t = parseInt(i.slice(0, 2), 16), a = parseInt(i.slice(2, 4), 16), r = parseInt(i.slice(4, 6), 16);
15
15
  return [t, a, r];
16
16
  }
17
- function W(i, t, a) {
17
+ function C(i, t, a) {
18
18
  const r = (n) => {
19
- const s = n.toString(16);
20
- return s.length === 1 ? "0" + s : s;
19
+ const h = n.toString(16);
20
+ return h.length === 1 ? "0" + h : h;
21
21
  };
22
22
  return `#${r(i)}${r(t)}${r(a)}`;
23
23
  }
24
- function O(i, t) {
25
- const [a, r, n] = P(i), s = Math.round(a * t), c = Math.round(r * t), h = Math.round(n * t);
26
- return W(s, c, h);
24
+ function z(i, t) {
25
+ const [a, r, n] = E(i), h = Math.round(a * t), l = Math.round(r * t), s = Math.round(n * t);
26
+ return C(h, l, s);
27
27
  }
28
28
  const f = {
29
29
  townsfolk: "#00469e",
@@ -37,16 +37,16 @@ const f = {
37
37
  function w(i) {
38
38
  return Array.isArray(i) ? i : [i];
39
39
  }
40
- function L(i, t = 20) {
40
+ function D(i, t = 20) {
41
41
  if (i.length === 0)
42
42
  return "transparent";
43
43
  if (i.length === 1) {
44
- const r = O(i[0], 0.4);
44
+ const r = z(i[0], 0.4);
45
45
  return `linear-gradient(${t}deg, ${i[0]} 50%, ${r})`;
46
46
  }
47
47
  const a = i.map((r, n) => {
48
- const s = n / (i.length - 1) * 100;
49
- return `${r} ${s}%`;
48
+ const h = n / (i.length - 1) * 100;
49
+ return `${r} ${h}%`;
50
50
  }).join(", ");
51
51
  return `linear-gradient(${t}deg, ${a})`;
52
52
  }
@@ -54,32 +54,32 @@ function I(i, t = 90) {
54
54
  const a = w(i);
55
55
  if (a.length === 1)
56
56
  return a[0];
57
- const r = a.map((n, s) => {
58
- const c = s / (a.length - 1) * 100;
59
- return `${n} ${c}%`;
57
+ const r = a.map((n, h) => {
58
+ const l = h / (a.length - 1) * 100;
59
+ return `${n} ${l}%`;
60
60
  }).join(", ");
61
61
  return `linear-gradient(${t}deg, ${r})`;
62
62
  }
63
- function E({
63
+ function R({
64
64
  jinxes: i,
65
65
  allCharacters: t,
66
66
  fabledAndLoric: a
67
67
  }) {
68
68
  const r = new Map(
69
69
  t.map((o) => [o.id.toLowerCase(), o])
70
- ), n = i.length > 4, s = n ? Math.ceil(i.length / 2) : i.length;
71
- let c, h;
72
- return a.length ? (c = i.map((o, l) => /* @__PURE__ */ e(p, { jinx: o, charMap: r }, `lc-${l}`)), h = a.map((o, l) => /* @__PURE__ */ e(C, { item: o }, `rc-${l}`))) : n ? (c = i.slice(0, s).map((o, l) => /* @__PURE__ */ e(p, { jinx: o, charMap: r }, `lc-${l}`)), h = i.slice(s).map((o, l) => /* @__PURE__ */ e(p, { jinx: o, charMap: r }, `rc-${l}`))) : c = i.map((o, l) => /* @__PURE__ */ e(p, { jinx: o, charMap: r }, `lc-${l}`)), /* @__PURE__ */ e("div", { className: "jinxes-section", children: [
70
+ ), n = i.length > 4, h = n ? Math.ceil(i.length / 2) : i.length;
71
+ let l, s;
72
+ return a.length ? (l = i.map((o, c) => /* @__PURE__ */ e(p, { jinx: o, charMap: r }, `lc-${c}`)), s = a.map((o, c) => /* @__PURE__ */ e(_, { item: o }, `rc-${c}`))) : n ? (l = i.slice(0, h).map((o, c) => /* @__PURE__ */ e(p, { jinx: o, charMap: r }, `lc-${c}`)), s = i.slice(h).map((o, c) => /* @__PURE__ */ e(p, { jinx: o, charMap: r }, `rc-${c}`))) : l = i.map((o, c) => /* @__PURE__ */ e(p, { jinx: o, charMap: r }, `lc-${c}`)), /* @__PURE__ */ e("div", { className: "jinxes-section", children: [
73
73
  /* @__PURE__ */ e("h2", { className: "section-title" }),
74
- h ? /* @__PURE__ */ e("div", { className: "jinxes-list jinxes-two-columns", children: [
74
+ s ? /* @__PURE__ */ e("div", { className: "jinxes-list jinxes-two-columns", children: [
75
75
  /* @__PURE__ */ e("div", { className: "jinx-column", children: [
76
- ...c
76
+ ...l
77
77
  ] }),
78
78
  /* @__PURE__ */ e("div", { className: "jinx-column", children: [
79
- ...h
79
+ ...s
80
80
  ] })
81
81
  ] }) : /* @__PURE__ */ e("div", { className: "jinxes-list", children: [
82
- ...c
82
+ ...l
83
83
  ] })
84
84
  ] });
85
85
  }
@@ -108,7 +108,7 @@ const p = ({ charMap: i, jinx: t }) => {
108
108
  /* @__PURE__ */ e("p", { className: "jinx-text", children: t.jinx })
109
109
  ] });
110
110
  };
111
- function C({ item: i }) {
111
+ function _({ item: i }) {
112
112
  return /* @__PURE__ */ e("div", { className: "jinx-item loric", children: [
113
113
  /* @__PURE__ */ e("div", { className: "loric-spacer" }),
114
114
  i.image ? /* @__PURE__ */ e("img", { src: i.image, alt: i.name, className: "jinx-icon loric" }) : /* @__PURE__ */ e("div", { className: "jinx-icon-placeholder", children: i.name.charAt(0) }),
@@ -121,469 +121,7 @@ function C({ item: i }) {
121
121
  function b(i) {
122
122
  return i.wiki_image ? i.wiki_image : i.image ? typeof i.image == "string" ? i.image : i.image[0] : null;
123
123
  }
124
- function z({
125
- title: i,
126
- author: t,
127
- characters: a,
128
- color: r = "#4a5568",
129
- jinxes: n = [],
130
- showSwirls: s = !0,
131
- includeMargins: c = !1,
132
- solidTitle: h = !1,
133
- iconScale: o = 1.6,
134
- appearance: l = "normal",
135
- fabledOrLoric: d = []
136
- }) {
137
- const g = [
138
- {
139
- key: "townsfolk",
140
- title: "Townsfolk",
141
- chars: a.townsfolk,
142
- color: f.townsfolk
143
- },
144
- {
145
- key: "outsider",
146
- title: "Outsiders",
147
- chars: a.outsider,
148
- color: f.outsider
149
- },
150
- {
151
- key: "minion",
152
- title: "Minions",
153
- chars: a.minion,
154
- color: f.minion
155
- },
156
- {
157
- key: "demon",
158
- title: "Demons",
159
- chars: a.demon,
160
- color: f.demon
161
- }
162
- ].filter((u) => u.chars.length > 0), y = w(r), J = L(y, 20), D = ["character-sheet", l !== "normal" ? `appearance-${l}` : ""].filter(Boolean).join(" ");
163
- return /* @__PURE__ */ e(
164
- "div",
165
- {
166
- className: D,
167
- id: "character-sheet",
168
- style: {
169
- "--header-gradient": J,
170
- transform: c ? "scale(0.952)" : void 0
171
- },
172
- children: [
173
- /* @__PURE__ */ e(
174
- "img",
175
- {
176
- className: "character-sheet-background",
177
- src: "/images/parchment_texture_a4_lightened.jpg"
178
- }
179
- ),
180
- /* @__PURE__ */ e(_, { color: r }),
181
- /* @__PURE__ */ e("div", { className: "sheet-content", children: [
182
- /* @__PURE__ */ e(
183
- R,
184
- {
185
- showSwirls: s,
186
- title: i,
187
- author: t,
188
- solidHeader: h
189
- }
190
- ),
191
- /* @__PURE__ */ e("div", { className: "characters-grid", children: [
192
- g.map((u, T) => /* @__PURE__ */ e(m, { children: [
193
- /* @__PURE__ */ e(
194
- H,
195
- {
196
- title: u.title.toUpperCase(),
197
- characters: u.chars,
198
- charNameColor: u.color,
199
- iconScale: o
200
- },
201
- u.key
202
- ),
203
- T < g.length - 1 && /* @__PURE__ */ e("img", { src: "/images/divider.png", className: "section-divider" })
204
- ] })),
205
- (n.length > 0 || d.length > 0) && /* @__PURE__ */ e(m, { children: [
206
- /* @__PURE__ */ e("img", { src: "/images/divider.png", className: "section-divider" }),
207
- /* @__PURE__ */ e(
208
- E,
209
- {
210
- fabledAndLoric: d,
211
- jinxes: n,
212
- allCharacters: [
213
- ...a.townsfolk,
214
- ...a.outsider,
215
- ...a.minion,
216
- ...a.demon
217
- ]
218
- }
219
- )
220
- ] })
221
- ] }),
222
- /* @__PURE__ */ e("div", { className: "sheet-footer", children: [
223
- /* @__PURE__ */ e("span", { className: "asterisk", children: "*" }),
224
- "Not the first night"
225
- ] })
226
- ] }),
227
- /* @__PURE__ */ e("div", { className: "author-credit", children: [
228
- /* @__PURE__ */ e("p", { children: "© Steven Medway bloodontheclocktower.com" }),
229
- /* @__PURE__ */ e("p", { children: "Script template by John Forster ravenswoodstudio.xyz" })
230
- ] })
231
- ]
232
- }
233
- );
234
- }
235
- function R({
236
- showSwirls: i,
237
- title: t,
238
- author: a,
239
- solidHeader: r = !1
240
- }) {
241
- return /* @__PURE__ */ e(m, { children: [
242
- /* @__PURE__ */ e("h1", { className: "sheet-header", children: [
243
- i && /* @__PURE__ */ e(
244
- "img",
245
- {
246
- src: "/images/black-swirl-divider.png",
247
- className: "swirl-divider"
248
- }
249
- ),
250
- /* @__PURE__ */ e(
251
- "span",
252
- {
253
- style: {
254
- mixBlendMode: r ? "normal" : "multiply"
255
- },
256
- children: t
257
- }
258
- ),
259
- i && /* @__PURE__ */ e(
260
- "img",
261
- {
262
- src: "/images/black-swirl-divider.png",
263
- className: "swirl-divider flip"
264
- }
265
- )
266
- ] }),
267
- a && /* @__PURE__ */ e("h2", { className: "sheet-author", children: [
268
- "by ",
269
- a
270
- ] })
271
- ] });
272
- }
273
- function _({ color: i }) {
274
- const t = I(i, 180);
275
- return /* @__PURE__ */ e("div", { className: "sidebar-container", children: [
276
- /* @__PURE__ */ e("div", { className: "sidebar-background" }),
277
- /* @__PURE__ */ e(
278
- "div",
279
- {
280
- className: "sidebar-overlay",
281
- style: { background: t }
282
- }
283
- )
284
- ] });
285
- }
286
- function H({
287
- title: i,
288
- characters: t,
289
- charNameColor: a,
290
- iconScale: r
291
- }) {
292
- const n = t.length > 8 ? "space-between" : "flex-start";
293
- return /* @__PURE__ */ e("div", { className: "character-section", children: [
294
- /* @__PURE__ */ e("h2", { className: "section-title", children: i }),
295
- /* @__PURE__ */ e("div", { className: "character-list", children: [
296
- /* @__PURE__ */ e("div", { className: "character-column", children: t.slice(0, Math.ceil(t.length / 2)).map((s) => /* @__PURE__ */ e(
297
- k,
298
- {
299
- character: s,
300
- color: a,
301
- iconScale: r
302
- },
303
- s.id
304
- )) }),
305
- /* @__PURE__ */ e("div", { className: "character-column", style: { justifyContent: n }, children: t.slice(Math.ceil(t.length / 2), t.length).map((s) => /* @__PURE__ */ e(
306
- k,
307
- {
308
- character: s,
309
- color: a,
310
- iconScale: r
311
- },
312
- s.id
313
- )) })
314
- ] })
315
- ] });
316
- }
317
- function k({ character: i, color: t, iconScale: a }) {
318
- const r = () => i.wiki_image ? i.wiki_image : i.image ? typeof i.image == "string" ? i.image : i.image[0] : null, n = (c) => {
319
- const h = c.match(/^(.*?)(\[.*?\])$/);
320
- if (h) {
321
- const [, o, l] = h;
322
- return /* @__PURE__ */ e(m, { children: [
323
- o,
324
- /* @__PURE__ */ e("strong", { className: "setup-ability", children: l })
325
- ] });
326
- }
327
- return c;
328
- }, s = r();
329
- return /* @__PURE__ */ e("div", { className: "character-card", children: [
330
- /* @__PURE__ */ e("div", { className: "character-icon-wrapper", children: s ? /* @__PURE__ */ e(
331
- "img",
332
- {
333
- src: s,
334
- alt: i.name,
335
- className: "character-icon",
336
- style: { scale: a.toString() }
337
- }
338
- ) : /* @__PURE__ */ e(
339
- "div",
340
- {
341
- className: "character-icon-placeholder",
342
- style: { color: t, scale: a.toString() },
343
- children: i.name.charAt(0)
344
- }
345
- ) }),
346
- /* @__PURE__ */ e("div", { className: "character-info", children: [
347
- /* @__PURE__ */ e("h3", { className: "character-name", style: { color: t }, children: i.name }),
348
- /* @__PURE__ */ e("p", { className: "character-ability", children: n(i.ability) })
349
- ] })
350
- ] });
351
- }
352
- const S = /* @__PURE__ */ new Set([
353
- "the",
354
- "of",
355
- "in",
356
- "a",
357
- "an",
358
- "and",
359
- "or",
360
- "but",
361
- "for",
362
- "to",
363
- "at",
364
- "by",
365
- "on",
366
- "with",
367
- "from",
368
- "into",
369
- "upon",
370
- "after",
371
- "before"
372
- ]), x = (i, t) => S.has(i) || t === 0 && S.has(i.toLowerCase()), G = (i) => i.split(/\s+/).reduce((t, a, r, n) => {
373
- const s = x(a, r), c = r > 0 && x(n[r - 1], r - 1);
374
- if (r === 0 || s !== c) {
375
- const o = [];
376
- for (let d = r; d < n.length && x(n[d], d) === s; d++)
377
- o.push(n[d]);
378
- const l = t.length > 0;
379
- t.push(
380
- /* @__PURE__ */ e(
381
- "span",
382
- {
383
- className: s ? "minor-word" : void 0,
384
- children: [
385
- l && " ",
386
- o.join(" ")
387
- ]
388
- },
389
- r
390
- )
391
- );
392
- }
393
- return t;
394
- }, []);
395
- function v(i) {
396
- return typeof i == "string" ? i === "dawn" ? "/images/dawn-icon.png" : i === "dusk" ? "/images/dusk-icon.png" : i === "minioninfo" ? "/images/minioninfo.png" : "/images/demoninfo.png" : typeof i.image == "string" ? i.image : Array.isArray(i.image) && i.image.length ? i.image[0] : i.wiki_image;
397
- }
398
- const B = (i) => {
399
- const t = i.nightOrders.first, a = i.nightOrders.other;
400
- return /* @__PURE__ */ e("div", { class: "night-orders-container", children: [
401
- /* @__PURE__ */ e("div", { class: "night-order", children: [
402
- /* @__PURE__ */ e("p", { children: "First Night:" }),
403
- /* @__PURE__ */ e("div", { class: "icon-row", children: t.map((r) => /* @__PURE__ */ e("img", { src: v(r), class: "icon" })) })
404
- ] }),
405
- /* @__PURE__ */ e("div", { class: "night-order", children: [
406
- /* @__PURE__ */ e("p", { children: "Other Nights:" }),
407
- /* @__PURE__ */ e("div", { class: "icon-row", children: a.map((r) => /* @__PURE__ */ e("img", { src: v(r), class: "icon" })) })
408
- ] })
409
- ] });
410
- }, V = {
411
- 5: [3, 0, 1, 1],
412
- 6: [3, 1, 1, 1],
413
- 7: [5, 0, 1, 1],
414
- 8: [5, 1, 1, 1],
415
- 9: [5, 2, 1, 1],
416
- 10: [7, 0, 2, 1],
417
- 11: [7, 1, 2, 1],
418
- 12: [7, 2, 2, 1],
419
- 13: [9, 0, 3, 1],
420
- 14: [9, 1, 3, 1],
421
- "15+": [9, 2, 3, 1]
422
- }, $ = () => /* @__PURE__ */ e(m, { children: /* @__PURE__ */ e("div", { className: "player-count-container", children: [
423
- /* @__PURE__ */ e("div", { className: "count-column titles", children: [
424
- /* @__PURE__ */ e("div", { className: "row-title", children: "Players" }),
425
- /* @__PURE__ */ e("div", { className: "row-title good-count", children: "Townsfolk" }),
426
- /* @__PURE__ */ e("div", { className: "row-title good-count", children: "Outsiders" }),
427
- /* @__PURE__ */ e("div", { className: "row-title evil-count", children: "Minions" }),
428
- /* @__PURE__ */ e("div", { className: "row-title evil-count", children: "Demons" })
429
- ] }),
430
- Object.entries(V).map(([i, t]) => /* @__PURE__ */ e("div", { className: "count-column", children: [
431
- /* @__PURE__ */ e("div", { className: "player-count", children: i }),
432
- /* @__PURE__ */ e("div", { className: "good-count", children: t[0] }),
433
- /* @__PURE__ */ e("div", { className: "good-count", children: t[1] }),
434
- /* @__PURE__ */ e("div", { className: "evil-count", children: t[2] }),
435
- /* @__PURE__ */ e("div", { className: "evil-count", children: t[3] })
436
- ] }))
437
- ] }) }), F = ({
438
- title: i,
439
- color: t,
440
- includeMargins: a,
441
- formatMinorWords: r = !1,
442
- displayNightOrder: n = !1,
443
- nightOrders: s = { first: [], other: [] },
444
- displayPlayerCounts: c = !0
445
- }) => {
446
- const h = () => {
447
- const l = i.split("&");
448
- return l.map((d, g) => /* @__PURE__ */ e(m, { children: [
449
- r ? G(d) : d,
450
- g < l.length - 1 && /* @__PURE__ */ e("span", { className: "ampersand", children: "&" })
451
- ] }));
452
- }, o = I(t, 180);
453
- return /* @__PURE__ */ e(
454
- "div",
455
- {
456
- className: "sheet-backing",
457
- style: {
458
- transform: a ? "scale(0.952)" : void 0
459
- },
460
- children: [
461
- /* @__PURE__ */ e("div", { className: "sheet-background", children: /* @__PURE__ */ e("div", { className: "title-container", children: /* @__PURE__ */ e("h1", { children: h() }) }) }),
462
- /* @__PURE__ */ e(
463
- "div",
464
- {
465
- className: "sheet-back-overlay",
466
- style: { background: o }
467
- }
468
- ),
469
- /* @__PURE__ */ e("div", { className: "back-info-container", children: [
470
- c && /* @__PURE__ */ e($, {}),
471
- n && /* @__PURE__ */ e(B, { nightOrders: s })
472
- ] })
473
- ]
474
- }
475
- );
476
- }, U = (i) => /* @__PURE__ */ e(m, { children: [
477
- /* @__PURE__ */ e(M, { ...i, children: [
478
- /* @__PURE__ */ e("div", { className: "night-sheet-heading", children: [
479
- /* @__PURE__ */ e("h3", { className: "night-title", children: "First Night" }),
480
- /* @__PURE__ */ e("h3", { className: "script-title", children: i.title })
481
- ] }),
482
- /* @__PURE__ */ e("div", { className: "night-sheet-order", children: i.firstNightOrder.map((t) => /* @__PURE__ */ e(N, { entry: t, night: "first" })) })
483
- ] }),
484
- /* @__PURE__ */ e(M, { ...i, children: [
485
- /* @__PURE__ */ e("div", { className: "night-sheet-heading", children: [
486
- /* @__PURE__ */ e("h3", { className: "night-title", children: "Other Nights" }),
487
- /* @__PURE__ */ e("h3", { className: "script-title", children: i.title })
488
- ] }),
489
- /* @__PURE__ */ e("div", { className: "night-sheet-order", children: i.otherNightOrder.map((t) => /* @__PURE__ */ e(N, { entry: t, night: "other" })) })
490
- ] })
491
- ] }), M = (i) => {
492
- const t = w(i.color), a = L(t, 20), r = I(i.color, 180);
493
- return /* @__PURE__ */ e(m, { children: /* @__PURE__ */ e(
494
- "div",
495
- {
496
- className: "night-sheet",
497
- style: {
498
- transform: i.includeMargins ? "scale(0.952)" : void 0,
499
- "--header-gradient": a
500
- },
501
- children: [
502
- /* @__PURE__ */ e(
503
- "img",
504
- {
505
- className: "character-sheet-background",
506
- src: "/images/parchment_texture_a4_lightened.jpg"
507
- }
508
- ),
509
- /* @__PURE__ */ e("div", { className: "sheet-content", children: i.children }),
510
- /* @__PURE__ */ e("div", { className: "spacer" }),
511
- /* @__PURE__ */ e("div", { className: "info-footer-container", children: [
512
- /* @__PURE__ */ e("div", { className: "info-author-credit", children: [
513
- /* @__PURE__ */ e("p", { children: "© Steven Medway bloodontheclocktower.com" }),
514
- /* @__PURE__ */ e("p", { children: "Script template by John Forster ravenswoodstudio.xyz" })
515
- ] }),
516
- /* @__PURE__ */ e("div", { className: "info-footer-background" }),
517
- /* @__PURE__ */ e(
518
- "div",
519
- {
520
- className: "info-footer-overlay",
521
- style: { background: r }
522
- }
523
- )
524
- ] })
525
- ]
526
- }
527
- ) });
528
- }, Y = () => /* @__PURE__ */ e("img", { className: "reminder-icon", src: "/images/reminder.png" }), N = (i) => {
529
- const t = v(i.entry), { reminderText: a, name: r } = Z(i.entry, i.night), n = typeof i.entry == "string" ? "#222" : f[i.entry.team];
530
- if (!a)
531
- return console.warn("No reminder text found for:", i.entry), /* @__PURE__ */ e(m, {});
532
- const s = (h) => h.split(":reminder:").map((o, l) => l % 2 === 0 ? o : /* @__PURE__ */ e(Y, {}));
533
- return /* @__PURE__ */ e("div", { className: "night-sheet-entry", children: [
534
- /* @__PURE__ */ e("img", { src: t }),
535
- /* @__PURE__ */ e("div", { className: "night-sheet-entry-text", children: [
536
- /* @__PURE__ */ e("p", { className: "reminder-name", style: { color: n }, children: r }),
537
- /* @__PURE__ */ e("p", { className: "reminder-text", children: ((h) => {
538
- const o = h.split("*").map((l, d) => d % 2 === 0 ? l : /* @__PURE__ */ e("strong", { children: l })).map((l) => typeof l == "string" ? s(l) : l);
539
- return /* @__PURE__ */ e(m, { children: o });
540
- })(a) })
541
- ] })
542
- ] });
543
- }, Z = (i, t) => {
544
- if (typeof i == "object") {
545
- const a = t === "first" ? i.firstNightReminder : i.otherNightReminder, r = i.name;
546
- return { reminderText: a, name: r };
547
- } else {
548
- const a = K[i], r = t === "first" ? a.first : a.other ?? "", n = a.name;
549
- return { reminderText: r, name: n };
550
- }
551
- }, K = {
552
- dusk: {
553
- first: "Start the Night Phase.",
554
- name: "Dusk",
555
- other: "Start the Night Phase."
556
- },
557
- dawn: {
558
- first: "Wait for a few seconds. End the Night Phase.",
559
- name: "Dawn",
560
- other: "Wait for a few seconds. End the Night Phase."
561
- },
562
- demoninfo: {
563
- first: "If there are 7 or more players, wake the Demon: Show the *THESE ARE YOUR MINIONS* token. Point to all Minions. Show the *THESE CHARACTERS ARE NOT IN PLAY* token. Show 3 not-in-play good character tokens.",
564
- name: "Demon Info"
565
- },
566
- minioninfo: {
567
- first: "If there are 7 or more players, wake all Minions: Show the *THIS IS THE DEMON* token. Point to the Demon. Show the *THESE ARE YOUR MINIONS* token. Point to the other Minions.",
568
- name: "Minion Info"
569
- }
570
- };
571
- function q(i) {
572
- const t = i.filter((n) => n.team === "fabled");
573
- return [
574
- ...i.filter((n) => n.team === "loric").map((n) => ({
575
- name: n.name,
576
- note: n.ability,
577
- image: n.wiki_image ?? (Array.isArray(n.image) ? n.image[0] : n.image)
578
- })),
579
- ...t.map((n) => ({
580
- name: n.name,
581
- note: n.ability,
582
- image: n.wiki_image ?? (Array.isArray(n.image) ? n.image[0] : n.image)
583
- }))
584
- ];
585
- }
586
- const X = [
124
+ const H = [
587
125
  {
588
126
  characters: [
589
127
  "alchemist",
@@ -1555,7 +1093,7 @@ const X = [
1555
1093
  oldJinx: "If the Exorcist chooses the Yaggababble, the Yaggababble ability does not kill tonight."
1556
1094
  }
1557
1095
  ];
1558
- function Q(i) {
1096
+ function G(i) {
1559
1097
  const t = {
1560
1098
  townsfolk: [],
1561
1099
  outsider: [],
@@ -1573,11 +1111,11 @@ function Q(i) {
1573
1111
  }
1574
1112
  return t;
1575
1113
  }
1576
- function ee(i, t = !1) {
1114
+ function B(i, t = !1) {
1577
1115
  const a = new Set(i.map((n) => n.id.toLowerCase())), r = [];
1578
- for (const n of X) {
1579
- const [s, c] = n.characters;
1580
- a.has(s) && a.has(c) && (t && n.oldJinx ? r.push({
1116
+ for (const n of H) {
1117
+ const [h, l] = n.characters;
1118
+ a.has(h) && a.has(l) && (t && n.oldJinx ? r.push({
1581
1119
  characters: n.characters,
1582
1120
  jinx: n.oldJinx
1583
1121
  }) : r.push({
@@ -1586,41 +1124,557 @@ function ee(i, t = !1) {
1586
1124
  }));
1587
1125
  }
1588
1126
  for (const n of i) {
1589
- const s = typeof n == "object" && n !== null, c = "jinxes" in n;
1590
- if (!s || !c) continue;
1127
+ const h = typeof n == "object" && n !== null, l = "jinxes" in n;
1128
+ if (!h || !l) continue;
1591
1129
  console.log("char.jinxes:", n.jinxes);
1592
- const h = n, o = h.id.toLowerCase();
1593
- if (a.has(o) && h.jinxes)
1594
- for (const l of h.jinxes) {
1595
- const d = l.id.toLowerCase();
1130
+ const s = n, o = s.id.toLowerCase();
1131
+ if (a.has(o) && s.jinxes)
1132
+ for (const c of s.jinxes) {
1133
+ const d = c.id.toLowerCase();
1596
1134
  if (console.log(`${n.id} is jinxed with ${d}`), a.has(d) || (console.log("characterIds doesnt contain charId", d), console.log("characterIds:", a)), a.has(d)) {
1597
- const g = r.some(
1598
- (y) => y.characters[0] === o && y.characters[1] === d || y.characters[0] === d && y.characters[1] === o
1135
+ const y = r.some(
1136
+ (g) => g.characters[0] === o && g.characters[1] === d || g.characters[0] === d && g.characters[1] === o
1599
1137
  );
1600
- console.log("Jinx already exists:", g), g || r.push({
1138
+ console.log("Jinx already exists:", y), y || r.push({
1601
1139
  characters: [o, d],
1602
- jinx: l.reason
1140
+ jinx: c.reason
1603
1141
  });
1604
1142
  }
1605
1143
  }
1606
1144
  }
1607
1145
  return r;
1608
1146
  }
1609
- function ae({ script: i, options: t, nightOrders: a }) {
1147
+ const k = (i) => i.wiki_image ? i.wiki_image : i.image ? typeof i.image == "string" ? i.image : i.image[0] : null;
1148
+ function S(i, t, a) {
1149
+ const r = [];
1150
+ return t.forEach((n) => {
1151
+ n.characters[0] === i.id ? r.push(n.characters[1]) : n.characters[1] === i.id && r.push(n.characters[0]);
1152
+ }), a.filter(
1153
+ (n) => r.includes(n.id)
1154
+ );
1155
+ }
1156
+ function $({
1157
+ title: i,
1158
+ author: t,
1159
+ characters: a,
1160
+ color: r = "#4a5568",
1161
+ jinxes: n = [],
1162
+ showSwirls: h = !0,
1163
+ includeMargins: l = !1,
1164
+ solidTitle: s = !1,
1165
+ iconScale: o = 1.6,
1166
+ appearance: c = "normal",
1167
+ fabledOrLoric: d = [],
1168
+ inlineJinxIcons: y = !1
1169
+ }) {
1170
+ const g = [
1171
+ {
1172
+ key: "townsfolk",
1173
+ title: "Townsfolk",
1174
+ chars: a.townsfolk,
1175
+ color: f.townsfolk
1176
+ },
1177
+ {
1178
+ key: "outsider",
1179
+ title: "Outsiders",
1180
+ chars: a.outsider,
1181
+ color: f.outsider
1182
+ },
1183
+ {
1184
+ key: "minion",
1185
+ title: "Minions",
1186
+ chars: a.minion,
1187
+ color: f.minion
1188
+ },
1189
+ {
1190
+ key: "demon",
1191
+ title: "Demons",
1192
+ chars: a.demon,
1193
+ color: f.demon
1194
+ }
1195
+ ].filter((u) => u.chars.length > 0), T = w(r), A = D(T, 20), P = ["character-sheet", c !== "normal" ? `appearance-${c}` : ""].filter(Boolean).join(" ");
1196
+ return /* @__PURE__ */ e(
1197
+ "div",
1198
+ {
1199
+ className: P,
1200
+ id: "character-sheet",
1201
+ style: {
1202
+ "--header-gradient": A,
1203
+ transform: l ? "scale(0.952)" : void 0
1204
+ },
1205
+ children: [
1206
+ /* @__PURE__ */ e(
1207
+ "img",
1208
+ {
1209
+ className: "character-sheet-background",
1210
+ src: "/images/parchment_texture_a4_lightened.jpg"
1211
+ }
1212
+ ),
1213
+ /* @__PURE__ */ e(F, { color: r }),
1214
+ /* @__PURE__ */ e("div", { className: "sheet-content", children: [
1215
+ /* @__PURE__ */ e(
1216
+ V,
1217
+ {
1218
+ showSwirls: h,
1219
+ title: i,
1220
+ author: t,
1221
+ solidHeader: s
1222
+ }
1223
+ ),
1224
+ /* @__PURE__ */ e("div", { className: "characters-grid", children: [
1225
+ g.map((u, W) => /* @__PURE__ */ e(m, { children: [
1226
+ /* @__PURE__ */ e(
1227
+ U,
1228
+ {
1229
+ title: u.title.toUpperCase(),
1230
+ characters: u.chars,
1231
+ charNameColor: u.color,
1232
+ iconScale: o,
1233
+ jinxes: n,
1234
+ allCharacters: [
1235
+ ...a.townsfolk,
1236
+ ...a.outsider,
1237
+ ...a.minion,
1238
+ ...a.demon
1239
+ ],
1240
+ inlineJinxIcons: y
1241
+ },
1242
+ u.key
1243
+ ),
1244
+ W < g.length - 1 && /* @__PURE__ */ e("img", { src: "/images/divider.png", className: "section-divider" })
1245
+ ] })),
1246
+ (n.length > 0 || d.length > 0) && /* @__PURE__ */ e(m, { children: [
1247
+ /* @__PURE__ */ e("img", { src: "/images/divider.png", className: "section-divider" }),
1248
+ /* @__PURE__ */ e(
1249
+ R,
1250
+ {
1251
+ fabledAndLoric: d,
1252
+ jinxes: n,
1253
+ allCharacters: [
1254
+ ...a.townsfolk,
1255
+ ...a.outsider,
1256
+ ...a.minion,
1257
+ ...a.demon
1258
+ ]
1259
+ }
1260
+ )
1261
+ ] })
1262
+ ] }),
1263
+ /* @__PURE__ */ e("div", { className: "sheet-footer", children: [
1264
+ /* @__PURE__ */ e("span", { className: "asterisk", children: "*" }),
1265
+ "Not the first night"
1266
+ ] })
1267
+ ] }),
1268
+ /* @__PURE__ */ e("div", { className: "author-credit", children: [
1269
+ /* @__PURE__ */ e("p", { children: "© Steven Medway bloodontheclocktower.com" }),
1270
+ /* @__PURE__ */ e("p", { children: "Script template by John Forster ravenswoodstudio.xyz" })
1271
+ ] })
1272
+ ]
1273
+ }
1274
+ );
1275
+ }
1276
+ function V({
1277
+ showSwirls: i,
1278
+ title: t,
1279
+ author: a,
1280
+ solidHeader: r = !1
1281
+ }) {
1282
+ return /* @__PURE__ */ e(m, { children: [
1283
+ /* @__PURE__ */ e("h1", { className: "sheet-header", children: [
1284
+ i && /* @__PURE__ */ e(
1285
+ "img",
1286
+ {
1287
+ src: "/images/black-swirl-divider.png",
1288
+ className: "swirl-divider"
1289
+ }
1290
+ ),
1291
+ /* @__PURE__ */ e(
1292
+ "span",
1293
+ {
1294
+ style: {
1295
+ mixBlendMode: r ? "normal" : "multiply"
1296
+ },
1297
+ children: t
1298
+ }
1299
+ ),
1300
+ i && /* @__PURE__ */ e(
1301
+ "img",
1302
+ {
1303
+ src: "/images/black-swirl-divider.png",
1304
+ className: "swirl-divider flip"
1305
+ }
1306
+ )
1307
+ ] }),
1308
+ a && /* @__PURE__ */ e("h2", { className: "sheet-author", children: [
1309
+ "by ",
1310
+ a
1311
+ ] })
1312
+ ] });
1313
+ }
1314
+ function F({ color: i }) {
1315
+ const t = I(i, 180);
1316
+ return /* @__PURE__ */ e("div", { className: "sidebar-container", children: [
1317
+ /* @__PURE__ */ e("div", { className: "sidebar-background" }),
1318
+ /* @__PURE__ */ e(
1319
+ "div",
1320
+ {
1321
+ className: "sidebar-overlay",
1322
+ style: { background: t }
1323
+ }
1324
+ )
1325
+ ] });
1326
+ }
1327
+ function U({
1328
+ title: i,
1329
+ characters: t,
1330
+ charNameColor: a,
1331
+ iconScale: r,
1332
+ jinxes: n,
1333
+ allCharacters: h,
1334
+ inlineJinxIcons: l
1335
+ }) {
1336
+ const s = t.length > 8 ? "space-between" : t.length % 2 === 0 ? "space-around" : "flex-start";
1337
+ return /* @__PURE__ */ e("div", { className: "character-section", children: [
1338
+ /* @__PURE__ */ e("h2", { className: "section-title", children: i }),
1339
+ /* @__PURE__ */ e("div", { className: "character-list", children: [
1340
+ /* @__PURE__ */ e("div", { className: "character-column", style: { justifyContent: s }, children: t.slice(0, Math.ceil(t.length / 2)).map((o) => /* @__PURE__ */ e(
1341
+ N,
1342
+ {
1343
+ character: o,
1344
+ color: a,
1345
+ iconScale: r,
1346
+ jinxedCharacters: S(o, n, h),
1347
+ inlineJinxIcons: l
1348
+ },
1349
+ o.id
1350
+ )) }),
1351
+ /* @__PURE__ */ e("div", { className: "character-column", style: { justifyContent: s }, children: t.slice(Math.ceil(t.length / 2), t.length).map((o) => /* @__PURE__ */ e(
1352
+ N,
1353
+ {
1354
+ character: o,
1355
+ color: a,
1356
+ iconScale: r,
1357
+ jinxedCharacters: S(o, n, h),
1358
+ inlineJinxIcons: l
1359
+ },
1360
+ o.id
1361
+ )) })
1362
+ ] })
1363
+ ] });
1364
+ }
1365
+ function N({
1366
+ character: i,
1367
+ color: t,
1368
+ iconScale: a,
1369
+ jinxedCharacters: r,
1370
+ inlineJinxIcons: n
1371
+ }) {
1372
+ const h = (s) => {
1373
+ const o = s.match(/^(.*?)(\[.*?\])$/);
1374
+ if (o) {
1375
+ const [, c, d] = o;
1376
+ return /* @__PURE__ */ e(m, { children: [
1377
+ c,
1378
+ /* @__PURE__ */ e("strong", { className: "setup-ability", children: d })
1379
+ ] });
1380
+ }
1381
+ return s;
1382
+ }, l = k(i);
1383
+ return /* @__PURE__ */ e("div", { className: "character-card", children: [
1384
+ /* @__PURE__ */ e("div", { className: "character-icon-wrapper", children: l ? /* @__PURE__ */ e(
1385
+ "img",
1386
+ {
1387
+ src: l,
1388
+ alt: i.name,
1389
+ className: "character-icon",
1390
+ style: { scale: a.toString() }
1391
+ }
1392
+ ) : /* @__PURE__ */ e(
1393
+ "div",
1394
+ {
1395
+ className: "character-icon-placeholder",
1396
+ style: { color: t, scale: a.toString() },
1397
+ children: i.name.charAt(0)
1398
+ }
1399
+ ) }),
1400
+ /* @__PURE__ */ e("div", { className: "character-info", children: [
1401
+ /* @__PURE__ */ e("h3", { className: "character-name", style: { color: t }, children: [
1402
+ i.name,
1403
+ n && r.length > 0 && /* @__PURE__ */ e("span", { className: "inline-jinx-icons", children: r.map((s) => {
1404
+ const o = k(s);
1405
+ return o ? /* @__PURE__ */ e(
1406
+ "img",
1407
+ {
1408
+ src: o,
1409
+ alt: s.name,
1410
+ className: "inline-jinx-icon",
1411
+ title: `Jinxed with ${s.name}`
1412
+ },
1413
+ s.id
1414
+ ) : /* @__PURE__ */ e(
1415
+ "span",
1416
+ {
1417
+ className: "inline-jinx-icon-placeholder",
1418
+ title: `Jinxed with ${s.name}`,
1419
+ children: s.name.charAt(0)
1420
+ },
1421
+ s.id
1422
+ );
1423
+ }) })
1424
+ ] }),
1425
+ /* @__PURE__ */ e("p", { className: "character-ability", children: h(i.ability) })
1426
+ ] })
1427
+ ] });
1428
+ }
1429
+ const M = /* @__PURE__ */ new Set([
1430
+ "the",
1431
+ "of",
1432
+ "in",
1433
+ "a",
1434
+ "an",
1435
+ "and",
1436
+ "or",
1437
+ "but",
1438
+ "for",
1439
+ "to",
1440
+ "at",
1441
+ "by",
1442
+ "on",
1443
+ "with",
1444
+ "from",
1445
+ "into",
1446
+ "upon",
1447
+ "after",
1448
+ "before"
1449
+ ]), x = (i, t) => M.has(i) || t === 0 && M.has(i.toLowerCase()), Y = (i) => i.split(/\s+/).reduce((t, a, r, n) => {
1450
+ const h = x(a, r), l = r > 0 && x(n[r - 1], r - 1);
1451
+ if (r === 0 || h !== l) {
1452
+ const o = [];
1453
+ for (let d = r; d < n.length && x(n[d], d) === h; d++)
1454
+ o.push(n[d]);
1455
+ const c = t.length > 0;
1456
+ t.push(
1457
+ /* @__PURE__ */ e(
1458
+ "span",
1459
+ {
1460
+ className: h ? "minor-word" : void 0,
1461
+ children: [
1462
+ c && " ",
1463
+ o.join(" ")
1464
+ ]
1465
+ },
1466
+ r
1467
+ )
1468
+ );
1469
+ }
1470
+ return t;
1471
+ }, []);
1472
+ function v(i) {
1473
+ return typeof i == "string" ? i === "dawn" ? "/images/dawn-icon.png" : i === "dusk" ? "/images/dusk-icon.png" : i === "minioninfo" ? "/images/minioninfo.png" : "/images/demoninfo.png" : typeof i.image == "string" ? i.image : Array.isArray(i.image) && i.image.length ? i.image[0] : i.wiki_image;
1474
+ }
1475
+ const Z = (i) => {
1476
+ const t = i.nightOrders.first, a = i.nightOrders.other;
1477
+ return /* @__PURE__ */ e("div", { class: "night-orders-container", children: [
1478
+ /* @__PURE__ */ e("div", { class: "night-order", children: [
1479
+ /* @__PURE__ */ e("p", { children: "First Night:" }),
1480
+ /* @__PURE__ */ e("div", { class: "icon-row", children: t.map((r) => /* @__PURE__ */ e("img", { src: v(r), class: "icon" })) })
1481
+ ] }),
1482
+ /* @__PURE__ */ e("div", { class: "night-order", children: [
1483
+ /* @__PURE__ */ e("p", { children: "Other Nights:" }),
1484
+ /* @__PURE__ */ e("div", { class: "icon-row", children: a.map((r) => /* @__PURE__ */ e("img", { src: v(r), class: "icon" })) })
1485
+ ] })
1486
+ ] });
1487
+ }, K = {
1488
+ 5: [3, 0, 1, 1],
1489
+ 6: [3, 1, 1, 1],
1490
+ 7: [5, 0, 1, 1],
1491
+ 8: [5, 1, 1, 1],
1492
+ 9: [5, 2, 1, 1],
1493
+ 10: [7, 0, 2, 1],
1494
+ 11: [7, 1, 2, 1],
1495
+ 12: [7, 2, 2, 1],
1496
+ 13: [9, 0, 3, 1],
1497
+ 14: [9, 1, 3, 1],
1498
+ "15+": [9, 2, 3, 1]
1499
+ }, q = () => /* @__PURE__ */ e(m, { children: /* @__PURE__ */ e("div", { className: "player-count-container", children: [
1500
+ /* @__PURE__ */ e("div", { className: "count-column titles", children: [
1501
+ /* @__PURE__ */ e("div", { className: "row-title", children: "Players" }),
1502
+ /* @__PURE__ */ e("div", { className: "row-title good-count", children: "Townsfolk" }),
1503
+ /* @__PURE__ */ e("div", { className: "row-title good-count", children: "Outsiders" }),
1504
+ /* @__PURE__ */ e("div", { className: "row-title evil-count", children: "Minions" }),
1505
+ /* @__PURE__ */ e("div", { className: "row-title evil-count", children: "Demons" })
1506
+ ] }),
1507
+ Object.entries(K).map(([i, t]) => /* @__PURE__ */ e("div", { className: "count-column", children: [
1508
+ /* @__PURE__ */ e("div", { className: "player-count", children: i }),
1509
+ /* @__PURE__ */ e("div", { className: "good-count", children: t[0] }),
1510
+ /* @__PURE__ */ e("div", { className: "good-count", children: t[1] }),
1511
+ /* @__PURE__ */ e("div", { className: "evil-count", children: t[2] }),
1512
+ /* @__PURE__ */ e("div", { className: "evil-count", children: t[3] })
1513
+ ] }))
1514
+ ] }) }), X = ({
1515
+ title: i,
1516
+ color: t,
1517
+ includeMargins: a,
1518
+ formatMinorWords: r = !1,
1519
+ displayNightOrder: n = !1,
1520
+ nightOrders: h = { first: [], other: [] },
1521
+ displayPlayerCounts: l = !0
1522
+ }) => {
1523
+ const s = () => {
1524
+ const c = i.split("&");
1525
+ return c.map((d, y) => /* @__PURE__ */ e(m, { children: [
1526
+ r ? Y(d) : d,
1527
+ y < c.length - 1 && /* @__PURE__ */ e("span", { className: "ampersand", children: "&" })
1528
+ ] }));
1529
+ }, o = I(t, 180);
1530
+ return /* @__PURE__ */ e(
1531
+ "div",
1532
+ {
1533
+ className: "sheet-backing",
1534
+ style: {
1535
+ transform: a ? "scale(0.952)" : void 0
1536
+ },
1537
+ children: [
1538
+ /* @__PURE__ */ e("div", { className: "sheet-background", children: /* @__PURE__ */ e("div", { className: "title-container", children: /* @__PURE__ */ e("h1", { children: s() }) }) }),
1539
+ /* @__PURE__ */ e(
1540
+ "div",
1541
+ {
1542
+ className: "sheet-back-overlay",
1543
+ style: { background: o }
1544
+ }
1545
+ ),
1546
+ /* @__PURE__ */ e("div", { className: "back-info-container", children: [
1547
+ l && /* @__PURE__ */ e(q, {}),
1548
+ n && /* @__PURE__ */ e(Z, { nightOrders: h })
1549
+ ] })
1550
+ ]
1551
+ }
1552
+ );
1553
+ }, Q = (i) => /* @__PURE__ */ e(m, { children: [
1554
+ /* @__PURE__ */ e(J, { ...i, children: [
1555
+ /* @__PURE__ */ e("div", { className: "night-sheet-heading", children: [
1556
+ /* @__PURE__ */ e("h3", { className: "night-title", children: "First Night" }),
1557
+ /* @__PURE__ */ e("h3", { className: "script-title", children: i.title })
1558
+ ] }),
1559
+ /* @__PURE__ */ e("div", { className: "night-sheet-order", children: i.firstNightOrder.map((t) => /* @__PURE__ */ e(L, { entry: t, night: "first" })) })
1560
+ ] }),
1561
+ /* @__PURE__ */ e(J, { ...i, children: [
1562
+ /* @__PURE__ */ e("div", { className: "night-sheet-heading", children: [
1563
+ /* @__PURE__ */ e("h3", { className: "night-title", children: "Other Nights" }),
1564
+ /* @__PURE__ */ e("h3", { className: "script-title", children: i.title })
1565
+ ] }),
1566
+ /* @__PURE__ */ e("div", { className: "night-sheet-order", children: i.otherNightOrder.map((t) => /* @__PURE__ */ e(L, { entry: t, night: "other" })) })
1567
+ ] })
1568
+ ] }), J = (i) => {
1569
+ const t = w(i.color), a = D(t, 20), r = I(i.color, 180);
1570
+ return /* @__PURE__ */ e(m, { children: /* @__PURE__ */ e(
1571
+ "div",
1572
+ {
1573
+ className: "night-sheet",
1574
+ style: {
1575
+ transform: i.includeMargins ? "scale(0.952)" : void 0,
1576
+ "--header-gradient": a
1577
+ },
1578
+ children: [
1579
+ /* @__PURE__ */ e(
1580
+ "img",
1581
+ {
1582
+ className: "character-sheet-background",
1583
+ src: "/images/parchment_texture_a4_lightened.jpg"
1584
+ }
1585
+ ),
1586
+ /* @__PURE__ */ e("div", { className: "sheet-content", children: i.children }),
1587
+ /* @__PURE__ */ e("div", { className: "spacer" }),
1588
+ /* @__PURE__ */ e("div", { className: "info-footer-container", children: [
1589
+ /* @__PURE__ */ e("div", { className: "info-author-credit", children: [
1590
+ /* @__PURE__ */ e("p", { children: "© Steven Medway bloodontheclocktower.com" }),
1591
+ /* @__PURE__ */ e("p", { children: "Script template by John Forster ravenswoodstudio.xyz" })
1592
+ ] }),
1593
+ /* @__PURE__ */ e("div", { className: "info-footer-background" }),
1594
+ /* @__PURE__ */ e(
1595
+ "div",
1596
+ {
1597
+ className: "info-footer-overlay",
1598
+ style: { background: r }
1599
+ }
1600
+ )
1601
+ ] })
1602
+ ]
1603
+ }
1604
+ ) });
1605
+ }, ee = () => /* @__PURE__ */ e("img", { className: "reminder-icon", src: "/images/reminder.png" }), L = (i) => {
1606
+ const t = v(i.entry), { reminderText: a, name: r } = ie(i.entry, i.night), n = typeof i.entry == "string" ? "#222" : f[i.entry.team];
1607
+ if (!a)
1608
+ return console.warn("No reminder text found for:", i.entry), /* @__PURE__ */ e(m, {});
1609
+ const h = (s) => s.split(":reminder:").map((o, c) => c % 2 === 0 ? o : /* @__PURE__ */ e(ee, {}));
1610
+ return /* @__PURE__ */ e("div", { className: "night-sheet-entry", children: [
1611
+ /* @__PURE__ */ e("img", { src: t }),
1612
+ /* @__PURE__ */ e("div", { className: "night-sheet-entry-text", children: [
1613
+ /* @__PURE__ */ e("p", { className: "reminder-name", style: { color: n }, children: r }),
1614
+ /* @__PURE__ */ e("p", { className: "reminder-text", children: ((s) => {
1615
+ const o = s.split("*").map((c, d) => d % 2 === 0 ? c : /* @__PURE__ */ e("strong", { children: c })).map((c) => typeof c == "string" ? h(c) : c);
1616
+ return /* @__PURE__ */ e(m, { children: o });
1617
+ })(a) })
1618
+ ] })
1619
+ ] });
1620
+ }, ie = (i, t) => {
1621
+ if (typeof i == "object") {
1622
+ const a = t === "first" ? i.firstNightReminder : i.otherNightReminder, r = i.name;
1623
+ return { reminderText: a, name: r };
1624
+ } else {
1625
+ const a = te[i], r = t === "first" ? a.first : a.other ?? "", n = a.name;
1626
+ return { reminderText: r, name: n };
1627
+ }
1628
+ }, te = {
1629
+ dusk: {
1630
+ first: "Start the Night Phase.",
1631
+ name: "Dusk",
1632
+ other: "Start the Night Phase."
1633
+ },
1634
+ dawn: {
1635
+ first: "Wait for a few seconds. End the Night Phase.",
1636
+ name: "Dawn",
1637
+ other: "Wait for a few seconds. End the Night Phase."
1638
+ },
1639
+ demoninfo: {
1640
+ first: "If there are 7 or more players, wake the Demon: Show the *THESE ARE YOUR MINIONS* token. Point to all Minions. Show the *THESE CHARACTERS ARE NOT IN PLAY* token. Show 3 not-in-play good character tokens.",
1641
+ name: "Demon Info"
1642
+ },
1643
+ minioninfo: {
1644
+ first: "If there are 7 or more players, wake all Minions: Show the *THIS IS THE DEMON* token. Point to the Demon. Show the *THESE ARE YOUR MINIONS* token. Point to the other Minions.",
1645
+ name: "Minion Info"
1646
+ }
1647
+ };
1648
+ function ae(i) {
1649
+ const t = i.filter((n) => n.team === "fabled");
1650
+ return [
1651
+ ...i.filter((n) => n.team === "loric").map((n) => ({
1652
+ name: n.name,
1653
+ note: n.ability,
1654
+ image: n.wiki_image ?? (Array.isArray(n.image) ? n.image[0] : n.image)
1655
+ })),
1656
+ ...t.map((n) => ({
1657
+ name: n.name,
1658
+ note: n.ability,
1659
+ image: n.wiki_image ?? (Array.isArray(n.image) ? n.image[0] : n.image)
1660
+ }))
1661
+ ];
1662
+ }
1663
+ function oe({ script: i, options: t, nightOrders: a }) {
1610
1664
  var r;
1611
1665
  return /* @__PURE__ */ e("div", { className: "sheet-wrapper", children: [
1612
- Array(t.numberOfCharacterSheets).fill(!0).map((n, s) => {
1613
- var c, h, o;
1614
- return /* @__PURE__ */ e("div", { className: s === 0 ? "" : "print-only", children: [
1666
+ Array(t.numberOfCharacterSheets).fill(!0).map((n, h) => {
1667
+ var l, s, o;
1668
+ return /* @__PURE__ */ e("div", { className: h === 0 ? "" : "print-only", children: [
1615
1669
  /* @__PURE__ */ e(
1616
- z,
1670
+ $,
1617
1671
  {
1618
- title: ((c = i.metadata) == null ? void 0 : c.name) || "Custom Script",
1619
- author: t.showAuthor ? (h = i.metadata) == null ? void 0 : h.author : void 0,
1620
- characters: Q(i.characters),
1672
+ title: ((l = i.metadata) == null ? void 0 : l.name) || "Custom Script",
1673
+ author: t.showAuthor ? (s = i.metadata) == null ? void 0 : s.author : void 0,
1674
+ characters: G(i.characters),
1621
1675
  color: t.color,
1622
- jinxes: t.showJinxes ? ee(i.characters, t.useOldJinxes) : [],
1623
- fabledOrLoric: q(i.characters),
1676
+ jinxes: t.showJinxes ? B(i.characters, t.useOldJinxes) : [],
1677
+ fabledOrLoric: ae(i.characters),
1624
1678
  showSwirls: t.showSwirls,
1625
1679
  includeMargins: t.includeMargins,
1626
1680
  solidTitle: t.solidTitle,
@@ -1631,7 +1685,7 @@ function ae({ script: i, options: t, nightOrders: a }) {
1631
1685
  /* @__PURE__ */ e("div", { style: "break-after:page;" }),
1632
1686
  t.showBackingSheet && /* @__PURE__ */ e(m, { children: [
1633
1687
  /* @__PURE__ */ e(
1634
- F,
1688
+ X,
1635
1689
  {
1636
1690
  title: ((o = i.metadata) == null ? void 0 : o.name) || "Custom Script",
1637
1691
  color: t.color,
@@ -1648,7 +1702,7 @@ function ae({ script: i, options: t, nightOrders: a }) {
1648
1702
  }),
1649
1703
  t.showNightSheet && /* @__PURE__ */ e(m, { children: [
1650
1704
  /* @__PURE__ */ e(
1651
- U,
1705
+ Q,
1652
1706
  {
1653
1707
  firstNightOrder: a.first,
1654
1708
  otherNightOrder: a.other,
@@ -1662,11 +1716,11 @@ function ae({ script: i, options: t, nightOrders: a }) {
1662
1716
  ] });
1663
1717
  }
1664
1718
  export {
1665
- z as CharacterSheet,
1666
- ae as FancyDoc,
1667
- U as NightSheet,
1668
- F as SheetBack,
1669
- O as darken,
1670
- P as parseRgb,
1671
- W as rgbString
1719
+ $ as CharacterSheet,
1720
+ oe as FancyDoc,
1721
+ Q as NightSheet,
1722
+ X as SheetBack,
1723
+ z as darken,
1724
+ E as parseRgb,
1725
+ C as rgbString
1672
1726
  };
@@ -12,7 +12,8 @@ interface CharacterSheetProps {
12
12
  iconScale?: number;
13
13
  appearance?: "normal" | "compact" | "super-compact" | "mega-compact";
14
14
  fabledOrLoric?: FabledOrLoric[];
15
+ inlineJinxIcons?: boolean;
15
16
  }
16
- export declare function CharacterSheet({ title, author, characters, color, jinxes, showSwirls, includeMargins, solidTitle, iconScale, appearance, fabledOrLoric, }: CharacterSheetProps): import("preact").JSX.Element;
17
+ export declare function CharacterSheet({ title, author, characters, color, jinxes, showSwirls, includeMargins, solidTitle, iconScale, appearance, fabledOrLoric, inlineJinxIcons, }: CharacterSheetProps): import("preact").JSX.Element;
17
18
  export {};
18
19
  //# sourceMappingURL=CharacterSheet.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CharacterSheet.d.ts","sourceRoot":"","sources":["../../src/pages/CharacterSheet.tsx"],"names":[],"mappings":"AAOA,OAAO,sBAAsB,CAAC;AAC9B,OAAO,EAAE,iBAAiB,EAAE,IAAI,EAAqB,MAAM,UAAU,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAGvD,UAAU,mBAAmB;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,iBAAiB,CAAC;IAC9B,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACzB,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,UAAU,CAAC,EAAE,QAAQ,GAAG,SAAS,GAAG,eAAe,GAAG,cAAc,CAAC;IACrE,aAAa,CAAC,EAAE,aAAa,EAAE,CAAC;CACjC;AAED,wBAAgB,cAAc,CAAC,EAC7B,KAAK,EACL,MAAM,EACN,UAAU,EACV,KAAiB,EACjB,MAAW,EACX,UAAiB,EACjB,cAAsB,EACtB,UAAkB,EAClB,SAAe,EACf,UAAqB,EACrB,aAAkB,GACnB,EAAE,mBAAmB,gCAuGrB"}
1
+ {"version":3,"file":"CharacterSheet.d.ts","sourceRoot":"","sources":["../../src/pages/CharacterSheet.tsx"],"names":[],"mappings":"AAOA,OAAO,sBAAsB,CAAC;AAC9B,OAAO,EAAE,iBAAiB,EAAE,IAAI,EAAqB,MAAM,UAAU,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAIvD,UAAU,mBAAmB;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,iBAAiB,CAAC;IAC9B,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACzB,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,UAAU,CAAC,EAAE,QAAQ,GAAG,SAAS,GAAG,eAAe,GAAG,cAAc,CAAC;IACrE,aAAa,CAAC,EAAE,aAAa,EAAE,CAAC;IAChC,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,wBAAgB,cAAc,CAAC,EAC7B,KAAK,EACL,MAAM,EACN,UAAU,EACV,KAAiB,EACjB,MAAW,EACX,UAAiB,EACjB,cAAsB,EACtB,UAAkB,EAClB,SAAe,EACf,UAAqB,EACrB,aAAkB,EAClB,eAAuB,GACxB,EAAE,mBAAmB,gCA+GrB"}
package/dist/style.css CHANGED
@@ -1 +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:var(--header-gradient);background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;font-family:Unlovable,serif;font-weight:100;font-size:14mm;padding:2mm 8mm;margin:0 -8mm;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:-2mm 0 -2mm -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{display:flex;margin-left:8mm;gap:5mm}.character-column{flex:1 1 0px;display:flex;flex-direction:column;justify-content:space-between}.character-card{display:flex;align-items:center;gap:2.5mm;break-inside:avoid;margin-bottom:2.5mm}.character-info{padding-left:2mm;display:flex;flex-direction:column}.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.5mm;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:3.1mm;line-height:1.2;margin:0;color:#222;display:inline-block}.appearance-compact .character-card{margin-bottom:1mm}.appearance-compact .sheet-header span{font-size:13mm}.appearance-super-compact .character-ability{font-size:2.7mm}.appearance-super-compact .character-name{font-size:3.2mm}.appearance-super-compact .character-icon,.appearance-super-compact .character-icon-placeholder{width:12mm;max-height:12mm}.appearance-super-compact .character-card{margin-bottom:.5mm}.appearance-super-compact .sheet-header span{font-size:12mm}.appearance-mega-compact .character-ability{font-size:2.4mm}.appearance-mega-compact .character-name{font-size:2.8mm}.appearance-mega-compact .sheet-header span{font-size:11mm}.appearance-mega-compact .character-icon,.appearance-mega-compact .character-icon-placeholder{width:11mm;max-height:11mm}.appearance-mega-compact .character-card{margin-bottom:.3mm}.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;width:100%}.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}.jinx-text.loric-text{padding-top:0}.jinx-item.loric{margin-bottom:1mm}.loric-name{font-family:Goudy Old Style;font-size:3mm;padding-top:0}.loric-spacer{min-width:4mm}.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;text-align:center;padding:10mm;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-spacing:-10mm;flex:0 1 130mm;display:flex;flex-wrap:wrap;justify-content:center}.sheet-backing h1 .ampersand{font-size:45mm;line-height:30mm;vertical-align:-5mm}.back-info-container{position:absolute;display:flex;gap:10mm;align-items:center;bottom:0;flex-direction:column-reverse;justify-content:space-between;height:100%;width:100%;padding:20mm}.title-container{z-index:1;display:flex;justify-content:center}.minor-word{padding:0 8mm;font-size:15mm;word-spacing:-6mm;display:flex}.night-orders-container{background-image:url(/images/parchment_texture.jpg);background-position:0 -50%;font-family:Dumbledor;z-index:1;background-size:200mm;box-shadow:inset 0 0 5px #000;padding:2mm}.night-orders-container p{width:26mm;text-align:end;margin:0;flex-shrink:0;color:#222;font-size:5mm}.night-order:not(:last-child){margin-bottom:2mm}.night-order{padding:2mm;display:flex;align-items:center;gap:2mm}.icon-row{box-sizing:border-box;display:flex;flex-wrap:wrap;column-gap:2mm;row-gap:4mm}.icon{width:6mm;box-sizing:border-box;scale:2.1;filter:drop-shadow(0px 0px 2px #2224)}.player-count-container{background-image:url(/images/parchment_texture.jpg);background-position:0 -50%;font-family:Dumbledor;z-index:1;background-size:200mm;padding:4mm;box-shadow:inset 0 0 5px #000;display:flex;gap:5mm;max-width:130mm;flex-direction:row;color:#222;font-size:6mm}.count-column{display:flex;flex-direction:column;align-items:center}.count-column.titles{align-items:end}.good-count{color:#00469e}.evil-count{color:#580709}.night-sheet{width:210mm;min-height:297mm;max-height:297mm;display:flex;flex-direction:column;position:relative;overflow:hidden;color:#222}.night-sheet-heading{display:flex;align-items:center;justify-content:space-between}.night-sheet .night-title{font-family:Dumbledor;font-size:7mm;margin:0}.night-sheet .script-title{font-family:Unlovable,serif;font-weight:lighter;background:var(--header-gradient);background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;font-size:11mm;line-height:9mm;margin:-20mm -7mm;padding:7mm;max-width:50%;text-align:center;word-spacing:-4mm;filter:drop-shadow(.2mm .1mm 0 #222d) drop-shadow(0mm 0mm .1mm #2228)}.night-sheet .sheet-content{padding:10mm;gap:5mm}.night-sheet-order{display:flex;flex-direction:column;gap:1mm}.night-sheet-entry{display:flex;align-items:center;min-height:10mm}.reminder-name{font-family:Goudy Old Style,Goudy Oldstyle,Goudy,Georgia,serif;font-weight:700;font-size:3.3mm}.reminder-text{font-family:Trade Gothic;font-size:3mm}.night-sheet-entry p{margin:0}.night-sheet-entry p strong{font-family:Trade Gothic Bold}.night-sheet-entry>img{width:7mm;height:7mm;flex-shrink:0;scale:2;margin-right:3mm}.reminder-icon{width:10px;scale:1;opacity:.8;margin-right:4px;margin-bottom:-1px}.info-author-credit{font-family:Goudy Old Style,Goudy Oldstyle,Goudy,Georgia,serif;font-size:3.2mm;color:#222;opacity:.6;text-align:right;padding-bottom:3mm;padding-right:3mm;position:absolute;right:0;top:-50%}.info-author-credit p{font-size:2.5mm;margin:0}.info-footer-container{position:relative}.info-footer-background{background-image:url(/images/sidebar-desaturated-small.jpg);background-size:105mm;width:100%;height:20mm}.info-footer-overlay{position:absolute;top:0;left:0;width:100%;height:20mm;background-color:#0003;mix-blend-mode:multiply}.spacer{flex:1 0 0px}.print-only{visibility:hidden;display:none}@media print{.print-only{visibility:visible;display:block}}
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:var(--header-gradient);background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;font-family:Unlovable,serif;font-weight:100;font-size:14mm;padding:2mm 8mm;margin:0 -8mm;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:-2mm 0 -2mm -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{display:flex;margin-left:8mm;gap:5mm}.character-column{flex:1 1 0px;display:flex;flex-direction:column;justify-content:space-between}.character-card{display:flex;align-items:center;gap:2.5mm;break-inside:avoid;margin-bottom:2.5mm}.character-info{padding-left:2mm;display:flex;flex-direction:column}.character-icon-wrapper{display:flex;flex-shrink:0}.character-icon,.character-icon-placeholder{width:13mm;max-height:13mm;object-fit:contain;filter:drop-shadow(1px 1px 2px #0004)}.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.5mm;font-weight:700;margin:0 0 .5mm;color:#1a202c;display:flex;align-items:center;gap:1mm}.inline-jinx-icons{display:inline-flex;gap:.5mm;align-items:center;margin-left:1mm}.inline-jinx-icon,.inline-jinx-icon-placeholder{width:5mm;height:5mm;object-fit:contain;filter:drop-shadow(.5px .5px .5px #0004);scale:1.7}.inline-jinx-icon-placeholder{display:inline-flex;align-items:center;justify-content:center;color:#eee;font-weight:700;font-size:1.8mm;border-radius:50%;background-color:#666}.character-ability{font-family:Trade Gothic,Trade Gothic Next,Helvetica Neue,Arial,sans-serif;font-size:3.1mm;line-height:1.2;margin:0;color:#222;display:inline-block}.appearance-compact .character-card{margin-bottom:1mm}.appearance-compact .sheet-header span{font-size:13mm}.appearance-super-compact .character-ability{font-size:2.7mm}.appearance-super-compact .character-name{font-size:3.2mm}.appearance-super-compact .character-icon,.appearance-super-compact .character-icon-placeholder{width:12mm;max-height:12mm}.appearance-super-compact .character-card{margin-bottom:.5mm}.appearance-super-compact .sheet-header span{font-size:12mm}.appearance-mega-compact .character-ability{font-size:2.4mm}.appearance-mega-compact .character-name{font-size:2.8mm}.appearance-mega-compact .sheet-header span{font-size:11mm}.appearance-mega-compact .character-icon,.appearance-mega-compact .character-icon-placeholder{width:11mm;max-height:11mm}.appearance-mega-compact .character-card{margin-bottom:.3mm}.appearance-mega-compact .inline-jinx-icon,.appearance-mega-compact .inline-jinx-icon-placeholder{width:4mm;height:4mm;font-size:1.3mm}.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;width:100%}.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}.jinx-text.loric-text{padding-top:0}.jinx-item.loric{margin-bottom:1mm}.loric-name{font-family:Goudy Old Style;font-size:3mm;padding-top:0}.loric-spacer{min-width:4mm}.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;text-align:center;padding:10mm;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-spacing:-10mm;flex:0 1 130mm;display:flex;flex-wrap:wrap;justify-content:center}.sheet-backing h1 .ampersand{font-size:45mm;line-height:30mm;vertical-align:-5mm}.back-info-container{position:absolute;display:flex;gap:10mm;align-items:center;bottom:0;flex-direction:column-reverse;justify-content:space-between;height:100%;width:100%;padding:20mm}.title-container{z-index:1;display:flex;justify-content:center}.minor-word{padding:0 8mm;font-size:15mm;word-spacing:-6mm;display:flex}.night-orders-container{background-image:url(/images/parchment_texture.jpg);background-position:0 -50%;font-family:Dumbledor;z-index:1;background-size:200mm;box-shadow:inset 0 0 5px #000;padding:2mm}.night-orders-container p{width:26mm;text-align:end;margin:0;flex-shrink:0;color:#222;font-size:5mm}.night-order:not(:last-child){margin-bottom:2mm}.night-order{padding:2mm;display:flex;align-items:center;gap:2mm}.icon-row{box-sizing:border-box;display:flex;flex-wrap:wrap;column-gap:2mm;row-gap:4mm}.icon{width:6mm;box-sizing:border-box;scale:2.1;filter:drop-shadow(0px 0px 2px #2224)}.player-count-container{background-image:url(/images/parchment_texture.jpg);background-position:0 -50%;font-family:Dumbledor;z-index:1;background-size:200mm;padding:4mm;box-shadow:inset 0 0 5px #000;display:flex;gap:5mm;max-width:130mm;flex-direction:row;color:#222;font-size:6mm}.count-column{display:flex;flex-direction:column;align-items:center}.count-column.titles{align-items:end}.good-count{color:#00469e}.evil-count{color:#580709}.night-sheet{width:210mm;min-height:297mm;max-height:297mm;display:flex;flex-direction:column;position:relative;overflow:hidden;color:#222}.night-sheet-heading{display:flex;align-items:center;justify-content:space-between}.night-sheet .night-title{font-family:Dumbledor;font-size:7mm;margin:0}.night-sheet .script-title{font-family:Unlovable,serif;font-weight:lighter;background:var(--header-gradient);background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;font-size:11mm;line-height:9mm;margin:-20mm -7mm;padding:7mm;max-width:50%;text-align:center;word-spacing:-4mm;filter:drop-shadow(.2mm .1mm 0 #222d) drop-shadow(0mm 0mm .1mm #2228)}.night-sheet .sheet-content{padding:10mm;gap:5mm}.night-sheet-order{display:flex;flex-direction:column;gap:1mm}.night-sheet-entry{display:flex;align-items:center;min-height:10mm}.reminder-name{font-family:Goudy Old Style,Goudy Oldstyle,Goudy,Georgia,serif;font-weight:700;font-size:3.3mm}.reminder-text{font-family:Trade Gothic;font-size:3mm}.night-sheet-entry p{margin:0}.night-sheet-entry p strong{font-family:Trade Gothic Bold}.night-sheet-entry>img{width:7mm;height:7mm;flex-shrink:0;scale:2;margin-right:3mm}.reminder-icon{width:10px;scale:1;opacity:.8;margin-right:4px;margin-bottom:-1px}.info-author-credit{font-family:Goudy Old Style,Goudy Oldstyle,Goudy,Georgia,serif;font-size:3.2mm;color:#222;opacity:.6;text-align:right;padding-bottom:3mm;padding-right:3mm;position:absolute;right:0;top:-50%}.info-author-credit p{font-size:2.5mm;margin:0}.info-footer-container{position:relative}.info-footer-background{background-image:url(/images/sidebar-desaturated-small.jpg);background-size:105mm;width:100%;height:20mm}.info-footer-overlay{position:absolute;top:0;left:0;width:100%;height:20mm;background-color:#0003;mix-blend-mode:multiply}.spacer{flex:1 0 0px}.print-only{visibility:hidden;display:none}@media print{.print-only{visibility:visible;display:block}}
package/dist/types.d.ts CHANGED
@@ -41,6 +41,7 @@ export interface ScriptOptions {
41
41
  displayNightOrder: boolean;
42
42
  displayPlayerCounts: boolean;
43
43
  numberOfCharacterSheets: number;
44
+ inlineJinxIcons: boolean;
44
45
  }
45
46
  export interface ParsedScript {
46
47
  metadata: ScriptMetadata | null;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAG3E,MAAM,MAAM,aAAa,GACrB,WAAW,GACX,UAAU,GACV,QAAQ,GACR,OAAO,GACP,WAAW,GACX,QAAQ,CAAC;AAEb,MAAM,MAAM,iBAAiB,GAAG,eAAe,GAAG;IAChD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,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;IAC5B,KAAK,EAAE,iBAAiB,EAAE,CAAC;CAC5B;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;AAED,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,MAAM,GAAG,YAAY,GAAG,WAAW,CAAC;AACvE,MAAM,MAAM,eAAe,GAAG,iBAAiB,GAAG,WAAW,CAAC;AAE9D,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,eAAe,EAAE,CAAC;IACzB,KAAK,EAAE,eAAe,EAAE,CAAC;CAC1B;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACzB,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,OAAO,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,cAAc,EAAE,OAAO,CAAC;IACxB,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,QAAQ,GAAG,SAAS,GAAG,eAAe,GAAG,cAAc,CAAC;IACpE,gBAAgB,EAAE,OAAO,CAAC;IAC1B,cAAc,EAAE,OAAO,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,iBAAiB,EAAE,OAAO,CAAC;IAC3B,mBAAmB,EAAE,OAAO,CAAC;IAC7B,uBAAuB,EAAE,MAAM,CAAC;CACjC;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,cAAc,GAAG,IAAI,CAAC;IAChC,UAAU,EAAE,eAAe,EAAE,CAAC;CAC/B;AAED,MAAM,MAAM,cAAc,GAAG;IAC3B,MAAM,EAAE,YAAY,CAAC;IACrB,OAAO,EAAE,aAAa,CAAC;IACvB,WAAW,EAAE,WAAW,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAG3E,MAAM,MAAM,aAAa,GACrB,WAAW,GACX,UAAU,GACV,QAAQ,GACR,OAAO,GACP,WAAW,GACX,QAAQ,CAAC;AAEb,MAAM,MAAM,iBAAiB,GAAG,eAAe,GAAG;IAChD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,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;IAC5B,KAAK,EAAE,iBAAiB,EAAE,CAAC;CAC5B;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;AAED,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,MAAM,GAAG,YAAY,GAAG,WAAW,CAAC;AACvE,MAAM,MAAM,eAAe,GAAG,iBAAiB,GAAG,WAAW,CAAC;AAE9D,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,eAAe,EAAE,CAAC;IACzB,KAAK,EAAE,eAAe,EAAE,CAAC;CAC1B;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACzB,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,OAAO,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,cAAc,EAAE,OAAO,CAAC;IACxB,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,QAAQ,GAAG,SAAS,GAAG,eAAe,GAAG,cAAc,CAAC;IACpE,gBAAgB,EAAE,OAAO,CAAC;IAC1B,cAAc,EAAE,OAAO,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,iBAAiB,EAAE,OAAO,CAAC;IAC3B,mBAAmB,EAAE,OAAO,CAAC;IAC7B,uBAAuB,EAAE,MAAM,CAAC;IAChC,eAAe,EAAE,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,cAAc,GAAG,IAAI,CAAC;IAChC,UAAU,EAAE,eAAe,EAAE,CAAC;CAC/B;AAED,MAAM,MAAM,cAAc,GAAG;IAC3B,MAAM,EAAE,YAAY,CAAC;IACrB,OAAO,EAAE,aAAa,CAAC;IACvB,WAAW,EAAE,WAAW,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC"}
@@ -1,4 +1,6 @@
1
1
  import { ResolvedCharacter, GroupedCharacters, Jinx } from "../types";
2
2
  export declare function groupCharactersByTeam(characters: ResolvedCharacter[]): GroupedCharacters;
3
3
  export declare function findJinxes(characters: ResolvedCharacter[], useOldJinxes?: boolean): Jinx[];
4
+ export declare const getImageUrl: (character: ResolvedCharacter) => string | null;
5
+ export declare function getJinxedCharacters(character: ResolvedCharacter, jinxes: Jinx[], allCharacters: ResolvedCharacter[]): ResolvedCharacter[];
4
6
  //# sourceMappingURL=scriptUtils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"scriptUtils.d.ts","sourceRoot":"","sources":["../../src/utils/scriptUtils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAGtE,wBAAgB,qBAAqB,CACnC,UAAU,EAAE,iBAAiB,EAAE,GAC9B,iBAAiB,CAoBnB;AAED,wBAAgB,UAAU,CACxB,UAAU,EAAE,iBAAiB,EAAE,EAC/B,YAAY,UAAQ,GACnB,IAAI,EAAE,CAmER"}
1
+ {"version":3,"file":"scriptUtils.d.ts","sourceRoot":"","sources":["../../src/utils/scriptUtils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAGtE,wBAAgB,qBAAqB,CACnC,UAAU,EAAE,iBAAiB,EAAE,GAC9B,iBAAiB,CAoBnB;AAED,wBAAgB,UAAU,CACxB,UAAU,EAAE,iBAAiB,EAAE,EAC/B,YAAY,UAAQ,GACnB,IAAI,EAAE,CAmER;AAED,eAAO,MAAM,WAAW,GAAI,WAAW,iBAAiB,kBAcvD,CAAC;AAEF,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,iBAAiB,EAC5B,MAAM,EAAE,IAAI,EAAE,EACd,aAAa,EAAE,iBAAiB,EAAE,GACjC,iBAAiB,EAAE,CAcrB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "botc-character-sheet",
3
- "version": "0.14.0-beta.3",
3
+ "version": "0.15.0-beta.1",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",