@pubid/pubid 0.1.31 → 0.1.33

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 (66) hide show
  1. package/artifact/corpus.json.gz +0 -0
  2. package/dist/conformance/implementation.d.ts +4 -0
  3. package/dist/flavors/iec/index.js +12 -5
  4. package/dist/flavors/ieee/index.js +321 -113
  5. package/dist/flavors/ieee/model.d.ts +18 -0
  6. package/dist/flavors/ieee/model.js +62 -8
  7. package/dist/flavors/ieee/preprocessor.js +3 -0
  8. package/dist/flavors/ieee/update_codes.js +1 -1
  9. package/dist/flavors/iho/index.js +198 -35
  10. package/dist/flavors/jis/index.js +74 -2
  11. package/dist/flavors/nist/grammar.js +44 -16
  12. package/dist/flavors/nist/index.js +17 -2
  13. package/dist/implementations/corpus-mode.d.ts +3 -0
  14. package/dist/implementations/corpus-mode.js +7 -0
  15. package/dist/model/identifier.d.ts +3 -0
  16. package/dist/model/identifier.js +5 -0
  17. package/dist/urn/parsers.js +57 -20
  18. package/package.json +2 -2
  19. package/vendor/parg/adobe.json +1 -1
  20. package/vendor/parg/aiee.json +1 -1
  21. package/vendor/parg/amca.json +1 -1
  22. package/vendor/parg/ansi.json +1 -1
  23. package/vendor/parg/api.json +1 -1
  24. package/vendor/parg/ashrae.json +1 -1
  25. package/vendor/parg/asme.json +1 -1
  26. package/vendor/parg/astm.json +1 -1
  27. package/vendor/parg/bipm.json +1 -1
  28. package/vendor/parg/bsi.json +1 -1
  29. package/vendor/parg/calconnect.json +1 -1
  30. package/vendor/parg/ccsds.json +1 -1
  31. package/vendor/parg/cen_cenelec.json +1 -1
  32. package/vendor/parg/cie.json +1 -1
  33. package/vendor/parg/csa.json +1 -1
  34. package/vendor/parg/doi.json +1 -1
  35. package/vendor/parg/easc.json +1 -1
  36. package/vendor/parg/ecma.json +1 -1
  37. package/vendor/parg/etsi.json +1 -1
  38. package/vendor/parg/evs.json +1 -1
  39. package/vendor/parg/gb.json +1 -1
  40. package/vendor/parg/gost.json +1 -1
  41. package/vendor/parg/iala.json +1 -1
  42. package/vendor/parg/iana.json +1 -1
  43. package/vendor/parg/idf.json +1 -1
  44. package/vendor/parg/iec.json +1 -1
  45. package/vendor/parg/ieee.json +1 -29571
  46. package/vendor/parg/ietf.json +1 -1
  47. package/vendor/parg/iho.json +1 -0
  48. package/vendor/parg/ire.json +1 -1
  49. package/vendor/parg/isbn.json +1 -1
  50. package/vendor/parg/iso.json +1 -8510
  51. package/vendor/parg/itu.json +1 -1
  52. package/vendor/parg/jcgm.json +1 -1
  53. package/vendor/parg/jis.json +1 -1
  54. package/vendor/parg/nesc.json +1 -1
  55. package/vendor/parg/nist.json +1 -9588
  56. package/vendor/parg/oasis.json +1 -1
  57. package/vendor/parg/ogc.json +1 -1
  58. package/vendor/parg/oiml.json +1 -1
  59. package/vendor/parg/omg.json +1 -1
  60. package/vendor/parg/parg.json +1 -1
  61. package/vendor/parg/plateau.json +1 -1
  62. package/vendor/parg/sae.json +1 -1
  63. package/vendor/parg/tgpp.json +1 -1
  64. package/vendor/parg/un.json +1 -1
  65. package/vendor/parg/w3c.json +1 -1
  66. package/vendor/parg/xsf.json +1 -1
Binary file
@@ -16,6 +16,10 @@ export interface Identifier {
16
16
  toHash(): Record<string, unknown>;
17
17
  /** The canonical human spelling. */
18
18
  toHuman(): string;
19
+ /** The renderer body every flavor writes; `toString()` delegates here. */
20
+ render(): string;
21
+ /** String coercion of the identifier — the canonical human spelling. */
22
+ toString(): string;
19
23
  /** The URN; undefined when the flavor emits none. */
20
24
  toUrn(): string | undefined;
21
25
  /** Deserialize the canonical hash; the idempotency gate relies on it. */
@@ -51,6 +51,17 @@ class IecBuilder {
51
51
  }
52
52
  buildInner(data) {
53
53
  const tree = flatten(data);
54
+ // Ruby's bound hash is flat and vap_suffix is never a SUPP key, so
55
+ // the capture lands on the base build no matter which layer's
56
+ // second part carried it — the Vap wrapper nests INSIDE every
57
+ // supplement layer ("…+AMD1:1999 CSV/COR1:2003"). Push the capture
58
+ // down before dispatching; the recursion re-applies it until it
59
+ // reaches the base designation.
60
+ const vapSuffix = s(tree["vap_suffix"]);
61
+ if (vapSuffix !== undefined && isObj(tree["base"])) {
62
+ delete tree["vap_suffix"];
63
+ tree["base"]["vap_suffix"] = vapSuffix;
64
+ }
54
65
  // --- working programme / working document ---
55
66
  if (tree["wp_stage"] !== undefined)
56
67
  return this.buildWorkingProgramme(tree);
@@ -242,11 +253,7 @@ class IecBuilder {
242
253
  attrs["copublishers"] = baseRec["copublishers"];
243
254
  }
244
255
  const supplement = this.construct({ kind: kind, attrs, typedStage }, attrs);
245
- const suppRec = supplement;
246
- suppRec["base"] = base;
247
- const vapSuffix = s(tree["vap_suffix"]);
248
- if (vapSuffix !== undefined)
249
- return this.wrapVap(supplement, vapSuffix);
256
+ supplement["base"] = base;
250
257
  return supplement;
251
258
  }
252
259
  buildSheet(tree) {