Comparing version 0.0.4 to 0.0.5
/******/ (function(modules) { // webpackBootstrap | ||
/******/ // The module cache | ||
/******/ var installedModules = {}; | ||
/******/ | ||
/******/ // The require function | ||
/******/ function __webpack_require__(moduleId) { | ||
/******/ | ||
/******/ // Check if module is in cache | ||
/******/ if(installedModules[moduleId]) | ||
/******/ if(installedModules[moduleId]) { | ||
/******/ return installedModules[moduleId].exports; | ||
/******/ } | ||
/******/ // Create a new module (and put it into the cache) | ||
@@ -18,23 +18,23 @@ /******/ var module = installedModules[moduleId] = { | ||
/******/ }; | ||
/******/ | ||
/******/ // 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 | ||
@@ -50,3 +50,3 @@ /******/ __webpack_require__.d = function(exports, name, getter) { | ||
/******/ }; | ||
/******/ | ||
/******/ // getDefaultExport function for compatibility with non-harmony modules | ||
@@ -60,9 +60,9 @@ /******/ __webpack_require__.n = function(module) { | ||
/******/ }; | ||
/******/ | ||
/******/ // 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 | ||
@@ -123,3 +123,2 @@ /******/ return __webpack_require__(__webpack_require__.s = 2); | ||
var columns = 12; | ||
var RESIZE_DELAY = 700; | ||
var TYPE_DELAY = 250; | ||
@@ -130,6 +129,30 @@ | ||
maxWidthInputView, containerView, bodyClickFn, currentMaxWidthView, valueView, maxWidthLabelView; | ||
var doResize = debounce(onResize, RESIZE_DELAY); | ||
var doMaxWidthChanged = debounce(onMaxWidthChange, TYPE_DELAY); | ||
bodyClickFn = null; | ||
currentWidthView = null; | ||
var requestAnimFrame = (function () { | ||
return window.requestAnimationFrame || | ||
window.webkitRequestAnimationFrame || | ||
window.mozRequestAnimationFrame || | ||
function (callback) { | ||
window.setTimeout(callback, 1000 / 60); | ||
}; | ||
}()); | ||
(function animloop (){ | ||
requestAnimFrame(animloop); | ||
render(); | ||
})(); | ||
function render () { | ||
if (currentWidthView === null) { | ||
return; | ||
} | ||
else { | ||
var widthPx = window.innerWidth; | ||
currentWidthView.textContent = 'Current width: ' + widthPx + ' px'; | ||
} | ||
} | ||
function debounce(fn, wait) { | ||
@@ -149,7 +172,2 @@ var timeout; | ||
function onResize () { | ||
var widthPx = window.innerWidth; | ||
currentWidthView.textContent = 'Current width: ' + widthPx + ' px'; | ||
} | ||
function applyValueIfValid (vm) { | ||
@@ -247,3 +265,2 @@ if (/^\d+$/.test(vm)) { | ||
buildGridAssistant(); | ||
onResize(); | ||
} | ||
@@ -363,8 +380,5 @@ | ||
} | ||
window.removeEventListener('resize', doResize); | ||
} | ||
document.addEventListener('DOMContentLoaded', ready); | ||
window.addEventListener('resize', doResize); | ||
window.addEventListener('unload', unload); | ||
@@ -371,0 +385,0 @@ }(window, document, __WEBPACK_IMPORTED_MODULE_0_npm_dragndrop___default.a)); |
@@ -5,3 +5,3 @@ // ==UserScript== | ||
// @namespace kayto | ||
// @version 0.0.4 | ||
// @version 0.0.5 | ||
// @grant none | ||
@@ -13,10 +13,10 @@ // ==/UserScript== | ||
/******/ var installedModules = {}; | ||
/******/ | ||
/******/ // The require function | ||
/******/ function __webpack_require__(moduleId) { | ||
/******/ | ||
/******/ // Check if module is in cache | ||
/******/ if(installedModules[moduleId]) | ||
/******/ if(installedModules[moduleId]) { | ||
/******/ return installedModules[moduleId].exports; | ||
/******/ } | ||
/******/ // Create a new module (and put it into the cache) | ||
@@ -28,23 +28,23 @@ /******/ var module = installedModules[moduleId] = { | ||
/******/ }; | ||
/******/ | ||
/******/ // 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 | ||
@@ -60,3 +60,3 @@ /******/ __webpack_require__.d = function(exports, name, getter) { | ||
/******/ }; | ||
/******/ | ||
/******/ // getDefaultExport function for compatibility with non-harmony modules | ||
@@ -70,9 +70,9 @@ /******/ __webpack_require__.n = function(module) { | ||
/******/ }; | ||
/******/ | ||
/******/ // 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 | ||
@@ -133,3 +133,2 @@ /******/ return __webpack_require__(__webpack_require__.s = 2); | ||
var columns = 12; | ||
var RESIZE_DELAY = 700; | ||
var TYPE_DELAY = 250; | ||
@@ -140,6 +139,30 @@ | ||
maxWidthInputView, containerView, bodyClickFn, currentMaxWidthView, valueView, maxWidthLabelView; | ||
var doResize = debounce(onResize, RESIZE_DELAY); | ||
var doMaxWidthChanged = debounce(onMaxWidthChange, TYPE_DELAY); | ||
bodyClickFn = null; | ||
currentWidthView = null; | ||
var requestAnimFrame = (function () { | ||
return window.requestAnimationFrame || | ||
window.webkitRequestAnimationFrame || | ||
window.mozRequestAnimationFrame || | ||
function (callback) { | ||
window.setTimeout(callback, 1000 / 60); | ||
}; | ||
}()); | ||
(function animloop (){ | ||
requestAnimFrame(animloop); | ||
render(); | ||
})(); | ||
function render () { | ||
if (currentWidthView === null) { | ||
return; | ||
} | ||
else { | ||
var widthPx = window.innerWidth; | ||
currentWidthView.textContent = 'Current width: ' + widthPx + ' px'; | ||
} | ||
} | ||
function debounce(fn, wait) { | ||
@@ -159,7 +182,2 @@ var timeout; | ||
function onResize () { | ||
var widthPx = window.innerWidth; | ||
currentWidthView.textContent = 'Current width: ' + widthPx + ' px'; | ||
} | ||
function applyValueIfValid (vm) { | ||
@@ -257,3 +275,2 @@ if (/^\d+$/.test(vm)) { | ||
buildGridAssistant(); | ||
onResize(); | ||
} | ||
@@ -373,8 +390,5 @@ | ||
} | ||
window.removeEventListener('resize', doResize); | ||
} | ||
document.addEventListener('DOMContentLoaded', ready); | ||
window.addEventListener('resize', doResize); | ||
window.addEventListener('unload', unload); | ||
@@ -393,3 +407,3 @@ }(window, document, __WEBPACK_IMPORTED_MODULE_0_npm_dragndrop___default.a)); | ||
styleView.setAttribute('data-comment', 'required styles for kayto script'); | ||
styleView.textContent = '.kayto{margin-left:auto;margin-right:auto;max-width:1600px;pointer-events:none}.kayto-ctrl::after,.kayto::after{clear:both;content:\' \';display:table}.kayto .kayto-container{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;max-width:1600px;opacity:.4;position:fixed;width:100%;z-index:1100}.kayto .kayto-container>.kayto-column{background-color:#80bde1;box-sizing:border-box;-webkit-flex:0 1 auto;-ms-flex:0 1 auto;flex:0 1 auto;float:left;height:100vh;padding-left:16px;padding-right:16px;width:8.33333%}.kayto .kayto-container>.kayto-column>.kayto-content{background-color:#409bd2;height:100vh;overflow-x:hidden}.kayto-ctrl{background-color:#474747;bottom:16px;cursor:move;font-family:"Helvetica Neue",Helvetica,"Roboto",Arial,sans-serif;font-size:16px;min-width:170px;padding:16px;position:fixed;right:24px;z-index:1200}.kayto-ctrl .kayto-ctrl-container label:hover,.kayto-ctrl input[type=checkbox]:hover{cursor:pointer}.kayto-ctrl input[type=checkbox]{margin-right:.5em;visibility:visible}.kayto-ctrl input[type=text]{color:#474747;width:100%}.kayto-ctrl .kayto-ctrl-current-width-panel,.kayto-ctrl .kayto-ctrl-max-width-panel,.kayto-ctrl .kayto-ctrl-max-width-panel .kayto-current-max-width-ctrl,.kayto-ctrl label{color:#fff}.kayto-ctrl .kayto-ctrl-max-width-panel .kayto-edit-icon{color:#fff;margin-left:.5em;position:relative;top:3px}.kayto-ctrl .kayto-ctrl-max-width-panel .kayto-edit-icon>svg{fill:#fff;height:16px;width:16px}'; | ||
styleView.textContent = '.kayto{margin-left:auto;margin-right:auto;max-width:1600px;pointer-events:none}.kayto-ctrl::after,.kayto::after{clear:both;content:\' \';display:table}.kayto .kayto-container{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;max-width:1600px;opacity:.4;position:fixed;width:100%;z-index:1100}.kayto .kayto-container>.kayto-column{background-color:#80bde1;box-sizing:border-box;-ms-flex:0 1 auto;flex:0 1 auto;float:left;height:100vh;padding-left:16px;padding-right:16px;width:8.33333%}.kayto .kayto-container>.kayto-column>.kayto-content{background-color:#409bd2;height:100vh;overflow-x:hidden}.kayto-ctrl{background-color:#474747;bottom:16px;cursor:move;font-family:"Helvetica Neue",Helvetica,"Roboto",Arial,sans-serif;font-size:16px;min-width:170px;padding:16px;position:fixed;right:24px;z-index:1200}.kayto-ctrl .kayto-ctrl-container label:hover,.kayto-ctrl input[type=checkbox]:hover{cursor:pointer}.kayto-ctrl input[type=checkbox]{margin-right:.5em;visibility:visible}.kayto-ctrl input[type=text]{color:#474747;width:100%}.kayto-ctrl .kayto-ctrl-current-width-panel,.kayto-ctrl .kayto-ctrl-max-width-panel,.kayto-ctrl .kayto-ctrl-max-width-panel .kayto-current-max-width-ctrl,.kayto-ctrl label{color:#fff}.kayto-ctrl .kayto-ctrl-max-width-panel .kayto-edit-icon{color:#fff;margin-left:.5em;position:relative;top:3px}.kayto-ctrl .kayto-ctrl-max-width-panel .kayto-edit-icon>svg{fill:#fff;height:16px;width:16px}'; | ||
document.body.appendChild(styleView); | ||
@@ -396,0 +410,0 @@ } |
{ | ||
"name": "kayto", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "Your UI layout sidekick", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -9,3 +9,2 @@ import dragNdrop from 'npm-dragndrop'; | ||
var columns = 12; | ||
var RESIZE_DELAY = 700; | ||
var TYPE_DELAY = 250; | ||
@@ -16,6 +15,30 @@ | ||
maxWidthInputView, containerView, bodyClickFn, currentMaxWidthView, valueView, maxWidthLabelView; | ||
var doResize = debounce(onResize, RESIZE_DELAY); | ||
var doMaxWidthChanged = debounce(onMaxWidthChange, TYPE_DELAY); | ||
bodyClickFn = null; | ||
currentWidthView = null; | ||
var requestAnimFrame = (function () { | ||
return window.requestAnimationFrame || | ||
window.webkitRequestAnimationFrame || | ||
window.mozRequestAnimationFrame || | ||
function (callback) { | ||
window.setTimeout(callback, 1000 / 60); | ||
}; | ||
}()); | ||
(function animloop (){ | ||
requestAnimFrame(animloop); | ||
render(); | ||
})(); | ||
function render () { | ||
if (currentWidthView === null) { | ||
return; | ||
} | ||
else { | ||
var widthPx = window.innerWidth; | ||
currentWidthView.textContent = 'Current width: ' + widthPx + ' px'; | ||
} | ||
} | ||
function debounce(fn, wait) { | ||
@@ -35,7 +58,2 @@ var timeout; | ||
function onResize () { | ||
var widthPx = window.innerWidth; | ||
currentWidthView.textContent = 'Current width: ' + widthPx + ' px'; | ||
} | ||
function applyValueIfValid (vm) { | ||
@@ -133,3 +151,2 @@ if (/^\d+$/.test(vm)) { | ||
buildGridAssistant(); | ||
onResize(); | ||
} | ||
@@ -249,9 +266,6 @@ | ||
} | ||
window.removeEventListener('resize', doResize); | ||
} | ||
document.addEventListener('DOMContentLoaded', ready); | ||
window.addEventListener('resize', doResize); | ||
window.addEventListener('unload', unload); | ||
}(window, document, dragNdrop)); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
65018
1038