@airmark/quiver 0.32.2 → 0.33.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.
Files changed (76) hide show
  1. package/README.md +54 -18
  2. package/package.json +8 -6
  3. package/quills/af4141/0.1.0/Quill.yaml +1 -1
  4. package/quills/afmc_moa/0.0.1/Quill.yaml +10 -17
  5. package/quills/classic_resume/0.0.1/Quill.yaml +361 -0
  6. package/quills/classic_resume/0.0.1/packages/ttq-classic-resume/LICENSE +21 -0
  7. package/quills/classic_resume/0.0.1/packages/ttq-classic-resume/fonts/EBGaramond/EBGaramond-Bold.ttf +0 -0
  8. package/quills/classic_resume/0.0.1/packages/ttq-classic-resume/fonts/EBGaramond/EBGaramond-BoldItalic.ttf +0 -0
  9. package/quills/classic_resume/0.0.1/packages/ttq-classic-resume/fonts/EBGaramond/EBGaramond-Italic.ttf +0 -0
  10. package/quills/classic_resume/0.0.1/packages/ttq-classic-resume/fonts/EBGaramond/EBGaramond-Regular.ttf +0 -0
  11. package/quills/classic_resume/0.0.1/packages/ttq-classic-resume/fonts/EBGaramond/OFL.txt +94 -0
  12. package/quills/classic_resume/0.0.1/packages/ttq-classic-resume/src/components.typ +181 -0
  13. package/quills/classic_resume/0.0.1/packages/ttq-classic-resume/src/config.typ +53 -0
  14. package/quills/classic_resume/0.0.1/packages/ttq-classic-resume/src/layout.typ +57 -0
  15. package/quills/classic_resume/0.0.1/packages/ttq-classic-resume/src/lib.typ +6 -0
  16. package/quills/classic_resume/0.0.1/packages/ttq-classic-resume/src/util.typ +32 -0
  17. package/quills/classic_resume/0.0.1/packages/ttq-classic-resume/typst.toml +26 -0
  18. package/quills/classic_resume/0.0.1/plate.typ +143 -0
  19. package/quills/cyber_ribbon_chart/0.0.1/Quill.yaml +320 -0
  20. package/quills/cyber_ribbon_chart/0.0.1/plate.typ +428 -0
  21. package/quills/daf1206/0.1.0/Quill.yaml +1 -2
  22. package/quills/daf4392/0.1.0/Quill.yaml +15 -1
  23. package/quills/daf4392/0.1.0/plate.typ +2 -2
  24. package/quills/usaf_letter/0.1.0/Quill.yaml +214 -0
  25. package/quills/usaf_letter/0.1.0/assets/dod_seal.png +0 -0
  26. package/quills/usaf_letter/0.1.0/assets/dow_seal.png +0 -0
  27. package/quills/usaf_letter/0.1.0/packages/tonguetoquill-usaf-letter/.gitignore +7 -0
  28. package/quills/usaf_letter/0.1.0/packages/tonguetoquill-usaf-letter/LICENSE +201 -0
  29. package/quills/usaf_letter/0.1.0/packages/tonguetoquill-usaf-letter/fonts/Cinzel/Cinzel-Regular.ttf +0 -0
  30. package/quills/usaf_letter/0.1.0/packages/tonguetoquill-usaf-letter/fonts/Cinzel/LICENSE +93 -0
  31. package/quills/usaf_letter/0.1.0/packages/tonguetoquill-usaf-letter/fonts/CopperplateCC/CopperplateCC-Bold.otf +0 -0
  32. package/quills/usaf_letter/0.1.0/packages/tonguetoquill-usaf-letter/fonts/CopperplateCC/CopperplateCC-Heavy.otf +0 -0
  33. package/quills/usaf_letter/0.1.0/packages/tonguetoquill-usaf-letter/fonts/CopperplateCC/LICENSE.md +79 -0
  34. package/quills/usaf_letter/0.1.0/packages/tonguetoquill-usaf-letter/fonts/LiberationMono/LICENSE +102 -0
  35. package/quills/usaf_letter/0.1.0/packages/tonguetoquill-usaf-letter/fonts/LiberationMono/LiberationMono-Regular.ttf +0 -0
  36. package/quills/usaf_letter/0.1.0/packages/tonguetoquill-usaf-letter/fonts/NimbusRomanNo9L/GNU General Public License.txt +340 -0
  37. package/quills/usaf_letter/0.1.0/packages/tonguetoquill-usaf-letter/fonts/NimbusRomanNo9L/NimbusRomNo9L-Med.otf +0 -0
  38. package/quills/usaf_letter/0.1.0/packages/tonguetoquill-usaf-letter/fonts/NimbusRomanNo9L/NimbusRomNo9L-MedIta.otf +0 -0
  39. package/quills/usaf_letter/0.1.0/packages/tonguetoquill-usaf-letter/fonts/NimbusRomanNo9L/NimbusRomNo9L-Reg.otf +0 -0
  40. package/quills/usaf_letter/0.1.0/packages/tonguetoquill-usaf-letter/fonts/NimbusRomanNo9L/NimbusRomNo9L-RegIta.otf +0 -0
  41. package/quills/usaf_letter/0.1.0/packages/tonguetoquill-usaf-letter/src/backmatter.typ +32 -0
  42. package/quills/usaf_letter/0.1.0/packages/tonguetoquill-usaf-letter/src/config.typ +45 -0
  43. package/quills/usaf_letter/0.1.0/packages/tonguetoquill-usaf-letter/src/frontmatter.typ +226 -0
  44. package/quills/usaf_letter/0.1.0/packages/tonguetoquill-usaf-letter/src/lib.typ +35 -0
  45. package/quills/usaf_letter/0.1.0/packages/tonguetoquill-usaf-letter/src/mainmatter.typ +140 -0
  46. package/quills/usaf_letter/0.1.0/packages/tonguetoquill-usaf-letter/src/primitives.typ +544 -0
  47. package/quills/usaf_letter/0.1.0/packages/tonguetoquill-usaf-letter/src/utils.typ +334 -0
  48. package/quills/usaf_letter/0.1.0/packages/tonguetoquill-usaf-letter/typst.toml +22 -0
  49. package/quills/usaf_letter/0.1.0/plate.typ +124 -0
  50. package/quills/usaf_memo/0.2.0/Quill.yaml +1 -1
  51. package/quills/usaf_memo/0.2.0/packages/tonguetoquill-usaf-memo/LICENSE +201 -21
  52. package/quills/usaf_memo/0.2.0/packages/tonguetoquill-usaf-memo/typst.toml +1 -1
  53. package/quills/usaf_memo/0.3.0/Quill.yaml +62 -43
  54. package/quills/usaf_memo/0.3.0/packages/tonguetoquill-usaf-memo/LICENSE +201 -21
  55. package/quills/usaf_memo/0.3.0/packages/tonguetoquill-usaf-memo/fonts/Cinzel/Cinzel-Regular.ttf +0 -0
  56. package/quills/usaf_memo/0.3.0/packages/tonguetoquill-usaf-memo/src/backmatter.typ +29 -17
  57. package/quills/usaf_memo/0.3.0/packages/tonguetoquill-usaf-memo/src/body.typ +97 -126
  58. package/quills/usaf_memo/0.3.0/packages/tonguetoquill-usaf-memo/src/config.typ +12 -45
  59. package/quills/usaf_memo/0.3.0/packages/tonguetoquill-usaf-memo/src/frontmatter.typ +81 -87
  60. package/quills/usaf_memo/0.3.0/packages/tonguetoquill-usaf-memo/src/indorsement.typ +58 -66
  61. package/quills/usaf_memo/0.3.0/packages/tonguetoquill-usaf-memo/src/lib.typ +14 -36
  62. package/quills/usaf_memo/0.3.0/packages/tonguetoquill-usaf-memo/src/mainmatter.typ +47 -19
  63. package/quills/usaf_memo/0.3.0/packages/tonguetoquill-usaf-memo/src/primitives.typ +158 -111
  64. package/quills/usaf_memo/0.3.0/packages/tonguetoquill-usaf-memo/src/utils.typ +41 -141
  65. package/quills/usaf_memo/0.3.0/packages/tonguetoquill-usaf-memo/typst.toml +3 -8
  66. package/quills/usaf_memo/0.3.0/plate.typ +81 -85
  67. package/templates/af4141.md +23 -0
  68. package/templates/appointment_letter.md +58 -0
  69. package/templates/daf1206.md +23 -0
  70. package/templates/daf4392.md +34 -0
  71. package/templates/pass_request.md +48 -0
  72. package/templates/rebuttal.md +63 -0
  73. package/templates/templates.json +58 -0
  74. package/templates/usaf_template.md +30 -0
  75. package/templates/ussf_template.md +30 -0
  76. package/quills/usaf_memo/0.3.0/packages/tonguetoquill-usaf-memo/fonts/Cinzel/Cinzel[wght].ttf +0 -0
