@hsuite/native-connect-angular 2.2.0 → 3.0.1

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.
@@ -0,0 +1,90 @@
1
+ /**
2
+ * HSuite Native Connect
3
+ * Copyright 2024-2025 HSuite (https://hsuite.finance)
4
+ *
5
+ * SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
6
+ *
7
+ * This file is part of HSuite Native Connect. For commercial licensing,
8
+ * visit https://hsuite.finance/licensing
9
+ */
10
+
11
+ /**
12
+ * Global overlay rules for the wallet UI opened by `WalletUiService`.
13
+ *
14
+ * Ionic renders `ion-modal` / `ion-popover` outside the components, so their
15
+ * size can only come from global CSS. Include this file once in the app's
16
+ * global styles:
17
+ *
18
+ * // angular.json → "styles"
19
+ * "node_modules/@hsuite/native-connect-angular/dist/styles/wallet-ui.scss"
20
+ *
21
+ * // or from global.scss
22
+ * @use '@hsuite/native-connect-angular/styles/wallet-ui';
23
+ *
24
+ * Classes:
25
+ * - `hs-connect-modal` connect modal and accounts list: a 360px dialog that
26
+ * hugs its content; an auto-height bottom sheet on phones.
27
+ * - `hs-accounts-modal` the accounts list (also has `hs-connect-modal`).
28
+ * - `hs-account-popover` the account menu anchored on the chip (340px).
29
+ * - `hs-account-sheet` the account menu on phones.
30
+ * - `hs-session-toast` the "… disconnected — Reconnect" toast. No rule here:
31
+ * it follows the app's `ion-toast` theme; the class is
32
+ * a styling hook for the app.
33
+ *
34
+ * The cards draw their own surface (themed by the `--hs-connect-*`
35
+ * properties), so the overlays are transparent.
36
+ */
37
+
38
+ ion-modal.hs-connect-modal,
39
+ ion-modal.hs-account-sheet {
40
+ --height: auto;
41
+ --background: transparent;
42
+ --box-shadow: none;
43
+ --backdrop-opacity: var(--hs-connect-backdrop-opacity, 0.5);
44
+
45
+ // Out-ranks app-wide `ion-modal::part(content) { height: 100% }` rules.
46
+ &::part(content) {
47
+ height: auto;
48
+ }
49
+
50
+ // Ionic's .ion-page fills the modal; with an auto height it must be in flow.
51
+ > .ion-page {
52
+ position: relative;
53
+ display: block;
54
+ contain: content;
55
+ max-height: calc(100vh - 32px);
56
+ max-height: calc(100dvh - 32px);
57
+ overflow-y: auto;
58
+ }
59
+ }
60
+
61
+ ion-modal.hs-connect-modal:not(.modal-sheet) {
62
+ --width: 360px;
63
+ --max-width: calc(100vw - 32px);
64
+ --border-radius: 24px;
65
+ }
66
+
67
+ ion-modal.hs-connect-modal.modal-sheet,
68
+ ion-modal.hs-account-sheet {
69
+ --width: 100%;
70
+ --border-radius: 24px 24px 0 0;
71
+
72
+ > .ion-page {
73
+ max-height: calc(100vh - var(--ion-safe-area-top, 0px) - 10px);
74
+ max-height: calc(100dvh - var(--ion-safe-area-top, 0px) - 10px);
75
+ }
76
+ }
77
+
78
+ ion-popover.hs-account-popover {
79
+ --width: 340px;
80
+ --max-width: calc(100vw - 32px);
81
+ // Fallback only: WalletUiService sets --offset-y inline on open (the
82
+ // docked navbar's bottom + --app-navbar-dropdown-gap, else 8px below the chip).
83
+ --offset-y: 8px;
84
+ --box-shadow: 0 24px 64px -16px rgba(0, 0, 0, 0.5);
85
+
86
+ &::part(content) {
87
+ border-radius: 16px;
88
+ border: 1px solid rgba(var(--ion-text-color-rgb, 244, 239, 248), 0.14);
89
+ }
90
+ }
package/package.json CHANGED
@@ -1,10 +1,13 @@
1
1
  {
2
2
  "name": "@hsuite/native-connect-angular",
3
- "version": "2.2.0",
3
+ "version": "3.0.1",
4
4
  "license": "PolyForm-Noncommercial-1.0.0",
5
5
  "description": "Angular integration SDK for HSuite Wallet - provides direct SDK integration without wrappers",
6
6
  "type": "module",
7
- "sideEffects": false,
7
+ "sideEffects": [
8
+ "*.scss",
9
+ "*.css"
10
+ ],
8
11
  "main": "./dist/fesm2022/hsuite-native-connect-angular.mjs",
9
12
  "module": "./dist/fesm2022/hsuite-native-connect-angular.mjs",
10
13
  "fesm2022": "./dist/fesm2022/hsuite-native-connect-angular.mjs",
@@ -28,9 +31,8 @@
28
31
  "dependencies": {
29
32
  "@hashgraph/proto": "^2.25.0",
30
33
  "@hashgraph/sdk": "^2.76.0",
31
- "@hsuite/native-connect-sdk": "^2.1.6",
32
- "@hsuite/native-connect-types": "^2.2.0",
33
- "@hsuite/native-connect-ui": "^2.2.0",
34
+ "@hsuite/native-connect-sdk": "^3.0.1",
35
+ "@hsuite/native-connect-types": "^3.0.1",
34
36
  "@walletconnect/modal": "^2.7.0",
35
37
  "@walletconnect/sign-client": "^2.23.0",
36
38
  "@walletconnect/types": "^2.23.0",
@@ -69,6 +71,16 @@
69
71
  ".": {
70
72
  "types": "./dist/index.d.ts",
71
73
  "default": "./dist/fesm2022/hsuite-native-connect-angular.mjs"
74
+ },
75
+ "./styles/wallet-ui": {
76
+ "sass": "./dist/styles/wallet-ui.scss",
77
+ "style": "./dist/styles/wallet-ui.scss",
78
+ "default": "./dist/styles/wallet-ui.scss"
79
+ },
80
+ "./styles/wallet-ui.scss": {
81
+ "sass": "./dist/styles/wallet-ui.scss",
82
+ "style": "./dist/styles/wallet-ui.scss",
83
+ "default": "./dist/styles/wallet-ui.scss"
72
84
  }
73
85
  },
74
86
  "files": [