@tonguetoquill/collection 0.2.6 → 0.2.8

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": "@tonguetoquill/collection",
3
- "version": "0.2.6",
3
+ "version": "0.2.8",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/nibsbin/tonguetoquill-collection.git"
@@ -1,36 +1,88 @@
1
1
  ---
2
2
  QUILL: af4141@0.1
3
- name: "DOE, JOHN A."
4
- unit: "1 CACS/DOT"
5
- grade: "GS-13"
6
- commanders_auth: "Verified by unit commander"
3
+ # EDIT: Full name in Last, First, Middle Initial format
4
+ name: "LAST, FIRST M."
5
+ # EDIT: Unit of assignment (e.g., "1 ACCS/DOT", "726 ACS/MOC")
6
+ unit: "UNIT/SYMBOL"
7
+ # EDIT: Current grade or CCC level (e.g., "SSgt", "GS-12", "3")
8
+ grade: "GRADE"
9
+ # EDIT: Commander's authentication entry — often a commander's name/signature block or "Verified by unit commander"
10
+ commanders_auth: ""
7
11
  ---
8
12
 
13
+ <!-- ═══════════════════════════════════════════════════════════════
14
+ RECORD OF EXPERIENCE CARDS
15
+ Each card below becomes one row in the experience table.
16
+ Page 1 holds up to 16 rows; Page 2 holds up to 21 rows (37 max).
17
+
18
+ Required reportable actions include:
19
+ • Initial/subsequent duty assignment
20
+ • Written and/or positional upgrade evaluations
21
+ • Certification events (Mission Ready, Senior Director, etc.)
22
+ • Downgrade or decertification
23
+ • PCS/PCA departure
24
+ • Temporary duty of significant duration
25
+ • Any other commander-directed entry
26
+
27
+ Leave blank any columns that do not apply to a given entry.
28
+ ═══════════════════════════════════════════════════════════════ -->
29
+
30
+ <!-- Example 1: Initial assignment to a unit -->
9
31
  ---
10
32
  CARD: experience
11
- date: "2025-01-15"
12
- action: "Assigned to 1 CACS/DOT as Weapons Director"
13
- written_grade: "3"
14
- written_grade_date: "2025-01-20"
15
- positional_grade: "3"
16
- positional_grade_date: "2025-01-20"
33
+ date: "15 Jan 25"
34
+ action: "Assigned to 1 ACCS/DOT as Weapons Director"
35
+ written_grade: ""
36
+ written_grade_date: ""
37
+ positional_grade: ""
38
+ positional_grade_date: ""
17
39
  auth_or_remarks: "Initial assignment"
18
40
  ---
19
41
 
42
+ <!-- Example 2: Written upgrade evaluation -->
20
43
  ---
21
44
  CARD: experience
22
- date: "2025-06-01"
23
- action: "Completed WD upgrade evaluation certified Mission Ready"
24
- written_grade: "5"
25
- written_grade_date: "2025-06-10"
26
- positional_grade: "5"
27
- positional_grade_date: "2025-06-10"
45
+ date: "15 Mar 25"
46
+ action: "Completed written upgrade evaluation for 3-Level"
47
+ written_grade: "3"
48
+ written_grade_date: "15 Mar 25"
49
+ positional_grade: ""
50
+ positional_grade_date: ""
28
51
  auth_or_remarks: "Per AFMAN 13-1CRCV1"
29
52
  ---
30
53
 
54
+ <!-- Example 3: Positional (live-environment) upgrade / certification -->
55
+ ---
56
+ CARD: experience
57
+ date: "20 Jun 25"
58
+ action: "Certified Mission Ready — positional upgrade"
59
+ written_grade: ""
60
+ written_grade_date: ""
61
+ positional_grade: "4"
62
+ positional_grade_date: "20 Jun 25"
63
+ auth_or_remarks: "SSgt Jones, T.R."
64
+ ---
65
+
66
+ <!-- Example 4: Combined written + positional upgrade (both columns filled) -->
31
67
  ---
32
68
  CARD: experience
33
- date: "2025-09-15"
34
- action: "PCS to 726 ACS/DOT"
35
- auth_or_remarks: "Outprocessed 1 CACS"
36
- ---
69
+ date: "1 Aug 25"
70
+ action: "Upgrade evaluation written and positional"
71
+ written_grade: "4"
72
+ written_grade_date: "1 Aug 25"
73
+ positional_grade: "4"
74
+ positional_grade_date: "1 Aug 25"
75
+ auth_or_remarks: "Verified by unit commander"
76
+ ---
77
+
78
+ <!-- Example 5: PCS departure — no grade columns needed -->
79
+ ---
80
+ CARD: experience
81
+ date: "1 Sep 25"
82
+ action: "PCS to 726 ACS/MOC, Tinker AFB OK"
83
+ written_grade: ""
84
+ written_grade_date: ""
85
+ positional_grade: ""
86
+ positional_grade_date: ""
87
+ auth_or_remarks: "Outprocessed 1 ACCS/DOT"
88
+ ---
@@ -7,29 +7,60 @@
7
7
  #let FORM_MIN_TEXT_SIZE = 6pt
8
8
  #let FORM_MIN_CHARS_PER_LINE = 7
9
9
 
10
- /// Render a text-like field with word-wrapping and shrink-to-fit.
10
+ /// Should this field shrink text to a single line rather than word-wrap?
11
+ /// True for short/narrow fields with brief content (grades, ranks, dates).
12
+ #let should-shrink-to-fit(display, width, height) = {
13
+ let aspect = width / height
14
+ let char-count = display.len()
15
+ char-count <= 10 or height < 20pt or aspect > 4.0
16
+ }
17
+
18
+ /// Render a text-like field with shrink-to-fit and word-wrap fallback.
11
19
  #let render-text-field(display, width, height, x-inset, y-inset) = {
