@codefluss/lottie 0.0.1-alpha.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/README.md ADDED
@@ -0,0 +1,66 @@
1
+ # @codefluss/lottie
2
+
3
+ Lottie animation plugin for interactive animations.
4
+
5
+ ## Features
6
+
7
+ - Lottie JSON animation playback
8
+ - Multiple play modes: loop, once, bounce
9
+ - Speed control
10
+ - Play/pause on hover or click
11
+ - Segment playback
12
+ - Design system integration
13
+ - SSR compatible with client-side hydration
14
+
15
+ ## Installation
16
+
17
+ ```bash
18
+ pnpm add @codefluss/lottie
19
+ ```
20
+
21
+ ## Usage
22
+
23
+ ### Editor Mode
24
+
25
+ ```tsx
26
+ import { LottieComponent } from '@codefluss/lottie';
27
+
28
+ <LottieComponent
29
+ data={lottieData}
30
+ language='en'
31
+ isSelected={false}
32
+ isEditorMode={true}
33
+ dependencies={{ designSystem, utils }}
34
+ />;
35
+ ```
36
+
37
+ ### SSR Mode
38
+
39
+ ```tsx
40
+ import { LottieRenderer } from '@codefluss/lottie/renderer';
41
+
42
+ <LottieRenderer
43
+ elementId='lottie-1'
44
+ data={lottieData}
45
+ language='en'
46
+ dependencies={{ designSystem, utils }}
47
+ />;
48
+ ```
49
+
50
+ ## Properties
51
+
52
+ | Property | Type | Description |
53
+ | ------------------------ | ------------------ | --------------------------------- |
54
+ | `animationData` | `object` | Lottie JSON animation data |
55
+ | `src` | `string` | URL to Lottie JSON file |
56
+ | `loop` | `boolean` | Enable loop playback |
57
+ | `autoplay` | `boolean` | Start playing on load |
58
+ | `speed` | `number` | Playback speed multiplier |
59
+ | `direction` | `1 \| -1` | Playback direction |
60
+ | `playOnHover` | `boolean` | Play animation on hover |
61
+ | `segment` | `[number, number]` | Frame range to play |
62
+ | `layout.spacingPresetId` | `string` | Spacing preset from design system |
63
+
64
+ ## License
65
+
66
+ MIT
@@ -0,0 +1,4 @@
1
+ export { default as LottieComponent } from './lottie-component';
2
+ export { lottieConfig, defaultLottieData } from './lottie-config';
3
+ export type { LottieData, LottieComponentProps } from './lottie-config';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAClE,YAAY,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,3 @@
1
+ export { default as LottieComponent } from './lottie-component';
2
+ export { lottieConfig, defaultLottieData } from './lottie-config';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function cn(...inputs: (string | undefined | null | false)[]): string;
2
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"AACA,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,KAAK,CAAC,EAAE,GAAG,MAAM,CAE3E"}
@@ -0,0 +1,5 @@
1
+ // Simple className utility function
2
+ export function cn(...inputs) {
3
+ return inputs.filter(Boolean).join(' ');
4
+ }
5
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,MAAM,UAAU,EAAE,CAAC,GAAG,MAA6C;IACjE,OAAO,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC1C,CAAC"}
@@ -0,0 +1,129 @@
1
+ {
2
+ "plugin": {
3
+ "name": "Lottie Animation",
4
+ "description": "Interaktive Lottie Animation mit Datei-Upload und Maus-Interaktionen"
5
+ },
6
+ "properties": {
7
+ "src": {
8
+ "label": "Animationsdatei",
9
+ "placeholder": "Lottie JSON Datei hochladen",
10
+ "description": "Wählen Sie eine Lottie Animationsdatei von Ihrem Computer aus"
11
+ },
12
+ "width": {
13
+ "label": "Breite",
14
+ "placeholder": "300",
15
+ "description": "Animationsbreite in Pixeln"
16
+ },
17
+ "height": {
18
+ "label": "Höhe",
19
+ "placeholder": "300",
20
+ "description": "Animationshöhe in Pixeln"
21
+ },
22
+ "loop": {
23
+ "label": "Endlosschleife",
24
+ "description": "Endlose Wiedergabe aktivieren"
25
+ },
26
+ "autoplay": {
27
+ "label": "Automatische Wiedergabe",
28
+ "description": "Animation automatisch beim Laden abspielen"
29
+ },
30
+ "initialSegment": {
31
+ "label": "Anfangssegment",
32
+ "placeholder": "[0, 60]",
33
+ "description": "Start- und End-Frame für das anfängliche Animationssegment"
34
+ },
35
+ "playStyle": {
36
+ "label": "Wiedergabestil",
37
+ "description": "Animationswiedergabe-Stil"
38
+ },
39
+ "interactivity.enabled": {
40
+ "label": "Interaktivität aktivieren",
41
+ "description": "Maus- und Scroll-Interaktionen aktivieren"
42
+ },
43
+ "interactivity.type": {
44
+ "label": "Interaktionstyp",
45
+ "description": "Art der Interaktion mit der Animation"
46
+ },
47
+ "interactivity.sensitivity": {
48
+ "label": "Interaktions-Empfindlichkeit",
49
+ "description": "Wie empfindlich die Interaktion reagiert"
50
+ },
51
+ "accessibility.label": {
52
+ "label": "Barrierefreies Label",
53
+ "placeholder": "Animation",
54
+ "description": "Screen Reader Label für die Animation"
55
+ },
56
+ "accessibility.description": {
57
+ "label": "Barrierefreie Beschreibung",
58
+ "placeholder": "Interaktive Lottie Animation",
59
+ "description": "Detaillierte Beschreibung für Screen Reader"
60
+ },
61
+ "accessibility.role": {
62
+ "label": "Barrierefreie Rolle",
63
+ "placeholder": "img",
64
+ "description": "ARIA-Rolle für das Animationselement"
65
+ },
66
+ "advanced.className": {
67
+ "label": "CSS-Klassen",
68
+ "placeholder": "custom-animation my-style",
69
+ "description": "Zusätzliche CSS-Klassennamen für Styling"
70
+ },
71
+ "advanced.id": {
72
+ "label": "Element-ID",
73
+ "placeholder": "unique-id",
74
+ "description": "Eindeutiger Identifikator für das Element"
75
+ },
76
+ "advanced.ariaLabel": {
77
+ "label": "ARIA-Label",
78
+ "placeholder": "Beschreibendes Label für Screen Reader",
79
+ "description": "Zusätzliches Barrierefreiheits-Label"
80
+ },
81
+ "advanced.tabIndex": {
82
+ "label": "Tab-Index",
83
+ "placeholder": "0",
84
+ "description": "Navigationsreihenfolge für Tastaturzugang"
85
+ }
86
+ },
87
+ "categories": {
88
+ "content": "Inhalt",
89
+ "style": "Stil",
90
+ "advanced": "Erweitert"
91
+ },
92
+ "priorities": {
93
+ "quick": "Schnell",
94
+ "common": "Häufig",
95
+ "advanced": "Erweitert"
96
+ },
97
+ "upload": {
98
+ "title": "Lottie-Datei hochladen",
99
+ "description": "Wählen Sie eine Lottie JSON Datei von Ihrem Computer aus",
100
+ "button": "Datei auswählen",
101
+ "dragText": "Ziehen Sie Ihre Lottie-Datei hierher oder klicken Sie zur Auswahl",
102
+ "supportedFormats": "Unterstütztes Format: .json",
103
+ "invalidFormat": "Bitte laden Sie eine gültige Lottie JSON Datei hoch",
104
+ "fileTooLarge": "Datei ist zu groß. Maximale Größe ist 10MB.",
105
+ "uploadSuccess": "Datei erfolgreich hochgeladen!",
106
+ "uploadError": "Fehler beim Hochladen der Datei. Bitte versuchen Sie es erneut.",
107
+ "fileReady": "Bereit zum Rendern",
108
+ "loadedFile": "Geladen: {filename}"
109
+ },
110
+ "interactivity": {
111
+ "scroll": "Scrollen",
112
+ "cursor": "Cursor folgen",
113
+ "hover": "Hover",
114
+ "modeScroll": "Scroll-basierte Interaktion",
115
+ "modeCursor": "Cursor-Tracking Interaktion",
116
+ "modeHover": "Hover-basierte Interaktion",
117
+ "sensitivityLow": "Niedrig",
118
+ "sensitivityMedium": "Mittel",
119
+ "sensitivityHigh": "Hoch"
120
+ },
121
+ "playback": {
122
+ "normal": "Normal",
123
+ "bounce": "Bounce",
124
+ "reverse": "Umgekehrt",
125
+ "play": "Abspielen",
126
+ "pause": "Pausieren",
127
+ "stop": "Stopp"
128
+ }
129
+ }
@@ -0,0 +1,129 @@
1
+ {
2
+ "plugin": {
3
+ "name": "Lottie Animation",
4
+ "description": "Interactive Lottie animation with file upload and mouse interactions"
5
+ },
6
+ "properties": {
7
+ "src": {
8
+ "label": "Animation File",
9
+ "placeholder": "Upload Lottie JSON file",
10
+ "description": "Select a Lottie animation file from your computer"
11
+ },
12
+ "width": {
13
+ "label": "Width",
14
+ "placeholder": "300",
15
+ "description": "Animation width in pixels"
16
+ },
17
+ "height": {
18
+ "label": "Height",
19
+ "placeholder": "300",
20
+ "description": "Animation height in pixels"
21
+ },
22
+ "loop": {
23
+ "label": "Loop Animation",
24
+ "description": "Enable infinite loop playback"
25
+ },
26
+ "autoplay": {
27
+ "label": "Autoplay",
28
+ "description": "Play animation automatically when loaded"
29
+ },
30
+ "initialSegment": {
31
+ "label": "Initial Segment",
32
+ "placeholder": "[0, 60]",
33
+ "description": "Start and end frames for initial animation segment"
34
+ },
35
+ "playStyle": {
36
+ "label": "Play Style",
37
+ "description": "Animation playback style"
38
+ },
39
+ "interactivity.enabled": {
40
+ "label": "Enable Interactivity",
41
+ "description": "Enable mouse and scroll interactions"
42
+ },
43
+ "interactivity.type": {
44
+ "label": "Interaction Type",
45
+ "description": "Type of interaction with the animation"
46
+ },
47
+ "interactivity.sensitivity": {
48
+ "label": "Interaction Sensitivity",
49
+ "description": "How sensitive the interaction responds"
50
+ },
51
+ "accessibility.label": {
52
+ "label": "Accessibility Label",
53
+ "placeholder": "Animation",
54
+ "description": "Screen reader label for the animation"
55
+ },
56
+ "accessibility.description": {
57
+ "label": "Accessibility Description",
58
+ "placeholder": "Interactive Lottie animation",
59
+ "description": "Detailed description for screen readers"
60
+ },
61
+ "accessibility.role": {
62
+ "label": "Accessibility Role",
63
+ "placeholder": "img",
64
+ "description": "ARIA role for the animation element"
65
+ },
66
+ "advanced.className": {
67
+ "label": "CSS Classes",
68
+ "placeholder": "custom-animation my-style",
69
+ "description": "Additional CSS class names for styling"
70
+ },
71
+ "advanced.id": {
72
+ "label": "Element ID",
73
+ "placeholder": "unique-id",
74
+ "description": "Unique identifier for the element"
75
+ },
76
+ "advanced.ariaLabel": {
77
+ "label": "ARIA Label",
78
+ "placeholder": "Descriptive label for screen readers",
79
+ "description": "Additional accessibility label"
80
+ },
81
+ "advanced.tabIndex": {
82
+ "label": "Tab Index",
83
+ "placeholder": "0",
84
+ "description": "Navigation order for keyboard access"
85
+ }
86
+ },
87
+ "categories": {
88
+ "content": "Content",
89
+ "style": "Style",
90
+ "advanced": "Advanced"
91
+ },
92
+ "priorities": {
93
+ "quick": "Quick",
94
+ "common": "Common",
95
+ "advanced": "Advanced"
96
+ },
97
+ "upload": {
98
+ "title": "Upload Lottie File",
99
+ "description": "Select a Lottie JSON file from your computer",
100
+ "button": "Choose File",
101
+ "dragText": "Drag and drop your Lottie file here, or click to select",
102
+ "supportedFormats": "Supported format: .json",
103
+ "invalidFormat": "Please upload a valid Lottie JSON file",
104
+ "fileTooLarge": "File is too large. Maximum size is 10MB.",
105
+ "uploadSuccess": "File uploaded successfully!",
106
+ "uploadError": "Failed to upload file. Please try again.",
107
+ "fileReady": "Ready to render",
108
+ "loadedFile": "Loaded: {filename}"
109
+ },
110
+ "interactivity": {
111
+ "scroll": "Scroll",
112
+ "cursor": "Cursor Follow",
113
+ "hover": "Hover",
114
+ "modeScroll": "Scroll-based interaction",
115
+ "modeCursor": "Cursor tracking interaction",
116
+ "modeHover": "Hover-based interaction",
117
+ "sensitivityLow": "Low",
118
+ "sensitivityMedium": "Medium",
119
+ "sensitivityHigh": "High"
120
+ },
121
+ "playback": {
122
+ "normal": "Normal",
123
+ "bounce": "Bounce",
124
+ "reverse": "Reverse",
125
+ "play": "Play",
126
+ "pause": "Pause",
127
+ "stop": "Stop"
128
+ }
129
+ }
@@ -0,0 +1,266 @@
1
+ /**
2
+ * Lottie Plugin Localization
3
+ */
4
+ export declare const locales: {
5
+ readonly en: {
6
+ plugin: {
7
+ name: string;
8
+ description: string;
9
+ };
10
+ properties: {
11
+ src: {
12
+ label: string;
13
+ placeholder: string;
14
+ description: string;
15
+ };
16
+ width: {
17
+ label: string;
18
+ placeholder: string;
19
+ description: string;
20
+ };
21
+ height: {
22
+ label: string;
23
+ placeholder: string;
24
+ description: string;
25
+ };
26
+ loop: {
27
+ label: string;
28
+ description: string;
29
+ };
30
+ autoplay: {
31
+ label: string;
32
+ description: string;
33
+ };
34
+ initialSegment: {
35
+ label: string;
36
+ placeholder: string;
37
+ description: string;
38
+ };
39
+ playStyle: {
40
+ label: string;
41
+ description: string;
42
+ };
43
+ "interactivity.enabled": {
44
+ label: string;
45
+ description: string;
46
+ };
47
+ "interactivity.type": {
48
+ label: string;
49
+ description: string;
50
+ };
51
+ "interactivity.sensitivity": {
52
+ label: string;
53
+ description: string;
54
+ };
55
+ "accessibility.label": {
56
+ label: string;
57
+ placeholder: string;
58
+ description: string;
59
+ };
60
+ "accessibility.description": {
61
+ label: string;
62
+ placeholder: string;
63
+ description: string;
64
+ };
65
+ "accessibility.role": {
66
+ label: string;
67
+ placeholder: string;
68
+ description: string;
69
+ };
70
+ "advanced.className": {
71
+ label: string;
72
+ placeholder: string;
73
+ description: string;
74
+ };
75
+ "advanced.id": {
76
+ label: string;
77
+ placeholder: string;
78
+ description: string;
79
+ };
80
+ "advanced.ariaLabel": {
81
+ label: string;
82
+ placeholder: string;
83
+ description: string;
84
+ };
85
+ "advanced.tabIndex": {
86
+ label: string;
87
+ placeholder: string;
88
+ description: string;
89
+ };
90
+ };
91
+ categories: {
92
+ content: string;
93
+ style: string;
94
+ advanced: string;
95
+ };
96
+ priorities: {
97
+ quick: string;
98
+ common: string;
99
+ advanced: string;
100
+ };
101
+ upload: {
102
+ title: string;
103
+ description: string;
104
+ button: string;
105
+ dragText: string;
106
+ supportedFormats: string;
107
+ invalidFormat: string;
108
+ fileTooLarge: string;
109
+ uploadSuccess: string;
110
+ uploadError: string;
111
+ fileReady: string;
112
+ loadedFile: string;
113
+ };
114
+ interactivity: {
115
+ scroll: string;
116
+ cursor: string;
117
+ hover: string;
118
+ modeScroll: string;
119
+ modeCursor: string;
120
+ modeHover: string;
121
+ sensitivityLow: string;
122
+ sensitivityMedium: string;
123
+ sensitivityHigh: string;
124
+ };
125
+ playback: {
126
+ normal: string;
127
+ bounce: string;
128
+ reverse: string;
129
+ play: string;
130
+ pause: string;
131
+ stop: string;
132
+ };
133
+ };
134
+ readonly de: {
135
+ plugin: {
136
+ name: string;
137
+ description: string;
138
+ };
139
+ properties: {
140
+ src: {
141
+ label: string;
142
+ placeholder: string;
143
+ description: string;
144
+ };
145
+ width: {
146
+ label: string;
147
+ placeholder: string;
148
+ description: string;
149
+ };
150
+ height: {
151
+ label: string;
152
+ placeholder: string;
153
+ description: string;
154
+ };
155
+ loop: {
156
+ label: string;
157
+ description: string;
158
+ };
159
+ autoplay: {
160
+ label: string;
161
+ description: string;
162
+ };
163
+ initialSegment: {
164
+ label: string;
165
+ placeholder: string;
166
+ description: string;
167
+ };
168
+ playStyle: {
169
+ label: string;
170
+ description: string;
171
+ };
172
+ "interactivity.enabled": {
173
+ label: string;
174
+ description: string;
175
+ };
176
+ "interactivity.type": {
177
+ label: string;
178
+ description: string;
179
+ };
180
+ "interactivity.sensitivity": {
181
+ label: string;
182
+ description: string;
183
+ };
184
+ "accessibility.label": {
185
+ label: string;
186
+ placeholder: string;
187
+ description: string;
188
+ };
189
+ "accessibility.description": {
190
+ label: string;
191
+ placeholder: string;
192
+ description: string;
193
+ };
194
+ "accessibility.role": {
195
+ label: string;
196
+ placeholder: string;
197
+ description: string;
198
+ };
199
+ "advanced.className": {
200
+ label: string;
201
+ placeholder: string;
202
+ description: string;
203
+ };
204
+ "advanced.id": {
205
+ label: string;
206
+ placeholder: string;
207
+ description: string;
208
+ };
209
+ "advanced.ariaLabel": {
210
+ label: string;
211
+ placeholder: string;
212
+ description: string;
213
+ };
214
+ "advanced.tabIndex": {
215
+ label: string;
216
+ placeholder: string;
217
+ description: string;
218
+ };
219
+ };
220
+ categories: {
221
+ content: string;
222
+ style: string;
223
+ advanced: string;
224
+ };
225
+ priorities: {
226
+ quick: string;
227
+ common: string;
228
+ advanced: string;
229
+ };
230
+ upload: {
231
+ title: string;
232
+ description: string;
233
+ button: string;
234
+ dragText: string;
235
+ supportedFormats: string;
236
+ invalidFormat: string;
237
+ fileTooLarge: string;
238
+ uploadSuccess: string;
239
+ uploadError: string;
240
+ fileReady: string;
241
+ loadedFile: string;
242
+ };
243
+ interactivity: {
244
+ scroll: string;
245
+ cursor: string;
246
+ hover: string;
247
+ modeScroll: string;
248
+ modeCursor: string;
249
+ modeHover: string;
250
+ sensitivityLow: string;
251
+ sensitivityMedium: string;
252
+ sensitivityHigh: string;
253
+ };
254
+ playback: {
255
+ normal: string;
256
+ bounce: string;
257
+ reverse: string;
258
+ play: string;
259
+ pause: string;
260
+ stop: string;
261
+ };
262
+ };
263
+ };
264
+ export type Locale = keyof typeof locales;
265
+ export declare const defaultLocale: Locale;
266
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/locales/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGV,CAAC;AAEX,MAAM,MAAM,MAAM,GAAG,MAAM,OAAO,OAAO,CAAC;AAC1C,eAAO,MAAM,aAAa,EAAE,MAAa,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Lottie Plugin Localization
3
+ */
4
+ import en from './en.json';
5
+ import de from './de.json';
6
+ export const locales = {
7
+ en,
8
+ de,
9
+ };
10
+ export const defaultLocale = 'en';
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/locales/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,MAAM,WAAW,CAAC;AAC3B,OAAO,EAAE,MAAM,WAAW,CAAC;AAE3B,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,EAAE;IACF,EAAE;CACM,CAAC;AAGX,MAAM,CAAC,MAAM,aAAa,GAAW,IAAI,CAAC"}
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import type { LottieComponentProps } from './lottie-config';
3
+ declare const LottieComponent: React.FC<LottieComponentProps>;
4
+ export default LottieComponent;
5
+ export { LottieComponent };
6
+ //# sourceMappingURL=lottie-component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lottie-component.d.ts","sourceRoot":"","sources":["../src/lottie-component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAEhE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAG5D,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAwMnD,CAAC;AAEF,eAAe,eAAe,CAAC;AAC/B,OAAO,EAAE,eAAe,EAAE,CAAC"}
@@ -0,0 +1,99 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { useState, useCallback, useEffect } from 'react';
3
+ import Lottie from 'react-lottie-player';
4
+ import { cn } from './lib/utils';
5
+ const LottieComponent = ({ data, onChange, isEditing = false, className, }) => {
6
+ const [uploadedFile, setUploadedFile] = useState(null);
7
+ const [animationData, setAnimationData] = useState(() => {
8
+ // Handle base64 encoded animation data
9
+ if (data.src && data.src.startsWith('data:application/json;base64,')) {
10
+ try {
11
+ const base64Data = data.src.split(',')[1];
12
+ if (!base64Data) {
13
+ console.log('🎬 LOTTIE DEBUG: No base64 data found in src');
14
+ return null;
15
+ }
16
+ const decodedJson = atob(base64Data);
17
+ const parsedData = JSON.parse(decodedJson);
18
+ console.log('🎬 LOTTIE DEBUG: Decoded base64 animation data:', parsedData);
19
+ return parsedData;
20
+ }
21
+ catch (error) {
22
+ console.error('🎬 LOTTIE DEBUG: Failed to decode base64 animation data:', error);
23
+ return null;
24
+ }
25
+ }
26
+ return data.animationData;
27
+ });
28
+ const [loadError, setLoadError] = useState(null);
29
+ const [usePath, setUsePath] = useState(null);
30
+ // Determine if we should use path prop instead of animationData
31
+ useEffect(() => {
32
+ if (!animationData && data.src && !data.src.startsWith('data:')) {
33
+ console.log('🎬 LOTTIE DEBUG: Using path for animation:', data.src);
34
+ setUsePath(data.src);
35
+ }
36
+ else if (animationData) {
37
+ setUsePath(null);
38
+ }
39
+ }, [animationData, data.src]);
40
+ // Handle file upload
41
+ const handleFileUpload = useCallback(async (event) => {
42
+ console.log('🎬 LOTTIE DEBUG: File upload started');
43
+ const file = event.target.files?.[0];
44
+ if (!file) {
45
+ console.log('🎬 LOTTIE DEBUG: No file selected');
46
+ return;
47
+ }
48
+ // Validate file type
49
+ if (!file.name.endsWith('.json')) {
50
+ console.log('🎬 LOTTIE DEBUG: Invalid file type - not JSON:', file.name);
51
+ alert('Please upload a valid Lottie JSON file');
52
+ return;
53
+ }
54
+ try {
55
+ console.log('🎬 LOTTIE DEBUG: Reading file:', file.name);
56
+ const text = await file.text();
57
+ console.log('🎬 LOTTIE DEBUG: File text length:', text.length);
58
+ const json = JSON.parse(text);
59
+ // Basic validation - check if it looks like animation data
60
+ console.log('🎬 LOTTIE DEBUG: Validating animation format');
61
+ console.log('🎬 LOTTIE DEBUG: JSON keys:', Object.keys(json));
62
+ // Less strict validation - let react-lottie-player handle the details
63
+ if (!json || typeof json !== 'object') {
64
+ console.log('🎬 LOTTIE DEBUG: Invalid JSON format');
65
+ throw new Error('Invalid JSON format');
66
+ }
67
+ console.log('🎬 LOTTIE DEBUG: Animation format validated successfully');
68
+ setUploadedFile(file);
69
+ setAnimationData(json);
70
+ setLoadError(null);
71
+ onChange?.({
72
+ ...data,
73
+ src: URL.createObjectURL(file),
74
+ animationData: json,
75
+ });
76
+ console.log('🎬 LOTTIE DEBUG: File upload completed successfully');
77
+ }
78
+ catch (error) {
79
+ console.error('🎬 LOTTIE DEBUG: Failed to parse Lottie file:', error);
80
+ setLoadError(error instanceof Error ? error.message : 'Invalid Lottie file format');
81
+ alert('Invalid Lottie file format');
82
+ }
83
+ }, [data, onChange]);
84
+ const style = {
85
+ width: data.width ?? 300,
86
+ height: data.height ?? 300,
87
+ };
88
+ // Component render with debug logging
89
+ console.log('🎬 LOTTIE DEBUG: Component render');
90
+ console.log('🎬 LOTTIE DEBUG: animationData exists:', !!animationData);
91
+ console.log('🎬 LOTTIE DEBUG: loadError:', loadError);
92
+ console.log('🎬 LOTTIE DEBUG: data.src:', data.src);
93
+ console.log('🎬 LOTTIE DEBUG: uploadedFile:', uploadedFile?.name);
94
+ console.log('🎬 LOTTIE DEBUG: isEditing:', isEditing);
95
+ return (_jsxs("div", { className: cn('lottie-container relative', className), children: [isEditing && (_jsxs("div", { className: "absolute top-2 left-2 z-10 bg-white rounded-md shadow-md p-2", children: [_jsx("input", { type: "file", accept: ".json", onChange: handleFileUpload, className: "text-sm file:mr-2 file:py-1 file:px-2 file:rounded file:border-0 file:text-xs file:font-medium file:bg-blue-50 file:text-blue-700 hover:file:bg-blue-100" }), uploadedFile && (_jsxs("p", { className: "text-xs text-green-600 mt-1", children: ["Loaded: ", uploadedFile.name] })), data.interactivity && (_jsxs("div", { className: "text-xs text-blue-600 mt-1", children: ["Mode: ", data.interactivity.type] }))] })), _jsx("div", { className: cn(data.advanced?.className), "aria-label": data.accessibility?.label, role: data.accessibility?.role, ...(data.advanced?.id && { id: data.advanced.id }), ...(data.advanced?.['data-testid'] && { 'data-testid': data.advanced['data-testid'] }), ...(data.advanced?.ariaLabel && { 'aria-label': data.advanced.ariaLabel }), ...(data.advanced?.tabIndex !== undefined && { tabIndex: data.advanced.tabIndex }), children: (animationData || usePath) && !loadError ? (_jsxs(_Fragment, { children: [console.log('🎬 LOTTIE DEBUG: Rendering Lottie component with react-lottie-player'), console.log('🎬 LOTTIE DEBUG: Using animationData:', !!animationData), console.log('🎬 LOTTIE DEBUG: Using path:', usePath), animationData && console.log('🎬 LOTTIE DEBUG: Animation data structure:', Object.keys(animationData)), _jsx(Lottie, { animationData: animationData || undefined, loop: data.loop ?? true, play: data.autoplay ?? true, style: style, onComplete: () => console.log('🎬 LOTTIE DEBUG: Lottie animation completed') })] })) : loadError ? (_jsxs(_Fragment, { children: [console.log('🎬 LOTTIE DEBUG: Rendering error state:', loadError), _jsx("div", { style: style, className: "bg-red-50 border-2 border-dashed border-red-300 rounded-lg flex items-center justify-center", children: _jsxs("div", { className: "text-center text-red-600", children: [_jsx("div", { className: "text-4xl mb-2", children: "\u26A0\uFE0F" }), _jsx("div", { className: "text-sm font-semibold", children: "Lottie Error" }), _jsx("div", { className: "text-xs text-red-500 mt-1", children: loadError })] }) })] })) : (_jsxs(_Fragment, { children: [console.log('🎬 LOTTIE DEBUG: Rendering placeholder state'), _jsx("div", { style: style, className: "bg-gray-100 border-2 border-dashed border-gray-300 rounded-lg flex items-center justify-center", children: _jsxs("div", { className: "text-center text-gray-500", children: [_jsx("div", { className: "text-4xl mb-2", children: "\uD83C\uDFAC" }), _jsx("div", { className: "text-sm", children: "Lottie Animation" }), uploadedFile && (_jsxs("div", { className: "text-xs text-green-600 mt-1", children: ["Ready to render: ", uploadedFile.name] })), data.interactivity?.enabled && (_jsxs("div", { className: "text-xs text-blue-600 mt-1", children: ["Interactive: ", data.interactivity.type] }))] }) })] })) }), data.accessibility?.description && (_jsx("span", { className: "sr-only", role: "img", "aria-label": data.accessibility.description, children: data.accessibility.description }))] }));
96
+ };
97
+ export default LottieComponent;
98
+ export { LottieComponent };
99
+ //# sourceMappingURL=lottie-component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lottie-component.js","sourceRoot":"","sources":["../src/lottie-component.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAChE,OAAO,MAAM,MAAM,qBAAqB,CAAC;AAEzC,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAEjC,MAAM,eAAe,GAAmC,CAAC,EACvD,IAAI,EACJ,QAAQ,EACR,SAAS,GAAG,KAAK,EACjB,SAAS,GACV,EAAE,EAAE;IACH,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAc,IAAI,CAAC,CAAC;IACpE,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,QAAQ,CAAM,GAAG,EAAE;QAC3D,uCAAuC;QACvC,IAAI,IAAI,CAAC,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,+BAA+B,CAAC,EAAE,CAAC;YACrE,IAAI,CAAC;gBACH,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;gBAC1C,IAAI,CAAC,UAAU,EAAE,CAAC;oBAChB,OAAO,CAAC,GAAG,CAAC,8CA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WAAW,YAC5E,IAAI,CAAC,aAAa,CAAC,WAAW,GAC1B,CACR,IACG,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC;AAC/B,OAAO,EAAE,eAAe,EAAE,CAAC"}
@@ -0,0 +1,54 @@
1
+ export interface LottieData {
2
+ pluginType: 'lottie';
3
+ animationType: 'lottie';
4
+ src?: string;
5
+ animationData?: any;
6
+ loop?: boolean | number;
7
+ autoplay?: boolean;
8
+ initialSegment?: [number, number];
9
+ width?: number;
10
+ height?: number;
11
+ playStyle?: 'normal' | 'bounce' | 'reverse';
12
+ interactivity?: {
13
+ enabled: boolean;
14
+ type: 'scroll' | 'cursor' | 'hover';
15
+ sensitivity?: number;
16
+ };
17
+ accessibility?: {
18
+ label?: string;
19
+ description?: string;
20
+ role?: string;
21
+ };
22
+ advanced?: {
23
+ className?: string;
24
+ id?: string;
25
+ 'data-testid'?: string;
26
+ ariaLabel?: string;
27
+ tabIndex?: number;
28
+ onComplete?: string;
29
+ onLoopComplete?: string;
30
+ onEnterFrame?: string;
31
+ onDataReady?: string;
32
+ onDataFailed?: string;
33
+ };
34
+ }
35
+ export interface LottieComponentProps {
36
+ data: LottieData;
37
+ onChange?: (data: LottieData) => void;
38
+ isEditing?: boolean;
39
+ className?: string;
40
+ }
41
+ export interface PluginConfig<T = any> {
42
+ type: string;
43
+ name: string;
44
+ description: string;
45
+ category: string;
46
+ icon: string;
47
+ version: string;
48
+ defaultData: T;
49
+ properties: any[];
50
+ meta: any;
51
+ }
52
+ export declare const defaultLottieData: LottieData;
53
+ export declare const lottieConfig: PluginConfig<LottieData>;
54
+ //# sourceMappingURL=lottie-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lottie-config.d.ts","sourceRoot":"","sources":["../src/lottie-config.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,UAAU;IACzB,UAAU,EAAE,QAAQ,CAAC;IACrB,aAAa,EAAE,QAAQ,CAAC;IACxB,GAAG,CAAC,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;AAGD,MAAM,WAAW,YAAY,CAAC,CAAC,GAAG,GAAG;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,CAAC,CAAC;IACf,UAAU,EAAE,GAAG,EAAE,CAAC;IAClB,IAAI,EAAE,GAAG,CAAC;CACX;AAED,eAAO,MAAM,iBAAiB,EAAE,UAkB/B,CAAC;AAIF,eAAO,MAAM,YAAY,EAAE,YAAY,CAAC,UAAU,CAmIjD,CAAC"}
@@ -0,0 +1,155 @@
1
+ // Simplified types for Lottie plugin
2
+ import { defaultLocale, locales } from './locales';
3
+ export const defaultLottieData = {
4
+ pluginType: 'lottie',
5
+ animationType: 'lottie',
6
+ src: '',
7
+ loop: true,
8
+ autoplay: true,
9
+ width: 300,
10
+ height: 300,
11
+ playStyle: 'normal',
12
+ interactivity: {
13
+ enabled: false,
14
+ type: 'scroll',
15
+ sensitivity: 1,
16
+ },
17
+ accessibility: {
18
+ label: 'Animation',
19
+ description: 'Interactive Lottie animation',
20
+ },
21
+ };
22
+ const l = locales[defaultLocale];
23
+ export const lottieConfig = {
24
+ type: 'lottie',
25
+ name: l.plugin.name,
26
+ description: l.plugin.description,
27
+ category: 'media',
28
+ icon: '🎬',
29
+ version: '1.0.0',
30
+ defaultData: defaultLottieData,
31
+ properties: [
32
+ {
33
+ key: 'src',
34
+ type: 'file',
35
+ label: l.properties.src.label,
36
+ placeholder: l.properties.src.placeholder,
37
+ description: l.properties.src.description,
38
+ accept: '.json',
39
+ required: true,
40
+ },
41
+ {
42
+ key: 'width',
43
+ type: 'number',
44
+ label: l.properties.width.label,
45
+ placeholder: l.properties.width.placeholder,
46
+ description: l.properties.width.description,
47
+ min: 50,
48
+ max: 2000,
49
+ step: 10,
50
+ required: true,
51
+ },
52
+ {
53
+ key: 'height',
54
+ type: 'number',
55
+ label: l.properties.height.label,
56
+ placeholder: l.properties.height.placeholder,
57
+ description: l.properties.height.description,
58
+ min: 50,
59
+ max: 2000,
60
+ step: 10,
61
+ required: true,
62
+ },
63
+ {
64
+ key: 'loop',
65
+ type: 'boolean',
66
+ label: l.properties.loop.label,
67
+ description: l.properties.loop.description,
68
+ },
69
+ {
70
+ key: 'autoplay',
71
+ type: 'boolean',
72
+ label: l.properties.autoplay.label,
73
+ description: l.properties.autoplay.description,
74
+ },
75
+ {
76
+ key: 'playStyle',
77
+ type: 'select',
78
+ label: l.properties.playStyle.label,
79
+ description: l.properties.playStyle.description,
80
+ options: [
81
+ { value: 'normal', label: l.playback.normal },
82
+ { value: 'bounce', label: l.playback.bounce },
83
+ { value: 'reverse', label: l.playback.reverse },
84
+ ],
85
+ },
86
+ {
87
+ key: 'interactivity.enabled',
88
+ type: 'boolean',
89
+ label: l.properties['interactivity.enabled'].label,
90
+ description: l.properties['interactivity.enabled'].description,
91
+ },
92
+ {
93
+ key: 'interactivity.type',
94
+ type: 'select',
95
+ label: l.properties['interactivity.type'].label,
96
+ description: l.properties['interactivity.type'].description,
97
+ options: [
98
+ { value: 'scroll', label: l.interactivity.scroll },
99
+ { value: 'cursor', label: l.interactivity.cursor },
100
+ { value: 'hover', label: l.interactivity.hover },
101
+ ],
102
+ condition: { 'interactivity.enabled': true },
103
+ },
104
+ {
105
+ key: 'interactivity.sensitivity',
106
+ type: 'range',
107
+ label: l.properties['interactivity.sensitivity'].label,
108
+ description: l.properties['interactivity.sensitivity'].description,
109
+ min: 0.1,
110
+ max: 2,
111
+ step: 0.1,
112
+ condition: { 'interactivity.enabled': true },
113
+ },
114
+ {
115
+ key: 'accessibility.label',
116
+ type: 'text',
117
+ label: l.properties['accessibility.label'].label,
118
+ placeholder: l.properties['accessibility.label'].placeholder,
119
+ description: l.properties['accessibility.label'].description,
120
+ },
121
+ {
122
+ key: 'accessibility.description',
123
+ type: 'textarea',
124
+ label: l.properties['accessibility.description'].label,
125
+ placeholder: l.properties['accessibility.description'].placeholder,
126
+ description: l.properties['accessibility.description'].description,
127
+ },
128
+ ],
129
+ meta: {
130
+ tags: ['animation', 'lottie', 'interactive', 'media'],
131
+ author: 'Codefluss',
132
+ documentation: 'https://docs.lottiefiles.com',
133
+ examples: [
134
+ {
135
+ name: 'Basic Animation',
136
+ data: {
137
+ ...defaultLottieData,
138
+ src: '/animations/example.json',
139
+ },
140
+ },
141
+ {
142
+ name: 'Interactive Hover',
143
+ data: {
144
+ ...defaultLottieData,
145
+ interactivity: {
146
+ enabled: true,
147
+ type: 'hover',
148
+ sensitivity: 1,
149
+ },
150
+ },
151
+ },
152
+ ],
153
+ },
154
+ };
155
+ //# sourceMappingURL=lottie-config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lottie-config.js","sourceRoot":"","sources":["../src/lottie-config.ts"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAyDnD,MAAM,CAAC,MAAM,iBAAiB,GAAe;IAC3C,UAAU,EAAE,QAAQ;IACpB,aAAa,EAAE,QAAQ;IACvB,GAAG,EAAE,EAAE;IACP,IAAI,EAAE,IAAI;IACV,QAAQ,EAAE,IAAI;IACd,KAAK,EAAE,GAAG;IACV,MAAM,EAAE,GAAG;IACX,SAAS,EAAE,QAAQ;IACnB,aAAa,EAAE;QACb,OAAO,EAAE,KAAK;QACd,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,CAAC;KACf;IACD,aAAa,EAAE;QACb,KAAK,EAAE,WAAW;QAClB,WAAW,EAAE,8BAA8B;KAC5C;CACF,CAAC;AAEF,MAAM,CAAC,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;AAEjC,MAAM,CAAC,MAAM,YAAY,GAA6B;IACpD,IAAI,EAAE,QAAQ;IACd,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,IAAI;IACnB,WAA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,EAAE,iBAAiB;gBACvB,IAAI,EAAE;oBACJ,GAAG,iBAAiB;oBACpB,GAAG,EAAE,0BAA0B;iBAChC;aACF;YACD;gBACE,IAAI,EAAE,mBAAmB;gBACzB,IAAI,EAAE;oBACJ,GAAG,iBAAiB;oBACpB,aAAa,EAAE;wBACb,OAAO,EAAE,IAAI;wBACb,IAAI,EAAE,OAAO;wBACb,WAAW,EAAE,CAAC;qBACf;iBACF;aACF;SACF;KACF;CACF,CAAC"}
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Lottie Renderer Component (SSR / View Mode)
3
+ *
4
+ * This is the Server-Side Rendering component for the Lottie plugin.
5
+ * NO 'use client' directive - works in Node.js environment.
6
+ *
7
+ * ⚠️ IMPORTANT: This renderer produces LIVE SITE HTML!
8
+ * NO Tailwind classes allowed - only inline styles and semantic classes.
9
+ *
10
+ * Note: Lottie animations require client-side JavaScript to play.
11
+ * This renderer provides a placeholder/fallback for SSR with proper styling.
12
+ * The actual animation will be hydrated on the client.
13
+ */
14
+ import type { PluginDependencies } from '@codefluss/base-types';
15
+ import type { LottieData } from './lottie-config';
16
+ /**
17
+ * Lottie Renderer Props
18
+ *
19
+ * Follows the standard RendererProps pattern for consistency
20
+ */
21
+ export interface LottieRendererProps {
22
+ /** Unique element identifier */
23
+ elementId: string;
24
+ /** Lottie animation configuration data */
25
+ data: LottieData;
26
+ /** Current language for i18n */
27
+ language: string;
28
+ /** Plugin dependencies including design system */
29
+ dependencies: PluginDependencies;
30
+ }
31
+ /**
32
+ * Lottie Renderer Component
33
+ *
34
+ * Pure functional component for SSR rendering of Lottie animations.
35
+ * Uses ONLY inline styles and semantic classes - NO Tailwind.
36
+ *
37
+ * @param props - Renderer props following standard pattern
38
+ * @returns React element for server-side rendering
39
+ */
40
+ export declare function LottieRenderer({ elementId, data, language, dependencies, }: LottieRendererProps): import("react/jsx-runtime").JSX.Element;
41
+ export declare namespace LottieRenderer {
42
+ var displayName: string;
43
+ }
44
+ export default LottieRenderer;
45
+ //# sourceMappingURL=renderer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderer.d.ts","sourceRoot":"","sources":["../src/renderer.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IACnC,gCAAgC;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,0CAA0C;IAC1C,IAAI,EAAE,UAAU,CAAC;IACjB,gCAAgC;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,kDAAkD;IAClD,YAAY,EAAE,kBAAkB,CAAC;CACjC;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,EAC9B,SAAS,EACT,IAAI,EACJ,QAAQ,EACR,YAAY,GACZ,EAAE,mBAAmB,2CAkFrB;yBAvFe,cAAc;;;AA4F9B,eAAe,cAAc,CAAC"}
@@ -0,0 +1,59 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ * Lottie Renderer Component
4
+ *
5
+ * Pure functional component for SSR rendering of Lottie animations.
6
+ * Uses ONLY inline styles and semantic classes - NO Tailwind.
7
+ *
8
+ * @param props - Renderer props following standard pattern
9
+ * @returns React element for server-side rendering
10
+ */
11
+ export function LottieRenderer({ elementId, data, language, dependencies, }) {
12
+ const { designSystem, utils } = dependencies;
13
+ // Resolve accessibility label based on language
14
+ const ariaLabel = data.accessibility?.label || 'Animation';
15
+ const ariaDescription = data.accessibility?.description || '';
16
+ // Get custom class name from advanced settings
17
+ const customClassName = data.advanced?.className || '';
18
+ // Generate class names - ONLY semantic classes, NO Tailwind
19
+ const className = utils.cn('lottie-component', customClassName);
20
+ // Build inline styles - ALL visual styling via inline CSS
21
+ const containerStyle = {
22
+ // Width from data or default to 100%
23
+ width: data.width ? `${data.width}px` : '100%',
24
+ // Height from data or auto
25
+ height: data.height ? `${data.height}px` : 'auto',
26
+ // Ensure proper display
27
+ display: 'block',
28
+ // Position for potential overlays
29
+ position: 'relative',
30
+ // Aspect ratio maintenance
31
+ aspectRatio: data.width && data.height ? `${data.width} / ${data.height}` : undefined,
32
+ };
33
+ // Placeholder style for SSR (before client hydration)
34
+ const placeholderStyle = {
35
+ width: '100%',
36
+ height: '100%',
37
+ display: 'flex',
38
+ alignItems: 'center',
39
+ justifyContent: 'center',
40
+ backgroundColor: 'rgba(0, 0, 0, 0.05)',
41
+ borderRadius: '4px',
42
+ minHeight: '100px',
43
+ };
44
+ return (_jsxs("div", { className: className, style: containerStyle, "aria-label": ariaLabel, "aria-describedby": ariaDescription ? `${elementId}-desc` : undefined, "data-component-id": elementId, "data-component-type": "lottie", "data-src": data.src, "data-autoplay": data.autoplay, "data-loop": data.loop, id: data.advanced?.id, "data-testid": data.advanced?.['data-testid'], tabIndex: data.advanced?.tabIndex, children: [_jsx("div", { style: placeholderStyle, children: _jsx("span", { style: { fontSize: '24px' }, children: "\uD83C\uDFAC" }) }), ariaDescription && (_jsx("span", { id: `${elementId}-desc`, style: {
45
+ position: 'absolute',
46
+ width: '1px',
47
+ height: '1px',
48
+ padding: 0,
49
+ margin: '-1px',
50
+ overflow: 'hidden',
51
+ clip: 'rect(0, 0, 0, 0)',
52
+ whiteSpace: 'nowrap',
53
+ border: 0,
54
+ }, children: ariaDescription }))] }));
55
+ }
56
+ // Display name for debugging
57
+ LottieRenderer.displayName = 'LottieRenderer';
58
+ export default LottieRenderer;
59
+ //# sourceMappingURL=renderer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderer.js","sourceRoot":"","sources":["../src/renderer.tsx"],"names":[],"mappings":";AAiCA;;;;;;;;GAQG;AACH,MAAM,UAAU,cAAc,CAAC,EAC9B,SAAS,EACT,IAAI,EACJ,QAAQ,EACR,YAAY,GACS;IACrB,MAAM,EAAE,YAAY,EAAE,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AAE,cAAc,gBACT,SAAS,sBACH,eAAe,CAAC,CAAC,CAAC,GAAG,SAAS,OAAO,CAAC,CAAC,CAAC,SAAS,uBAChD,SAAS,yBACR,QAAQ,cAClB,IAAI,CAAC,GAAG,mBACH,IAAI,CAAC,QAAQ,eACjB,IAAI,CAAC,IAAI,EACpB,EAAE,EAAE,IAAI,CAAC,QAAQ,EAAE,EAAE,iBACR,IAAI,CAAC,QAAQ,EAAE,CAAC,aAAa,CAAC,EAC3C,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,QAAQ,aAGjC,cAAK,KAAK,EAAE,gBAAgB,YAC3B,eAAM,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,6BAAW,GACvC,EAEL,eAAe,IAAI,CACnB,eACC,EAAE,EAAE,GAAG,SAAS,OAAO,EACvB,KAAK,EAAE;oBACN,QAAQ,EAAE,UAAU;oBACpB,KAAK,EAAE,KAAK;oBACZ,MAAM,EAAE,KAAK;oBACb,OAAO,EAAE,CAAC;oBACV,MAAM,EAAE,MAAM;oBACd,QAAQ,EAAE,QAAQ;oBAClB,IAAI,EAAE,kBAAkB;oBACxB,UAAU,EAAE,QAAQ;oBACpB,MAAM,EAAE,CAAC;iBACT,YAEA,eAAe,GACV,CACP,IACI,CACN,CAAC;AACH,CAAC;AAED,6BAA6B;AAC7B,cAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC;AAE9C,eAAe,cAAc,CAAC"}
package/package.json ADDED
@@ -0,0 +1,60 @@
1
+ {
2
+ "name": "@codefluss/lottie",
3
+ "version": "0.0.1-alpha.1",
4
+ "description": "Lottie animation plugin for interactive animations",
5
+ "main": "./dist/index.js",
6
+ "types": "./dist/index.d.ts",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/index.d.ts",
10
+ "default": "./dist/index.js"
11
+ },
12
+ "./renderer": {
13
+ "types": "./dist/renderer.d.ts",
14
+ "default": "./dist/renderer.js"
15
+ }
16
+ },
17
+ "files": [
18
+ "dist"
19
+ ],
20
+ "keywords": [
21
+ "lottie",
22
+ "animation",
23
+ "interactive",
24
+ "plugin"
25
+ ],
26
+ "author": "Codefluss",
27
+ "license": "MIT",
28
+ "peerDependencies": {
29
+ "next": "^16.0.1",
30
+ "react": "^19.2.0"
31
+ },
32
+ "dependencies": {
33
+ "clsx": "^2.1.1",
34
+ "react-lottie-player": "^2.1.0",
35
+ "tailwind-merge": "^3.4.0",
36
+ "@codefluss/base-types": "0.0.1-alpha.1"
37
+ },
38
+ "devDependencies": {
39
+ "@types/node": "^24.10.3",
40
+ "@types/react": "^19.2.7",
41
+ "@types/react-dom": "^19.2.3",
42
+ "@typescript-eslint/eslint-plugin": "^8.49.0",
43
+ "@typescript-eslint/parser": "^8.49.0",
44
+ "eslint": "^9.39.1",
45
+ "prettier": "^3.7.4",
46
+ "typescript": "^5.9.3",
47
+ "vitest": "^4.0.15"
48
+ },
49
+ "publishConfig": {
50
+ "access": "public"
51
+ },
52
+ "scripts": {
53
+ "build": "tsc",
54
+ "dev": "tsc --watch",
55
+ "test": "vitest",
56
+ "test:watch": "vitest --watch",
57
+ "lint": "eslint src/ --ext .ts,.tsx",
58
+ "format": "prettier --write src/**/*.{ts,tsx}"
59
+ }
60
+ }