UNPKG

9.73 kBSource Map (JSON)View Raw
1{"version":3,"file":"vue-content-loader.umd.min.js","sources":["../src/uid.js","../src/ContentLoader.js","../src/BulletListLoader.js","../src/CodeLoader.js","../src/FacebookLoader.js","../src/InstagramLoader.js","../src/ListLoader.js"],"sourcesContent":["export default () =>\n Math.random()\n .toString(36)\n .substring(2)\n","import uid from './uid'\n\nconst ContentLoader = (props, { attrs, slots }) => {\n const idClip = props.uniqueKey ? `${props.uniqueKey}-idClip` : uid()\n const idGradient = props.uniqueKey ? `${props.uniqueKey}-idGradient` : uid()\n\n return (\n <svg\n {...attrs}\n viewBox={`0 0 ${props.width} ${props.height}`}\n version=\"1.1\"\n preserveAspectRatio={props.preserveAspectRatio}\n >\n <rect\n style={{ fill: `url(${props.baseUrl}#${idGradient})` }}\n clip-path={`url(${props.baseUrl}#${idClip})`}\n x=\"0\"\n y=\"0\"\n width={props.width}\n height={props.height}\n />\n\n <defs>\n <clipPath id={idClip}>\n {slots.default ? (\n slots.default()\n ) : (\n <rect\n x=\"0\"\n y=\"0\"\n rx=\"5\"\n ry=\"5\"\n width={props.width}\n height={props.height}\n />\n )}\n </clipPath>\n\n <linearGradient id={idGradient}>\n <stop\n offset=\"0%\"\n stop-color={props.primaryColor}\n stop-opacity={props.primaryOpacity}\n >\n {props.animate ? (\n <animate\n attributeName=\"offset\"\n values=\"-2; 1\"\n dur={`${props.speed}s`}\n repeatCount=\"indefinite\"\n />\n ) : null}\n </stop>\n <stop\n offset=\"50%\"\n stop-color={props.secondaryColor}\n stop-opacity={props.secondaryOpacity}\n >\n {props.animate ? (\n <animate\n attributeName=\"offset\"\n values=\"-1.5; 1.5\"\n dur={`${props.speed}s`}\n repeatCount=\"indefinite\"\n />\n ) : null}\n </stop>\n <stop\n offset=\"100%\"\n stop-color={props.primaryColor}\n stop-opacity={props.primaryOpacity}\n >\n {props.animate ? (\n <animate\n attributeName=\"offset\"\n values=\"-1; 2\"\n dur={`${props.speed}s`}\n repeatCount=\"indefinite\"\n />\n ) : null}\n </stop>\n </linearGradient>\n </defs>\n </svg>\n )\n}\n\nContentLoader.props = {\n width: {\n type: [Number, String],\n default: 400\n },\n height: {\n type: [Number, String],\n default: 130\n },\n speed: {\n type: Number,\n default: 2\n },\n preserveAspectRatio: {\n type: String,\n default: 'xMidYMid meet'\n },\n baseUrl: {\n type: String,\n default: ''\n },\n primaryColor: {\n type: String,\n default: '#f9f9f9'\n },\n secondaryColor: {\n type: String,\n default: '#ecebeb'\n },\n primaryOpacity: {\n type: Number,\n default: 1\n },\n secondaryOpacity: {\n type: Number,\n default: 1\n },\n uniqueKey: {\n type: String\n },\n animate: {\n type: Boolean,\n default: true\n }\n}\n\nexport default ContentLoader\n","import ContentLoader from './ContentLoader'\n\nconst BulletListLoader = (props, { attrs }) => {\n return (\n <ContentLoader {...attrs}>\n <circle cx=\"10\" cy=\"20\" r=\"8\" />\n <rect x=\"25\" y=\"15\" rx=\"5\" ry=\"5\" width=\"220\" height=\"10\" />\n <circle cx=\"10\" cy=\"50\" r=\"8\" />\n <rect x=\"25\" y=\"45\" rx=\"5\" ry=\"5\" width=\"220\" height=\"10\" />\n <circle cx=\"10\" cy=\"80\" r=\"8\" />\n <rect x=\"25\" y=\"75\" rx=\"5\" ry=\"5\" width=\"220\" height=\"10\" />\n <circle cx=\"10\" cy=\"110\" r=\"8\" />\n <rect x=\"25\" y=\"105\" rx=\"5\" ry=\"5\" width=\"220\" height=\"10\" />\n </ContentLoader>\n )\n}\n\nexport default BulletListLoader\n","import ContentLoader from './ContentLoader'\n\nconst CodeLoader = (props, { attrs }) => {\n return (\n <ContentLoader {...attrs}>\n <rect x=\"0\" y=\"0\" rx=\"3\" ry=\"3\" width=\"70\" height=\"10\" />\n <rect x=\"80\" y=\"0\" rx=\"3\" ry=\"3\" width=\"100\" height=\"10\" />\n <rect x=\"190\" y=\"0\" rx=\"3\" ry=\"3\" width=\"10\" height=\"10\" />\n\n <rect x=\"15\" y=\"20\" rx=\"3\" ry=\"3\" width=\"130\" height=\"10\" />\n <rect x=\"155\" y=\"20\" rx=\"3\" ry=\"3\" width=\"130\" height=\"10\" />\n\n <rect x=\"15\" y=\"40\" rx=\"3\" ry=\"3\" width=\"90\" height=\"10\" />\n <rect x=\"115\" y=\"40\" rx=\"3\" ry=\"3\" width=\"60\" height=\"10\" />\n <rect x=\"185\" y=\"40\" rx=\"3\" ry=\"3\" width=\"60\" height=\"10\" />\n\n <rect x=\"0\" y=\"60\" rx=\"3\" ry=\"3\" width=\"30\" height=\"10\" />\n </ContentLoader>\n )\n}\n\nexport default CodeLoader\n","import ContentLoader from './ContentLoader'\n\nconst FacebookLoader = (props, { attrs }) => {\n return (\n <ContentLoader {...attrs}>\n <rect x=\"70\" y=\"15\" rx=\"4\" ry=\"4\" width=\"117\" height=\"6.4\" />\n <rect x=\"70\" y=\"35\" rx=\"3\" ry=\"3\" width=\"85\" height=\"6.4\" />\n <rect x=\"0\" y=\"80\" rx=\"3\" ry=\"3\" width=\"350\" height=\"6.4\" />\n <rect x=\"0\" y=\"100\" rx=\"3\" ry=\"3\" width=\"380\" height=\"6.4\" />\n <rect x=\"0\" y=\"120\" rx=\"3\" ry=\"3\" width=\"201\" height=\"6.4\" />\n <circle cx=\"30\" cy=\"30\" r=\"30\" />\n </ContentLoader>\n )\n}\n\nexport default FacebookLoader\n","import ContentLoader from './ContentLoader'\n\nconst InstagramLoader = (props, { attrs }) => {\n return (\n <ContentLoader {...attrs} height={480}>\n <circle cx=\"30\" cy=\"30\" r=\"30\" />\n\n <rect x=\"75\" y=\"13\" rx=\"4\" ry=\"4\" width=\"100\" height=\"13\" />\n <rect x=\"75\" y=\"37\" rx=\"4\" ry=\"4\" width=\"50\" height=\"8\" />\n <rect x=\"0\" y=\"70\" rx=\"5\" ry=\"5\" width=\"400\" height=\"400\" />\n </ContentLoader>\n )\n}\n\nexport default InstagramLoader\n","import ContentLoader from './ContentLoader'\n\nconst ListLoader = (props, { attrs }) => {\n return (\n <ContentLoader {...attrs}>\n <rect x=\"0\" y=\"0\" rx=\"3\" ry=\"3\" width=\"250\" height=\"10\" />\n <rect x=\"20\" y=\"20\" rx=\"3\" ry=\"3\" width=\"220\" height=\"10\" />\n <rect x=\"20\" y=\"40\" rx=\"3\" ry=\"3\" width=\"170\" height=\"10\" />\n <rect x=\"0\" y=\"60\" rx=\"3\" ry=\"3\" width=\"250\" height=\"10\" />\n <rect x=\"20\" y=\"80\" rx=\"3\" ry=\"3\" width=\"200\" height=\"10\" />\n <rect x=\"20\" y=\"100\" rx=\"3\" ry=\"3\" width=\"80\" height=\"10\" />\n </ContentLoader>\n )\n}\n\nexport default ListLoader\n"],"names":["Math","random","toString","substring","ContentLoader","props","attrs","slots","idClip","uniqueKey","uid","idGradient","_createVNode","width","height","preserveAspectRatio","fill","baseUrl","primaryColor","primaryOpacity","animate","speed","secondaryColor","secondaryOpacity","type","Number","String","Boolean"],"mappings":"2SACEA,KAAKC,SACFC,SAAS,IACTC,UAAU,ICDTC,EAAgB,SAACC,SAASC,IAAAA,MAAOC,IAAAA,MAC/BC,EAASH,EAAMI,UAAeJ,EAAMI,oBAAqBC,IACzDC,EAAaN,EAAMI,UAAeJ,EAAMI,wBAAyBC,WAGrEE,iCACMN,kBACYD,EAAMQ,UAASR,EAAMS,eAC7B,0BACaT,EAAMU,uBAE3BH,4BACS,CAAEI,YAAaX,EAAMY,YAAWN,0BACrBN,EAAMY,YAAWT,QACjC,MACA,UACKH,EAAMQ,aACLR,EAAMS,cAGhBF,2BACEA,6BAAcJ,IACXD,UACCA,YAEAK,wBACI,MACA,OACC,OACA,UACIP,EAAMQ,aACLR,EAAMS,gBAKpBF,mCAAoBD,IAClBC,6BACS,kBACKP,EAAMa,4BACJb,EAAMc,iBAEnBd,EAAMe,QACLR,uCACgB,gBACP,YACCP,EAAMgB,sBACF,oBAEZ,OAENT,6BACS,mBACKP,EAAMiB,8BACJjB,EAAMkB,mBAEnBlB,EAAMe,QACLR,uCACgB,gBACP,gBACCP,EAAMgB,sBACF,oBA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