@pubid/pubid 0.1.3 → 0.1.5

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 (185) hide show
  1. package/artifact/corpus.json.gz +0 -0
  2. package/dist/conformance/cli.js +5 -1
  3. package/dist/flavors/amca/grammar.d.ts +4 -0
  4. package/dist/flavors/amca/grammar.js +87 -0
  5. package/dist/flavors/amca/index.d.ts +4 -0
  6. package/dist/flavors/amca/index.js +76 -0
  7. package/dist/flavors/amca/model.d.ts +29 -0
  8. package/dist/flavors/amca/model.js +146 -0
  9. package/dist/flavors/ansi/index.d.ts +24 -0
  10. package/dist/flavors/ansi/index.js +147 -0
  11. package/dist/flavors/api/grammar.d.ts +4 -0
  12. package/dist/flavors/api/grammar.js +79 -0
  13. package/dist/flavors/api/index.d.ts +4 -0
  14. package/dist/flavors/api/index.js +71 -0
  15. package/dist/flavors/api/model.d.ts +27 -0
  16. package/dist/flavors/api/model.js +114 -0
  17. package/dist/flavors/ashrae/grammar.d.ts +2 -0
  18. package/dist/flavors/ashrae/grammar.js +667 -0
  19. package/dist/flavors/ashrae/index.d.ts +4 -0
  20. package/dist/flavors/ashrae/index.js +306 -0
  21. package/dist/flavors/ashrae/model.d.ts +87 -0
  22. package/dist/flavors/ashrae/model.js +335 -0
  23. package/dist/flavors/ashrae/preprocessor.d.ts +7 -0
  24. package/dist/flavors/ashrae/preprocessor.js +44 -0
  25. package/dist/flavors/asme/grammar.d.ts +2 -0
  26. package/dist/flavors/asme/grammar.js +200 -0
  27. package/dist/flavors/asme/index.d.ts +4 -0
  28. package/dist/flavors/asme/index.js +138 -0
  29. package/dist/flavors/asme/model.d.ts +34 -0
  30. package/dist/flavors/asme/model.js +123 -0
  31. package/dist/flavors/astm/grammar.d.ts +2 -0
  32. package/dist/flavors/astm/grammar.js +110 -0
  33. package/dist/flavors/astm/index.d.ts +2 -0
  34. package/dist/flavors/astm/index.js +127 -0
  35. package/dist/flavors/astm/model.d.ts +42 -0
  36. package/dist/flavors/astm/model.js +263 -0
  37. package/dist/flavors/bipm/index.d.ts +30 -0
  38. package/dist/flavors/bipm/index.js +434 -0
  39. package/dist/flavors/bsi/grammar.d.ts +4 -0
  40. package/dist/flavors/bsi/grammar.js +535 -0
  41. package/dist/flavors/bsi/index.d.ts +4 -0
  42. package/dist/flavors/bsi/index.js +941 -0
  43. package/dist/flavors/bsi/model.d.ts +127 -0
  44. package/dist/flavors/bsi/model.js +863 -0
  45. package/dist/flavors/calconnect/index.d.ts +21 -0
  46. package/dist/flavors/calconnect/index.js +113 -0
  47. package/dist/flavors/cen_cenelec/grammar.d.ts +4 -0
  48. package/dist/flavors/cen_cenelec/grammar.js +107 -0
  49. package/dist/flavors/cen_cenelec/index.d.ts +5 -0
  50. package/dist/flavors/cen_cenelec/index.js +263 -0
  51. package/dist/flavors/cen_cenelec/model.d.ts +45 -0
  52. package/dist/flavors/cen_cenelec/model.js +490 -0
  53. package/dist/flavors/cie/grammar.d.ts +5 -0
  54. package/dist/flavors/cie/grammar.js +127 -0
  55. package/dist/flavors/cie/index.d.ts +2 -0
  56. package/dist/flavors/cie/index.js +311 -0
  57. package/dist/flavors/cie/model.d.ts +122 -0
  58. package/dist/flavors/cie/model.js +464 -0
  59. package/dist/flavors/csa/grammar.d.ts +6 -0
  60. package/dist/flavors/csa/grammar.js +239 -0
  61. package/dist/flavors/csa/index.d.ts +2 -0
  62. package/dist/flavors/csa/index.js +634 -0
  63. package/dist/flavors/csa/model.d.ts +33 -0
  64. package/dist/flavors/csa/model.js +505 -0
  65. package/dist/flavors/doi/index.d.ts +13 -0
  66. package/dist/flavors/doi/index.js +65 -0
  67. package/dist/flavors/easc/index.d.ts +4 -0
  68. package/dist/flavors/easc/index.js +107 -0
  69. package/dist/flavors/ecma/index.d.ts +4 -0
  70. package/dist/flavors/ecma/index.js +117 -0
  71. package/dist/flavors/etsi/index.d.ts +14 -0
  72. package/dist/flavors/etsi/index.js +307 -0
  73. package/dist/flavors/evs/grammar.d.ts +2 -0
  74. package/dist/flavors/evs/grammar.js +22 -0
  75. package/dist/flavors/evs/index.d.ts +2 -0
  76. package/dist/flavors/evs/index.js +24 -0
  77. package/dist/flavors/evs/model.d.ts +19 -0
  78. package/dist/flavors/evs/model.js +36 -0
  79. package/dist/flavors/gb/index.d.ts +31 -0
  80. package/dist/flavors/gb/index.js +159 -0
  81. package/dist/flavors/gost/grammar.d.ts +2 -0
  82. package/dist/flavors/gost/grammar.js +46 -0
  83. package/dist/flavors/gost/index.d.ts +2 -0
  84. package/dist/flavors/gost/index.js +165 -0
  85. package/dist/flavors/gost/model.d.ts +61 -0
  86. package/dist/flavors/gost/model.js +147 -0
  87. package/dist/flavors/gost/prefix_routes.d.ts +15 -0
  88. package/dist/flavors/gost/prefix_routes.js +192 -0
  89. package/dist/flavors/iala/index.d.ts +32 -0
  90. package/dist/flavors/iala/index.js +300 -0
  91. package/dist/flavors/iana/index.d.ts +19 -0
  92. package/dist/flavors/iana/index.js +71 -0
  93. package/dist/flavors/idf/grammar.d.ts +2 -0
  94. package/dist/flavors/idf/grammar.js +71 -0
  95. package/dist/flavors/idf/index.d.ts +2 -0
  96. package/dist/flavors/idf/index.js +100 -0
  97. package/dist/flavors/idf/model.d.ts +54 -0
  98. package/dist/flavors/idf/model.js +359 -0
  99. package/dist/flavors/iec/grammar.d.ts +3 -0
  100. package/dist/flavors/iec/grammar.js +187 -0
  101. package/dist/flavors/iec/index.d.ts +4 -0
  102. package/dist/flavors/iec/index.js +507 -0
  103. package/dist/flavors/iec/model.d.ts +54 -0
  104. package/dist/flavors/iec/model.js +437 -0
  105. package/dist/flavors/ieee/grammar.d.ts +2 -0
  106. package/dist/flavors/ieee/grammar.js +697 -0
  107. package/dist/flavors/ieee/index.d.ts +3 -0
  108. package/dist/flavors/ieee/index.js +1258 -0
  109. package/dist/flavors/ieee/model.d.ts +144 -0
  110. package/dist/flavors/ieee/model.js +1237 -0
  111. package/dist/flavors/ieee/preprocessor.d.ts +8 -0
  112. package/dist/flavors/ieee/preprocessor.js +410 -0
  113. package/dist/flavors/ieee/update_codes.d.ts +8 -0
  114. package/dist/flavors/ieee/update_codes.js +197 -0
  115. package/dist/flavors/ietf/index.d.ts +30 -0
  116. package/dist/flavors/ietf/index.js +151 -0
  117. package/dist/flavors/iho/index.d.ts +4 -0
  118. package/dist/flavors/iho/index.js +126 -0
  119. package/dist/flavors/index.d.ts +9 -0
  120. package/dist/flavors/index.js +136 -0
  121. package/dist/flavors/isbn/index.d.ts +13 -0
  122. package/dist/flavors/isbn/index.js +97 -0
  123. package/dist/flavors/iso/grammar.d.ts +2 -0
  124. package/dist/flavors/iso/grammar.js +207 -0
  125. package/dist/flavors/iso/index.d.ts +2 -0
  126. package/dist/flavors/iso/index.js +343 -0
  127. package/dist/flavors/iso/model.d.ts +159 -0
  128. package/dist/flavors/iso/model.js +802 -0
  129. package/dist/flavors/iso/stages.generated.d.ts +13 -0
  130. package/dist/flavors/iso/stages.generated.js +391 -0
  131. package/dist/flavors/itu/grammar.d.ts +4 -0
  132. package/dist/flavors/itu/grammar.js +205 -0
  133. package/dist/flavors/itu/index.d.ts +2 -0
  134. package/dist/flavors/itu/index.js +224 -0
  135. package/dist/flavors/itu/model.d.ts +184 -0
  136. package/dist/flavors/itu/model.js +599 -0
  137. package/dist/flavors/jcgm/index.d.ts +7 -0
  138. package/dist/flavors/jcgm/index.js +300 -0
  139. package/dist/flavors/jis/index.d.ts +4 -0
  140. package/dist/flavors/jis/index.js +267 -0
  141. package/dist/flavors/nist/grammar.d.ts +2 -0
  142. package/dist/flavors/nist/grammar.js +287 -0
  143. package/dist/flavors/nist/index.d.ts +2 -0
  144. package/dist/flavors/nist/index.js +1244 -0
  145. package/dist/flavors/nist/model.d.ts +155 -0
  146. package/dist/flavors/nist/model.js +823 -0
  147. package/dist/flavors/nist/preprocessor.d.ts +11 -0
  148. package/dist/flavors/nist/preprocessor.js +281 -0
  149. package/dist/flavors/oasis/index.d.ts +23 -0
  150. package/dist/flavors/oasis/index.js +110 -0
  151. package/dist/flavors/ogc/index.d.ts +20 -0
  152. package/dist/flavors/ogc/index.js +75 -0
  153. package/dist/flavors/oiml/grammar.d.ts +2 -0
  154. package/dist/flavors/oiml/grammar.js +206 -0
  155. package/dist/flavors/oiml/implementation.d.ts +9 -0
  156. package/dist/flavors/oiml/implementation.js +45 -0
  157. package/dist/flavors/oiml/model.d.ts +23 -0
  158. package/dist/flavors/oiml/model.js +592 -0
  159. package/dist/flavors/omg/index.d.ts +14 -0
  160. package/dist/flavors/omg/index.js +73 -0
  161. package/dist/flavors/plateau/index.d.ts +4 -0
  162. package/dist/flavors/plateau/index.js +97 -0
  163. package/dist/flavors/tgpp/index.d.ts +4 -0
  164. package/dist/flavors/tgpp/index.js +122 -0
  165. package/dist/flavors/un/index.d.ts +13 -0
  166. package/dist/flavors/un/index.js +90 -0
  167. package/dist/flavors/w3c/index.d.ts +14 -0
  168. package/dist/flavors/w3c/index.js +148 -0
  169. package/dist/flavors/xsf/index.d.ts +18 -0
  170. package/dist/flavors/xsf/index.js +65 -0
  171. package/dist/grammar/engine.d.ts +78 -0
  172. package/dist/grammar/engine.js +351 -0
  173. package/dist/index.d.ts +1 -0
  174. package/dist/index.js +3 -0
  175. package/dist/model/attribute.d.ts +54 -0
  176. package/dist/model/attribute.js +53 -0
  177. package/dist/model/builder.d.ts +39 -0
  178. package/dist/model/builder.js +124 -0
  179. package/dist/model/component.d.ts +70 -0
  180. package/dist/model/component.js +170 -0
  181. package/dist/model/identifier.d.ts +84 -0
  182. package/dist/model/identifier.js +270 -0
  183. package/dist/model/urn-generator.d.ts +27 -0
  184. package/dist/model/urn-generator.js +91 -0
  185. package/package.json +1 -1
