@beautifi/plugin 0.1.0 → 0.1.2
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/dist/beautifi.cjs.js +1 -1
- package/dist/beautifi.cjs.js.map +1 -1
- package/dist/beautifi.esm.js +3 -3
- package/dist/beautifi.esm.js.map +1 -1
- package/dist/beautifi.min.js +1 -1
- package/dist/beautifi.min.js.map +1 -1
- package/dist/beautifi.umd.js +1 -1
- package/dist/beautifi.umd.js.map +1 -1
- package/package.json +1 -1
- package/dist/beautifi-lite.cjs.js +0 -2
- package/dist/beautifi-lite.cjs.js.map +0 -1
- package/dist/beautifi-lite.esm.js +0 -212
- package/dist/beautifi-lite.esm.js.map +0 -1
- package/dist/beautifi-lite.min.js +0 -2
- package/dist/beautifi-lite.min.js.map +0 -1
- package/dist/beautifi-lite.umd.js +0 -2
- package/dist/beautifi-lite.umd.js.map +0 -1
- package/dist/sri-hashes.json +0 -46
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"beautifi-lite.cjs.js","sources":["../src/lite.ts"],"sourcesContent":["/**\n * beautifi Lite - Minimal CSS-only animation bundle\n * \n * This is a lightweight (<5KB) version of beautifi that provides\n * basic CSS-based animations without requiring AI processing.\n * \n * Users can upgrade to the full AI-powered version for advanced features.\n * \n * @packageDocumentation\n */\n\nexport interface beautifiLiteOptions {\n /** Selector for images to animate */\n selector?: string;\n /** Animation intensity: 'subtle' | 'moderate' | 'strong' */\n intensity?: 'subtle' | 'moderate' | 'strong';\n /** Animation type: 'breathe' | 'sway' | 'parallax' | 'pulse' */\n type?: 'breathe' | 'sway' | 'parallax' | 'pulse';\n /** Whether to loop the animation */\n loop?: boolean;\n /** Animation duration in milliseconds */\n duration?: number;\n /** Enable intersection observer for lazy animation */\n lazyLoad?: boolean;\n}\n\nconst DEFAULT_OPTIONS: Required<beautifiLiteOptions> = {\n selector: '[data-beautifi]',\n intensity: 'subtle',\n type: 'breathe',\n loop: true,\n duration: 4000,\n lazyLoad: true,\n};\n\nconst INTENSITY_SCALE = {\n subtle: 0.5,\n moderate: 1,\n strong: 1.5,\n};\n\nconst CSS_ANIMATIONS = {\n breathe: (scale: number, duration: number) => `\n @keyframes beautifi-breathe {\n 0%, 100% { transform: scale(1); }\n 50% { transform: scale(${1 + 0.02 * scale}); }\n }\n animation: beautifi-breathe ${duration}ms ease-in-out infinite;\n `,\n sway: (scale: number, duration: number) => `\n @keyframes beautifi-sway {\n 0%, 100% { transform: translateX(0); }\n 25% { transform: translateX(${2 * scale}px); }\n 75% { transform: translateX(${-2 * scale}px); }\n }\n animation: beautifi-sway ${duration}ms ease-in-out infinite;\n `,\n parallax: (scale: number, duration: number) => `\n @keyframes beautifi-parallax {\n 0%, 100% { transform: translateY(0) scale(1.02); }\n 50% { transform: translateY(${-3 * scale}px) scale(1.02); }\n }\n animation: beautifi-parallax ${duration}ms ease-in-out infinite;\n overflow: hidden;\n `,\n pulse: (scale: number, duration: number) => `\n @keyframes beautifi-pulse {\n 0%, 100% { filter: brightness(1); }\n 50% { filter: brightness(${1 + 0.05 * scale}); }\n }\n animation: beautifi-pulse ${duration}ms ease-in-out infinite;\n `,\n};\n\n/**\n * beautifi Lite - CSS-only animation engine\n * \n * Provides lightweight, CSS-based animations for images without AI processing.\n * Use this for basic effects or as a fallback when AI is not available.\n */\nexport class beautifiLite {\n private options: Required<beautifiLiteOptions>;\n private observer: IntersectionObserver | null = null;\n private styleElement: HTMLStyleElement | null = null;\n private animatedElements: Set<Element> = new Set();\n\n constructor(options: beautifiLiteOptions = {}) {\n this.options = { ...DEFAULT_OPTIONS, ...options };\n this.injectGlobalStyles();\n\n if (typeof document !== 'undefined') {\n if (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', () => this.init());\n } else {\n this.init();\n }\n }\n }\n\n /**\n * Initialize the lite animation engine\n */\n private init(): void {\n if (this.options.lazyLoad && 'IntersectionObserver' in window) {\n this.setupIntersectionObserver();\n }\n this.processElements();\n }\n\n /**\n * Inject global CSS for animations\n */\n private injectGlobalStyles(): void {\n if (typeof document === 'undefined') return;\n\n this.styleElement = document.createElement('style');\n this.styleElement.id = 'beautifi-lite-styles';\n this.styleElement.textContent = `\n .beautifi-lite-container {\n display: inline-block;\n overflow: hidden;\n }\n .beautifi-lite-image {\n display: block;\n width: 100%;\n height: auto;\n }\n .beautifi-lite-paused {\n animation-play-state: paused !important;\n }\n `;\n document.head.appendChild(this.styleElement);\n }\n\n /**\n * Setup intersection observer for lazy loading\n */\n private setupIntersectionObserver(): void {\n this.observer = new IntersectionObserver(\n (entries) => {\n entries.forEach((entry) => {\n const element = entry.target as HTMLElement;\n if (entry.isIntersecting) {\n element.classList.remove('beautifi-lite-paused');\n } else {\n element.classList.add('beautifi-lite-paused');\n }\n });\n },\n { threshold: 0.1 }\n );\n }\n\n /**\n * Process all matching elements\n */\n private processElements(): void {\n const elements = document.querySelectorAll(this.options.selector);\n elements.forEach((element) => this.animateElement(element as HTMLElement));\n }\n\n /**\n * Animate a single element\n */\n public animateElement(element: HTMLElement): void {\n if (this.animatedElements.has(element)) return;\n\n // Get element-specific options from data attributes\n const intensity = (element.dataset.beautifiIntensity as beautifiLiteOptions['intensity']) || this.options.intensity;\n const type = (element.dataset.beautifiType as beautifiLiteOptions['type']) || this.options.type;\n const duration = parseInt(element.dataset.beautifiDuration || '', 10) || this.options.duration;\n const loop = element.dataset.beautifiLoop !== 'false' && this.options.loop;\n\n const scale = INTENSITY_SCALE[intensity];\n const animationCSS = CSS_ANIMATIONS[type](scale, duration);\n\n // Apply animation\n element.style.cssText += animationCSS;\n if (!loop) {\n element.style.animationIterationCount = '1';\n }\n\n // Add to observer if lazy loading\n if (this.observer) {\n this.observer.observe(element);\n element.classList.add('beautifi-lite-paused');\n }\n\n this.animatedElements.add(element);\n element.setAttribute('data-beautifi-lite', 'active');\n }\n\n /**\n * Pause animation on an element\n */\n public pause(element?: HTMLElement): void {\n if (element) {\n element.classList.add('beautifi-lite-paused');\n } else {\n this.animatedElements.forEach((el) => {\n (el as HTMLElement).classList.add('beautifi-lite-paused');\n });\n }\n }\n\n /**\n * Resume animation on an element\n */\n public resume(element?: HTMLElement): void {\n if (element) {\n element.classList.remove('beautifi-lite-paused');\n } else {\n this.animatedElements.forEach((el) => {\n (el as HTMLElement).classList.remove('beautifi-lite-paused');\n });\n }\n }\n\n /**\n * Stop and cleanup animation on an element\n */\n public stop(element: HTMLElement): void {\n element.style.animation = '';\n element.removeAttribute('data-beautifi-lite');\n this.animatedElements.delete(element);\n this.observer?.unobserve(element);\n }\n\n /**\n * Destroy the lite engine and cleanup\n */\n public destroy(): void {\n this.observer?.disconnect();\n this.styleElement?.remove();\n this.animatedElements.forEach((el) => {\n (el as HTMLElement).style.animation = '';\n el.removeAttribute('data-beautifi-lite');\n });\n this.animatedElements.clear();\n }\n\n /**\n * Check if an element is currently animated\n */\n public isAnimated(element: HTMLElement): boolean {\n return this.animatedElements.has(element);\n }\n\n /**\n * Get the number of animated elements\n */\n public get count(): number {\n return this.animatedElements.size;\n }\n}\n\n/**\n * Initialize beautifi Lite with options\n */\nexport function initLite(options?: beautifiLiteOptions): beautifiLite {\n return new beautifiLite(options);\n}\n\n/**\n * Auto-initialize if data-beautifi-lite-auto attribute is present\n */\nif (typeof document !== 'undefined') {\n const autoInit = document.querySelector('[data-beautifi-lite-auto]');\n if (autoInit) {\n new beautifiLite();\n }\n}\n\nexport default beautifiLite;\n"],"names":["DEFAULT_OPTIONS","selector","intensity","type","loop","duration","lazyLoad","INTENSITY_SCALE","subtle","moderate","strong","CSS_ANIMATIONS","breathe","scale","sway","parallax","pulse","beautifiLite","constructor","options","this","observer","styleElement","animatedElements","Set","injectGlobalStyles","document","readyState","addEventListener","init","window","setupIntersectionObserver","processElements","createElement","id","textContent","head","appendChild","IntersectionObserver","entries","forEach","entry","element","target","isIntersecting","classList","remove","add","threshold","querySelectorAll","animateElement","has","dataset","beautifiIntensity","beautifiType","parseInt","beautifiDuration","beautifiLoop","animationCSS","style","cssText","animationIterationCount","observe","setAttribute","pause","el","resume","stop","animation","removeAttribute","delete","unobserve","destroy","disconnect","clear","isAnimated","count","size","querySelector"],"mappings":"4GA0BA,MAAMA,EAAiD,CACnDC,SAAU,kBACVC,UAAW,SACXC,KAAM,UACNC,MAAM,EACNC,SAAU,IACVC,UAAU,GAGRC,EAAkB,CACpBC,OAAQ,GACRC,SAAU,EACVC,OAAQ,KAGNC,EAAiB,CACnBC,QAAS,CAACC,EAAeR,IAAqB,8GAGnB,EAAI,IAAOQ,iDAERR,gCAE9BS,KAAM,CAACD,EAAeR,IAAqB,qHAGX,EAAIQ,iDACCA,gDAEVR,gCAE3BU,SAAU,CAACF,EAAeR,IAAqB,wIAGVQ,gEAENR,uDAG/BW,MAAO,CAACH,EAAeR,IAAqB,gHAGf,EAAI,IAAOQ,+CAEZR,iCAUzB,MAAMY,EAMT,WAAAC,CAAYC,EAA+B,IAJ3CC,KAAQC,SAAwC,KAChDD,KAAQE,aAAwC,KAChDF,KAAQG,qBAAqCC,IAGzCJ,KAAKD,QAAU,IAAKnB,KAAoBmB,GACxCC,KAAKK,qBAEmB,oBAAbC,WACqB,YAAxBA,SAASC,WACTD,SAASE,iBAAiB,mBAAoB,IAAMR,KAAKS,QAEzDT,KAAKS,OAGjB,CAKQ,IAAAA,GACAT,KAAKD,QAAQb,UAAY,yBAA0BwB,QACnDV,KAAKW,4BAETX,KAAKY,iBACT,CAKQ,kBAAAP,GACoB,oBAAbC,WAEXN,KAAKE,aAAeI,SAASO,cAAc,SAC3Cb,KAAKE,aAAaY,GAAK,uBACvBd,KAAKE,aAAaa,YAAc,sTAchCT,SAASU,KAAKC,YAAYjB,KAAKE,cACnC,CAKQ,yBAAAS,GACJX,KAAKC,SAAW,IAAIiB,qBACfC,IACGA,EAAQC,QAASC,IACb,MAAMC,EAAUD,EAAME,OAClBF,EAAMG,eACNF,EAAQG,UAAUC,OAAO,wBAEzBJ,EAAQG,UAAUE,IAAI,2BAIlC,CAAEC,U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EAAmBN,MAAMS,UAAY,GACtCH,EAAGI,gBAAgB,wBAEvBjD,KAAKG,iBAAiBmD,OAC1B,CAKO,UAAAC,CAAWjC,GACd,OAAOtB,KAAKG,iBAAiB4B,IAAIT,EACrC,CAKA,SAAWkC,GACP,OAAOxD,KAAKG,iBAAiBsD,IACjC,EAaJ,GAAwB,oBAAbnD,SAA0B,CAChBA,SAASoD,cAAc,8BAEpC,IAAI7D,CAEZ,2DAZO,SAAkBE,GACrB,OAAO,IAAIF,EAAaE,EAC5B"}
|
|
@@ -1,212 +0,0 @@
|
|
|
1
|
-
const DEFAULT_OPTIONS = {
|
|
2
|
-
selector: "[data-beautifi]",
|
|
3
|
-
intensity: "subtle",
|
|
4
|
-
type: "breathe",
|
|
5
|
-
loop: true,
|
|
6
|
-
duration: 4e3,
|
|
7
|
-
lazyLoad: true
|
|
8
|
-
};
|
|
9
|
-
const INTENSITY_SCALE = {
|
|
10
|
-
subtle: 0.5,
|
|
11
|
-
moderate: 1,
|
|
12
|
-
strong: 1.5
|
|
13
|
-
};
|
|
14
|
-
const CSS_ANIMATIONS = {
|
|
15
|
-
breathe: (scale, duration) => `
|
|
16
|
-
@keyframes beautifi-breathe {
|
|
17
|
-
0%, 100% { transform: scale(1); }
|
|
18
|
-
50% { transform: scale(${1 + 0.02 * scale}); }
|
|
19
|
-
}
|
|
20
|
-
animation: beautifi-breathe ${duration}ms ease-in-out infinite;
|
|
21
|
-
`,
|
|
22
|
-
sway: (scale, duration) => `
|
|
23
|
-
@keyframes beautifi-sway {
|
|
24
|
-
0%, 100% { transform: translateX(0); }
|
|
25
|
-
25% { transform: translateX(${2 * scale}px); }
|
|
26
|
-
75% { transform: translateX(${-2 * scale}px); }
|
|
27
|
-
}
|
|
28
|
-
animation: beautifi-sway ${duration}ms ease-in-out infinite;
|
|
29
|
-
`,
|
|
30
|
-
parallax: (scale, duration) => `
|
|
31
|
-
@keyframes beautifi-parallax {
|
|
32
|
-
0%, 100% { transform: translateY(0) scale(1.02); }
|
|
33
|
-
50% { transform: translateY(${-3 * scale}px) scale(1.02); }
|
|
34
|
-
}
|
|
35
|
-
animation: beautifi-parallax ${duration}ms ease-in-out infinite;
|
|
36
|
-
overflow: hidden;
|
|
37
|
-
`,
|
|
38
|
-
pulse: (scale, duration) => `
|
|
39
|
-
@keyframes beautifi-pulse {
|
|
40
|
-
0%, 100% { filter: brightness(1); }
|
|
41
|
-
50% { filter: brightness(${1 + 0.05 * scale}); }
|
|
42
|
-
}
|
|
43
|
-
animation: beautifi-pulse ${duration}ms ease-in-out infinite;
|
|
44
|
-
`
|
|
45
|
-
};
|
|
46
|
-
class beautifiLite {
|
|
47
|
-
constructor(options = {}) {
|
|
48
|
-
this.observer = null;
|
|
49
|
-
this.styleElement = null;
|
|
50
|
-
this.animatedElements = /* @__PURE__ */ new Set();
|
|
51
|
-
this.options = { ...DEFAULT_OPTIONS, ...options };
|
|
52
|
-
this.injectGlobalStyles();
|
|
53
|
-
if (typeof document !== "undefined") {
|
|
54
|
-
if (document.readyState === "loading") {
|
|
55
|
-
document.addEventListener("DOMContentLoaded", () => this.init());
|
|
56
|
-
} else {
|
|
57
|
-
this.init();
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* Initialize the lite animation engine
|
|
63
|
-
*/
|
|
64
|
-
init() {
|
|
65
|
-
if (this.options.lazyLoad && "IntersectionObserver" in window) {
|
|
66
|
-
this.setupIntersectionObserver();
|
|
67
|
-
}
|
|
68
|
-
this.processElements();
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* Inject global CSS for animations
|
|
72
|
-
*/
|
|
73
|
-
injectGlobalStyles() {
|
|
74
|
-
if (typeof document === "undefined") return;
|
|
75
|
-
this.styleElement = document.createElement("style");
|
|
76
|
-
this.styleElement.id = "beautifi-lite-styles";
|
|
77
|
-
this.styleElement.textContent = `
|
|
78
|
-
.beautifi-lite-container {
|
|
79
|
-
display: inline-block;
|
|
80
|
-
overflow: hidden;
|
|
81
|
-
}
|
|
82
|
-
.beautifi-lite-image {
|
|
83
|
-
display: block;
|
|
84
|
-
width: 100%;
|
|
85
|
-
height: auto;
|
|
86
|
-
}
|
|
87
|
-
.beautifi-lite-paused {
|
|
88
|
-
animation-play-state: paused !important;
|
|
89
|
-
}
|
|
90
|
-
`;
|
|
91
|
-
document.head.appendChild(this.styleElement);
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* Setup intersection observer for lazy loading
|
|
95
|
-
*/
|
|
96
|
-
setupIntersectionObserver() {
|
|
97
|
-
this.observer = new IntersectionObserver(
|
|
98
|
-
(entries) => {
|
|
99
|
-
entries.forEach((entry) => {
|
|
100
|
-
const element = entry.target;
|
|
101
|
-
if (entry.isIntersecting) {
|
|
102
|
-
element.classList.remove("beautifi-lite-paused");
|
|
103
|
-
} else {
|
|
104
|
-
element.classList.add("beautifi-lite-paused");
|
|
105
|
-
}
|
|
106
|
-
});
|
|
107
|
-
},
|
|
108
|
-
{ threshold: 0.1 }
|
|
109
|
-
);
|
|
110
|
-
}
|
|
111
|
-
/**
|
|
112
|
-
* Process all matching elements
|
|
113
|
-
*/
|
|
114
|
-
processElements() {
|
|
115
|
-
const elements = document.querySelectorAll(this.options.selector);
|
|
116
|
-
elements.forEach((element) => this.animateElement(element));
|
|
117
|
-
}
|
|
118
|
-
/**
|
|
119
|
-
* Animate a single element
|
|
120
|
-
*/
|
|
121
|
-
animateElement(element) {
|
|
122
|
-
if (this.animatedElements.has(element)) return;
|
|
123
|
-
const intensity = element.dataset.beautifiIntensity || this.options.intensity;
|
|
124
|
-
const type = element.dataset.beautifiType || this.options.type;
|
|
125
|
-
const duration = parseInt(element.dataset.beautifiDuration || "", 10) || this.options.duration;
|
|
126
|
-
const loop = element.dataset.beautifiLoop !== "false" && this.options.loop;
|
|
127
|
-
const scale = INTENSITY_SCALE[intensity];
|
|
128
|
-
const animationCSS = CSS_ANIMATIONS[type](scale, duration);
|
|
129
|
-
element.style.cssText += animationCSS;
|
|
130
|
-
if (!loop) {
|
|
131
|
-
element.style.animationIterationCount = "1";
|
|
132
|
-
}
|
|
133
|
-
if (this.observer) {
|
|
134
|
-
this.observer.observe(element);
|
|
135
|
-
element.classList.add("beautifi-lite-paused");
|
|
136
|
-
}
|
|
137
|
-
this.animatedElements.add(element);
|
|
138
|
-
element.setAttribute("data-beautifi-lite", "active");
|
|
139
|
-
}
|
|
140
|
-
/**
|
|
141
|
-
* Pause animation on an element
|
|
142
|
-
*/
|
|
143
|
-
pause(element) {
|
|
144
|
-
if (element) {
|
|
145
|
-
element.classList.add("beautifi-lite-paused");
|
|
146
|
-
} else {
|
|
147
|
-
this.animatedElements.forEach((el) => {
|
|
148
|
-
el.classList.add("beautifi-lite-paused");
|
|
149
|
-
});
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
/**
|
|
153
|
-
* Resume animation on an element
|
|
154
|
-
*/
|
|
155
|
-
resume(element) {
|
|
156
|
-
if (element) {
|
|
157
|
-
element.classList.remove("beautifi-lite-paused");
|
|
158
|
-
} else {
|
|
159
|
-
this.animatedElements.forEach((el) => {
|
|
160
|
-
el.classList.remove("beautifi-lite-paused");
|
|
161
|
-
});
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
/**
|
|
165
|
-
* Stop and cleanup animation on an element
|
|
166
|
-
*/
|
|
167
|
-
stop(element) {
|
|
168
|
-
element.style.animation = "";
|
|
169
|
-
element.removeAttribute("data-beautifi-lite");
|
|
170
|
-
this.animatedElements.delete(element);
|
|
171
|
-
this.observer?.unobserve(element);
|
|
172
|
-
}
|
|
173
|
-
/**
|
|
174
|
-
* Destroy the lite engine and cleanup
|
|
175
|
-
*/
|
|
176
|
-
destroy() {
|
|
177
|
-
this.observer?.disconnect();
|
|
178
|
-
this.styleElement?.remove();
|
|
179
|
-
this.animatedElements.forEach((el) => {
|
|
180
|
-
el.style.animation = "";
|
|
181
|
-
el.removeAttribute("data-beautifi-lite");
|
|
182
|
-
});
|
|
183
|
-
this.animatedElements.clear();
|
|
184
|
-
}
|
|
185
|
-
/**
|
|
186
|
-
* Check if an element is currently animated
|
|
187
|
-
*/
|
|
188
|
-
isAnimated(element) {
|
|
189
|
-
return this.animatedElements.has(element);
|
|
190
|
-
}
|
|
191
|
-
/**
|
|
192
|
-
* Get the number of animated elements
|
|
193
|
-
*/
|
|
194
|
-
get count() {
|
|
195
|
-
return this.animatedElements.size;
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
function initLite(options) {
|
|
199
|
-
return new beautifiLite(options);
|
|
200
|
-
}
|
|
201
|
-
if (typeof document !== "undefined") {
|
|
202
|
-
const autoInit = document.querySelector("[data-beautifi-lite-auto]");
|
|
203
|
-
if (autoInit) {
|
|
204
|
-
new beautifiLite();
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
export {
|
|
208
|
-
beautifiLite,
|
|
209
|
-
beautifiLite as default,
|
|
210
|
-
initLite
|
|
211
|
-
};
|
|
212
|
-
//# sourceMappingURL=beautifi-lite.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"beautifi-lite.esm.js","sources":["../src/lite.ts"],"sourcesContent":["/**\n * beautifi Lite - Minimal CSS-only animation bundle\n * \n * This is a lightweight (<5KB) version of beautifi that provides\n * basic CSS-based animations without requiring AI processing.\n * \n * Users can upgrade to the full AI-powered version for advanced features.\n * \n * @packageDocumentation\n */\n\nexport interface beautifiLiteOptions {\n /** Selector for images to animate */\n selector?: string;\n /** Animation intensity: 'subtle' | 'moderate' | 'strong' */\n intensity?: 'subtle' | 'moderate' | 'strong';\n /** Animation type: 'breathe' | 'sway' | 'parallax' | 'pulse' */\n type?: 'breathe' | 'sway' | 'parallax' | 'pulse';\n /** Whether to loop the animation */\n loop?: boolean;\n /** Animation duration in milliseconds */\n duration?: number;\n /** Enable intersection observer for lazy animation */\n lazyLoad?: boolean;\n}\n\nconst DEFAULT_OPTIONS: Required<beautifiLiteOptions> = {\n selector: '[data-beautifi]',\n intensity: 'subtle',\n type: 'breathe',\n loop: true,\n duration: 4000,\n lazyLoad: true,\n};\n\nconst INTENSITY_SCALE = {\n subtle: 0.5,\n moderate: 1,\n strong: 1.5,\n};\n\nconst CSS_ANIMATIONS = {\n breathe: (scale: number, duration: number) => `\n @keyframes beautifi-breathe {\n 0%, 100% { transform: scale(1); }\n 50% { transform: scale(${1 + 0.02 * scale}); }\n }\n animation: beautifi-breathe ${duration}ms ease-in-out infinite;\n `,\n sway: (scale: number, duration: number) => `\n @keyframes beautifi-sway {\n 0%, 100% { transform: translateX(0); }\n 25% { transform: translateX(${2 * scale}px); }\n 75% { transform: translateX(${-2 * scale}px); }\n }\n animation: beautifi-sway ${duration}ms ease-in-out infinite;\n `,\n parallax: (scale: number, duration: number) => `\n @keyframes beautifi-parallax {\n 0%, 100% { transform: translateY(0) scale(1.02); }\n 50% { transform: translateY(${-3 * scale}px) scale(1.02); }\n }\n animation: beautifi-parallax ${duration}ms ease-in-out infinite;\n overflow: hidden;\n `,\n pulse: (scale: number, duration: number) => `\n @keyframes beautifi-pulse {\n 0%, 100% { filter: brightness(1); }\n 50% { filter: brightness(${1 + 0.05 * scale}); }\n }\n animation: beautifi-pulse ${duration}ms ease-in-out infinite;\n `,\n};\n\n/**\n * beautifi Lite - CSS-only animation engine\n * \n * Provides lightweight, CSS-based animations for images without AI processing.\n * Use this for basic effects or as a fallback when AI is not available.\n */\nexport class beautifiLite {\n private options: Required<beautifiLiteOptions>;\n private observer: IntersectionObserver | null = null;\n private styleElement: HTMLStyleElement | null = null;\n private animatedElements: Set<Element> = new Set();\n\n constructor(options: beautifiLiteOptions = {}) {\n this.options = { ...DEFAULT_OPTIONS, ...options };\n this.injectGlobalStyles();\n\n if (typeof document !== 'undefined') {\n if (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', () => this.init());\n } else {\n this.init();\n }\n }\n }\n\n /**\n * Initialize the lite animation engine\n */\n private init(): void {\n if (this.options.lazyLoad && 'IntersectionObserver' in window) {\n this.setupIntersectionObserver();\n }\n this.processElements();\n }\n\n /**\n * Inject global CSS for animations\n */\n private injectGlobalStyles(): void {\n if (typeof document === 'undefined') return;\n\n this.styleElement = document.createElement('style');\n this.styleElement.id = 'beautifi-lite-styles';\n this.styleElement.textContent = `\n .beautifi-lite-container {\n display: inline-block;\n overflow: hidden;\n }\n .beautifi-lite-image {\n display: block;\n width: 100%;\n height: auto;\n }\n .beautifi-lite-paused {\n animation-play-state: paused !important;\n }\n `;\n document.head.appendChild(this.styleElement);\n }\n\n /**\n * Setup intersection observer for lazy loading\n */\n private setupIntersectionObserver(): void {\n this.observer = new IntersectionObserver(\n (entries) => {\n entries.forEach((entry) => {\n const element = entry.target as HTMLElement;\n if (entry.isIntersecting) {\n element.classList.remove('beautifi-lite-paused');\n } else {\n element.classList.add('beautifi-lite-paused');\n }\n });\n },\n { threshold: 0.1 }\n );\n }\n\n /**\n * Process all matching elements\n */\n private processElements(): void {\n const elements = document.querySelectorAll(this.options.selector);\n elements.forEach((element) => this.animateElement(element as HTMLElement));\n }\n\n /**\n * Animate a single element\n */\n public animateElement(element: HTMLElement): void {\n if (this.animatedElements.has(element)) return;\n\n // Get element-specific options from data attributes\n const intensity = (element.dataset.beautifiIntensity as beautifiLiteOptions['intensity']) || this.options.intensity;\n const type = (element.dataset.beautifiType as beautifiLiteOptions['type']) || this.options.type;\n const duration = parseInt(element.dataset.beautifiDuration || '', 10) || this.options.duration;\n const loop = element.dataset.beautifiLoop !== 'false' && this.options.loop;\n\n const scale = INTENSITY_SCALE[intensity];\n const animationCSS = CSS_ANIMATIONS[type](scale, duration);\n\n // Apply animation\n element.style.cssText += animationCSS;\n if (!loop) {\n element.style.animationIterationCount = '1';\n }\n\n // Add to observer if lazy loading\n if (this.observer) {\n this.observer.observe(element);\n element.classList.add('beautifi-lite-paused');\n }\n\n this.animatedElements.add(element);\n element.setAttribute('data-beautifi-lite', 'active');\n }\n\n /**\n * Pause animation on an element\n */\n public pause(element?: HTMLElement): void {\n if (element) {\n element.classList.add('beautifi-lite-paused');\n } else {\n this.animatedElements.forEach((el) => {\n (el as HTMLElement).classList.add('beautifi-lite-paused');\n });\n }\n }\n\n /**\n * Resume animation on an element\n */\n public resume(element?: HTMLElement): void {\n if (element) {\n element.classList.remove('beautifi-lite-paused');\n } else {\n this.animatedElements.forEach((el) => {\n (el as HTMLElement).classList.remove('beautifi-lite-paused');\n });\n }\n }\n\n /**\n * Stop and cleanup animation on an element\n */\n public stop(element: HTMLElement): void {\n element.style.animation = '';\n element.removeAttribute('data-beautifi-lite');\n this.animatedElements.delete(element);\n this.observer?.unobserve(element);\n }\n\n /**\n * Destroy the lite engine and cleanup\n */\n public destroy(): void {\n this.observer?.disconnect();\n this.styleElement?.remove();\n this.animatedElements.forEach((el) => {\n (el as HTMLElement).style.animation = '';\n el.removeAttribute('data-beautifi-lite');\n });\n this.animatedElements.clear();\n }\n\n /**\n * Check if an element is currently animated\n */\n public isAnimated(element: HTMLElement): boolean {\n return this.animatedElements.has(element);\n }\n\n /**\n * Get the number of animated elements\n */\n public get count(): number {\n return this.animatedElements.size;\n }\n}\n\n/**\n * Initialize beautifi Lite with options\n */\nexport function initLite(options?: beautifiLiteOptions): beautifiLite {\n return new beautifiLite(options);\n}\n\n/**\n * Auto-initialize if data-beautifi-lite-auto attribute is present\n */\nif (typeof document !== 'undefined') {\n const autoInit = document.querySelector('[data-beautifi-lite-auto]');\n if (autoInit) {\n new beautifiLite();\n }\n}\n\nexport default beautifiLite;\n"],"names":[],"mappings":"AA0BA,MAAM,kBAAiD;AAAA,EACnD,UAAU;AAAA,EACV,WAAW;AAAA,EACX,MAAM;AAAA,EACN,MAAM;AAAA,EACN,UAAU;AAAA,EACV,UAAU;AACd;AAEA,MAAM,kBAAkB;AAAA,EACpB,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,QAAQ;AACZ;AAEA,MAAM,iBAAiB;AAAA,EACnB,SAAS,CAAC,OAAe,aAAqB;AAAA;AAAA;AAAA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|
|
|
1
|
-
var beautifiLite=function(e){"use strict";const t={selector:"[data-beautifi]",intensity:"subtle",type:"breathe",loop:!0,duration:4e3,lazyLoad:!0},i={subtle:.5,moderate:1,strong:1.5},n={breathe:(e,t)=>`\n @keyframes beautifi-breathe {\n 0%, 100% { transform: scale(1); }\n 50% { transform: scale(${1+.02*e}); }\n }\n animation: beautifi-breathe ${t}ms ease-in-out infinite;\n `,sway:(e,t)=>`\n @keyframes beautifi-sway {\n 0%, 100% { transform: translateX(0); }\n 25% { transform: translateX(${2*e}px); }\n 75% { transform: translateX(${-2*e}px); }\n }\n animation: beautifi-sway ${t}ms ease-in-out infinite;\n `,parallax:(e,t)=>`\n @keyframes beautifi-parallax {\n 0%, 100% { transform: translateY(0) scale(1.02); }\n 50% { transform: translateY(${-3*e}px) scale(1.02); }\n }\n animation: beautifi-parallax ${t}ms ease-in-out infinite;\n overflow: hidden;\n `,pulse:(e,t)=>`\n @keyframes beautifi-pulse {\n 0%, 100% { filter: brightness(1); }\n 50% { filter: brightness(${1+.05*e}); }\n }\n animation: beautifi-pulse ${t}ms ease-in-out infinite;\n `};class a{constructor(e={}){this.observer=null,this.styleElement=null,this.animatedElements=new Set,this.options={...t,...e},this.injectGlobalStyles(),"undefined"!=typeof document&&("loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>this.init()):this.init())}init(){this.options.lazyLoad&&"IntersectionObserver"in window&&this.setupIntersectionObserver(),this.processElements()}injectGlobalStyles(){"undefined"!=typeof document&&(this.styleElement=document.createElement("style"),this.styleElement.id="beautifi-lite-styles",this.styleElement.textContent="\n .beautifi-lite-container {\n display: inline-block;\n overflow: hidden;\n }\n .beautifi-lite-image {\n display: block;\n width: 100%;\n height: auto;\n }\n .beautifi-lite-paused {\n animation-play-state: paused !important;\n }\n ",document.head.appendChild(this.styleElement))}setupIntersectionObserver(){this.observer=new IntersectionObserver(e=>{e.forEach(e=>{const t=e.target;e.isIntersecting?t.classList.remove("beautifi-lite-paused"):t.classList.add("beautifi-lite-paused")})},{threshold:.1})}processElements(){document.querySelectorAll(this.options.selector).forEach(e=>this.animateElement(e))}animateElement(e){if(this.animatedElements.has(e))return;const t=e.dataset.beautifiIntensity||this.options.intensity,a=e.dataset.beautifiType||this.options.type,s=parseInt(e.dataset.beautifiDuration||"",10)||this.options.duration,o="false"!==e.dataset.beautifiLoop&&this.options.loop,r=i[t],l=n[a](r,s);e.style.cssText+=l,o||(e.style.animationIterationCount="1"),this.observer&&(this.observer.observe(e),e.classList.add("beautifi-lite-paused")),this.animatedElements.add(e),e.setAttribute("data-beautifi-lite","active")}pause(e){e?e.classList.add("beautifi-lite-paused"):this.animatedElements.forEach(e=>{e.classList.add("beautifi-lite-paused")})}resume(e){e?e.classList.remove("beautifi-lite-paused"):this.animatedElements.forEach(e=>{e.classList.remove("beautifi-lite-paused")})}stop(e){e.style.animation="",e.removeAttribute("data-beautifi-lite"),this.animatedElements.delete(e),this.observer?.unobserve(e)}destroy(){this.observer?.disconnect(),this.styleElement?.remove(),this.animatedElements.forEach(e=>{e.style.animation="",e.removeAttribute("data-beautifi-lite")}),this.animatedElements.clear()}isAnimated(e){return this.animatedElements.has(e)}get count(){return this.animatedElements.size}}if("undefined"!=typeof document){document.querySelector("[data-beautifi-lite-auto]")&&new a}return e.beautifiLite=a,e.default=a,e.initLite=function(e){return new a(e)},Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),e}({});
|
|
2
|
-
//# sourceMappingURL=beautifi-lite.min.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"beautifi-lite.min.js","sources":["../src/lite.ts"],"sourcesContent":["/**\n * beautifi Lite - Minimal CSS-only animation bundle\n * \n * This is a lightweight (<5KB) version of beautifi that provides\n * basic CSS-based animations without requiring AI processing.\n * \n * Users can upgrade to the full AI-powered version for advanced features.\n * \n * @packageDocumentation\n */\n\nexport interface beautifiLiteOptions {\n /** Selector for images to animate */\n selector?: string;\n /** Animation intensity: 'subtle' | 'moderate' | 'strong' */\n intensity?: 'subtle' | 'moderate' | 'strong';\n /** Animation type: 'breathe' | 'sway' | 'parallax' | 'pulse' */\n type?: 'breathe' | 'sway' | 'parallax' | 'pulse';\n /** Whether to loop the animation */\n loop?: boolean;\n /** Animation duration in milliseconds */\n duration?: number;\n /** Enable intersection observer for lazy animation */\n lazyLoad?: boolean;\n}\n\nconst DEFAULT_OPTIONS: Required<beautifiLiteOptions> = {\n selector: '[data-beautifi]',\n intensity: 'subtle',\n type: 'breathe',\n loop: true,\n duration: 4000,\n lazyLoad: true,\n};\n\nconst INTENSITY_SCALE = {\n subtle: 0.5,\n moderate: 1,\n strong: 1.5,\n};\n\nconst CSS_ANIMATIONS = {\n breathe: (scale: number, duration: number) => `\n @keyframes beautifi-breathe {\n 0%, 100% { transform: scale(1); }\n 50% { transform: scale(${1 + 0.02 * scale}); }\n }\n animation: beautifi-breathe ${duration}ms ease-in-out infinite;\n `,\n sway: (scale: number, duration: number) => `\n @keyframes beautifi-sway {\n 0%, 100% { transform: translateX(0); }\n 25% { transform: translateX(${2 * scale}px); }\n 75% { transform: translateX(${-2 * scale}px); }\n }\n animation: beautifi-sway ${duration}ms ease-in-out infinite;\n `,\n parallax: (scale: number, duration: number) => `\n @keyframes beautifi-parallax {\n 0%, 100% { transform: translateY(0) scale(1.02); }\n 50% { transform: translateY(${-3 * scale}px) scale(1.02); }\n }\n animation: beautifi-parallax ${duration}ms ease-in-out infinite;\n overflow: hidden;\n `,\n pulse: (scale: number, duration: number) => `\n @keyframes beautifi-pulse {\n 0%, 100% { filter: brightness(1); }\n 50% { filter: brightness(${1 + 0.05 * scale}); }\n }\n animation: beautifi-pulse ${duration}ms ease-in-out infinite;\n `,\n};\n\n/**\n * beautifi Lite - CSS-only animation engine\n * \n * Provides lightweight, CSS-based animations for images without AI processing.\n * Use this for basic effects or as a fallback when AI is not available.\n */\nexport class beautifiLite {\n private options: Required<beautifiLiteOptions>;\n private observer: IntersectionObserver | null = null;\n private styleElement: HTMLStyleElement | null = null;\n private animatedElements: Set<Element> = new Set();\n\n constructor(options: beautifiLiteOptions = {}) {\n this.options = { ...DEFAULT_OPTIONS, ...options };\n this.injectGlobalStyles();\n\n if (typeof document !== 'undefined') {\n if (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', () => this.init());\n } else {\n this.init();\n }\n }\n }\n\n /**\n * Initialize the lite animation engine\n */\n private init(): void {\n if (this.options.lazyLoad && 'IntersectionObserver' in window) {\n this.setupIntersectionObserver();\n }\n this.processElements();\n }\n\n /**\n * Inject global CSS for animations\n */\n private injectGlobalStyles(): void {\n if (typeof document === 'undefined') return;\n\n this.styleElement = document.createElement('style');\n this.styleElement.id = 'beautifi-lite-styles';\n this.styleElement.textContent = `\n .beautifi-lite-container {\n display: inline-block;\n overflow: hidden;\n }\n .beautifi-lite-image {\n display: block;\n width: 100%;\n height: auto;\n }\n .beautifi-lite-paused {\n animation-play-state: paused !important;\n }\n `;\n document.head.appendChild(this.styleElement);\n }\n\n /**\n * Setup intersection observer for lazy loading\n */\n private setupIntersectionObserver(): void {\n this.observer = new IntersectionObserver(\n (entries) => {\n entries.forEach((entry) => {\n const element = entry.target as HTMLElement;\n if (entry.isIntersecting) {\n element.classList.remove('beautifi-lite-paused');\n } else {\n element.classList.add('beautifi-lite-paused');\n }\n });\n },\n { threshold: 0.1 }\n );\n }\n\n /**\n * Process all matching elements\n */\n private processElements(): void {\n const elements = document.querySelectorAll(this.options.selector);\n elements.forEach((element) => this.animateElement(element as HTMLElement));\n }\n\n /**\n * Animate a single element\n */\n public animateElement(element: HTMLElement): void {\n if (this.animatedElements.has(element)) return;\n\n // Get element-specific options from data attributes\n const intensity = (element.dataset.beautifiIntensity as beautifiLiteOptions['intensity']) || this.options.intensity;\n const type = (element.dataset.beautifiType as beautifiLiteOptions['type']) || this.options.type;\n const duration = parseInt(element.dataset.beautifiDuration || '', 10) || this.options.duration;\n const loop = element.dataset.beautifiLoop !== 'false' && this.options.loop;\n\n const scale = INTENSITY_SCALE[intensity];\n const animationCSS = CSS_ANIMATIONS[type](scale, duration);\n\n // Apply animation\n element.style.cssText += animationCSS;\n if (!loop) {\n element.style.animationIterationCount = '1';\n }\n\n // Add to observer if lazy loading\n if (this.observer) {\n this.observer.observe(element);\n element.classList.add('beautifi-lite-paused');\n }\n\n this.animatedElements.add(element);\n element.setAttribute('data-beautifi-lite', 'active');\n }\n\n /**\n * Pause animation on an element\n */\n public pause(element?: HTMLElement): void {\n if (element) {\n element.classList.add('beautifi-lite-paused');\n } else {\n this.animatedElements.forEach((el) => {\n (el as HTMLElement).classList.add('beautifi-lite-paused');\n });\n }\n }\n\n /**\n * Resume animation on an element\n */\n public resume(element?: HTMLElement): void {\n if (element) {\n element.classList.remove('beautifi-lite-paused');\n } else {\n this.animatedElements.forEach((el) => {\n (el as HTMLElement).classList.remove('beautifi-lite-paused');\n });\n }\n }\n\n /**\n * Stop and cleanup animation on an element\n */\n public stop(element: HTMLElement): void {\n element.style.animation = '';\n element.removeAttribute('data-beautifi-lite');\n this.animatedElements.delete(element);\n this.observer?.unobserve(element);\n }\n\n /**\n * Destroy the lite engine and cleanup\n */\n public destroy(): void {\n this.observer?.disconnect();\n this.styleElement?.remove();\n this.animatedElements.forEach((el) => {\n (el as HTMLElement).style.animation = '';\n el.removeAttribute('data-beautifi-lite');\n });\n this.animatedElements.clear();\n }\n\n /**\n * Check if an element is currently animated\n */\n public isAnimated(element: HTMLElement): boolean {\n return this.animatedElements.has(element);\n }\n\n /**\n * Get the number of animated elements\n */\n public get count(): number {\n return this.animatedElements.size;\n }\n}\n\n/**\n * Initialize beautifi Lite with options\n */\nexport function initLite(options?: beautifiLiteOptions): beautifiLite {\n return new beautifiLite(options);\n}\n\n/**\n * Auto-initialize if data-beautifi-lite-auto attribute is present\n */\nif (typeof document !== 'undefined') {\n const autoInit = document.querySelector('[data-beautifi-lite-auto]');\n if (autoInit) {\n new beautifiLite();\n }\n}\n\nexport default beautifiLite;\n"],"names":["DEFAULT_OPTIONS","selector","intensity","type","loop","duration","lazyLoad","INTENSITY_SCALE","subtle","moderate","strong","CSS_ANIMATIONS","breathe","scale","sway","parallax","pulse","beautifiLite","constructor","options","this","observer","styleElement","animatedElements","Set","injectGlobalStyles","document","readyState","addEventListener","init","window","setupIntersectionObserver","processElements","createElement","id","textContent","head","appendChild","IntersectionObserver","entries","forEach","entry","element","target","isIntersecting","classList","remove","add","threshold","querySelectorAll","animateElement","has","dataset","beautifiIntensity","beautifiType","parseInt","beautifiDuration","beautifiLoop","animationCSS","style","cssText","animationIterationCount","observe","setAttribute","pause","el","resume","stop","animation","removeAttribute","delete","unobserve","destroy","disconnect","clear","isAnimated","count","size","querySelector"],"mappings":"0CA0BA,MAAMA,EAAiD,CACnDC,SAAU,kBACVC,UAAW,SACXC,KAAM,UACNC,MAAM,EACNC,SAAU,IACVC,UAAU,GAGRC,EAAkB,CACpBC,OAAQ,GACRC,SAAU,EACVC,OAAQ,KAGNC,EAAiB,CACnBC,QAAS,CAACC,EAAeR,IAAqB,8GAGnB,EAAI,IAAOQ,iDAERR,gCAE9BS,KAAM,CAACD,EAAeR,IAAqB,qHAGX,EAAIQ,iDACCA,gDAEVR,gCAE3BU,SAAU,CAACF,EAAeR,IAAqB,wIAGVQ,gEAENR,uDAG/BW,MAAO,CAACH,EAAeR,IAAqB,gHAGf,EAAI,IAAOQ,+CAEZR,iCAUzB,MAAMY,EAMT,WAAAC,CAAYC,EAA+B,IAJ3CC,KAAQC,SAAwC,KAChDD,KAAQE,aAAwC,KAChDF,KAAQG,qBAAqCC,IAGzCJ,KAAKD,QAAU,IAAKnB,KAAoBmB,GACxCC,KAAKK,qBAEmB,oBAAbC,WACqB,YAAxBA,SAASC,WACTD,SAASE,iBAAiB,mBAAoB,IAAMR,KAAKS,QAEzDT,KAAKS,OAGjB,CAKQ,IAAAA,GACAT,KAAKD,QAAQb,UAAY,yBAA0BwB,QACnDV,KAAKW,4BAETX,KAAKY,iBACT,CAKQ,kBAAAP,GACoB,o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B1B,KAAKG,iBAAiBiB,QAASyB,IAC1BA,EAAmBpB,UAAUC,OAAO,yBAGjD,CAKO,IAAAqB,CAAKzB,GACRA,EAAQiB,MAAMS,UAAY,GAC1B1B,EAAQ2B,gBAAgB,sBACxBjD,KAAKG,iBAAiB+C,OAAO5B,GAC7BtB,KAAKC,UAAUkD,UAAU7B,EAC7B,CAKO,OAAA8B,GACHpD,KAAKC,UAAUoD,aACfrD,KAAKE,cAAcwB,SACnB1B,KAAKG,iBAAiBiB,QAASyB,IAC1BA,EAAmBN,MAAMS,UAAY,GACtCH,EAAGI,gBAAgB,wBAEvBjD,KAAKG,iBAAiBmD,OAC1B,CAKO,UAAAC,CAAWjC,GACd,OAAOtB,KAAKG,iBAAiB4B,IAAIT,EACrC,CAKA,SAAWkC,GACP,OAAOxD,KAAKG,iBAAiBsD,IACjC,EAaJ,GAAwB,oBAAbnD,SAA0B,CAChBA,SAASoD,cAAc,8BAEpC,IAAI7D,CAEZ,gDAZO,SAAkBE,GACrB,OAAO,IAAIF,EAAaE,EAC5B"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).beautifiLite={})}(this,function(e){"use strict";const t={selector:"[data-beautifi]",intensity:"subtle",type:"breathe",loop:!0,duration:4e3,lazyLoad:!0},i={subtle:.5,moderate:1,strong:1.5},n={breathe:(e,t)=>`\n @keyframes beautifi-breathe {\n 0%, 100% { transform: scale(1); }\n 50% { transform: scale(${1+.02*e}); }\n }\n animation: beautifi-breathe ${t}ms ease-in-out infinite;\n `,sway:(e,t)=>`\n @keyframes beautifi-sway {\n 0%, 100% { transform: translateX(0); }\n 25% { transform: translateX(${2*e}px); }\n 75% { transform: translateX(${-2*e}px); }\n }\n animation: beautifi-sway ${t}ms ease-in-out infinite;\n `,parallax:(e,t)=>`\n @keyframes beautifi-parallax {\n 0%, 100% { transform: translateY(0) scale(1.02); }\n 50% { transform: translateY(${-3*e}px) scale(1.02); }\n }\n animation: beautifi-parallax ${t}ms ease-in-out infinite;\n overflow: hidden;\n `,pulse:(e,t)=>`\n @keyframes beautifi-pulse {\n 0%, 100% { filter: brightness(1); }\n 50% { filter: brightness(${1+.05*e}); }\n }\n animation: beautifi-pulse ${t}ms ease-in-out infinite;\n `};class s{constructor(e={}){this.observer=null,this.styleElement=null,this.animatedElements=new Set,this.options={...t,...e},this.injectGlobalStyles(),"undefined"!=typeof document&&("loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>this.init()):this.init())}init(){this.options.lazyLoad&&"IntersectionObserver"in window&&this.setupIntersectionObserver(),this.processElements()}injectGlobalStyles(){"undefined"!=typeof document&&(this.styleElement=document.createElement("style"),this.styleElement.id="beautifi-lite-styles",this.styleElement.textContent="\n .beautifi-lite-container {\n display: inline-block;\n overflow: hidden;\n }\n .beautifi-lite-image {\n display: block;\n width: 100%;\n height: auto;\n }\n .beautifi-lite-paused {\n animation-play-state: paused !important;\n }\n ",document.head.appendChild(this.styleElement))}setupIntersectionObserver(){this.observer=new IntersectionObserver(e=>{e.forEach(e=>{const t=e.target;e.isIntersecting?t.classList.remove("beautifi-lite-paused"):t.classList.add("beautifi-lite-paused")})},{threshold:.1})}processElements(){document.querySelectorAll(this.options.selector).forEach(e=>this.animateElement(e))}animateElement(e){if(this.animatedElements.has(e))return;const t=e.dataset.beautifiIntensity||this.options.intensity,s=e.dataset.beautifiType||this.options.type,a=parseInt(e.dataset.beautifiDuration||"",10)||this.options.duration,o="false"!==e.dataset.beautifiLoop&&this.options.loop,l=i[t],r=n[s](l,a);e.style.cssText+=r,o||(e.style.animationIterationCount="1"),this.observer&&(this.observer.observe(e),e.classList.add("beautifi-lite-paused")),this.animatedElements.add(e),e.setAttribute("data-beautifi-lite","active")}pause(e){e?e.classList.add("beautifi-lite-paused"):this.animatedElements.forEach(e=>{e.classList.add("beautifi-lite-paused")})}resume(e){e?e.classList.remove("beautifi-lite-paused"):this.animatedElements.forEach(e=>{e.classList.remove("beautifi-lite-paused")})}stop(e){e.style.animation="",e.removeAttribute("data-beautifi-lite"),this.animatedElements.delete(e),this.observer?.unobserve(e)}destroy(){this.observer?.disconnect(),this.styleElement?.remove(),this.animatedElements.forEach(e=>{e.style.animation="",e.removeAttribute("data-beautifi-lite")}),this.animatedElements.clear()}isAnimated(e){return this.animatedElements.has(e)}get count(){return this.animatedElements.size}}if("undefined"!=typeof document){document.querySelector("[data-beautifi-lite-auto]")&&new s}e.beautifiLite=s,e.default=s,e.initLite=function(e){return new s(e)},Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
2
|
-
//# sourceMappingURL=beautifi-lite.umd.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"beautifi-lite.umd.js","sources":["../src/lite.ts"],"sourcesContent":["/**\n * beautifi Lite - Minimal CSS-only animation bundle\n * \n * This is a lightweight (<5KB) version of beautifi that provides\n * basic CSS-based animations without requiring AI processing.\n * \n * Users can upgrade to the full AI-powered version for advanced features.\n * \n * @packageDocumentation\n */\n\nexport interface beautifiLiteOptions {\n /** Selector for images to animate */\n selector?: string;\n /** Animation intensity: 'subtle' | 'moderate' | 'strong' */\n intensity?: 'subtle' | 'moderate' | 'strong';\n /** Animation type: 'breathe' | 'sway' | 'parallax' | 'pulse' */\n type?: 'breathe' | 'sway' | 'parallax' | 'pulse';\n /** Whether to loop the animation */\n loop?: boolean;\n /** Animation duration in milliseconds */\n duration?: number;\n /** Enable intersection observer for lazy animation */\n lazyLoad?: boolean;\n}\n\nconst DEFAULT_OPTIONS: Required<beautifiLiteOptions> = {\n selector: '[data-beautifi]',\n intensity: 'subtle',\n type: 'breathe',\n loop: true,\n duration: 4000,\n lazyLoad: true,\n};\n\nconst INTENSITY_SCALE = {\n subtle: 0.5,\n moderate: 1,\n strong: 1.5,\n};\n\nconst CSS_ANIMATIONS = {\n breathe: (scale: number, duration: number) => `\n @keyframes beautifi-breathe {\n 0%, 100% { transform: scale(1); }\n 50% { transform: scale(${1 + 0.02 * scale}); }\n }\n animation: beautifi-breathe ${duration}ms ease-in-out infinite;\n `,\n sway: (scale: number, duration: number) => `\n @keyframes beautifi-sway {\n 0%, 100% { transform: translateX(0); }\n 25% { transform: translateX(${2 * scale}px); }\n 75% { transform: translateX(${-2 * scale}px); }\n }\n animation: beautifi-sway ${duration}ms ease-in-out infinite;\n `,\n parallax: (scale: number, duration: number) => `\n @keyframes beautifi-parallax {\n 0%, 100% { transform: translateY(0) scale(1.02); }\n 50% { transform: translateY(${-3 * scale}px) scale(1.02); }\n }\n animation: beautifi-parallax ${duration}ms ease-in-out infinite;\n overflow: hidden;\n `,\n pulse: (scale: number, duration: number) => `\n @keyframes beautifi-pulse {\n 0%, 100% { filter: brightness(1); }\n 50% { filter: brightness(${1 + 0.05 * scale}); }\n }\n animation: beautifi-pulse ${duration}ms ease-in-out infinite;\n `,\n};\n\n/**\n * beautifi Lite - CSS-only animation engine\n * \n * Provides lightweight, CSS-based animations for images without AI processing.\n * Use this for basic effects or as a fallback when AI is not available.\n */\nexport class beautifiLite {\n private options: Required<beautifiLiteOptions>;\n private observer: IntersectionObserver | null = null;\n private styleElement: HTMLStyleElement | null = null;\n private animatedElements: Set<Element> = new Set();\n\n constructor(options: beautifiLiteOptions = {}) {\n this.options = { ...DEFAULT_OPTIONS, ...options };\n this.injectGlobalStyles();\n\n if (typeof document !== 'undefined') {\n if (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', () => this.init());\n } else {\n this.init();\n }\n }\n }\n\n /**\n * Initialize the lite animation engine\n */\n private init(): void {\n if (this.options.lazyLoad && 'IntersectionObserver' in window) {\n this.setupIntersectionObserver();\n }\n this.processElements();\n }\n\n /**\n * Inject global CSS for animations\n */\n private injectGlobalStyles(): void {\n if (typeof document === 'undefined') return;\n\n this.styleElement = document.createElement('style');\n this.styleElement.id = 'beautifi-lite-styles';\n this.styleElement.textContent = `\n .beautifi-lite-container {\n display: inline-block;\n overflow: hidden;\n }\n .beautifi-lite-image {\n display: block;\n width: 100%;\n height: auto;\n }\n .beautifi-lite-paused {\n animation-play-state: paused !important;\n }\n `;\n document.head.appendChild(this.styleElement);\n }\n\n /**\n * Setup intersection observer for lazy loading\n */\n private setupIntersectionObserver(): void {\n this.observer = new IntersectionObserver(\n (entries) => {\n entries.forEach((entry) => {\n const element = entry.target as HTMLElement;\n if (entry.isIntersecting) {\n element.classList.remove('beautifi-lite-paused');\n } else {\n element.classList.add('beautifi-lite-paused');\n }\n });\n },\n { threshold: 0.1 }\n );\n }\n\n /**\n * Process all matching elements\n */\n private processElements(): void {\n const elements = document.querySelectorAll(this.options.selector);\n elements.forEach((element) => this.animateElement(element as HTMLElement));\n }\n\n /**\n * Animate a single element\n */\n public animateElement(element: HTMLElement): void {\n if (this.animatedElements.has(element)) return;\n\n // Get element-specific options from data attributes\n const intensity = (element.dataset.beautifiIntensity as beautifiLiteOptions['intensity']) || this.options.intensity;\n const type = (element.dataset.beautifiType as beautifiLiteOptions['type']) || this.options.type;\n const duration = parseInt(element.dataset.beautifiDuration || '', 10) || this.options.duration;\n const loop = element.dataset.beautifiLoop !== 'false' && this.options.loop;\n\n const scale = INTENSITY_SCALE[intensity];\n const animationCSS = CSS_ANIMATIONS[type](scale, duration);\n\n // Apply animation\n element.style.cssText += animationCSS;\n if (!loop) {\n element.style.animationIterationCount = '1';\n }\n\n // Add to observer if lazy loading\n if (this.observer) {\n this.observer.observe(element);\n element.classList.add('beautifi-lite-paused');\n }\n\n this.animatedElements.add(element);\n element.setAttribute('data-beautifi-lite', 'active');\n }\n\n /**\n * Pause animation on an element\n */\n public pause(element?: HTMLElement): void {\n if (element) {\n element.classList.add('beautifi-lite-paused');\n } else {\n this.animatedElements.forEach((el) => {\n (el as HTMLElement).classList.add('beautifi-lite-paused');\n });\n }\n }\n\n /**\n * Resume animation on an element\n */\n public resume(element?: HTMLElement): void {\n if (element) {\n element.classList.remove('beautifi-lite-paused');\n } else {\n this.animatedElements.forEach((el) => {\n (el as HTMLElement).classList.remove('beautifi-lite-paused');\n });\n }\n }\n\n /**\n * Stop and cleanup animation on an element\n */\n public stop(element: HTMLElement): void {\n element.style.animation = '';\n element.removeAttribute('data-beautifi-lite');\n this.animatedElements.delete(element);\n this.observer?.unobserve(element);\n }\n\n /**\n * Destroy the lite engine and cleanup\n */\n public destroy(): void {\n this.observer?.disconnect();\n this.styleElement?.remove();\n this.animatedElements.forEach((el) => {\n (el as HTMLElement).style.animation = '';\n el.removeAttribute('data-beautifi-lite');\n });\n this.animatedElements.clear();\n }\n\n /**\n * Check if an element is currently animated\n */\n public isAnimated(element: HTMLElement): boolean {\n return this.animatedElements.has(element);\n }\n\n /**\n * Get the number of animated elements\n */\n public get count(): number {\n return this.animatedElements.size;\n }\n}\n\n/**\n * Initialize beautifi Lite with options\n */\nexport function initLite(options?: beautifiLiteOptions): beautifiLite {\n return new beautifiLite(options);\n}\n\n/**\n * Auto-initialize if data-beautifi-lite-auto attribute is present\n */\nif (typeof document !== 'undefined') {\n const autoInit = document.querySelector('[data-beautifi-lite-auto]');\n if (autoInit) {\n new beautifiLite();\n }\n}\n\nexport default beautifiLite;\n"],"names":["DEFAULT_OPTIONS","selector","intensity","type","loop","duration","lazyLoad","INTENSITY_SCALE","subtle","moderate","strong","CSS_ANIMATIONS","breathe","scale","sway","parallax","pulse","beautifiLite","constructor","options","this","observer","styleElement","animatedElements","Set","injectGlobalStyles","document","readyState","addEventListener","init","window","setupIntersectionObserver","processElements","createElement","id","textContent","head","appendChild","IntersectionObserver","entries","forEach","entry","element","target","isIntersecting","classList","remove","add","threshold","querySelectorAll","animateElement","has","dataset","beautifiIntensity","beautifiType","parseInt","beautifiDuration","beautifiLoop","animationCSS","style","cssText","animationIterationCount","observe","setAttribute","pause","el","resume","stop","animation","removeAttribute","delete","unobserve","destroy","disconnect","clear","isAnimated","count","size","querySelector"],"mappings":"mPA0BA,MAAMA,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iBAAiB4B,IAAIT,EACrC,CAKA,SAAWkC,GACP,OAAOxD,KAAKG,iBAAiBsD,IACjC,EAaJ,GAAwB,oBAAbnD,SAA0B,CAChBA,SAASoD,cAAc,8BAEpC,IAAI7D,CAEZ,yCAZO,SAAkBE,GACrB,OAAO,IAAIF,EAAaE,EAC5B"}
|
package/dist/sri-hashes.json
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"generated": "2026-02-01T15:16:58.847Z",
|
|
3
|
-
"version": "0.1.0",
|
|
4
|
-
"files": {
|
|
5
|
-
"beautifi-lite.cjs.js": {
|
|
6
|
-
"sha384": "sha384-9JPNNNsGlpPIdUR8raXX1gHU23daEb0wjcXWQDiRwiHbOPflgtsdcOd+sBFwcyaT",
|
|
7
|
-
"sha256": "sha256-J8gP7yGUYug37gOWEZ/XH9rMqBVSxzzPygd5X7IQs88=",
|
|
8
|
-
"size": 3892
|
|
9
|
-
},
|
|
10
|
-
"beautifi-lite.esm.js": {
|
|
11
|
-
"sha384": "sha384-spFDyD7+wE0h5oCJs5W+WqOyiyFzfGhzFFLFzMrgWowrtADdpsN2xubmdjhmV7BZ",
|
|
12
|
-
"sha256": "sha256-HoSTBYkOTCdDqruTcELjyiQBU3fKXehJ8uH9XQdYJd0=",
|
|
13
|
-
"size": 5887
|
|
14
|
-
},
|
|
15
|
-
"beautifi-lite.min.js": {
|
|
16
|
-
"sha384": "sha384-O500No4eMIHmM08dEDmL+ZWWQRD7hyPfgDOLLoEMsHyP1HUIEMZnC8D8RWJqkKpH",
|
|
17
|
-
"sha256": "sha256-GAl6EKLMaif1TTJf5FLn59g9gTJu3VjABTuTdgJpDWk=",
|
|
18
|
-
"size": 3911
|
|
19
|
-
},
|
|
20
|
-
"beautifi-lite.umd.js": {
|
|
21
|
-
"sha384": "sha384-cCpM6SFYLRTGwowfGmysm4vTHjLvHbzA9Wc84qgckh7GybXV/3enZUgSgNRnzrxB",
|
|
22
|
-
"sha256": "sha256-kY26EyYMZFbolPnZn0WO03LfxnK4O/2ZuH3fFFqHtMw=",
|
|
23
|
-
"size": 4100
|
|
24
|
-
},
|
|
25
|
-
"beautifi.cjs.js": {
|
|
26
|
-
"sha384": "sha384-e80WJLL0l1Oe3vQtGk9A2yhuQ4qvPUH2WROAi7f1eoTKs8JVMbjGr50AbivM1QuZ",
|
|
27
|
-
"sha256": "sha256-n7oTjdLH9Mz9t7y60GKSk9kXdr3z6YHTmYsk94piqIc=",
|
|
28
|
-
"size": 23629
|
|
29
|
-
},
|
|
30
|
-
"beautifi.esm.js": {
|
|
31
|
-
"sha384": "sha384-BXmnGMnGwjbqTkjOdXxNq3nrlZVPkAyHIP+ZZFXLsKMktwi8OtA1FER/LTlFQ1hP",
|
|
32
|
-
"sha256": "sha256-GYwfyEdN4kaFgKnNu4K/3FA+baekZ9GhnTQBLhnKZkM=",
|
|
33
|
-
"size": 47024
|
|
34
|
-
},
|
|
35
|
-
"beautifi.min.js": {
|
|
36
|
-
"sha384": "sha384-50NVhbLpVE+Xm+8ntYNieAHrq6k42lvan40aXTHSLC4jfbFAoYvo9S+ZzaqJ352H",
|
|
37
|
-
"sha256": "sha256-/DubUaLEoIY7j/1/atxDEePG5yKnPTytjuCk+qghNI4=",
|
|
38
|
-
"size": 23589
|
|
39
|
-
},
|
|
40
|
-
"beautifi.umd.js": {
|
|
41
|
-
"sha384": "sha384-sVobCoM9txDv1qVrA/jwm4nt2EPEbnEluEzcKp8lzWhrpkPHBlaZIlRrxESD3wLG",
|
|
42
|
-
"sha256": "sha256-RbGd779lsE306v3x5itfpg+T4oGcJd+hC8fN3XUlKr4=",
|
|
43
|
-
"size": 23779
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|