From 5d60e0d9acad01e5adc97453e10fb6a13f3e4c8b Mon Sep 17 00:00:00 2001 From: "David Z. Williams" Date: Tue, 25 Apr 2017 13:35:35 -0400 Subject: [PATCH] Release build. Bumped version and added non-minified file to dist folder. --- dist/vue-simple-spinner.js | 726 +++++++++++++++++++++++++++++++++ dist/vue-simple-spinner.min.js | 4 +- examples/examples.bundle.js | 2 +- package.json | 2 +- 4 files changed, 730 insertions(+), 4 deletions(-) create mode 100644 dist/vue-simple-spinner.js diff --git a/dist/vue-simple-spinner.js b/dist/vue-simple-spinner.js new file mode 100644 index 0000000..aae1306 --- /dev/null +++ b/dist/vue-simple-spinner.js @@ -0,0 +1,726 @@ +/*! + * vue-simple-spinner v1.2.1 (https://github.com/dzwillia/vue-simple-spinner) + * (c) 2017 David Z. Williams + * Released under the MIT License. + */ +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(); + else if(typeof define === 'function' && define.amd) + define([], factory); + else if(typeof exports === 'object') + exports["vue-simple-spinner"] = factory(); + else + root["vue-simple-spinner"] = factory(); +})(this, function() { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // identity function for calling harmony imports with the correct context +/******/ __webpack_require__.i = function(value) { return value; }; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 2); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports, __webpack_require__) { + + +/* styles */ +__webpack_require__(7) + +var Component = __webpack_require__(5)( + /* script */ + __webpack_require__(1), + /* template */ + __webpack_require__(6), + /* scopeId */ + null, + /* cssModules */ + null +) +Component.options.__file = "C:\\src\\vue-simple-spinner\\src\\components\\Spinner.vue" +if (Component.esModule && Object.keys(Component.esModule).some(function (key) {return key !== "default" && key !== "__esModule"})) {console.error("named exports are not supported in *.vue files.")} +if (Component.options.functional) {console.error("[vue-loader] Spinner.vue: functional components are not supported with templates, they should use render functions.")} + +/* hot reload */ +if (false) {(function () { + var hotAPI = require("vue-hot-reload-api") + hotAPI.install(require("vue"), false) + if (!hotAPI.compatible) return + module.hot.accept() + if (!module.hot.data) { + hotAPI.createRecord("data-v-f8f101d2", Component.options) + } else { + hotAPI.reload("data-v-f8f101d2", Component.options) + } +})()} + +module.exports = Component.exports + + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + + +var isNumber = function isNumber(n) { + return !isNaN(parseFloat(n)) && isFinite(n); +}; + +exports.default = { + name: 'vue-simple-spinner', + props: { + 'size': { + default: 32 + }, + 'line-size': { + type: Number, + default: 3 + }, + 'line-bg-color': { + type: String, + default: '#eee' + }, + 'line-fg-color': { + type: String, + default: '#2196f3' }, + 'speed': { + type: Number, + default: 0.8 + }, + 'spacing': { + type: Number, + default: 4 + }, + 'message': { + type: String, + default: '' + }, + 'font-size': { + type: Number, + default: 13 + }, + 'text-fg-color': { + type: String, + default: '#555' + } + }, + computed: { + size_px: function size_px() { + switch (this.size) { + case 'tiny': + return 12; + case 'small': + return 16; + case 'medium': + return 32; + case 'large': + return 48; + case 'big': + return 64; + case 'huge': + return 96; + case 'massive': + return 128; + } + + return isNumber(this.size) ? this.size : 32; + }, + line_size_px: function line_size_px() { + switch (this.size) { + case 'tiny': + return 1; + case 'small': + return 2; + case 'medium': + return 3; + case 'large': + return 3; + case 'big': + return 4; + case 'huge': + return 4; + case 'massive': + return 5; + } + + return isNumber(this.lineSize) ? this.lineSize : 4; + }, + text_margin_top: function text_margin_top() { + switch (this.size) { + case 'tiny': + case 'small': + case 'medium': + case 'large': + case 'big': + case 'huge': + case 'massive': + return Math.min(Math.max(Math.ceil(this.size_px / 8), 3), 12); + } + + return isNumber(this.spacing) ? this.spacing : 4; + }, + text_font_size: function text_font_size() { + switch (this.size) { + case 'tiny': + case 'small': + case 'medium': + case 'large': + case 'big': + case 'huge': + case 'massive': + return Math.min(Math.max(Math.ceil(this.size_px * 0.4), 11), 32); + } + + return isNumber(this.fontSize) ? this.fontSize : 13; + }, + spinner_style: function spinner_style() { + return { + 'margin': '0 auto', + 'border-radius': '100%', + 'border': this.line_size_px + 'px solid ' + this.lineBgColor, + 'border-top': this.line_size_px + 'px solid ' + this.lineFgColor, + 'width': this.size_px + 'px', + 'height': this.size_px + 'px', + 'animation': 'vue-simple-spinner-spin ' + this.speed + 's linear infinite' + }; + }, + text_style: function text_style() { + return { + 'margin-top': this.text_margin_top + 'px', + 'color': this.textFgColor, + 'font-size': this.text_font_size + 'px', + 'text-align': 'center' + }; + } + } +}; + +/***/ }), +/* 2 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.VueSimpleSpinner = undefined; + +var _Spinner = __webpack_require__(0); + +var _Spinner2 = _interopRequireDefault(_Spinner); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +if (typeof window !== 'undefined' && window.Vue) { + Vue.component('vue-simple-spinner', _Spinner2.default); +} + +exports.VueSimpleSpinner = _Spinner2.default; +exports.default = _Spinner2.default; + +/***/ }), +/* 3 */ +/***/ (function(module, exports, __webpack_require__) { + +exports = module.exports = __webpack_require__(4)(); +// imports + + +// module +exports.push([module.i, "\n.vue-simple-spinner {\n transition: all 0.3s linear;\n}\n@keyframes vue-simple-spinner-spin {\n0% { transform: rotate(0deg);\n}\n100% { transform: rotate(360deg);\n}\n}\n", ""]); + +// exports + + +/***/ }), +/* 4 */ +/***/ (function(module, exports) { + +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +// css base code, injected by the css-loader +module.exports = function() { + var list = []; + + // return the list of modules as css string + list.toString = function toString() { + var result = []; + for(var i = 0; i < this.length; i++) { + var item = this[i]; + if(item[2]) { + result.push("@media " + item[2] + "{" + item[1] + "}"); + } else { + result.push(item[1]); + } + } + return result.join(""); + }; + + // import a list of modules into the list + list.i = function(modules, mediaQuery) { + if(typeof modules === "string") + modules = [[null, modules, ""]]; + var alreadyImportedModules = {}; + for(var i = 0; i < this.length; i++) { + var id = this[i][0]; + if(typeof id === "number") + alreadyImportedModules[id] = true; + } + for(i = 0; i < modules.length; i++) { + var item = modules[i]; + // skip already imported module + // this implementation is not 100% perfect for weird media query combinations + // when a module is imported multiple times with different media queries. + // I hope this will never occur (Hey this way we have smaller bundles) + if(typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) { + if(mediaQuery && !item[2]) { + item[2] = mediaQuery; + } else if(mediaQuery) { + item[2] = "(" + item[2] + ") and (" + mediaQuery + ")"; + } + list.push(item); + } + } + }; + return list; +}; + + +/***/ }), +/* 5 */ +/***/ (function(module, exports) { + +// this module is a runtime utility for cleaner component module output and will +// be included in the final webpack user bundle + +module.exports = function normalizeComponent ( + rawScriptExports, + compiledTemplate, + scopeId, + cssModules +) { + var esModule + var scriptExports = rawScriptExports = rawScriptExports || {} + + // ES6 modules interop + var type = typeof rawScriptExports.default + if (type === 'object' || type === 'function') { + esModule = rawScriptExports + scriptExports = rawScriptExports.default + } + + // Vue.extend constructor export interop + var options = typeof scriptExports === 'function' + ? scriptExports.options + : scriptExports + + // render functions + if (compiledTemplate) { + options.render = compiledTemplate.render + options.staticRenderFns = compiledTemplate.staticRenderFns + } + + // scopedId + if (scopeId) { + options._scopeId = scopeId + } + + // inject cssModules + if (cssModules) { + var computed = Object.create(options.computed || null) + Object.keys(cssModules).forEach(function (key) { + var module = cssModules[key] + computed[key] = function () { return module } + }) + options.computed = computed + } + + return { + esModule: esModule, + exports: scriptExports, + options: options + } +} + + +/***/ }), +/* 6 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; + return _c('div', { + staticStyle: { + "text-align": "right" + } + }, [_c('div', { + staticClass: "vue-simple-spinner", + style: (_vm.spinner_style) + }), _vm._v(" "), (_vm.message.length > 0) ? _c('div', { + staticClass: "vue-simple-spinner", + style: (_vm.text_style) + }, [_vm._v(_vm._s(_vm.message))]) : _vm._e()]) +},staticRenderFns: []} +module.exports.render._withStripped = true +if (false) { + module.hot.accept() + if (module.hot.data) { + require("vue-hot-reload-api").rerender("data-v-f8f101d2", module.exports) + } +} + +/***/ }), +/* 7 */ +/***/ (function(module, exports, __webpack_require__) { + +// style-loader: Adds some css to the DOM by adding a