@graphprotocol/go 10.5.2

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 (65) hide show
  1. package/dist/AnnouncementBanner/AnnouncementBanner.d.ts +19 -0
  2. package/dist/AnnouncementBanner/AnnouncementBanner.d.ts.map +1 -0
  3. package/dist/AnnouncementBanner/AnnouncementBanner.js +116 -0
  4. package/dist/AnnouncementBanner/index.d.ts +2 -0
  5. package/dist/AnnouncementBanner/index.d.ts.map +1 -0
  6. package/dist/CookieBanner/CookieBanner.d.ts +17 -0
  7. package/dist/CookieBanner/CookieBanner.d.ts.map +1 -0
  8. package/dist/CookieBanner/CookieBanner.js +195 -0
  9. package/dist/CookieBanner/index.d.ts +2 -0
  10. package/dist/CookieBanner/index.d.ts.map +1 -0
  11. package/dist/FeaturedSubgraphs/FeaturedSubgraphsGrid.d.ts +4 -0
  12. package/dist/FeaturedSubgraphs/FeaturedSubgraphsGrid.d.ts.map +1 -0
  13. package/dist/FeaturedSubgraphs/FeaturedSubgraphsGrid.js +42 -0
  14. package/dist/FeaturedSubgraphs/generated/gql.d.ts +42 -0
  15. package/dist/FeaturedSubgraphs/generated/gql.d.ts.map +1 -0
  16. package/dist/FeaturedSubgraphs/generated/gql.js +11 -0
  17. package/dist/FeaturedSubgraphs/generated/graphql.d.ts +10835 -0
  18. package/dist/FeaturedSubgraphs/generated/graphql.d.ts.map +1 -0
  19. package/dist/FeaturedSubgraphs/generated/graphql.js +403 -0
  20. package/dist/FeaturedSubgraphs/generated/index.d.ts +2 -0
  21. package/dist/FeaturedSubgraphs/generated/index.d.ts.map +1 -0
  22. package/dist/FeaturedSubgraphs/index.d.ts +3 -0
  23. package/dist/FeaturedSubgraphs/index.d.ts.map +1 -0
  24. package/dist/FeaturedSubgraphs/useFeaturedSubgrahsQuery.d.ts +28 -0
  25. package/dist/FeaturedSubgraphs/useFeaturedSubgrahsQuery.d.ts.map +1 -0
  26. package/dist/FeaturedSubgraphs/useFeaturedSubgrahsQuery.js +109 -0
  27. package/dist/GlobalFooter/GlobalFooter.d.ts +28 -0
  28. package/dist/GlobalFooter/GlobalFooter.d.ts.map +1 -0
  29. package/dist/GlobalFooter/GlobalFooter.js +300 -0
  30. package/dist/GlobalFooter/index.d.ts +2 -0
  31. package/dist/GlobalFooter/index.d.ts.map +1 -0
  32. package/dist/GlobalHeader/GlobalHeader.d.ts +4477 -0
  33. package/dist/GlobalHeader/GlobalHeader.d.ts.map +1 -0
  34. package/dist/GlobalHeader/GlobalHeader.js +1045 -0
  35. package/dist/GlobalHeader/index.d.ts +2 -0
  36. package/dist/GlobalHeader/index.d.ts.map +1 -0
  37. package/dist/MarketingNavbar/MarketingNavbar.d.ts +9 -0
  38. package/dist/MarketingNavbar/MarketingNavbar.d.ts.map +1 -0
  39. package/dist/MarketingNavbar/MarketingNavbar.js +566 -0
  40. package/dist/MarketingNavbar/index.d.ts +2 -0
  41. package/dist/MarketingNavbar/index.d.ts.map +1 -0
  42. package/dist/NPSForm/NPSForm.d.ts +20 -0
  43. package/dist/NPSForm/NPSForm.d.ts.map +1 -0
  44. package/dist/NPSForm/NPSForm.js +205 -0
  45. package/dist/NPSForm/index.d.ts +2 -0
  46. package/dist/NPSForm/index.d.ts.map +1 -0
  47. package/dist/NetworkIcon/NetworkIcon.d.ts +11 -0
  48. package/dist/NetworkIcon/NetworkIcon.d.ts.map +1 -0
  49. package/dist/NetworkIcon/NetworkIcon.js +443 -0
  50. package/dist/NetworkIcon/index.d.ts +2 -0
  51. package/dist/NetworkIcon/index.d.ts.map +1 -0
  52. package/dist/SupportModal/SupportModal.d.ts +6 -0
  53. package/dist/SupportModal/SupportModal.d.ts.map +1 -0
  54. package/dist/SupportModal/SupportModal.js +310 -0
  55. package/dist/SupportModal/index.d.ts +2 -0
  56. package/dist/SupportModal/index.d.ts.map +1 -0
  57. package/dist/SupportModal/submitToZendesk.d.ts +12 -0
  58. package/dist/SupportModal/submitToZendesk.d.ts.map +1 -0
  59. package/dist/SupportModal/submitToZendesk.js +26 -0
  60. package/dist/index.d.ts +10 -0
  61. package/dist/index.d.ts.map +1 -0
  62. package/dist/index.js +23 -0
  63. package/dist/jsx/src/jsx-runtime.js +10 -0
  64. package/dist/jsx/src/parseProps.js +48 -0
  65. package/package.json +95 -0
