@le-space/ui 0.6.26 → 0.6.27

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@le-space/ui",
3
- "version": "0.6.26",
3
+ "version": "0.6.27",
4
4
  "description": "Floating Aleph Relay Button UI components for Svelte and React.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -44,8 +44,8 @@
44
44
  "url": "https://github.com/NiKrause/relay-button/issues"
45
45
  },
46
46
  "dependencies": {
47
- "@le-space/browser": "0.6.26",
48
- "@le-space/core": "0.6.26",
47
+ "@le-space/browser": "0.6.27",
48
+ "@le-space/core": "0.6.27",
49
49
  "viem": "^2.53.1"
50
50
  },
51
51
  "peerDependencies": {
package/react/index.js CHANGED
@@ -43,7 +43,7 @@ var RECENT_INSTANCE_RUNTIME_GRACE_MS = 10 * 60 * 1e3;
43
43
  var DEPLOYMENT_PENDING_WARNING_MS = 3 * 60 * 1e3;
44
44
 
45
45
  // src/shared/package-version.ts
46
- var UI_PACKAGE_VERSION = "0.6.26";
46
+ var UI_PACKAGE_VERSION = "0.6.27";
47
47
 
48
48
  // src/shared/format.ts
49
49
  function shortHash(value, head = 8, tail = 6) {
@@ -136,11 +136,10 @@ async function fetchWithTimeout(input, init = {}, timeoutMs = 15e3) {
136
136
 
137
137
  // ../browser/src/aleph-api.ts
138
138
  var DEFAULT_ALEPH_API_HOSTS = [
139
- "https://api3.aleph.im",
140
139
  "https://api2.aleph.im",
141
140
  "https://api.aleph.im"
142
141
  ];
143
- var DEFAULT_ALEPH_API_HOST = DEFAULT_ALEPH_API_HOSTS[0] ?? "https://api3.aleph.im";
142
+ var DEFAULT_ALEPH_API_HOST = DEFAULT_ALEPH_API_HOSTS[0] ?? "https://api2.aleph.im";
144
143
  var DEFAULT_CRN_LIST_URL = "https://crns-list.aleph.sh/crns.json";
145
144
  var DEFAULT_ALEPH_SCHEDULER_API_HOST = "https://scheduler.api.aleph.cloud";
146
145
  var DEFAULT_2N6_API_HOST = "https://api.2n6.me";
@@ -826,7 +825,12 @@ function watchWallet(onChange, provider = getEthereumProvider()) {
826
825
  // ../browser/src/client.ts
827
826
  function normalizeApiHost(value) {
828
827
  const trimmed = value.trim().replace(/\/+$/u, "");
829
- return trimmed ? trimmed : null;
828
+ if (!trimmed) return null;
829
+ try {
830
+ if (new URL(trimmed).hostname.toLowerCase() === "api3.aleph.im") return null;
831
+ } catch {
832
+ }
833
+ return trimmed;
830
834
  }
831
835
  function normalizeApiHosts(input, fallbackApiHost) {
832
836
  const rawValues = Array.isArray(input) ? input : typeof input === "string" ? input.split(/[\s,]+/u) : [];
package/shared/index.d.ts CHANGED
@@ -332,7 +332,7 @@ declare const STALE_INSTANCE_ALLOCATION_COOLDOWN_MS: number;
332
332
  declare const RECENT_INSTANCE_RUNTIME_GRACE_MS: number;
333
333
  declare const DEPLOYMENT_PENDING_WARNING_MS: number;
334
334
 
335
- declare const UI_PACKAGE_VERSION = "0.6.26";
335
+ declare const UI_PACKAGE_VERSION = "0.6.27";
336
336
 
337
337
  interface RootfsRequiredPortForward {
338
338
  port: number;
package/shared/index.js CHANGED
@@ -42,7 +42,7 @@ var RECENT_INSTANCE_RUNTIME_GRACE_MS = 10 * 60 * 1e3;
42
42
  var DEPLOYMENT_PENDING_WARNING_MS = 3 * 60 * 1e3;
43
43
 
44
44
  // src/shared/package-version.ts
45
- var UI_PACKAGE_VERSION = "0.6.26";
45
+ var UI_PACKAGE_VERSION = "0.6.27";
46
46
 
47
47
  // src/shared/format.ts
48
48
  function shortHash(value, head = 8, tail = 6) {
@@ -135,11 +135,10 @@ async function fetchWithTimeout(input, init = {}, timeoutMs = 15e3) {
135
135
 
136
136
  // ../browser/src/aleph-api.ts
137
137
  var DEFAULT_ALEPH_API_HOSTS = [
138
- "https://api3.aleph.im",
139
138
  "https://api2.aleph.im",
140
139
  "https://api.aleph.im"
141
140
  ];
142
- var DEFAULT_ALEPH_API_HOST = DEFAULT_ALEPH_API_HOSTS[0] ?? "https://api3.aleph.im";
141
+ var DEFAULT_ALEPH_API_HOST = DEFAULT_ALEPH_API_HOSTS[0] ?? "https://api2.aleph.im";
143
142
  var DEFAULT_CRN_LIST_URL = "https://crns-list.aleph.sh/crns.json";
144
143
  var DEFAULT_ALEPH_SCHEDULER_API_HOST = "https://scheduler.api.aleph.cloud";
145
144
  var DEFAULT_2N6_API_HOST = "https://api.2n6.me";
@@ -825,7 +824,12 @@ function watchWallet(onChange, provider = getEthereumProvider()) {
825
824
  // ../browser/src/client.ts
826
825
  function normalizeApiHost(value) {
827
826
  const trimmed = value.trim().replace(/\/+$/u, "");
828
- return trimmed ? trimmed : null;
827
+ if (!trimmed) return null;
828
+ try {
829
+ if (new URL(trimmed).hostname.toLowerCase() === "api3.aleph.im") return null;
830
+ } catch {
831
+ }
832
+ return trimmed;
829
833
  }
830
834
  function normalizeApiHosts(input, fallbackApiHost) {
831
835
  const rawValues = Array.isArray(input) ? input : typeof input === "string" ? input.split(/[\s,]+/u) : [];