@medialane/ui 0.168.0 → 0.169.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 (55) hide show
  1. package/dist/components/badge.d.cts +1 -1
  2. package/dist/components/badge.d.ts +1 -1
  3. package/dist/components/button.d.cts +2 -2
  4. package/dist/components/button.d.ts +2 -2
  5. package/dist/components/fast-mint/fast-mint.cjs +4 -4
  6. package/dist/components/fast-mint/fast-mint.cjs.map +1 -1
  7. package/dist/components/fast-mint/fast-mint.d.cts +2 -2
  8. package/dist/components/fast-mint/fast-mint.d.ts +2 -2
  9. package/dist/components/fast-mint/fast-mint.js +4 -4
  10. package/dist/components/fast-mint/fast-mint.js.map +1 -1
  11. package/dist/components/remixes-tab.cjs +2 -2
  12. package/dist/components/remixes-tab.cjs.map +1 -1
  13. package/dist/components/remixes-tab.d.cts +3 -3
  14. package/dist/components/remixes-tab.d.ts +3 -3
  15. package/dist/components/remixes-tab.js +2 -2
  16. package/dist/components/remixes-tab.js.map +1 -1
  17. package/dist/components/sheet.d.cts +1 -1
  18. package/dist/components/sheet.d.ts +1 -1
  19. package/dist/index.cjs +0 -5
  20. package/dist/index.cjs.map +1 -1
  21. package/dist/index.d.cts +0 -1
  22. package/dist/index.d.ts +0 -1
  23. package/dist/index.js +0 -3
  24. package/dist/index.js.map +1 -1
  25. package/dist/utils/ipfs-upload.cjs +11 -31
  26. package/dist/utils/ipfs-upload.cjs.map +1 -1
  27. package/dist/utils/ipfs-upload.d.cts +5 -5
  28. package/dist/utils/ipfs-upload.d.ts +5 -5
  29. package/dist/utils/ipfs-upload.js +11 -31
  30. package/dist/utils/ipfs-upload.js.map +1 -1
  31. package/dist/utils/use-notifications.cjs +2 -2
  32. package/dist/utils/use-notifications.cjs.map +1 -1
  33. package/dist/utils/use-notifications.d.cts +1 -2
  34. package/dist/utils/use-notifications.d.ts +1 -2
  35. package/dist/utils/use-notifications.js +2 -2
  36. package/dist/utils/use-notifications.js.map +1 -1
  37. package/dist/utils/use-orders.cjs +3 -3
  38. package/dist/utils/use-orders.cjs.map +1 -1
  39. package/dist/utils/use-orders.d.cts +1 -2
  40. package/dist/utils/use-orders.d.ts +1 -2
  41. package/dist/utils/use-orders.js +3 -3
  42. package/dist/utils/use-orders.js.map +1 -1
  43. package/dist/utils/use-remix-offers.cjs +5 -4
  44. package/dist/utils/use-remix-offers.cjs.map +1 -1
  45. package/dist/utils/use-remix-offers.d.cts +4 -9
  46. package/dist/utils/use-remix-offers.d.ts +4 -9
  47. package/dist/utils/use-remix-offers.js +5 -4
  48. package/dist/utils/use-remix-offers.js.map +1 -1
  49. package/package.json +3 -3
  50. package/dist/utils/api-fetch.cjs +0 -65
  51. package/dist/utils/api-fetch.cjs.map +0 -1
  52. package/dist/utils/api-fetch.d.cts +0 -17
  53. package/dist/utils/api-fetch.d.ts +0 -17
  54. package/dist/utils/api-fetch.js +0 -40
  55. package/dist/utils/api-fetch.js.map +0 -1
