@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,127 @@
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
+ import { PubidDate, Publisher } from "../../model/component.js";
5
+ import { BaseUrnGenerator } from "../../model/urn-generator.js";
6
+ /**
7
+ * Port of lib/pubid/bsi: the shared base (single_identifier.rb), the
8
+ * typed-stage registry (bsi.rb TYPED_STAGES_REGISTRY), the ~25 concrete
9
+ * identifier classes, the renderer (renderer.rb) and the URN generator
10
+ * (urn_generator.rb).
11
+ */
12
+ export declare class BsiCode {
13
+ readonly value: string;
14
+ constructor(attrs: Record<string, unknown>);
15
+ render(): string;
16
+ toWire(): Record<string, unknown>;
17
+ }
18
+ export interface BsiTypedStage {
19
+ code: string;
20
+ stageCode: string;
21
+ typeCode: string;
22
+ abbr: string[];
23
+ name: string;
24
+ harmonizedStages: string[];
25
+ }
26
+ export declare const TYPED_STAGES_REGISTRY: BsiTypedStage[];
27
+ export declare const DEFAULT_TYPED_STAGE: BsiTypedStage;
28
+ export declare function locateStage(abbr: string): BsiTypedStage | undefined;
29
+ export declare const TYPE_CLASSES: Record<string, IdentifierStatic>;
30
+ /** Wraps a registry entry so the attribute machinery can coerce the
31
+ * wire's typed_stage block back into the runtime state. */
32
+ export declare class BsiTypedStageRef {
33
+ readonly code: string;
34
+ readonly stageCode: string;
35
+ readonly typeCode: string;
36
+ readonly abbr: string[];
37
+ readonly name: string;
38
+ readonly harmonizedStages: string[];
39
+ constructor(attrs: Record<string, unknown>);
40
+ }
41
+ declare class BsiUrnGenerator extends BaseUrnGenerator<BsiIdentifier> {
42
+ generate(): string;
43
+ }
44
+ export declare class BsiIdentifier extends BaseIdentifier {
45
+ static polymorphicName: string;
46
+ static urnGenerator: typeof BsiUrnGenerator;
47
+ static attributes: AttributeTable;
48
+ /** The gem serializes the full typed-stage registry entry (type,
49
+ * stage, typed_stage blocks) for every non-default typed stage. */
50
+ static compactHash: (model: BaseIdentifier, hash: Record<string, unknown>) => void;
51
+ static mappings: FieldMapping[];
52
+ readonly publisher: Publisher | undefined;
53
+ readonly prefix: string | undefined;
54
+ readonly flex_prefix: string | undefined;
55
+ readonly number: string | undefined;
56
+ readonly iteration: string | undefined;
57
+ readonly part: string | undefined;
58
+ readonly subpart: string | undefined;
59
+ readonly second_number: BsiCode | undefined;
60
+ readonly date: PubidDate | undefined;
61
+ readonly edition: string | undefined;
62
+ readonly month: number | undefined;
63
+ readonly translation_lang: string | undefined;
64
+ readonly translation_upper: string | undefined;
65
+ readonly explicit_prefix: boolean | undefined;
66
+ readonly explicit_publisher: boolean | undefined;
67
+ readonly space_separated_part: boolean | undefined;
68
+ constructor(attrs?: Record<string, unknown>);
69
+ root(): BsiIdentifier;
70
+ render(): string;
71
+ }
72
+ export declare const BritishStandardClass: IdentifierStatic;
73
+ export declare const DraftDocumentClass: IdentifierStatic;
74
+ export declare const PublishedDocumentClass: IdentifierStatic;
75
+ export declare const PubliclyAvailableSpecificationClass: IdentifierStatic;
76
+ export declare const TechnicalSpecificationClass: IdentifierStatic;
77
+ export declare const ElectronicBookClass: IdentifierStatic;
78
+ export declare const AerospaceStandardClass: IdentifierStatic;
79
+ export declare const FlexClass: IdentifierStatic;
80
+ export declare const IndexClass: IdentifierStatic;
81
+ export declare const SupplementaryIndexClass: IdentifierStatic;
82
+ export declare const ExplanatorySupplementClass: IdentifierStatic;
83
+ export declare const MethodClass: IdentifierStatic;
84
+ export declare const TestMethodClass: IdentifierStatic;
85
+ export declare const SectionClass: IdentifierStatic;
86
+ export declare const DetailedSpecificationClass: IdentifierStatic;
87
+ export declare const DiscClass: IdentifierStatic;
88
+ export declare const StandaloneAmendmentClass: IdentifierStatic;
89
+ export declare const CommitteeDocumentClass: IdentifierStatic;
90
+ export declare class Amendment extends BsiIdentifier {
91
+ static polymorphicName: string;
92
+ static urnGenerator: typeof BsiUrnGenerator;
93
+ static attributes: AttributeTable;
94
+ static mappings: FieldMapping[];
95
+ readonly base: BsiIdentifier | undefined;
96
+ readonly year: string | undefined;
97
+ readonly separator: string | undefined;
98
+ readonly amd_suffix_form: boolean | undefined;
99
+ root(): BsiIdentifier;
100
+ render(): string;
101
+ }
102
+ export declare class Corrigendum extends BsiIdentifier {
103
+ static polymorphicName: string;
104
+ static urnGenerator: typeof BsiUrnGenerator;
105
+ static attributes: AttributeTable;
106
+ static mappings: FieldMapping[];
107
+ readonly base: BsiIdentifier | undefined;
108
+ readonly year: string | undefined;
109
+ readonly separator: string | undefined;
110
+ root(): BsiIdentifier;
111
+ render(): string;
112
+ }
113
+ export declare const SupplementDocumentClass: IdentifierStatic;
114
+ export declare const AddendumDocumentClass: IdentifierStatic;
115
+ export declare const BundledIdentifierClass: IdentifierStatic;
116
+ export declare const SetClass: IdentifierStatic;
117
+ export declare const ExpertCommentaryClass: IdentifierStatic;
118
+ export declare const ValueAddedPublicationClass: IdentifierStatic;
119
+ export declare const NationalAnnexClass: IdentifierStatic;
120
+ export declare const AdoptedEuropeanNormClass: IdentifierStatic;
121
+ export declare const AdoptedInternationalStandardClass: IdentifierStatic;
122
+ interface ConsolidatedLike extends BsiIdentifier {
123
+ identifiers: BsiIdentifier[];
124
+ }
125
+ export declare const ConsolidatedIdentifierClass: IdentifierStatic;
126
+ export declare function consolidatedUrn(id: ConsolidatedLike): string | undefined;
127
+ export {};