@@ -0,0 +1,144 @@
1
+ import { BaseIdentifier } from "../../model/identifier.js";
2
+ import type { IdentifierStatic } from "../../model/identifier.js";
3
+ import { type AttributeTable, type FieldMapping } from "../../model/attribute.js";
4
+ /**
5
+ * Port of lib/pubid/ieee: Components::Code/Draft/TypedStage, the
6
+ * Identifiers::* family, Renderer, UrnGenerator and Compaction.
7
+ *
8
+ * Wire: the split code columns (number/prefix/parts/separator) on
9
+ * CodeNumber leaves; typed_stage compacted to a `stage` scalar when the
10
+ * registry rebuilds it byte-identically (else the full object, fails
11
+ * closed); the draft serializes as its rendered string minus the "/".
12
+ */
13
+ export interface TypedStageRecord {
14
+ abbr: string[];
15
+ stage_code: string;
16
+ type_code: string;
17
+ iso_stage_equivalent?: string;
18
+ ieee_draft_equivalent?: string;
19
+ approval_status?: string;
20
+ project_status?: boolean;
21
+ }
22
+ export declare const TYPED_STAGES: TypedStageRecord[];
23
+ export declare function locateStage(abbr: string): TypedStageRecord | undefined;
24
+ export declare class IeeeTypedStage {
25
+ readonly record: TypedStageRecord;
26
+ constructor(record: TypedStageRecord);
27
+ get abbr(): string[];
28
+ get projectStatus(): boolean;
29
+ get ieeeDraftEquivalent(): string | undefined;
30
+ get typeCode(): string;
31
+ toWire(): Record<string, unknown>;
32
+ render(): string;
33
+ }
34
+ export declare class IeeeCode {
35
+ readonly prefix: string | undefined;
36
+ readonly number: string;
37
+ readonly parts: string[];
38
+ readonly originalSeparator: string | undefined;
39
+ constructor(attrs: Record<string, unknown>);
40
+ static parse(codeStr: string): IeeeCode | undefined;
41
+ render(): string;
42
+ }
43
+ export declare class IeeeDraft {
44
+ readonly version: string;
45
+ readonly revision: string | undefined;
46
+ readonly isoStage: string | undefined;
47
+ readonly isoIteration: string | undefined;
48
+ readonly year: string | undefined;
49
+ readonly month: string | undefined;
50
+ readonly day: string | undefined;
51
+ readonly originalMonth: string | undefined;
52
+ readonly commaBeforeMonth: boolean;
53
+ /** Distinguishes an explicit `false` from "not recorded" (Ruby's nil). */
54
+ readonly commaBeforeMonthSet: boolean;
55
+ constructor(attrs: Record<string, unknown>);
56
+ static parse(value: string): IeeeDraft | undefined;
57
+ render(): string;
58
+ }
59
+ export declare const RELATIONSHIP_PREFIXES: Record<string, string>;
60
+ export declare class IeeeRelationship {
61
+ readonly relationshipType: string;
62
+ readonly relatedIds: {
63
+ toHuman(): string;
64
+ }[];
65
+ readonly intermediateAmendments: {
66
+ toHuman(): string;
67
+ }[];
68
+ readonly approvedAmendmentsFlag: boolean;
69
+ constructor(relationshipType: string, relatedIds: {
70
+ toHuman(): string;
71
+ }[], intermediateAmendments: {
72
+ toHuman(): string;
73
+ }[], approvedAmendmentsFlag?: boolean);
74
+ render(): string;
75
+ }
76
+ export declare abstract class IeeeIdentifier extends BaseIdentifier {
77
+ static attributes: AttributeTable;
78
+ static mappings: FieldMapping[];
79
+ readonly publisher: string;
80
+ readonly copublisher: string[];
81
+ readonly year: string | undefined;
82
+ readonly type: string | undefined;
83
+ readonly draft_status: string | undefined;
84
+ readonly draft: string | undefined;
85
+ readonly revision: string | undefined;
86
+ readonly edition: string | undefined;
87
+ readonly month: string | undefined;
88
+ readonly day: string | undefined;
89
+ readonly redline: boolean | undefined;
90
+ readonly edition_month: string | undefined;
91
+ readonly space_before_draft: boolean | undefined;
92
+ readonly typed_stage: IeeeTypedStage | undefined;
93
+ readonly parenthetical_content: string | undefined;
94
+ readonly nickname: string | undefined;
95
+ readonly adoption: string | undefined;
96
+ readonly amendment_to: string | undefined;
97
+ readonly note: string | undefined;
98
+ readonly iso_identifier: string | undefined;
99
+ readonly revision_of: string | undefined;
100
+ readonly ashrae_number: string | undefined;
101
+ readonly ashrae_year: string | undefined;
102
+ readonly crossref: string | undefined;
103
+ readonly reaffirmed: string | undefined;
104
+ readonly interpretation: boolean | undefined;
105
+ readonly relationships: IeeeRelationship[] | undefined;
106
+ private draftObjCache;
107
+ draftObject(): IeeeDraft | undefined;
108
+ get codeObj(): IeeeCode | undefined;
109
+ root(): IeeeIdentifier;
110
+ yearForUrn(): string | undefined;
111
+ toHash(): Record<string, unknown>;
112
+ static fromHash(hash: Record<string, unknown>): BaseIdentifier;
113
+ }
114
+ export declare function renderIeeeBase(id: IeeeIdentifier): string;
115
+ export interface ClassSpec {
116
+ kind: string;
117
+ }
118
+ export declare const SupplementBaseDefs: {
119
+ base: {
120
+ type: IdentifierStatic;
121
+ };
122
+ };
123
+ export declare const StandardClass: IdentifierStatic;
124
+ export declare const ProjectDraftIdentifierClass: IdentifierStatic;
125
+ export declare const SiStandardClass: IdentifierStatic;
126
+ export declare const CorrigendumClass: IdentifierStatic;
127
+ export declare const AmendmentClass: IdentifierStatic;
128
+ export declare const InterpretationClass: IdentifierStatic;
129
+ export declare const ConformanceClass: IdentifierStatic;
130
+ export declare const DualPublishedClass: IdentifierStatic;
131
+ export declare const DualIdentifierClass: IdentifierStatic;
132
+ export declare const ParentheticalClass: IdentifierStatic;
133
+ export declare const AdoptedStandardClass: IdentifierStatic;
134
+ export declare const CsaDualPublishedClass: IdentifierStatic;
135
+ export declare const MultiNumberedClass: IdentifierStatic;
136
+ export declare const JointDevelopmentClass: IdentifierStatic;
137
+ export declare const IecIeeeCopublishedClass: IdentifierStatic;
138
+ export declare const AieeClass: IdentifierStatic;
139
+ export declare const IreClass: IdentifierStatic;
140
+ export declare const NescEditionClass: IdentifierStatic;
141
+ export declare const NescHandbookClass: IdentifierStatic;
142
+ export declare const NescRedlineClass: IdentifierStatic;
143
+ export declare const NescStandardClass: IdentifierStatic;
144
+ export declare const NescDraftClass: IdentifierStatic;