noboarding 1.0.3-beta → 1.0.6-beta
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/ANIMATIONS.md +446 -0
- package/README.md +356 -323
- package/lib/OnboardingFlow.js +21 -4
- package/lib/animationUtils.d.ts +19 -0
- package/lib/animationUtils.js +252 -0
- package/lib/components/ElementRenderer.d.ts +5 -0
- package/lib/components/ElementRenderer.js +196 -36
- package/lib/types.d.ts +46 -0
- package/package.json +1 -1
- package/src/OnboardingFlow.tsx +19 -0
- package/src/animationUtils.ts +292 -0
- package/src/components/ElementRenderer.tsx +233 -18
- package/src/types.ts +51 -0
package/src/types.ts
CHANGED
|
@@ -14,6 +14,8 @@ export interface ScreenConfig {
|
|
|
14
14
|
custom_component_name?: string;
|
|
15
15
|
// Dashboard visibility control — if true, screen is hidden from onboarding flow
|
|
16
16
|
hidden?: boolean;
|
|
17
|
+
// Screen transition animation (OTA updateable)
|
|
18
|
+
transition?: ScreenTransition;
|
|
17
19
|
}
|
|
18
20
|
|
|
19
21
|
// ─── Element Tree Types (matches dashboard primitives) ───
|
|
@@ -45,6 +47,54 @@ export interface ElementNode {
|
|
|
45
47
|
actions?: ElementAction[]; // multi-action support (runs all in sequence)
|
|
46
48
|
visibleWhen?: { group: string; hasSelection: boolean };
|
|
47
49
|
conditions?: ElementConditions; // variable-based show/hide
|
|
50
|
+
// Animation configurations (OTA updateable)
|
|
51
|
+
entrance?: EntranceAnimation;
|
|
52
|
+
interactive?: InteractiveAnimation;
|
|
53
|
+
textAnimation?: TextAnimation;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// ─── Animation Types (OTA Updateable) ───
|
|
57
|
+
|
|
58
|
+
export type EntranceAnimationType = 'fadeIn' | 'slideUp' | 'slideDown' | 'slideLeft' | 'slideRight' | 'scaleIn' | 'none';
|
|
59
|
+
export type InteractiveAnimationType = 'scale' | 'pulse' | 'shake' | 'bounce' | 'none';
|
|
60
|
+
export type HapticType = 'light' | 'medium' | 'heavy' | 'success' | 'warning' | 'error';
|
|
61
|
+
export type HapticFrequency = 'every' | 'every-2' | 'every-3' | 'every-5';
|
|
62
|
+
|
|
63
|
+
export interface EntranceAnimation {
|
|
64
|
+
type: EntranceAnimationType;
|
|
65
|
+
duration?: number; // milliseconds (default: 400)
|
|
66
|
+
delay?: number; // delay before starting (default: 0)
|
|
67
|
+
stagger?: number; // for lists: delay between each child (default: 0)
|
|
68
|
+
easing?: 'linear' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'spring';
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export interface InteractiveAnimation {
|
|
72
|
+
type: InteractiveAnimationType;
|
|
73
|
+
trigger?: 'tap' | 'load'; // when to trigger (default: 'tap')
|
|
74
|
+
duration?: number; // milliseconds (default: 200)
|
|
75
|
+
intensity?: number; // scale/shake intensity 0-1 (default: 0.95 for scale, 10 for shake)
|
|
76
|
+
repeat?: boolean; // repeat continuously (default: false)
|
|
77
|
+
haptic?: boolean; // trigger haptic on animation (default: false)
|
|
78
|
+
hapticType?: HapticType; // type of haptic feedback
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export interface TextAnimation {
|
|
82
|
+
type: 'typewriter' | 'none';
|
|
83
|
+
speed?: number; // characters per second (default: 20)
|
|
84
|
+
delay?: number; // delay before starting (default: 0)
|
|
85
|
+
cursor?: boolean; // show blinking cursor (default: false)
|
|
86
|
+
haptic?: {
|
|
87
|
+
enabled: boolean;
|
|
88
|
+
type: HapticType;
|
|
89
|
+
frequency: HapticFrequency;
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export interface ScreenTransition {
|
|
94
|
+
type: 'push' | 'modal' | 'fade' | 'slide' | 'none';
|
|
95
|
+
direction?: 'left' | 'right' | 'up' | 'down';
|
|
96
|
+
duration?: number; // milliseconds (default: 300)
|
|
97
|
+
easing?: 'linear' | 'ease-in-out' | 'spring';
|
|
48
98
|
}
|
|
49
99
|
|
|
50
100
|
// ─── Condition & Variable Types ───
|
|
@@ -160,6 +210,7 @@ export interface ElementStyle {
|
|
|
160
210
|
export interface OnboardingConfig {
|
|
161
211
|
version: string;
|
|
162
212
|
screens: ScreenConfig[];
|
|
213
|
+
assets?: Array<{ name: string; type: string; data: string }>;
|
|
163
214
|
}
|
|
164
215
|
|
|
165
216
|
// Experiment/A/B test variant
|