@namiml/web-sdk 1.7.4-beta.1 → 1.7.4
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/CHANGELOG.md +9 -0
- package/README.md +15 -25
- package/dist/components/NamiElement.d.ts +9 -3
- package/dist/components/PaywallScreen.d.ts +1 -1
- package/dist/components/containers/CarouselContainer.d.ts +1 -1
- package/dist/components/containers/CollapseContainer.d.ts +1 -1
- package/dist/components/containers/Container.d.ts +5 -0
- package/dist/components/elements/Button.d.ts +1 -1
- package/dist/components/elements/QRCode.d.ts +1 -1
- package/dist/components/elements/RadioButton.d.ts +1 -1
- package/dist/components/elements/SegmentPicker.d.ts +1 -1
- package/dist/components/elements/SegmentPickerItem.d.ts +1 -1
- package/dist/components/elements/ToggleSwitch.d.ts +1 -1
- package/dist/legacy-support.cjs +27667 -0
- package/dist/legacy-support.d.ts +2 -0
- package/dist/legacy-support.mjs +27665 -0
- package/dist/nami/namiRefs.d.ts +5 -0
- package/dist/nami-web.cjs +18 -17
- package/dist/nami-web.mjs +18 -17
- package/dist/nami-web.umd.js +34 -33
- package/dist/repositories/device.repository.d.ts +3 -2
- package/dist/types/device.d.ts +1 -1
- package/dist/utils/anonymousMode.d.ts +19 -0
- package/dist/utils/const.d.ts +1 -1
- package/package.json +11 -7
- package/dist/nami-web-legacy.d.ts +0 -10
- package/dist/nami-web.legacy.cjs +0 -236
- package/dist/nami-web.legacy.mjs +0 -236
- package/dist/nami-web.legacy.umd.js +0 -236
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Nami Web SDK Changelog
|
|
2
2
|
|
|
3
|
+
## 1.7.4
|
|
4
|
+
**Release Date:** October 30, 2025
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
- Fix an issue where if device registration failed, user was stuck in anonymous mode
|
|
8
|
+
|
|
9
|
+
### Enhancements
|
|
10
|
+
- Support for legacy browsers
|
|
11
|
+
|
|
3
12
|
## 1.7.3
|
|
4
13
|
**Release Date:** October 13, 2025
|
|
5
14
|
|
package/README.md
CHANGED
|
@@ -33,35 +33,25 @@ Example apps showing how to use the SDK are available in our [Nami Web SDK repo]
|
|
|
33
33
|
|
|
34
34
|
More information on configuring and using the SDK is available in our docs at [https://learn.namiml.com](https://learn.namiml.com).
|
|
35
35
|
|
|
36
|
-
## Legacy
|
|
36
|
+
## Legacy support
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
To support older browsers, import our side-effect module before you import the SDK. It installs the necessary polyfills and shims, allowing the main entry point to stay the same for every app.
|
|
39
39
|
|
|
40
|
-
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
- ESM:
|
|
41
|
+
```js
|
|
42
|
+
import '@namiml/web-sdk/legacy-support';
|
|
43
|
+
import { Nami } from '@namiml/web-sdk';
|
|
44
|
+
```
|
|
45
|
+
- CommonJS:
|
|
46
|
+
```js
|
|
47
|
+
require('@namiml/web-sdk/legacy-support');
|
|
48
|
+
const { Nami } = require('@namiml/web-sdk');
|
|
49
|
+
```
|
|
44
50
|
|
|
45
|
-
|
|
46
|
-
- If you need to include polyfills for older browsers, we provide a small polyfills bundle you can load before the SDK.
|
|
47
|
-
- ESM: `import '@namiml/web-sdk/polyfills'`
|
|
48
|
-
- CommonJS: `require('@namiml/web-sdk/polyfills')`
|
|
49
|
-
- You can also include the polyfills script directly in a page before loading the SDK bundle.
|
|
50
|
-
|
|
51
|
-
Recommended patterns
|
|
52
|
-
|
|
53
|
-
- Most modern apps should import the default package entry (modern bundle):
|
|
51
|
+
Modern apps that do not target legacy environments can simply import the default entry:
|
|
54
52
|
|
|
55
53
|
```js
|
|
56
|
-
import Nami from '@namiml/web-sdk'
|
|
54
|
+
import { Nami } from '@namiml/web-sdk';
|
|
57
55
|
```
|
|
58
56
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
```js
|
|
62
|
-
import '@namiml/web-sdk/polyfills'
|
|
63
|
-
import Nami from '@namiml/web-sdk/legacy'
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
This lets you ship the smallest modern bundle to the majority of users while opting into legacy and polyfills only when required.
|
|
67
|
-
|
|
57
|
+
This keeps the modern bundle slim, while letting you opt into additional support only when you need it.
|
|
@@ -1,22 +1,28 @@
|
|
|
1
|
-
import { CSSResult, LitElement, PropertyValueMap } from "lit";
|
|
1
|
+
import { CSSResult, CSSResultGroup, LitElement, PropertyValueMap } from "lit";
|
|
2
2
|
import ContextConsumer from "./ContextConsumer";
|
|
3
3
|
import { PaywallContextProvider } from "./ContextProvider";
|
|
4
4
|
import { TBaseComponent } from "../types/components";
|
|
5
5
|
export declare class NamiElementBase extends LitElement {
|
|
6
|
+
static styles: CSSResultGroup;
|
|
6
7
|
contextConsumer: ContextConsumer;
|
|
7
8
|
contextProvider: PaywallContextProvider;
|
|
9
|
+
private _instanceStyleSheet?;
|
|
10
|
+
private _instanceStyleElement?;
|
|
8
11
|
constructor();
|
|
9
12
|
protected styles(): CSSResult;
|
|
10
13
|
createRenderRoot(): HTMLElement | DocumentFragment;
|
|
11
14
|
protected shouldUpdate(): boolean;
|
|
12
15
|
protected willUpdate(_changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void;
|
|
13
16
|
disconnectedCallback(): void;
|
|
17
|
+
protected getInstanceStyles(): CSSResult[];
|
|
18
|
+
private ensureInstanceStyleTarget;
|
|
19
|
+
private applyInstanceStyles;
|
|
14
20
|
}
|
|
15
21
|
export declare abstract class NamiElement<C extends TBaseComponent = TBaseComponent> extends NamiElementBase {
|
|
22
|
+
static styles: CSSResultGroup;
|
|
16
23
|
contextConsumer: ContextConsumer;
|
|
17
24
|
contextProvider: PaywallContextProvider;
|
|
18
25
|
abstract component: C;
|
|
19
|
-
createRenderRoot(): HTMLElement | DocumentFragment;
|
|
20
|
-
protected willUpdate(_changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void;
|
|
21
26
|
protected animationStyles(): CSSResult;
|
|
27
|
+
protected getInstanceStyles(): CSSResult[];
|
|
22
28
|
}
|
|
@@ -8,7 +8,12 @@ export declare class NamiContainer extends NamiElement {
|
|
|
8
8
|
inFocusedState: boolean;
|
|
9
9
|
scaleFactor: number;
|
|
10
10
|
minSDKVersion: TSemverObj;
|
|
11
|
+
private readonly handleFocusIn;
|
|
12
|
+
private readonly handleFocusOut;
|
|
13
|
+
private readonly handleFocusChanged;
|
|
11
14
|
constructor();
|
|
15
|
+
disconnectedCallback(): void;
|
|
12
16
|
protected styles(): CSSResult;
|
|
13
17
|
render(): any[];
|
|
18
|
+
private setFocusState;
|
|
14
19
|
}
|
|
@@ -8,5 +8,5 @@ export declare class NamiQRCode extends NamiElement {
|
|
|
8
8
|
firstUpdated(): void;
|
|
9
9
|
protected updated(changedProps: Map<string, unknown>): void;
|
|
10
10
|
private get computedSize();
|
|
11
|
-
render(): import("lit
|
|
11
|
+
render(): import("lit").TemplateResult<1>;
|
|
12
12
|
}
|
|
@@ -12,5 +12,5 @@ export declare class NamiSegmentPickerItem extends NamiElement {
|
|
|
12
12
|
private _handleHover;
|
|
13
13
|
updated(changedProperties: PropertyValues): void;
|
|
14
14
|
protected styles(): CSSResult;
|
|
15
|
-
render(): import("lit
|
|
15
|
+
render(): import("lit").TemplateResult<1>;
|
|
16
16
|
}
|