12
20
  set par(leading: 0.25em)
13
21
  context {
22
+ let avail-w = width - 2 * x-inset
23
+ let avail-h = height - 2 * y-inset
24
+ let shrink = should-shrink-to-fit(display, width, height)
25
+
14
26
  let final-size = FORM_MIN_TEXT_SIZE
15
27
  let current = FORM_MAX_TEXT_SIZE
16
28
  let step = 0.5pt
17
29
 
18
- // Find the largest font size that fits both horizontally and vertically
19
- // and optionally leaves enough room for a minimum number of characters
20
30
  while current >= FORM_MIN_TEXT_SIZE {
21
- let m = measure(block(width: width - 2 * x-inset, text(size: current, display)))
31
+ let m = if shrink {
32
+ // Measure as a single line (no width constraint → no wrapping)
33
+ measure(text(size: current, display))
34
+ } else {
35
+ // Measure with wrapping within the available width
36
+ measure(block(width: avail-w, text(size: current, display)))
37
+ }
22
38
  let char-m = measure(text(size: current, "0" * FORM_MIN_CHARS_PER_LINE))
23
39
 
24
- if m.height <= height - 2 * y-inset and char-m.width <= width - 2 * x-inset {
40
+ if m.width <= avail-w and m.height <= avail-h and char-m.width <= avail-w {
25
41
  final-size = current
26
42
  break
27
43
  }
28
44
  current = current - step
29
45
  }
30
- // Alignment: center vertically if it's a short box (likely single line),
31
- // otherwise top-align for multi-line paragraphs.
32
- let vert-align = if height < 24pt { horizon } else { top }
46
+
47
+ // Fallback: if shrink-to-fit hit min size and still overflows,
48
+ // re-try with word-wrap enabled as a last resort.
49
+ if shrink and current < FORM_MIN_TEXT_SIZE {
50
+ current = FORM_MAX_TEXT_SIZE
51
+ while current >= FORM_MIN_TEXT_SIZE {
52
+ let m = measure(block(width: avail-w, text(size: current, display)))
53
+ let char-m = measure(text(size: current, "0" * FORM_MIN_CHARS_PER_LINE))
54
+ if m.height <= avail-h and char-m.width <= avail-w {
55
+ final-size = current
56
+ break
57
+ }
58
+ current = current - step
59
+ }
60
+ }
61
+
62
+ // Default to vertically centered. Only top-align for tall "text areas".
63
+ let vert-align = if height >= 40pt { top } else { horizon }
33
64
 
34
65
  box(
35
66
  width: width,
@@ -30,7 +30,7 @@ commanders_auth: ""
30
30
  <!-- Example 1: Initial assignment to a unit -->
31
31
  ---
32
32
  CARD: experience
33
- date: "15 Jan 2025"
33
+ date: "15 Jan 25"
34
34
  action: "Assigned to 1 ACCS/DOT as Weapons Director"
35
35
  written_grade: ""
36
36
  written_grade_date: ""
@@ -42,10 +42,10 @@ auth_or_remarks: "Initial assignment"
42
42
  <!-- Example 2: Written upgrade evaluation -->
43
43
  ---
44
44
  CARD: experience
45
- date: "15 Mar 2025"
45
+ date: "15 Mar 25"
46
46
  action: "Completed written upgrade evaluation for 3-Level"
47
47
  written_grade: "3"
48
- written_grade_date: "15 Mar 2025"
48
+ written_grade_date: "15 Mar 25"
49
49
  positional_grade: ""
50
50
  positional_grade_date: ""
51
51
  auth_or_remarks: "Per AFMAN 13-1CRCV1"
@@ -54,31 +54,31 @@ auth_or_remarks: "Per AFMAN 13-1CRCV1"
54
54
  <!-- Example 3: Positional (live-environment) upgrade / certification -->
55
55
  ---
56
56
  CARD: experience
57
- date: "20 Jun 2025"
57
+ date: "20 Jun 25"
58
58
  action: "Certified Mission Ready — positional upgrade"
59
59
  written_grade: ""
60
60
  written_grade_date: ""
61
61
  positional_grade: "4"
62
- positional_grade_date: "20 Jun 2025"
62
+ positional_grade_date: "20 Jun 25"
63
63
  auth_or_remarks: "SSgt Jones, T.R."
64
64
  ---
65
65
 
66
66
  <!-- Example 4: Combined written + positional upgrade (both columns filled) -->
67
67
  ---
68
68
  CARD: experience
69
- date: "01 Aug 2025"
69
+ date: "1 Aug 25"
70
70
  action: "Upgrade evaluation — written and positional"
71
71
  written_grade: "4"
72
- written_grade_date: "01 Aug 2025"
72
+ written_grade_date: "1 Aug 25"
73
73
  positional_grade: "4"
74
- positional_grade_date: "01 Aug 2025"
74
+ positional_grade_date: "1 Aug 25"
75
75
  auth_or_remarks: "Verified by unit commander"
76
76
  ---
77
77
 
78
78
  <!-- Example 5: PCS departure — no grade columns needed -->
79
79
  ---
80
80
  CARD: experience
81
- date: "01 Sep 2025"
81
+ date: "1 Sep 25"
82
82
  action: "PCS to 726 ACS/MOC, Tinker AFB OK"
83
83
  written_grade: ""
84
84
  written_grade_date: ""