@canton-network/core-wallet-ui-components 0.3.3 → 0.5.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.
- package/README.md +1 -1
- package/dist/components/AppLayout.js +1 -1
- package/dist/components/Configuration.js +1 -1
- package/dist/components/Discovery.d.ts +1 -1
- package/dist/components/Discovery.js +3 -3
- package/dist/scripts/copy-css.d.ts +2 -0
- package/dist/scripts/copy-css.d.ts.map +1 -0
- package/dist/scripts/copy-css.js +4 -0
- package/dist/themes/default.css +46 -0
- package/dist/windows/popup.js +1 -1
- package/package.json +8 -4
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Wallet UI Components
|
|
2
2
|
|
|
3
|
-
This workspace contains UI components for the Wallet
|
|
3
|
+
This workspace contains UI components for the Wallet Gateway, implemented with [Web Components](https://www.webcomponents.org/introduction).
|
|
4
4
|
|
|
5
5
|
## Overview
|
|
6
6
|
|
|
@@ -12,7 +12,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
12
12
|
import { LitElement, html, css, unsafeCSS } from 'lit';
|
|
13
13
|
import { customElement, property } from 'lit/decorators.js';
|
|
14
14
|
import bootstrapCss from 'bootstrap/dist/css/bootstrap.min.css?inline';
|
|
15
|
-
import defaultTheme from '
|
|
15
|
+
import defaultTheme from '../themes/default.css?inline';
|
|
16
16
|
let AppLayout = class AppLayout extends LitElement {
|
|
17
17
|
constructor() {
|
|
18
18
|
super(...arguments);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DiscoverResult } from '@canton-network/core-types';
|
|
2
2
|
/**
|
|
3
|
-
* Discovery implements the view of the Wallet
|
|
3
|
+
* Discovery implements the view of the Wallet Gateway selection window.
|
|
4
4
|
* It is implemented directly as a Web Component without using LitElement, so to avoid having external dependencies.
|
|
5
5
|
*/
|
|
6
6
|
export declare class Discovery extends HTMLElement {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright (c) 2025 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
/**
|
|
4
|
-
* Discovery implements the view of the Wallet
|
|
4
|
+
* Discovery implements the view of the Wallet Gateway selection window.
|
|
5
5
|
* It is implemented directly as a Web Component without using LitElement, so to avoid having external dependencies.
|
|
6
6
|
*/
|
|
7
7
|
export class Discovery extends HTMLElement {
|
|
@@ -101,7 +101,7 @@ export class Discovery extends HTMLElement {
|
|
|
101
101
|
render() {
|
|
102
102
|
const root = document.createElement('div');
|
|
103
103
|
const header = document.createElement('h1');
|
|
104
|
-
header.innerText = 'Add Remote Wallet
|
|
104
|
+
header.innerText = 'Add Remote Wallet Gateway';
|
|
105
105
|
const input = document.createElement('input');
|
|
106
106
|
input.setAttribute('autofocus', '');
|
|
107
107
|
input.setAttribute('id', 'wkurl');
|
|
@@ -112,7 +112,7 @@ export class Discovery extends HTMLElement {
|
|
|
112
112
|
button.innerText = 'Connect';
|
|
113
113
|
button.addEventListener('click', () => {
|
|
114
114
|
const url = input.value;
|
|
115
|
-
console.log('Connecting to Wallet
|
|
115
|
+
console.log('Connecting to Wallet Gateway...' + url);
|
|
116
116
|
this.selectKernel({ url, walletType: 'remote' });
|
|
117
117
|
});
|
|
118
118
|
root.appendChild(header);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"copy-css.d.ts","sourceRoot":"","sources":["../../src/scripts/copy-css.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
:root,
|
|
2
|
+
:host {
|
|
3
|
+
--splice-wk-background-color: snow;
|
|
4
|
+
--splice-wk-text-color: rgba(0, 0, 0, 0.65);
|
|
5
|
+
--splice-wk-font-family: sans-serif;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.hidden {
|
|
9
|
+
display: none;
|
|
10
|
+
}
|
|
11
|
+
.header {
|
|
12
|
+
background-color: #f8f9fa;
|
|
13
|
+
padding: 10px;
|
|
14
|
+
border-bottom: 1px solid #dee2e6;
|
|
15
|
+
}
|
|
16
|
+
.header h2 {
|
|
17
|
+
margin: 0;
|
|
18
|
+
font-size: 1.25rem;
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
}
|
|
22
|
+
.header img {
|
|
23
|
+
margin-right: 10px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.header .logo-box {
|
|
27
|
+
display: inline-block;
|
|
28
|
+
cursor: pointer;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.container {
|
|
32
|
+
padding: 20px;
|
|
33
|
+
}
|
|
34
|
+
.btn-primary,
|
|
35
|
+
.btn-success {
|
|
36
|
+
background-color: #007bff;
|
|
37
|
+
border-color: #007bff;
|
|
38
|
+
}
|
|
39
|
+
.btn-outline-secondary {
|
|
40
|
+
border-color: #6c757d;
|
|
41
|
+
color: #6c757d;
|
|
42
|
+
}
|
|
43
|
+
.btn-outline-secondary:hover {
|
|
44
|
+
background-color: #6c757d;
|
|
45
|
+
color: #fff;
|
|
46
|
+
}
|
package/dist/windows/popup.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Copyright (c) 2025 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
import styles from '
|
|
3
|
+
import styles from '../themes/default.css?inline';
|
|
4
4
|
export function popup(component, options) {
|
|
5
5
|
const { title = 'Custom Popup', target = 'wallet-popup', width = 400, height = 500, screenX = 200, screenY = 200, } = options || {};
|
|
6
6
|
const html = `<!DOCTYPE html>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@canton-network/core-wallet-ui-components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Reusable UI components for the Splice wallet",
|
|
6
6
|
"repository": "github:hyperledger-labs/splice-wallet-kernel",
|
|
@@ -13,20 +13,24 @@
|
|
|
13
13
|
"./themes": "./themes"
|
|
14
14
|
},
|
|
15
15
|
"scripts": {
|
|
16
|
-
"
|
|
16
|
+
"copy-css": "tsx src/scripts/copy-css.ts",
|
|
17
|
+
"build": "tsc -b && yarn copy-css",
|
|
17
18
|
"build:watch": "tsc -b --watch",
|
|
18
19
|
"clean": "tsc -b --clean; tsc -b tsconfig.dev.json --clean; rm -rf dist; [ -d public/js ] && rm -rf public/js/* || true",
|
|
19
20
|
"dev": "vite --port 8000"
|
|
20
21
|
},
|
|
21
22
|
"devDependencies": {
|
|
22
23
|
"@types/bootstrap": "^5",
|
|
24
|
+
"@types/fs-extra": "^11",
|
|
25
|
+
"fs-extra": "^11.3.2",
|
|
26
|
+
"tsx": "^4.20.4",
|
|
23
27
|
"typescript": "^5.8.3",
|
|
24
28
|
"vite": "^6.3.5"
|
|
25
29
|
},
|
|
26
30
|
"packageManager": "yarn@4.9.4",
|
|
27
31
|
"dependencies": {
|
|
28
|
-
"@canton-network/core-types": "^0.
|
|
29
|
-
"@canton-network/core-wallet-store": "^0.
|
|
32
|
+
"@canton-network/core-types": "^0.5.0",
|
|
33
|
+
"@canton-network/core-wallet-store": "^0.5.0",
|
|
30
34
|
"@popperjs/core": "^2.11.8",
|
|
31
35
|
"bootstrap": "^5.3.7",
|
|
32
36
|
"lit": "^3.3.0"
|