@speleotica/frcsdata 5.0.0-beta.1 → 5.0.0-beta.3
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/ParseIssue.js +4 -4
- package/ParseIssue.js.map +1 -1
- package/SourceLoc.js +5 -5
- package/SourceLoc.js.map +1 -1
- package/chunksToLines.js +29 -131
- package/chunksToLines.js.map +1 -1
- package/cli/check-survey-correspondence.d.ts +2 -0
- package/cli/check-survey-correspondence.d.ts.map +1 -0
- package/cli/check-survey-correspondence.js +44 -0
- package/cli/check-survey-correspondence.js.map +1 -0
- package/cli/check-survey.d.ts.map +1 -1
- package/cli/check-survey.js +14 -75
- package/cli/check-survey.js.map +1 -1
- package/cli/parse-survey.js +4 -26
- package/cli/parse-survey.js.map +1 -1
- package/cli/summarize-survey.d.ts +2 -0
- package/cli/summarize-survey.d.ts.map +1 -0
- package/cli/summarize-survey.js +33 -0
- package/cli/summarize-survey.js.map +1 -0
- package/cli.js +61 -72
- package/cli.js.map +1 -1
- package/formatFrcsTripSummaryFile.d.ts +3 -0
- package/formatFrcsTripSummaryFile.d.ts.map +1 -0
- package/formatFrcsTripSummaryFile.js +33 -0
- package/formatFrcsTripSummaryFile.js.map +1 -0
- package/formatIssues.d.ts +10 -0
- package/formatIssues.d.ts.map +1 -0
- package/formatIssues.js +52 -0
- package/formatIssues.js.map +1 -0
- package/index.js +13 -13
- package/node/index.d.ts +3 -1
- package/node/index.d.ts.map +1 -1
- package/node/index.js +5 -19
- package/node/index.js.map +1 -1
- package/package.json +1 -1
- package/parseFrcsPlotFile.js +112 -245
- package/parseFrcsPlotFile.js.map +1 -1
- package/parseFrcsTripSummaryFile.d.ts +3 -1
- package/parseFrcsTripSummaryFile.d.ts.map +1 -1
- package/parseFrcsTripSummaryFile.js +53 -119
- package/parseFrcsTripSummaryFile.js.map +1 -1
- package/src/cli/check-survey-correspondence.ts +49 -0
- package/src/cli/check-survey.ts +8 -69
- package/src/cli/summarize-survey.ts +28 -0
- package/src/cli.ts +33 -0
- package/src/formatFrcsTripSummaryFile.ts +45 -0
- package/src/formatIssues.ts +97 -0
- package/src/parseFrcsTripSummaryFile.ts +8 -2
- package/src/survey/FrcsSurveyFile.ts +3 -1
- package/src/survey/ZodFrcsSurveyFileJson.ts +15 -4
- package/src/survey/ZodFrcsSurveyFileToJson.ts +15 -4
- package/src/survey/normalizeTeamMemberName.ts +3 -6
- package/src/survey/parseFrcsSurveyFile.ts +9 -25
- package/src/survey/summarizeSurvey.ts +51 -0
- package/src/unwrapInvalid.ts +3 -0
- package/string/index.d.ts +3 -1
- package/string/index.d.ts.map +1 -1
- package/string/index.js +7 -41
- package/string/index.js.map +1 -1
- package/survey/FrcsSurveyFile.d.ts +1 -1
- package/survey/FrcsSurveyFile.d.ts.map +1 -1
- package/survey/FrcsSurveyFile.js +1 -1
- package/survey/FrcsSurveyFile.js.map +1 -1
- package/survey/ZodFrcsSurveyFileJson.d.ts +13083 -457
- package/survey/ZodFrcsSurveyFileJson.d.ts.map +1 -1
- package/survey/ZodFrcsSurveyFileJson.js +89 -87
- package/survey/ZodFrcsSurveyFileJson.js.map +1 -1
- package/survey/ZodFrcsSurveyFileToJson.d.ts +12860 -234
- package/survey/ZodFrcsSurveyFileToJson.d.ts.map +1 -1
- package/survey/ZodFrcsSurveyFileToJson.js +83 -89
- package/survey/ZodFrcsSurveyFileToJson.js.map +1 -1
- package/survey/formatFrcsShot.js +45 -43
- package/survey/formatFrcsShot.js.map +1 -1
- package/survey/formatFrcsSurveyFile.js +52 -130
- package/survey/formatFrcsSurveyFile.js.map +1 -1
- package/survey/getColumnRanges.js +11 -19
- package/survey/getColumnRanges.js.map +1 -1
- package/survey/normalizeTeamMemberName.d.ts.map +1 -1
- package/survey/normalizeTeamMemberName.js +1 -5
- package/survey/normalizeTeamMemberName.js.map +1 -1
- package/survey/parseFrcsSurveyFile.d.ts.map +1 -1
- package/survey/parseFrcsSurveyFile.js +560 -750
- package/survey/parseFrcsSurveyFile.js.map +1 -1
- package/survey/parsers.js +20 -20
- package/survey/parsers.js.map +1 -1
- package/survey/summarizeSurvey.d.ts +6 -0
- package/survey/summarizeSurvey.d.ts.map +1 -0
- package/survey/summarizeSurvey.js +58 -0
- package/survey/summarizeSurvey.js.map +1 -0
- package/underlineSource.js +9 -17
- package/underlineSource.js.map +1 -1
- package/unwrapInvalid.d.ts +4 -0
- package/unwrapInvalid.d.ts.map +1 -0
- package/unwrapInvalid.js +10 -0
- package/unwrapInvalid.js.map +1 -0
- package/web/index.js +56 -116
- package/web/index.js.map +1 -1
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports.getColumnRanges = getColumnRanges;
|
|
8
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
9
7
|
function getColumnRanges(config) {
|
|
10
|
-
|
|
8
|
+
const decimal = {
|
|
11
9
|
toStation: [0, 0],
|
|
12
10
|
fromStation: [0, 0],
|
|
13
11
|
distance: [0, 0],
|
|
@@ -24,7 +22,7 @@ function getColumnRanges(config) {
|
|
|
24
22
|
up: [0, 0],
|
|
25
23
|
down: [0, 0]
|
|
26
24
|
};
|
|
27
|
-
|
|
25
|
+
const feetAndInches = {
|
|
28
26
|
toStation: [0, 0],
|
|
29
27
|
fromStation: [0, 0],
|
|
30
28
|
distance: [0, 0],
|
|
@@ -41,30 +39,24 @@ function getColumnRanges(config) {
|
|
|
41
39
|
up: [0, 0],
|
|
42
40
|
down: [0, 0]
|
|
43
41
|
};
|
|
44
|
-
|
|
45
|
-
for (
|
|
46
|
-
var _arr$_i = (0, _slicedToArray2["default"])(_arr[_i], 2),
|
|
47
|
-
key = _arr$_i[0],
|
|
48
|
-
value = _arr$_i[1];
|
|
42
|
+
let c = 0;
|
|
43
|
+
for (const [key, value] of Object.entries(config)) {
|
|
49
44
|
if (key === 'distanceFeet' || key === 'distanceInches') continue;
|
|
50
45
|
decimal[key][0] = c;
|
|
51
46
|
decimal[key][1] = c + value;
|
|
52
47
|
c += value;
|
|
53
48
|
}
|
|
54
49
|
c = 0;
|
|
55
|
-
for (
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
var width = _key === 'frontsightAzimuth' ? _value - 1 : _value;
|
|
61
|
-
feetAndInches[_key][0] = c;
|
|
62
|
-
feetAndInches[_key][1] = c + width;
|
|
50
|
+
for (const [key, value] of Object.entries(config)) {
|
|
51
|
+
if (key === 'distance') continue;
|
|
52
|
+
const width = key === 'frontsightAzimuth' ? value - 1 : value;
|
|
53
|
+
feetAndInches[key][0] = c;
|
|
54
|
+
feetAndInches[key][1] = c + width;
|
|
63
55
|
c += width;
|
|
64
56
|
}
|
|
65
57
|
return {
|
|
66
|
-
decimal
|
|
67
|
-
feetAndInches
|
|
58
|
+
decimal,
|
|
59
|
+
feetAndInches
|
|
68
60
|
};
|
|
69
61
|
}
|
|
70
62
|
//# sourceMappingURL=getColumnRanges.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getColumnRanges.js","names":["getColumnRanges","config","decimal","toStation","fromStation","distance","distanceFeet","distanceInches","kind","exclude","frontsightAzimuth","backsightAzimuth","frontsightInclination","backsightInclination","left","right","up","down","feetAndInches","c","
|
|
1
|
+
{"version":3,"file":"getColumnRanges.js","names":["getColumnRanges","config","decimal","toStation","fromStation","distance","distanceFeet","distanceInches","kind","exclude","frontsightAzimuth","backsightAzimuth","frontsightInclination","backsightInclination","left","right","up","down","feetAndInches","c","key","value","Object","entries","width"],"sources":["../../src/survey/getColumnRanges.ts"],"sourcesContent":["import type { FrcsShotColumnConfig } from './FrcsSurveyFile'\n\ntype ColumnRanges = {\n toStation: [number, number]\n fromStation: [number, number]\n distance: [number, number]\n distanceFeet: [number, number]\n distanceInches: [number, number]\n kind: [number, number]\n exclude: [number, number]\n frontsightAzimuth: [number, number]\n backsightAzimuth: [number, number]\n frontsightInclination: [number, number]\n backsightInclination: [number, number]\n left: [number, number]\n right: [number, number]\n up: [number, number]\n down: [number, number]\n}\n\nexport function getColumnRanges(config: FrcsShotColumnConfig): {\n decimal: ColumnRanges\n feetAndInches: ColumnRanges\n} {\n const decimal: ColumnRanges = {\n toStation: [0, 0],\n fromStation: [0, 0],\n distance: [0, 0],\n distanceFeet: [0, 0],\n distanceInches: [0, 0],\n kind: [0, 0],\n exclude: [0, 0],\n frontsightAzimuth: [0, 0],\n backsightAzimuth: [0, 0],\n frontsightInclination: [0, 0],\n backsightInclination: [0, 0],\n left: [0, 0],\n right: [0, 0],\n up: [0, 0],\n down: [0, 0],\n }\n const feetAndInches: ColumnRanges = {\n toStation: [0, 0],\n fromStation: [0, 0],\n distance: [0, 0],\n distanceFeet: [0, 0],\n distanceInches: [0, 0],\n kind: [0, 0],\n exclude: [0, 0],\n frontsightAzimuth: [0, 0],\n backsightAzimuth: [0, 0],\n frontsightInclination: [0, 0],\n backsightInclination: [0, 0],\n left: [0, 0],\n right: [0, 0],\n up: [0, 0],\n down: [0, 0],\n }\n\n let c = 0\n for (const [key, value] of Object.entries(config) as [\n keyof FrcsShotColumnConfig,\n FrcsShotColumnConfig[keyof FrcsShotColumnConfig]\n ][]) {\n if (key === 'distanceFeet' || key === 'distanceInches') continue\n decimal[key][0] = c\n decimal[key][1] = c + value\n c += value\n }\n c = 0\n for (const [key, value] of Object.entries(config) as [\n keyof FrcsShotColumnConfig,\n FrcsShotColumnConfig[keyof FrcsShotColumnConfig]\n ][]) {\n if (key === 'distance') continue\n const width = key === 'frontsightAzimuth' ? value - 1 : value\n feetAndInches[key][0] = c\n feetAndInches[key][1] = c + width\n c += width\n }\n return { decimal, feetAndInches }\n}\n"],"mappings":";;;;;;AAoBO,SAASA,eAAeA,CAACC,MAA4B,EAG1D;EACA,MAA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ts","sourceRoot":"","sources":["../../src/survey/normalizeTeamMemberName.ts"],"names":[],"mappings":"AAAA,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"normalizeTeamMemberName.d.ts","sourceRoot":"","sources":["../../src/survey/normalizeTeamMemberName.ts"],"names":[],"mappings":"AAAA,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,UAMnD"}
|
|
@@ -5,11 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.normalizeTeamMemberName = normalizeTeamMemberName;
|
|
7
7
|
function normalizeTeamMemberName(name) {
|
|
8
|
-
|
|
9
|
-
name = name.replace(/(\S)(\S*)/g, function (match, head, tail) {
|
|
10
|
-
return "".concat(head).concat(tail.toLowerCase());
|
|
11
|
-
});
|
|
12
|
-
}
|
|
8
|
+
name = name.replace(/(\S)(\S*)/g, (match, head, tail) => match.toUpperCase() === match ? `${head}${tail.toLowerCase()}` : match);
|
|
13
9
|
name = name.replace(/_/g, ' ');
|
|
14
10
|
return name;
|
|
15
11
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalizeTeamMemberName.js","names":["normalizeTeamMemberName","name","
|
|
1
|
+
{"version":3,"file":"normalizeTeamMemberName.js","names":["normalizeTeamMemberName","name","replace","match","head","tail","toUpperCase","toLowerCase"],"sources":["../../src/survey/normalizeTeamMemberName.ts"],"sourcesContent":["export function normalizeTeamMemberName(name: string) {\n name = name.replace(/(\\S)(\\S*)/g, (match, head, tail) =>\n match.toUpperCase() === match ? `${head}${tail.toLowerCase()}` : match\n )\n name = name.replace(/_/g, ' ')\n return name\n}\n"],"mappings":";;;;;;AAAO,SAASA,uBAAuBA,CAACC,IAAY,EAAE;EACpDA,IAAI,GAAGA,IAAI,CAACC,OAAO,CAAC,YAAY,EAAE,CAACC,KAAK,EAAEC,IAAI,EAAEC,IAAI,KAClDF,KAAK,CAACG,WAAW,CAAC,CAAC,KAAKH,KAAK,GAAG,GAAGC,IAAI,GAAGC,IAAI,CAACE,WAAW,CAAC,CAAC,EAAE,GAAGJ,KACnE,CAAC;EACDF,IAAI,GAAGA,IAAI,CAACC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC;EAC9B,OAAOD,IAAI;AACb","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parseFrcsSurveyFile.d.ts","sourceRoot":"","sources":["../../src/survey/parseFrcsSurveyFile.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,0BAA0B,EAC1B,cAAc,EAId,qBAAqB,EAItB,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"parseFrcsSurveyFile.d.ts","sourceRoot":"","sources":["../../src/survey/parseFrcsSurveyFile.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,0BAA0B,EAC1B,cAAc,EAId,qBAAqB,EAItB,MAAM,kBAAkB,CAAA;AA0BzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA4CI;AACJ,wBAA8B,mBAAmB,CAC/C,IAAI,EAAE,GAAG,EAAE,yDAAyD;AACpE,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,GAAG,aAAa,CAAC,MAAM,CAAC,EAChD,EACE,OAAqC,EACrC,aAAqB,EACrB,cAAqB,EACrB,gBAAgB,GACjB,GAAE,0BAA+B,GACjC,OAAO,CAAC,cAAc,GAAG,qBAAqB,CAAC,CAkvBjD"}
|