@namiml/web-sdk 1.7.0 → 1.7.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.
- package/CHANGELOG.md +10 -0
- package/dist/components/NamiElement.d.ts +10 -1
- package/dist/components/containers/Footer.d.ts +2 -2
- package/dist/components/containers/Header.d.ts +2 -2
- package/dist/components/styles/animations.d.ts +2 -0
- package/dist/nami/flow/NamiFlow.d.ts +4 -0
- package/dist/nami/flow/NamiFlowManager.d.ts +3 -1
- package/dist/nami-web.cjs +90 -18
- package/dist/nami-web.mjs +90 -18
- package/dist/nami-web.umd.js +91 -19
- package/dist/types/components/animation.d.ts +40 -0
- package/dist/types/components/index.d.ts +2 -0
- package/dist/types/externals/flow.d.ts +6 -0
- package/dist/types/flow.d.ts +3 -1
- package/dist/utils/animations.d.ts +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export declare const NamiAnimationType: {
|
|
2
|
+
readonly Wave: "wave";
|
|
3
|
+
readonly Pulse: "pulse";
|
|
4
|
+
readonly None: "none";
|
|
5
|
+
};
|
|
6
|
+
export type NamiAnimationType = typeof NamiAnimationType[keyof typeof NamiAnimationType];
|
|
7
|
+
export type PulseSpec = typeof NamiAnimationType.Pulse | {
|
|
8
|
+
type: typeof NamiAnimationType.Pulse;
|
|
9
|
+
duration?: number;
|
|
10
|
+
scale?: number;
|
|
11
|
+
};
|
|
12
|
+
export type WaveSpec = typeof NamiAnimationType.Wave | {
|
|
13
|
+
type: typeof NamiAnimationType.Wave;
|
|
14
|
+
duration?: number;
|
|
15
|
+
delay?: number;
|
|
16
|
+
circle1Color?: string;
|
|
17
|
+
circle2Color?: string;
|
|
18
|
+
lineWidth?: number;
|
|
19
|
+
};
|
|
20
|
+
export type NoneSpec = typeof NamiAnimationType.None | {
|
|
21
|
+
type: typeof NamiAnimationType.None;
|
|
22
|
+
};
|
|
23
|
+
export type NamiAnimationSpec = WaveSpec | PulseSpec | NoneSpec;
|
|
24
|
+
export type NamiAnimationObjectSpec = Extract<WaveSpec, {
|
|
25
|
+
type: typeof NamiAnimationType.Wave;
|
|
26
|
+
}> | Extract<PulseSpec, {
|
|
27
|
+
type: typeof NamiAnimationType.Pulse;
|
|
28
|
+
}> | Extract<NoneSpec, {
|
|
29
|
+
type: typeof NamiAnimationType.None;
|
|
30
|
+
}>;
|
|
31
|
+
export type Wave = Required<Extract<WaveSpec, {
|
|
32
|
+
type: typeof NamiAnimationType.Wave;
|
|
33
|
+
}>>;
|
|
34
|
+
export type Pulse = Required<Extract<PulseSpec, {
|
|
35
|
+
type: typeof NamiAnimationType.Pulse;
|
|
36
|
+
}>>;
|
|
37
|
+
export type None = Required<Extract<NoneSpec, {
|
|
38
|
+
type: typeof NamiAnimationType.None;
|
|
39
|
+
}>>;
|
|
40
|
+
export type NamiAnimation = Wave | Pulse | None;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { NamiAnimationSpec } from "./animation";
|
|
1
2
|
import { TButtonContainer, TCarouselContainer, TCarouselSlide, TCollapseContainer, TFlexProductContainer, TPlayPauseButton, TProductContainer, TRadioButton, TResponsiveGrid, TStack, TToggleSwitch, TVolumeButton, UserAction } from "./containers";
|
|
2
3
|
import { TConditionalComponent, TImageComponent, TQRCodeComponent, TSegmentPicker, TSegmentPickerItem, TSpacerComponent, TSvgImageComponent, TSymbolComponent, TTextComponent, TTextListComponent, TVideoComponent } from "./elements";
|
|
3
4
|
export interface TBaseComponent {
|
|
@@ -68,6 +69,7 @@ export interface TBaseComponent {
|
|
|
68
69
|
fixedHeight?: number;
|
|
69
70
|
fixedWidth?: number | "fitContent";
|
|
70
71
|
hidden?: boolean;
|
|
72
|
+
animation?: NamiAnimationSpec;
|
|
71
73
|
}
|
|
72
74
|
export type TComponent = TButtonContainer | TContainer | TTextListComponent | TTextComponent | TSpacerComponent | TImageComponent | TSvgImageComponent | TSymbolComponent | TCarouselContainer | TProductContainer | TFlexProductContainer | TStack | TConditionalComponent | TSegmentPicker | TSegmentPickerItem | TVideoComponent | TCollapseContainer | TResponsiveGrid | TVolumeButton | TPlayPauseButton | TQRCodeComponent | TToggleSwitch | TRadioButton;
|
|
73
75
|
export type DirectionType = "vertical" | "horizontal";
|
|
@@ -36,6 +36,12 @@ export declare const NamiFlowManager: {
|
|
|
36
36
|
* This can be used to end the flow at any point, typically after a handoff or custom logic.
|
|
37
37
|
*/
|
|
38
38
|
finish: any;
|
|
39
|
+
/**
|
|
40
|
+
* Pauses the current flow.
|
|
41
|
+
*
|
|
42
|
+
* This can be used to temporarily halt the flow, typically in response to user input or other events.
|
|
43
|
+
*/
|
|
44
|
+
pause: any;
|
|
39
45
|
/**
|
|
40
46
|
* Checks if a flow is currently open.
|
|
41
47
|
*
|
package/dist/types/flow.d.ts
CHANGED
|
@@ -22,7 +22,9 @@ export declare enum NamiFlowActionFunction {
|
|
|
22
22
|
FLOW_EVENT = "flowEvent",
|
|
23
23
|
BLOCK_BACK = "blockBackToStep",
|
|
24
24
|
FLOW_ENABLED = "flowInteractionEnabled",
|
|
25
|
-
FLOW_DISABLED = "flowInteractionDisabled"
|
|
25
|
+
FLOW_DISABLED = "flowInteractionDisabled",
|
|
26
|
+
PAUSE = "flowPause",
|
|
27
|
+
RESUME = "flowResume"
|
|
26
28
|
}
|
|
27
29
|
export type NamiFlowHandoffStepHandler = (handoffTag: string, handoffData?: Record<string, any>) => void;
|
|
28
30
|
export type NamiFlowEventHandler = (eventHandler: Record<string, any>) => void;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@namiml/web-sdk",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.7.
|
|
4
|
+
"version": "1.7.1",
|
|
5
5
|
"source": "src/nami-web.ts",
|
|
6
6
|
"description": "Nami Web SDK makes subscriptions & in-app purchases easy, with powerful built-in paywalls and A/B testing",
|
|
7
7
|
"scripts": {
|