@le-space/ui 0.3.9 → 0.3.11
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 +3 -3
- package/react/index.d.ts +1 -0
- package/react/index.js +6 -32
- package/shared/index.d.ts +4 -1
- package/shared/index.js +4 -0
- package/svelte/SponsorRelayFab.svelte +4 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@le-space/ui",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.11",
|
|
4
4
|
"description": "Floating Aleph sponsor relay UI components for Svelte and React.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"access": "public"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@le-space/browser": "0.3.
|
|
40
|
-
"@le-space/core": "0.3.
|
|
39
|
+
"@le-space/browser": "0.3.11",
|
|
40
|
+
"@le-space/core": "0.3.11",
|
|
41
41
|
"viem": "^2.38.5"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
package/react/index.d.ts
CHANGED
package/react/index.js
CHANGED
|
@@ -1,37 +1,6 @@
|
|
|
1
1
|
// src/react/SponsorRelayFab.tsx
|
|
2
2
|
import React from "react";
|
|
3
3
|
|
|
4
|
-
// package.json
|
|
5
|
-
var package_default = {
|
|
6
|
-
name: "@le-space/ui",
|
|
7
|
-
version: "0.3.9",
|
|
8
|
-
description: "Floating Aleph sponsor relay UI components for Svelte and React.",
|
|
9
|
-
license: "MIT",
|
|
10
|
-
type: "module",
|
|
11
|
-
main: "./src/shared/index.ts",
|
|
12
|
-
types: "./src/shared/index.ts",
|
|
13
|
-
dependencies: {
|
|
14
|
-
"@le-space/browser": "workspace:*",
|
|
15
|
-
"@le-space/core": "workspace:*",
|
|
16
|
-
viem: "^2.38.5"
|
|
17
|
-
},
|
|
18
|
-
peerDependencies: {
|
|
19
|
-
react: ">=18",
|
|
20
|
-
"react-dom": ">=18",
|
|
21
|
-
svelte: ">=4"
|
|
22
|
-
},
|
|
23
|
-
devDependencies: {
|
|
24
|
-
"@types/react": "^18.3.27",
|
|
25
|
-
"@types/react-dom": "^18.3.7"
|
|
26
|
-
},
|
|
27
|
-
scripts: {
|
|
28
|
-
build: 'echo "ui build placeholder"',
|
|
29
|
-
"build:publish": "tsup src/shared/index.ts --format esm --dts --clean --tsconfig tsconfig.publish.json --out-dir dist/shared && tsup src/react/index.ts --format esm --dts --tsconfig tsconfig.publish.json --out-dir dist/react",
|
|
30
|
-
test: "pnpm run build:publish && node --test ./test/**/*.test.mjs",
|
|
31
|
-
lint: 'echo "ui lint placeholder"'
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
|
|
35
4
|
// src/shared/constants.ts
|
|
36
5
|
var DEFAULT_INSTANCE_NAME = "sponsor-relay";
|
|
37
6
|
var DEFAULT_MANIFEST_URL = "./rootfs-manifest.json";
|
|
@@ -69,6 +38,9 @@ var STALE_INSTANCE_ALLOCATION_COOLDOWN_MS = 5 * 60 * 1e3;
|
|
|
69
38
|
var RECENT_INSTANCE_RUNTIME_GRACE_MS = 10 * 60 * 1e3;
|
|
70
39
|
var DEPLOYMENT_PENDING_WARNING_MS = 3 * 60 * 1e3;
|
|
71
40
|
|
|
41
|
+
// src/shared/package-version.ts
|
|
42
|
+
var UI_PACKAGE_VERSION = "0.3.11";
|
|
43
|
+
|
|
72
44
|
// src/shared/format.ts
|
|
73
45
|
function shortHash(value, head = 8, tail = 6) {
|
|
74
46
|
if (!value) return "-";
|
|
@@ -4208,7 +4180,9 @@ function launcherIndicator(state) {
|
|
|
4208
4180
|
}
|
|
4209
4181
|
function SponsorRelayFab(props) {
|
|
4210
4182
|
const { controller, state } = useSponsorRelayController(props);
|
|
4211
|
-
const
|
|
4183
|
+
const explicitVersion = typeof props.version === "string" ? props.version.trim() : "";
|
|
4184
|
+
const resolvedVersion = explicitVersion || UI_PACKAGE_VERSION;
|
|
4185
|
+
const versionLabel = resolvedVersion.startsWith("v") ? resolvedVersion : `v${resolvedVersion}`;
|
|
4212
4186
|
const launcherMode = props.launcherMode ?? "floating";
|
|
4213
4187
|
const indicator = launcherIndicator(state);
|
|
4214
4188
|
const [successFlash, setSuccessFlash] = React.useState(false);
|
package/shared/index.d.ts
CHANGED
|
@@ -196,6 +196,7 @@ interface SponsorRelayProps {
|
|
|
196
196
|
showInstances?: boolean;
|
|
197
197
|
openByDefault?: boolean;
|
|
198
198
|
launcherMode?: 'floating' | 'inline';
|
|
199
|
+
version?: string;
|
|
199
200
|
apiHost?: string;
|
|
200
201
|
crnListUrl?: string;
|
|
201
202
|
schedulerApiHost?: string;
|
|
@@ -303,6 +304,8 @@ declare const STALE_INSTANCE_ALLOCATION_COOLDOWN_MS: number;
|
|
|
303
304
|
declare const RECENT_INSTANCE_RUNTIME_GRACE_MS: number;
|
|
304
305
|
declare const DEPLOYMENT_PENDING_WARNING_MS: number;
|
|
305
306
|
|
|
307
|
+
declare const UI_PACKAGE_VERSION = "0.3.11";
|
|
308
|
+
|
|
306
309
|
interface RootfsRequiredPortForward {
|
|
307
310
|
port: number;
|
|
308
311
|
tcp?: boolean;
|
|
@@ -395,4 +398,4 @@ interface DeploymentProgressEmitter {
|
|
|
395
398
|
}
|
|
396
399
|
declare function createDeploymentProgressEmitter(): DeploymentProgressEmitter;
|
|
397
400
|
|
|
398
|
-
export { type CompactInstanceDetails, type CompactInstanceRecord, DEFAULT_INSTANCE_NAME, DEFAULT_MANIFEST_URL, DEFAULT_TIER_ID, DEPLOYMENT_PENDING_WARNING_MS, type DeploymentProgressEmitter, type EthereumProviderLike, IDLE_DEPLOYMENT_PROGRESS, INSTANCE_RUNTIME_PENDING_REFRESH_MS, INSTANCE_RUNTIME_READY_REFRESH_MS, INSTANCE_RUNTIME_STALE_REFRESH_MS, MANIFEST_SOURCE_REFRESH_DEBOUNCE_MS, RECENT_INSTANCE_RUNTIME_GRACE_MS, REFRESH_INTERVAL_MS, RELAY_PING_IDLE_STATE, RELAY_PING_INTERVAL_MS, ROOTFS_MISSING_STATE, type RelayPingState, STALE_INSTANCE_ALLOCATION_COOLDOWN_MS, SponsorRelayController, type SponsorRelayHealthTone, type SponsorRelayPricingSummary, type SponsorRelayProps, type SponsorRelayRootfsHealth, type SponsorRelayState, type SponsorRelaySubscriber, type SponsorRelayWalletState, buildSshCommand, connectWallet, createDeploymentProgressEmitter, createSponsorRelayController, formatDateTime, formatNumber, formatTierSpecLabel, getEthereumProvider, joinMappedPorts, joinRequiredPortForwards, personalSign, resolveManifestSource, shortHash, toChecksumAddress, watchWallet };
|
|
401
|
+
export { type CompactInstanceDetails, type CompactInstanceRecord, DEFAULT_INSTANCE_NAME, DEFAULT_MANIFEST_URL, DEFAULT_TIER_ID, DEPLOYMENT_PENDING_WARNING_MS, type DeploymentProgressEmitter, type EthereumProviderLike, IDLE_DEPLOYMENT_PROGRESS, INSTANCE_RUNTIME_PENDING_REFRESH_MS, INSTANCE_RUNTIME_READY_REFRESH_MS, INSTANCE_RUNTIME_STALE_REFRESH_MS, MANIFEST_SOURCE_REFRESH_DEBOUNCE_MS, RECENT_INSTANCE_RUNTIME_GRACE_MS, REFRESH_INTERVAL_MS, RELAY_PING_IDLE_STATE, RELAY_PING_INTERVAL_MS, ROOTFS_MISSING_STATE, type RelayPingState, STALE_INSTANCE_ALLOCATION_COOLDOWN_MS, SponsorRelayController, type SponsorRelayHealthTone, type SponsorRelayPricingSummary, type SponsorRelayProps, type SponsorRelayRootfsHealth, type SponsorRelayState, type SponsorRelaySubscriber, type SponsorRelayWalletState, UI_PACKAGE_VERSION, buildSshCommand, connectWallet, createDeploymentProgressEmitter, createSponsorRelayController, formatDateTime, formatNumber, formatTierSpecLabel, getEthereumProvider, joinMappedPorts, joinRequiredPortForwards, personalSign, resolveManifestSource, shortHash, toChecksumAddress, watchWallet };
|
package/shared/index.js
CHANGED
|
@@ -37,6 +37,9 @@ var STALE_INSTANCE_ALLOCATION_COOLDOWN_MS = 5 * 60 * 1e3;
|
|
|
37
37
|
var RECENT_INSTANCE_RUNTIME_GRACE_MS = 10 * 60 * 1e3;
|
|
38
38
|
var DEPLOYMENT_PENDING_WARNING_MS = 3 * 60 * 1e3;
|
|
39
39
|
|
|
40
|
+
// src/shared/package-version.ts
|
|
41
|
+
var UI_PACKAGE_VERSION = "0.3.11";
|
|
42
|
+
|
|
40
43
|
// src/shared/format.ts
|
|
41
44
|
function shortHash(value, head = 8, tail = 6) {
|
|
42
45
|
if (!value) return "-";
|
|
@@ -4023,6 +4026,7 @@ export {
|
|
|
4023
4026
|
ROOTFS_MISSING_STATE,
|
|
4024
4027
|
STALE_INSTANCE_ALLOCATION_COOLDOWN_MS,
|
|
4025
4028
|
SponsorRelayController,
|
|
4029
|
+
UI_PACKAGE_VERSION,
|
|
4026
4030
|
buildSshCommand,
|
|
4027
4031
|
connectWallet,
|
|
4028
4032
|
createDeploymentProgressEmitter,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import { onDestroy, onMount } from 'svelte'
|
|
3
3
|
|
|
4
|
-
import { createSponsorRelayController, formatDateTime, formatNumber, formatTierSpecLabel, joinMappedPorts, joinRequiredPortForwards, shortHash } from '../shared/index'
|
|
4
|
+
import { UI_PACKAGE_VERSION, createSponsorRelayController, formatDateTime, formatNumber, formatTierSpecLabel, joinMappedPorts, joinRequiredPortForwards, shortHash } from '../shared/index'
|
|
5
5
|
import AccordionSection from './components/AccordionSection.svelte'
|
|
6
6
|
import CopyButton from './components/CopyButton.svelte'
|
|
7
7
|
import LauncherButton from './components/LauncherButton.svelte'
|
|
@@ -38,8 +38,9 @@ export let apiHost = undefined
|
|
|
38
38
|
})
|
|
39
39
|
|
|
40
40
|
let state = controller.getState()
|
|
41
|
-
const
|
|
42
|
-
|
|
41
|
+
const resolvedVersion = version.trim() || UI_PACKAGE_VERSION
|
|
42
|
+
const versionLabel = resolvedVersion.trim()
|
|
43
|
+
? (resolvedVersion.trim().startsWith('v') ? resolvedVersion.trim() : `v${resolvedVersion.trim()}`)
|
|
43
44
|
: ''
|
|
44
45
|
|
|
45
46
|
onMount(async () => {
|