@plasmicpkgs/framer-motion 0.0.209 → 0.0.210
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/framer-motion.cjs.development.js +6 -11
- package/dist/framer-motion.cjs.development.js.map +1 -1
- package/dist/framer-motion.cjs.production.min.js +1 -1
- package/dist/framer-motion.cjs.production.min.js.map +1 -1
- package/dist/framer-motion.esm.js +6 -11
- package/dist/framer-motion.esm.js.map +1 -1
- package/package.json +3 -3
|
@@ -9,18 +9,13 @@ var framerMotion = require('framer-motion');
|
|
|
9
9
|
var React = _interopDefault(require('react'));
|
|
10
10
|
|
|
11
11
|
function _extends() {
|
|
12
|
-
_extends = Object.assign ? Object.assign.bind() : function (
|
|
13
|
-
for (var
|
|
14
|
-
var
|
|
15
|
-
for (var
|
|
16
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
17
|
-
target[key] = source[key];
|
|
18
|
-
}
|
|
19
|
-
}
|
|
12
|
+
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
13
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
14
|
+
var t = arguments[e];
|
|
15
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
20
16
|
}
|
|
21
|
-
return
|
|
22
|
-
};
|
|
23
|
-
return _extends.apply(this, arguments);
|
|
17
|
+
return n;
|
|
18
|
+
}, _extends.apply(null, arguments);
|
|
24
19
|
}
|
|
25
20
|
|
|
26
21
|
function AnimatedLetters(_ref) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"framer-motion.cjs.development.js","sources":["../src/AnimatedLetters.tsx"],"sourcesContent":["import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport { motion, Variants } from \"framer-motion\";\nimport React from \"react\";\n\nexport interface AnimatedLettersProps {\n className?: string;\n text?: string;\n stagger?: number;\n initial?: any;\n visible?: any;\n exit?: any;\n}\n\nexport default function AnimatedLetters({\n className,\n text = \"Enter some text\",\n stagger = 0.01,\n initial = {\n opacity: 0,\n y: \"100%\",\n },\n visible = {\n opacity: 1,\n y: 0,\n transition: {\n ease: \"easeOut\",\n },\n },\n exit = {\n opacity: 0,\n y: \"-100%\",\n },\n}: AnimatedLettersProps) {\n const letterVariants: Variants = {\n initial: initial,\n visible: (i) => ({\n ...visible,\n transition: {\n ...visible?.transition,\n delay: (visible?.transition?.delay ?? 0) + i * stagger,\n },\n }),\n exit: (i) => ({\n ...exit,\n transition: {\n ...exit?.transition,\n delay: (exit?.transition?.delay ?? 0) + i * stagger,\n },\n }),\n };\n\n return (\n <motion.div\n className={className}\n initial=\"initial\"\n animate=\"visible\"\n exit={\"exit\"}\n >\n {text.split(\"\").map((letter, i) => (\n <motion.span\n key={i}\n custom={i}\n style={{ display: \"inline-block\" } as any}\n variants={letterVariants}\n >\n {letter === \" \" ? \"\\u00a0\" : letter}\n </motion.span>\n ))}\n </motion.div>\n );\n}\n\nexport const animatedLettersMeta: ComponentMeta<AnimatedLettersProps> = {\n name: \"hostless-animated-letters\",\n displayName: \"Animated Letters\",\n importName: \"AnimatedLetters\",\n importPath: \"@plasmicpkgs/framer-motion\",\n props: {\n text: {\n type: \"string\",\n defaultValue: \"Animated Letters\",\n displayName: \"Text\",\n description: \"Text to animate.\",\n },\n stagger: {\n type: \"number\",\n displayName: \"Stagger\",\n description: \"Seconds to wait between each letter\",\n },\n initial: {\n type: \"object\",\n displayName: \"Initial state\",\n description: \"What the letters look like before entrance animation\",\n },\n visible: {\n type: \"object\",\n displayName: \"Visible state\",\n description: \"What the letters look like once revealed\",\n },\n exit: {\n type: \"object\",\n displayName: \"Exit state\",\n description: \"What the letters look like after exit animation\",\n },\n },\n defaultStyles: {\n width: \"stretch\",\n maxWidth: \"800px\",\n },\n};\n\nexport function registerAnimatedLetters(\n loader?: { registerComponent: typeof registerComponent },\n customAnimatedLettersMeta?: ComponentMeta<AnimatedLettersProps>\n) {\n if (loader) {\n loader.registerComponent(\n AnimatedLetters,\n customAnimatedLettersMeta ?? animatedLettersMeta\n );\n } else {\n registerComponent(\n AnimatedLetters,\n customAnimatedLettersMeta ?? animatedLettersMeta\n );\n }\n}\n"],"names":["AnimatedLetters","_ref","className","_ref$text","text","_ref$stagger","stagger","_ref$initial","initial","opacity","y","_ref$visible","visible","transition","ease","_ref$exit","exit","letterVariants","i","_visible$transition$d","_visible$transition","_extends","delay","_exit$transition$dela","_exit$transition","React","motion","div","animate","split","map","letter","span","key","custom","style","display","variants","animatedLettersMeta","name","displayName","importName","importPath","props","type","defaultValue","description","defaultStyles","width","maxWidth","registerAnimatedLetters","loader","customAnimatedLettersMeta","registerComponent"],"mappings":"
|
|
1
|
+
{"version":3,"file":"framer-motion.cjs.development.js","sources":["../src/AnimatedLetters.tsx"],"sourcesContent":["import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport { motion, Variants } from \"framer-motion\";\nimport React from \"react\";\n\nexport interface AnimatedLettersProps {\n className?: string;\n text?: string;\n stagger?: number;\n initial?: any;\n visible?: any;\n exit?: any;\n}\n\nexport default function AnimatedLetters({\n className,\n text = \"Enter some text\",\n stagger = 0.01,\n initial = {\n opacity: 0,\n y: \"100%\",\n },\n visible = {\n opacity: 1,\n y: 0,\n transition: {\n ease: \"easeOut\",\n },\n },\n exit = {\n opacity: 0,\n y: \"-100%\",\n },\n}: AnimatedLettersProps) {\n const letterVariants: Variants = {\n initial: initial,\n visible: (i) => ({\n ...visible,\n transition: {\n ...visible?.transition,\n delay: (visible?.transition?.delay ?? 0) + i * stagger,\n },\n }),\n exit: (i) => ({\n ...exit,\n transition: {\n ...exit?.transition,\n delay: (exit?.transition?.delay ?? 0) + i * stagger,\n },\n }),\n };\n\n return (\n <motion.div\n className={className}\n initial=\"initial\"\n animate=\"visible\"\n exit={\"exit\"}\n >\n {text.split(\"\").map((letter, i) => (\n <motion.span\n key={i}\n custom={i}\n style={{ display: \"inline-block\" } as any}\n variants={letterVariants}\n >\n {letter === \" \" ? \"\\u00a0\" : letter}\n </motion.span>\n ))}\n </motion.div>\n );\n}\n\nexport const animatedLettersMeta: ComponentMeta<AnimatedLettersProps> = {\n name: \"hostless-animated-letters\",\n displayName: \"Animated Letters\",\n importName: \"AnimatedLetters\",\n importPath: \"@plasmicpkgs/framer-motion\",\n props: {\n text: {\n type: \"string\",\n defaultValue: \"Animated Letters\",\n displayName: \"Text\",\n description: \"Text to animate.\",\n },\n stagger: {\n type: \"number\",\n displayName: \"Stagger\",\n description: \"Seconds to wait between each letter\",\n },\n initial: {\n type: \"object\",\n displayName: \"Initial state\",\n description: \"What the letters look like before entrance animation\",\n },\n visible: {\n type: \"object\",\n displayName: \"Visible state\",\n description: \"What the letters look like once revealed\",\n },\n exit: {\n type: \"object\",\n displayName: \"Exit state\",\n description: \"What the letters look like after exit animation\",\n },\n },\n defaultStyles: {\n width: \"stretch\",\n maxWidth: \"800px\",\n },\n};\n\nexport function registerAnimatedLetters(\n loader?: { registerComponent: typeof registerComponent },\n customAnimatedLettersMeta?: ComponentMeta<AnimatedLettersProps>\n) {\n if (loader) {\n loader.registerComponent(\n AnimatedLetters,\n customAnimatedLettersMeta ?? animatedLettersMeta\n );\n } else {\n registerComponent(\n AnimatedLetters,\n customAnimatedLettersMeta ?? animatedLettersMeta\n );\n }\n}\n"],"names":["AnimatedLetters","_ref","className","_ref$text","text","_ref$stagger","stagger","_ref$initial","initial","opacity","y","_ref$visible","visible","transition","ease","_ref$exit","exit","letterVariants","i","_visible$transition$d","_visible$transition","_extends","delay","_exit$transition$dela","_exit$transition","React","motion","div","animate","split","map","letter","span","key","custom","style","display","variants","animatedLettersMeta","name","displayName","importName","importPath","props","type","defaultValue","description","defaultStyles","width","maxWidth","registerAnimatedLetters","loader","customAnimatedLettersMeta","registerComponent"],"mappings":";;;;;;;;;;;;;;;;;;;;SAewBA,eAAeA,CAAAC,IAAA;MACrCC,SAAS,GAAAD,IAAA,CAATC,SAAS;IAAAC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Y;MACzBM,WAAW,EAAE;;GAEhB;EACDC,aAAa,EAAE;IACbC,KAAK,EAAE,SAAS;IAChBC,QAAQ,EAAE;;;SAIEC,uBAAuBA,CACrCC,MAAwD,EACxDC,yBAA+D;EAE/D,IAAID,MAAM,EAAE;IACVA,MAAM,CAACE,iBAAiB,CACtBrD,eAAe,EACfoD,yBAAyB,WAAzBA,yBAAyB,GAAId,mBAAmB,CACjD;GACF,MAAM;IACLe,iBAAiB,CACfrD,eAAe,EACfoD,yBAAyB,WAAzBA,yBAAyB,GAAId,mBAAmB,CACjD;;AAEL;;;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";function t(t){return t&&"object"==typeof t&&"default"in t?t.default:t}Object.defineProperty(exports,"__esModule",{value:!0});var e=t(require("@plasmicapp/host/registerComponent")),i=require("framer-motion"),a=t(require("react"));function n(){return(n=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var a in i)
|
|
1
|
+
"use strict";function t(t){return t&&"object"==typeof t&&"default"in t?t.default:t}Object.defineProperty(exports,"__esModule",{value:!0});var e=t(require("@plasmicapp/host/registerComponent")),i=require("framer-motion"),a=t(require("react"));function n(){return(n=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var a in i)({}).hasOwnProperty.call(i,a)&&(t[a]=i[a])}return t}).apply(null,arguments)}function r(t){var e=t.text,r=t.stagger,l=void 0===r?.01:r,o=t.initial,s=t.visible,d=void 0===s?{opacity:1,y:0,transition:{ease:"easeOut"}}:s,p=t.exit,m=void 0===p?{opacity:0,y:"-100%"}:p,u={initial:void 0===o?{opacity:0,y:"100%"}:o,visible:function(t){var e,i;return n({},d,{transition:n({},null==d?void 0:d.transition,{delay:(null!=(e=null==d||null==(i=d.transition)?void 0:i.delay)?e:0)+t*l})})},exit:function(t){var e,i;return n({},m,{transition:n({},null==m?void 0:m.transition,{delay:(null!=(e=null==m||null==(i=m.transition)?void 0:i.delay)?e:0)+t*l})})}};return a.createElement(i.motion.div,{className:t.className,initial:"initial",animate:"visible",exit:"exit"},(void 0===e?"Enter some text":e).split("").map((function(t,e){return a.createElement(i.motion.span,{key:e,custom:e,style:{display:"inline-block"},variants:u}," "===t?" ":t)})))}var l={name:"hostless-animated-letters",displayName:"Animated Letters",importName:"AnimatedLetters",importPath:"@plasmicpkgs/framer-motion",props:{text:{type:"string",defaultValue:"Animated Letters",displayName:"Text",description:"Text to animate."},stagger:{type:"number",displayName:"Stagger",description:"Seconds to wait between each letter"},initial:{type:"object",displayName:"Initial state",description:"What the letters look like before entrance animation"},visible:{type:"object",displayName:"Visible state",description:"What the letters look like once revealed"},exit:{type:"object",displayName:"Exit state",description:"What the letters look like after exit animation"}},defaultStyles:{width:"stretch",maxWidth:"800px"}};exports.AnimatedLetters=r,exports.animatedLettersMeta=l,exports.registerAnimatedLetters=function(t,i){t?t.registerComponent(r,null!=i?i:l):e(r,null!=i?i:l)};
|
|
2
2
|
//# sourceMappingURL=framer-motion.cjs.production.min.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"framer-motion.cjs.production.min.js","sources":["../src/AnimatedLetters.tsx"],"sourcesContent":["import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport { motion, Variants } from \"framer-motion\";\nimport React from \"react\";\n\nexport interface AnimatedLettersProps {\n className?: string;\n text?: string;\n stagger?: number;\n initial?: any;\n visible?: any;\n exit?: any;\n}\n\nexport default function AnimatedLetters({\n className,\n text = \"Enter some text\",\n stagger = 0.01,\n initial = {\n opacity: 0,\n y: \"100%\",\n },\n visible = {\n opacity: 1,\n y: 0,\n transition: {\n ease: \"easeOut\",\n },\n },\n exit = {\n opacity: 0,\n y: \"-100%\",\n },\n}: AnimatedLettersProps) {\n const letterVariants: Variants = {\n initial: initial,\n visible: (i) => ({\n ...visible,\n transition: {\n ...visible?.transition,\n delay: (visible?.transition?.delay ?? 0) + i * stagger,\n },\n }),\n exit: (i) => ({\n ...exit,\n transition: {\n ...exit?.transition,\n delay: (exit?.transition?.delay ?? 0) + i * stagger,\n },\n }),\n };\n\n return (\n <motion.div\n className={className}\n initial=\"initial\"\n animate=\"visible\"\n exit={\"exit\"}\n >\n {text.split(\"\").map((letter, i) => (\n <motion.span\n key={i}\n custom={i}\n style={{ display: \"inline-block\" } as any}\n variants={letterVariants}\n >\n {letter === \" \" ? \"\\u00a0\" : letter}\n </motion.span>\n ))}\n </motion.div>\n );\n}\n\nexport const animatedLettersMeta: ComponentMeta<AnimatedLettersProps> = {\n name: \"hostless-animated-letters\",\n displayName: \"Animated Letters\",\n importName: \"AnimatedLetters\",\n importPath: \"@plasmicpkgs/framer-motion\",\n props: {\n text: {\n type: \"string\",\n defaultValue: \"Animated Letters\",\n displayName: \"Text\",\n description: \"Text to animate.\",\n },\n stagger: {\n type: \"number\",\n displayName: \"Stagger\",\n description: \"Seconds to wait between each letter\",\n },\n initial: {\n type: \"object\",\n displayName: \"Initial state\",\n description: \"What the letters look like before entrance animation\",\n },\n visible: {\n type: \"object\",\n displayName: \"Visible state\",\n description: \"What the letters look like once revealed\",\n },\n exit: {\n type: \"object\",\n displayName: \"Exit state\",\n description: \"What the letters look like after exit animation\",\n },\n },\n defaultStyles: {\n width: \"stretch\",\n maxWidth: \"800px\",\n },\n};\n\nexport function registerAnimatedLetters(\n loader?: { registerComponent: typeof registerComponent },\n customAnimatedLettersMeta?: ComponentMeta<AnimatedLettersProps>\n) {\n if (loader) {\n loader.registerComponent(\n AnimatedLetters,\n customAnimatedLettersMeta ?? animatedLettersMeta\n );\n } else {\n registerComponent(\n AnimatedLetters,\n customAnimatedLettersMeta ?? animatedLettersMeta\n );\n }\n}\n"],"names":["AnimatedLetters","_ref","_ref$text","text","_ref$stagger","stagger","_ref$initial","initial","_ref$visible","visible","opacity","y","transition","ease","_ref$exit","exit","letterVariants","i","_visible$transition$d","_visible$transition","_extends","delay","_exit$transition$dela","_exit$transition","React","motion","div","className","animate","split","map","letter","span","key","custom","style","display","variants","animatedLettersMeta","name","displayName","importName","importPath","props","type","defaultValue","description","defaultStyles","width","maxWidth","loader","customAnimatedLettersMeta","registerComponent"],"mappings":"
|
|
1
|
+
{"version":3,"file":"framer-motion.cjs.production.min.js","sources":["../src/AnimatedLetters.tsx"],"sourcesContent":["import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport { motion, Variants } from \"framer-motion\";\nimport React from \"react\";\n\nexport interface AnimatedLettersProps {\n className?: string;\n text?: string;\n stagger?: number;\n initial?: any;\n visible?: any;\n exit?: any;\n}\n\nexport default function AnimatedLetters({\n className,\n text = \"Enter some text\",\n stagger = 0.01,\n initial = {\n opacity: 0,\n y: \"100%\",\n },\n visible = {\n opacity: 1,\n y: 0,\n transition: {\n ease: \"easeOut\",\n },\n },\n exit = {\n opacity: 0,\n y: \"-100%\",\n },\n}: AnimatedLettersProps) {\n const letterVariants: Variants = {\n initial: initial,\n visible: (i) => ({\n ...visible,\n transition: {\n ...visible?.transition,\n delay: (visible?.transition?.delay ?? 0) + i * stagger,\n },\n }),\n exit: (i) => ({\n ...exit,\n transition: {\n ...exit?.transition,\n delay: (exit?.transition?.delay ?? 0) + i * stagger,\n },\n }),\n };\n\n return (\n <motion.div\n className={className}\n initial=\"initial\"\n animate=\"visible\"\n exit={\"exit\"}\n >\n {text.split(\"\").map((letter, i) => (\n <motion.span\n key={i}\n custom={i}\n style={{ display: \"inline-block\" } as any}\n variants={letterVariants}\n >\n {letter === \" \" ? \"\\u00a0\" : letter}\n </motion.span>\n ))}\n </motion.div>\n );\n}\n\nexport const animatedLettersMeta: ComponentMeta<AnimatedLettersProps> = {\n name: \"hostless-animated-letters\",\n displayName: \"Animated Letters\",\n importName: \"AnimatedLetters\",\n importPath: \"@plasmicpkgs/framer-motion\",\n props: {\n text: {\n type: \"string\",\n defaultValue: \"Animated Letters\",\n displayName: \"Text\",\n description: \"Text to animate.\",\n },\n stagger: {\n type: \"number\",\n displayName: \"Stagger\",\n description: \"Seconds to wait between each letter\",\n },\n initial: {\n type: \"object\",\n displayName: \"Initial state\",\n description: \"What the letters look like before entrance animation\",\n },\n visible: {\n type: \"object\",\n displayName: \"Visible state\",\n description: \"What the letters look like once revealed\",\n },\n exit: {\n type: \"object\",\n displayName: \"Exit state\",\n description: \"What the letters look like after exit animation\",\n },\n },\n defaultStyles: {\n width: \"stretch\",\n maxWidth: \"800px\",\n },\n};\n\nexport function registerAnimatedLetters(\n loader?: { registerComponent: typeof registerComponent },\n customAnimatedLettersMeta?: ComponentMeta<AnimatedLettersProps>\n) {\n if (loader) {\n loader.registerComponent(\n AnimatedLetters,\n customAnimatedLettersMeta ?? animatedLettersMeta\n );\n } else {\n registerComponent(\n AnimatedLetters,\n customAnimatedLettersMeta ?? animatedLettersMeta\n );\n }\n}\n"],"names":["AnimatedLetters","_ref","_ref$text","text","_ref$stagger","stagger","_ref$initial","initial","_ref$visible","visible","opacity","y","transition","ease","_ref$exit","exit","letterVariants","i","_visible$transition$d","_visible$transition","_extends","delay","_exit$transition$dela","_exit$transition","React","motion","div","className","animate","split","map","letter","span","key","custom","style","display","variants","animatedLettersMeta","name","displayName","importName","importPath","props","type","defaultValue","description","defaultStyles","width","maxWidth","loader","customAnimatedLettersMeta","registerComponent"],"mappings":"kdAewBA,EAAeC,OAC5BC,EAAAD,EACTE,KAAwBC,EAAAH,EACxBI,QAAAA,WAAOD,EAAG,IAAIA,EAAAE,EAAAL,EACdM,QAGCC,EAAAP,EACDQ,QAAAA,WAAOD,EAAG,CACRE,QAAS,EACTC,EAAG,EACHC,WAAY,CACVC,KAAM,YAETL,EAAAM,EAAAb,EACDc,KAAAA,WAAID,EAAG,CACLJ,QAAS,EACTC,EAAG,SACJG,EAEKE,EAA2B,CAC/BT,iBAjBKD,EAAG,CACRI,QAAS,EACTC,EAAG,QACJL,EAeCG,QAAS,SAACQ,GAAC,IAAAC,EAAAC,EAAA,OAAAC,KACNX,GACHG,WAAUQ,WACLX,SAAAA,EAASG,YACZS,cAAOH,QAACT,UAAOU,EAAPV,EAASG,mBAATO,EAAqBE,OAAKH,EAAI,GAAKD,EAAIZ,OAGnDU,KAAM,SAACE,GAAC,IAAAK,EAAAC,EAAA,OAAAH,KACHL,GACHH,WAAUQ,WACLL,SAAAA,EAAMH,YACTS,cAAOC,QAACP,UAAIQ,EAAJR,EAAMH,mBAANW,EAAkBF,OAAKC,EAAI,GAAKL,EAAIZ,QAKlD,OACEmB,gBAACC,SAAOC,KACNC,UAvCK1B,EAAT0B,UAwCIpB,QAAQ,UACRqB,QAAQ,UACRb,KAAM,kBAzCNb,EAAG,kBAAiBA,GA2Cd2B,MAAM,IAAIC,KAAI,SAACC,EAAQd,GAAC,OAC5BO,gBAACC,SAAOO,MACNC,IAAKhB,EACLiB,OAAQjB,EACRkB,MAAO,CAAEC,QAAS,gBAClBC,SAAUrB,GAEE,MAAXe,EAAiB,IAAWA,WAO1BO,EAA2D,CACtEC,KAAM,4BACNC,YAAa,mBACbC,WAAY,kBACZC,WAAY,6BACZC,MAAO,CACLxC,KAAM,CACJyC,KAAM,SACNC,aAAc,mBACdL,YAAa,OACbM,YAAa,oBAEfzC,QAAS,CACPuC,KAAM,SACNJ,YAAa,UACbM,YAAa,uCAEfvC,QAAS,CACPqC,KAAM,SACNJ,YAAa,gBACbM,YAAa,wDAEfrC,QAAS,CACPmC,KAAM,SACNJ,YAAa,gBACbM,YAAa,4CAEf/B,KAAM,CACJ6B,KAAM,SACNJ,YAAa,aACbM,YAAa,oDAGjBC,cAAe,CACbC,MAAO,UACPC,SAAU,2GAKZC,EACAC,GAEID,EACFA,EAAOE,kBACLpD,QACAmD,EAAAA,EAA6Bb,GAG/Bc,EACEpD,QACAmD,EAAAA,EAA6Bb"}
|
|
@@ -3,18 +3,13 @@ import { motion } from 'framer-motion';
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
|
|
5
5
|
function _extends() {
|
|
6
|
-
_extends = Object.assign ? Object.assign.bind() : function (
|
|
7
|
-
for (var
|
|
8
|
-
var
|
|
9
|
-
for (var
|
|
10
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
11
|
-
target[key] = source[key];
|
|
12
|
-
}
|
|
13
|
-
}
|
|
6
|
+
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
7
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
8
|
+
var t = arguments[e];
|
|
9
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
14
10
|
}
|
|
15
|
-
return
|
|
16
|
-
};
|
|
17
|
-
return _extends.apply(this, arguments);
|
|
11
|
+
return n;
|
|
12
|
+
}, _extends.apply(null, arguments);
|
|
18
13
|
}
|
|
19
14
|
|
|
20
15
|
function AnimatedLetters(_ref) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"framer-motion.esm.js","sources":["../src/AnimatedLetters.tsx"],"sourcesContent":["import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport { motion, Variants } from \"framer-motion\";\nimport React from \"react\";\n\nexport interface AnimatedLettersProps {\n className?: string;\n text?: string;\n stagger?: number;\n initial?: any;\n visible?: any;\n exit?: any;\n}\n\nexport default function AnimatedLetters({\n className,\n text = \"Enter some text\",\n stagger = 0.01,\n initial = {\n opacity: 0,\n y: \"100%\",\n },\n visible = {\n opacity: 1,\n y: 0,\n transition: {\n ease: \"easeOut\",\n },\n },\n exit = {\n opacity: 0,\n y: \"-100%\",\n },\n}: AnimatedLettersProps) {\n const letterVariants: Variants = {\n initial: initial,\n visible: (i) => ({\n ...visible,\n transition: {\n ...visible?.transition,\n delay: (visible?.transition?.delay ?? 0) + i * stagger,\n },\n }),\n exit: (i) => ({\n ...exit,\n transition: {\n ...exit?.transition,\n delay: (exit?.transition?.delay ?? 0) + i * stagger,\n },\n }),\n };\n\n return (\n <motion.div\n className={className}\n initial=\"initial\"\n animate=\"visible\"\n exit={\"exit\"}\n >\n {text.split(\"\").map((letter, i) => (\n <motion.span\n key={i}\n custom={i}\n style={{ display: \"inline-block\" } as any}\n variants={letterVariants}\n >\n {letter === \" \" ? \"\\u00a0\" : letter}\n </motion.span>\n ))}\n </motion.div>\n );\n}\n\nexport const animatedLettersMeta: ComponentMeta<AnimatedLettersProps> = {\n name: \"hostless-animated-letters\",\n displayName: \"Animated Letters\",\n importName: \"AnimatedLetters\",\n importPath: \"@plasmicpkgs/framer-motion\",\n props: {\n text: {\n type: \"string\",\n defaultValue: \"Animated Letters\",\n displayName: \"Text\",\n description: \"Text to animate.\",\n },\n stagger: {\n type: \"number\",\n displayName: \"Stagger\",\n description: \"Seconds to wait between each letter\",\n },\n initial: {\n type: \"object\",\n displayName: \"Initial state\",\n description: \"What the letters look like before entrance animation\",\n },\n visible: {\n type: \"object\",\n displayName: \"Visible state\",\n description: \"What the letters look like once revealed\",\n },\n exit: {\n type: \"object\",\n displayName: \"Exit state\",\n description: \"What the letters look like after exit animation\",\n },\n },\n defaultStyles: {\n width: \"stretch\",\n maxWidth: \"800px\",\n },\n};\n\nexport function registerAnimatedLetters(\n loader?: { registerComponent: typeof registerComponent },\n customAnimatedLettersMeta?: ComponentMeta<AnimatedLettersProps>\n) {\n if (loader) {\n loader.registerComponent(\n AnimatedLetters,\n customAnimatedLettersMeta ?? animatedLettersMeta\n );\n } else {\n registerComponent(\n AnimatedLetters,\n customAnimatedLettersMeta ?? animatedLettersMeta\n );\n }\n}\n"],"names":["AnimatedLetters","_ref","className","_ref$text","text","_ref$stagger","stagger","_ref$initial","initial","opacity","y","_ref$visible","visible","transition","ease","_ref$exit","exit","letterVariants","i","_visible$transition$d","_visible$transition","_extends","delay","_exit$transition$dela","_exit$transition","React","motion","div","animate","split","map","letter","span","key","custom","style","display","variants","animatedLettersMeta","name","displayName","importName","importPath","props","type","defaultValue","description","defaultStyles","width","maxWidth","registerAnimatedLetters","loader","customAnimatedLettersMeta","registerComponent"],"mappings":"
|
|
1
|
+
{"version":3,"file":"framer-motion.esm.js","sources":["../src/AnimatedLetters.tsx"],"sourcesContent":["import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport { motion, Variants } from \"framer-motion\";\nimport React from \"react\";\n\nexport interface AnimatedLettersProps {\n className?: string;\n text?: string;\n stagger?: number;\n initial?: any;\n visible?: any;\n exit?: any;\n}\n\nexport default function AnimatedLetters({\n className,\n text = \"Enter some text\",\n stagger = 0.01,\n initial = {\n opacity: 0,\n y: \"100%\",\n },\n visible = {\n opacity: 1,\n y: 0,\n transition: {\n ease: \"easeOut\",\n },\n },\n exit = {\n opacity: 0,\n y: \"-100%\",\n },\n}: AnimatedLettersProps) {\n const letterVariants: Variants = {\n initial: initial,\n visible: (i) => ({\n ...visible,\n transition: {\n ...visible?.transition,\n delay: (visible?.transition?.delay ?? 0) + i * stagger,\n },\n }),\n exit: (i) => ({\n ...exit,\n transition: {\n ...exit?.transition,\n delay: (exit?.transition?.delay ?? 0) + i * stagger,\n },\n }),\n };\n\n return (\n <motion.div\n className={className}\n initial=\"initial\"\n animate=\"visible\"\n exit={\"exit\"}\n >\n {text.split(\"\").map((letter, i) => (\n <motion.span\n key={i}\n custom={i}\n style={{ display: \"inline-block\" } as any}\n variants={letterVariants}\n >\n {letter === \" \" ? \"\\u00a0\" : letter}\n </motion.span>\n ))}\n </motion.div>\n );\n}\n\nexport const animatedLettersMeta: ComponentMeta<AnimatedLettersProps> = {\n name: \"hostless-animated-letters\",\n displayName: \"Animated Letters\",\n importName: \"AnimatedLetters\",\n importPath: \"@plasmicpkgs/framer-motion\",\n props: {\n text: {\n type: \"string\",\n defaultValue: \"Animated Letters\",\n displayName: \"Text\",\n description: \"Text to animate.\",\n },\n stagger: {\n type: \"number\",\n displayName: \"Stagger\",\n description: \"Seconds to wait between each letter\",\n },\n initial: {\n type: \"object\",\n displayName: \"Initial state\",\n description: \"What the letters look like before entrance animation\",\n },\n visible: {\n type: \"object\",\n displayName: \"Visible state\",\n description: \"What the letters look like once revealed\",\n },\n exit: {\n type: \"object\",\n displayName: \"Exit state\",\n description: \"What the letters look like after exit animation\",\n },\n },\n defaultStyles: {\n width: \"stretch\",\n maxWidth: \"800px\",\n },\n};\n\nexport function registerAnimatedLetters(\n loader?: { registerComponent: typeof registerComponent },\n customAnimatedLettersMeta?: ComponentMeta<AnimatedLettersProps>\n) {\n if (loader) {\n loader.registerComponent(\n AnimatedLetters,\n customAnimatedLettersMeta ?? animatedLettersMeta\n );\n } else {\n registerComponent(\n AnimatedLetters,\n customAnimatedLettersMeta ?? animatedLettersMeta\n );\n }\n}\n"],"names":["AnimatedLetters","_ref","className","_ref$text","text","_ref$stagger","stagger","_ref$initial","initial","opacity","y","_ref$visible","visible","transition","ease","_ref$exit","exit","letterVariants","i","_visible$transition$d","_visible$transition","_extends","delay","_exit$transition$dela","_exit$transition","React","motion","div","animate","split","map","letter","span","key","custom","style","display","variants","animatedLettersMeta","name","displayName","importName","importPath","props","type","defaultValue","description","defaultStyles","width","maxWidth","registerAnimatedLetters","loader","customAnimatedLettersMeta","registerComponent"],"mappings":";;;;;;;;;;;;;;SAewBA,eAAeA,CAAAC,IAAA;MACrCC,SAAS,GAAAD,IAAA,CAATC,SAAS;IAAAC,SAAA,GAAAF,IAAA,CACTG,IAAI;IAAJA,IAAI,GAAAD,SAAA,cAAG,iBAAiB,GAAAA,SAAA;IAAAE,YAAA,GAAAJ,IAAA,CACxBK,OAAO;IAAPA,OAAO,GAAAD,YAAA,cAAG,IAAI,GAAAA,YAAA;IAAAE,YAAA,GAAAN,IAAA,CACdO,OAAO;IAAPA,OAAO,GAAAD,YAAA,cAAG;MACRE,OAAO,EAAE,CAAC;MACVC,CAAC,EAAE;KACJ,GAAAH,YAAA;IAAAI,YAAA,GAAAV,IAAA,CACDW,OAAO;IAAPA,QAAO,GAAAD,YAAA,cAAG;MACRF,OAAO,EAAE,CAAC;MACVC,CAAC,EAAE,CAAC;MACJG,UAAU,EAAE;QACVC,IAAI,EAAE;;KAET,GAAAH,YAAA;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
|
+
"version": "0.0.210",
|
|
4
4
|
"description": "Plasmic registration call for Framer Motion",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"analyze": "size-limit --why"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@plasmicapp/host": "1.0.
|
|
31
|
+
"@plasmicapp/host": "1.0.212",
|
|
32
32
|
"@size-limit/preset-small-lib": "^7.0.0",
|
|
33
33
|
"@types/node": "^14.0.26",
|
|
34
34
|
"@types/react": "^18.2.33",
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"react": ">=16.8.0",
|
|
45
45
|
"react-dom": ">=16.8.0"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "e14716fd42ea79a35e4844d660f6d12aa97a9768"
|
|
48
48
|
}
|