@namiml/web-sdk 1.7.7-beta.1 → 1.7.8
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 +28 -0
- package/dist/components/ContextProvider.d.ts +10 -1
- package/dist/components/elements/Button.d.ts +1 -0
- package/dist/components/elements/CountdownTimerText.d.ts +52 -0
- package/dist/components/elements/PlayPauseButton.d.ts +1 -0
- package/dist/components/elements/ProgressBar.d.ts +31 -0
- package/dist/components/elements/SegmentPickerItem.d.ts +7 -1
- package/dist/components/elements/ToggleButton.d.ts +2 -0
- package/dist/components/elements/VolumeButton.d.ts +1 -0
- package/dist/components/index.d.ts +5 -1
- package/dist/components/productDetails.d.ts +1 -0
- package/dist/components/utils/styles.d.ts +3 -2
- package/dist/nami/flow/NamiFlow.d.ts +5 -1
- package/dist/nami/flow/NamiFlowManager.d.ts +7 -0
- package/dist/nami-web.cjs +48 -18
- package/dist/nami-web.mjs +48 -18
- package/dist/nami-web.umd.js +53 -23
- package/dist/types/components/elements.d.ts +56 -0
- package/dist/types/components/index.d.ts +2 -2
- package/dist/types/conditions.d.ts +2 -0
- package/dist/types/externals/paywall.d.ts +2 -0
- package/dist/types/flow.d.ts +2 -0
- package/dist/types/paywall.d.ts +8 -0
- package/dist/utils/const.d.ts +1 -1
- package/dist/utils/vizio-tts.d.ts +2 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# Nami Web SDK Changelog
|
|
2
2
|
|
|
3
|
+
## 1.7.8
|
|
4
|
+
**Release Date:** February 17, 2026
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
- Fix rendering of components with 0 height or width
|
|
8
|
+
- Fix CTV button focus display
|
|
9
|
+
- Clear uninterpolated Smart Text variables
|
|
10
|
+
- Make sure background image is fullscreen when scrolling
|
|
11
|
+
|
|
12
|
+
### New Features
|
|
13
|
+
- Support Segment Picker form component
|
|
14
|
+
- Support Countdown Timer component
|
|
15
|
+
- Support Progress Bar component
|
|
16
|
+
- Support new flow function setTags
|
|
17
|
+
- Support listening for user tag updates in Flow
|
|
18
|
+
|
|
19
|
+
### Enhancements
|
|
20
|
+
- Allow branching in flows based on set/notSet operators
|
|
21
|
+
- Support TTS on Vizio devices
|
|
22
|
+
- Support active and inactive drop shadow styling on segment picker
|
|
23
|
+
- Support paywall conditions based on product subscription duration
|
|
24
|
+
|
|
25
|
+
## 1.7.7
|
|
26
|
+
**Release Date:** December 17, 2025
|
|
27
|
+
|
|
28
|
+
### Bug Fixes
|
|
29
|
+
- Ensure page-changed event escapes shadow DOM when CustomEvent polyfill is present
|
|
30
|
+
|
|
3
31
|
## 1.7.6
|
|
4
32
|
|
|
5
33
|
**Release Date:** December 16, 2025
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactiveController, ReactiveControllerHost } from 'lit';
|
|
2
|
-
import { IPaywall, ISkuMenu, NamiAppSuppliedVideoDetails, TPaywallContext, TPaywallMedia } from '../types/paywall';
|
|
2
|
+
import { IPaywall, ISkuMenu, NamiAppSuppliedVideoDetails, TimerState, TPaywallContext, TPaywallMedia } from '../types/paywall';
|
|
3
3
|
import { NamiProductDetails } from '../types/externals/product';
|
|
4
4
|
import { NamiSKU } from '../types/externals/sku';
|
|
5
5
|
import { NamiCampaign } from '../types/externals/campaign';
|
|
@@ -27,6 +27,9 @@ export declare class PaywallContextProvider extends SimpleEventTarget implements
|
|
|
27
27
|
static setAppSuppliedVideoDetails(details: NamiAppSuppliedVideoDetails): void;
|
|
28
28
|
static getSelectedPaywall(): IPaywall | undefined;
|
|
29
29
|
static setUserInteractionEnabled(enabled: boolean): void;
|
|
30
|
+
static setUserTags(tags: {
|
|
31
|
+
[key: string]: string;
|
|
32
|
+
}): void;
|
|
30
33
|
static setProductDetails(details: NamiProductDetails[]): void;
|
|
31
34
|
static setPurchaseInProgress(inProgress: boolean): void;
|
|
32
35
|
static setIsLoggedIn(isLoggedIn: boolean): void;
|
|
@@ -44,6 +47,9 @@ export declare class PaywallContextProvider extends SimpleEventTarget implements
|
|
|
44
47
|
setProductDetails(details: NamiProductDetails[]): void;
|
|
45
48
|
getProductDetails(): NamiProductDetails[];
|
|
46
49
|
setCurrentGroupData(currentGroupId: string, currentGroupName: string): void;
|
|
50
|
+
setFormState(formId: string, state: boolean | string): void;
|
|
51
|
+
setTimerState(timerId: string, remainingSeconds: number, savedAt: number, hasEmittedCompletion: boolean): void;
|
|
52
|
+
getTimerState(timerId: string): TimerState | undefined;
|
|
47
53
|
getCurrentGroupId(): string;
|
|
48
54
|
getCurrentGroupName(): string;
|
|
49
55
|
setCurrentFormId(formId: string, value?: string): void;
|
|
@@ -83,5 +89,8 @@ export declare class PaywallContextProvider extends SimpleEventTarget implements
|
|
|
83
89
|
getCurrentCollapsibleSku(): NamiSKU;
|
|
84
90
|
setFlow(flow: NamiFlow): void;
|
|
85
91
|
setUserInteractionEnabled(enabled: boolean): void;
|
|
92
|
+
setUserTags(tags: {
|
|
93
|
+
[key: string]: string;
|
|
94
|
+
}): void;
|
|
86
95
|
setCurrentSlideIndex(index: number): void;
|
|
87
96
|
}
|
|
@@ -13,6 +13,7 @@ export declare class NamiButton extends NamiElement {
|
|
|
13
13
|
disconnectedCallback(): void;
|
|
14
14
|
protected updated(changedProperties: PropertyValueMap<this>): void;
|
|
15
15
|
private _handleFocus;
|
|
16
|
+
private _announceButtonLabel;
|
|
16
17
|
private _handleBlur;
|
|
17
18
|
private _dispatchFocusChange;
|
|
18
19
|
private _dispatchPageChange;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { CSSResult, PropertyValues } from 'lit';
|
|
2
|
+
import { NamiElement } from '../NamiElement';
|
|
3
|
+
import type { TSemverObj } from '../../utils/parsers';
|
|
4
|
+
import { TCountdownTimerTextComponent } from '../../types/components/elements';
|
|
5
|
+
export declare class NamiCountdownTimerText extends NamiElement {
|
|
6
|
+
component: TCountdownTimerTextComponent;
|
|
7
|
+
inFocusedState: boolean;
|
|
8
|
+
scaleFactor: number;
|
|
9
|
+
minSDKVersion: TSemverObj;
|
|
10
|
+
private timer;
|
|
11
|
+
private startTime;
|
|
12
|
+
private initialDuration;
|
|
13
|
+
private hasEmittedCompletion;
|
|
14
|
+
private timerState;
|
|
15
|
+
private static readonly DEFAULT_LABELS;
|
|
16
|
+
private static readonly DEFAULT_UNITS;
|
|
17
|
+
private static readonly SECONDS_PER_DAY;
|
|
18
|
+
private static readonly SECONDS_PER_HOUR;
|
|
19
|
+
private static readonly SECONDS_PER_MINUTE;
|
|
20
|
+
private static readonly TIMER_INTERVAL_MS;
|
|
21
|
+
protected firstUpdated(): void;
|
|
22
|
+
disconnectedCallback(): void;
|
|
23
|
+
private getTimerId;
|
|
24
|
+
private loadTimerState;
|
|
25
|
+
private saveTimerState;
|
|
26
|
+
private getSavedTimerState;
|
|
27
|
+
private startTimer;
|
|
28
|
+
private initializeTimerState;
|
|
29
|
+
private restoreTimerFromState;
|
|
30
|
+
private resetTimerState;
|
|
31
|
+
private onTimerTick;
|
|
32
|
+
private clearTimer;
|
|
33
|
+
private calculateTimeValues;
|
|
34
|
+
private calculateTotalRemainingSeconds;
|
|
35
|
+
private calculateDurationRemainingSeconds;
|
|
36
|
+
private calculateTargetDateTimeRemainingSeconds;
|
|
37
|
+
private calculateCurrentRemainingSeconds;
|
|
38
|
+
private convertSecondsToTimeUnits;
|
|
39
|
+
private formatValue;
|
|
40
|
+
private emitCompletionEvent;
|
|
41
|
+
updated(changedProperties: PropertyValues): void;
|
|
42
|
+
private updateAccessibilityAttributes;
|
|
43
|
+
private handleComponentChange;
|
|
44
|
+
protected styles(): CSSResult;
|
|
45
|
+
render(): import("lit").TemplateResult<1>;
|
|
46
|
+
private buildUnitsToRender;
|
|
47
|
+
private normalizeLabelPosition;
|
|
48
|
+
private shouldDisplayLabels;
|
|
49
|
+
private getLabel;
|
|
50
|
+
private renderTimerUnits;
|
|
51
|
+
private renderUnit;
|
|
52
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { CSSResult, TemplateResult } from 'lit';
|
|
2
|
+
import { NamiElement } from '../NamiElement';
|
|
3
|
+
import { TProgressBarComponent } from '../../types/components/elements';
|
|
4
|
+
import { TSemverObj } from '../../utils/parsers';
|
|
5
|
+
export declare class NamiProgressBar extends NamiElement {
|
|
6
|
+
component: TProgressBarComponent;
|
|
7
|
+
scaleFactor: number;
|
|
8
|
+
inFocusedState: boolean;
|
|
9
|
+
minSDKVersion: TSemverObj;
|
|
10
|
+
private currentProgress;
|
|
11
|
+
private isAnimating;
|
|
12
|
+
private screenreaderAnnouncement;
|
|
13
|
+
private hasInitialized;
|
|
14
|
+
private delayTimeoutId;
|
|
15
|
+
private animationFrameId;
|
|
16
|
+
private animationStartTime;
|
|
17
|
+
private startPercentage;
|
|
18
|
+
connectedCallback(): void;
|
|
19
|
+
disconnectedCallback(): void;
|
|
20
|
+
firstUpdated(changedProperties: any): void;
|
|
21
|
+
updated(changedProperties: any): void;
|
|
22
|
+
private cleanup;
|
|
23
|
+
private getResolvedDuration;
|
|
24
|
+
private startAnimation;
|
|
25
|
+
private beginAnimation;
|
|
26
|
+
private animateDeterminate;
|
|
27
|
+
private getActiveWidthCss;
|
|
28
|
+
private isActiveWidthPercent;
|
|
29
|
+
protected styles(): CSSResult;
|
|
30
|
+
render(): TemplateResult;
|
|
31
|
+
}
|
|
@@ -6,8 +6,14 @@ export declare class NamiSegmentPickerItem extends NamiElement {
|
|
|
6
6
|
inFocusedState: boolean;
|
|
7
7
|
scaleFactor: number;
|
|
8
8
|
private _isActive;
|
|
9
|
-
|
|
9
|
+
connectedCallback(): void;
|
|
10
|
+
disconnectedCallback(): void;
|
|
11
|
+
private _handleFocus;
|
|
12
|
+
private _announceButtonLabel;
|
|
10
13
|
private _handleKeyDown;
|
|
14
|
+
private _getParentPicker;
|
|
15
|
+
private _getParentFormId;
|
|
16
|
+
private _updateFormState;
|
|
11
17
|
private _handleClick;
|
|
12
18
|
private _handleHover;
|
|
13
19
|
updated(changedProperties: PropertyValues): void;
|
|
@@ -10,6 +10,8 @@ export declare class NamiToggleButton extends NamiElement {
|
|
|
10
10
|
isActive: boolean;
|
|
11
11
|
connectedCallback(): void;
|
|
12
12
|
disconnectedCallback(): void;
|
|
13
|
+
private _handleFocus;
|
|
14
|
+
private _announceButtonLabel;
|
|
13
15
|
private _handleKeyDown;
|
|
14
16
|
private _handleClick;
|
|
15
17
|
updated(): void;
|
|
@@ -23,6 +23,8 @@ import { NamiToggleSwitch } from "./elements/ToggleSwitch";
|
|
|
23
23
|
import { NamiRadioButton } from "./elements/RadioButton";
|
|
24
24
|
import { NamiProgressIndicator } from "./elements/ProgressIndicator";
|
|
25
25
|
import { NamiToggleButton } from "./elements/ToggleButton";
|
|
26
|
+
import { NamiCountdownTimerText } from "./elements/CountdownTimerText";
|
|
27
|
+
import { NamiProgressBar } from "./elements/ProgressBar";
|
|
26
28
|
declare global {
|
|
27
29
|
interface HTMLElementTagNameMap {
|
|
28
30
|
"nami-spacer": NamiSpacer;
|
|
@@ -51,6 +53,8 @@ declare global {
|
|
|
51
53
|
"nami-radio-button": NamiRadioButton;
|
|
52
54
|
"nami-progress-indicator": NamiProgressIndicator;
|
|
53
55
|
"nami-toggle-button": NamiToggleButton;
|
|
56
|
+
"nami-countdown-timer-text": NamiCountdownTimerText;
|
|
57
|
+
"nami-progress-bar": NamiProgressBar;
|
|
54
58
|
}
|
|
55
59
|
}
|
|
56
|
-
export { NamiSpacer, NamiButton, NamiHeader, NamiFooter, NamiText, NamiSegmentPicker, NamiSegmentPickerItem, NamiContainer, NamiProductContainer, NamiImage, NamiBackgroundContainer, NamiContentContainer, NamiSymbol, NamiVideo, NamiCollapseContainer, NamiResponsiveGrid, NamiCarouselContainer, NamiPlayPauseButton, NamiVolumeButton, NamiStack, NamiPaywallScreen, NamiQRCode, NamiToggleSwitch, NamiRadioButton, NamiProgressIndicator, NamiToggleButton, };
|
|
60
|
+
export { NamiSpacer, NamiButton, NamiHeader, NamiFooter, NamiText, NamiSegmentPicker, NamiSegmentPickerItem, NamiContainer, NamiProductContainer, NamiImage, NamiBackgroundContainer, NamiContentContainer, NamiSymbol, NamiVideo, NamiCollapseContainer, NamiResponsiveGrid, NamiCarouselContainer, NamiPlayPauseButton, NamiVolumeButton, NamiStack, NamiPaywallScreen, NamiQRCode, NamiToggleSwitch, NamiRadioButton, NamiProgressIndicator, NamiProgressBar, NamiToggleButton, NamiCountdownTimerText, };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { NamiProductDetails } from "../types/externals/product";
|
|
2
2
|
import { PaywallSKU } from "../types/sku";
|
|
3
|
+
export declare const getSkuProductDetailKeys: () => string[];
|
|
3
4
|
export declare const getProductDetail: (variableName: string, product?: NamiProductDetails | null, referenceId?: string, skus?: PaywallSKU[]) => unknown;
|
|
@@ -23,9 +23,9 @@ export declare function alignItems({ alignment, verticalAlignment }: TBaseCompon
|
|
|
23
23
|
export declare function justifyContent({ alignment, horizontalAlignment }: TBaseComponent): string;
|
|
24
24
|
export declare function widthAndHeight(component: TBaseComponent, scaleFactor: number): string;
|
|
25
25
|
export declare function zIndex({ zIndex }: TBaseComponent): string;
|
|
26
|
-
export declare function dropShadow(dropShadow?: string): string;
|
|
26
|
+
export declare function dropShadow(dropShadow?: string, isText?: boolean): string;
|
|
27
27
|
export declare function textStrikethrough(value: boolean | undefined): string;
|
|
28
|
-
export declare function
|
|
28
|
+
export declare function fontFamily(fontName?: string): string;
|
|
29
29
|
export declare function applyStyles(component: TBaseComponent, scaleFactor: number, inFocusedState?: boolean): string;
|
|
30
30
|
export declare function applyGridStyles(component: TBaseComponent, inFocusedState?: boolean, scaleFactor?: number): string;
|
|
31
31
|
export declare function parsePosition(position?: TContainerPosition): string;
|
|
@@ -33,3 +33,4 @@ export declare function getComponentStyles(prefix: string, component: TComponent
|
|
|
33
33
|
export declare function formatKey(key: string, prefix: string): string;
|
|
34
34
|
export declare function applySegmentStyles(styles: any, scaleFactor: number, inFocusedState: boolean): string;
|
|
35
35
|
export declare function applySegmentFontStyles(styles: any, scaleFactor: number): string;
|
|
36
|
+
export declare function focusVisibleStyles(component: TBaseComponent): string;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { NamiFlowObjectDTO, NamiFlowOn, NamiFlowStep, NamiFlowTransition } from "../../types/flow";
|
|
2
2
|
import type { NamiCampaign, NamiFlowCampaign } from '../../types/externals/campaign';
|
|
3
3
|
import type { NamiPaywallLaunchContext } from '../../types/externals/paywall';
|
|
4
4
|
import type { PaywallComponent } from "../../components/Paywall";
|
|
5
5
|
import type { NamiFlowManager } from "./NamiFlowManager";
|
|
6
6
|
import type { NamiButton } from "../../components";
|
|
7
|
+
import { TimerState } from "../../types/paywall";
|
|
7
8
|
export declare class BasicNamiFlow implements NamiFlowObjectDTO {
|
|
8
9
|
id: string;
|
|
9
10
|
name: string;
|
|
@@ -31,6 +32,9 @@ export declare class NamiFlow extends BasicNamiFlow {
|
|
|
31
32
|
currentButton?: NamiButton;
|
|
32
33
|
isPaused: boolean;
|
|
33
34
|
pausedStepID?: string;
|
|
35
|
+
timerStates: {
|
|
36
|
+
[timerId: string]: TimerState;
|
|
37
|
+
};
|
|
34
38
|
constructor(campaign: NamiFlowCampaign, paywall: PaywallComponent, manager: NamiFlowManager, context?: NamiPaywallLaunchContext);
|
|
35
39
|
private registerResolvers;
|
|
36
40
|
get currentFlowStep(): NamiFlowStep | undefined;
|
|
@@ -66,4 +66,11 @@ export declare class NamiFlowManager {
|
|
|
66
66
|
static getLastAnimatedFlowProgress(key: string): number;
|
|
67
67
|
static setLastAnimatedFlowProgress(key: string, value: number): void;
|
|
68
68
|
static getCurrentFlowProgress(key?: string): number;
|
|
69
|
+
/**
|
|
70
|
+
* Gets the current flow step's auto-advance delay (in seconds)
|
|
71
|
+
* Parses __appear__ actions to find flowNav/flowNext with a delay parameter
|
|
72
|
+
* @returns Delay in seconds, or null if not auto-advancing
|
|
73
|
+
*/
|
|
74
|
+
getCurrentFlowStepAutoAdvanceDelay(): number | null;
|
|
75
|
+
static getCurrentFlowStepAutoAdvanceDelay(): number | null;
|
|
69
76
|
}
|