@airmark/quiver 0.24.3 → 0.24.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@airmark/quiver",
3
- "version": "0.24.3",
3
+ "version": "0.24.5",
4
4
  "description": "Airmark Quiver — Air Force and DAF document Quills for Quillmark.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -16,8 +16,8 @@
16
16
  "node": ">=24"
17
17
  },
18
18
  "devDependencies": {
19
- "@quillmark/quiver": "^0.12.0",
20
- "@quillmark/wasm": "^0.87.0"
19
+ "@quillmark/quiver": "^0.13.0",
20
+ "@quillmark/wasm": "^0.88.0"
21
21
  },
22
22
  "scripts": {
23
23
  "test": "quiver test",
@@ -20,6 +20,7 @@
20
20
  letterhead_seal: none,
21
21
  letterhead_seal_subtitle: none, // optional line under seal (9pt bold caps); ignored if no seal
22
22
  letterhead_emblem: none, // optional image placed opposite the seal (right side)
23
+ letterhead_emblem_height: 1in, // emblem fit-box height; reduce for shorter emblems
23
24
  letterhead_font: DEFAULT_LETTERHEAD_FONTS,
24
25
  body_font: DEFAULT_BODY_FONTS,
25
26
  font_size: 12pt,
@@ -175,6 +176,7 @@
175
176
  letterhead-seal: letterhead_seal,
176
177
  letterhead-seal-subtitle: letterhead_seal_subtitle,
177
178
  letterhead-emblem: letterhead_emblem,
179
+ letterhead-emblem-height: letterhead_emblem_height,
178
180
  )
179
181
 
180
182
  // AFH 33-337 "Date": "Place the date 1 inch from the right edge, 1.75 inches from the top"
@@ -21,6 +21,7 @@
21
21
  letterhead-seal: none,
22
22
  letterhead-seal-subtitle: none,
23
23
  letterhead-emblem: none, // optional image placed opposite the seal (right side)
24
+ letterhead-emblem-height: 1in, // emblem fit-box height; reduce for shorter emblems
24
25
  ) = {
25
26
  font = ensure-array(font)
26
27
  title = ensure-string(title)
@@ -28,6 +29,16 @@
28
29
  title = upper(title)
29
30
  caption = upper(caption)
30
31
 
32
+ // Letterhead corner geometry. The seal (left) and emblem (right) share one
33
+ // reference band so the corners stay in parity: both bleed `corner-overhang`
34
+ // past the page margin and center on the same axis (`band-center`). The
35
+ // emblem may be shorter than the band but stays centered on that axis.
36
+ let corner-overhang = 0.5in
37
+ let corner-width = 2in
38
+ let band-height = 1in // seal height; also the emblem's reference band
39
+ let band-top = -band-height / 2 // puts the band center at dy 0
40
+ let band-center = band-top + band-height / 2
41
+
31
42
  place(
32
43
  dy: 0.625in - spacing.margin,
33
44
  box(
@@ -51,7 +62,7 @@
51
62
  if letterhead-seal != none {
52
63
  let seal-body = if falsey(letterhead-seal-subtitle) {
53
64
  block[
54
- #fit-box(width: 2in, height: 1in)[#letterhead-seal]
65
+ #fit-box(width: corner-width, height: band-height)[#letterhead-seal]
55
66
  ]
56
67
  } else {
57
68
  // Isolate seal column from document `font_size`: stack `em` spacing and subtitle
@@ -63,26 +74,29 @@
63
74
  // Spacing applies between positional stack children only, not one `[…]` body.
64
75
  #stack(
65
76
  spacing: 0.5em,
66
- fit-box(width: 2in, height: 1in)[#letterhead-seal],
77
+ fit-box(width: corner-width, height: band-height)[#letterhead-seal],
67
78
  box(upper(ensure-string(letterhead-seal-subtitle))),
68
79
  )
69
80
  ]
70
81
  }
71
82
  place(
72
83
  left + top,
73
- dx: -0.5in,
74
- dy: -.5in,
84
+ dx: -corner-overhang,
85
+ dy: band-top,
75
86
  seal-body,
76
87
  )
77
88
  }
78
89
 
79
90
  if letterhead-emblem != none {
91
+ // Mirror the seal: same overhang and width, centered on the seal's band
92
+ // axis. Placing the emblem's top at `band-center - height/2` keeps its
93
+ // center on `band-center` for any (possibly shorter) emblem height.
80
94
  place(
81
95
  right + top,
82
- dx: 0.5in,
83
- dy: -.5in,
96
+ dx: corner-overhang,
97
+ dy: band-center - letterhead-emblem-height / 2,
84
98
  block[
85
- #fit-box(width: 2in, height: 1in, alignment: right + horizon)[#letterhead-emblem]
99
+ #fit-box(width: corner-width, height: letterhead-emblem-height, alignment: right + horizon)[#letterhead-emblem]
86
100
  ],
87
101
  )
88
102
  }
@@ -17,7 +17,10 @@
17
17
 
18
18
  // Optional Freedom 250 emblem, placed opposite the seal
19
19
  ..if data.at("freedom250", default: false) {
20
- (letterhead_emblem: image("assets/freedom250.png"))
20
+ (
21
+ letterhead_emblem: image("assets/Freedom250_USAF.png"),
22
+ letterhead_emblem_height: 0.58in,
23
+ )
21
24
  },
22
25
 
23
26
  // Date