@finbheara/domain 0.22.0 → 0.24.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/dist/age.js CHANGED
@@ -8,7 +8,11 @@ var AND_OVER = /(?<![0-9])(?<![0-9][a-z]*)(?<!(?:^|[^a-z0-9])[a-z])(\d{1,2})\s*(
8
8
  var OVER_WORD = /(?:\bover\s*|\bos\s+cionn\s*|(?<![a-z0-9])o[./]?\s*)(\d{1,2})(?![a-z0-9])/i;
9
9
  var OVER_GLUED = /(?<![a-z0-9])(\d{1,2})\s*o(?![a-z'’])/i;
10
10
  var OVER_PLUS = /(?<![a-z0-9])(\d{1,2})\s*\+/;
11
- var UNDER = /(?:\bunder\s*(?:age\s*)?|\bfaoi\s*|(?<![a-z0-9])u\.?\s*)(\d{1,2})(?![0-9])(?![a-z][a-z0-9])/i;
11
+ var UNDER_WORD = String.raw`(?:\bund(?:er)?\.?\s*(?:age\s*)?|\bfaoi\s*|(?<![a-z0-9])u[./]?\s*)`;
12
+ var UNDER = new RegExp(String.raw`${UNDER_WORD}(\d{1,2})(?![0-9])(?![a-z][a-z0-9])`, "i");
13
+ var JOINED_CAPS = new RegExp(String.raw`${UNDER_WORD}\d{1,2}(?![0-9])(?:(?:\s*(?:&|,|\/|\band\b)\s*(?:${UNDER_WORD})?|\s+${UNDER_WORD})\d{1,2}(?![0-9]))+`, "i");
14
+ var JOINED_NOT = /^(?:\s*(?:yrs?|years?|-?\s*hand)\b|[a-z])/i;
15
+ var JOINED_OPEN = /^(?:\s*\+|\s*(?:&|and)\s*(?:o|over|older|up)\b)/i;
12
16
  var UNDER_STRIDE = /^\s*\/\s*0*([1-9]\d?)\s*yrs?(?![a-z0-9])/i;
13
17
  var AND_UNDER = /(?<![a-z0-9])(\d{1,2})\s*(?:years?\s*)?(?:&|\/|\band\b)\s*u(?:nder)?(?![a-z])(?!\s*\d)/i;
14
18
  var AND_UNDER_RANGE = /(?<![a-z0-9])(\d{1,2})\s*(?:&|\band\b)\s*under\s*(\d{1,2})(?![a-z0-9])/i;
@@ -37,7 +41,25 @@ function inFence(a, b) {
37
41
  const hi = Number(b);
38
42
  return lo >= TITLE_RANGE_MIN && hi <= TITLE_RANGE_MAX && lo < hi;
39
43
  }
44
+ function readJoined(title, s, offset) {
45
+ const j = JOINED_CAPS.exec(s);
46
+ if (j === null)
47
+ return null;
48
+ const end = j.index + j[0].length;
49
+ const tail = s.slice(end);
50
+ if (JOINED_NOT.test(tail))
51
+ return null;
52
+ const caps = [...j[0].matchAll(/\d{1,2}/g)].map((d) => Number(d[0]));
53
+ if (caps.some((c, i) => i > 0 && c < (caps[i - 1] ?? 0)))
54
+ return null;
55
+ if (JOINED_OPEN.test(tail))
56
+ return NONE;
57
+ return at(title, offset, j.index, end, `u${Math.max(...caps)}`);
58
+ }
40
59
  function readAnchored(title, s, offset, aside = false) {
60
+ const joined = readJoined(title, s, offset);
61
+ if (joined !== null)
62
+ return joined;
41
63
  for (const re of [AND_OVER, OVER_WORD, OVER_GLUED]) {
42
64
  const m = re.exec(s);
43
65
  if (m?.[1] !== undefined)
@@ -4167,6 +4167,15 @@ var PLACE_NODES = [
4167
4167
  prints: ["co wexford", "county wexford", "wexford"],
4168
4168
  codes: ["IE-WX"]
4169
4169
  },
4170
+ {
4171
+ id: "MEX-CMX",
4172
+ kind: "subdivision",
4173
+ name: "Ciudad de México",
4174
+ geo: "MEX",
4175
+ admin: null,
4176
+ prints: ["ciudad de mexico", "mexico city"],
4177
+ codes: ["MX-CMX"]
4178
+ },
4170
4179
  {
4171
4180
  id: "MEX-QUE",
4172
4181
  kind: "subdivision",
@@ -5936,6 +5945,15 @@ var PLACE_NODES = [
5936
5945
  prints: ["baton rouge"],
5937
5946
  codes: []
5938
5947
  },
5948
+ {
5949
+ id: "USA-LA/kenner",
5950
+ kind: "city",
5951
+ name: "Kenner",
5952
+ geo: "USA-LA",
5953
+ admin: "IDTANA-SRO",
5954
+ prints: ["kenner"],
5955
+ codes: []
5956
+ },
5939
5957
  {
5940
5958
  id: "USA-LA/new-orleans",
5941
5959
  kind: "city",
@@ -6920,6 +6938,15 @@ var PLACE_NODES = [
6920
6938
  admin: "IDTANA-MAO",
6921
6939
  prints: ["milwaukee"],
6922
6940
  codes: []
6941
+ },
6942
+ {
6943
+ id: "USA-WI/new-berlin",
6944
+ kind: "city",
6945
+ name: "New Berlin",
6946
+ geo: "USA-WI",
6947
+ admin: "IDTANA-MAO",
6948
+ prints: ["new berlin"],
6949
+ codes: []
6923
6950
  }
6924
6951
  ];
6925
6952
 
@@ -7094,6 +7121,7 @@ var PLACE_WITHIN = {
7094
7121
  "USA-KY/lexington": { nodes: [], names: ["Fayette", "Fayette County", "Kentucky"] },
7095
7122
  "USA-KY/louisville": { nodes: [], names: ["Jefferson", "Jefferson County", "Kentucky"] },
7096
7123
  "USA-LA/baton-rouge": { nodes: [], names: ["East Baton Rouge Parish", "Louisiana"] },
7124
+ "USA-LA/kenner": { nodes: [], names: ["Jefferson Parish", "Louisiana"] },
7097
7125
  "USA-LA/new-orleans": { nodes: [], names: ["Louisiana", "Orleans Parish"] },
7098
7126
  "USA-MA/boston": { nodes: [], names: ["Massachusetts", "Suffolk", "Suffolk County"] },
7099
7127
  "USA-MA/lexington": { nodes: [], names: ["Massachusetts", "Middlesex", "Middlesex County"] },
@@ -7211,7 +7239,8 @@ var PLACE_WITHIN = {
7211
7239
  "USA-WA/spokane": { nodes: [], names: ["Spokane", "Spokane County", "Washington"] },
7212
7240
  "USA-WA/tacoma": { nodes: [], names: ["Pierce", "Pierce County", "Washington"] },
7213
7241
  "USA-WI/madison": { nodes: [], names: ["Dane", "Dane County", "Wisconsin"] },
7214
- "USA-WI/milwaukee": { nodes: [], names: ["Milwaukee", "Milwaukee County", "Wisconsin"] }
7242
+ "USA-WI/milwaukee": { nodes: [], names: ["Milwaukee", "Milwaukee County", "Wisconsin"] },
7243
+ "USA-WI/new-berlin": { nodes: [], names: ["Waukesha", "Waukesha County", "Wisconsin"] }
7215
7244
  };
7216
7245
 
7217
7246
  var QUALIFIER_DELIMITER = /[,;:()[\]/–—-]/;
package/dist/place.js CHANGED
@@ -17,7 +17,7 @@ import {
17
17
  placesRelation2,
18
18
  probablySamePlace2,
19
19
  sameReading2
20
- } from "./chunks/place-qe5krdev.js";
20
+ } from "./chunks/place-g3py4821.js";
21
21
  import"./chunks/place-tcgfvemw.js";
22
22
  export {
23
23
  DEFAULT_PLACE_CAPACITY2 as DEFAULT_PLACE_CAPACITY,
package/dist/school.js CHANGED
@@ -12,7 +12,7 @@ import {
12
12
  areAllPlaceTokens2,
13
13
  placeRelation2,
14
14
  sameReading2
15
- } from "./chunks/place-qe5krdev.js";
15
+ } from "./chunks/place-g3py4821.js";
16
16
  import {
17
17
  validity
18
18
  } from "./chunks/place-q9kwsmzd.js";
@@ -1,4 +1,4 @@
1
1
  import type { PlaceWithin } from "./place-types.ts";
2
- export declare const PLACE_WITHIN_TREE = "42be759c4de3678a3d22fc5174dbafad342c5437ec8fd8e2f05cd8b0a37660bf";
2
+ export declare const PLACE_WITHIN_TREE = "feeb35d256fbe6db963f6754bf34a706994922fde0492bc01ec3e152a4bcf891";
3
3
  export declare const PLACE_WITHIN_SOURCES: Readonly<Record<string, string>>;
4
4
  export declare const PLACE_WITHIN: Readonly<Record<string, PlaceWithin>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finbheara/domain",
3
- "version": "0.22.0",
3
+ "version": "0.24.0",
4
4
  "description": "Places, CLRG regions, school names, ages, dances and a person's print in its role, as they are printed: read, compared and told apart",
5
5
  "keywords": [
6
6
  "places",