@airmark/quiver 0.25.0 → 0.26.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@airmark/quiver",
3
- "version": "0.25.0",
3
+ "version": "0.26.0",
4
4
  "description": "Airmark Quiver — Air Force and DAF document Quills for Quillmark.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -272,6 +272,7 @@ card_kinds:
272
272
  default: standard
273
273
  ui:
274
274
  group: Additional
275
+ compact: true
275
276
  description: "'standard' (formal, same page), 'informal' (less formal routing), or 'separate_page' (begins on a new page)."
276
277
  action:
277
278
  type: string
@@ -283,10 +284,12 @@ card_kinds:
283
284
  default: ""
284
285
  ui:
285
286
  group: Additional
287
+ compact: true
286
288
  description: "Action taken by the endorser. Leave blank to hide the Approve/Disapprove line entirely, 'undecided' to display the line with neither option circled, 'approve' or 'disapprove' to circle the selected option."
287
289
  date:
288
290
  type: datetime
289
291
  default: ""
290
292
  ui:
291
293
  group: Additional
294
+ compact: true
292
295
  description: "YYYY-MM-DD. Date the endorser signs/forwards the memo (per AFH 33-337 Ch. 14, this is distinct from the originating memo's date). Leave blank to use today's date."
@@ -65,9 +65,9 @@
65
65
  }
66
66
  let classification_color = get-classification-level-color(classification_level)
67
67
 
68
- // Build the CUI designation indicator block (DoDM 5200.48, Table 1).
69
- // Rendered in the footer of page 1 only when classification is CUI and at
70
- // least one indicator field is provided.
68
+ // Build the CUI designation indicator block (DoDM 5200.48, Table 1), shown
69
+ // only for CUI when at least one indicator field is set. Rendered as a
70
+ // bottom-right page-1 float (see placement below).
71
71
  let cui_indicator = if (
72
72
  classification_level != none
73
73
  and type(classification_level) == str
@@ -75,17 +75,17 @@
75
75
  ) {
76
76
  let lines = ()
77
77
  if cui_controlled_by != none and type(cui_controlled_by) == str and cui_controlled_by.trim() != "" {
78
- lines.push([#strong[Controlled By:] #cui_controlled_by.trim()])
78
+ lines.push([Controlled By: #cui_controlled_by.trim()])
79
79
  }
80
80
  if cui_category != none and type(cui_category) == str and cui_category.trim() != "" {
81
- lines.push([#strong[CUI Category:] #cui_category.trim()])
81
+ lines.push([CUI Category: #cui_category.trim()])
82
82
  }
83
83
  let ldc = if cui_limited_dissemination != none and type(cui_limited_dissemination) == str { cui_limited_dissemination.trim() } else { "" }
84
84
  if ldc != "" {
85
- lines.push([#strong[LDC:] #upper(ldc)])
85
+ lines.push([LDC: #upper(ldc)])
86
86
  }
87
87
  if cui_poc != none and type(cui_poc) == str and cui_poc.trim() != "" {
88
- lines.push([#strong[POC:] #cui_poc.trim()])
88
+ lines.push([POC: #cui_poc.trim()])
89
89
  }
90
90
  if lines.len() > 0 { lines.join(linebreak()) } else { none }
91
91
  } else {
@@ -138,25 +138,6 @@
138
138
  )
139
139
  }
140
140
 
141
- // DoDM 5200.48 §3: CUI designation indicator block — first page only,
142
- // bottom-right corner, above the classification banner.
143
- // dy: -0.85in clears the tag line (at -0.625in) and the CUI banner (at -0.375in).
144
- // dx: -0.5in pulls it away from the right margin edge for visual breathing room.
145
- context if counter(page).get().first() == 1 and cui_indicator != none {
146
- place(
147
- bottom + right,
148
- dy: -0.85in,
149
- block(
150
- inset: 0pt,
151
- {
152
- set text(font: DEFAULT_BODY_FONTS, size: 10pt)
153
- set par(leading: 0.4em, spacing: 0pt)
154
- cui_indicator
155
- }
156
- )
157
- )
158
- }
159
-
160
141
  if not falsey(footer_tag_line) {
161
142
  place(
162
143
  bottom + center,
@@ -169,6 +150,44 @@
169
150
  },
170
151
  )
171
152
 
153
+ // DoDM 5200.48 §3: CUI designation indicator block — page 1 only, bottom-right
154
+ // corner, dropped into the 0.5in page-edge band. Emitted as a bottom float so
155
+ // it (1) reserves flow space, raising page 1's effective bottom margin so body
156
+ // text never overlaps it, and (2) stays pinned to page 1 — as the first flow
157
+ // content it can never be bumped to page 2.
158
+ if cui_indicator != none {
159
+ context {
160
+ // The box shrink-wraps to its widest line; `set align(left)` keeps the
161
+ // text flush-left within it, overriding the `align(right)` the placement
162
+ // below imposes.
163
+ let indicator_box = box({
164
+ set text(font: DEFAULT_BODY_FONTS, size: 10pt)
165
+ set par(leading: 0.4em, spacing: 0pt)
166
+ set align(left)
167
+ cui_indicator
168
+ })
169
+ // Reserve only the part of the block inside the text area (`reserved`):
170
+ // float a box of that height, then `place` the full block inside it pushed
171
+ // down by `overhang` so the surplus overflows into the edge band. (A bare
172
+ // `box(height: reserved, indicator_box)` overflows *upward* into the body
173
+ // instead.) The inner `place` adds no size, so the box stays `reserved`
174
+ // tall and the block's bottom lands 0.5in from the page edge.
175
+ let overhang = spacing.margin - 0.5in
176
+ let reserved = measure(indicator_box).height - overhang
177
+ place(
178
+ bottom + right,
179
+ float: true,
180
+ // Slide the right edge into the page-edge band, 0.5in from the border;
181
+ // the inner place right-aligns the block to that edge.
182
+ dx: spacing.margin - 0.5in,
183
+ // Minimum gap to the body's last line; the actual gap is larger when the
184
+ // next paragraph can't fit above the block and breaks to the next page.
185
+ clearance: spacing.line,
186
+ box(height: reserved, place(bottom + right, dy: overhang, indicator_box)),
187
+ )
188
+ }
189
+ }
190
+
172
191
  render-letterhead(
173
192
  letterhead_title,
174
193
  letterhead_caption,