@finbheara/domain 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/README.md +198 -2
- package/dist/age.js +420 -0
- package/dist/ceili.js +15 -0
- package/dist/chunks/place-7gqecaxd.js +201 -0
- package/dist/chunks/place-g6yw4cq6.js +134 -0
- package/dist/chunks/place-kr42294h.js +267 -0
- package/dist/chunks/place-qbp3xfb4.js +7412 -0
- package/dist/clrg-regions.js +603 -0
- package/dist/dance-types.js +14 -0
- package/dist/dance.js +41 -0
- package/dist/place.js +36 -0
- package/dist/school.js +2240 -0
- package/dist/tune.js +23 -0
- package/dist/types/age-types.d.ts +31 -0
- package/dist/types/age.d.ts +84 -0
- package/dist/types/ceili.d.ts +53 -0
- package/dist/types/clrg-regions.d.ts +31 -0
- package/dist/types/dance-match.d.ts +28 -0
- package/dist/types/dance-types.d.ts +9 -0
- package/dist/types/dance.d.ts +14 -0
- package/dist/types/place-tree.d.ts +4 -0
- package/dist/types/place-types.d.ts +24 -0
- package/dist/types/place.d.ts +98 -0
- package/dist/types/school-compare.d.ts +36 -0
- package/dist/types/school-exception-vocabulary.d.ts +23 -0
- package/dist/types/school-fluff-vocabulary.d.ts +16 -0
- package/dist/types/school-fused-prefix.d.ts +1 -0
- package/dist/types/school-identity.d.ts +9 -0
- package/dist/types/school-institution-vocabulary.d.ts +20 -0
- package/dist/types/school-location.d.ts +16 -0
- package/dist/types/school-match-key.d.ts +5 -0
- package/dist/types/school-name.d.ts +82 -0
- package/dist/types/school-tokens.d.ts +20 -0
- package/dist/types/school.d.ts +9 -0
- package/dist/types/tune.d.ts +63 -0
- package/package.json +69 -5
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { createSchoolNameReader, DEFAULT_SCHOOL_NAME_CAPACITY, DEFAULT_SCHOOL_NAME_READER, realWords, realWordsInPrintOrder, schoolInitials, schoolPrintSplit, } from "./school-name.ts";
|
|
2
|
+
export type { LexiconFlags, SchoolConcern, SchoolInitials, SchoolLexicon, SchoolName, SchoolNameParser, SchoolNameReader, SchoolNameReaderOptions, SchoolPart, SchoolPrintSplit, SchoolRefusal, } from "./school-name.ts";
|
|
3
|
+
export { isColumnCutOf, isInitialismOf, isLadderLevel, mapOfSchools, probablySameSchool, sameInEveryPart, schoolCompare, schoolTokensAt, setOfSchools, } from "./school-compare.ts";
|
|
4
|
+
export type { SchoolDop, SchoolMap, SchoolSet } from "./school-compare.ts";
|
|
5
|
+
export { compareSchoolNames, compareSchools } from "./school-identity.ts";
|
|
6
|
+
export type { IdentityResult, IdentityVerdict } from "./school-identity.ts";
|
|
7
|
+
export { foldSchoolName, hasSpecificToken, schoolKeyTokens } from "./school-match-key.ts";
|
|
8
|
+
export { NOT_A_SCHOOL, SCHOOL_NAME_EXCEPTIONS, } from "./school-exception-vocabulary.ts";
|
|
9
|
+
export type { NotASchool, RefusalReason, SchoolNameException, } from "./school-exception-vocabulary.ts";
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { type DanceMatch, type DanceRelation } from "./dance-match.ts";
|
|
2
|
+
import { type SetRhythm, type TimeSignature } from "./dance-types.ts";
|
|
3
|
+
export type TuneSetting = "traditional" | "contemporary";
|
|
4
|
+
export interface SpeedRange {
|
|
5
|
+
readonly min: number;
|
|
6
|
+
readonly max: number | null;
|
|
7
|
+
}
|
|
8
|
+
export declare const SET_MIN_SPEED: Readonly<Record<SetRhythm, number>>;
|
|
9
|
+
export declare const PLAUSIBLE_SET_TEMPO_MAX = 150;
|
|
10
|
+
export interface TuneNode {
|
|
11
|
+
readonly id: string;
|
|
12
|
+
readonly name: string;
|
|
13
|
+
readonly irish: string | null;
|
|
14
|
+
readonly prints: readonly string[];
|
|
15
|
+
readonly irishPrints: readonly string[];
|
|
16
|
+
readonly time: TimeSignature;
|
|
17
|
+
readonly traditionalSpeed: number | null;
|
|
18
|
+
readonly maxSpeed: number | null;
|
|
19
|
+
}
|
|
20
|
+
export declare const TUNE_NODES: readonly TuneNode[];
|
|
21
|
+
export interface Tune {
|
|
22
|
+
readonly [Symbol.toStringTag]: "Tune";
|
|
23
|
+
readonly id: string;
|
|
24
|
+
readonly name: string;
|
|
25
|
+
readonly irish: string | null;
|
|
26
|
+
readonly node: TuneNode;
|
|
27
|
+
toString(): string;
|
|
28
|
+
isTraditional(): boolean;
|
|
29
|
+
isContemporary(): boolean;
|
|
30
|
+
time(): TimeSignature;
|
|
31
|
+
rhythm(): SetRhythm;
|
|
32
|
+
speed(setting?: TuneSetting): number | SpeedRange | null;
|
|
33
|
+
}
|
|
34
|
+
export declare function allTunes(): readonly Tune[];
|
|
35
|
+
export declare function tuneById(id: string): Tune | undefined;
|
|
36
|
+
export declare function tempoLegal(tune: Tune | TuneReading, bpm: number, setting?: TuneSetting): boolean;
|
|
37
|
+
export declare function settingAt(tune: Tune, bpm: number): TuneSetting | null;
|
|
38
|
+
export interface TuneContext {
|
|
39
|
+
readonly setting?: TuneSetting;
|
|
40
|
+
readonly bpm?: number;
|
|
41
|
+
readonly rhythm?: SetRhythm;
|
|
42
|
+
readonly time?: TimeSignature;
|
|
43
|
+
}
|
|
44
|
+
export type TuneRefusal = "empty" | "dance-type" | "unmatched";
|
|
45
|
+
export interface TuneReading {
|
|
46
|
+
readonly [Symbol.toStringTag]: "TuneReading";
|
|
47
|
+
readonly print: string;
|
|
48
|
+
readonly folded: string;
|
|
49
|
+
readonly bpm: number | null;
|
|
50
|
+
readonly candidates: readonly Tune[];
|
|
51
|
+
readonly score: number;
|
|
52
|
+
readonly match: DanceMatch | null;
|
|
53
|
+
readonly refusal: TuneRefusal | null;
|
|
54
|
+
readonly misses: readonly string[];
|
|
55
|
+
readonly tune: Tune | undefined;
|
|
56
|
+
isTune(): boolean;
|
|
57
|
+
isSingular(): boolean;
|
|
58
|
+
isAmbiguous(): boolean;
|
|
59
|
+
refine(ctx: TuneContext): TuneReading;
|
|
60
|
+
toString(): string;
|
|
61
|
+
}
|
|
62
|
+
export declare function tune(print: string, ctx?: TuneContext): TuneReading;
|
|
63
|
+
export declare function tuneRelation(a: TuneReading, b: TuneReading): DanceRelation;
|
package/package.json
CHANGED
|
@@ -1,6 +1,70 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
"name": "@finbheara/domain",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Places, CLRG regions, school names, ages and dances as they are printed: read, compared and told apart",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"places",
|
|
7
|
+
"regions",
|
|
8
|
+
"school-names",
|
|
9
|
+
"ages",
|
|
10
|
+
"set-dances",
|
|
11
|
+
"normalization",
|
|
12
|
+
"irish-dance",
|
|
13
|
+
"gazetteer"
|
|
14
|
+
],
|
|
15
|
+
"license": "MIT",
|
|
16
|
+
"author": "Finbheara Systems",
|
|
17
|
+
"type": "module",
|
|
18
|
+
"sideEffects": false,
|
|
19
|
+
"exports": {
|
|
20
|
+
"./place": {
|
|
21
|
+
"types": "./dist/types/place.d.ts",
|
|
22
|
+
"default": "./dist/place.js"
|
|
23
|
+
},
|
|
24
|
+
"./clrg-regions": {
|
|
25
|
+
"types": "./dist/types/clrg-regions.d.ts",
|
|
26
|
+
"default": "./dist/clrg-regions.js"
|
|
27
|
+
},
|
|
28
|
+
"./school": {
|
|
29
|
+
"types": "./dist/types/school.d.ts",
|
|
30
|
+
"default": "./dist/school.js"
|
|
31
|
+
},
|
|
32
|
+
"./tune": {
|
|
33
|
+
"types": "./dist/types/tune.d.ts",
|
|
34
|
+
"default": "./dist/tune.js"
|
|
35
|
+
},
|
|
36
|
+
"./ceili": {
|
|
37
|
+
"types": "./dist/types/ceili.d.ts",
|
|
38
|
+
"default": "./dist/ceili.js"
|
|
39
|
+
},
|
|
40
|
+
"./dance": {
|
|
41
|
+
"types": "./dist/types/dance.d.ts",
|
|
42
|
+
"default": "./dist/dance.js"
|
|
43
|
+
},
|
|
44
|
+
"./age": {
|
|
45
|
+
"types": "./dist/types/age.d.ts",
|
|
46
|
+
"default": "./dist/age.js"
|
|
47
|
+
},
|
|
48
|
+
"./dance-types": {
|
|
49
|
+
"types": "./dist/types/dance-types.d.ts",
|
|
50
|
+
"default": "./dist/dance-types.js"
|
|
51
|
+
},
|
|
52
|
+
"./package.json": "./package.json"
|
|
53
|
+
},
|
|
54
|
+
"files": ["dist/*.js", "dist/chunks/*.js", "dist/types/**/*.d.ts", "README.md", "LICENSE"],
|
|
55
|
+
"engines": {
|
|
56
|
+
"node": ">=22",
|
|
57
|
+
"bun": ">=1.4.2"
|
|
58
|
+
},
|
|
59
|
+
"publishConfig": {
|
|
60
|
+
"access": "public"
|
|
61
|
+
},
|
|
62
|
+
"scripts": {
|
|
63
|
+
"build": "bun scripts/build.ts",
|
|
64
|
+
"guard": "bun scripts/guard-tarball.ts",
|
|
65
|
+
"prepublishOnly": "bun scripts/build.ts && bun scripts/guard-tarball.ts"
|
|
66
|
+
},
|
|
67
|
+
"dependencies": {
|
|
68
|
+
"@finbheara/names": "0.12.0"
|
|
69
|
+
}
|
|
70
|
+
}
|