@@ -1,40 +0,0 @@
1
- class ApiError extends Error {
2
- constructor(status, message) {
3
- super(message);
4
- this.status = status;
5
- this.name = "ApiError";
6
- }
7
- }
8
- async function apiFetch(config, path, options = {}) {
9
- const { method = "GET", body, bearer, signal } = options;
10
- const url = `${config.baseUrl.replace(/\/$/, "")}${path.startsWith("/") ? path : `/${path}`}`;
11
- const headers = {};
12
- if (body !== void 0) headers["Content-Type"] = "application/json";
13
- if (config.apiKey) headers["x-api-key"] = config.apiKey;
14
- if (bearer) headers["Authorization"] = `Bearer ${bearer}`;
15
- const res = await fetch(url, {
16
- method,
17
- headers,
18
- body: body !== void 0 ? JSON.stringify(body) : void 0,
19
- signal
20
- });
21
- if (!res.ok) {
22
- const text = await res.text().catch(() => res.statusText);
23
- let message = text || `Request failed with HTTP ${res.status}`;
24
- try {
25
- const parsed = JSON.parse(text);
26
- if (parsed && typeof parsed === "object" && "error" in parsed && typeof parsed.error === "string") {
27
- message = parsed.error;
28
- }
29
- } catch {
30
- }
31
- throw new ApiError(res.status, message);
32
- }
33
- if (res.status === 204) return void 0;
34
- return res.json();
35
- }
36
- export {
37
- ApiError,
38
- apiFetch
39
- };
40
- //# sourceMappingURL=api-fetch.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/utils/api-fetch.ts"],"sourcesContent":["\nexport class ApiError extends Error {\n constructor(public readonly status: number, message: string) {\n super(message);\n this.name = \"ApiError\";\n }\n}\n\nexport interface ApiFetchConfig {\n baseUrl: string;\n apiKey?: string;\n}\n\nexport interface ApiFetchOptions {\n method?: \"GET\" | \"POST\" | \"PATCH\" | \"PUT\" | \"DELETE\";\n body?: unknown;\n\n bearer?: string | null;\n signal?: AbortSignal;\n}\n\nexport async function apiFetch<T = unknown>(\n config: ApiFetchConfig,\n path: string,\n options: ApiFetchOptions = {}\n): Promise<T> {\n const { method = \"GET\", body, bearer, signal } = options;\n const url = `${config.baseUrl.replace(/\\/$/, \"\")}${path.startsWith(\"/\") ? path : `/${path}`}`;\n\n const headers: Record<string, string> = {};\n if (body !== undefined) headers[\"Content-Type\"] = \"application/json\";\n if (config.apiKey) headers[\"x-api-key\"] = config.apiKey;\n if (bearer) headers[\"Authorization\"] = `Bearer ${bearer}`;\n\n const res = await fetch(url, {\n method,\n headers,\n body: body !== undefined ? JSON.stringify(body) : undefined,\n signal,\n });\n\n if (!res.ok) {\n const text = await res.text().catch(() => res.statusText);\n let message = text || `Request failed with HTTP ${res.status}`;\n try {\n const parsed = JSON.parse(text);\n if (parsed && typeof parsed === \"object\" && \"error\" in parsed && typeof parsed.error === \"string\") {\n message = parsed.error;\n }\n } catch {\n\n }\n throw new ApiError(res.status, message);\n }\n\n if (res.status === 204) return undefined as T;\n return res.json() as Promise<T>;\n}\n"],"mappings":"AACO,MAAM,iBAAiB,MAAM;AAAA,EAClC,YAA4B,QAAgB,SAAiB;AAC3D,UAAM,OAAO;AADa;AAE1B,SAAK,OAAO;AAAA,EACd;AACF;AAeA,eAAsB,SACpB,QACA,MACA,UAA2B,CAAC,GAChB;AACZ,QAAM,EAAE,SAAS,OAAO,MAAM,QAAQ,OAAO,IAAI;AACjD,QAAM,MAAM,GAAG,OAAO,QAAQ,QAAQ,OAAO,EAAE,CAAC,GAAG,KAAK,WAAW,GAAG,IAAI,OAAO,IAAI,IAAI,EAAE;AAE3F,QAAM,UAAkC,CAAC;AACzC,MAAI,SAAS,OAAW,SAAQ,cAAc,IAAI;AAClD,MAAI,OAAO,OAAQ,SAAQ,WAAW,IAAI,OAAO;AACjD,MAAI,OAAQ,SAAQ,eAAe,IAAI,UAAU,MAAM;AAEvD,QAAM,MAAM,MAAM,MAAM,KAAK;AAAA,IAC3B;AAAA,IACA;AAAA,IACA,MAAM,SAAS,SAAY,KAAK,UAAU,IAAI,IAAI;AAAA,IAClD;AAAA,EACF,CAAC;AAED,MAAI,CAAC,IAAI,IAAI;AACX,UAAM,OAAO,MAAM,IAAI,KAAK,EAAE,MAAM,MAAM,IAAI,UAAU;AACxD,QAAI,UAAU,QAAQ,4BAA4B,IAAI,MAAM;AAC5D,QAAI;AACF,YAAM,SAAS,KAAK,MAAM,IAAI;AAC9B,UAAI,UAAU,OAAO,WAAW,YAAY,WAAW,UAAU,OAAO,OAAO,UAAU,UAAU;AACjG,kBAAU,OAAO;AAAA,MACnB;AAAA,IACF,QAAQ;AAAA,IAER;AACA,UAAM,IAAI,SAAS,IAAI,QAAQ,OAAO;AAAA,EACxC;AAEA,MAAI,IAAI,WAAW,IAAK,QAAO;AAC/B,SAAO,IAAI,KAAK;AAClB;","names":[]}