@elixir-cloud/service-registry 2.0.0-alpha.28

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 (53) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +12 -0
  3. package/dist/chunks/chunk.2GTT6OBC.js +558 -0
  4. package/dist/chunks/chunk.422CUO5Q.js +329 -0
  5. package/dist/chunks/chunk.5EYXDARO.js +23 -0
  6. package/dist/chunks/chunk.EDOYU2FL.js +1 -0
  7. package/dist/chunks/chunk.FSZTY25R.js +10 -0
  8. package/dist/chunks/chunk.G7EXF7Y5.js +24 -0
  9. package/dist/chunks/chunk.KXF7UXMG.js +477 -0
  10. package/dist/chunks/chunk.L4ERSGP3.js +59 -0
  11. package/dist/chunks/chunk.P4Y7MKRA.js +1 -0
  12. package/dist/chunks/chunk.SWMR6FP7.js +97 -0
  13. package/dist/chunks/chunk.TWJOFBJX.js +517 -0
  14. package/dist/chunks/chunk.UMP3GNBP.js +10 -0
  15. package/dist/chunks/chunk.WHWUXFA2.js +12 -0
  16. package/dist/components/index.d.ts +2 -0
  17. package/dist/components/index.js +10 -0
  18. package/dist/components/service/index.d.ts +8 -0
  19. package/dist/components/service/index.js +6 -0
  20. package/dist/components/service/service.d.ts +39 -0
  21. package/dist/components/service/service.js +5 -0
  22. package/dist/components/service/tw-styles.d.ts +1 -0
  23. package/dist/components/service/tw-styles.js +2 -0
  24. package/dist/components/services/index.d.ts +8 -0
  25. package/dist/components/services/index.js +6 -0
  26. package/dist/components/services/services.d.ts +46 -0
  27. package/dist/components/services/services.js +5 -0
  28. package/dist/components/services/tw-styles.d.ts +1 -0
  29. package/dist/components/services/tw-styles.js +2 -0
  30. package/dist/custom-elements.json +538 -0
  31. package/dist/events/ecc-service-changed.d.ts +6 -0
  32. package/dist/events/ecc-service-selected.d.ts +6 -0
  33. package/dist/events/ecc-services-changed.d.ts +6 -0
  34. package/dist/events/ecc-services-selected.d.ts +6 -0
  35. package/dist/events/index.d.ts +4 -0
  36. package/dist/global.d.ts +4 -0
  37. package/dist/index.d.ts +1 -0
  38. package/dist/index.js +10 -0
  39. package/dist/providers/index.d.ts +3 -0
  40. package/dist/providers/index.js +3 -0
  41. package/dist/providers/rest-sr-provider.d.ts +30 -0
  42. package/dist/providers/rest-sr-provider.js +2 -0
  43. package/dist/providers/sr-provider.d.ts +58 -0
  44. package/dist/providers/sr-provider.js +1 -0
  45. package/dist/react/index.d.ts +2 -0
  46. package/dist/react/index.js +9 -0
  47. package/dist/react/service/index.d.ts +18 -0
  48. package/dist/react/service/index.js +6 -0
  49. package/dist/react/services/index.d.ts +23 -0
  50. package/dist/react/services/index.js +6 -0
  51. package/dist/vscode.html-custom-data.json +28 -0
  52. package/dist/web-types.json +105 -0
  53. package/package.json +76 -0
