@figma-vars/hooks 3.0.0-beta.1 → 3.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.
Files changed (70) hide show
  1. package/README.md +417 -173
  2. package/dist/api/fetcher.d.ts +32 -1
  3. package/dist/api/fetcher.d.ts.map +1 -1
  4. package/dist/api/index.d.ts +2 -0
  5. package/dist/api/index.d.ts.map +1 -1
  6. package/dist/api/mutator.d.ts +36 -9
  7. package/dist/api/mutator.d.ts.map +1 -1
  8. package/dist/constants/index.d.ts +2 -28
  9. package/dist/constants/index.d.ts.map +1 -1
  10. package/dist/contexts/FigmaTokenContext.d.ts.map +1 -1
  11. package/dist/contexts/FigmaVarsProvider.d.ts +3 -1
  12. package/dist/contexts/FigmaVarsProvider.d.ts.map +1 -1
  13. package/dist/contexts/index.d.ts +1 -1
  14. package/dist/contexts/index.d.ts.map +1 -1
  15. package/dist/contexts/useFigmaTokenContext.d.ts.map +1 -1
  16. package/dist/core/index.d.cts +8 -0
  17. package/dist/core/index.d.ts +8 -0
  18. package/dist/core/index.d.ts.map +1 -0
  19. package/dist/core.cjs +1 -0
  20. package/dist/core.d.cts +2 -0
  21. package/dist/core.d.ts +2 -0
  22. package/dist/core.mjs +20 -0
  23. package/dist/hooks/index.d.ts +64 -0
  24. package/dist/hooks/index.d.ts.map +1 -1
  25. package/dist/hooks/useBulkUpdateVariables.d.ts.map +1 -1
  26. package/dist/hooks/useCollectionById.d.ts +31 -0
  27. package/dist/hooks/useCollectionById.d.ts.map +1 -0
  28. package/dist/hooks/useCreateVariable.d.ts.map +1 -1
  29. package/dist/hooks/useDeleteVariable.d.ts.map +1 -1
  30. package/dist/hooks/useFigmaToken.d.ts.map +1 -1
  31. package/dist/hooks/useInvalidateVariables.d.ts +34 -0
  32. package/dist/hooks/useInvalidateVariables.d.ts.map +1 -0
  33. package/dist/hooks/useModesByCollection.d.ts +34 -0
  34. package/dist/hooks/useModesByCollection.d.ts.map +1 -0
  35. package/dist/hooks/usePublishedVariables.d.ts +42 -0
  36. package/dist/hooks/usePublishedVariables.d.ts.map +1 -0
  37. package/dist/hooks/useUpdateVariable.d.ts.map +1 -1
  38. package/dist/hooks/useVariableById.d.ts +31 -0
  39. package/dist/hooks/useVariableById.d.ts.map +1 -0
  40. package/dist/hooks/useVariableCollections.d.ts.map +1 -1
  41. package/dist/hooks/useVariableModes.d.ts.map +1 -1
  42. package/dist/hooks/useVariables.d.ts +3 -1
  43. package/dist/hooks/useVariables.d.ts.map +1 -1
  44. package/dist/index-5ZyKWuYv.cjs +1 -0
  45. package/dist/index-ClHLYVvu.js +142 -0
  46. package/dist/index.cjs +1 -1
  47. package/dist/index.d.cts +9 -4
  48. package/dist/index.d.ts +9 -4
  49. package/dist/index.d.ts.map +1 -1
  50. package/dist/index.mjs +319 -163
  51. package/dist/types/contexts.d.ts +30 -3
  52. package/dist/types/contexts.d.ts.map +1 -1
  53. package/dist/types/figma.d.ts +64 -3
  54. package/dist/types/figma.d.ts.map +1 -1
  55. package/dist/types/hooks.d.ts.map +1 -1
  56. package/dist/types/index.d.ts.map +1 -1
  57. package/dist/types/mutations.d.ts +18 -4
  58. package/dist/types/mutations.d.ts.map +1 -1
  59. package/dist/utils/errorHelpers.d.ts +142 -0
  60. package/dist/utils/errorHelpers.d.ts.map +1 -0
  61. package/dist/utils/filterVariables.d.ts.map +1 -1
  62. package/dist/utils/index.d.ts +3 -1
  63. package/dist/utils/index.d.ts.map +1 -1
  64. package/dist/utils/swrKeys.d.ts +24 -0
  65. package/dist/utils/swrKeys.d.ts.map +1 -0
  66. package/dist/utils/typeGuards.d.ts +50 -0
  67. package/dist/utils/typeGuards.d.ts.map +1 -0
  68. package/package.json +75 -31
  69. package/scripts/export-variables.mjs +101 -0
  70. package/dist/index.d.mts +0 -2
