@airmark/quiver 0.20.4 → 0.22.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/README.md CHANGED
@@ -17,7 +17,7 @@ and aligned to the current Quillmark spec.
17
17
  ## Install
18
18
 
19
19
  ```bash
20
- npm install @airmark/quiver @quillmark/quiver@^0.6.0 @quillmark/wasm
20
+ npm install @airmark/quiver @quillmark/quiver @quillmark/wasm
21
21
  ```
22
22
 
23
23
  This package ships only the Source Quiver assets (`Quiver.yaml` + `quills/`)
@@ -42,13 +42,14 @@ const quiverYaml = fileURLToPath(import.meta.resolve('@airmark/quiver/Quiver.yam
42
42
  const quiver = await Quiver.fromDir(path.dirname(quiverYaml));
43
43
 
44
44
  const engine = new Quillmark();
45
- const doc = Document.fromMarkdown(`---
46
- QUILL: usaf_memo@0.2
45
+ const doc = Document.fromMarkdown(`~~~card-yaml
46
+ $quill: usaf_memo@0.2
47
+ $kind: main
47
48
  memo_for: ["ORG/SYMBOL"]
48
49
  memo_from: ["ORG/SYMBOL", "Organization Name", "123 Street Ave", "City ST 12345-6789"]
49
50
  subject: Hello Quillmark
50
51
  signature_block: ["FIRST M. LAST, Rank, USAF", "Duty Title"]
51
- ---
52
+ ~~~
52
53
 
53
54
  Body of the memo.`);
54
55
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@airmark/quiver",
3
- "version": "0.20.4",
3
+ "version": "0.22.0",
4
4
  "description": "Airmark Quiver — Air Force and DAF document Quills for Quillmark.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -17,7 +17,7 @@
17
17
  },
18
18
  "devDependencies": {
19
19
  "@quillmark/quiver": "^0.11.0",
20
- "@quillmark/wasm": "^0.80.0"
20
+ "@quillmark/wasm": "^0.83.0"
21
21
  },
22
22
  "scripts": {
23
23
  "test": "quiver test",
@@ -41,8 +41,8 @@
41
41
  #let max-rows = 37
42
42
  #{
43
43
  let row = 0
44
- for card in data.CARDS {
45
- if card.CARD == "experience" {
44
+ for card in data.at("$cards") {
45
+ if card.at("$kind") == "experience" {
46
46
  if row < max-rows {
47
47
  for (col, key) in col-keys.enumerate() {
48
48
  let value = form-cell(card.at(key, default: none))
@@ -30,17 +30,17 @@
30
30
  data.unit_commander_rank_name_and_telephone,
31
31
  )
32
32
  }
33
- #if "BODY" in data {
33
+ #if "$body" in data {
34
34
  vals.insert(
35
35
  "SPECIFIC_ACCOMPLISHMENTS_Use_Performance_Statements_IAW_DAFMAN_362806",
36
- data.BODY,
36
+ data.at("$body"),
37
37
  )
38
38
  }
39
39
 
40
40
  #let continued-key = "SPECIFIC_ACCOMPLISHMENTS_Use_Performance_Statements_IAW_DAFMAN_362806_Continued"
41
- #for card in data.CARDS {
42
- if card.CARD == "accomplishments_continued" and continued-key not in vals and "BODY" in card {
43
- vals.insert(continued-key, card.BODY)
41
+ #for card in data.at("$cards") {
42
+ if card.at("$kind") == "accomplishments_continued" and continued-key not in vals and "$body" in card {
43
+ vals.insert(continued-key, card.at("$body"))
44
44
  }
45
45
  }
46
46
 
@@ -18,8 +18,8 @@
18
18
  #let itin-cols = ("date", "departure_point", "arrival_point", "rest_length", "mileage")
19
19
  #{
20
20
  let row = 0
21
- for card in data.at("CARDS", default: ()) {
22
- if card.CARD == "itinerary" and row < 10 {
21
+ for card in data.at("$cards", default: ()) {
22
+ if card.at("$kind") == "itinerary" and row < 10 {
23
23
  let n = str(row + 1)
24
24
  for col in itin-cols {
25
25
  let v = card.at(col, default: none)
@@ -55,7 +55,7 @@
55
55
 
56
56
  // Mainmatter configuration
57
57
  #mainmatter[
58
- #data.BODY
58
+ #data.at("$body")
59
59
  ]
60
60
 
61
61
  // Backmatter
@@ -75,13 +75,13 @@
75
75
  )
76
76
 
77
77
  // Indorsements - iterate through CARDS array and filter by CARD tag
78
- #for (i, card) in data.CARDS.enumerate() {
79
- if card.CARD == "indorsement" {
78
+ #for (i, card) in data.at("$cards").enumerate() {
79
+ if card.at("$kind") == "indorsement" {
80
80
  // The quillmark helper leaves an unset/whitespace-only markdown body as
81
81
  // the empty string `""`; only non-empty bodies are eval'd into content.
82
82
  // Pass truly empty content (`[]`) in the empty case so indorsement can
83
83
  // collapse the body's surrounding spacing.
84
- let body = card.at("BODY", default: "")
84
+ let body = card.at("$body", default: "")
85
85
  let body_content = if type(body) == str { [] } else { body }
86
86
  // Per AFH 33-337 Ch. 14, an indorsement is dated when the endorser signs
87
87
  // it (distinct from the originating memo's date). Default to today when