@@ -0,0 +1,477 @@
1
+ import { ComponentStyles } from './chunk.TWJOFBJX.js';
2
+ import { GlobalStyles } from './chunk.SWMR6FP7.js';
3
+ import { RestServiceRegistryProvider } from './chunk.L4ERSGP3.js';
4
+ import { __decorateClass } from './chunk.WHWUXFA2.js';
5
+ import { css, LitElement, html } from 'lit';
6
+ import { property, state } from 'lit/decorators.js';
7
+ import '@elixir-cloud/design/components/table/index.js';
8
+ import '@elixir-cloud/design/components/button/index.js';
9
+ import '@elixir-cloud/design/components/badge/index.js';
10
+ import '@elixir-cloud/design/components/skeleton/index.js';
11
+ import '@elixir-cloud/design/components/card/index.js';
12
+ import '@elixir-cloud/design/components/tabs/index.js';
13
+ import '@elixir-cloud/design/components/separator/index.js';
14
+
15
+ var _ECCClientGa4ghServiceRegistryService = class _ECCClientGa4ghServiceRegistryService extends LitElement {
16
+ constructor() {
17
+ super(...arguments);
18
+ this.baseUrl = "";
19
+ this.serviceId = "";
20
+ this.service = null;
21
+ this.loading = false;
22
+ this.error = null;
23
+ this._provider = null;
24
+ }
25
+ async firstUpdated() {
26
+ if (!this.baseUrl && !this.provider) {
27
+ this.error = "Please provide either a base URL for the Service Registry API or a custom provider.";
28
+ return;
29
+ }
30
+ if (!this.serviceId) {
31
+ this.error = "Please provide a service ID.";
32
+ return;
33
+ }
34
+ if (this.provider) {
35
+ this._provider = this.provider;
36
+ } else if (this.baseUrl) {
37
+ this._provider = new RestServiceRegistryProvider(this.baseUrl);
38
+ } else {
39
+ this._provider = null;
40
+ }
41
+ if (this._provider && this.serviceId) {
42
+ await this.loadData();
43
+ }
44
+ }
45
+ updated(changedProperties) {
46
+ if (changedProperties.has("baseUrl") && this.baseUrl || changedProperties.has("serviceId") && this.serviceId) {
47
+ if (this.baseUrl) {
48
+ this._provider = new RestServiceRegistryProvider(this.baseUrl);
49
+ }
50
+ if (this.serviceId && this._provider) {
51
+ this.loadData();
52
+ }
53
+ }
54
+ }
55
+ async loadData() {
56
+ if (!this._provider || !this.serviceId) return;
57
+ this.loading = true;
58
+ this.error = null;
59
+ try {
60
+ const service = await this._provider.getServiceById(this.serviceId);
61
+ this.service = service;
62
+ this.dispatchEvent(
63
+ new CustomEvent("ecc-service-changed", {
64
+ detail: { service },
65
+ bubbles: true,
66
+ composed: true
67
+ })
68
+ );
69
+ } catch (err) {
70
+ this.error = err instanceof Error ? err.message : "Failed to load service";
71
+ console.error({
72
+ error: this.error,
73
+ breakPoint: "ECCClientGa4ghServiceRegistryService.loadData"
74
+ });
75
+ } finally {
76
+ this.loading = false;
77
+ }
78
+ }
79
+ static formatDate(dateString) {
80
+ if (!dateString) return "Not specified";
81
+ try {
82
+ const date = new Date(dateString);
83
+ return date.toLocaleString();
84
+ } catch (e) {
85
+ return dateString;
86
+ }
87
+ }
88
+ static getTypeVariant(group) {
89
+ if (group.includes("ga4gh") || group.includes("elixir")) {
90
+ return "secondary";
91
+ }
92
+ return "default";
93
+ }
94
+ renderServiceHeader() {
95
+ if (!this.service) return html``;
96
+ return html`
97
+ <div class="mb-6">
98
+ <div class="w-full flex flex-col gap-2">
99
+ <div
100
+ class="flex flex-col md:flex-row md:items-center gap-2 justify-between"
101
+ >
102
+ <div class="flex flex-col md:flex-row md:items-center gap-2">
103
+ <h2 class="text-xl truncate">
104
+ ${this.service.name || this.service.id}
105
+ </h2>
106
+ ${this.service.version ? html`<ecc-utils-design-badge variant="outline">
107
+ v${this.service.version}
108
+ </ecc-utils-design-badge>` : ""}
109
+ </div>
110
+ ${this.service.contactUrl ? html`
111
+ <a
112
+ href="${this.service.contactUrl}"
113
+ target="_blank"
114
+ rel="noopener noreferrer"
115
+ class="text-primary hover:text-primary/80 flex items-center gap-1"
116
+ title="Contact"
117
+ >
118
+ <svg
119
+ xmlns="http://www.w3.org/2000/svg"
120
+ width="24"
121
+ height="24"
122
+ viewBox="0 0 24 24"
123
+ fill="none"
124
+ stroke="currentColor"
125
+ stroke-width="2"
126
+ stroke-linecap="round"
127
+ stroke-linejoin="round"
128
+ class="lucide lucide-mail-icon lucide-mail"
129
+ >
130
+ <path d="m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7" />
131
+ <rect x="2" y="4" width="20" height="16" rx="2" />
132
+ </svg>
133
+ </a>
134
+ ` : ""}
135
+ </div>
136
+
137
+ <div class="flex flex-wrap gap-2 items-center">
138
+ <ecc-utils-design-badge
139
+ variant=${_ECCClientGa4ghServiceRegistryService.getTypeVariant(
140
+ this.service.type.group
141
+ )}
142
+ >
143
+ ${this.service.type.artifact}@${this.service.type.version}
144
+ </ecc-utils-design-badge>
145
+ ${this.service.environment ? html`<ecc-utils-design-badge variant="outline">
146
+ ${this.service.environment}
147
+ </ecc-utils-design-badge>` : ""}
148
+ </div>
149
+ </div>
150
+ </div>
151
+ `;
152
+ }
153
+ renderServiceContent() {
154
+ if (!this.service) return html``;
155
+ const { type } = this.service;
156
+ return html`
157
+ <div class="mt-4">
158
+ <div class="flex flex-col gap-4 text-sm">
159
+ <!-- Service Information Section -->
160
+ <div class="flex flex-col gap-2">
161
+ <div class="font-bold text-base">Service Information</div>
162
+ <div class="flex flex-col gap-3">
163
+ ${this.service.description ? html`
164
+ <div>
165
+ ${this.service.description.split("\n").map((line) => html`<p>${line}</p>`)}
166
+ </div>
167
+ ` : ""}
168
+ <div>
169
+ <dl class="flex flex-col gap-2">
170
+ <div class="flex flex-row gap-2 w-full justify-between">
171
+ <dt class="text-muted-foreground">ID</dt>
172
+ <dd class="font-mono">${this.service.id}</dd>
173
+ </div>
174
+ <ecc-utils-design-separator></ecc-utils-design-separator>
175
+ <div class="flex flex-row gap-2 w-full justify-between">
176
+ <dt class="text-muted-foreground">Version</dt>
177
+ <dd>${this.service.version || "Not specified"}</dd>
178
+ </div>
179
+ <ecc-utils-design-separator></ecc-utils-design-separator>
180
+ <div class="flex flex-row gap-2 w-full justify-between">
181
+ <dt class="text-muted-foreground">Organization</dt>
182
+ <dd>
183
+ ${this.service.organization.url ? html`
184
+ <a
185
+ href="${this.service.organization.url}"
186
+ target="_blank"
187
+ rel="noopener noreferrer"
188
+ class="text-primary hover:underline flex items-center gap-1"
189
+ >
190
+ ${this.service.organization.name}
191
+ <svg
192
+ class="w-3.5"
193
+ xmlns="http://www.w3.org/2000/svg"
194
+ viewBox="0 0 24 24"
195
+ fill="none"
196
+ stroke="currentColor"
197
+ stroke-width="2"
198
+ stroke-linecap="round"
199
+ stroke-linejoin="round"
200
+ >
201
+ <path d="M13 5H19V11" />
202
+ <path d="M19 5L5 19" />
203
+ </svg>
204
+ </a>
205
+ ` : html`${this.service.organization.name}`}
206
+ </dd>
207
+ </div>
208
+ <ecc-utils-design-separator></ecc-utils-design-separator>
209
+ <div class="flex flex-row gap-2 w-full justify-between">
210
+ <dt class="text-muted-foreground">Environment</dt>
211
+ <dd>${this.service.environment || "Not specified"}</dd>
212
+ </div>
213
+ <ecc-utils-design-separator></ecc-utils-design-separator>
214
+ <div class="flex flex-row gap-2 w-full justify-between">
215
+ <dt class="text-muted-foreground">Service URL</dt>
216
+ <dd>
217
+ <a
218
+ href="${this.service.url}"
219
+ target="_blank"
220
+ rel="noopener noreferrer"
221
+ class="text-primary hover:underline break-all"
222
+ >
223
+ ${this.service.url}
224
+ </a>
225
+ </dd>
226
+ </div>
227
+ </dl>
228
+ </div>
229
+ </div>
230
+ </div>
231
+
232
+ <ecc-utils-design-separator></ecc-utils-design-separator>
233
+
234
+ <!-- Service Type Section -->
235
+ <div class="flex flex-col gap-2">
236
+ <div class="font-bold text-base">Service Type</div>
237
+ <div class="flex flex-col gap-3">
238
+ <div>
239
+ <dl class="flex flex-col gap-2">
240
+ <div class="flex flex-row gap-2 w-full justify-between">
241
+ <dt class="text-muted-foreground">Group</dt>
242
+ <dd>
243
+ <ecc-utils-design-badge
244
+ variant=${_ECCClientGa4ghServiceRegistryService.getTypeVariant(
245
+ type.group
246
+ )}
247
+ >
248
+ ${type.group}
249
+ </ecc-utils-design-badge>
250
+ </dd>
251
+ </div>
252
+ <ecc-utils-design-separator></ecc-utils-design-separator>
253
+ <div class="flex flex-row gap-2 w-full justify-between">
254
+ <dt class="text-muted-foreground">Artifact</dt>
255
+ <dd>${type.artifact}</dd>
256
+ </div>
257
+ <ecc-utils-design-separator></ecc-utils-design-separator>
258
+ <div class="flex flex-row gap-2 w-full justify-between">
259
+ <dt class="text-muted-foreground">Type Version</dt>
260
+ <dd>${type.version}</dd>
261
+ </div>
262
+ </dl>
263
+ </div>
264
+ </div>
265
+ </div>
266
+
267
+ <ecc-utils-design-separator></ecc-utils-design-separator>
268
+
269
+ <!-- Additional Information Section -->
270
+ ${this.service.documentationUrl || this.service.createdAt || this.service.updatedAt ? html`
271
+ <ecc-utils-design-separator></ecc-utils-design-separator>
272
+ <div class="flex flex-col gap-2">
273
+ <div class="font-bold text-base">Additional Information</div>
274
+ <div>
275
+ <dl class="flex flex-col gap-2">
276
+ ${this.service.documentationUrl ? html`
277
+ <div
278
+ class="flex flex-row gap-2 w-full justify-between"
279
+ >
280
+ <dt class="text-muted-foreground">
281
+ Documentation
282
+ </dt>
283
+ <dd>
284
+ <a
285
+ href="${this.service.documentationUrl}"
286
+ target="_blank"
287
+ rel="noopener noreferrer"
288
+ class="text-primary hover:underline break-all"
289
+ >
290
+ ${this.service.documentationUrl}
291
+ </a>
292
+ </dd>
293
+ </div>
294
+ <ecc-utils-design-separator></ecc-utils-design-separator>
295
+ ` : ""}
296
+ ${this.service.createdAt ? html`
297
+ <div
298
+ class="flex flex-row gap-2 w-full justify-between"
299
+ >
300
+ <dt class="text-muted-foreground">Created</dt>
301
+ <dd>
302
+ ${_ECCClientGa4ghServiceRegistryService.formatDate(
303
+ this.service.createdAt
304
+ )}
305
+ </dd>
306
+ </div>
307
+ <ecc-utils-design-separator></ecc-utils-design-separator>
308
+ ` : ""}
309
+ ${this.service.updatedAt ? html`
310
+ <div
311
+ class="flex flex-row gap-2 w-full justify-between"
312
+ >
313
+ <dt class="text-muted-foreground">
314
+ Last Updated
315
+ </dt>
316
+ <dd>
317
+ ${_ECCClientGa4ghServiceRegistryService.formatDate(
318
+ this.service.updatedAt
319
+ )}
320
+ </dd>
321
+ </div>
322
+ ` : ""}
323
+ </dl>
324
+ </div>
325
+ </div>
326
+ ` : ""}
327
+ </div>
328
+ </div>
329
+ `;
330
+ }
331
+ static renderLoading() {
332
+ return html`
333
+ <div class="space-y-6">
334
+ <!-- Service header skeleton -->
335
+ <div class="mb-6">
336
+ <div class="flex flex-col gap-2">
337
+ <div class="flex flex-col md:flex-row md:items-center gap-2">
338
+ <ecc-utils-design-skeleton
339
+ class="part:h-10 part:w-64"
340
+ ></ecc-utils-design-skeleton>
341
+ <ecc-utils-design-skeleton
342
+ class="part:h-6 part:w-20"
343
+ ></ecc-utils-design-skeleton>
344
+ </div>
345
+ <div class="flex flex-wrap gap-2 mt-2">
346
+ <ecc-utils-design-skeleton
347
+ class="part:h-6 part:w-32"
348
+ ></ecc-utils-design-skeleton>
349
+ <ecc-utils-design-skeleton
350
+ class="part:h-6 part:w-20"
351
+ ></ecc-utils-design-skeleton>
352
+ </div>
353
+ </div>
354
+ </div>
355
+
356
+ <!-- Content skeleton -->
357
+ <div class="mt-4">
358
+ <div class="flex flex-col gap-4">
359
+ <div>
360
+ <ecc-utils-design-skeleton
361
+ class="part:h-6 part:w-48 part:mb-3"
362
+ ></ecc-utils-design-skeleton>
363
+ <div class="flex flex-col gap-3">
364
+ <ecc-utils-design-skeleton
365
+ class="part:h-4 part:w-full"
366
+ ></ecc-utils-design-skeleton>
367
+ <ecc-utils-design-skeleton
368
+ class="part:h-4 part:w-full"
369
+ ></ecc-utils-design-skeleton>
370
+ <ecc-utils-design-skeleton
371
+ class="part:h-4 part:w-3/4"
372
+ ></ecc-utils-design-skeleton>
373
+ </div>
374
+ </div>
375
+
376
+ <ecc-utils-design-separator></ecc-utils-design-separator>
377
+
378
+ <div>
379
+ <ecc-utils-design-skeleton
380
+ class="part:h-6 part:w-32 part:mb-3"
381
+ ></ecc-utils-design-skeleton>
382
+ <div class="flex flex-col gap-2">
383
+ <div class="flex justify-between">
384
+ <ecc-utils-design-skeleton
385
+ class="part:h-4 part:w-24"
386
+ ></ecc-utils-design-skeleton>
387
+ <ecc-utils-design-skeleton
388
+ class="part:h-4 part:w-32"
389
+ ></ecc-utils-design-skeleton>
390
+ </div>
391
+ <ecc-utils-design-separator></ecc-utils-design-separator>
392
+ <div class="flex justify-between">
393
+ <ecc-utils-design-skeleton
394
+ class="part:h-4 part:w-20"
395
+ ></ecc-utils-design-skeleton>
396
+ <ecc-utils-design-skeleton
397
+ class="part:h-4 part:w-40"
398
+ ></ecc-utils-design-skeleton>
399
+ </div>
400
+ </div>
401
+ </div>
402
+ </div>
403
+ </div>
404
+ </div>
405
+ `;
406
+ }
407
+ render() {
408
+ if (!this.baseUrl && !this.provider) {
409
+ return html`
410
+ <div
411
+ class="p-4 border border-destructive rounded-md text-destructive-foreground bg-destructive/10"
412
+ >
413
+ Please provide either a base URL for the Service Registry API or a
414
+ custom provider.
415
+ </div>
416
+ `;
417
+ }
418
+ if (!this.serviceId) {
419
+ return html`
420
+ <div
421
+ class="p-4 border border-destructive rounded-md text-destructive-foreground bg-destructive/10"
422
+ >
423
+ Please provide a service ID.
424
+ </div>
425
+ `;
426
+ }
427
+ if (this.error) {
428
+ return html`
429
+ <div
430
+ class="p-4 border border-destructive rounded-md text-destructive-foreground bg-destructive/10"
431
+ >
432
+ ${this.error}
433
+ </div>
434
+ `;
435
+ }
436
+ if (this.loading || !this.service) {
437
+ return _ECCClientGa4ghServiceRegistryService.renderLoading();
438
+ }
439
+ return html`
440
+ <div class="space-y-4">
441
+ ${this.renderServiceHeader()} ${this.renderServiceContent()}
442
+ </div>
443
+ `;
444
+ }
445
+ };
446
+ _ECCClientGa4ghServiceRegistryService.styles = [
447
+ ComponentStyles,
448
+ GlobalStyles,
449
+ css`
450
+ :host {
451
+ display: block;
452
+ width: 100%;
453
+ }
454
+ `
455
+ ];
456
+ __decorateClass([
457
+ property({ type: String, reflect: true })
458
+ ], _ECCClientGa4ghServiceRegistryService.prototype, "baseUrl", 2);
459
+ __decorateClass([
460
+ property({ type: String, reflect: true })
461
+ ], _ECCClientGa4ghServiceRegistryService.prototype, "serviceId", 2);
462
+ __decorateClass([
463
+ property({ attribute: false, reflect: true })
464
+ ], _ECCClientGa4ghServiceRegistryService.prototype, "provider", 2);
465
+ __decorateClass([
466
+ state()
467
+ ], _ECCClientGa4ghServiceRegistryService.prototype, "service", 2);
468
+ __decorateClass([
469
+ state()
470
+ ], _ECCClientGa4ghServiceRegistryService.prototype, "loading", 2);
471
+ __decorateClass([
472
+ state()
473
+ ], _ECCClientGa4ghServiceRegistryService.prototype, "error", 2);
474
+ var ECCClientGa4ghServiceRegistryService = _ECCClientGa4ghServiceRegistryService;
475
+ var service_default = ECCClientGa4ghServiceRegistryService;
476
+
477
+ export { ECCClientGa4ghServiceRegistryService, service_default };
@@ -0,0 +1,59 @@
1
+ // src/providers/rest-sr-provider.ts
2
+ var RestServiceRegistryProvider = class {
3
+ // eslint-disable-next-line no-useless-constructor
4
+ constructor(baseUrl) {
5
+ this.baseUrl = baseUrl;
6
+ }
7
+ /**
8
+ * Fetch list of services from the registry
9
+ * @returns Promise resolving to array of services
10
+ */
11
+ async getServices() {
12
+ const url = `${this.baseUrl}/services`;
13
+ const response = await fetch(url);
14
+ if (!response.ok) {
15
+ throw new Error(`Failed to fetch services: ${response.statusText}`);
16
+ }
17
+ return response.json();
18
+ }
19
+ /**
20
+ * Fetch a specific service by ID
21
+ * @param serviceId ID of the service to fetch
22
+ * @returns Promise resolving to service details
23
+ */
24
+ async getServiceById(serviceId) {
25
+ const encodedServiceId = encodeURIComponent(serviceId);
26
+ const url = `${this.baseUrl}/services/${encodedServiceId}`;
27
+ const response = await fetch(url);
28
+ if (!response.ok) {
29
+ throw new Error(`Failed to fetch service: ${response.statusText}`);
30
+ }
31
+ return response.json();
32
+ }
33
+ /**
34
+ * Fetch types of services exposed by the registry
35
+ * @returns Promise resolving to array of service types
36
+ */
37
+ async getServiceTypes() {
38
+ const url = `${this.baseUrl}/services/types`;
39
+ const response = await fetch(url);
40
+ if (!response.ok) {
41
+ throw new Error(`Failed to fetch service types: ${response.statusText}`);
42
+ }
43
+ return response.json();
44
+ }
45
+ /**
46
+ * Fetch information about the registry
47
+ * @returns Promise resolving to service information
48
+ */
49
+ async getServiceInfo() {
50
+ const url = `${this.baseUrl}/service-info`;
51
+ const response = await fetch(url);
52
+ if (!response.ok) {
53
+ throw new Error(`Failed to fetch service info: ${response.statusText}`);
54
+ }
55
+ return response.json();
56
+ }
57
+ };
58
+
59
+ export { RestServiceRegistryProvider };
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,97 @@
1
+ import { css } from 'lit';
2
+
3
+ // src/global.ts
4
+ var GlobalStyles = css`
5
+ :host {
6
+ --background: var(--ecc-background, oklch(1 0 0));
7
+ --foreground: var(--ecc-foreground, oklch(0.145 0 0));
8
+ --card: var(--ecc-card, oklch(1 0 0));
9
+ --card-foreground: var(--ecc-card-foreground, oklch(0.145 0 0));
10
+ --popover: var(--ecc-popover, oklch(1 0 0));
11
+ --popover-foreground: var(--ecc-popover-foreground, oklch(0.145 0 0));
12
+ --primary: var(--ecc-primary, oklch(0.205 0 0));
13
+ --primary-foreground: var(--ecc-primary-foreground, oklch(0.985 0 0));
14
+ --secondary: var(--ecc-secondary, oklch(0.97 0 0));
15
+ --secondary-foreground: var(--ecc-secondary-foreground, oklch(0.205 0 0));
16
+ --muted: var(--ecc-muted, oklch(0.97 0 0));
17
+ --muted-foreground: var(--ecc-muted-foreground, oklch(0.556 0 0));
18
+ --accent: var(--ecc-accent, oklch(0.97 0 0));
19
+ --accent-foreground: var(--ecc-accent-foreground, oklch(0.205 0 0));
20
+ --destructive: var(--ecc-destructive, oklch(0.577 0.245 27.325));
21
+ --destructive-foreground: var(
22
+ --ecc-destructive-foreground,
23
+ oklch(0.985 0 0)
24
+ );
25
+ --border: var(--ecc-border, oklch(0.922 0 0));
26
+ --input: var(--ecc-input, oklch(0.922 0 0));
27
+ --ring: var(--ecc-ring, oklch(0.708 0 0));
28
+ --chart-1: var(--ecc-chart-1, oklch(0.646 0.222 41.116));
29
+ --chart-2: var(--ecc-chart-2, oklch(0.6 0.118 184.704));
30
+ --chart-3: var(--ecc-chart-3, oklch(0.398 0.07 227.392));
31
+ --chart-4: var(--ecc-chart-4, oklch(0.828 0.189 84.429));
32
+ --chart-5: var(--ecc-chart-5, oklch(0.769 0.188 70.08));
33
+ --radius: var(--ecc-radius, 0.625rem);
34
+ --sidebar: var(--ecc-sidebar, oklch(0.985 0 0));
35
+ --sidebar-foreground: var(--ecc-sidebar-foreground, oklch(0.145 0 0));
36
+ --sidebar-primary: var(--ecc-sidebar-primary, oklch(0.205 0 0));
37
+ --sidebar-primary-foreground: var(
38
+ --ecc-sidebar-primary-foreground,
39
+ oklch(0.985 0 0)
40
+ );
41
+ --sidebar-accent: var(--ecc-sidebar-accent, oklch(0.97 0 0));
42
+ --sidebar-accent-foreground: var(
43
+ --ecc-sidebar-accent-foreground,
44
+ oklch(0.205 0 0)
45
+ );
46
+ --sidebar-border: var(--ecc-sidebar-border, oklch(0.922 0 0));
47
+ --sidebar-ring: var(--ecc-sidebar-ring, oklch(0.708 0 0));
48
+ }
49
+
50
+ :host([dark]),
51
+ :host-context([dark]),
52
+ :host-context(.dark) {
53
+ --background: var(--ecc-background, oklch(0.145 0 0));
54
+ --foreground: var(--ecc-foreground, oklch(0.985 0 0));
55
+ --card: var(--ecc-card, oklch(0.145 0 0));
56
+ --card-foreground: var(--ecc-card-foreground, oklch(0.985 0 0));
57
+ --popover: var(--ecc-popover, oklch(0.145 0 0));
58
+ --popover-foreground: var(--ecc-popover-foreground, oklch(0.985 0 0));
59
+ --primary: var(--ecc-primary, oklch(0.985 0 0));
60
+ --primary-foreground: var(--ecc-primary-foreground, oklch(0.205 0 0));
61
+ --secondary: var(--ecc-secondary, oklch(0.269 0 0));
62
+ --secondary-foreground: var(--ecc-secondary-foreground, oklch(0.985 0 0));
63
+ --muted: var(--ecc-muted, oklch(0.269 0 0));
64
+ --muted-foreground: var(--ecc-muted-foreground, oklch(0.708 0 0));
65
+ --accent: var(--ecc-accent, oklch(0.269 0 0));
66
+ --accent-foreground: var(--ecc-accent-foreground, oklch(0.985 0 0));
67
+ --destructive: var(--ecc-destructive, oklch(0.396 0.141 25.723));
68
+ --destructive-foreground: var(
69
+ --ecc-destructive-foreground,
70
+ oklch(0.637 0.237 25.331)
71
+ );
72
+ --border: var(--ecc-border, oklch(0.269 0 0));
73
+ --input: var(--ecc-input, oklch(0.269 0 0));
74
+ --ring: var(--ecc-ring, oklch(0.439 0 0));
75
+ --chart-1: var(--ecc-chart-1, oklch(0.488 0.243 264.376));
76
+ --chart-2: var(--ecc-chart-2, oklch(0.696 0.17 162.48));
77
+ --chart-3: var(--ecc-chart-3, oklch(0.769 0.188 70.08));
78
+ --chart-4: var(--ecc-chart-4, oklch(0.627 0.265 303.9));
79
+ --chart-5: var(--ecc-chart-5, oklch(0.645 0.246 16.439));
80
+ --sidebar: var(--ecc-sidebar, oklch(0.205 0 0));
81
+ --sidebar-foreground: var(--ecc-sidebar-foreground, oklch(0.985 0 0));
82
+ --sidebar-primary: var(--ecc-sidebar-primary, oklch(0.488 0.243 264.376));
83
+ --sidebar-primary-foreground: var(
84
+ --ecc-sidebar-primary-foreground,
85
+ oklch(0.985 0 0)
86
+ );
87
+ --sidebar-accent: var(--ecc-sidebar-accent, oklch(0.269 0 0));
88
+ --sidebar-accent-foreground: var(
89
+ --ecc-sidebar-accent-foreground,
90
+ oklch(0.985 0 0)
91
+ );
92
+ --sidebar-border: var(--ecc-sidebar-border, oklch(0.269 0 0));
93
+ --sidebar-ring: var(--ecc-sidebar-ring, oklch(0.439 0 0));
94
+ }
95
+ `;
96
+
97
+ export { GlobalStyles };