Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vue-play

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-play - npm Package Compare versions

Comparing version 2.0.0-rc.1 to 2.0.0-rc.3

66

dist/play.js

@@ -150,3 +150,3 @@ module.exports =

, core = __webpack_require__(0)
, ctx = __webpack_require__(22)
, ctx = __webpack_require__(23)
, hide = __webpack_require__(10)

@@ -284,3 +284,3 @@ , PROTOTYPE = 'prototype';

var _assign = __webpack_require__(38);
var _assign = __webpack_require__(40);

@@ -310,3 +310,3 @@ var _assign2 = _interopRequireDefault(_assign);

// fallback for non-array-like ES3 and non-enumerable old V8 strings
var cof = __webpack_require__(21);
var cof = __webpack_require__(22);
module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){

@@ -322,3 +322,3 @@ return cof(it) == 'String' ? it.split('') : Object(it);

var $keys = __webpack_require__(32)
, enumBugKeys = __webpack_require__(24);
, enumBugKeys = __webpack_require__(25);

@@ -346,4 +346,4 @@ module.exports = Object.keys || function keys(O){

var shared = __webpack_require__(25)('keys')
, uid = __webpack_require__(27);
var shared = __webpack_require__(26)('keys')
, uid = __webpack_require__(28);
module.exports = function(key){

@@ -356,3 +356,4 @@ return shared[key] || (shared[key] = uid(key));

/* 20 */,
/* 21 */
/* 21 */,
/* 22 */
/***/ function(module, exports) {

@@ -367,3 +368,3 @@

/***/ },
/* 22 */
/* 23 */
/***/ function(module, exports, __webpack_require__) {

@@ -393,3 +394,3 @@

/***/ },
/* 23 */
/* 24 */
/***/ function(module, exports, __webpack_require__) {

@@ -406,3 +407,3 @@

/***/ },
/* 24 */
/* 25 */
/***/ function(module, exports) {

@@ -416,3 +417,3 @@

/***/ },
/* 25 */
/* 26 */
/***/ function(module, exports, __webpack_require__) {

@@ -428,3 +429,3 @@

/***/ },
/* 26 */
/* 27 */
/***/ function(module, exports, __webpack_require__) {

@@ -440,3 +441,3 @@

/***/ },
/* 27 */
/* 28 */
/***/ function(module, exports) {

@@ -451,3 +452,2 @@

/***/ },
/* 28 */,
/* 29 */

@@ -468,3 +468,3 @@ /***/ function(module, exports) {

var toIObject = __webpack_require__(12)
, toLength = __webpack_require__(26)
, toLength = __webpack_require__(27)
, toIndex = __webpack_require__(33);

@@ -493,3 +493,3 @@ module.exports = function(IS_INCLUDES){

module.exports = !__webpack_require__(2) && !__webpack_require__(3)(function(){
return Object.defineProperty(__webpack_require__(23)('div'), 'a', {get: function(){ return 7; }}).a != 7;
return Object.defineProperty(__webpack_require__(24)('div'), 'a', {get: function(){ return 7; }}).a != 7;
});

@@ -552,19 +552,21 @@

/* 37 */,
/* 38 */
/* 38 */,
/* 39 */,
/* 40 */
/***/ function(module, exports, __webpack_require__) {
module.exports = { "default": __webpack_require__(40), __esModule: true };
module.exports = { "default": __webpack_require__(42), __esModule: true };
/***/ },
/* 39 */,
/* 40 */
/* 41 */,
/* 42 */
/***/ function(module, exports, __webpack_require__) {
__webpack_require__(47);
__webpack_require__(49);
module.exports = __webpack_require__(0).Object.assign;
/***/ },
/* 41 */,
/* 42 */,
/* 43 */
/* 43 */,
/* 44 */,
/* 45 */
/***/ function(module, exports, __webpack_require__) {

@@ -576,4 +578,4 @@

var getKeys = __webpack_require__(16)
, gOPS = __webpack_require__(44)
, pIE = __webpack_require__(45)
, gOPS = __webpack_require__(46)
, pIE = __webpack_require__(47)
, toObject = __webpack_require__(13)

@@ -609,3 +611,3 @@ , IObject = __webpack_require__(15)

/***/ },
/* 44 */
/* 46 */
/***/ function(module, exports) {

@@ -616,3 +618,3 @@

/***/ },
/* 45 */
/* 47 */
/***/ function(module, exports) {

@@ -623,4 +625,4 @@

/***/ },
/* 46 */,
/* 47 */
/* 48 */,
/* 49 */
/***/ function(module, exports, __webpack_require__) {

@@ -631,7 +633,5 @@

$export($export.S + $export.F, 'Object', {assign: __webpack_require__(43)});
$export($export.S + $export.F, 'Object', {assign: __webpack_require__(45)});
/***/ },
/* 48 */,
/* 49 */,
/* 50 */,

@@ -638,0 +638,0 @@ /* 51 */,

@@ -150,3 +150,3 @@ module.exports =

, core = __webpack_require__(0)
, ctx = __webpack_require__(22)
, ctx = __webpack_require__(23)
, hide = __webpack_require__(10)

@@ -281,3 +281,3 @@ , PROTOTYPE = 'prototype';

// fallback for non-array-like ES3 and non-enumerable old V8 strings
var cof = __webpack_require__(21);
var cof = __webpack_require__(22);
module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){

@@ -293,3 +293,3 @@ return cof(it) == 'String' ? it.split('') : Object(it);

var $keys = __webpack_require__(32)
, enumBugKeys = __webpack_require__(24);
, enumBugKeys = __webpack_require__(25);

@@ -317,4 +317,4 @@ module.exports = Object.keys || function keys(O){

var shared = __webpack_require__(25)('keys')
, uid = __webpack_require__(27);
var shared = __webpack_require__(26)('keys')
, uid = __webpack_require__(28);
module.exports = function(key){

@@ -327,2 +327,8 @@ return shared[key] || (shared[key] = uid(key));

/* 20 */
/***/ function(module, exports, __webpack_require__) {
module.exports = { "default": __webpack_require__(43), __esModule: true };
/***/ },
/* 21 */
/***/ function(module, exports) {

@@ -333,3 +339,3 @@

/***/ },
/* 21 */
/* 22 */
/***/ function(module, exports) {

@@ -344,3 +350,3 @@

/***/ },
/* 22 */
/* 23 */
/***/ function(module, exports, __webpack_require__) {

@@ -370,3 +376,3 @@

/***/ },
/* 23 */
/* 24 */
/***/ function(module, exports, __webpack_require__) {

@@ -383,3 +389,3 @@

/***/ },
/* 24 */
/* 25 */
/***/ function(module, exports) {

@@ -393,3 +399,3 @@

/***/ },
/* 25 */
/* 26 */
/***/ function(module, exports, __webpack_require__) {

@@ -405,3 +411,3 @@

/***/ },
/* 26 */
/* 27 */
/***/ function(module, exports, __webpack_require__) {

@@ -417,3 +423,3 @@

/***/ },
/* 27 */
/* 28 */
/***/ function(module, exports) {

@@ -428,8 +434,2 @@

/***/ },
/* 28 */
/***/ function(module, exports, __webpack_require__) {
module.exports = { "default": __webpack_require__(41), __esModule: true };
/***/ },
/* 29 */

@@ -450,3 +450,3 @@ /***/ function(module, exports) {

var toIObject = __webpack_require__(12)
, toLength = __webpack_require__(26)
, toLength = __webpack_require__(27)
, toIndex = __webpack_require__(33);

@@ -475,3 +475,3 @@ module.exports = function(IS_INCLUDES){

module.exports = !__webpack_require__(2) && !__webpack_require__(3)(function(){
return Object.defineProperty(__webpack_require__(23)('div'), 'a', {get: function(){ return 7; }}).a != 7;
return Object.defineProperty(__webpack_require__(24)('div'), 'a', {get: function(){ return 7; }}).a != 7;
});

@@ -536,2 +536,44 @@

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_keys__ = __webpack_require__(20);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_keys___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_keys__);
/* harmony export (binding) */ __webpack_require__.d(exports, "a", function() { return validShortcuts; });
var model = {
actions: {
cmdShiftK: function cmdShiftK(_ref) {
var dispatch = _ref.dispatch;
dispatch('toggleAllPanels');
},
cmdShiftL: function cmdShiftL(_ref2) {
var dispatch = _ref2.dispatch;
dispatch('toggleLeftPanel');
},
cmdShiftD: function cmdShiftD(_ref3) {
var dispatch = _ref3.dispatch;
dispatch('toggleBottomPanel');
},
cmdShiftLeft: function cmdShiftLeft(_ref4) {
var dispatch = _ref4.dispatch;
dispatch('playPrevious');
},
cmdShiftRight: function cmdShiftRight(_ref5) {
var dispatch = _ref5.dispatch;
dispatch('playNext');
}
}
};
/* harmony default export */ exports["b"] = model;
var validShortcuts = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_keys___default()(model.actions);
/***/ },
/* 37 */
/***/ function(module, exports, __webpack_require__) {
"use strict";
/* harmony default export */ exports["a"] = function (spots, query) {

@@ -548,12 +590,77 @@ var scenarios = spots[query.spot];

/***/ },
/* 37 */
/* 38 */
/***/ function(module, exports, __webpack_require__) {
module.exports = { "default": __webpack_require__(39), __esModule: true };
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_store_modules_shortcuts__ = __webpack_require__(36);
/* unused harmony export isModifierPressed */
/* harmony export (binding) */ __webpack_require__.d(exports, "c", function() { return parseKey; });
/* harmony export (binding) */ __webpack_require__.d(exports, "b", function() { return executeShortcut; });
/* harmony export (binding) */ __webpack_require__.d(exports, "a", function() { return observeKeyEvents; });
// Key codes
var keyK = 75;
var keyL = 76;
var keyD = 68;
var keyLeft = 37;
var keyRight = 39;
var keyWindows = 91;
var isModifierPressed = function isModifierPressed(e) {
return (e.ctrlKey || e.keyCode === keyWindows || e.metaKey) && e.shiftKey;
};
var parseKey = function parseKey(e) {
if (!isModifierPressed(e)) return false;
switch (e.keyCode) {
case keyK:
e.preventDefault();
return 'cmdShiftK';
case keyL:
e.preventDefault();
return 'cmdShiftL';
case keyD:
e.preventDefault();
return 'cmdShiftD';
case keyLeft:
e.preventDefault();
return 'cmdShiftLeft';
case keyRight:
e.preventDefault();
return 'cmdShiftRight';
default:
return false;
}
};
var executeShortcut = function executeShortcut(store, combination) {
if (combination) {
if (!__WEBPACK_IMPORTED_MODULE_0_store_modules_shortcuts__["a" /* validShortcuts */].includes(combination)) {
console.warn('Combination ' + combination + ' is not a valid shortcut');
return;
}
store.dispatch(combination);
}
};
var observeKeyEvents = function observeKeyEvents(store) {
window.onkeydown = function (e) {
var combination = parseKey(e);
executeShortcut(store, combination);
};
};
/***/ },
/* 38 */,
/* 39 */
/***/ function(module, exports, __webpack_require__) {
module.exports = { "default": __webpack_require__(41), __esModule: true };
/***/ },
/* 40 */,
/* 41 */
/***/ function(module, exports, __webpack_require__) {
var core = __webpack_require__(0)

@@ -566,15 +673,15 @@ , $JSON = core.JSON || (core.JSON = {stringify: JSON.stringify});

/***/ },
/* 40 */,
/* 41 */
/* 42 */,
/* 43 */
/***/ function(module, exports, __webpack_require__) {
__webpack_require__(48);
__webpack_require__(50);
module.exports = __webpack_require__(0).Object.keys;
/***/ },
/* 42 */,
/* 43 */,
/* 44 */,
/* 45 */,
/* 46 */
/* 46 */,
/* 47 */,
/* 48 */
/***/ function(module, exports, __webpack_require__) {

@@ -594,4 +701,4 @@

/***/ },
/* 47 */,
/* 48 */
/* 49 */,
/* 50 */
/***/ function(module, exports, __webpack_require__) {

@@ -603,3 +710,3 @@

__webpack_require__(46)('keys', function(){
__webpack_require__(48)('keys', function(){
return function keys(it){

@@ -611,4 +718,2 @@ return $keys(toObject(it));

/***/ },
/* 49 */,
/* 50 */,
/* 51 */,

@@ -688,11 +793,12 @@ /* 52 */,

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_json_stringify__ = __webpack_require__(37);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_json_stringify__ = __webpack_require__(39);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_json_stringify___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_json_stringify__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_object_keys__ = __webpack_require__(28);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_object_keys__ = __webpack_require__(20);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_object_keys___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_object_keys__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_vue__ = __webpack_require__(20);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_vue__ = __webpack_require__(21);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_vue__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_query_string__ = __webpack_require__(57);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_query_string___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_query_string__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__utils_find_scenario__ = __webpack_require__(36);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__utils_find_scenario__ = __webpack_require__(37);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__utils_key_events__ = __webpack_require__(38);

@@ -704,2 +810,3 @@

/* harmony default export */ exports["default"] = function (_ref) {

@@ -747,2 +854,8 @@ var spots = _ref.spots,

});
window.onkeydown = function (e) {
parent.postMessage({
type: 'APPLY_SHORTCUT',
payload: __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_json_stringify___default()(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__utils_key_events__["c" /* parseKey */])(e))
}, location.origin);
};
parent.postMessage({

@@ -749,0 +862,0 @@ type: 'SET_SPOTS',

{
"name": "vue-play",
"version": "2.0.0-rc.1",
"version": "2.0.0-rc.3",
"description": "Play with your vue components.",

@@ -5,0 +5,0 @@ "license": "MIT",

import Vue from 'vue'
import qs from 'query-string'
import findScenario from './utils/find-scenario'
import {parseKey} from './utils/key-events'

@@ -40,2 +41,8 @@ export default function ({spots, components}) {

})
window.onkeydown = e => {
parent.postMessage({
type: 'APPLY_SHORTCUT',
payload: JSON.stringify(parseKey(e))
}, location.origin)
}
parent.postMessage({

@@ -42,0 +49,0 @@ type: 'SET_SPOTS',

export const TOGGLE_LEFT_PANEL = 'TOGGLE_LEFT_PANEL'
export const TOGGLE_BOTTOM_PANEL = 'TOGGLE_BOTTOM_PANEL'
export const TOGGLE_ALL_PANELS = 'TOGGLE_ALL_PANELS'
export const SET_BOTTOM_PANEL_HEIGHT = 'SET_BOTTOM_PANEL_HEIGHT'
export const UPDATE_SIDEBAR_WIDTH = 'UPDATE_SIDEBAR_WIDTH'

@@ -9,4 +8,2 @@ export const UPDATE_ACTIVE_TAB = 'UPDATE_ACTIVE_TAB'

export const defaultBottomPanelHeight = 200
export default {

@@ -16,3 +13,2 @@ state: {

bottomPanelExpanded: true,
bottomPanelHeight: defaultBottomPanelHeight,
sidebarWidth: 280,

@@ -29,5 +25,2 @@ activeTab: null,

},
SET_BOTTOM_PANEL_HEIGHT(state, payload) {
state.bottomPanelHeight = payload || defaultBottomPanelHeight
},
UPDATE_SIDEBAR_WIDTH(state, payload) {

@@ -63,5 +56,2 @@ state.sidebarWidth = payload

},
setBottomPanelHeight({commit}, payload) {
commit(SET_BOTTOM_PANEL_HEIGHT, payload)
},
updateSidebarWidth({commit}, payload) {

@@ -68,0 +58,0 @@ commit(UPDATE_SIDEBAR_WIDTH, payload)

@@ -41,2 +41,6 @@ import findIndex from 'array-find-index'

commit(UPDATE_CURRENT_SCENARIO, path)
},
activateSpot({commit, getters}, spot) {
const {scenario} = getters.visibleScenarios[spot][0]
router.push({query: {spot, scenario}})
}

@@ -43,0 +47,0 @@ },

@@ -74,4 +74,7 @@ import uid from 'uid'

}).reduce((current, next) => [...current, ...next], [])
},
filterKeyword(state) {
return state.filter
}
}
}

@@ -11,7 +11,7 @@ import {validShortcuts} from 'store/modules/shortcuts'

export function isModifierPressed(e) {
export const isModifierPressed = e => {
return (e.ctrlKey || e.keyCode === keyWindows || e.metaKey) && e.shiftKey
}
function check(e) {
export const parseKey = e => {
if (!isModifierPressed(e)) return false

@@ -40,13 +40,17 @@

export default function observeKeyEvents(store) {
window.addEventListener('keydown', event => {
const combination = check(event)
if (combination) {
if (!validShortcuts.includes(combination)) {
console.warn(`Combination ${combination} is not a valid shortcut`)
return
}
store.dispatch(combination)
export const executeShortcut = (store, combination) => {
if (combination) {
if (!validShortcuts.includes(combination)) {
console.warn(`Combination ${combination} is not a valid shortcut`)
return
}
})
store.dispatch(combination)
}
}
export const observeKeyEvents = store => {
window.onkeydown = e => {
const combination = parseKey(e)
executeShortcut(store, combination)
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc