@flightloop/sdk-frontend 0.0.0-stage → 1.0.0-qa.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.
Files changed (134) hide show
  1. package/README.md +145 -2
  2. package/dist/cjs/core/airspace/index.js +14 -0
  3. package/dist/cjs/core/airspace/index.js.map +1 -0
  4. package/dist/cjs/core/airspace/validation-client.js +112 -0
  5. package/dist/cjs/core/airspace/validation-client.js.map +1 -0
  6. package/dist/cjs/core/formatters/index.js +41 -0
  7. package/dist/cjs/core/formatters/index.js.map +1 -0
  8. package/dist/cjs/core/geometry/circle.js +137 -0
  9. package/dist/cjs/core/geometry/circle.js.map +1 -0
  10. package/dist/cjs/core/geometry/index.js +26 -0
  11. package/dist/cjs/core/geometry/index.js.map +1 -0
  12. package/dist/cjs/core/geometry/operations.js +169 -0
  13. package/dist/cjs/core/geometry/operations.js.map +1 -0
  14. package/dist/cjs/core/geometry/polygon.js +183 -0
  15. package/dist/cjs/core/geometry/polygon.js.map +1 -0
  16. package/dist/cjs/core/index.js +29 -0
  17. package/dist/cjs/core/index.js.map +1 -0
  18. package/dist/cjs/core/transformers/index.js +33 -0
  19. package/dist/cjs/core/transformers/index.js.map +1 -0
  20. package/dist/cjs/core/utils/constants.js +124 -0
  21. package/dist/cjs/core/utils/constants.js.map +1 -0
  22. package/dist/cjs/core/utils/helpers.js +98 -0
  23. package/dist/cjs/core/utils/helpers.js.map +1 -0
  24. package/dist/cjs/core/utils/index.js +35 -0
  25. package/dist/cjs/core/utils/index.js.map +1 -0
  26. package/dist/cjs/core/utils/timezone.js +52 -0
  27. package/dist/cjs/core/utils/timezone.js.map +1 -0
  28. package/dist/cjs/core/validation/index.js +26 -0
  29. package/dist/cjs/core/validation/index.js.map +1 -0
  30. package/dist/cjs/core/validation/operator.validator.js +156 -0
  31. package/dist/cjs/core/validation/operator.validator.js.map +1 -0
  32. package/dist/cjs/index.js +32 -0
  33. package/dist/cjs/index.js.map +1 -0
  34. package/dist/cjs/react/hooks/index.js +41 -0
  35. package/dist/cjs/react/hooks/index.js.map +1 -0
  36. package/dist/cjs/react/index.js +20 -0
  37. package/dist/cjs/react/index.js.map +1 -0
  38. package/dist/cjs/types/airspace.types.js +22 -0
  39. package/dist/cjs/types/airspace.types.js.map +1 -0
  40. package/dist/cjs/types/authorization.types.js +3 -0
  41. package/dist/cjs/types/authorization.types.js.map +1 -0
  42. package/dist/cjs/types/geometry.types.js +4 -0
  43. package/dist/cjs/types/geometry.types.js.map +1 -0
  44. package/dist/cjs/types/index.js +7 -0
  45. package/dist/cjs/types/index.js.map +1 -0
  46. package/dist/esm/core/airspace/index.js +9 -0
  47. package/dist/esm/core/airspace/index.js.map +1 -0
  48. package/dist/esm/core/airspace/validation-client.js +107 -0
  49. package/dist/esm/core/airspace/validation-client.js.map +1 -0
  50. package/dist/esm/core/formatters/index.js +35 -0
  51. package/dist/esm/core/formatters/index.js.map +1 -0
  52. package/dist/esm/core/geometry/circle.js +98 -0
  53. package/dist/esm/core/geometry/circle.js.map +1 -0
  54. package/dist/esm/core/geometry/index.js +7 -0
  55. package/dist/esm/core/geometry/index.js.map +1 -0
  56. package/dist/esm/core/geometry/operations.js +125 -0
  57. package/dist/esm/core/geometry/operations.js.map +1 -0
  58. package/dist/esm/core/geometry/polygon.js +145 -0
  59. package/dist/esm/core/geometry/polygon.js.map +1 -0
  60. package/dist/esm/core/index.js +13 -0
  61. package/dist/esm/core/index.js.map +1 -0
  62. package/dist/esm/core/transformers/index.js +28 -0
  63. package/dist/esm/core/transformers/index.js.map +1 -0
  64. package/dist/esm/core/utils/constants.js +121 -0
  65. package/dist/esm/core/utils/constants.js.map +1 -0
  66. package/dist/esm/core/utils/helpers.js +83 -0
  67. package/dist/esm/core/utils/helpers.js.map +1 -0
  68. package/dist/esm/core/utils/index.js +7 -0
  69. package/dist/esm/core/utils/index.js.map +1 -0
  70. package/dist/esm/core/utils/timezone.js +47 -0
  71. package/dist/esm/core/utils/timezone.js.map +1 -0
  72. package/dist/esm/core/validation/index.js +10 -0
  73. package/dist/esm/core/validation/index.js.map +1 -0
  74. package/dist/esm/core/validation/operator.validator.js +150 -0
  75. package/dist/esm/core/validation/operator.validator.js.map +1 -0
  76. package/dist/esm/index.js +15 -0
  77. package/dist/esm/index.js.map +1 -0
  78. package/dist/esm/react/hooks/index.js +35 -0
  79. package/dist/esm/react/hooks/index.js.map +1 -0
  80. package/dist/esm/react/index.js +4 -0
  81. package/dist/esm/react/index.js.map +1 -0
  82. package/dist/esm/types/airspace.types.js +19 -0
  83. package/dist/esm/types/airspace.types.js.map +1 -0
  84. package/dist/esm/types/authorization.types.js +2 -0
  85. package/dist/esm/types/authorization.types.js.map +1 -0
  86. package/dist/esm/types/geometry.types.js +3 -0
  87. package/dist/esm/types/geometry.types.js.map +1 -0
  88. package/dist/esm/types/index.js +3 -0
  89. package/dist/esm/types/index.js.map +1 -0
  90. package/dist/types/core/airspace/index.d.ts +8 -0
  91. package/dist/types/core/airspace/index.d.ts.map +1 -0
  92. package/dist/types/core/airspace/validation-client.d.ts +86 -0
  93. package/dist/types/core/airspace/validation-client.d.ts.map +1 -0
  94. package/dist/types/core/formatters/index.d.ts +28 -0
  95. package/dist/types/core/formatters/index.d.ts.map +1 -0
  96. package/dist/types/core/geometry/circle.d.ts +33 -0
  97. package/dist/types/core/geometry/circle.d.ts.map +1 -0
  98. package/dist/types/core/geometry/index.d.ts +4 -0
  99. package/dist/types/core/geometry/index.d.ts.map +1 -0
  100. package/dist/types/core/geometry/operations.d.ts +72 -0
  101. package/dist/types/core/geometry/operations.d.ts.map +1 -0
  102. package/dist/types/core/geometry/polygon.d.ts +25 -0
  103. package/dist/types/core/geometry/polygon.d.ts.map +1 -0
  104. package/dist/types/core/index.d.ts +7 -0
  105. package/dist/types/core/index.d.ts.map +1 -0
  106. package/dist/types/core/transformers/index.d.ts +26 -0
  107. package/dist/types/core/transformers/index.d.ts.map +1 -0
  108. package/dist/types/core/utils/constants.d.ts +116 -0
  109. package/dist/types/core/utils/constants.d.ts.map +1 -0
  110. package/dist/types/core/utils/helpers.d.ts +53 -0
  111. package/dist/types/core/utils/helpers.d.ts.map +1 -0
  112. package/dist/types/core/utils/index.d.ts +4 -0
  113. package/dist/types/core/utils/index.d.ts.map +1 -0
  114. package/dist/types/core/utils/timezone.d.ts +23 -0
  115. package/dist/types/core/utils/timezone.d.ts.map +1 -0
  116. package/dist/types/core/validation/index.d.ts +9 -0
  117. package/dist/types/core/validation/index.d.ts.map +1 -0
  118. package/dist/types/core/validation/operator.validator.d.ts +35 -0
  119. package/dist/types/core/validation/operator.validator.d.ts.map +1 -0
  120. package/dist/types/index.d.ts +12 -0
  121. package/dist/types/index.d.ts.map +1 -0
  122. package/dist/types/react/hooks/index.d.ts +27 -0
  123. package/dist/types/react/hooks/index.d.ts.map +1 -0
  124. package/dist/types/react/index.d.ts +2 -0
  125. package/dist/types/react/index.d.ts.map +1 -0
  126. package/dist/types/types/airspace.types.d.ts +109 -0
  127. package/dist/types/types/airspace.types.d.ts.map +1 -0
  128. package/dist/types/types/authorization.types.d.ts +124 -0
  129. package/dist/types/types/authorization.types.d.ts.map +1 -0
  130. package/dist/types/types/geometry.types.d.ts +77 -0
  131. package/dist/types/types/geometry.types.d.ts.map +1 -0
  132. package/dist/types/types/index.d.ts +5 -0
  133. package/dist/types/types/index.d.ts.map +1 -0
  134. package/package.json +84 -4