package/dist/index.mjs CHANGED
@@ -1,201 +1,357 @@
1
- import { jsx as _ } from "react/jsx-runtime";
2
- import { createContext as I, useContext as v, useMemo as d, useReducer as R, useCallback as g } from "react";
3
- import C from "swr";
4
- const f = I(void 0), N = ({
5
- children: t,
6
- token: o,
7
- fileKey: e,
8
- fallbackFile: r
1
+ import { jsx as O } from "react/jsx-runtime";
2
+ import { createContext as P, useId as _, useMemo as p, useContext as x, useReducer as L, useRef as m, useEffect as g, useCallback as T } from "react";
3
+ import V, { useSWRConfig as j } from "swr";
4
+ import { f as A, E as b, a as E, m as y, F as h, b as D } from "./index-ClHLYVvu.js";
5
+ import { c as ie } from "./index-ClHLYVvu.js";
6
+ const C = P(void 0);
7
+ function S(e) {
8
+ if (typeof e != "object" || e === null)
9
+ return !1;
10
+ const r = e;
11
+ if (typeof r.meta != "object" || r.meta === null)
12
+ return !1;
13
+ const t = r.meta;
14
+ return !(typeof t.variableCollections != "object" || t.variableCollections === null || typeof t.variables != "object" || t.variables === null);
15
+ }
16
+ function I(e) {
17
+ if (S(e))
18
+ return e;
19
+ }
20
+ const W = ({
21
+ children: e,
22
+ token: r,
23
+ fileKey: t,
24
+ fallbackFile: o,
25
+ swrConfig: n
9
26
  }) => {
10
- const s = r === void 0 ? { token: o, fileKey: e } : { token: o, fileKey: e, fallbackFile: r };
11
- return /* @__PURE__ */ _(f.Provider, { value: s, children: t });
12
- }, u = () => {
13
- const t = v(f);
14
- if (t === void 0)
15
- throw new Error("useFigmaTokenContext must be used within a FigmaVarsProvider");
16
- return t;
17
- }, p = "https://api.figma.com", h = `${p}/v1/variables`, w = h, A = (t) => `${h}/${t}`, b = "application/json", T = "X-FIGMA-TOKEN", c = "A Figma API token is required.", P = "An error occurred while fetching data from the Figma API.";
18
- async function M(t, o) {
19
- if (!o)
20
- throw new Error(c);
21
- const e = await fetch(t, {
22
- method: "GET",
23
- headers: {
24
- [T]: o,
25
- "Content-Type": b
26
- }
27
- });
28
- if (!e.ok) {
29
- let r = P;
30
- try {
31
- const s = await e.json();
32
- s != null && s.message && (r = s.message);
33
- } catch {
27
+ const a = _(), c = p(() => `figma-vars-provider-${a}`, [a]), u = p(() => {
28
+ if (o) {
29
+ if (typeof o == "object") {
30
+ const s = I(o);
31
+ if (s)
32
+ return s;
33
+ process.env.NODE_ENV !== "production" && console.warn(
34
+ "[figma-vars-hooks] fallbackFile object does not match expected Figma Variables API response structure. Expected { meta: { variableCollections: {...}, variables: {...} } }"
35
+ );
36
+ return;
37
+ }
38
+ if (typeof o == "string")
39
+ try {
40
+ const s = JSON.parse(o), l = I(s);
41
+ if (l)
42
+ return l;
43
+ process.env.NODE_ENV !== "production" && console.warn(
44
+ "[figma-vars-hooks] Parsed fallbackFile JSON does not match expected Figma Variables API response structure. Expected { meta: { variableCollections: {...}, variables: {...} } }"
45
+ );
46
+ return;
47
+ } catch (s) {
48
+ process.env.NODE_ENV !== "production" && console.error(
49
+ `[figma-vars-hooks] Failed to parse fallbackFile JSON: ${s instanceof Error ? s.message : "Unknown error"}`
50
+ );
51
+ return;
52
+ }
34
53
  }
35
- throw new Error(r);
36
- }
37
- return e.json();
54
+ }, [o]), i = p(() => {
55
+ const s = {
56
+ token: r,
57
+ fileKey: t,
58
+ providerId: c,
59
+ ...n !== void 0 && { swrConfig: n }
60
+ };
61
+ return o === void 0 ? s : {
62
+ ...s,
63
+ fallbackFile: o,
64
+ // Keep for backward compatibility
65
+ parsedFallbackFile: u
66
+ // Pre-parsed version for hooks to use
67
+ };
68
+ }, [r, t, o, u, c, n]);
69
+ return /* @__PURE__ */ O(C.Provider, { value: i, children: e });
70
+ }, d = () => {
71
+ const e = x(C);
72
+ if (e === void 0)
73
+ throw new Error(
74
+ "useFigmaTokenContext must be used within a FigmaVarsProvider"
75
+ );
76
+ return e;
77
+ };
78
+ function N(e) {
79
+ const { fileKey: r, token: t, providerId: o, hasFallback: n } = e;
80
+ return !!(t && r) && t && r ? [`https://api.figma.com/v1/files/${r}/variables/local`, t] : n ? [`fallback-${o ?? "default"}`, "fallback"] : null;
81
+ }
82
+ function B(e) {
83
+ const { fileKey: r, token: t, providerId: o, hasFallback: n } = e;
84
+ return !!(t && r) && t && r ? [`https://api.figma.com/v1/files/${r}/variables/published`, t] : n ? [`fallback-${o ?? "default"}`, "fallback"] : null;
38
85
  }
39
- const y = () => {
40
- const { token: t, fileKey: o } = u(), e = t && o ? `https://api.figma.com/v1/files/${o}/variables/local` : null;
41
- return C(
42
- e && t ? [e, t] : null,
43
- e && t ? ([s, n]) => M(s, n) : () => Promise.resolve(void 0)
86
+ function F(e) {
87
+ const { fileKey: r, token: t, providerId: o, hasFallback: n } = e, a = [];
88
+ return t && r && (a.push([
89
+ `https://api.figma.com/v1/files/${r}/variables/local`,
90
+ t
91
+ ]), a.push([
92
+ `https://api.figma.com/v1/files/${r}/variables/published`,
93
+ t
94
+ ])), n && o && a.push([`fallback-${o}`, "fallback"]), a;
95
+ }
96
+ const K = () => {
97
+ const {
98
+ token: e,
99
+ fileKey: r,
100
+ fallbackFile: t,
101
+ parsedFallbackFile: o,
102
+ providerId: n,
103
+ swrConfig: a
104
+ } = d(), u = N({
105
+ fileKey: r,
106
+ token: e,
107
+ providerId: n,
108
+ hasFallback: !!(t || o)
109
+ });
110
+ return V(
111
+ u,
112
+ async (...s) => {
113
+ if (o)
114
+ return o;
115
+ if (t && typeof t == "object")
116
+ return t;
117
+ const [l, f] = Array.isArray(s[0]) ? s[0] : [s[0], s[1]];
118
+ if (!l || !f)
119
+ throw new Error("Missing URL or token for live API request");
120
+ return A(l, f);
121
+ },
122
+ a
44
123
  );
45
- }, S = () => {
46
- const { data: t } = y(), o = d(
47
- () => t != null && t.meta ? Object.values(t.meta.variableCollections) : [],
48
- [t]
49
- ), e = d(
50
- () => t != null && t.meta ? t.meta.variableCollections : {},
51
- [t]
124
+ }, H = () => {
125
+ const { data: e } = K(), r = p(
126
+ () => e != null && e.meta ? Object.values(e.meta.variableCollections) : [],
127
+ [e]
128
+ ), t = p(
129
+ () => e != null && e.meta ? e.meta.variableCollections : {},
130
+ [e]
52
131
  );
53
132
  return {
54
- collections: o,
55
- collectionsById: e
133
+ collections: r,
134
+ collectionsById: t
56
135
  };
57
- }, B = () => {
58
- const { data: t } = y();
59
- return d(() => {
60
- const o = [], e = {}, r = {};
61
- if (t != null && t.meta)
62
- for (const s of Object.values(t.meta.variableCollections)) {
63
- o.push(...s.modes), e[s.id] = s.modes;
64
- for (const n of s.modes)
65
- r[n.modeId] = n;
136
+ }, Y = () => {
137
+ const { data: e } = K();
138
+ return p(() => {
139
+ const r = [], t = {}, o = {};
140
+ if (e != null && e.meta)
141
+ for (const n of Object.values(
142
+ e.meta.variableCollections
143
+ )) {
144
+ r.push(...n.modes), t[n.id] = n.modes;
145
+ for (const a of n.modes)
146
+ o[a.modeId] = a;
66
147
  }
67
148
  return {
68
- modes: o,
69
- modesByCollectionId: e,
70
- modesById: r
149
+ modes: r,
150
+ modesByCollectionId: t,
151
+ modesById: o
71
152
  };
72
- }, [t]);
153
+ }, [e]);
73
154
  };
74
- function O(t, o) {
75
- switch (o.type) {
155
+ function M(e, r) {
156
+ switch (r.type) {
76
157
  case "loading":
77
- return { ...t, status: "loading", error: null };
158
+ return { ...e, status: "loading", error: null };
78
159
  case "success":
79
- return { ...t, status: "success", data: o.payload };
160
+ return { ...e, status: "success", data: r.payload };
80
161
  case "error":
81
- return { ...t, status: "error", error: o.payload };
162
+ return { ...e, status: "error", error: r.payload };
82
163
  default:
83
- return t;
164
+ return e;
84
165
  }
85
166
  }
86
- const l = (t) => {
87
- const o = {
167
+ const k = (e, r) => {
168
+ const { throwOnError: t = !1 } = {}, o = {
88
169
  status: "idle",
89
170
  data: null,
90
171
  error: null
91
- }, [e, r] = R(O, o);
92
- return {
93
- mutate: g(
94
- async (n) => {
95
- r({ type: "loading" });
172
+ }, [n, a] = L(M, o), c = m(e), u = m({ throwOnError: t }), i = m(!0), s = m(0);
173
+ return g(() => {
174
+ c.current = e, u.current = { throwOnError: t };
175
+ }, [e, t]), g(() => (i.current = !0, () => {
176
+ i.current = !1;
177
+ }), []), {
178
+ mutate: T(
179
+ async (f) => {
180
+ if (!i.current)
181
+ return;
182
+ const w = ++s.current;
183
+ a({ type: "loading" });
96
184
  try {
97
- const a = await t(n);
98
- return r({ type: "success", payload: a }), a;
99
- } catch (a) {
100
- r({ type: "error", payload: a });
185
+ const v = await c.current(f);
186
+ return i.current && w === s.current && a({ type: "success", payload: v }), v;
187
+ } catch (v) {
188
+ const R = v;
189
+ if (i.current && w === s.current && a({ type: "error", payload: R }), u.current.throwOnError)
190
+ throw R;
101
191
  return;
102
192
  }
103
193
  },
104
- [t]
194
+ []
195
+ // Empty deps array - mutationFn and options are accessed via refs
105
196
  ),
106
- ...e,
107
- isLoading: e.status === "loading",
108
- isSuccess: e.status === "success",
109
- isError: e.status === "error"
197
+ ...n,
198
+ isLoading: n.status === "loading",
199
+ isSuccess: n.status === "success",
200
+ isError: n.status === "error"
110
201
  };
111
- };
112
- async function m(t, o, e, r) {
113
- if (!o)
114
- throw new Error(c);
115
- const a = {
116
- method: {
117
- CREATE: "POST",
118
- UPDATE: "PUT",
119
- DELETE: "DELETE"
120
- }[e],
121
- headers: {
122
- "Content-Type": "application/json",
123
- [T]: o
124
- }
125
- };
126
- r && (a.body = JSON.stringify(r));
127
- const i = await fetch(`${p}${t}`, a);
128
- if (!i.ok) {
129
- const E = await i.json().catch(() => ({}));
130
- throw new Error(E.err || E.message || "An API error occurred");
131
- }
132
- return i.status === 204 || !i.body ? {} : i.json();
133
- }
134
- const G = () => {
135
- const { token: t } = u();
136
- return l(async (e) => {
137
- if (!t)
138
- throw new Error(c);
139
- return await m(
140
- w,
141
- t,
142
- "CREATE",
143
- e
144
- );
202
+ }, z = () => {
203
+ const { token: e, fileKey: r } = d();
204
+ return k(async (o) => {
205
+ if (!e)
206
+ throw new Error(b);
207
+ if (!r)
208
+ throw new Error(E);
209
+ return await y(h(r), e, "CREATE", {
210
+ variables: [
211
+ {
212
+ action: "CREATE",
213
+ ...o
214
+ }
215
+ ]
216
+ });
145
217
  });
146
- }, j = () => {
147
- const { token: t } = u();
148
- return l(
149
- async ({ variableId: e, payload: r }) => {
150
- if (!t)
151
- throw new Error(c);
152
- return await m(
153
- A(e),
154
- t,
218
+ }, X = () => {
219
+ const { token: e, fileKey: r } = d();
220
+ return k(
221
+ async ({
222
+ variableId: o,
223
+ payload: n
224
+ }) => {
225
+ if (!e)
226
+ throw new Error(b);
227
+ if (!r)
228
+ throw new Error(E);
229
+ return await y(
230
+ h(r),
231
+ e,
155
232
  "UPDATE",
156
- r
233
+ {
234
+ variables: [
235
+ {
236
+ action: "UPDATE",
237
+ id: o,
238
+ ...n
239
+ }
240
+ ]
241
+ }
157
242
  );
158
243
  }
159
244
  );
160
- }, k = () => {
161
- const { token: t } = u();
162
- return l(async (e) => {
163
- if (!t)
164
- throw new Error(c);
165
- return await m(
166
- A(e),
167
- t,
168
- "DELETE",
169
- void 0
170
- );
245
+ }, Z = () => {
246
+ const { token: e, fileKey: r } = d();
247
+ return k(async (o) => {
248
+ if (!e)
249
+ throw new Error(b);
250
+ if (!r)
251
+ throw new Error(E);
252
+ return await y(h(r), e, "DELETE", {
253
+ variables: [
254
+ {
255
+ action: "DELETE",
256
+ id: o
257
+ }
258
+ ]
259
+ });
171
260
  });
172
- }, L = () => {
173
- const { token: t } = u();
174
- return l(async (e) => {
175
- if (!t)
176
- throw new Error(c);
177
- return await m(
178
- w,
179
- t,
180
- "CREATE",
181
- e
261
+ }, ee = () => {
262
+ const { token: e, fileKey: r } = d();
263
+ return k(async (o) => {
264
+ if (!e)
265
+ throw new Error(b);
266
+ if (!r)
267
+ throw new Error(E);
268
+ return await y(
269
+ h(r),
270
+ e,
271
+ "UPDATE",
272
+ o
182
273
  );
183
274
  });
184
- };
185
- function x(t, o) {
186
- return t.filter((e) => {
187
- let r = !0;
188
- return o.resolvedType && (r = r && e.resolvedType === o.resolvedType), o.name && (r = r && e.name.includes(o.name)), r;
275
+ }, re = () => {
276
+ const { mutate: e } = j(), { token: r, fileKey: t, fallbackFile: o, providerId: n } = d(), a = !!o;
277
+ return {
278
+ invalidate: () => {
279
+ const i = F({
280
+ fileKey: t,
281
+ token: r,
282
+ providerId: n,
283
+ hasFallback: a
284
+ });
285
+ for (const s of i)
286
+ e(s);
287
+ },
288
+ revalidate: () => {
289
+ const i = F({
290
+ fileKey: t,
291
+ token: r,
292
+ providerId: n,
293
+ hasFallback: a
294
+ });
295
+ for (const s of i)
296
+ e(s, void 0, { revalidate: !0 });
297
+ }
298
+ };
299
+ }, te = () => {
300
+ const {
301
+ token: e,
302
+ fileKey: r,
303
+ fallbackFile: t,
304
+ parsedFallbackFile: o,
305
+ providerId: n,
306
+ swrConfig: a
307
+ } = d(), u = B({
308
+ fileKey: r,
309
+ token: e,
310
+ providerId: n,
311
+ hasFallback: !!(t || o)
189
312
  });
313
+ return V(
314
+ u,
315
+ async (...s) => {
316
+ if (o)
317
+ return o;
318
+ if (t && typeof t == "object")
319
+ return t;
320
+ const [l, f] = Array.isArray(s[0]) ? s[0] : [s[0], s[1]];
321
+ if (!l || !f)
322
+ throw new Error("Missing URL or token for live API request");
323
+ return A(l, f);
324
+ },
325
+ a
326
+ );
327
+ };
328
+ function U(e) {
329
+ return e instanceof D;
330
+ }
331
+ function $(e) {
332
+ return U(e) ? e.statusCode : null;
333
+ }
334
+ function oe(e, r = "An error occurred") {
335
+ return e instanceof Error ? e.message || r : typeof e == "string" ? e : r;
336
+ }
337
+ function ne(e, r) {
338
+ return $(e) === r;
190
339
  }
191
340
  export {
192
- N as FigmaVarsProvider,
193
- x as filterVariables,
194
- L as useBulkUpdateVariables,
195
- G as useCreateVariable,
196
- k as useDeleteVariable,
197
- j as useUpdateVariable,
198
- S as useVariableCollections,
199
- B as useVariableModes,
200
- y as useVariables
341
+ D as FigmaApiError,
342
+ W as FigmaVarsProvider,
343
+ ie as filterVariables,
344
+ oe as getErrorMessage,
345
+ $ as getErrorStatus,
346
+ ne as hasErrorStatus,
347
+ U as isFigmaApiError,
348
+ ee as useBulkUpdateVariables,
349
+ z as useCreateVariable,
350
+ Z as useDeleteVariable,
351
+ re as useInvalidateVariables,
352
+ te as usePublishedVariables,
353
+ X as useUpdateVariable,
354
+ H as useVariableCollections,
355
+ Y as useVariableModes,
356
+ K as useVariables
201
357
  };
@@ -1,5 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
- import { LocalVariablesResponse } from 'types';
2
+ import { SWRConfiguration } from 'swr';
3
+ import { LocalVariablesResponse, PublishedVariablesResponse } from 'types';
3
4
  /**
4
5
  * Central context shape for FigmaVars—provides authentication and file context to all hooks and consumers in the tree.
5
6
  *
@@ -40,8 +41,14 @@ export interface FigmaTokenContextType {
40
41
  /**
41
42
  * Optional fallback variable JSON file for offline or static use cases.
42
43
  * Allows FigmaVars to function without a live API request.
44
+ * @deprecated Use parsedFallbackFile instead. This is kept for backward compatibility.
43
45
  */
44
- fallbackFile?: LocalVariablesResponse | string;
46
+ fallbackFile?: LocalVariablesResponse | PublishedVariablesResponse | string;
47
+ /**
48
+ * Optional SWR configuration to customize caching, revalidation, and error handling behavior.
49
+ * Applied to all SWR hooks within this provider.
50
+ */
51
+ swrConfig?: SWRConfiguration | undefined;
45
52
  }
46
53
  /**
47
54
  * Props for the FigmaVarsProvider component, which injects Figma API authentication and file scoping for all descendant hooks and utilities.
@@ -83,6 +90,26 @@ export interface FigmaVarsProviderProps {
83
90
  /**
84
91
  * Optional fallback variable JSON file used when the API is unavailable or skipped.
85
92
  */
86
- fallbackFile?: LocalVariablesResponse | string;
93
+ fallbackFile?: LocalVariablesResponse | PublishedVariablesResponse | string;
94
+ /**
95
+ * Optional SWR configuration to customize caching, revalidation, and error handling.
96
+ * Common options: `revalidateOnFocus`, `dedupingInterval`, `errorRetryCount`, `onError`, etc.
97
+ *
98
+ * @example
99
+ * ```tsx
100
+ * <FigmaVarsProvider
101
+ * token={token}
102
+ * fileKey={fileKey}
103
+ * swrConfig={{
104
+ * revalidateOnFocus: false,
105
+ * dedupingInterval: 5000,
106
+ * errorRetryCount: 3,
107
+ * }}
108
+ * >
109
+ * <App />
110
+ * </FigmaVarsProvider>
111
+ * ```
112
+ */
113
+ swrConfig?: SWRConfiguration;
87
114
  }
88
115
  //# sourceMappingURL=contexts.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"contexts.d.ts","sourceRoot":"","sources":["../../src/types/contexts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,OAAO,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,WAAW,qBAAqB;IACpC;;;OAGG;IACH,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB;;;OAGG;IACH,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB;;;OAGG;IACH,YAAY,CAAC,EAAE,sBAAsB,GAAG,MAAM,CAAC;CAChD;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;;OAGG;IACH,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB;;;OAGG;IACH,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB;;OAEG;IACH,YAAY,CAAC,EAAE,sBAAsB,GAAG,MAAM,CAAC;CAChD"}
1
+ {"version":3,"file":"contexts.d.ts","sourceRoot":"","sources":["../../src/types/contexts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,KAAK,EAAE,sBAAsB,EAAE,0BAA0B,EAAE,MAAM,OAAO,CAAA;AAE/E;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,WAAW,qBAAqB;IACpC;;;OAGG;IACH,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB;;;OAGG;IACH,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB;;;;OAIG;IACH,YAAY,CAAC,EAAE,sBAAsB,GAAG,0BAA0B,GAAG,MAAM,CAAA;IAe3E;;;OAGG;IACH,SAAS,CAAC,EAAE,gBAAgB,GAAG,SAAS,CAAA;CACzC;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAA;IACnB;;;OAGG;IACH,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB;;;OAGG;IACH,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB;;OAEG;IACH,YAAY,CAAC,EAAE,sBAAsB,GAAG,0BAA0B,GAAG,MAAM,CAAA;IAC3E;;;;;;;;;;;;;;;;;;OAkBG;IACH,SAAS,CAAC,EAAE,gBAAgB,CAAA;CAC7B"}