funny-animations 0.0.0-stage → 0.0.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/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/package.json +49 -3
- package/src/styles.css +44 -0
- package/README.md +0 -3
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var f=Object.create;var i=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var g=Object.getPrototypeOf,y=Object.prototype.hasOwnProperty;var b=(a,t)=>{for(var o in t)i(a,o,{get:t[o],enumerable:!0})},s=(a,t,o,e)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of x(t))!y.call(a,n)&&n!==o&&i(a,n,{get:()=>t[n],enumerable:!(e=d(t,n))||e.enumerable});return a};var w=(a,t,o)=>(o=a!=null?f(g(a)):{},s(t||!a||!a.__esModule?i(o,"default",{value:a,enumerable:!0}):o,a)),h=a=>s(i({},"__esModule",{value:!0}),a);var Y={};b(Y,{animationPlugin:()=>u,default:()=>D});module.exports=h(Y);var p=w(require("tailwindcss/plugin"),1);var m={"bounce-fade":{"0%":{opacity:"0",transform:"translateY(-20px)"},"50%":{opacity:"0.5",transform:"translateY(10px)"},"100%":{opacity:"1",transform:"translateY(0)"}},"pulse-glow":{"0%, 100%":{opacity:"1",boxShadow:"0 0 15px rgba(59, 130, 246, 0.5)"},"50%":{opacity:"0.6",boxShadow:"0 0 5px rgba(59, 130, 246, 0.2)"}}},r={"bounce-fade":"bounce-fade 0.8s ease-out forwards","pulse-glow":"pulse-glow 2s infinite ease-in-out"};var u=(0,p.default)(function({addUtilities:a,matchUtilities:t,theme:o}){let e=Object.entries(r).reduce((n,[l,c])=>(n[`.animate-${l}`]={animation:c},n),{});a(e),t({"animate-duration":n=>({animationDuration:n}),"animate-delay":n=>({animationDelay:n})},{values:o("transitionDuration")})},{theme:{extend:{keyframes:m,animation:r}}}),D=u;0&&(module.exports={animationPlugin});
|
|
2
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/animations.ts"],"sourcesContent":["import plugin from 'tailwindcss/plugin';\nimport { keyframes, animations } from './animations';\n\nexport const animationPlugin = plugin(\n function ({ addUtilities, matchUtilities, theme }) {\n // 1. Inyectar animaciones base como utilidades (ej: animate-bounce-fade)\n const newUtilities = Object.entries(animations).reduce((acc, [name, value]) => {\n acc[`.animate-${name}`] = { animation: value };\n return acc;\n }, {} as Record<string, Record<string, string>>);\n\n addUtilities(newUtilities);\n\n // 2. (Opcional) Soporte para utilidades dinámicas con valores arbitrarios (ej: animate-duration-[2s])\n matchUtilities(\n {\n 'animate-duration': (value) => ({\n animationDuration: value,\n }),\n 'animate-delay': (value) => ({\n animationDelay: value,\n }),\n },\n { values: theme('transitionDuration') }\n );\n },\n {\n // Extender el tema por defecto agregando los keyframes\n theme: {\n extend: {\n keyframes,\n animation: animations\n },\n },\n }\n);\n\nexport default animationPlugin;","export const keyframes = {\n 'bounce-fade': {\n '0%': { opacity: '0', transform: 'translateY(-20px)' },\n '50%': { opacity: '0.5', transform: 'translateY(10px)' },\n '100%': { opacity: '1', transform: 'translateY(0)' },\n },\n 'pulse-glow': {\n '0%, 100%': { opacity: '1', boxShadow: '0 0 15px rgba(59, 130, 246, 0.5)' },\n '50%': { opacity: '0.6', boxShadow: '0 0 5px rgba(59, 130, 246, 0.2)' },\n },\n};\n\nexport const animations = {\n 'bounce-fade': 'bounce-fade 0.8s ease-out forwards',\n 'pulse-glow': 'pulse-glow 2s infinite ease-in-out',\n};"],"mappings":"0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,qBAAAE,EAAA,YAAAC,IAAA,eAAAC,EAAAJ,GAAA,IAAAK,EAAmB,mCCAZ,IAAMC,EAAY,CACrB,cAAe,CACX,KAAM,CAAE,QAAS,IAAK,UAAW,mBAAoB,EACrD,MAAO,CAAE,QAAS,MAAO,UAAW,kBAAmB,EACvD,OAAQ,CAAE,QAAS,IAAK,UAAW,eAAgB,CACvD,EACA,aAAc,CACV,WAAY,CAAE,QAAS,IAAK,UAAW,kCAAmC,EAC1E,MAAO,CAAE,QAAS,MAAO,UAAW,iCAAkC,CAC1E,CACJ,EAEaC,EAAa,CACtB,cAAe,qCACf,aAAc,oCAClB,EDZO,IAAMC,KAAkB,EAAAC,SAC3B,SAAU,CAAE,aAAAC,EAAc,eAAAC,EAAgB,MAAAC,CAAM,EAAG,CAE/C,IAAMC,EAAe,OAAO,QAAQC,CAAU,EAAE,OAAO,CAACC,EAAK,CAACC,EAAMC,CAAK,KACrEF,EAAI,YAAYC,CAAI,EAAE,EAAI,CAAE,UAAWC,CAAM,EACtCF,GACR,CAAC,CAA2C,EAE/CL,EAAaG,CAAY,EAGzBF,EACI,CACI,mBAAqBM,IAAW,CAC5B,kBAAmBA,CACvB,GACA,gBAAkBA,IAAW,CACzB,eAAgBA,CACpB,EACJ,EACA,CAAE,OAAQL,EAAM,oBAAoB,CAAE,CAC1C,CACJ,EACA,CAEI,MAAO,CACH,OAAQ,CACJ,UAAAM,EACA,UAAWJ,CACf,CACJ,CACJ,CACJ,EAEOK,EAAQX","names":["index_exports","__export","animationPlugin","index_default","__toCommonJS","import_plugin","keyframes","animations","animationPlugin","plugin","addUtilities","matchUtilities","theme","newUtilities","animations","acc","name","value","keyframes","index_default"]}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import p from"tailwindcss/plugin";var n={"bounce-fade":{"0%":{opacity:"0",transform:"translateY(-20px)"},"50%":{opacity:"0.5",transform:"translateY(10px)"},"100%":{opacity:"1",transform:"translateY(0)"}},"pulse-glow":{"0%, 100%":{opacity:"1",boxShadow:"0 0 15px rgba(59, 130, 246, 0.5)"},"50%":{opacity:"0.6",boxShadow:"0 0 5px rgba(59, 130, 246, 0.2)"}}},t={"bounce-fade":"bounce-fade 0.8s ease-out forwards","pulse-glow":"pulse-glow 2s infinite ease-in-out"};var u=p(function({addUtilities:o,matchUtilities:e,theme:i}){let r=Object.entries(t).reduce((a,[s,m])=>(a[`.animate-${s}`]={animation:m},a),{});o(r),e({"animate-duration":a=>({animationDuration:a}),"animate-delay":a=>({animationDelay:a})},{values:i("transitionDuration")})},{theme:{extend:{keyframes:n,animation:t}}}),d=u;export{u as animationPlugin,d as default};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/animations.ts"],"sourcesContent":["import plugin from 'tailwindcss/plugin';\nimport { keyframes, animations } from './animations';\n\nexport const animationPlugin = plugin(\n function ({ addUtilities, matchUtilities, theme }) {\n // 1. Inyectar animaciones base como utilidades (ej: animate-bounce-fade)\n const newUtilities = Object.entries(animations).reduce((acc, [name, value]) => {\n acc[`.animate-${name}`] = { animation: value };\n return acc;\n }, {} as Record<string, Record<string, string>>);\n\n addUtilities(newUtilities);\n\n // 2. (Opcional) Soporte para utilidades dinámicas con valores arbitrarios (ej: animate-duration-[2s])\n matchUtilities(\n {\n 'animate-duration': (value) => ({\n animationDuration: value,\n }),\n 'animate-delay': (value) => ({\n animationDelay: value,\n }),\n },\n { values: theme('transitionDuration') }\n );\n },\n {\n // Extender el tema por defecto agregando los keyframes\n theme: {\n extend: {\n keyframes,\n animation: animations\n },\n },\n }\n);\n\nexport default animationPlugin;","export const keyframes = {\n 'bounce-fade': {\n '0%': { opacity: '0', transform: 'translateY(-20px)' },\n '50%': { opacity: '0.5', transform: 'translateY(10px)' },\n '100%': { opacity: '1', transform: 'translateY(0)' },\n },\n 'pulse-glow': {\n '0%, 100%': { opacity: '1', boxShadow: '0 0 15px rgba(59, 130, 246, 0.5)' },\n '50%': { opacity: '0.6', boxShadow: '0 0 5px rgba(59, 130, 246, 0.2)' },\n },\n};\n\nexport const animations = {\n 'bounce-fade': 'bounce-fade 0.8s ease-out forwards',\n 'pulse-glow': 'pulse-glow 2s infinite ease-in-out',\n};"],"mappings":"AAAA,OAAOA,MAAY,qBCAZ,IAAMC,EAAY,CACrB,cAAe,CACX,KAAM,CAAE,QAAS,IAAK,UAAW,mBAAoB,EACrD,MAAO,CAAE,QAAS,MAAO,UAAW,kBAAmB,EACvD,OAAQ,CAAE,QAAS,IAAK,UAAW,eAAgB,CACvD,EACA,aAAc,CACV,WAAY,CAAE,QAAS,IAAK,UAAW,kCAAmC,EAC1E,MAAO,CAAE,QAAS,MAAO,UAAW,iCAAkC,CAC1E,CACJ,EAEaC,EAAa,CACtB,cAAe,qCACf,aAAc,oCAClB,EDZO,IAAMC,EAAkBC,EAC3B,SAAU,CAAE,aAAAC,EAAc,eAAAC,EAAgB,MAAAC,CAAM,EAAG,CAE/C,IAAMC,EAAe,OAAO,QAAQC,CAAU,EAAE,OAAO,CAACC,EAAK,CAACC,EAAMC,CAAK,KACrEF,EAAI,YAAYC,CAAI,EAAE,EAAI,CAAE,UAAWC,CAAM,EACtCF,GACR,CAAC,CAA2C,EAE/CL,EAAaG,CAAY,EAGzBF,EACI,CACI,mBAAqBM,IAAW,CAC5B,kBAAmBA,CACvB,GACA,gBAAkBA,IAAW,CACzB,eAAgBA,CACpB,EACJ,EACA,CAAE,OAAQL,EAAM,oBAAoB,CAAE,CAC1C,CACJ,EACA,CAEI,MAAO,CACH,OAAQ,CACJ,UAAAM,EACA,UAAWJ,CACf,CACJ,CACJ,CACJ,EAEOK,EAAQX","names":["plugin","keyframes","animations","animationPlugin","plugin","addUtilities","matchUtilities","theme","newUtilities","animations","acc","name","value","keyframes","index_default"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,52 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "funny-animations",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"
|
|
5
|
-
"description": "
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Colección de animaciones en una sola clase para Tailwind CSS",
|
|
6
|
+
"main": "./dist/index.cjs",
|
|
7
|
+
"module": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/index.js",
|
|
13
|
+
"require": "./dist/index.cjs"
|
|
14
|
+
},
|
|
15
|
+
"./styles.css": "./src/styles.css"
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"dist",
|
|
19
|
+
"src/styles.css"
|
|
20
|
+
],
|
|
21
|
+
"scripts": {
|
|
22
|
+
"build": "tsup && tsc --project tsconfig.json",
|
|
23
|
+
"dev": "tsup --watch",
|
|
24
|
+
"prepublishOnly": "npm run build",
|
|
25
|
+
"storybook": "storybook dev -p 6006",
|
|
26
|
+
"build-storybook": "storybook build"
|
|
27
|
+
},
|
|
28
|
+
"peerDependencies": {
|
|
29
|
+
"tailwindcss": ">=3.0.0"
|
|
30
|
+
},
|
|
31
|
+
"author": "Sergio Sosa",
|
|
32
|
+
"license": "ISC",
|
|
33
|
+
"keywords": [
|
|
34
|
+
"tailwind",
|
|
35
|
+
"tailwindcss",
|
|
36
|
+
"plugin",
|
|
37
|
+
"animations",
|
|
38
|
+
"css"
|
|
39
|
+
],
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"@storybook/addon-styling-webpack": "^3.0.2",
|
|
42
|
+
"@storybook/html-vite": "^10.6.1",
|
|
43
|
+
"@tailwindcss/postcss": "^4.3.3",
|
|
44
|
+
"autoprefixer": "^10.6.1",
|
|
45
|
+
"esbuild": "^0.28.2",
|
|
46
|
+
"postcss": "^8.5.28",
|
|
47
|
+
"storybook": "^10.6.1",
|
|
48
|
+
"tailwindcss": "^4.3.3",
|
|
49
|
+
"tsup": "^8.5.1",
|
|
50
|
+
"typescript": "^7.0.2"
|
|
51
|
+
}
|
|
6
52
|
}
|
package/src/styles.css
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/* src/styles.css */
|
|
2
|
+
@import "tailwindcss";
|
|
3
|
+
|
|
4
|
+
@theme {
|
|
5
|
+
--animate-bounce-fade: bounce-fade 0.8s ease-out forwards;
|
|
6
|
+
|
|
7
|
+
@keyframes bounce-fade {
|
|
8
|
+
0% {
|
|
9
|
+
opacity: 0;
|
|
10
|
+
transform: translateY(-20px);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
50% {
|
|
14
|
+
opacity: 0.5;
|
|
15
|
+
transform: translateY(10px);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
100% {
|
|
19
|
+
opacity: 1;
|
|
20
|
+
transform: translateY(0);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@theme {
|
|
26
|
+
--animate-pulse-glow: pulse-glow 2s ease-in-out infinite;
|
|
27
|
+
|
|
28
|
+
@keyframes pulse-glow {
|
|
29
|
+
0% {
|
|
30
|
+
opacity: 1;
|
|
31
|
+
box-shadow: 0 0 15px rgba(59, 130, 246, 0.5);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
50% {
|
|
35
|
+
opacity: 0.5;
|
|
36
|
+
box-shadow: 0 0 5px rgba(59, 130, 246, 0.2);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
100% {
|
|
40
|
+
opacity: 1;
|
|
41
|
+
box-shadow: 0 0 15px rgba(59, 130, 246, 0.5);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
package/README.md
DELETED