@namiml/web-sdk 1.7.3 → 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 +23 -0
- package/dist/components/ContextProvider.d.ts +2 -1
- package/dist/components/NamiElement.d.ts +9 -3
- package/dist/components/containers/Container.d.ts +5 -0
- package/dist/components/utils/styles.d.ts +2 -0
- 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 +62 -59
- package/dist/nami-web.d.ts +2 -0
- package/dist/nami-web.mjs +62 -59
- package/dist/nami-web.umd.js +25 -22
- package/dist/polyfills.cjs +26907 -0
- package/dist/polyfills.d.ts +6 -0
- package/dist/polyfills.js +26905 -0
- 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/simple-event-target.d.ts +7 -0
- package/package.json +33 -2
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
|
@@ -32,3 +32,26 @@ yarn add @namiml/web-sdk
|
|
|
32
32
|
Example apps showing how to use the SDK are available in our [Nami Web SDK repo](https://github.com/namiml/nami-web-sdk).
|
|
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
|
+
|
|
36
|
+
## Legacy support
|
|
37
|
+
|
|
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
|
+
|
|
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
|
+
```
|
|
50
|
+
|
|
51
|
+
Modern apps that do not target legacy environments can simply import the default entry:
|
|
52
|
+
|
|
53
|
+
```js
|
|
54
|
+
import { Nami } from '@namiml/web-sdk';
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
This keeps the modern bundle slim, while letting you opt into additional support only when you need it.
|
|
@@ -7,8 +7,9 @@ import { TDevice } from '../types/device';
|
|
|
7
7
|
import { Callback } from '../types/components/containers';
|
|
8
8
|
import type { NamiFlow } from '../nami/flow/NamiFlow';
|
|
9
9
|
import { NamiPaywallEvent, NamiPaywallLaunchContext } from '../types/externals/paywall';
|
|
10
|
+
import { SimpleEventTarget } from '../utils/simple-event-target';
|
|
10
11
|
export declare const initialState: TPaywallContext;
|
|
11
|
-
export declare class PaywallContextProvider extends
|
|
12
|
+
export declare class PaywallContextProvider extends SimpleEventTarget implements ReactiveController {
|
|
12
13
|
static providers: PaywallContextProvider[];
|
|
13
14
|
host: ReactiveControllerHost | null;
|
|
14
15
|
state: TPaywallContext;
|
|
@@ -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
|
}
|
|
@@ -4,6 +4,8 @@ import type { TSegmentPickerItem, TTextLikeComponent } from "../../types/compone
|
|
|
4
4
|
import type { TSemverObj } from "../../utils/parsers";
|
|
5
5
|
export declare function parseSize(value: string | number, scaleFactor: number): string;
|
|
6
6
|
export declare function backgroundColor(value: string, fallback?: string): string;
|
|
7
|
+
export declare function filteredBorderColor(value: string, fallback?: string): string;
|
|
8
|
+
export declare function filteredTextColor(value: string, fallback?: string): string;
|
|
7
9
|
export declare function pickAndApplyBackgroundColor(component: TBaseComponent, inFocusedState?: boolean): string;
|
|
8
10
|
export declare function flexDirection({ direction }: TBaseComponent): string;
|
|
9
11
|
export declare function alignAndJustifyItems(component: TBaseComponent): string;
|