@@ -0,0 +1,403 @@
1
+ const SubgraphDataFragmentDoc = {
2
+ kind: "Document",
3
+ definitions: [
4
+ {
5
+ kind: "FragmentDefinition",
6
+ name: { kind: "Name", value: "SubgraphData" },
7
+ typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Subgraph" } },
8
+ selectionSet: {
9
+ kind: "SelectionSet",
10
+ selections: [
11
+ { kind: "Field", name: { kind: "Name", value: "id" } },
12
+ {
13
+ kind: "Field",
14
+ name: { kind: "Name", value: "metadata" },
15
+ selectionSet: {
16
+ kind: "SelectionSet",
17
+ selections: [
18
+ { kind: "Field", name: { kind: "Name", value: "id" } },
19
+ { kind: "Field", name: { kind: "Name", value: "displayName" } },
20
+ { kind: "Field", name: { kind: "Name", value: "description" } },
21
+ { kind: "Field", name: { kind: "Name", value: "image" } },
22
+ { kind: "Field", name: { kind: "Name", value: "categories" } }
23
+ ]
24
+ }
25
+ },
26
+ { kind: "Field", name: { kind: "Name", value: "createdAt" } },
27
+ { kind: "Field", name: { kind: "Name", value: "updatedAt" } },
28
+ { kind: "Field", name: { kind: "Name", value: "currentSignalledTokens" } },
29
+ {
30
+ kind: "Field",
31
+ name: { kind: "Name", value: "owner" },
32
+ selectionSet: {
33
+ kind: "SelectionSet",
34
+ selections: [
35
+ { kind: "Field", name: { kind: "Name", value: "id" } },
36
+ {
37
+ kind: "Field",
38
+ name: { kind: "Name", value: "metadata" },
39
+ selectionSet: {
40
+ kind: "SelectionSet",
41
+ selections: [
42
+ { kind: "Field", name: { kind: "Name", value: "id" } },
43
+ { kind: "Field", name: { kind: "Name", value: "image" } }
44
+ ]
45
+ }
46
+ },
47
+ { kind: "Field", name: { kind: "Name", value: "defaultDisplayName" } },
48
+ {
49
+ kind: "Field",
50
+ name: { kind: "Name", value: "defaultName" },
51
+ selectionSet: {
52
+ kind: "SelectionSet",
53
+ selections: [
54
+ { kind: "Field", name: { kind: "Name", value: "id" } },
55
+ { kind: "Field", name: { kind: "Name", value: "name" } }
56
+ ]
57
+ }
58
+ }
59
+ ]
60
+ }
61
+ },
62
+ {
63
+ kind: "Field",
64
+ name: { kind: "Name", value: "currentVersion" },
65
+ selectionSet: {
66
+ kind: "SelectionSet",
67
+ selections: [
68
+ { kind: "Field", name: { kind: "Name", value: "id" } },
69
+ {
70
+ kind: "Field",
71
+ name: { kind: "Name", value: "subgraphDeployment" },
72
+ selectionSet: {
73
+ kind: "SelectionSet",
74
+ selections: [
75
+ { kind: "Field", name: { kind: "Name", value: "id" } },
76
+ { kind: "Field", name: { kind: "Name", value: "queryFeesAmount" } },
77
+ { kind: "Field", name: { kind: "Name", value: "ipfsHash" } },
78
+ { kind: "Field", name: { kind: "Name", value: "stakedTokens" } },
79
+ {
80
+ kind: "Field",
81
+ name: { kind: "Name", value: "manifest" },
82
+ selectionSet: {
83
+ kind: "SelectionSet",
84
+ selections: [
85
+ { kind: "Field", name: { kind: "Name", value: "id" } },
86
+ { kind: "Field", name: { kind: "Name", value: "network" } }
87
+ ]
88
+ }
89
+ }
90
+ ]
91
+ }
92
+ }
93
+ ]
94
+ }
95
+ }
96
+ ]
97
+ }
98
+ }
99
+ ]
100
+ };
101
+ const FeaturedSubgraphsDocument = {
102
+ kind: "Document",
103
+ definitions: [
104
+ {
105
+ kind: "OperationDefinition",
106
+ operation: "query",
107
+ name: { kind: "Name", value: "FeaturedSubgraphs" },
108
+ variableDefinitions: [
109
+ {
110
+ kind: "VariableDefinition",
111
+ variable: { kind: "Variable", name: { kind: "Name", value: "id_in" } },
112
+ type: {
113
+ kind: "ListType",
114
+ type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "ID" } } }
115
+ }
116
+ },
117
+ {
118
+ kind: "VariableDefinition",
119
+ variable: { kind: "Variable", name: { kind: "Name", value: "include_subgraphs" } },
120
+ type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }
121
+ },
122
+ {
123
+ kind: "VariableDefinition",
124
+ variable: { kind: "Variable", name: { kind: "Name", value: "ipfsHash_in" } },
125
+ type: {
126
+ kind: "ListType",
127
+ type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }
128
+ }
129
+ },
130
+ {
131
+ kind: "VariableDefinition",
132
+ variable: { kind: "Variable", name: { kind: "Name", value: "include_deployments" } },
133
+ type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }
134
+ }
135
+ ],
136
+ selectionSet: {
137
+ kind: "SelectionSet",
138
+ selections: [
139
+ {
140
+ kind: "Field",
141
+ name: { kind: "Name", value: "subgraphs" },
142
+ arguments: [
143
+ {
144
+ kind: "Argument",
145
+ name: { kind: "Name", value: "where" },
146
+ value: {
147
+ kind: "ObjectValue",
148
+ fields: [
149
+ {
150
+ kind: "ObjectField",
151
+ name: { kind: "Name", value: "id_in" },
152
+ value: { kind: "Variable", name: { kind: "Name", value: "id_in" } }
153
+ },
154
+ {
155
+ kind: "ObjectField",
156
+ name: { kind: "Name", value: "active" },
157
+ value: { kind: "BooleanValue", value: true }
158
+ },
159
+ {
160
+ kind: "ObjectField",
161
+ name: { kind: "Name", value: "entityVersion" },
162
+ value: { kind: "IntValue", value: "2" }
163
+ },
164
+ {
165
+ kind: "ObjectField",
166
+ name: { kind: "Name", value: "owner_not" },
167
+ value: { kind: "StringValue", value: "0x0000000000000000000000000000000000000000", block: false }
168
+ }
169
+ ]
170
+ }
171
+ }
172
+ ],
173
+ directives: [
174
+ {
175
+ kind: "Directive",
176
+ name: { kind: "Name", value: "include" },
177
+ arguments: [
178
+ {
179
+ kind: "Argument",
180
+ name: { kind: "Name", value: "if" },
181
+ value: { kind: "Variable", name: { kind: "Name", value: "include_subgraphs" } }
182
+ }
183
+ ]
184
+ }
185
+ ],
186
+ selectionSet: {
187
+ kind: "SelectionSet",
188
+ selections: [{ kind: "FragmentSpread", name: { kind: "Name", value: "SubgraphData" } }]
189
+ }
190
+ },
191
+ {
192
+ kind: "Field",
193
+ name: { kind: "Name", value: "subgraphDeployments" },
194
+ arguments: [
195
+ {
196
+ kind: "Argument",
197
+ name: { kind: "Name", value: "where" },
198
+ value: {
199
+ kind: "ObjectValue",
200
+ fields: [
201
+ {
202
+ kind: "ObjectField",
203
+ name: { kind: "Name", value: "ipfsHash_in" },
204
+ value: { kind: "Variable", name: { kind: "Name", value: "ipfsHash_in" } }
205
+ },
206
+ {
207
+ kind: "ObjectField",
208
+ name: { kind: "Name", value: "activeSubgraphCount_gt" },
209
+ value: { kind: "IntValue", value: "0" }
210
+ }
211
+ ]
212
+ }
213
+ }
214
+ ],
215
+ directives: [
216
+ {
217
+ kind: "Directive",
218
+ name: { kind: "Name", value: "include" },
219
+ arguments: [
220
+ {
221
+ kind: "Argument",
222
+ name: { kind: "Name", value: "if" },
223
+ value: { kind: "Variable", name: { kind: "Name", value: "include_deployments" } }
224
+ }
225
+ ]
226
+ }
227
+ ],
228
+ selectionSet: {
229
+ kind: "SelectionSet",
230
+ selections: [
231
+ {
232
+ kind: "Field",
233
+ name: { kind: "Name", value: "versions" },
234
+ arguments: [
235
+ {
236
+ kind: "Argument",
237
+ name: { kind: "Name", value: "orderDirection" },
238
+ value: { kind: "EnumValue", value: "asc" }
239
+ },
240
+ {
241
+ kind: "Argument",
242
+ name: { kind: "Name", value: "orderBy" },
243
+ value: { kind: "EnumValue", value: "createdAt" }
244
+ },
245
+ {
246
+ kind: "Argument",
247
+ name: { kind: "Name", value: "where" },
248
+ value: {
249
+ kind: "ObjectValue",
250
+ fields: [
251
+ {
252
+ kind: "ObjectField",
253
+ name: { kind: "Name", value: "subgraph_" },
254
+ value: {
255
+ kind: "ObjectValue",
256
+ fields: [
257
+ {
258
+ kind: "ObjectField",
259
+ name: { kind: "Name", value: "active" },
260
+ value: { kind: "BooleanValue", value: true }
261
+ },
262
+ {
263
+ kind: "ObjectField",
264
+ name: { kind: "Name", value: "entityVersion" },
265
+ value: { kind: "IntValue", value: "2" }
266
+ },
267
+ {
268
+ kind: "ObjectField",
269
+ name: { kind: "Name", value: "owner_not" },
270
+ value: {
271
+ kind: "StringValue",
272
+ value: "0x0000000000000000000000000000000000000000",
273
+ block: false
274
+ }
275
+ }
276
+ ]
277
+ }
278
+ }
279
+ ]
280
+ }
281
+ }
282
+ ],
283
+ selectionSet: {
284
+ kind: "SelectionSet",
285
+ selections: [
286
+ {
287
+ kind: "Field",
288
+ name: { kind: "Name", value: "subgraph" },
289
+ selectionSet: {
290
+ kind: "SelectionSet",
291
+ selections: [{ kind: "FragmentSpread", name: { kind: "Name", value: "SubgraphData" } }]
292
+ }
293
+ }
294
+ ]
295
+ }
296
+ }
297
+ ]
298
+ }
299
+ }
300
+ ]
301
+ }
302
+ },
303
+ {
304
+ kind: "FragmentDefinition",
305
+ name: { kind: "Name", value: "SubgraphData" },
306
+ typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Subgraph" } },
307
+ selectionSet: {
308
+ kind: "SelectionSet",
309
+ selections: [
310
+ { kind: "Field", name: { kind: "Name", value: "id" } },
311
+ {
312
+ kind: "Field",
313
+ name: { kind: "Name", value: "metadata" },
314
+ selectionSet: {
315
+ kind: "SelectionSet",
316
+ selections: [
317
+ { kind: "Field", name: { kind: "Name", value: "id" } },
318
+ { kind: "Field", name: { kind: "Name", value: "displayName" } },
319
+ { kind: "Field", name: { kind: "Name", value: "description" } },
320
+ { kind: "Field", name: { kind: "Name", value: "image" } },
321
+ { kind: "Field", name: { kind: "Name", value: "categories" } }
322
+ ]
323
+ }
324
+ },
325
+ { kind: "Field", name: { kind: "Name", value: "createdAt" } },
326
+ { kind: "Field", name: { kind: "Name", value: "updatedAt" } },
327
+ { kind: "Field", name: { kind: "Name", value: "currentSignalledTokens" } },
328
+ {
329
+ kind: "Field",
330
+ name: { kind: "Name", value: "owner" },
331
+ selectionSet: {
332
+ kind: "SelectionSet",
333
+ selections: [
334
+ { kind: "Field", name: { kind: "Name", value: "id" } },
335
+ {
336
+ kind: "Field",
337
+ name: { kind: "Name", value: "metadata" },
338
+ selectionSet: {
339
+ kind: "SelectionSet",
340
+ selections: [
341
+ { kind: "Field", name: { kind: "Name", value: "id" } },
342
+ { kind: "Field", name: { kind: "Name", value: "image" } }
343
+ ]
344
+ }
345
+ },
346
+ { kind: "Field", name: { kind: "Name", value: "defaultDisplayName" } },
347
+ {
348
+ kind: "Field",
349
+ name: { kind: "Name", value: "defaultName" },
350
+ selectionSet: {
351
+ kind: "SelectionSet",
352
+ selections: [
353
+ { kind: "Field", name: { kind: "Name", value: "id" } },
354
+ { kind: "Field", name: { kind: "Name", value: "name" } }
355
+ ]
356
+ }
357
+ }
358
+ ]
359
+ }
360
+ },
361
+ {
362
+ kind: "Field",
363
+ name: { kind: "Name", value: "currentVersion" },
364
+ selectionSet: {
365
+ kind: "SelectionSet",
366
+ selections: [
367
+ { kind: "Field", name: { kind: "Name", value: "id" } },
368
+ {
369
+ kind: "Field",
370
+ name: { kind: "Name", value: "subgraphDeployment" },
371
+ selectionSet: {
372
+ kind: "SelectionSet",
373
+ selections: [
374
+ { kind: "Field", name: { kind: "Name", value: "id" } },
375
+ { kind: "Field", name: { kind: "Name", value: "queryFeesAmount" } },
376
+ { kind: "Field", name: { kind: "Name", value: "ipfsHash" } },
377
+ { kind: "Field", name: { kind: "Name", value: "stakedTokens" } },
378
+ {
379
+ kind: "Field",
380
+ name: { kind: "Name", value: "manifest" },
381
+ selectionSet: {
382
+ kind: "SelectionSet",
383
+ selections: [
384
+ { kind: "Field", name: { kind: "Name", value: "id" } },
385
+ { kind: "Field", name: { kind: "Name", value: "network" } }
386
+ ]
387
+ }
388
+ }
389
+ ]
390
+ }
391
+ }
392
+ ]
393
+ }
394
+ }
395
+ ]
396
+ }
397
+ }
398
+ ]
399
+ };
400
+ export {
401
+ FeaturedSubgraphsDocument,
402
+ SubgraphDataFragmentDoc
403
+ };
@@ -0,0 +1,2 @@
1
+ export * from './gql';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/FeaturedSubgraphs/generated/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAA"}
@@ -0,0 +1,3 @@
1
+ export * from './FeaturedSubgraphsGrid';
2
+ export * from './useFeaturedSubgrahsQuery';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/FeaturedSubgraphs/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAA;AACvC,cAAc,4BAA4B,CAAA"}
@@ -0,0 +1,28 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import { SubgraphDataFragment } from './generated/graphql';
3
+ export type UseFeaturedSubgraphsQueryArgs = {
4
+ /** Array of Subgraph.id of the featured subgraphs to fetch */
5
+ subgraphs?: Readonly<Array<string>>;
6
+ /** Array of Subgraph Deployment Qm hashes for featured subgraphs to fetch */
7
+ deployments?: Readonly<Array<string>>;
8
+ /** The Graph gateway API key to use to fetch the featured subgraphs */
9
+ gatewayApiKey: string;
10
+ /** Infura Key to resolve Subgraph owner ENS names */
11
+ infuraKey: string;
12
+ /**
13
+ * If true, fetch subgraphs from L2 testnet subgraph.
14
+ * @default false
15
+ */
16
+ testnet?: boolean;
17
+ };
18
+ export type FeaturedSubgraphs = Readonly<Array<SubgraphDataFragment>>;
19
+ export declare const featuredSubgraphsQueryOptions: ({ subgraphs, deployments, infuraKey, gatewayApiKey, testnet, }: UseFeaturedSubgraphsQueryArgs) => import('@tanstack/react-query').OmitKeyof<UseQueryOptions<readonly SubgraphDataFragment[], Error, readonly SubgraphDataFragment[], readonly ["@edgeandnode/go", "FeaturedSubgraphs", "testnet" | "mainnet", string]>, "queryFn"> & {
20
+ queryFn?: import('@tanstack/react-query').QueryFunction<readonly SubgraphDataFragment[], readonly ["@edgeandnode/go", "FeaturedSubgraphs", "testnet" | "mainnet", string], never> | undefined;
21
+ } & {
22
+ queryKey: readonly ["@edgeandnode/go", "FeaturedSubgraphs", "testnet" | "mainnet", string] & {
23
+ [dataTagSymbol]: readonly SubgraphDataFragment[];
24
+ [dataTagErrorSymbol]: Error;
25
+ };
26
+ };
27
+ export declare function useFeaturedSubgraphsQuery(args: UseFeaturedSubgraphsQueryArgs, options?: Omit<UseQueryOptions<FeaturedSubgraphs, Error, FeaturedSubgraphs, readonly ['@edgeandnode/go', 'FeaturedSubgraphs', 'testnet' | 'mainnet', string]>, 'queryKey' | 'queryFn'>): import('@tanstack/react-query').UseQueryResult<readonly SubgraphDataFragment[], Error>;
28
+ //# sourceMappingURL=useFeaturedSubgrahsQuery.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFeaturedSubgrahsQuery.d.ts","sourceRoot":"","sources":["../../src/FeaturedSubgraphs/useFeaturedSubgrahsQuery.tsx"],"names":[],"mappings":"AAGA,OAAO,EAA0B,KAAK,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAIpF,OAAO,KAAK,EAA2D,oBAAoB,EAAE,MAAM,qBAAqB,CAAA;AA4ExH,MAAM,MAAM,6BAA6B,GAAG;IAC1C,8DAA8D;IAC9D,SAAS,CAAC,EAAE,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAA;IACnC,6EAA6E;IAC7E,WAAW,CAAC,EAAE,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAA;IACrC,uEAAuE;IACvE,aAAa,EAAE,MAAM,CAAA;IACrB,qDAAqD;IACrD,SAAS,EAAE,MAAM,CAAA;IACjB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG,QAAQ,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC,CAAA;AAIrE,eAAO,MAAM,6BAA6B,GAAI,gEAM3C,6BAA6B;;;;;;;CAyE5B,CAAA;AAEJ,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,6BAA6B,EACnC,OAAO,GAAE,IAAI,CACX,eAAe,CACb,iBAAiB,EACjB,KAAK,EACL,iBAAiB,EACjB,SAAS,CAAC,iBAAiB,EAAE,mBAAmB,EAAE,SAAS,GAAG,SAAS,EAAE,MAAM,CAAC,CACjF,EACD,UAAU,GAAG,SAAS,CAClB,0FAWP"}
@@ -0,0 +1,109 @@
1
+ "use client";
2
+ import { buildEnsResolver } from "@graphprotocol/ens";
3
+ import { queryOptions, useQuery } from "@tanstack/react-query";
4
+ import { request } from "graphql-request";
5
+ import { graphql } from "./generated/gql.js";
6
+ const SubgraphUrlMap = {
7
+ mainnet: "https://gateway.thegraph.com/api/subgraphs/id/DZz4kDTdmzWLWsV373w2bSmoar3umKKH9y82SUKr5qmp",
8
+ testnet: "https://gateway.thegraph.com/api/subgraphs/id/3xQHhMudr1oh69ut36G2mbzpYmYxwqCeU6wwqyCDCnqV"
9
+ };
10
+ const FeaturedSubgraphs = graphql(`
11
+ query FeaturedSubgraphs(
12
+ $id_in: [ID!]
13
+ $include_subgraphs: Boolean!
14
+ $ipfsHash_in: [String!]
15
+ $include_deployments: Boolean!
16
+ ) {
17
+ subgraphs(
18
+ where: { id_in: $id_in, active: true, entityVersion: 2, owner_not: "0x0000000000000000000000000000000000000000" }
19
+ ) @include(if: $include_subgraphs) {
20
+ ...SubgraphData
21
+ }
22
+ subgraphDeployments(where: { ipfsHash_in: $ipfsHash_in, activeSubgraphCount_gt: 0 })
23
+ @include(if: $include_deployments) {
24
+ versions(
25
+ orderDirection: asc
26
+ orderBy: createdAt
27
+ where: {
28
+ subgraph_: { active: true, entityVersion: 2, owner_not: "0x0000000000000000000000000000000000000000" }
29
+ }
30
+ ) {
31
+ subgraph {
32
+ ...SubgraphData
33
+ }
34
+ }
35
+ }
36
+ }
37
+ `);
38
+ const featuredSubgraphsQueryOptions = ({
39
+ subgraphs = [],
40
+ deployments = [],
41
+ infuraKey,
42
+ gatewayApiKey,
43
+ testnet = false
44
+ }) => queryOptions({
45
+ queryKey: [
46
+ "@edgeandnode/go",
47
+ "FeaturedSubgraphs",
48
+ testnet ? "testnet" : "mainnet",
49
+ [...subgraphs, deployments].join()
50
+ ],
51
+ async queryFn() {
52
+ const ensResolver = buildEnsResolver({ infuraKey, gatewayApiKey });
53
+ const url = testnet ? SubgraphUrlMap.testnet : SubgraphUrlMap.mainnet;
54
+ const response = await request({
55
+ url,
56
+ requestHeaders: {
57
+ Authorization: `Bearer ${gatewayApiKey}`
58
+ },
59
+ document: FeaturedSubgraphs,
60
+ variables: {
61
+ id_in: subgraphs.map((id) => id),
62
+ include_subgraphs: subgraphs.length > 0,
63
+ ipfsHash_in: deployments.map((d) => d),
64
+ include_deployments: deployments.length > 0
65
+ }
66
+ });
67
+ const featuredSubgraphs = [
68
+ ...response.subgraphs ?? [],
69
+ ...(response.subgraphDeployments ?? []).flatMap((d) => d.versions).map((v) => v.subgraph).filter((s) => s != null)
70
+ ];
71
+ const ownersWithoutNames = featuredSubgraphs.filter((subgraph) => {
72
+ var _a;
73
+ return !((_a = subgraph.owner.defaultName) == null ? void 0 : _a.name);
74
+ }).map((subgraph) => subgraph.owner.id);
75
+ const ensNames = ownersWithoutNames.length ? await ensResolver.resolveEnsNamesBatch({ addresses: ownersWithoutNames }) : {};
76
+ return featuredSubgraphs.map((subgraph) => {
77
+ const ownerId = subgraph.owner.id;
78
+ const ensName = ensNames[ownerId];
79
+ if (!subgraph.owner.defaultName && ensName) {
80
+ return {
81
+ ...subgraph,
82
+ owner: {
83
+ ...subgraph.owner,
84
+ defaultDisplayName: ensName,
85
+ defaultName: {
86
+ id: `ENS-${ownerId}`,
87
+ name: ensName
88
+ }
89
+ }
90
+ };
91
+ }
92
+ return subgraph;
93
+ });
94
+ }
95
+ });
96
+ function useFeaturedSubgraphsQuery(args, options = {}) {
97
+ const subgraphsOrDeployments = [...args.subgraphs ?? [], ...args.deployments ?? []];
98
+ if (subgraphsOrDeployments.length === 0) {
99
+ throw new Error("Must pass either subgraphs or deployments");
100
+ }
101
+ return useQuery({
102
+ ...featuredSubgraphsQueryOptions(args),
103
+ ...options
104
+ });
105
+ }
106
+ export {
107
+ featuredSubgraphsQueryOptions,
108
+ useFeaturedSubgraphsQuery
109
+ };
@@ -0,0 +1,28 @@
1
+ import { HTMLAttributes } from 'react';
2
+ type NewsletterConfig = {
3
+ subscribeUrl: string;
4
+ listId: string;
5
+ };
6
+ export interface GlobalFooterProps extends Omit<HTMLAttributes<HTMLElement>, 'children'> {
7
+ /**
8
+ * Base URL to prepend to links that are root-relative (i.e. start with `/`) but external to the current app.
9
+ * Defaults to `https://thegraph.com/`, or to `https://staging.thegraph.com/` if `process.env.ENVIRONMENT` is `staging`.
10
+ */
11
+ baseUrl?: string;
12
+ /**
13
+ * Whether to show The Graph's logo at the top of the footer. Defaults to `false`.
14
+ */
15
+ showLogo?: boolean;
16
+ /**
17
+ * Whether to show the "Subscribe to our Newsletter" input at the top of the footer. Defaults to `false`.
18
+ * Can also be set to a config object with the `subscribeUrl` and `listId` properties.
19
+ */
20
+ showNewsletter?: boolean | Partial<NewsletterConfig>;
21
+ /**
22
+ * Whether to show the locale switcher. Defaults to `false`.
23
+ */
24
+ showLocaleSwitcher?: boolean;
25
+ }
26
+ export declare function GlobalFooter({ baseUrl, showLogo, showNewsletter, showLocaleSwitcher, className, ...props }: GlobalFooterProps): import("react").JSX.Element;
27
+ export {};
28
+ //# sourceMappingURL=GlobalFooter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GlobalFooter.d.ts","sourceRoot":"","sources":["../../src/GlobalFooter/GlobalFooter.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAoB,KAAK,cAAc,EAA0D,MAAM,OAAO,CAAA;AAIrH,KAAK,gBAAgB,GAAG;IACtB,YAAY,EAAE,MAAM,CAAA;IACpB,MAAM,EAAE,MAAM,CAAA;CACf,CAAA;AAOD,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,UAAU,CAAC;IACtF;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAA;IACpD;;OAEG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAA;CAC7B;AAED,wBAAgB,YAAY,CAAC,EAC3B,OAA2G,EAC3G,QAAgB,EAChB,cAAsB,EACtB,kBAA0B,EAC1B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,iBAAiB,+BAqUnB"}