@@ -0,0 +1,35 @@
1
+ // Public API of the USAF personal letter template, which typesets per AFH
2
+ // 33-337 "The Tongue and Quill", "The Personal Letter".
3
+ //
4
+ // The three sections compose in document order: `frontmatter` and `mainmatter`
5
+ // as show rules, `backmatter` as a function.
6
+ //
7
+ // `config.typ`, `utils.typ` and `primitives.typ` are `tonguetoquill-usaf-memo`
8
+ // 5.0.0's, byte for byte, so the letterhead, signature block and closing
9
+ // elements the two documents share are set by one implementation and a sync is
10
+ // a copy. The other files are the letter's own.
11
+ //
12
+ // #import "@preview/tonguetoquill-usaf-letter:0.1.0": (
13
+ // backmatter, frontmatter, mainmatter,
14
+ // )
15
+ //
16
+ // #show: frontmatter.with(
17
+ // letter-from: ("Colonel Jane A. Doe", "Commander", "123d Example Squadron",
18
+ // "1 Example Way", "Placeholder AFB ST 12345-6789"),
19
+ // letter-for: ("Major John B. Smith", "Chief, Plans and Programs",
20
+ // "456th Example Group", "2 Sample Blvd", "Sample AFB ST 98765-4321"),
21
+ // salutation: "Dear Major Smith",
22
+ // )
23
+ // #show: mainmatter
24
+ //
25
+ // Body paragraphs.
26
+ //
27
+ // #backmatter(
28
+ // complimentary-close: "Sincerely",
29
+ // signature-block: ("FIRST M. LAST, Rank, USAF",),
30
+ // )
31
+
32
+ #import "frontmatter.typ": frontmatter
33
+ #import "mainmatter.typ": mainmatter
34
+ #import "backmatter.typ": backmatter
35
+ #import "utils.typ": date-pattern
@@ -0,0 +1,140 @@
1
+ // The personal letter's body: AFH 33-337 "For the body of the personal letter,
2
+ // the paragraphs are indented 0.5 inches from the left margin but they are not
3
+ // numbered."
4
+
5
+ #import "config.typ": *
6
+ #import "utils.typ": *
7
+ #import "primitives.typ": render-memo-table
8
+
9
+ // AFH 33-337: a personal letter's paragraphs are indented half an inch from the
10
+ // left margin and carry no number or letter.
11
+ #let paragraph-indent = 0.5in
12
+
13
+ /// Splits content at the closing section: the part this styles as body
14
+ /// paragraphs, and the part that reaches the page untouched.
15
+ ///
16
+ /// Applied as a show rule, `mainmatter` is handed the closing section along
17
+ /// with the body, and the body's first-line indent would then displace the
18
+ /// complimentary close and the signature lines. `backmatter` labels its output
19
+ /// to mark the boundary.
20
+ ///
21
+ /// Everything from the marker on stays together, prose a caller wrote after the
22
+ /// closing included.
23
+ ///
24
+ /// A marker is found on `it` itself, on a direct child, or inside the `styled`
25
+ /// element that a `set` or `show` rule after `#show: mainmatter` wraps the
26
+ /// remainder in; both halves come back under those styles. A marker a caller
27
+ /// nested in a container of their own — a `block`, a `grid` cell — is not
28
+ /// found. A closing section built in a code block or a loop is not nested:
29
+ /// joining content extends the sequence on the left in place, so its marker
30
+ /// stays a direct child.
31
+ ///
32
+ /// - it (content): Content handed to `mainmatter`
33
+ /// -> array: the body content and the closing content
34
+ #let split-closing(it) = {
35
+ if it.at("label", default: none) == <usaf-letter-closing> { return ([], it) }
36
+ // `styled` is not a name in scope; its two fields identify it.
37
+ if it.has("child") and it.has("styles") {
38
+ let (body, closing) = split-closing(it.child)
39
+ let restyle = part => (it.func())(part, it.styles)
40
+ return (restyle(body), restyle(closing))
41
+ }
42
+ if not it.has("children") { return (it, []) }
43
+ let children = it.children
44
+ let boundary = children.position(child => child.at("label", default: none) == <usaf-letter-closing>)
45
+ if boundary == none { return (it, []) }
46
+ // `sum` over `join`: an empty half is `none` from a join and `[]` from this.
47
+ (children.slice(0, boundary).sum(default: []), children.slice(boundary).sum(default: []))
48
+ }
49
+
50
+ // The body's blocks in order — its own paragraphs, and each list, table and
51
+ // block quote whole — so the last can be found; and how deep in one of those
52
+ // containers the current paragraph sits.
53
+ #let BLOCKS = counter("usaf-letter-blocks")
54
+ #let NESTED = state("usaf-letter-nested", 0)
55
+
56
+ /// Whether a body's last block holds the signature to its page: a sticky block
57
+ /// relocates whole rather than splitting, so one taller than a third of the
58
+ /// text height is left to the break, which leaves its own tail above the
59
+ /// signature.
60
+ ///
61
+ /// - it (content): The last block
62
+ /// -> bool
63
+ #let keeps-signature(it) = {
64
+ let budget = (page.height - spacing.margin * 2) / 3
65
+ measure(it, width: page.width - spacing.margin * 2).height <= budget
66
+ }
67
+
68
+ /// Counts a container as one block of the body and the paragraphs inside it
69
+ /// as none, and sets it a blank line off the paragraphs around it.
70
+ ///
71
+ /// - it (content): The container
72
+ /// -> content
73
+ #let container(it) = context {
74
+ if NESTED.get() > 0 { return it }
75
+ BLOCKS.step()
76
+ NESTED.update(n => n + 1)
77
+ context {
78
+ let last = BLOCKS.get() == BLOCKS.final()
79
+ block(above: par.spacing, sticky: last and keeps-signature(it), it)
80
+ }
81
+ NESTED.update(n => n - 1)
82
+ }
83
+
84
+ /// Show rule for the personal letter's body.
85
+ ///
86
+ /// - it (content): Body content
87
+ /// -> content
88
+ #let mainmatter(it) = {
89
+ let (body, closing) = split-closing(it)
90
+ context {
91
+ // `par.leading` and `par.spacing` are both half an em, so a paragraph break
92
+ // would otherwise land on the page as an ordinary line break. A blank line
93
+ // is what separates one letter paragraph from the next.
94
+ set par(
95
+ first-line-indent: (amount: paragraph-indent, all: true),
96
+ spacing: spacing.line + line-stride(),
97
+ )
98
+ // The indent belongs to the letter's own paragraphs. Inside a list, a
99
+ // quote, or a table cell, a line already sits where its container put it.
100
+ show list: it => {
101
+ set par(first-line-indent: 0pt)
102
+ container(it)
103
+ }
104
+ show enum: it => {
105
+ set par(first-line-indent: 0pt)
106
+ container(it)
107
+ }
108
+ show table: it => {
109
+ set par(first-line-indent: 0pt)
110
+ container(render-memo-table(it))
111
+ }
112
+ // A block quote is the body's unindented block: the author's lines as
113
+ // written, flush with the margin, which is what lets a letter carry a
114
+ // roster of names or an address without the paragraph indent claiming its
115
+ // first line.
116
+ show quote.where(block: true): it => {
117
+ set par(first-line-indent: 0pt)
118
+ container(it.body)
119
+ }
120
+ show raw.where(block: true): container
121
+ // AFH 33-337: "Do not place the signature element on a continuation page
122
+ // by itself." The signature block has no keep-with-previous of its own —
123
+ // Typst has no such property — so the anchor comes from this side: the
124
+ // body's last block, a paragraph or a container, is set sticky, carried
125
+ // onto the next page along with the signature instead of breaking away
126
+ // from it.
127
+ show par: p => context {
128
+ if NESTED.get() > 0 { return p }
129
+ BLOCKS.step()
130
+ context {
131
+ if BLOCKS.get() != BLOCKS.final() { return p }
132
+ // `above` stands in for the paragraph spacing a bare paragraph would
133
+ // have taken from the one before it.
134
+ block(sticky: keeps-signature(p), above: par.spacing, p)
135
+ }
136
+ }
137
+ body
138
+ }
139
+ closing
140
+ }