not really known
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

151 lines
7.9 KiB

  1. var GUI =
  2. (window["webpackJsonpGUI"] = window["webpackJsonpGUI"] || []).push([["player"],{
  3. /***/ "./node_modules/css-loader/index.js?!./node_modules/postcss-loader/src/index.js?!./src/playground/player.css":
  4. /*!******************************************************************************************************************!*\
  5. !*** ./node_modules/css-loader??ref--5-1!./node_modules/postcss-loader/src??postcss!./src/playground/player.css ***!
  6. \******************************************************************************************************************/
  7. /*! no static exports found */
  8. /***/ (function(module, exports, __webpack_require__) {
  9. exports = module.exports = __webpack_require__(/*! ../../node_modules/css-loader/lib/css-base.js */ "./node_modules/css-loader/lib/css-base.js")(false);
  10. // imports
  11. // module
  12. exports.push([module.i, ".player_stage-only_3WHZN {\n width: calc(480px + 1rem);\n}\n\n.player_editor_wkTja {\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n}\n\n.player_stage-only_3WHZN * {\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n}\n", ""]);
  13. // exports
  14. exports.locals = {
  15. "stage-only": "player_stage-only_3WHZN",
  16. "stageOnly": "player_stage-only_3WHZN",
  17. "editor": "player_editor_wkTja"
  18. };
  19. /***/ }),
  20. /***/ "./src/playground/player.css":
  21. /*!***********************************!*\
  22. !*** ./src/playground/player.css ***!
  23. \***********************************/
  24. /*! no static exports found */
  25. /***/ (function(module, exports, __webpack_require__) {
  26. var content = __webpack_require__(/*! !../../node_modules/css-loader??ref--5-1!../../node_modules/postcss-loader/src??postcss!./player.css */ "./node_modules/css-loader/index.js?!./node_modules/postcss-loader/src/index.js?!./src/playground/player.css");
  27. if(typeof content === 'string') content = [[module.i, content, '']];
  28. var transform;
  29. var insertInto;
  30. var options = {"hmr":true}
  31. options.transform = transform
  32. options.insertInto = undefined;
  33. var update = __webpack_require__(/*! ../../node_modules/style-loader/lib/addStyles.js */ "./node_modules/style-loader/lib/addStyles.js")(content, options);
  34. if(content.locals) module.exports = content.locals;
  35. if(false) {}
  36. /***/ }),
  37. /***/ "./src/playground/player.jsx":
  38. /*!***********************************!*\
  39. !*** ./src/playground/player.jsx ***!
  40. \***********************************/
  41. /*! no exports provided */
  42. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  43. "use strict";
  44. __webpack_require__.r(__webpack_exports__);
  45. /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js");
  46. /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_0__);
  47. /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
  48. /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);
  49. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "./node_modules/react/index.js");
  50. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);
  51. /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react-dom */ "./node_modules/react-dom/index.js");
  52. /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_3__);
  53. /* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js");
  54. /* harmony import */ var redux__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! redux */ "./node_modules/redux/es/index.js");
  55. /* harmony import */ var _components_box_box_jsx__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../components/box/box.jsx */ "./src/components/box/box.jsx");
  56. /* harmony import */ var _containers_gui_jsx__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../containers/gui.jsx */ "./src/containers/gui.jsx");
  57. /* harmony import */ var _lib_hash_parser_hoc_jsx__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../lib/hash-parser-hoc.jsx */ "./src/lib/hash-parser-hoc.jsx");
  58. /* harmony import */ var _lib_app_state_hoc_jsx__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../lib/app-state-hoc.jsx */ "./src/lib/app-state-hoc.jsx");
  59. /* harmony import */ var _lib_titled_hoc_jsx__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../lib/titled-hoc.jsx */ "./src/lib/titled-hoc.jsx");
  60. /* harmony import */ var _reducers_mode__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../reducers/mode */ "./src/reducers/mode.js");
  61. /* harmony import */ var _player_css__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./player.css */ "./src/playground/player.css");
  62. /* harmony import */ var _player_css__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_player_css__WEBPACK_IMPORTED_MODULE_12__);
  63. function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
  64. if (false) {}
  65. var Player = function Player(_ref) {
  66. var isPlayerOnly = _ref.isPlayerOnly,
  67. onSeeInside = _ref.onSeeInside,
  68. projectId = _ref.projectId;
  69. return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(_components_box_box_jsx__WEBPACK_IMPORTED_MODULE_6__["default"], {
  70. className: classnames__WEBPACK_IMPORTED_MODULE_0___default()(isPlayerOnly ? _player_css__WEBPACK_IMPORTED_MODULE_12___default.a.stageOnly : _player_css__WEBPACK_IMPORTED_MODULE_12___default.a.editor)
  71. }, isPlayerOnly && react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement("button", {
  72. onClick: onSeeInside
  73. }, 'See inside'), react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(_containers_gui_jsx__WEBPACK_IMPORTED_MODULE_7__["default"], {
  74. enableCommunity: true,
  75. isPlayerOnly: isPlayerOnly,
  76. projectId: projectId
  77. }));
  78. };
  79. Player.propTypes = {
  80. isPlayerOnly: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,
  81. onSeeInside: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func,
  82. projectId: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string
  83. };
  84. var mapStateToProps = function mapStateToProps(state) {
  85. return {
  86. isPlayerOnly: state.scratchGui.mode.isPlayerOnly
  87. };
  88. };
  89. var mapDispatchToProps = function mapDispatchToProps(dispatch) {
  90. return {
  91. onSeeInside: function onSeeInside() {
  92. return dispatch(Object(_reducers_mode__WEBPACK_IMPORTED_MODULE_11__["setPlayer"])(false));
  93. }
  94. };
  95. };
  96. var ConnectedPlayer = Object(react_redux__WEBPACK_IMPORTED_MODULE_4__["connect"])(mapStateToProps, mapDispatchToProps)(Player); // note that redux's 'compose' function is just being used as a general utility to make
  97. // the hierarchy of HOC constructor calls clearer here; it has nothing to do with redux's
  98. // ability to compose reducers.
  99. var WrappedPlayer = Object(redux__WEBPACK_IMPORTED_MODULE_5__["compose"])(_lib_app_state_hoc_jsx__WEBPACK_IMPORTED_MODULE_9__["default"], _lib_hash_parser_hoc_jsx__WEBPACK_IMPORTED_MODULE_8__["default"], _lib_titled_hoc_jsx__WEBPACK_IMPORTED_MODULE_10__["default"])(ConnectedPlayer);
  100. var appTarget = document.createElement('div');
  101. document.body.appendChild(appTarget);
  102. react_dom__WEBPACK_IMPORTED_MODULE_3___default.a.render(react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(WrappedPlayer, {
  103. isPlayerOnly: true
  104. }), appTarget);
  105. /***/ })
  106. },[["./src/playground/player.jsx","lib.min"]]]);
  107. //# sourceMappingURL=player.js.map