@courthive/scoring-visualizations 0.2.17 → 0.2.19
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/__conformance__/factoryEpisodeTypes.d.ts +20 -0
- package/dist/__conformance__/factoryEpisodeTypes.d.ts.map +1 -0
- package/dist/episodes/buildEpisodes.d.ts +0 -7
- package/dist/episodes/buildEpisodes.d.ts.map +1 -1
- package/dist/episodes/types.d.ts +14 -5
- package/dist/episodes/types.d.ts.map +1 -1
- package/dist/scoring-visualizations.es.js +341 -341
- package/dist/scoring-visualizations.umd.js +2 -2
- package/dist/visualizations/types/index.d.ts +13 -6
- package/dist/visualizations/types/index.d.ts.map +1 -1
- package/package.json +8 -8
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { EpisodeNeeded, PointsToDecoration } from 'tods-competition-factory';
|
|
2
|
+
import { Episode } from '../visualizations/types';
|
|
3
|
+
/** Compile error if `T` is not assignable to `U`. */
|
|
4
|
+
type AssertAssignable<T extends U, U> = T;
|
|
5
|
+
/** Our `needed` IS the factory's type — not a structural look-alike. */
|
|
6
|
+
export type NeededIsTheFactoryType = AssertAssignable<Episode['needed'], EpisodeNeeded>;
|
|
7
|
+
/**
|
|
8
|
+
* The fields `calculatePointsTo` produces are the fields an episode can carry.
|
|
9
|
+
*
|
|
10
|
+
* Fails if the factory adds a points-to field that `EpisodeNeeded` does not surface — the gap that
|
|
11
|
+
* would otherwise strand new data one layer below the renderers.
|
|
12
|
+
*/
|
|
13
|
+
export type EveryPointsToFieldIsSurfaced = AssertAssignable<Exclude<keyof PointsToDecoration, keyof EpisodeNeeded>, never>;
|
|
14
|
+
/**
|
|
15
|
+
* Fields we do not yet render. `pointsToMatch` now reaches `buildEpisodes`; no chart plots it.
|
|
16
|
+
* Recorded rather than hidden, so the next person sees the gap without re-deriving it.
|
|
17
|
+
*/
|
|
18
|
+
export type SurfacedButUnrendered = Exclude<keyof EpisodeNeeded, 'pointsToGame' | 'pointsToSet' | 'gamesToSet'>;
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=factoryEpisodeTypes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"factoryEpisodeTypes.d.ts","sourceRoot":"","sources":["../../src/__conformance__/factoryEpisodeTypes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAElF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAEvD,qDAAqD;AACrD,KAAK,gBAAgB,CAAC,CAAC,SAAS,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;AAE1C,wEAAwE;AACxE,MAAM,MAAM,sBAAsB,GAAG,gBAAgB,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,aAAa,CAAC,CAAC;AAExF;;;;;GAKG;AACH,MAAM,MAAM,4BAA4B,GAAG,gBAAgB,CACzD,OAAO,CAAC,MAAM,kBAAkB,EAAE,MAAM,aAAa,CAAC,EACtD,KAAK,CACN,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,qBAAqB,GAAG,OAAO,CAAC,MAAM,aAAa,EAAE,cAAc,GAAG,aAAa,GAAG,YAAY,CAAC,CAAC"}
|
|
@@ -1,10 +1,3 @@
|
|
|
1
1
|
import { Episode } from './types';
|
|
2
|
-
/**
|
|
3
|
-
* Transforms a ScoringEngine MatchUp into an Episode array
|
|
4
|
-
* suitable for visualization components (GameTree, Momentum, PTS, GameFish, Corona).
|
|
5
|
-
*
|
|
6
|
-
* @param matchUp - A MatchUp object from ScoringEngine.getState()
|
|
7
|
-
* @returns Episode[] - Array of episodes, one per point played
|
|
8
|
-
*/
|
|
9
2
|
export declare function buildEpisodes(matchUp: any): Episode[];
|
|
10
3
|
//# sourceMappingURL=buildEpisodes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildEpisodes.d.ts","sourceRoot":"","sources":["../../src/episodes/buildEpisodes.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"buildEpisodes.d.ts","sourceRoot":"","sources":["../../src/episodes/buildEpisodes.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AA0BvC,wBAAgB,aAAa,CAAC,OAAO,EAAE,GAAG,GAAG,OAAO,EAAE,CA4BrD"}
|
package/dist/episodes/types.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { EpisodeNeeded } from 'tods-competition-factory';
|
|
1
2
|
export interface EpisodePoint {
|
|
2
3
|
winner: number;
|
|
3
4
|
server: number;
|
|
@@ -27,11 +28,19 @@ export interface EpisodeSet {
|
|
|
27
28
|
sets: number[][];
|
|
28
29
|
index: number;
|
|
29
30
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
/**
|
|
32
|
+
* Re-exported from the factory rather than redeclared.
|
|
33
|
+
*
|
|
34
|
+
* The local copy required `pointsToGame` / `pointsToSet` / `gamesToSet` as `number[]`, while the
|
|
35
|
+
* factory declares each as an OPTIONAL `[number, number]` and carries two more members
|
|
36
|
+
* (`pointsToMatch`, `isBreakpoint`). A required field cannot represent "no points-to applies here",
|
|
37
|
+
* which is what forced the `[0, 0]` default this branch removes — a rendered zero that means
|
|
38
|
+
* "absent" is indistinguishable from one that means zero.
|
|
39
|
+
*
|
|
40
|
+
* Same remedy courthive-components #581 applied to `SideExitProvenanceEntry`: re-export the
|
|
41
|
+
* authority instead of keeping a copy free to drift from it.
|
|
42
|
+
*/
|
|
43
|
+
export type { EpisodeNeeded } from 'tods-competition-factory';
|
|
35
44
|
export interface Episode {
|
|
36
45
|
action: 'addPoint';
|
|
37
46
|
point: EpisodePoint;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/episodes/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,OAAO,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IAEb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;IACd,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1B,mBAAmB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACxC;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACf;AAED
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/episodes/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAE9D,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,KAA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