@odynn/awayz-flights 0.1.20 → 0.1.22

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.
@@ -94,13 +94,13 @@ function ae(o, t) {
94
94
  const p = Object.assign({}, n);
95
95
  p.accept || (p.accept = L);
96
96
  let m;
97
- function w() {
97
+ function y() {
98
98
  m.abort(), document.hidden || R();
99
99
  }
100
- a || document.addEventListener("visibilitychange", w);
101
- let F = se, E = 0;
100
+ a || document.addEventListener("visibilitychange", y);
101
+ let I = se, E = 0;
102
102
  function S() {
103
- document.removeEventListener("visibilitychange", w), window.clearTimeout(E), m.abort();
103
+ document.removeEventListener("visibilitychange", y), window.clearTimeout(E), m.abort();
104
104
  }
105
105
  r == null || r.addEventListener("abort", () => {
106
106
  S(), g();
@@ -110,16 +110,16 @@ function ae(o, t) {
110
110
  var T;
111
111
  m = new AbortController();
112
112
  try {
113
- const O = await _(o, Object.assign(Object.assign({}, b), { headers: p, signal: m.signal }));
114
- await q(O), await ee(O.body, te(ne((h) => {
113
+ const w = await _(o, Object.assign(Object.assign({}, b), { headers: p, signal: m.signal }));
114
+ await q(w), await ee(w.body, te(ne((h) => {
115
115
  h ? p[M] = h : delete p[M];
116
116
  }, (h) => {
117
- F = h;
117
+ I = h;
118
118
  }, v))), c == null || c(), S(), g();
119
- } catch (O) {
119
+ } catch (w) {
120
120
  if (!m.signal.aborted)
121
121
  try {
122
- const h = (T = u == null ? void 0 : u(O)) !== null && T !== void 0 ? T : F;
122
+ const h = (T = u == null ? void 0 : u(w)) !== null && T !== void 0 ? T : I;
123
123
  window.clearTimeout(E), E = window.setTimeout(R, h);
124
124
  } catch (h) {
125
125
  S(), D(h);
@@ -149,7 +149,7 @@ const U = 1, W = J.ECONOMY, z = new AbortController(), ue = 3 * 60 * 1e3, B = (o
149
149
  setOutboundResults: D,
150
150
  partialOfferRequestId: p,
151
151
  setPartialOfferRequestId: m
152
- } = G(), w = ({
152
+ } = G(), y = ({
153
153
  data: e,
154
154
  previousResults: l,
155
155
  inbound: f
@@ -157,7 +157,7 @@ const U = 1, W = J.ECONOMY, z = new AbortController(), ue = 3 * 60 * 1e3, B = (o
157
157
  const i = K(e, l);
158
158
  return (f ? g : D)(Q(i)), i;
159
159
  }, {
160
- mutate: F,
160
+ mutate: I,
161
161
  status: E,
162
162
  error: S
163
163
  } = P({
@@ -201,7 +201,7 @@ const U = 1, W = J.ECONOMY, z = new AbortController(), ue = 3 * 60 * 1e3, B = (o
201
201
  console.log("oh lol, it didn't work");
202
202
  return;
203
203
  }
204
- w({ data: f }), i && m(i);
204
+ y({ data: f }), i && m(i);
205
205
  },
206
206
  onError: (e) => {
207
207
  console.error("Error in outbound flight search:", e);
@@ -221,7 +221,7 @@ const U = 1, W = J.ECONOMY, z = new AbortController(), ue = 3 * 60 * 1e3, B = (o
221
221
  },
222
222
  onSuccess: (e) => {
223
223
  const { success: l, data: f } = e;
224
- l && w({
224
+ l && y({
225
225
  data: f.offers,
226
226
  inbound: !0
227
227
  });
@@ -231,7 +231,7 @@ const U = 1, W = J.ECONOMY, z = new AbortController(), ue = 3 * 60 * 1e3, B = (o
231
231
  }
232
232
  }), {
233
233
  mutate: T,
234
- status: O,
234
+ status: w,
235
235
  error: h
236
236
  } = P({
237
237
  mutationFn: async (e) => {
@@ -264,7 +264,7 @@ const U = 1, W = J.ECONOMY, z = new AbortController(), ue = 3 * 60 * 1e3, B = (o
264
264
  });
265
265
  let i = [];
266
266
  a.current = setTimeout(() => {
267
- I();
267
+ C();
268
268
  }, ue), await ae(Z() + f, {
269
269
  headers: {
270
270
  "Content-Type": "application/json",
@@ -272,34 +272,34 @@ const U = 1, W = J.ECONOMY, z = new AbortController(), ue = 3 * 60 * 1e3, B = (o
272
272
  "client-id": (t == null ? void 0 : t.clientId) || ""
273
273
  },
274
274
  signal: z.signal,
275
- onmessage(C) {
275
+ onmessage(F) {
276
276
  try {
277
- const y = x(JSON.parse(C.data));
278
- if (y.success === !1) {
279
- I();
277
+ const O = x(JSON.parse(F.data));
278
+ if (O.success === !1) {
279
+ C();
280
280
  return;
281
281
  }
282
- if (y.close === !0) {
283
- I();
282
+ if (O.close === !0) {
283
+ C();
284
284
  return;
285
285
  }
286
- y.meta, y.flights && (i = w({
287
- data: y.flights,
286
+ O.flights && (i = y({
287
+ data: O.flights,
288
288
  previousResults: i
289
289
  }));
290
- } catch (y) {
291
- console.error("Error parsing message:", y);
290
+ } catch (O) {
291
+ console.error("Error parsing message:", O), C();
292
292
  }
293
293
  },
294
- onerror(C) {
295
- throw console.error("EventSource error:", C), I(), C;
294
+ onerror(F) {
295
+ throw console.error("EventSource error:", F), C(), F;
296
296
  },
297
297
  onclose() {
298
- console.log("EventSource closed"), u(!1);
298
+ u(!1);
299
299
  },
300
300
  keepalive: !1
301
301
  });
302
- }, I = () => {
302
+ }, C = () => {
303
303
  c && (z.abort(), a.current && (clearTimeout(a.current), a.current = null), u(!1));
304
304
  };
305
305
  return {
@@ -314,7 +314,7 @@ const U = 1, W = J.ECONOMY, z = new AbortController(), ue = 3 * 60 * 1e3, B = (o
314
314
  * @type {boolean}
315
315
  * @default false
316
316
  */
317
- loadingFares: O === "pending",
317
+ loadingFares: w === "pending",
318
318
  outboundError: S,
319
319
  inboundError: R,
320
320
  roundTripFaresError: h,
@@ -336,7 +336,7 @@ const U = 1, W = J.ECONOMY, z = new AbortController(), ue = 3 * 60 * 1e3, B = (o
336
336
  j(e);
337
337
  break;
338
338
  case k.CASH:
339
- F(e);
339
+ I(e);
340
340
  break;
341
341
  case k.MILES:
342
342
  j(e);
@@ -30,7 +30,7 @@ export declare const getFlightNumber: (segment: ISegment) => string;
30
30
  * @param {EFlightPaymentType} params.paymentType - The type of payment (e.g., cash, points).
31
31
  * @returns {string} The constructed flight search query URL.
32
32
  */
33
- export declare const buildFlightSearchQuery: ({ originCode, destinationCode, departureDate, cabinClass, passengerCount, paymentType }: {
33
+ export declare const buildFlightSearchQuery: ({ originCode, destinationCode, departureDate, cabinClass, passengerCount, paymentType, }: {
34
34
  originCode: string;
35
35
  destinationCode: string;
36
36
  departureDate: string;
@@ -1,36 +1,36 @@
1
1
  import { h as D } from "../arrayExtensions-DWKenJCh.js";
2
- import { c as z } from "../dateUtils-DeNLG5hw.js";
2
+ import { c as _ } from "../dateUtils-DeNLG5hw.js";
3
3
  import "react";
4
- import { awayzClient as O } from "@odynn/awayz-auth";
5
- import { WalletService as G } from "../services/wallet/WalletService.js";
6
- import { ERewardProgramCategories as _ } from "../services/wallet/WalletService.types.js";
7
- const T = (s) => s == null ? void 0 : s.map((e) => {
8
- var n, a, i, c, t, l, d, r, m, L, A, M, N, F, w, u, y, o, C, h, b, g, p, f;
4
+ import { awayzClient as Z } from "@odynn/awayz-auth";
5
+ import { WalletService as B } from "../services/wallet/WalletService.js";
6
+ import { ERewardProgramCategories as S } from "../services/wallet/WalletService.types.js";
7
+ const v = (s) => s == null ? void 0 : s.map((e) => {
8
+ var n, a, i, c, t, l, d, r, m, L, A, M, N, F, w, u, y, o, C, h, b, g, p, f, T, k, P, z;
9
9
  return {
10
10
  id: e.id,
11
11
  points: (e == null ? void 0 : e.points) >= 0 ? e.points : -1,
12
12
  partial: e.partial,
13
13
  origin: {
14
14
  city: e.slices[0].segments[0].origin.cityName || ((a = (n = e.slices[0].segments[0].origin) == null ? void 0 : n.city) == null ? void 0 : a.name),
15
- country: e.slices[0].segments[0].origin.iataCountryCode || ((i = e.slices[0].segments[0].origin) == null ? void 0 : i.city.iataCountryCode),
16
- airportCode: e.slices[0].segments[0].origin.iataCityCode || e.slices[0].segments[0].origin.city.iataCode,
15
+ country: e.slices[0].segments[0].origin.iataCountryCode || ((c = (i = e.slices[0].segments[0].origin) == null ? void 0 : i.city) == null ? void 0 : c.iataCountryCode),
16
+ airportCode: e.slices[0].segments[0].origin.iataCityCode || ((t = e.slices[0].segments[0].origin.city) == null ? void 0 : t.iataCode),
17
17
  coordinates: {
18
- latitude: e.slices[0].segments[0].origin.city.latitude,
19
- longitude: e.slices[0].segments[0].origin.city.longitude
18
+ latitude: (l = e.slices[0].segments[0].origin.city) == null ? void 0 : l.latitude,
19
+ longitude: (d = e.slices[0].segments[0].origin.city) == null ? void 0 : d.longitude
20
20
  }
21
21
  },
22
22
  destination: {
23
- city: ((t = (c = e.slices[0].segments.getLast()) == null ? void 0 : c.destination) == null ? void 0 : t.cityName) || ((r = (d = (l = e.slices[0].segments.getLast()) == null ? void 0 : l.destination) == null ? void 0 : d.city) == null ? void 0 : r.name),
24
- country: ((L = (m = e.slices[0].segments.getLast()) == null ? void 0 : m.destination) == null ? void 0 : L.iataCountryCode) || ((N = (M = (A = e.slices[0].segments.getLast()) == null ? void 0 : A.destination) == null ? void 0 : M.city) == null ? void 0 : N.iataCountryCode),
25
- airportCode: ((w = (F = e.slices[0].segments.getLast()) == null ? void 0 : F.destination) == null ? void 0 : w.iataCityCode) || ((o = (y = (u = e.slices[0].segments.getLast()) == null ? void 0 : u.destination) == null ? void 0 : y.city) == null ? void 0 : o.iataCode),
23
+ city: ((m = (r = e.slices[0].segments.getLast()) == null ? void 0 : r.destination) == null ? void 0 : m.cityName) || ((M = (A = (L = e.slices[0].segments.getLast()) == null ? void 0 : L.destination) == null ? void 0 : A.city) == null ? void 0 : M.name),
24
+ country: ((F = (N = e.slices[0].segments.getLast()) == null ? void 0 : N.destination) == null ? void 0 : F.iataCountryCode) || ((y = (u = (w = e.slices[0].segments.getLast()) == null ? void 0 : w.destination) == null ? void 0 : u.city) == null ? void 0 : y.iataCountryCode),
25
+ airportCode: ((C = (o = e.slices[0].segments.getLast()) == null ? void 0 : o.destination) == null ? void 0 : C.iataCityCode) || ((g = (b = (h = e.slices[0].segments.getLast()) == null ? void 0 : h.destination) == null ? void 0 : b.city) == null ? void 0 : g.iataCode),
26
26
  coordinates: {
27
- latitude: (b = (h = (C = e.slices[0].segments.getLast()) == null ? void 0 : C.destination) == null ? void 0 : h.city) == null ? void 0 : b.latitude,
28
- longitude: (f = (p = (g = e.slices[0].segments.getLast()) == null ? void 0 : g.destination) == null ? void 0 : p.city) == null ? void 0 : f.longitude
27
+ latitude: (T = (f = (p = e.slices[0].segments.getLast()) == null ? void 0 : p.destination) == null ? void 0 : f.city) == null ? void 0 : T.latitude,
28
+ longitude: (z = (P = (k = e.slices[0].segments.getLast()) == null ? void 0 : k.destination) == null ? void 0 : P.city) == null ? void 0 : z.longitude
29
29
  }
30
30
  },
31
31
  airline: e.owner.name,
32
32
  cash: parseFloat(e.totalAmount),
33
- flightNumber: v(e.slices[0].segments[0]),
33
+ flightNumber: $(e.slices[0].segments[0]),
34
34
  awayzGroupId: e.slices[0].comparisonKey || e.awayzRouteId || e.awayzGroupId || e.id,
35
35
  departureTime: D(e.slices[0].segments[0].departingAt).toDate(),
36
36
  arrivalTime: D(
@@ -41,7 +41,7 @@ const T = (s) => s == null ? void 0 : s.map((e) => {
41
41
  duration: e.slices[0].duration,
42
42
  airlineProgram: e.airlineProgram,
43
43
  paymentOptions: [],
44
- durationMinutes: z({
44
+ durationMinutes: _({
45
45
  departureTime: D(e.slices[0].segments[0].departingAt),
46
46
  arrivalTime: D(e.slices[0].segments.getLast().arrivingAt),
47
47
  originTimeZone: e.slices[0].segments[0].origin.timeZone,
@@ -49,9 +49,9 @@ const T = (s) => s == null ? void 0 : s.map((e) => {
49
49
  duration: e.slices[0].duration
50
50
  })
51
51
  };
52
- }), U = (s, e) => {
52
+ }), Q = (s, e) => {
53
53
  if (!(e != null && e.length))
54
- return T(s);
54
+ return v(s);
55
55
  const n = [...e];
56
56
  let a = [];
57
57
  const i = {};
@@ -106,12 +106,12 @@ const T = (s) => s == null ? void 0 : s.map((e) => {
106
106
  }
107
107
  return [
108
108
  ...n,
109
- ...T(a) ?? []
109
+ ...v(a) ?? []
110
110
  ];
111
- }, v = (s) => {
111
+ }, $ = (s) => {
112
112
  const e = s.operatingCarrierFlightNumber ? s.operatingCarrier : s.marketingCarrier, n = s.operatingCarrierFlightNumber ?? s.marketingCarrierFlightNumber;
113
113
  return e.iataCode + " " + I(n);
114
- }, K = ({
114
+ }, Y = ({
115
115
  originCode: s,
116
116
  destinationCode: e,
117
117
  departureDate: n,
@@ -121,9 +121,9 @@ const T = (s) => s == null ? void 0 : s.map((e) => {
121
121
  }) => {
122
122
  let t = "/flights/search/one-way/points-cash?";
123
123
  return t += `origin=${s}`, t += `&destination=${e}`, t += `&departure_date=${n}`, t += `&cabin_class=${a}`, t += `&adults=${i}`, t += `&cash_or_points=[${c}]`, t;
124
- }, j = (s) => {
124
+ }, x = (s) => {
125
125
  const e = s.reduce((a, i) => {
126
- const c = i.flightDetails.slices[0].segments.map((t) => I(v(t))).join("_");
126
+ const c = i.flightDetails.slices[0].segments.map((t) => I($(t))).join("_");
127
127
  return a[c] || (a[c] = []), a[c].push(i), a;
128
128
  }, {});
129
129
  return Object.values(e).map(
@@ -171,7 +171,7 @@ const T = (s) => s == null ? void 0 : s.map((e) => {
171
171
  awayzGroupId: i.awayzGroupId,
172
172
  duration: i.duration,
173
173
  airlineProgram: i.airlineProgram,
174
- durationMinutes: z({
174
+ durationMinutes: _({
175
175
  departureTime: D(
176
176
  i.flightDetails.slices[0].segments[0].departingAt
177
177
  ),
@@ -188,43 +188,43 @@ const T = (s) => s == null ? void 0 : s.map((e) => {
188
188
  };
189
189
  }
190
190
  );
191
- }, I = (s) => s.replace(/^0+/, ""), q = (s) => `https://assets.duffel.com/img/airlines/for-light-background/full-color-logo/${s}.svg`, k = "/img/logo/odynn-eye.svg", P = {
192
- categoryLogo: k,
193
- programLogo: k,
191
+ }, I = (s) => s.replace(/^0+/, ""), V = (s) => `https://assets.duffel.com/img/airlines/for-light-background/full-color-logo/${s}.svg`, O = "/img/logo/odynn-eye.svg", G = {
192
+ categoryLogo: O,
193
+ programLogo: O,
194
194
  awayzActive: [],
195
195
  mainProgram: "Unknown",
196
196
  displayProgram: "Unknown",
197
197
  id: "Unknown",
198
198
  totalAccumulatedPoints: 0,
199
- category: _.Airline,
199
+ category: S.Airline,
200
200
  colour: "#fff",
201
201
  // Using App Foreground Colour
202
202
  url: "https://www.odynn.com"
203
- }, Q = async (s) => {
204
- const { airlines: e } = await O.ensureQueryData({
203
+ }, W = async (s) => {
204
+ const { airlines: e } = await Z.ensureQueryData({
205
205
  queryKey: ["walletAwards"],
206
- queryFn: G.getAwards,
206
+ queryFn: B.getAwards,
207
207
  staleTime: 864e5
208
208
  // 24 hours
209
209
  });
210
210
  let n = e.find(
211
211
  (a) => a.mainProgram.toLowerCase().includes(s.toLowerCase()) || a.displayProgram.toLowerCase().includes(s.toLowerCase())
212
- ) ?? P;
212
+ ) ?? G;
213
213
  return n || (n = {
214
- ...P,
214
+ ...G,
215
215
  mainProgram: s,
216
216
  displayProgram: s,
217
217
  id: s
218
218
  }), n;
219
219
  };
220
220
  export {
221
- P as DEFAULT_AIRLINE_PROGRAM,
222
- K as buildFlightSearchQuery,
223
- Q as getAirlineProgram,
224
- v as getFlightNumber,
225
- q as getLogoPath,
226
- j as groupFlightResults,
227
- T as mapFlightDetailsToResults,
228
- U as parseFlightDetails,
221
+ G as DEFAULT_AIRLINE_PROGRAM,
222
+ Y as buildFlightSearchQuery,
223
+ W as getAirlineProgram,
224
+ $ as getFlightNumber,
225
+ V as getLogoPath,
226
+ x as groupFlightResults,
227
+ v as mapFlightDetailsToResults,
228
+ Q as parseFlightDetails,
229
229
  I as removeLeadingZeros
230
230
  };
package/package.json CHANGED
@@ -1,74 +1,74 @@
1
- {
2
- "name": "@odynn/awayz-flights",
3
- "version": "0.1.20",
4
- "type": "module",
5
- "files": [
6
- "dist"
7
- ],
8
- "main": "dist/main.js",
9
- "types": "./dist/lib/main.d.ts",
10
- "scripts": {
11
- "test": "vite",
12
- "dev": "npm run storybook",
13
- "build": "tsc -b ./tsconfig.lib.json && vite build",
14
- "stoot": "npm publish --access public",
15
- "push": "npm publish --access public",
16
- "lint": "eslint .",
17
- "preview": "vite preview",
18
- "storybook": "storybook dev -p 6006",
19
- "build-storybook": "storybook build"
20
- },
21
- "peerDependencies": {
22
- "react": "^18.0.0",
23
- "react-dom": "^18.0.0"
24
- },
25
- "devDependencies": {
26
- "@chromatic-com/storybook": "^3.2.4",
27
- "@eslint/js": "^9.17.0",
28
- "@storybook/addon-essentials": "^8.5.0",
29
- "@storybook/addon-interactions": "^8.5.0",
30
- "@storybook/addon-onboarding": "^8.5.0",
31
- "@storybook/blocks": "^8.5.0",
32
- "@storybook/react": "^8.5.0",
33
- "@storybook/react-vite": "^8.5.0",
34
- "@storybook/test": "^8.5.0",
35
- "@type-op/shared": "^1.0.0",
36
- "@types/node": "^22.10.7",
37
- "@types/react": "^18.3.18",
38
- "@types/react-dom": "^18.3.5",
39
- "@vitejs/plugin-react": "^4.3.4",
40
- "axios": "^1.7.9",
41
- "eslint": "^9.17.0",
42
- "eslint-plugin-react-hooks": "^5.0.0",
43
- "eslint-plugin-react-refresh": "^0.4.16",
44
- "eslint-plugin-storybook": "^0.11.2",
45
- "glob": "^11.0.1",
46
- "globals": "^15.14.0",
47
- "moment": "^2.30.1",
48
- "moment-timezone": "^0.5.47",
49
- "react": "^18.3.1",
50
- "react-dom": "^18.3.1",
51
- "react-icons": "^5.4.0",
52
- "sass": "^1.83.4",
53
- "storybook": "^8.5.0",
54
- "typescript": "~5.6.2",
55
- "typescript-eslint": "^8.18.2",
56
- "vite": "^6.0.5",
57
- "vite-plugin-dts": "^4.5.0",
58
- "vite-plugin-lib-inject-css": "^2.2.1",
59
- "zustand": "^5.0.3"
60
- },
61
- "sideEffects": [
62
- "**/*.css"
63
- ],
64
- "eslintConfig": {
65
- "extends": [
66
- "plugin:storybook/recommended"
67
- ]
68
- },
69
- "dependencies": {
70
- "@microsoft/fetch-event-source": "^2.0.1",
71
- "@odynn/awayz-auth": "^0.1.33",
72
- "@tanstack/react-query": "^5.67.1"
73
- }
74
- }
1
+ {
2
+ "name": "@odynn/awayz-flights",
3
+ "version": "0.1.22",
4
+ "type": "module",
5
+ "files": [
6
+ "dist"
7
+ ],
8
+ "main": "dist/main.js",
9
+ "types": "./dist/lib/main.d.ts",
10
+ "scripts": {
11
+ "test": "vite",
12
+ "dev": "npm run storybook",
13
+ "build": "tsc -b ./tsconfig.lib.json && vite build",
14
+ "stoot": "npm publish --access public",
15
+ "push": "npm publish --access public",
16
+ "lint": "eslint .",
17
+ "preview": "vite preview",
18
+ "storybook": "storybook dev -p 6006",
19
+ "build-storybook": "storybook build"
20
+ },
21
+ "peerDependencies": {
22
+ "react": "^18.0.0",
23
+ "react-dom": "^18.0.0"
24
+ },
25
+ "devDependencies": {
26
+ "@chromatic-com/storybook": "^3.2.4",
27
+ "@eslint/js": "^9.17.0",
28
+ "@storybook/addon-essentials": "^8.5.0",
29
+ "@storybook/addon-interactions": "^8.5.0",
30
+ "@storybook/addon-onboarding": "^8.5.0",
31
+ "@storybook/blocks": "^8.5.0",
32
+ "@storybook/react": "^8.5.0",
33
+ "@storybook/react-vite": "^8.5.0",
34
+ "@storybook/test": "^8.5.0",
35
+ "@type-op/shared": "^1.0.0",
36
+ "@types/node": "^22.10.7",
37
+ "@types/react": "^18.3.18",
38
+ "@types/react-dom": "^18.3.5",
39
+ "@vitejs/plugin-react": "^4.3.4",
40
+ "axios": "^1.7.9",
41
+ "eslint": "^9.17.0",
42
+ "eslint-plugin-react-hooks": "^5.0.0",
43
+ "eslint-plugin-react-refresh": "^0.4.16",
44
+ "eslint-plugin-storybook": "^0.11.2",
45
+ "glob": "^11.0.1",
46
+ "globals": "^15.14.0",
47
+ "moment": "^2.30.1",
48
+ "moment-timezone": "^0.5.47",
49
+ "react": "^18.3.1",
50
+ "react-dom": "^18.3.1",
51
+ "react-icons": "^5.4.0",
52
+ "sass": "^1.83.4",
53
+ "storybook": "^8.5.0",
54
+ "typescript": "~5.6.2",
55
+ "typescript-eslint": "^8.18.2",
56
+ "vite": "^6.0.5",
57
+ "vite-plugin-dts": "^4.5.0",
58
+ "vite-plugin-lib-inject-css": "^2.2.1",
59
+ "zustand": "^5.0.3"
60
+ },
61
+ "sideEffects": [
62
+ "**/*.css"
63
+ ],
64
+ "eslintConfig": {
65
+ "extends": [
66
+ "plugin:storybook/recommended"
67
+ ]
68
+ },
69
+ "dependencies": {
70
+ "@microsoft/fetch-event-source": "^2.0.1",
71
+ "@odynn/awayz-auth": "^0.1.33",
72
+ "@tanstack/react-query": "^5.67.1"
73
+ }
74
+ }
package/README.md DELETED
@@ -1,50 +0,0 @@
1
- # React + TypeScript + Vite
2
-
3
- This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
4
-
5
- Currently, two official plugins are available:
6
-
7
- - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
8
- - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
9
-
10
- ## Expanding the ESLint configuration
11
-
12
- If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
13
-
14
- - Configure the top-level `parserOptions` property like this:
15
-
16
- ```js
17
- export default tseslint.config({
18
- languageOptions: {
19
- // other options...
20
- parserOptions: {
21
- project: ['./tsconfig.node.json', './tsconfig.app.json'],
22
- tsconfigRootDir: import.meta.dirname,
23
- },
24
- },
25
- })
26
- ```
27
-
28
- - Replace `tseslint.configs.recommended` to `tseslint.configs.recommendedTypeChecked` or `tseslint.configs.strictTypeChecked`
29
- - Optionally add `...tseslint.configs.stylisticTypeChecked`
30
- - Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and update the config:
31
-
32
- ```js
33
- // eslint.config.js
34
- import react from 'eslint-plugin-react'
35
-
36
- export default tseslint.config({
37
- // Set the react version
38
- settings: { react: { version: '18.3' } },
39
- plugins: {
40
- // Add the react plugin
41
- react,
42
- },
43
- rules: {
44
- // other rules...
45
- // Enable its recommended rules
46
- ...react.configs.recommended.rules,
47
- ...react.configs['jsx-runtime'].rules,
48
- },
49
- })
50
- ```