@@ -0,0 +1,156 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.validateEmail = validateEmail;
4
+ exports.validatePhone = validatePhone;
5
+ exports.validateFAAId = validateFAAId;
6
+ exports.validateOperator = validateOperator;
7
+ const constants_1 = require("../utils/constants");
8
+ /**
9
+ * Validate email address
10
+ *
11
+ * @param email - Email address
12
+ * @returns Validation result
13
+ */
14
+ function validateEmail(email) {
15
+ const errors = [];
16
+ if (!email || typeof email !== 'string') {
17
+ errors.push({
18
+ field: 'email',
19
+ message: 'Email is required',
20
+ code: constants_1.ERROR_CODES.REQUIRED_FIELD_MISSING,
21
+ });
22
+ return { valid: false, errors };
23
+ }
24
+ // Basic email validation
25
+ const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
26
+ if (!emailRegex.test(email)) {
27
+ errors.push({
28
+ field: 'email',
29
+ message: 'Invalid email address format',
30
+ code: constants_1.ERROR_CODES.INVALID_EMAIL,
31
+ });
32
+ }
33
+ return {
34
+ valid: errors.length === 0,
35
+ errors,
36
+ };
37
+ }
38
+ /**
39
+ * Validate phone number
40
+ *
41
+ * @param phone - Phone number
42
+ * @returns Validation result
43
+ */
44
+ function validatePhone(phone) {
45
+ const errors = [];
46
+ if (!phone || typeof phone !== 'string') {
47
+ errors.push({
48
+ field: 'phone',
49
+ message: 'Phone number is required',
50
+ code: constants_1.ERROR_CODES.REQUIRED_FIELD_MISSING,
51
+ });
52
+ return { valid: false, errors };
53
+ }
54
+ // Remove common phone number formatting characters
55
+ const cleaned = phone.replace(/[\s\-\(\)\+\.]/g, '');
56
+ // Check if it's a valid phone number (10+ digits)
57
+ if (!/^\d{10,}$/.test(cleaned)) {
58
+ errors.push({
59
+ field: 'phone',
60
+ message: 'Invalid phone number format (must be at least 10 digits)',
61
+ code: constants_1.ERROR_CODES.INVALID_PHONE,
62
+ });
63
+ }
64
+ return {
65
+ valid: errors.length === 0,
66
+ errors,
67
+ };
68
+ }
69
+ /**
70
+ * Validate FAA registration ID
71
+ *
72
+ * @param faaId - FAA registration ID
73
+ * @returns Validation result
74
+ */
75
+ function validateFAAId(faaId) {
76
+ const errors = [];
77
+ if (!faaId || typeof faaId !== 'string') {
78
+ errors.push({
79
+ field: 'faaId',
80
+ message: 'FAA registration ID is required',
81
+ code: constants_1.ERROR_CODES.REQUIRED_FIELD_MISSING,
82
+ });
83
+ return { valid: false, errors };
84
+ }
85
+ // FAA ID should be alphanumeric and reasonable length
86
+ const cleaned = faaId.trim();
87
+ if (cleaned.length < 3 || cleaned.length > 20) {
88
+ errors.push({
89
+ field: 'faaId',
90
+ message: 'FAA registration ID must be between 3 and 20 characters',
91
+ code: constants_1.ERROR_CODES.INVALID_FAA_ID,
92
+ });
93
+ }
94
+ return {
95
+ valid: errors.length === 0,
96
+ errors,
97
+ };
98
+ }
99
+ /**
100
+ * Validate operator information
101
+ *
102
+ * @param operator - Operator information
103
+ * @returns Validation result
104
+ */
105
+ function validateOperator(operator) {
106
+ const errors = [];
107
+ // Validate name
108
+ if (!operator.name || typeof operator.name !== 'string' || operator.name.trim().length === 0) {
109
+ errors.push({
110
+ field: 'name',
111
+ message: 'Operator name is required',
112
+ code: constants_1.ERROR_CODES.REQUIRED_FIELD_MISSING,
113
+ });
114
+ }
115
+ // Validate email
116
+ if (operator.email) {
117
+ const emailValidation = validateEmail(operator.email);
118
+ errors.push(...emailValidation.errors);
119
+ }
120
+ else {
121
+ errors.push({
122
+ field: 'email',
123
+ message: 'Email is required',
124
+ code: constants_1.ERROR_CODES.REQUIRED_FIELD_MISSING,
125
+ });
126
+ }
127
+ // Validate phone
128
+ if (operator.phone) {
129
+ const phoneValidation = validatePhone(operator.phone);
130
+ errors.push(...phoneValidation.errors);
131
+ }
132
+ else {
133
+ errors.push({
134
+ field: 'phone',
135
+ message: 'Phone number is required',
136
+ code: constants_1.ERROR_CODES.REQUIRED_FIELD_MISSING,
137
+ });
138
+ }
139
+ // Validate FAA ID
140
+ if (operator.faaId) {
141
+ const faaIdValidation = validateFAAId(operator.faaId);
142
+ errors.push(...faaIdValidation.errors);
143
+ }
144
+ else {
145
+ errors.push({
146
+ field: 'faaId',
147
+ message: 'FAA registration ID is required',
148
+ code: constants_1.ERROR_CODES.REQUIRED_FIELD_MISSING,
149
+ });
150
+ }
151
+ return {
152
+ valid: errors.length === 0,
153
+ errors,
154
+ };
155
+ }
156
+ //# sourceMappingURL=operator.validator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"operator.validator.js","sourceRoot":"","sources":["../../../../src/core/validation/operator.validator.ts"],"names":[],"mappings":";;AASA,s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AAK,EAAE,OAAO;YACd,OAAO,EAAE,iCAAiC;YAC1C,IAAI,EAAE,uBAAW,CAAC,sBAAsB;SACzC,CAAC,CAAC;IACL,CAAC;IAED,OAAO;QACL,KAAK,EAAE,MAAM,CAAC,MAAM,KAAK,CAAC;QAC1B,MAAM;KACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ /**
3
+ * @flyzone/sdk-frontend
4
+ *
5
+ * Frontend SDK for LAANC authorization - provides UI components and business
6
+ * logic for drone flight authorization.
7
+ *
8
+ * @packageDocumentation
9
+ */
10
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ var desc = Object.getOwnPropertyDescriptor(m, k);
13
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
14
+ desc = { enumerable: true, get: function() { return m[k]; } };
15
+ }
16
+ Object.defineProperty(o, k2, desc);
17
+ }) : (function(o, m, k, k2) {
18
+ if (k2 === undefined) k2 = k;
19
+ o[k2] = m[k];
20
+ }));
21
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
22
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
23
+ };
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.VERSION = void 0;
26
+ // ─── Core Module (Framework-agnostic) ────────────────────────────────────────
27
+ __exportStar(require("./core"), exports);
28
+ // ─── Types ───────────────────────────────────────────────────────────────────
29
+ __exportStar(require("./types"), exports);
30
+ // ─── Version ─────────────────────────────────────────────────────────────────
31
+ exports.VERSION = '1.0.0';
32
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;;;;;;;;;;;;;;;AAEH,gFAAgF;AAChF,yCAAuB;AAEvB,gFAAgF;AAChF,0CAAwB;AAExB,gFAAgF;AACnE,QAAA,OAAO,GAAG,OAAO,CAAC"}
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ /**
3
+ * React hooks for LAANC authorization
4
+ *
5
+ * These hooks will be implemented in future iterations to provide
6
+ * React-specific state management for the SDK.
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.useGeometry = useGeometry;
10
+ exports.useAuthorization = useAuthorization;
11
+ exports.useOperationParams = useOperationParams;
12
+ exports.useTimezone = useTimezone;
13
+ /**
14
+ * Hook for managing geometry state (circle/polygon)
15
+ * TODO: Implement useGeometry hook
16
+ */
17
+ function useGeometry() {
18
+ throw new Error('Not implemented yet - React hooks will be added in next iteration');
19
+ }
20
+ /**
21
+ * Hook for processing authorization
22
+ * TODO: Implement useAuthorization hook
23
+ */
24
+ function useAuthorization() {
25
+ throw new Error('Not implemented yet - React hooks will be added in next iteration');
26
+ }
27
+ /**
28
+ * Hook for managing operation parameters
29
+ * TODO: Implement useOperationParams hook
30
+ */
31
+ function useOperationParams() {
32
+ throw new Error('Not implemented yet - React hooks will be added in next iteration');
33
+ }
34
+ /**
35
+ * Hook for timezone detection
36
+ * TODO: Implement useTimezone hook
37
+ */
38
+ function useTimezone() {
39
+ throw new Error('Not implemented yet - React hooks will be added in next iteration');
40
+ }
41
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/react/hooks/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAMH,kCAEC;AAMD,4CAEC;AAMD,gDAEC;AAMD,kCAEC;AA9BD;;;GAGG;AACH,SAAgB,WAAW;IACzB,MAAM,IAAI,KAAK,CAAC,mEAAmE,CAAC,CAAC;AACvF,CAAC;AAED;;;GAGG;AACH,SAAgB,gBAAgB;IAC9B,MAAM,IAAI,KAAK,CAAC,mEAAmE,CAAC,CAAC;AACvF,CAAC;AAED;;;GAGG;AACH,SAAgB,kBAAkB;IAChC,MAAM,IAAI,KAAK,CAAC,mEAAmE,CAAC,CAAC;AACvF,CAAC;AAED;;;GAGG;AACH,SAAgB,WAAW;IACzB,MAAM,IAAI,KAAK,CAAC,mEAAmE,CAAC,CAAC;AACvF,CAAC"}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ // ─── React Hooks ─────────────────────────────────────────────────────────────
18
+ __exportStar(require("./hooks"), exports);
19
+ // Note: React components and context providers will be added in future iterations
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/react/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gFAAgF;AAChF,0CAAwB;AAExB,kFAAkF"}
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AirspaceFeatureType = void 0;
4
+ /**
5
+ * Airspace feature type classifications
6
+ */
7
+ var AirspaceFeatureType;
8
+ (function (AirspaceFeatureType) {
9
+ AirspaceFeatureType["UASFM"] = "UASFM";
10
+ AirspaceFeatureType["CLASS_B"] = "CLASS_B";
11
+ AirspaceFeatureType["CLASS_C"] = "CLASS_C";
12
+ AirspaceFeatureType["CLASS_D"] = "CLASS_D";
13
+ AirspaceFeatureType["CLASS_E"] = "CLASS_E";
14
+ AirspaceFeatureType["DC_FRZ"] = "DC_FRZ";
15
+ AirspaceFeatureType["NSUFR"] = "NSUFR";
16
+ AirspaceFeatureType["PNSUFR"] = "PNSUFR";
17
+ AirspaceFeatureType["SPECIAL_USE"] = "SPECIAL_USE";
18
+ AirspaceFeatureType["TFR"] = "TFR";
19
+ AirspaceFeatureType["SEAM"] = "SEAM";
20
+ AirspaceFeatureType["B4UFLY"] = "B4UFLY";
21
+ })(AirspaceFeatureType || (exports.AirspaceFeatureType = AirspaceFeatureType = {}));
22
+ //# sourceMappingURL=airspace.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"airspace.types.js","sourceRoot":"","sources":["../../../src/types/airspace.types.ts"],"names":[],"mappings":";;;AAEA;;GAEG;AACH,IAAY,mBAaX;AAbD,WAAY,mBAAmB;IAC7B,sCAAe,CAAA;IACf,0CAAmB,CAAA;IACnB,0CAAmB,CAAA;IACnB,0CAAmB,CAAA;IACnB,0CAAmB,CAAA;IACnB,wCAAiB,CAAA;IACjB,sCAAe,CAAA;IACf,wCAAiB,CAAA;IACjB,kDAA2B,CAAA;IAC3B,kCAAW,CAAA;IACX,oCAAa,CAAA;IACb,wCAAiB,CAAA;AACnB,CAAC,EAbW,mBAAmB,mCAAnB,mBAAmB,QAa9B"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=authorization.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"authorization.types.js","sourceRoot":"","sources":["../../../src/types/authorization.types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ // GeoJSON types are used for documentation purposes
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ //# sourceMappingURL=geometry.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"geometry.types.js","sourceRoot":"","sources":["../../../src/types/geometry.types.ts"],"names":[],"mappings":";AAAA,oDAAoD"}
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AirspaceFeatureType = void 0;
4
+ // ─── Airspace Types ──────────────────────────────────────────────────────────
5
+ var airspace_types_1 = require("./airspace.types");
6
+ Object.defineProperty(exports, "AirspaceFeatureType", { enumerable: true, get: function () { return airspace_types_1.AirspaceFeatureType; } });
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":";;;AAcA,gFAAgF;AAChF,mDAE0B;AADxB,qHAAA,mBAAmB,OAAA"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Airspace validation client
3
+ *
4
+ * This module provides an HTTP client for validating flight operations
5
+ * against LAANC airspace restrictions by calling your backend service.
6
+ */
7
+ // ─── Validation Client (HTTP client for your backend) ───────────────────────
8
+ export { ValidationClient, createValidationClient, } from './validation-client';
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/airspace/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,+EAA+E;AAC/E,OAAO,EACL,gBAAgB,EAChB,sBAAsB,GAEvB,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,107 @@
1
+ /**
2
+ * Validation Client - HTTP client for calling your backend validation service
3
+ *
4
+ * This module provides an HTTP client for validating flight operations against
5
+ * LAANC airspace restrictions by calling your backend service, which in turn
6
+ * uses the flyzone-backend SDK to call the Flyzone API.
7
+ *
8
+ * Flow: Frontend App → Your Backend Service → Flyzone API
9
+ */
10
+ /**
11
+ * HTTP client for airspace validation
12
+ *
13
+ * This client calls YOUR backend service, which should use the flyzone-backend
14
+ * SDK to communicate with the Flyzone API.
15
+ *
16
+ * @example
17
+ * ```typescript
18
+ * import { createValidationClient } from '@flyzone/sdk-frontend';
19
+ *
20
+ * const validationClient = createValidationClient({
21
+ * backendBaseURL: 'https://your-backend.com',
22
+ * headers: {
23
+ * 'Authorization': 'Bearer your-user-token'
24
+ * }
25
+ * });
26
+ *
27
+ * const result = await validationClient.validate({
28
+ * geometry: {
29
+ * type: 'Polygon',
30
+ * coordinates: [[[lon, lat], ...]]
31
+ * },
32
+ * startTime: '2024-03-15T14:00:00Z',
33
+ * endTime: '2024-03-15T16:00:00Z',
34
+ * timezone: 'America/Los_Angeles',
35
+ * maxAltitude: 100,
36
+ * });
37
+ * ```
38
+ */
39
+ export class ValidationClient {
40
+ constructor(config) {
41
+ this.config = {
42
+ backendBaseURL: config.backendBaseURL.replace(/\/$/, ''), // Remove trailing slash
43
+ validationPath: config.validationPath ?? '/api/airspace/validate',
44
+ headers: config.headers ?? {},
45
+ timeout: config.timeout ?? 30000,
46
+ };
47
+ }
48
+ /**
49
+ * Validates a flight operation against LAANC airspace restrictions
50
+ *
51
+ * @param params - Validation request parameters
52
+ * @returns Promise resolving to validation response
53
+ * @throws Error if the request fails or times out
54
+ */
55
+ async validate(params) {
56
+ const url = `${this.config.backendBaseURL}${this.config.validationPath}`;
57
+ const controller = new AbortController();
58
+ const timeoutId = setTimeout(() => controller.abort(), this.config.timeout);
59
+ try {
60
+ const response = await fetch(url, {
61
+ method: 'POST',
62
+ headers: {
63
+ 'Content-Type': 'application/json',
64
+ ...this.config.headers,
65
+ },
66
+ body: JSON.stringify(params),
67
+ signal: controller.signal,
68
+ });
69
+ if (!response.ok) {
70
+ const errorData = await response.json().catch(() => ({}));
71
+ throw new Error(`Validation request failed: ${response.status} ${response.statusText}. ${errorData.message || ''}`);
72
+ }
73
+ const data = await response.json();
74
+ return data;
75
+ }
76
+ catch (error) {
77
+ if (error instanceof Error) {
78
+ if (error.name === 'AbortError') {
79
+ throw new Error(`Validation request timed out after ${this.config.timeout}ms`);
80
+ }
81
+ throw error;
82
+ }
83
+ throw new Error('Unknown error during validation request');
84
+ }
85
+ finally {
86
+ clearTimeout(timeoutId);
87
+ }
88
+ }
89
+ /**
90
+ * Updates the authentication token or other headers
91
+ *
92
+ * @param headers - New headers to merge with existing headers
93
+ */
94
+ updateHeaders(headers) {
95
+ Object.assign(this.config.headers, headers);
96
+ }
97
+ }
98
+ /**
99
+ * Factory function to create a validation client
100
+ *
101
+ * @param config - Client configuration
102
+ * @returns ValidationClient instance
103
+ */
104
+ export function createValidationClient(config) {
105
+ return new ValidationClient(config);
106
+ }
107
+ //# sourceMappingURL=validation-client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validation-client.js","sourceRoot":"","sources":["../../../../src/core/airspace/validation-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAgCH;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,OAAO,gBAAgB;IAG3B,YAAY,MAA8B;QACxC,IAAI,CAAC,MAAM,GAAG;YACZ,cAAc,EAAE,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,EAAE,wBAAwB;YAClF,cAAc,EAAE,MAAM,CAAC,cAAc,IAAI,wBAAwB;YACjE,OAAO,EAAE,MAAM,CAAC,OAAO,IAAI,EAAE;YAC7B,OAAO,EAAE,MAAM,CAAC,OAAO,IAAI,KAAK;SACjC,CAAC;IACJ,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,QAAQ,CACZ,MAAiC;QAEjC,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,cAAc,GAAG,IAAI,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC;QAEzE,MAAM,UAAU,GAAG,IAAI,eAAe,EAAE,CAAC;QACzC,MAAM,SAAS,GAAG,UAAU,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAE5E,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,EAAE;gBAChC,MAAM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;IAE9B,OAAO,IAAI,gBAAgB,CAAC,MAAM,CAAC,CAAC;AACtC,CAAC"}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Data formatting utilities
3
+ *
4
+ * This module provides utilities to format data for API submission
5
+ * and UI display.
6
+ */
7
+ /**
8
+ * Format operation data for backend API submission
9
+ * TODO: Implement operation payload formatting
10
+ */
11
+ export function formatOperationPayload(_operationData) {
12
+ throw new Error('Not implemented yet');
13
+ }
14
+ /**
15
+ * Format date/time with timezone to ISO string
16
+ * TODO: Implement datetime formatting
17
+ */
18
+ export function formatDateTime(_date, _timezone) {
19
+ throw new Error('Not implemented yet');
20
+ }
21
+ /**
22
+ * Format advisories for UI display
23
+ * TODO: Implement advisory formatting
24
+ */
25
+ export function formatAdvisories(_advisories) {
26
+ throw new Error('Not implemented yet');
27
+ }
28
+ /**
29
+ * Format airspace class name
30
+ * TODO: Implement class name formatting
31
+ */
32
+ export function formatAirspaceClass(_classCode) {
33
+ throw new Error('Not implemented yet');
34
+ }
35
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/formatters/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH;;;GAGG;AACH,MAAM,UAAU,sBAAsB,CAAC,cAAmB;IACxD,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;AACzC,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,KAAW,EAAE,SAAiB;IAC3D,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;AACzC,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,WAAkB;IACjD,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;AACzC,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CAAC,UAAkB;IACpD,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;AACzC,CAAC"}
@@ -0,0 +1,98 @@
1
+ import * as turf from '@turf/turf';
2
+ import { CIRCLE_CONSTRAINTS, ERROR_CODES } from '../utils/constants';
3
+ import { feetToMeters } from '../utils/helpers';
4
+ /**
5
+ * Create a circular polygon from a center point and radius
6
+ *
7
+ * @param center - Center point of the circle
8
+ * @param radiusFeet - Radius in feet
9
+ * @param options - Circle creation options
10
+ * @returns GeoJSON Feature with Polygon geometry
11
+ */
12
+ export function createCircle(center, radiusFeet, options = {}) {
13
+ const { steps = CIRCLE_CONSTRAINTS.DEFAULT_STEPS } = options;
14
+ // Validate inputs
15
+ const validation = validateCircle(radiusFeet);
16
+ if (!validation.valid) {
17
+ throw new Error(`Invalid circle parameters: ${validation.errors.map(e => e.message).join(', ')}`);
18
+ }
19
+ // Convert radius to kilometers for Turf.js
20
+ const radiusMeters = feetToMeters(radiusFeet);
21
+ const radiusKm = radiusMeters / 1000;
22
+ // Create circle using Turf.js
23
+ const point = turf.point([center.lng, center.lat]);
24
+ const circle = turf.circle(point, radiusKm, { steps, units: 'kilometers' });
25
+ // Add metadata to properties
26
+ circle.properties = {
27
+ ...circle.properties,
28
+ geometryType: 'circle',
29
+ center: [center.lng, center.lat],
30
+ radiusFeet,
31
+ radiusMeters,
32
+ };
33
+ return circle;
34
+ }
35
+ /**
36
+ * Validate circle parameters
37
+ *
38
+ * @param radiusFeet - Radius in feet
39
+ * @returns Validation result
40
+ */
41
+ export function validateCircle(radiusFeet) {
42
+ const errors = [];
43
+ if (typeof radiusFeet !== 'number' || !isFinite(radiusFeet)) {
44
+ errors.push({
45
+ field: 'radiusFeet',
46
+ message: 'Radius must be a valid number',
47
+ code: ERROR_CODES.INVALID_COORDINATES,
48
+ });
49
+ }
50
+ else {
51
+ if (radiusFeet < CIRCLE_CONSTRAINTS.MIN_RADIUS) {
52
+ errors.push({
53
+ field: 'radiusFeet',
54
+ message: `Radius must be at least ${CIRCLE_CONSTRAINTS.MIN_RADIUS} feet`,
55
+ code: ERROR_CODES.CIRCLE_RADIUS_TOO_SMALL,
56
+ });
57
+ }
58
+ if (radiusFeet > CIRCLE_CONSTRAINTS.MAX_RADIUS) {
59
+ errors.push({
60
+ field: 'radiusFeet',
61
+ message: `Radius must not exceed ${CIRCLE_CONSTRAINTS.MAX_RADIUS} feet`,
62
+ code: ERROR_CODES.CIRCLE_RADIUS_TOO_LARGE,
63
+ });
64
+ }
65
+ }
66
+ return {
67
+ valid: errors.length === 0,
68
+ errors,
69
+ };
70
+ }
71
+ /**
72
+ * Get the center point of a circle geometry
73
+ *
74
+ * @param circle - Circle feature
75
+ * @returns Center point as LatLng
76
+ */
77
+ export function getCircleCenter(circle) {
78
+ const center = circle.properties?.center;
79
+ if (center && Array.isArray(center) && center.length === 2) {
80
+ return { lng: center[0], lat: center[1] };
81
+ }
82
+ // Fallback: calculate centroid
83
+ const centroid = turf.centroid(circle);
84
+ return {
85
+ lng: centroid.geometry.coordinates[0],
86
+ lat: centroid.geometry.coordinates[1],
87
+ };
88
+ }
89
+ /**
90
+ * Get the radius of a circle geometry
91
+ *
92
+ * @param circle - Circle feature
93
+ * @returns Radius in feet, or null if not a circle
94
+ */
95
+ export function getCircleRadius(circle) {
96
+ return circle.properties?.radiusFeet ?? null;
97
+ }
98
+ //# sourceMappingURL=circle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"circle.js","sourceRoot":"","sources":["../../../../src/core/geometry/circle.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,IAAI,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD;;;;;;;GAOG;AACH,MAAM,UAAU,YAAY,CAC1B,MAAc,EACd,UAAkB,EAClB,UAAyB,EAAE;IAE3B,MAAM,EAAE,KAAK,GAAG,kBAAkB,CAAC,aAAa,EAAE,GAAG,OAAO,CAAC;IAE7D,kBAAkB;IAClB,MAAM,UAAU,GAAG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,CAAC,UAAU,EAAE,UAAU,IAAI,IAAI,CAAC;AAC/C,CAAC"}
@@ -0,0 +1,7 @@
1
+ // ─── Circle ──────────────────────────────────────────────────────────────────
2
+ export { createCircle, validateCircle, getCircleCenter, getCircleRadius, } from './circle';
3
+ // ─── Polygon ─────────────────────────────────────────────────────────────────
4
+ export { createPolygon, validatePolygon, getPolygonPoints, } from './polygon';
5
+ // ─── Operations ──────────────────────────────────────────────────────────────
6
+ export { calculateArea, calculatePerimeter, calculateCentroid, calculateIntersection, checkIntersection, checkContains, calculateDistance, calculateBearing, createBuffer, } from './operations';
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/geometry/index.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,OAAO,EACL,YAAY,EACZ,cAAc,EACd,eAAe,EACf,eAAe,GAChB,MAAM,UAAU,CAAC;AAElB,gFAAgF;AAChF,OAAO,EACL,aAAa,EACb,eAAe,EACf,gBAAgB,GACjB,MAAM,WAAW,CAAC;AAEnB,gFAAgF;AAChF,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EAChB,YAAY,GACb,MAAM,cAAc,CAAC"}