@pubid/pubid 0.1.48 → 0.1.49

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.
@@ -3,7 +3,15 @@ import { extendAttributes, keyValue } from "../../model/attribute.js";
3
3
  import { Language, PubidDate, Iteration } from "../../model/component.js";
4
4
  const TS = (code, stageCode, typeCode, abbr, harmonized, tokens) => ({ code, stageCode, typeCode, abbr, harmonized, tokens });
5
5
  export const TYPED_STAGES = [
6
- TS("is", "published", "is", ""),
6
+ // The published IS row lists the publication-lifecycle spellings
7
+ // (BPUB, PPUB, APUB, WPUB, DELPUB, RR, …): they parse onto the
8
+ // published stage whose canonical abbr is "" — the abbreviation drops
9
+ // out of the render ("IEC BPUB 60038" -> "IEC 60038"). The leading ""
10
+ // keeps the grammar's empty type_with_stage match byte-identical with
11
+ // the pre-fold alternation (the bare published face's parse tree).
12
+ TS("is", "published", "is", "", undefined, [
13
+ "", "BPUB", "PPUB", "APUB", "WPUB", "DELPUB", "RR",
14
+ ]),
7
15
  TS("tr", "published", "tr", "TR"),
8
16
  TS("ts", "published", "ts", "TS"),
9
17
  TS("pas", "published", "pas", "PAS"),
@@ -21,48 +29,86 @@ export const TYPED_STAGES = [
21
29
  // ComponentSpecification/ConformityAssessment.
22
30
  TS("cs", "published", "cs", "CS"),
23
31
  TS("ca", "published", "ca", "CA"),
24
- // The `harmonized` column is the gem's harmonized_stages.first (pubid
25
- // 2.0.32, verified in-process — issue #187): the official URN stage slot
26
- // writes `stage-<lead code>` and the URN parser resolves the slot back
27
- // by (type, lead code). The draft supplement rows (dcor/fdcor/cdish/
28
- // dish) stay code-less: their stages ride the supplement layer, and the
29
- // official URN reads the ROOT's stage — a published base or a
30
- // stage-less synthetic one — so the gem never writes these codes into
31
- // the slot.
32
+ // The draft ladders below mirror the gem 2.0.32 per-deliverable
33
+ // TYPED_STAGES rows (lib/pubid/iec/identifiers/*.rb): one row per
34
+ // (deliverable, stage), `abbr` the canonical (ruby abbr.first) spelling
35
+ // the render face prints, `tokens` the spellings the row accepts at
36
+ // parse. The gem's render normalizes every spelling onto abbr.first
37
+ // (renderer.rb: `id.typed_stage.abbr.first`) and its wire carries
38
+ // typed_stage.code — so a folded spelling parses, renders and
39
+ // serializes AS its row's canonical twin ("IEC PRF 60038" renders
40
+ // "IEC FDIS 60038" and hashes stage "fdis"). The gem-vs-SSOT
41
+ // contradictions recorded in #189/#190 (CDPAS 30.00-vs-50.20, the
42
+ // ADTR-family folding) stay on record; the gem is followed.
43
+ //
44
+ // `tokens` carry the spellings the gem's COMPILED grammar accepts
45
+ // (data/parg/iec.json), which is narrower than the registry's abbr
46
+ // lists: registry-only spellings (DEL, PRVN, AWI, DIS, ADIS, PCC,
47
+ // SPLIT, MERGED, CAN, RPUB, TPUB, DECPUB, SPE, and every PROJECT_STAGES
48
+ // name) are parse-rejected by the gem and stay out of the tokens.
49
+ // Resolution of a token is registry ORDER (ruby locate_stage scans
50
+ // TYPED_STAGES in order), so CDPAS resolves to :cdpas (30.00), never
51
+ // the :dpas row that also lists it, and DTSM — listed on the :dtr row —
52
+ // decodes onto the TR ladder, not :dts.
53
+ //
54
+ // The `harmonized` column is the gem's harmonized_stages.first (issue
55
+ // #187): the official URN stage slot writes `stage-<lead code>` and the
56
+ // URN parser resolves the slot back by (type, lead code). Published
57
+ // rows carry no harmonized: the slot is suppressed for them.
58
+ TS("pwi", "pwi", "is", "PWI", "00.00", ["PWI", "NWIP", "BWG", "AWIN", "AMW"]),
32
59
  // PNW owns harmonized 10.20 (gem: NP stages are 10.00/10.60/… — the
33
- // URN "stage-10.20" slot resolves to PNW, not NP).
34
- TS("np", "np", "is", "NP", "10.00"),
60
+ // URN "stage-10.20" slot resolves to PNW, not NP; #187).
61
+ TS("np", "np", "is", "NP", "10.00", ["NP"]),
35
62
  TS("pnw", "pnw", "is", "PNW", "10.20"),
36
- TS("pwi", "pwi", "is", "PWI", "00.00"),
37
- TS("anw", "anw", "is", "ANW", "10.99"),
63
+ TS("anw", "anw", "is", "ANW", "10.99", ["ANW"]),
38
64
  TS("wd", "wd", "is", "WD", "20.20"),
39
- TS("cd", "cd", "is", "CD", "30.00"),
40
- TS("cdv", "cdv", "is", "CDV", "40.00"),
41
- TS("fdis", "fdis", "is", "FDIS", "50.00"),
42
- // The gem registers PRF as an abbreviation of :fdis (lead 50.00) — it
43
- // has no typed stage of its own; the row stays for the render face and
44
- // takes fdis's lead code (the gem's parse even renders FDIS).
45
- TS("prf", "prf", "is", "PRF", "50.00"),
46
- // BPUB/PPUB are publication-lifecycle abbreviations of the published
47
- // IS in the gem (stage_code published, slot suppressed) — the rows
48
- // stay for the render face and carry no harmonized, so the slot
49
- // falls through empty.
50
- TS("bpub", "bpub", "is", "BPUB"),
51
- TS("ppub", "ppub", "is", "PPUB"),
52
- // The gem folds the whole draft-spelling family of each typed
53
- // deliverable onto ONE typed stage (ADTR/CDTR/NDTR are :dtr
54
- // abbreviations, lead 50.00) — every row takes that lead code; the
55
- // spellings stay for the render face.
56
- TS("dtr", "dtr", "tr", "DTR", "50.00"),
57
- TS("adtr", "adtr", "tr", "ADTR", "50.00"),
58
- TS("cdtr", "cdtr", "tr", "CDTR", "50.00"),
59
- TS("ndtr", "ndtr", "tr", "NDTR", "50.00"),
60
- TS("dts", "dts", "ts", "DTS", "50.00"),
61
- TS("adts", "adts", "ts", "ADTS", "50.00"),
62
- TS("cdts", "cdts", "ts", "CDTS", "50.00"),
63
- TS("ndts", "ndts", "ts", "NDTS", "50.00"),
64
- TS("dpas", "dpas", "pas", "DPAS", "50.00"),
65
- TS("cdpas", "cdpas", "pas", "CDPAS", "30.00"),
65
+ TS("cd", "cd", "is", "CD", "30.00", [
66
+ "CD", "2CD", "3CD", "4CD", "5CD", "6CD", "7CD", "8CD", "9CD",
67
+ "ACD", "A2CD", "A3CD", "A4CD", "A5CD", "A6CD", "A7CD", "A8CD", "A9CD",
68
+ "CDM",
69
+ ]),
70
+ TS("cdv", "cdv", "is", "CDV", "40.00", ["CDV", "ACDV", "CCDV", "CDVM", "NCDV"]),
71
+ TS("fdis", "fdis", "is", "FDIS", "50.00", [
72
+ "FDIS", "PRF", "NFDIS", "NADIS", "RDISH", "RFDIS", "CFDIS",
73
+ ]),
74
+ // The TR ladder — the two-token faces ("IEC CD TR 62048") are the
75
+ // per-deliverable rows' spellings, each decoding onto its own typed
76
+ // stage with the deliverable's type code.
77
+ TS("pwi_tr", "pwi", "tr", "PWI TR", "00.00"),
78
+ TS("np_tr", "np", "tr", "NP TR", "10.00"),
79
+ TS("anw_tr", "anw", "tr", "ANW TR", "10.99"),
80
+ TS("wd_tr", "wd", "tr", "WD TR", "20.20"),
81
+ TS("cd_tr", "cd", "tr", "CD TR", "30.00"),
82
+ // The whole draft-spelling family folds onto :dtr (ruby abbr.first
83
+ // "DTR"); DTSM rides the :dtr row in the gem's registry even though the
84
+ // spelling names the TS deliverable's rejected stage — mirrored.
85
+ TS("dtr", "draft", "tr", "DTR", "50.00", ["DTR", "ADTR", "CDTR", "DTRM", "NDTR", "DTSM"]),
86
+ // The TS ladder.
87
+ TS("pwi_ts", "pwi", "ts", "PWI TS", "00.00"),
88
+ TS("np_ts", "np", "ts", "NP TS", "10.00"),
89
+ TS("anw_ts", "anw", "ts", "ANW TS", "10.99"),
90
+ TS("wd_ts", "wd", "ts", "WD TS", "20.20"),
91
+ TS("cd_ts", "cd", "ts", "CD TS", "30.00"),
92
+ TS("dts", "draft", "ts", "DTS", "50.00", ["DTS", "ADTS", "CDTS", "NDTS"]),
93
+ // The PAS ladder.
94
+ TS("pwi_pas", "pwi", "pas", "PWI PAS", "00.00"),
95
+ TS("np_pas", "np", "pas", "NP PAS", "10.00"),
96
+ TS("anw_pas", "anw", "pas", "ANW PAS", "10.99"),
97
+ TS("wd_pas", "wd", "pas", "WD PAS", "20.20"),
98
+ // CDPAS is the committee-draft PAS row (lead 30.00) — the gem's
99
+ // :cdpas registry row wins over :dpas's spelling by order. The
100
+ // SSOT table (data/iec/stage-codes.md) names CDPAS 50.20: the
101
+ // recorded gem-vs-SSOT contradiction stands (owner's call).
102
+ TS("cdpas", "cd", "pas", "CDPAS", "30.00"),
103
+ TS("dpas", "draft", "pas", "DPAS", "50.00", ["DPAS", "CDPAS"]),
104
+ // The Guide ladder (the two-token faces and the DGuide/FDGuide drafts).
105
+ TS("pwi_guide", "pwi", "guide", "PWI Guide", "00.00"),
106
+ TS("np_guide", "np", "guide", "NP Guide", "10.00"),
107
+ TS("anw_guide", "anw", "guide", "ANW Guide", "10.99"),
108
+ TS("wd_guide", "wd", "guide", "WD Guide", "20.20"),
109
+ TS("cd_guide", "cd", "guide", "CD Guide", "30.00"),
110
+ TS("dguide", "draft", "guide", "DGuide", "40.00"),
111
+ TS("fdguide", "final_draft", "guide", "FDGuide", "50.00", ["FDGuide", "PRF Guide"]),
66
112
  // The DAM family's ballot stages carry the CIRCULATION slots as the
67
113
  // lead harmonized code (30.20/50.20), not ISO's 30.00/50.00 — CDAM/
68
114
  // FDAM keep those (type, leading code) URN keys (gem Amendment
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pubid/pubid",
3
- "version": "0.1.48",
3
+ "version": "0.1.49",
4
4
  "description": "TypeScript PubID identifiers: resolution, normalization and canonical hashes for every identifier in the pubid-testsuite corpus (41 standards bodies), with a conformance runner mirroring the Ruby reference",
5
5
  "type": "module",
6
6
  "license": "MIT",