gwchq-textjam 0.1.71 → 0.1.73
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +622 -138
- package/dist/style.css +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -64671,6 +64671,34 @@ function SvgAlert(props) {
|
|
|
64671
64671
|
|
|
64672
64672
|
/***/ }),
|
|
64673
64673
|
|
|
64674
|
+
/***/ 30103:
|
|
64675
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
64676
|
+
|
|
64677
|
+
__webpack_require__.r(__webpack_exports__);
|
|
64678
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
64679
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
64680
|
+
/* harmony export */ });
|
|
64681
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(51649);
|
|
64682
|
+
var _path;
|
|
64683
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
64684
|
+
|
|
64685
|
+
function SvgAlertTriangle(props) {
|
|
64686
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("svg", _extends({
|
|
64687
|
+
viewBox: "0 0 32 32",
|
|
64688
|
+
fill: "none",
|
|
64689
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
64690
|
+
}, props), _path || (_path = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", {
|
|
64691
|
+
d: "M14.036 6.71L4.308 22.95a2.297 2.297 0 001.964 3.446h19.456a2.297 2.297 0 001.964-3.446L17.964 6.71a2.296 2.296 0 00-3.928 0v0zM16 12.613v4.595M16 21.801h.012",
|
|
64692
|
+
stroke: "currentColor",
|
|
64693
|
+
strokeWidth: 2,
|
|
64694
|
+
strokeLinecap: "round",
|
|
64695
|
+
strokeLinejoin: "round"
|
|
64696
|
+
})));
|
|
64697
|
+
}
|
|
64698
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SvgAlertTriangle);
|
|
64699
|
+
|
|
64700
|
+
/***/ }),
|
|
64701
|
+
|
|
64674
64702
|
/***/ 17297:
|
|
64675
64703
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
64676
64704
|
|
|
@@ -67920,8 +67948,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
67920
67948
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
67921
67949
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
67922
67950
|
/* harmony export */ });
|
|
67923
|
-
/* harmony import */ var
|
|
67924
|
-
/* harmony import */ var
|
|
67951
|
+
/* harmony import */ var _Users_hanna_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(89379);
|
|
67952
|
+
/* harmony import */ var _Users_hanna_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(53986);
|
|
67925
67953
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(51649);
|
|
67926
67954
|
/* harmony import */ var _hello_pangea_dnd__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(98850);
|
|
67927
67955
|
/* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(14062);
|
|
@@ -67945,7 +67973,7 @@ var DraggableTab = _ref => {
|
|
|
67945
67973
|
panelIndex,
|
|
67946
67974
|
fileIndex
|
|
67947
67975
|
} = _ref,
|
|
67948
|
-
otherProps = (0,
|
|
67976
|
+
otherProps = (0,_Users_hanna_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A)(_ref, _excluded);
|
|
67949
67977
|
var openFiles = (0,react_redux__WEBPACK_IMPORTED_MODULE_1__.useSelector)(state => state.editor.openedFiles);
|
|
67950
67978
|
var openFilesCount = openFiles[panelIndex].length;
|
|
67951
67979
|
var dispatch = (0,react_redux__WEBPACK_IMPORTED_MODULE_1__.useDispatch)();
|
|
@@ -67962,7 +67990,7 @@ var DraggableTab = _ref => {
|
|
|
67962
67990
|
switchToFileTab(panelIndex, (fileIndex + openFilesCount - 1) % openFilesCount);
|
|
67963
67991
|
}
|
|
67964
67992
|
};
|
|
67965
|
-
var InnerTab = () => /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(react_tabs__WEBPACK_IMPORTED_MODULE_2__.Tab, (0,
|
|
67993
|
+
var InnerTab = () => /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(react_tabs__WEBPACK_IMPORTED_MODULE_2__.Tab, (0,_Users_hanna_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A)((0,_Users_hanna_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A)({
|
|
67966
67994
|
onClick: e => {
|
|
67967
67995
|
e.stopPropagation();
|
|
67968
67996
|
switchToFileTab(panelIndex, fileIndex);
|
|
@@ -67980,7 +68008,7 @@ var DraggableTab = _ref => {
|
|
|
67980
68008
|
draggableProps,
|
|
67981
68009
|
dragHandleProps
|
|
67982
68010
|
} = _ref2;
|
|
67983
|
-
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("div", (0,
|
|
68011
|
+
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("div", (0,_Users_hanna_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A)((0,_Users_hanna_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A)((0,_Users_hanna_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A)({
|
|
67984
68012
|
className: "draggable-tab",
|
|
67985
68013
|
ref: innerRef
|
|
67986
68014
|
}, draggableProps), dragHandleProps), {}, {
|
|
@@ -68002,8 +68030,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
68002
68030
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
68003
68031
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
68004
68032
|
/* harmony export */ });
|
|
68005
|
-
/* harmony import */ var
|
|
68006
|
-
/* harmony import */ var
|
|
68033
|
+
/* harmony import */ var _Users_hanna_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(89379);
|
|
68034
|
+
/* harmony import */ var _Users_hanna_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(53986);
|
|
68007
68035
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(51649);
|
|
68008
68036
|
/* harmony import */ var _hello_pangea_dnd__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(98850);
|
|
68009
68037
|
/* harmony import */ var react_tabs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(39243);
|
|
@@ -68022,8 +68050,8 @@ var DroppableTabList = _ref => {
|
|
|
68022
68050
|
children: _children,
|
|
68023
68051
|
index
|
|
68024
68052
|
} = _ref,
|
|
68025
|
-
otherProps = (0,
|
|
68026
|
-
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(react_tabs__WEBPACK_IMPORTED_MODULE_1__.TabList, (0,
|
|
68053
|
+
otherProps = (0,_Users_hanna_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A)(_ref, _excluded);
|
|
68054
|
+
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(react_tabs__WEBPACK_IMPORTED_MODULE_1__.TabList, (0,_Users_hanna_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A)((0,_Users_hanna_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A)({}, otherProps), {}, {
|
|
68027
68055
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_hello_pangea_dnd__WEBPACK_IMPORTED_MODULE_6__.Droppable, {
|
|
68028
68056
|
direction: "horizontal",
|
|
68029
68057
|
droppableId: index.toString(),
|
|
@@ -68033,7 +68061,7 @@ var DroppableTabList = _ref => {
|
|
|
68033
68061
|
droppableProps,
|
|
68034
68062
|
placeholder
|
|
68035
68063
|
} = _ref2;
|
|
68036
|
-
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("div", (0,
|
|
68064
|
+
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("div", (0,_Users_hanna_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A)((0,_Users_hanna_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A)({
|
|
68037
68065
|
className: "droppable-tab-list"
|
|
68038
68066
|
}, droppableProps), {}, {
|
|
68039
68067
|
ref: innerRef,
|
|
@@ -101773,6 +101801,8 @@ function SvgSave(props) {
|
|
|
101773
101801
|
/* harmony default export */ const save = (SvgSave);
|
|
101774
101802
|
// EXTERNAL MODULE: ./src/components/Button/Button.jsx + 1 modules
|
|
101775
101803
|
var Button = __webpack_require__(60232);
|
|
101804
|
+
// EXTERNAL MODULE: ./src/redux/types.ts
|
|
101805
|
+
var types = __webpack_require__(92932);
|
|
101776
101806
|
;// ./src/components/SaveButton/SaveButton.jsx
|
|
101777
101807
|
|
|
101778
101808
|
|
|
@@ -101783,12 +101813,14 @@ var Button = __webpack_require__(60232);
|
|
|
101783
101813
|
|
|
101784
101814
|
|
|
101785
101815
|
|
|
101816
|
+
|
|
101786
101817
|
var SaveButton = props => {
|
|
101787
101818
|
var dispatch = (0,external_react_redux_.useDispatch)();
|
|
101788
101819
|
var loading = (0,external_react_redux_.useSelector)(state => state.editor.loading);
|
|
101820
|
+
var saving = (0,external_react_redux_.useSelector)(state => state.editor.saving);
|
|
101789
101821
|
var onClickSave = (0,external_react_.useCallback)(/*#__PURE__*/(0,asyncToGenerator/* default */.A)(function* () {
|
|
101790
101822
|
document.dispatchEvent(WebComponentCustomEvents.logInEvent);
|
|
101791
|
-
dispatch((0,EditorSlice.
|
|
101823
|
+
dispatch((0,EditorSlice.setSaveTriggered)(true));
|
|
101792
101824
|
}), [dispatch]);
|
|
101793
101825
|
var projectOwner = false;
|
|
101794
101826
|
return loading === "success" && !projectOwner && /*#__PURE__*/(0,jsx_runtime.jsx)(Button["default"], (0,objectSpread2/* default */.A)({
|
|
@@ -101796,7 +101828,8 @@ var SaveButton = props => {
|
|
|
101796
101828
|
ButtonIcon: save,
|
|
101797
101829
|
buttonIconPosition: "left",
|
|
101798
101830
|
variant: "secondary",
|
|
101799
|
-
onClickHandler: onClickSave
|
|
101831
|
+
onClickHandler: onClickSave,
|
|
101832
|
+
disabled: saving === types.SavingState.PROCESS
|
|
101800
101833
|
}, props));
|
|
101801
101834
|
};
|
|
101802
101835
|
/* harmony default export */ const SaveButton_SaveButton = (SaveButton);
|
|
@@ -101819,8 +101852,6 @@ function SvgShare(props) {
|
|
|
101819
101852
|
})));
|
|
101820
101853
|
}
|
|
101821
101854
|
/* harmony default export */ const share = (SvgShare);
|
|
101822
|
-
// EXTERNAL MODULE: ./src/redux/types.ts
|
|
101823
|
-
var types = __webpack_require__(92932);
|
|
101824
101855
|
;// ./src/components/ShareButton/ShareButton.jsx
|
|
101825
101856
|
|
|
101826
101857
|
|
|
@@ -102797,7 +102828,7 @@ var ShareProjectModal = () => {
|
|
|
102797
102828
|
|
|
102798
102829
|
/***/ }),
|
|
102799
102830
|
|
|
102800
|
-
/***/
|
|
102831
|
+
/***/ 16893:
|
|
102801
102832
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
102802
102833
|
|
|
102803
102834
|
// ESM COMPAT FLAG
|
|
@@ -102823,25 +102854,8 @@ var types = __webpack_require__(92932);
|
|
|
102823
102854
|
var external_react_redux_ = __webpack_require__(14062);
|
|
102824
102855
|
// EXTERNAL MODULE: ./src/components/Modals/BaseModal/BaseModal.jsx
|
|
102825
102856
|
var BaseModal = __webpack_require__(94738);
|
|
102826
|
-
|
|
102827
|
-
var
|
|
102828
|
-
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
102829
|
-
|
|
102830
|
-
function SvgAlertTriangle(props) {
|
|
102831
|
-
return /*#__PURE__*/external_react_.createElement("svg", _extends({
|
|
102832
|
-
width: 32,
|
|
102833
|
-
height: 32,
|
|
102834
|
-
fill: "none",
|
|
102835
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
102836
|
-
}, props), _path || (_path = /*#__PURE__*/external_react_.createElement("path", {
|
|
102837
|
-
d: "M14.036 6.71L4.308 22.95a2.297 2.297 0 001.964 3.446h19.456a2.297 2.297 0 001.964-3.446L17.964 6.71a2.296 2.296 0 00-3.928 0v0zM16 12.613v4.595M16 21.801h.012",
|
|
102838
|
-
stroke: "#edce22",
|
|
102839
|
-
strokeWidth: 2,
|
|
102840
|
-
strokeLinecap: "round",
|
|
102841
|
-
strokeLinejoin: "round"
|
|
102842
|
-
})));
|
|
102843
|
-
}
|
|
102844
|
-
/* harmony default export */ const alertTriangle = (SvgAlertTriangle);
|
|
102857
|
+
// EXTERNAL MODULE: ./src/assets/icons/alertTriangle.svg
|
|
102858
|
+
var alertTriangle = __webpack_require__(30103);
|
|
102845
102859
|
// EXTERNAL MODULE: ./src/components/Button/Button.jsx + 1 modules
|
|
102846
102860
|
var Button = __webpack_require__(60232);
|
|
102847
102861
|
// EXTERNAL MODULE: ./src/components/shared/SvgIcon/index.tsx
|
|
@@ -102878,7 +102892,7 @@ var UploadSizeLimitModal = () => {
|
|
|
102878
102892
|
className: BaseModal_styles_module["default"].headerContainer,
|
|
102879
102893
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(SvgIcon.SvgIcon, {
|
|
102880
102894
|
size: 32,
|
|
102881
|
-
SvgElement: alertTriangle,
|
|
102895
|
+
SvgElement: alertTriangle["default"],
|
|
102882
102896
|
className: "".concat(BaseModal_styles_module["default"].headerText, " ").concat(styles_module.headerIcon)
|
|
102883
102897
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
102884
102898
|
className: "".concat(BaseModal_styles_module["default"].headerText, " ").concat(styles_module.headerText),
|
|
@@ -103095,6 +103109,8 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
103095
103109
|
var asyncToGenerator = __webpack_require__(10467);
|
|
103096
103110
|
// EXTERNAL MODULE: external "react"
|
|
103097
103111
|
var external_react_ = __webpack_require__(51649);
|
|
103112
|
+
// EXTERNAL MODULE: ./node_modules/path-browserify/index.js
|
|
103113
|
+
var path_browserify = __webpack_require__(57975);
|
|
103098
103114
|
// EXTERNAL MODULE: external "react-redux"
|
|
103099
103115
|
var external_react_redux_ = __webpack_require__(14062);
|
|
103100
103116
|
// EXTERNAL MODULE: ./src/redux/EditorSlice.ts
|
|
@@ -103156,10 +103172,10 @@ var useProjectPersistence = _ref => {
|
|
|
103156
103172
|
if (!project || Object.keys(project).length === 0) return;
|
|
103157
103173
|
var identifier = project.identifier;
|
|
103158
103174
|
if (saveTriggered || localStorage.getItem("awaitingSave")) {
|
|
103159
|
-
|
|
103160
|
-
|
|
103161
|
-
|
|
103162
|
-
|
|
103175
|
+
yield onSave === null || onSave === void 0 ? void 0 : onSave(identifier).finally(() => {
|
|
103176
|
+
dispatch((0,EditorSlice.setSaveTriggered)(false));
|
|
103177
|
+
});
|
|
103178
|
+
localStorage.removeItem("awaitingSave");
|
|
103163
103179
|
}
|
|
103164
103180
|
});
|
|
103165
103181
|
return function run() {
|
|
@@ -103167,7 +103183,7 @@ var useProjectPersistence = _ref => {
|
|
|
103167
103183
|
};
|
|
103168
103184
|
}();
|
|
103169
103185
|
run().catch(console.error);
|
|
103170
|
-
}, [saveTriggered, project, user, onSave]);
|
|
103186
|
+
}, [saveTriggered, project, user, onSave, dispatch]);
|
|
103171
103187
|
|
|
103172
103188
|
// Autosave
|
|
103173
103189
|
(0,external_react_.useEffect)(() => {
|
|
@@ -103270,6 +103286,8 @@ var ErrorModal = _ref => {
|
|
|
103270
103286
|
});
|
|
103271
103287
|
};
|
|
103272
103288
|
/* harmony default export */ const Modals_ErrorModal = (ErrorModal);
|
|
103289
|
+
// EXTERNAL MODULE: ./node_modules/react-toastify/dist/react-toastify.esm.js
|
|
103290
|
+
var react_toastify_esm = __webpack_require__(21241);
|
|
103273
103291
|
;// ./src/assets/stylesheets/ExternalStyles.scss
|
|
103274
103292
|
// extracted by mini-css-extract-plugin
|
|
103275
103293
|
|
|
@@ -103285,9 +103303,13 @@ var WebComponentCustomEvents = __webpack_require__(30272);
|
|
|
103285
103303
|
var ToastMessages = __webpack_require__(6459);
|
|
103286
103304
|
// EXTERNAL MODULE: ./src/components/Modals/index.tsx
|
|
103287
103305
|
var Modals = __webpack_require__(18284);
|
|
103306
|
+
// EXTERNAL MODULE: ./src/utils/createProjectArchive.ts
|
|
103307
|
+
var createProjectArchive = __webpack_require__(46514);
|
|
103288
103308
|
// EXTERNAL MODULE: ./src/components/Loading/Loading.tsx
|
|
103289
103309
|
var Loading = __webpack_require__(34466);
|
|
103290
103310
|
var Loading_default = /*#__PURE__*/__webpack_require__.n(Loading);
|
|
103311
|
+
// EXTERNAL MODULE: ./node_modules/file-saver/dist/FileSaver.min.js
|
|
103312
|
+
var FileSaver_min = __webpack_require__(4213);
|
|
103291
103313
|
;// ./src/containers/WebComponentLoader.jsx
|
|
103292
103314
|
|
|
103293
103315
|
|
|
@@ -103304,6 +103326,12 @@ var Loading_default = /*#__PURE__*/__webpack_require__.n(Loading);
|
|
|
103304
103326
|
|
|
103305
103327
|
|
|
103306
103328
|
|
|
103329
|
+
|
|
103330
|
+
|
|
103331
|
+
|
|
103332
|
+
|
|
103333
|
+
|
|
103334
|
+
|
|
103307
103335
|
|
|
103308
103336
|
|
|
103309
103337
|
|
|
@@ -103324,6 +103352,11 @@ var WebComponentLoader = props => {
|
|
|
103324
103352
|
sidebarOptions = [],
|
|
103325
103353
|
loadCache = true,
|
|
103326
103354
|
project: projectData,
|
|
103355
|
+
saveProject,
|
|
103356
|
+
isSaving,
|
|
103357
|
+
loadCommit,
|
|
103358
|
+
commits = [],
|
|
103359
|
+
projectContent = null,
|
|
103327
103360
|
isLoading = false,
|
|
103328
103361
|
packageApiUrl,
|
|
103329
103362
|
user,
|
|
@@ -103337,6 +103370,7 @@ var WebComponentLoader = props => {
|
|
|
103337
103370
|
var project = (0,external_react_redux_.useSelector)(state => state.editor.project);
|
|
103338
103371
|
var projectOwner = (0,external_react_redux_.useSelector)(state => state.editor.project.user_name);
|
|
103339
103372
|
var loading = (0,external_react_redux_.useSelector)(state => state.editor.loading);
|
|
103373
|
+
var saving = (0,external_react_redux_.useSelector)(state => state.editor.saving);
|
|
103340
103374
|
var justLoaded = (0,external_react_redux_.useSelector)(state => state.editor.justLoaded);
|
|
103341
103375
|
var hasShownSavePrompt = (0,external_react_redux_.useSelector)(state => state.editor.hasShownSavePrompt);
|
|
103342
103376
|
var saveTriggered = (0,external_react_redux_.useSelector)(state => state.editor.saveTriggered);
|
|
@@ -103366,6 +103400,16 @@ var WebComponentLoader = props => {
|
|
|
103366
103400
|
}));
|
|
103367
103401
|
}
|
|
103368
103402
|
}, [user, dispatch]);
|
|
103403
|
+
(0,external_react_.useEffect)(() => {
|
|
103404
|
+
dispatch((0,EditorSlice.setCommits)({
|
|
103405
|
+
commits
|
|
103406
|
+
}));
|
|
103407
|
+
}, [commits, dispatch]);
|
|
103408
|
+
(0,external_react_.useEffect)(() => {
|
|
103409
|
+
dispatch((0,EditorSlice.setLoadCommit)({
|
|
103410
|
+
loadCommit
|
|
103411
|
+
}));
|
|
103412
|
+
}, [loadCommit, dispatch]);
|
|
103369
103413
|
|
|
103370
103414
|
// useEffect(() => {
|
|
103371
103415
|
// if (theme) {
|
|
@@ -103374,6 +103418,9 @@ var WebComponentLoader = props => {
|
|
|
103374
103418
|
// }
|
|
103375
103419
|
// }, [theme, setCookie, dispatch]);
|
|
103376
103420
|
|
|
103421
|
+
(0,external_react_.useEffect)(() => {
|
|
103422
|
+
dispatch((0,EditorSlice.setSaveTriggered)(isSaving));
|
|
103423
|
+
}, [isSaving]);
|
|
103377
103424
|
(0,external_react_.useEffect)(() => {
|
|
103378
103425
|
if (justLoaded) {
|
|
103379
103426
|
document.dispatchEvent((0,WebComponentCustomEvents.projectOwnerLoadedEvent)(projectOwner));
|
|
@@ -103384,32 +103431,39 @@ var WebComponentLoader = props => {
|
|
|
103384
103431
|
i18n.changeLanguage(locale);
|
|
103385
103432
|
}
|
|
103386
103433
|
}, [locale, i18n]);
|
|
103387
|
-
(0,external_react_.useEffect)(() => {
|
|
103388
|
-
var cancelled = false;
|
|
103389
|
-
if (!(projectData !== null && projectData !== void 0 && projectData.templateId)) return;
|
|
103390
|
-
(0,asyncToGenerator/* default */.A)(function* () {
|
|
103391
|
-
if (cancelled) return;
|
|
103392
|
-
var projectCache = yield IndexedDb.IndexedDb.getProject(projectData.identifier);
|
|
103393
|
-
if (!projectCache && !template.isLoading) {
|
|
103394
|
-
yield getTextJamTemplate(projectData.templateId);
|
|
103395
|
-
}
|
|
103396
|
-
return () => {
|
|
103397
|
-
cancelled = true;
|
|
103398
|
-
};
|
|
103399
|
-
})().catch(console.error);
|
|
103400
|
-
}, [projectData === null || projectData === void 0 ? void 0 : projectData.templateId]);
|
|
103401
103434
|
(0,useProject/* useProject */.U)({
|
|
103402
103435
|
identifier: projectData === null || projectData === void 0 ? void 0 : projectData.identifier,
|
|
103403
103436
|
projectData,
|
|
103404
103437
|
loadCache,
|
|
103438
|
+
isLoading: !!(template !== null && template !== void 0 && template.isLoading) || isLoading,
|
|
103405
103439
|
template,
|
|
103406
|
-
templateId: projectData === null || projectData === void 0 ? void 0 : projectData.templateId
|
|
103440
|
+
templateId: projectData === null || projectData === void 0 ? void 0 : projectData.templateId,
|
|
103441
|
+
getTextJamTemplate,
|
|
103442
|
+
projectContent
|
|
103407
103443
|
});
|
|
103444
|
+
var onSave = /*#__PURE__*/function () {
|
|
103445
|
+
var _ref = (0,asyncToGenerator/* default */.A)(function* () {
|
|
103446
|
+
var _project$components;
|
|
103447
|
+
if (!(project !== null && project !== void 0 && (_project$components = project.components) !== null && _project$components !== void 0 && _project$components.length)) return;
|
|
103448
|
+
try {
|
|
103449
|
+
var commitBlob = yield (0,createProjectArchive.createProjectArchive)(project);
|
|
103450
|
+
yield saveProject === null || saveProject === void 0 ? void 0 : saveProject(project, commitBlob);
|
|
103451
|
+
} catch (e) {
|
|
103452
|
+
console.error(e);
|
|
103453
|
+
} finally {
|
|
103454
|
+
dispatch((0,EditorSlice.setSaveTriggered)(false));
|
|
103455
|
+
}
|
|
103456
|
+
});
|
|
103457
|
+
return function onSave() {
|
|
103458
|
+
return _ref.apply(this, arguments);
|
|
103459
|
+
};
|
|
103460
|
+
}();
|
|
103408
103461
|
useProjectPersistence({
|
|
103409
103462
|
project,
|
|
103410
103463
|
justLoaded,
|
|
103411
103464
|
hasShownSavePrompt: hasShownSavePrompt || !showSavePrompt,
|
|
103412
|
-
saveTriggered
|
|
103465
|
+
saveTriggered,
|
|
103466
|
+
onSave
|
|
103413
103467
|
});
|
|
103414
103468
|
(0,external_react_.useEffect)(() => {
|
|
103415
103469
|
dispatch((0,EditorSlice.setReadOnly)(readOnly));
|
|
@@ -142905,7 +142959,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
142905
142959
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
142906
142960
|
/* harmony export */ });
|
|
142907
142961
|
// extracted by mini-css-extract-plugin
|
|
142908
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({"grey-rpi-grey-15":"#d5d7dc","grey-rpi-grey-40":"#9497a4","grey-rpi-grey-5":"#f1f2f3","grey-rpi-grey-70":"#4a4d59","grey-rpf-white":"#fff","pythonrunnerContainer":"styles-module__pythonrunnerContainer---nPGz","htmlrunnerContainer":"styles-module__htmlrunnerContainer--KPi8D","console":"styles-module__console--B8x1A","pythonGraphic":"styles-module__pythonGraphic--V+du6","pyodiderunner":"styles-module__pyodiderunner--DKTtB","active":"styles-module__active--bKVnT","visualOutput":"styles-module__visualOutput--WLaca","outputPanel":"styles-module__outputPanel--W1TnW","
|
|
142962
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({"grey-rpi-grey-15":"#d5d7dc","grey-rpi-grey-40":"#9497a4","grey-rpi-grey-5":"#f1f2f3","grey-rpi-grey-70":"#4a4d59","grey-rpf-white":"#fff","pythonrunnerContainer":"styles-module__pythonrunnerContainer---nPGz","htmlrunnerContainer":"styles-module__htmlrunnerContainer--KPi8D","console":"styles-module__console--B8x1A","pythonGraphic":"styles-module__pythonGraphic--V+du6","pyodiderunner":"styles-module__pyodiderunner--DKTtB","active":"styles-module__active--bKVnT","visualOutput":"styles-module__visualOutput--WLaca","outputPanel":"styles-module__outputPanel--W1TnW","pythonConsoleLine":"styles-module__pythonConsoleLine--bwFQC","stderr":"styles-module__stderr--PIyhL","pythonrunnerInput":"styles-module__pythonrunnerInput--dOXEa","webConsole":"styles-module__webConsole--MTdnk","webConsoleLine":"styles-module__webConsoleLine--j31U1","string":"styles-module__string--YDxWc","stringInsideStructure":"styles-module__stringInsideStructure--KJtZp","number":"styles-module__number--7h5TG","boolean":"styles-module__boolean--WYb4I","null":"styles-module__null--BZCmR","undefined":"styles-module__undefined--nQkol","key":"styles-module__key--ZZTlD","error":"styles-module__error--RL5Lt","errorIcon":"styles-module__errorIcon--Gnn4-","warn":"styles-module__warn--B+MPR","warnIcon":"styles-module__warnIcon--Q82Y5","timestamp":"styles-module__timestamp--HDZxD","details":"styles-module__details--W1bGT","summary":"styles-module__summary--vms5d","nestedEntry":"styles-module__nestedEntry--OU25X","previewLink":"styles-module__previewLink--rWLII","previewHtml":"styles-module__previewHtml--oWG28","iframe":"styles-module__iframe--YfQ0V","codeHasBeenRun":"styles-module__codeHasBeenRun--fqiYL"});
|
|
142909
142963
|
|
|
142910
142964
|
/***/ }),
|
|
142911
142965
|
|
|
@@ -368644,7 +368698,7 @@ __webpack_require__(72788);
|
|
|
368644
368698
|
const editorListener_1 = __webpack_require__(41824);
|
|
368645
368699
|
const Loading_1 = __importDefault(__webpack_require__(34466));
|
|
368646
368700
|
(0, editorListener_1.registerEditorListeners)();
|
|
368647
|
-
const TextJamEditor = ({ onLogoutClick = () => { }, onViewProfileClick = () => { }, onHomeClick = () => { }, getTextJamTemplate = (templateId) => { }, template = {
|
|
368701
|
+
const TextJamEditor = ({ onLogoutClick = () => { }, onViewProfileClick = () => { }, onHomeClick = () => { }, saveProject = (project, commitBlob) => { }, isSaving, loadCommit = (repositoryId, commmitId) => { }, commits = [], projectContent = null, getTextJamTemplate = (templateId) => { }, template = {
|
|
368648
368702
|
isLoading: false,
|
|
368649
368703
|
error: null,
|
|
368650
368704
|
data: null,
|
|
@@ -368666,6 +368720,11 @@ const TextJamEditor = ({ onLogoutClick = () => { }, onViewProfileClick = () => {
|
|
|
368666
368720
|
const mergedProps = {
|
|
368667
368721
|
...defaultProps,
|
|
368668
368722
|
...componentProps,
|
|
368723
|
+
saveProject,
|
|
368724
|
+
isSaving,
|
|
368725
|
+
loadCommit,
|
|
368726
|
+
commits,
|
|
368727
|
+
projectContent,
|
|
368669
368728
|
getTextJamTemplate,
|
|
368670
368729
|
template,
|
|
368671
368730
|
};
|
|
@@ -368735,29 +368794,15 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
368735
368794
|
const jsx_runtime_1 = __webpack_require__(74848);
|
|
368736
368795
|
const file_saver_1 = __importDefault(__webpack_require__(4213));
|
|
368737
368796
|
const js_convert_case_1 = __webpack_require__(61647);
|
|
368738
|
-
const jszip_1 = __importDefault(__webpack_require__(71710));
|
|
368739
368797
|
const download_svg_1 = __importDefault(__webpack_require__(63279));
|
|
368740
368798
|
const stores_1 = __webpack_require__(32132);
|
|
368741
|
-
const ProjectTypes_1 = __webpack_require__(27130);
|
|
368742
368799
|
const SvgIcon_1 = __webpack_require__(82917);
|
|
368743
368800
|
const Button_1 = __importDefault(__webpack_require__(60232));
|
|
368744
|
-
const
|
|
368801
|
+
const createProjectArchive_1 = __webpack_require__(46514);
|
|
368745
368802
|
const DownloadButton = (props) => {
|
|
368746
368803
|
const project = (0, stores_1.useAppSelector)((state) => state.editor.project);
|
|
368747
368804
|
const onClickDownload = async () => {
|
|
368748
|
-
const
|
|
368749
|
-
await Promise.all(project.components.map(async (component) => {
|
|
368750
|
-
if (component.type !== ProjectTypes_1.ProjectComponentType.FILE)
|
|
368751
|
-
return;
|
|
368752
|
-
const file = component;
|
|
368753
|
-
// remove leading slash for windows compatibility
|
|
368754
|
-
const safePath = file.path.startsWith("/")
|
|
368755
|
-
? file.path.slice(1)
|
|
368756
|
-
: file.path;
|
|
368757
|
-
const blob = await binaryStore_1.binaryStore.get(file.id);
|
|
368758
|
-
zip.file(safePath, blob ?? file.content);
|
|
368759
|
-
}));
|
|
368760
|
-
const content = await zip.generateAsync({ type: "blob" });
|
|
368805
|
+
const content = await (0, createProjectArchive_1.createProjectArchive)(project);
|
|
368761
368806
|
file_saver_1.default.saveAs(content, `${(0, js_convert_case_1.toSnakeCase)(project.name || "untitled_project")}.zip`);
|
|
368762
368807
|
};
|
|
368763
368808
|
return ((0, jsx_runtime_1.jsx)(Button_1.default, { variant: "tertiary", ButtonIcon: () => (0, jsx_runtime_1.jsx)(SvgIcon_1.SvgIcon, { SvgElement: download_svg_1.default, size: 24 }), onClickHandler: onClickDownload, ...props }));
|
|
@@ -369039,6 +369084,33 @@ const Output = ({ packageApiUrl }) => {
|
|
|
369039
369084
|
exports["default"] = Output;
|
|
369040
369085
|
|
|
369041
369086
|
|
|
369087
|
+
/***/ }),
|
|
369088
|
+
|
|
369089
|
+
/***/ 55339:
|
|
369090
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
369091
|
+
|
|
369092
|
+
|
|
369093
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
369094
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
369095
|
+
};
|
|
369096
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
369097
|
+
const jsx_runtime_1 = __webpack_require__(74848);
|
|
369098
|
+
const classnames_1 = __importDefault(__webpack_require__(46942));
|
|
369099
|
+
const styles_module_scss_1 = __importDefault(__webpack_require__(46259));
|
|
369100
|
+
const LogRenderer_1 = __importDefault(__webpack_require__(67278));
|
|
369101
|
+
const SvgIcon_1 = __webpack_require__(82917);
|
|
369102
|
+
const alert_svg_1 = __importDefault(__webpack_require__(11367));
|
|
369103
|
+
const alertTriangle_svg_1 = __importDefault(__webpack_require__(30103));
|
|
369104
|
+
function HtmlConsole({ consoleLogs, }) {
|
|
369105
|
+
return ((0, jsx_runtime_1.jsx)("pre", { className: (0, classnames_1.default)(styles_module_scss_1.default.console, styles_module_scss_1.default.webConsole), children: consoleLogs.length === 0 ? ((0, jsx_runtime_1.jsx)("span", { children: "No logs received yet" })) : (consoleLogs.map((log, i) => {
|
|
369106
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, classnames_1.default)(styles_module_scss_1.default.webConsoleLine, styles_module_scss_1.default[log.method]), children: [(0, jsx_runtime_1.jsxs)("span", { children: [(log.method === "error" || log.method === "warn") && ((0, jsx_runtime_1.jsx)(SvgIcon_1.SvgIcon, { SvgElement: log.method === "error" ? alert_svg_1.default : alertTriangle_svg_1.default, size: 12, className: log.method === "error"
|
|
369107
|
+
? styles_module_scss_1.default.errorIcon
|
|
369108
|
+
: styles_module_scss_1.default.warnIcon })), log.timestamp && ((0, jsx_runtime_1.jsx)("span", { className: styles_module_scss_1.default.timestamp, children: log.timestamp }))] }), log.data?.map((node, idx) => ((0, jsx_runtime_1.jsxs)("span", { children: [(0, jsx_runtime_1.jsx)(LogRenderer_1.default, { node: node }), log.data && idx < log.data.length - 1 && " "] }, idx)))] }, i));
|
|
369109
|
+
})) }));
|
|
369110
|
+
}
|
|
369111
|
+
exports["default"] = HtmlConsole;
|
|
369112
|
+
|
|
369113
|
+
|
|
369042
369114
|
/***/ }),
|
|
369043
369115
|
|
|
369044
369116
|
/***/ 86224:
|
|
@@ -369070,14 +369142,17 @@ const OutputTabPanel_1 = __webpack_require__(25931);
|
|
|
369070
369142
|
const styles_module_scss_1 = __importDefault(__webpack_require__(46259));
|
|
369071
369143
|
const helpers_1 = __webpack_require__(1108);
|
|
369072
369144
|
const fileParsers_1 = __webpack_require__(26683);
|
|
369145
|
+
const scripts_1 = __webpack_require__(57621);
|
|
369073
369146
|
const Errors_1 = __webpack_require__(20339);
|
|
369074
369147
|
const NotFoundPage_1 = __webpack_require__(87931);
|
|
369148
|
+
const HtmlConsole_1 = __importDefault(__webpack_require__(55339));
|
|
369075
369149
|
const BROADCAST_CHANNEL = "html_runner_channel";
|
|
369076
369150
|
var BroadcastMessageType;
|
|
369077
369151
|
(function (BroadcastMessageType) {
|
|
369078
369152
|
BroadcastMessageType["RELOAD_PROJECT"] = "RELOAD_PROJECT";
|
|
369079
369153
|
})(BroadcastMessageType || (BroadcastMessageType = {}));
|
|
369080
369154
|
function HtmlRunner() {
|
|
369155
|
+
const [consoleLogs, setConsoleLogs] = (0, react_1.useState)([]);
|
|
369081
369156
|
const project = (0, stores_1.useAppSelector)((state) => state.editor.project);
|
|
369082
369157
|
const projectComponents = project.components ?? [];
|
|
369083
369158
|
const error = (0, stores_1.useAppSelector)((state) => state.editor.error);
|
|
@@ -369193,6 +369268,7 @@ function HtmlRunner() {
|
|
|
369193
369268
|
}
|
|
369194
369269
|
}, [currentPageParam, dispatch]);
|
|
369195
369270
|
const runCode = async () => {
|
|
369271
|
+
setConsoleLogs([]);
|
|
369196
369272
|
const fileToRun = page ?? defaultPreviewFilePath;
|
|
369197
369273
|
setRunningFilePath(fileToRun);
|
|
369198
369274
|
dispatch((0, EditorSlice_2.setError)(null));
|
|
@@ -369214,53 +369290,9 @@ function HtmlRunner() {
|
|
|
369214
369290
|
}
|
|
369215
369291
|
const indexPage = (0, node_html_parser_1.parse)(entryPoint.content);
|
|
369216
369292
|
const body = indexPage.querySelector("body") || indexPage;
|
|
369217
|
-
|
|
369218
|
-
|
|
369219
|
-
|
|
369220
|
-
<script>
|
|
369221
|
-
(function() {
|
|
369222
|
-
const originalGetItem = window.localStorage.getItem.bind(window.localStorage);
|
|
369223
|
-
const originalSetItem = window.localStorage.setItem.bind(window.localStorage);
|
|
369224
|
-
const originalRemoveItem = window.localStorage.removeItem.bind(window.localStorage);
|
|
369225
|
-
const originalClear = window.localStorage.clear.bind(window.localStorage);
|
|
369226
|
-
|
|
369227
|
-
const isDisallowedKey = (key) => key === 'authKey' || key.startsWith('oidc.');
|
|
369228
|
-
|
|
369229
|
-
Object.defineProperty(window, 'localStorage', {
|
|
369230
|
-
value: {
|
|
369231
|
-
getItem: function(key) {
|
|
369232
|
-
if (isDisallowedKey(key)) {
|
|
369233
|
-
console.log(\`localStorage.getItem for "\${key}" is disabled\`);
|
|
369234
|
-
return null;
|
|
369235
|
-
}
|
|
369236
|
-
return originalGetItem(key);
|
|
369237
|
-
},
|
|
369238
|
-
setItem: function(key, value) {
|
|
369239
|
-
if (isDisallowedKey(key)) {
|
|
369240
|
-
console.log(\`localStorage.setItem for "\${key}" is disabled\`);
|
|
369241
|
-
return;
|
|
369242
|
-
}
|
|
369243
|
-
return originalSetItem(key, value);
|
|
369244
|
-
},
|
|
369245
|
-
removeItem: function(key) {
|
|
369246
|
-
if (isDisallowedKey(key)) {
|
|
369247
|
-
console.log(\`localStorage.removeItem for "\${key}" is disabled\`);
|
|
369248
|
-
return;
|
|
369249
|
-
}
|
|
369250
|
-
return originalRemoveItem(key);
|
|
369251
|
-
},
|
|
369252
|
-
clear: function() {
|
|
369253
|
-
console.log('localStorage.clear is disabled');
|
|
369254
|
-
return;
|
|
369255
|
-
}
|
|
369256
|
-
},
|
|
369257
|
-
writable: false,
|
|
369258
|
-
configurable: false
|
|
369259
|
-
});
|
|
369260
|
-
})();
|
|
369261
|
-
</script>
|
|
369262
|
-
`;
|
|
369263
|
-
body.insertAdjacentHTML("afterbegin", disableLocalStorageScript);
|
|
369293
|
+
const htmlRoot = indexPage.querySelector("html") ?? indexPage;
|
|
369294
|
+
body.insertAdjacentHTML("afterbegin", scripts_1.disableLocalStorageScript);
|
|
369295
|
+
htmlRoot.insertAdjacentHTML("afterbegin", scripts_1.consoleOverrideScript);
|
|
369264
369296
|
const { blobUrl } = await (0, fileParsers_1.resolveAndRewriteHtmlImports)(indexPage.toString(), projectComponents, entryPoint.path, page ?? entryPoint.path);
|
|
369265
369297
|
if (output.current) {
|
|
369266
369298
|
output.current.src = blobUrl;
|
|
@@ -369276,6 +369308,16 @@ function HtmlRunner() {
|
|
|
369276
369308
|
dispatch((0, EditorSlice_2.codeRunHandled)());
|
|
369277
369309
|
}
|
|
369278
369310
|
};
|
|
369311
|
+
(0, react_1.useEffect)(() => {
|
|
369312
|
+
const handler = (event) => {
|
|
369313
|
+
if (event.data?.type !== "console")
|
|
369314
|
+
return;
|
|
369315
|
+
const data = event.data;
|
|
369316
|
+
setConsoleLogs((prev) => [...prev, data]);
|
|
369317
|
+
};
|
|
369318
|
+
window.addEventListener("message", handler);
|
|
369319
|
+
return () => window.removeEventListener("message", handler);
|
|
369320
|
+
}, []);
|
|
369279
369321
|
const openPreview = () => {
|
|
369280
369322
|
window.open(`${window.location.href}/preview`, "_blank", "noopener,noreferrer");
|
|
369281
369323
|
};
|
|
@@ -369283,11 +369325,67 @@ function HtmlRunner() {
|
|
|
369283
369325
|
const iframeClasses = (0, classnames_1.default)(styles_module_scss_1.default.iframe, {
|
|
369284
369326
|
[styles_module_scss_1.default.codeHasBeenRun]: codeHasBeenRun,
|
|
369285
369327
|
});
|
|
369286
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.htmlrunnerContainer, children: [(0, jsx_runtime_1.jsx)(OutputTabPanel_1.OutputTabPanel, { title: "Preview", icon: preview_svg_1.default, readOnly: readOnly, extraTabContent: codeHasBeenRun && openInNewTabLink, tabPanelClassName: styles_module_scss_1.default.previewHtml, children: error ? ((0, jsx_runtime_1.jsx)("div", { className: iframeClasses, children: (0, jsx_runtime_1.jsx)(NotFoundPage_1.NotFoundPage, {}) })) : ((0, jsx_runtime_1.jsx)("iframe", { className: iframeClasses, sandbox: "allow-scripts allow-same-origin allow-modals", referrerPolicy: "no-referrer", allow: "\n accelerometer 'none';\n camera 'none';\n encrypted-media 'none';\n geolocation 'none';\n gyroscope 'none';\n magnetometer 'none';\n microphone 'none';\n midi 'none';\n payment 'none';\n usb 'none';\n ", id: "output-frame", title: "HTML Output Preview", ref: output, onLoad: iframeReload })) }), !outputOnly && ((0, jsx_runtime_1.jsx)(OutputTabPanel_1.OutputTabPanel, { title: "Console", icon: console_svg_1.default, readOnly: readOnly, children:
|
|
369328
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.htmlrunnerContainer, children: [(0, jsx_runtime_1.jsx)(OutputTabPanel_1.OutputTabPanel, { title: "Preview", icon: preview_svg_1.default, readOnly: readOnly, extraTabContent: codeHasBeenRun && openInNewTabLink, tabPanelClassName: styles_module_scss_1.default.previewHtml, children: error ? ((0, jsx_runtime_1.jsx)("div", { className: iframeClasses, children: (0, jsx_runtime_1.jsx)(NotFoundPage_1.NotFoundPage, {}) })) : ((0, jsx_runtime_1.jsx)("iframe", { className: iframeClasses, sandbox: "allow-scripts allow-same-origin allow-modals", referrerPolicy: "no-referrer", allow: "\n accelerometer 'none';\n camera 'none';\n encrypted-media 'none';\n geolocation 'none';\n gyroscope 'none';\n magnetometer 'none';\n microphone 'none';\n midi 'none';\n payment 'none';\n usb 'none';\n ", id: "output-frame", title: "HTML Output Preview", ref: output, onLoad: iframeReload })) }), !outputOnly && ((0, jsx_runtime_1.jsx)(OutputTabPanel_1.OutputTabPanel, { title: "Console", icon: console_svg_1.default, readOnly: readOnly, children: (0, jsx_runtime_1.jsx)(HtmlConsole_1.default, { consoleLogs: consoleLogs }) }))] }));
|
|
369287
369329
|
}
|
|
369288
369330
|
exports["default"] = HtmlRunner;
|
|
369289
369331
|
|
|
369290
369332
|
|
|
369333
|
+
/***/ }),
|
|
369334
|
+
|
|
369335
|
+
/***/ 67278:
|
|
369336
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
369337
|
+
|
|
369338
|
+
|
|
369339
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
369340
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
369341
|
+
};
|
|
369342
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
369343
|
+
const jsx_runtime_1 = __webpack_require__(74848);
|
|
369344
|
+
const styles_module_scss_1 = __importDefault(__webpack_require__(46259));
|
|
369345
|
+
var SerializedNodeType;
|
|
369346
|
+
(function (SerializedNodeType) {
|
|
369347
|
+
SerializedNodeType["String"] = "string";
|
|
369348
|
+
SerializedNodeType["Number"] = "number";
|
|
369349
|
+
SerializedNodeType["Boolean"] = "boolean";
|
|
369350
|
+
SerializedNodeType["Null"] = "null";
|
|
369351
|
+
SerializedNodeType["Undefined"] = "undefined";
|
|
369352
|
+
SerializedNodeType["Array"] = "array";
|
|
369353
|
+
SerializedNodeType["Object"] = "object";
|
|
369354
|
+
})(SerializedNodeType || (SerializedNodeType = {}));
|
|
369355
|
+
const OFFSET_PER_LEVEL = 12;
|
|
369356
|
+
function LogRenderer({ node, depth = 0, isInsideStructure = false, }) {
|
|
369357
|
+
if ([
|
|
369358
|
+
SerializedNodeType.String,
|
|
369359
|
+
SerializedNodeType.Number,
|
|
369360
|
+
SerializedNodeType.Boolean,
|
|
369361
|
+
SerializedNodeType.Null,
|
|
369362
|
+
SerializedNodeType.Undefined,
|
|
369363
|
+
].includes(node.type)) {
|
|
369364
|
+
const value = node.value;
|
|
369365
|
+
const className = node.type === SerializedNodeType.String && isInsideStructure
|
|
369366
|
+
? styles_module_scss_1.default.stringInsideStructure
|
|
369367
|
+
: styles_module_scss_1.default[node.type];
|
|
369368
|
+
let content = value;
|
|
369369
|
+
if (node.type === SerializedNodeType.String && isInsideStructure) {
|
|
369370
|
+
content = `"${value}"`;
|
|
369371
|
+
}
|
|
369372
|
+
return (0, jsx_runtime_1.jsx)("span", { className: className, children: content });
|
|
369373
|
+
}
|
|
369374
|
+
const isArray = node.type === SerializedNodeType.Array;
|
|
369375
|
+
const entries = isArray
|
|
369376
|
+
? node.value.map((val, idx) => ({
|
|
369377
|
+
key: idx.toString(),
|
|
369378
|
+
val,
|
|
369379
|
+
}))
|
|
369380
|
+
: Object.entries(node.value).map(([key, val]) => ({
|
|
369381
|
+
key,
|
|
369382
|
+
val,
|
|
369383
|
+
}));
|
|
369384
|
+
return ((0, jsx_runtime_1.jsxs)("details", { className: styles_module_scss_1.default.details, style: { marginLeft: `${depth * OFFSET_PER_LEVEL}px` }, children: [(0, jsx_runtime_1.jsx)("summary", { className: styles_module_scss_1.default.summary, children: isArray ? `Array(${entries.length})` : "Object" }), entries.map(({ key, val }) => ((0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.nestedEntry, children: [(0, jsx_runtime_1.jsxs)("span", { className: styles_module_scss_1.default.key, children: [key, ":"] }), (0, jsx_runtime_1.jsx)(LogRenderer, { node: val, depth: depth + 1, isInsideStructure: true })] }, key)))] }));
|
|
369385
|
+
}
|
|
369386
|
+
exports["default"] = LogRenderer;
|
|
369387
|
+
|
|
369388
|
+
|
|
369291
369389
|
/***/ }),
|
|
369292
369390
|
|
|
369293
369391
|
/***/ 26683:
|
|
@@ -369576,6 +369674,159 @@ const getFilenameFromIFrame = (iframe) => iframe?.querySelector("meta[filename]"
|
|
|
369576
369674
|
exports.getFilenameFromIFrame = getFilenameFromIFrame;
|
|
369577
369675
|
|
|
369578
369676
|
|
|
369677
|
+
/***/ }),
|
|
369678
|
+
|
|
369679
|
+
/***/ 57621:
|
|
369680
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
369681
|
+
|
|
369682
|
+
|
|
369683
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
369684
|
+
exports.consoleOverrideScript = exports.disableLocalStorageScript = void 0;
|
|
369685
|
+
// insert script to disable access to specific localStorage keys
|
|
369686
|
+
// localstorage.getItem() is a potential security risk when executing untrusted code
|
|
369687
|
+
exports.disableLocalStorageScript = `
|
|
369688
|
+
<script>
|
|
369689
|
+
(function() {
|
|
369690
|
+
const originalGetItem = window.localStorage.getItem.bind(window.localStorage);
|
|
369691
|
+
const originalSetItem = window.localStorage.setItem.bind(window.localStorage);
|
|
369692
|
+
const originalRemoveItem = window.localStorage.removeItem.bind(window.localStorage);
|
|
369693
|
+
const originalClear = window.localStorage.clear.bind(window.localStorage);
|
|
369694
|
+
|
|
369695
|
+
const isDisallowedKey = (key) => key === 'authKey' || key.startsWith('oidc.');
|
|
369696
|
+
|
|
369697
|
+
Object.defineProperty(window, 'localStorage', {
|
|
369698
|
+
value: {
|
|
369699
|
+
getItem: function(key) {
|
|
369700
|
+
if (isDisallowedKey(key)) {
|
|
369701
|
+
console.log(\`localStorage.getItem for "\${key}" is disabled\`);
|
|
369702
|
+
return null;
|
|
369703
|
+
}
|
|
369704
|
+
return originalGetItem(key);
|
|
369705
|
+
},
|
|
369706
|
+
setItem: function(key, value) {
|
|
369707
|
+
if (isDisallowedKey(key)) {
|
|
369708
|
+
console.log(\`localStorage.setItem for "\${key}" is disabled\`);
|
|
369709
|
+
return;
|
|
369710
|
+
}
|
|
369711
|
+
return originalSetItem(key, value);
|
|
369712
|
+
},
|
|
369713
|
+
removeItem: function(key) {
|
|
369714
|
+
if (isDisallowedKey(key)) {
|
|
369715
|
+
console.log(\`localStorage.removeItem for "\${key}" is disabled\`);
|
|
369716
|
+
return;
|
|
369717
|
+
}
|
|
369718
|
+
return originalRemoveItem(key);
|
|
369719
|
+
},
|
|
369720
|
+
clear: function() {
|
|
369721
|
+
console.log('localStorage.clear is disabled');
|
|
369722
|
+
return;
|
|
369723
|
+
}
|
|
369724
|
+
},
|
|
369725
|
+
writable: false,
|
|
369726
|
+
configurable: false
|
|
369727
|
+
});
|
|
369728
|
+
})();
|
|
369729
|
+
</script>
|
|
369730
|
+
`;
|
|
369731
|
+
const MAX_DEPTH = 5; // Maximum depth for object serialization to prevent infinite recursion
|
|
369732
|
+
// Override console methods to send logs to parent window and serialize complex objects
|
|
369733
|
+
exports.consoleOverrideScript = `
|
|
369734
|
+
<script>
|
|
369735
|
+
(function() {
|
|
369736
|
+
const SerializedType = {
|
|
369737
|
+
Null: "null",
|
|
369738
|
+
Undefined: "undefined",
|
|
369739
|
+
Boolean: "boolean",
|
|
369740
|
+
Number: "number",
|
|
369741
|
+
String: "string",
|
|
369742
|
+
Array: "array",
|
|
369743
|
+
Object: "object",
|
|
369744
|
+
};
|
|
369745
|
+
|
|
369746
|
+
const original = {};
|
|
369747
|
+
const methods = ["log", "error", "warn", "info", "debug", "assert"];
|
|
369748
|
+
|
|
369749
|
+
function serialize(arg, depth = 0, maxDepth = ${MAX_DEPTH}, visited = new WeakSet()) {
|
|
369750
|
+
if (depth > maxDepth) return { "type": SerializedType.String, "value": "[Max depth reached]" };
|
|
369751
|
+
|
|
369752
|
+
if (arg && typeof arg === "object") {
|
|
369753
|
+
if (visited.has(arg)) {
|
|
369754
|
+
return { "type": SerializedType.String, "value": "[Circular reference]" };
|
|
369755
|
+
}
|
|
369756
|
+
visited.add(arg);
|
|
369757
|
+
}
|
|
369758
|
+
|
|
369759
|
+
const type = typeof arg;
|
|
369760
|
+
if (arg === null) return { "type": SerializedType.Null, "value": "null" };
|
|
369761
|
+
if (arg === undefined) return { "type": SerializedType.Undefined, "value": "undefined" };
|
|
369762
|
+
if (type === "boolean") return { "type": SerializedType.Boolean, "value": String(arg) };
|
|
369763
|
+
if (type === "number") return { "type": SerializedType.Number, "value": String(arg) };
|
|
369764
|
+
if (type === "string") return { "type": SerializedType.String, "value": arg };
|
|
369765
|
+
|
|
369766
|
+
if (Array.isArray(arg)) {
|
|
369767
|
+
return {
|
|
369768
|
+
"type": SerializedType.Array,
|
|
369769
|
+
"value": arg.map(item => serialize(item, depth + 1, maxDepth))
|
|
369770
|
+
};
|
|
369771
|
+
}
|
|
369772
|
+
|
|
369773
|
+
if (type === "object" && arg !== null) {
|
|
369774
|
+
const props = {};
|
|
369775
|
+
try {
|
|
369776
|
+
for (let key in arg) {
|
|
369777
|
+
if (arg.hasOwnProperty(key)) {
|
|
369778
|
+
props[key] = serialize(arg[key], depth + 1, maxDepth, visited);
|
|
369779
|
+
}
|
|
369780
|
+
}
|
|
369781
|
+
} catch (error) {
|
|
369782
|
+
console.error("Error serializing object property:", error);
|
|
369783
|
+
}
|
|
369784
|
+
return { "type": SerializedType.Object, "value": props };
|
|
369785
|
+
}
|
|
369786
|
+
|
|
369787
|
+
return { "type": SerializedType.String, "value": String(arg) };
|
|
369788
|
+
}
|
|
369789
|
+
|
|
369790
|
+
methods.forEach(m => {
|
|
369791
|
+
original[m] = console[m] || function(){};
|
|
369792
|
+
|
|
369793
|
+
console[m] = function(...args) {
|
|
369794
|
+
const now = new Date();
|
|
369795
|
+
const timestamp = now.toISOString()
|
|
369796
|
+
.slice(0, 19)
|
|
369797
|
+
.replace("T", " ") + "." +
|
|
369798
|
+
now.getMilliseconds().toString().padStart(3, "0").slice(0, 2);
|
|
369799
|
+
|
|
369800
|
+
let level = m;
|
|
369801
|
+
let serializedArgs = args.map(arg => serialize(arg));
|
|
369802
|
+
|
|
369803
|
+
if (m === "assert") {
|
|
369804
|
+
if (args[0]) {
|
|
369805
|
+
original[m](...args);
|
|
369806
|
+
return;
|
|
369807
|
+
}
|
|
369808
|
+
level = "error";
|
|
369809
|
+
serializedArgs = args.slice(1).map(arg => serialize(arg));
|
|
369810
|
+
if (serializedArgs.length === 0) {
|
|
369811
|
+
serializedArgs = [{ "type": "string", "value": "Assertion failed" }];
|
|
369812
|
+
}
|
|
369813
|
+
}
|
|
369814
|
+
|
|
369815
|
+
window.parent.postMessage({
|
|
369816
|
+
"type": "console",
|
|
369817
|
+
"method": level,
|
|
369818
|
+
"data": serializedArgs,
|
|
369819
|
+
"timestamp": timestamp
|
|
369820
|
+
}, "*");
|
|
369821
|
+
|
|
369822
|
+
original[m](...args);
|
|
369823
|
+
};
|
|
369824
|
+
});
|
|
369825
|
+
})();
|
|
369826
|
+
</script>
|
|
369827
|
+
`;
|
|
369828
|
+
|
|
369829
|
+
|
|
369579
369830
|
/***/ }),
|
|
369580
369831
|
|
|
369581
369832
|
/***/ 25931:
|
|
@@ -369788,7 +370039,7 @@ const PyodideRunner = ({ active, packageApiUrl, }) => {
|
|
|
369788
370039
|
const handleOutput = (stream, content) => {
|
|
369789
370040
|
const node = output.current;
|
|
369790
370041
|
const div = document.createElement("span");
|
|
369791
|
-
div.className = (0, classnames_1.default)(styles_module_scss_1.default.
|
|
370042
|
+
div.className = (0, classnames_1.default)(styles_module_scss_1.default.pythonConsoleLine, stream === "stderr" && styles_module_scss_1.default["stderr"], stream === "stdout" && styles_module_scss_1.default["stdout"]);
|
|
369792
370043
|
div.innerHTML = new Option(content || " ").innerHTML + "\n";
|
|
369793
370044
|
if (node) {
|
|
369794
370045
|
node.appendChild(div);
|
|
@@ -371525,7 +371776,7 @@ const ShareProjectModal_1 = __importDefault(__webpack_require__(50734));
|
|
|
371525
371776
|
const ProjectHistoryModal_1 = __importDefault(__webpack_require__(2468));
|
|
371526
371777
|
const RemoveItemModal_1 = __importDefault(__webpack_require__(3985));
|
|
371527
371778
|
const SaveProjectReminderModal_1 = __importDefault(__webpack_require__(66536));
|
|
371528
|
-
const UploadSizeLimitModal_1 = __importDefault(__webpack_require__(
|
|
371779
|
+
const UploadSizeLimitModal_1 = __importDefault(__webpack_require__(16893));
|
|
371529
371780
|
const UploadFilesModal_1 = __importDefault(__webpack_require__(9825));
|
|
371530
371781
|
exports.ModalTypeToComponentMap = {
|
|
371531
371782
|
[types_1.ModalType.SHARE_PROJECT]: (0, jsx_runtime_1.jsx)(ShareProjectModal_1.default, {}),
|
|
@@ -372292,6 +372543,7 @@ const ProjectTypes_1 = __webpack_require__(27130);
|
|
|
372292
372543
|
const stores_1 = __webpack_require__(32132);
|
|
372293
372544
|
const projectHelpers_1 = __webpack_require__(2610);
|
|
372294
372545
|
const IndexedDb_1 = __webpack_require__(27161);
|
|
372546
|
+
const loadProjectFromZip_1 = __webpack_require__(65404);
|
|
372295
372547
|
const getDefaultProjectIdentifier = (type) => {
|
|
372296
372548
|
switch (type) {
|
|
372297
372549
|
case ProjectTypes_1.ProjectType.WEB:
|
|
@@ -372301,14 +372553,61 @@ const getDefaultProjectIdentifier = (type) => {
|
|
|
372301
372553
|
return defaultProjects_1.DEFAULT_PY_PROJECT_IDENTIFIER;
|
|
372302
372554
|
}
|
|
372303
372555
|
};
|
|
372304
|
-
const useProject = ({ loadCache = true, identifier = null, projectData = null, template = { isLoading: false, error: null, data: null }, templateId = null, }) => {
|
|
372556
|
+
const useProject = ({ loadCache = true, identifier = null, projectData = null, template = { isLoading: false, error: null, data: null }, templateId = null, getTextJamTemplate, projectContent = null, isLoading = false, }) => {
|
|
372305
372557
|
const project = (0, stores_1.useAppSelector)((state) => state.editor.project);
|
|
372306
372558
|
const [cachedProject, setCachedProject] = (0, react_1.useState)(null);
|
|
372307
372559
|
const [cacheLoaded, setCacheLoaded] = (0, react_1.useState)(false);
|
|
372308
372560
|
const { i18n } = (0, react_i18next_1.useTranslation)();
|
|
372309
372561
|
const dispatch = (0, react_redux_1.useDispatch)();
|
|
372310
372562
|
const cacheKey = identifier ?? getDefaultProjectIdentifier(projectData?.project_type);
|
|
372311
|
-
|
|
372563
|
+
(0, react_1.useEffect)(() => {
|
|
372564
|
+
let cancelled = false;
|
|
372565
|
+
if (!templateId)
|
|
372566
|
+
return;
|
|
372567
|
+
(async () => {
|
|
372568
|
+
if (cancelled)
|
|
372569
|
+
return;
|
|
372570
|
+
if (!projectData?.identifier)
|
|
372571
|
+
return;
|
|
372572
|
+
let projectCache;
|
|
372573
|
+
try {
|
|
372574
|
+
projectCache = await IndexedDb_1.IndexedDb.getProject(projectData.identifier);
|
|
372575
|
+
}
|
|
372576
|
+
catch (e) { }
|
|
372577
|
+
if (!projectCache && !template?.isLoading) {
|
|
372578
|
+
getTextJamTemplate?.(templateId);
|
|
372579
|
+
}
|
|
372580
|
+
return () => {
|
|
372581
|
+
cancelled = true;
|
|
372582
|
+
};
|
|
372583
|
+
})().catch(console.error);
|
|
372584
|
+
}, [templateId]);
|
|
372585
|
+
(0, react_1.useEffect)(() => {
|
|
372586
|
+
let cancelled = false;
|
|
372587
|
+
if (!projectContent || !projectData || isLoading)
|
|
372588
|
+
return;
|
|
372589
|
+
(async () => {
|
|
372590
|
+
try {
|
|
372591
|
+
const identifier = projectData?.identifier;
|
|
372592
|
+
const projectType = projectData?.project_type;
|
|
372593
|
+
const loaded = await (0, loadProjectFromZip_1.loadProjectFromZip)({
|
|
372594
|
+
zipBlob: projectContent,
|
|
372595
|
+
projectType,
|
|
372596
|
+
identifier,
|
|
372597
|
+
name: projectData.name,
|
|
372598
|
+
});
|
|
372599
|
+
dispatch((0, EditorSlice_1.setProject)(loaded));
|
|
372600
|
+
await IndexedDb_1.IndexedDb.setProject(identifier, loaded);
|
|
372601
|
+
}
|
|
372602
|
+
catch (e) {
|
|
372603
|
+
console.error("Failed to load project", e);
|
|
372604
|
+
}
|
|
372605
|
+
return () => {
|
|
372606
|
+
cancelled = true;
|
|
372607
|
+
};
|
|
372608
|
+
})().catch(console.error);
|
|
372609
|
+
;
|
|
372610
|
+
}, [projectContent]);
|
|
372312
372611
|
(0, react_1.useEffect)(() => {
|
|
372313
372612
|
if (isLoading)
|
|
372314
372613
|
return;
|
|
@@ -372351,6 +372650,8 @@ const useProject = ({ loadCache = true, identifier = null, projectData = null, t
|
|
|
372351
372650
|
dispatch((0, EditorSlice_1.setProject)(cachedProject));
|
|
372352
372651
|
return;
|
|
372353
372652
|
}
|
|
372653
|
+
if (!!templateId && template !== null && !template?.data)
|
|
372654
|
+
return;
|
|
372354
372655
|
if (!!templateId && template !== null && !template?.data)
|
|
372355
372656
|
return;
|
|
372356
372657
|
// in case no identifier and no cached project, or provided identifier doesn't match cached project,
|
|
@@ -372380,7 +372681,7 @@ const useProject = ({ loadCache = true, identifier = null, projectData = null, t
|
|
|
372380
372681
|
return;
|
|
372381
372682
|
}
|
|
372382
372683
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
372383
|
-
}, [project?.identifier, cachedProject, cacheLoaded, i18n.language, template, templateId]);
|
|
372684
|
+
}, [project?.identifier, cachedProject, cacheLoaded, i18n.language, template, templateId, projectContent]);
|
|
372384
372685
|
};
|
|
372385
372686
|
exports.U = useProject;
|
|
372386
372687
|
|
|
@@ -372393,7 +372694,7 @@ exports.U = useProject;
|
|
|
372393
372694
|
|
|
372394
372695
|
var _a;
|
|
372395
372696
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
372396
|
-
exports.queueBinaryWrites = exports.applyComponentsPatch = exports.disableTheming = exports.hideSidebar = exports.showSidebar = exports.closeModal = exports.showModal = exports.closeErrorModal = exports.showErrorModal = exports.updateProjectName = exports.
|
|
372697
|
+
exports.queueBinaryWrites = exports.setLoadCommit = exports.setCommits = exports.applyComponentsPatch = exports.setSaving = exports.disableTheming = exports.hideSidebar = exports.showSidebar = exports.closeModal = exports.showModal = exports.closeErrorModal = exports.showErrorModal = exports.updateProjectName = exports.setSaveTriggered = exports.triggerDraw = exports.triggerCodeRun = exports.stopDraw = exports.stopCodeRun = exports.setLoading = exports.setReadOnly = exports.setProject = exports.setHasShownSavePrompt = exports.setError = exports.setCascadeUpdate = exports.setIsOutputOnly = exports.setAutorunEnabled = exports.setPage = exports.setFocussedFileIndex = exports.addFilePanel = exports.setOpenedFiles = exports.openFile = exports.closeFile = exports.expireJustLoaded = exports.codeRunHandled = exports.resetRunner = exports.setLoadedRunner = exports.loadingRunner = exports.updateProjectComponent = exports.addProjectComponent = exports.resetState = exports.EditorSlice = exports.editorInitialState = void 0;
|
|
372397
372698
|
const toolkit_1 = __webpack_require__(12069);
|
|
372398
372699
|
const ProjectTypes_1 = __webpack_require__(27130);
|
|
372399
372700
|
const types_1 = __webpack_require__(92932);
|
|
@@ -372402,7 +372703,7 @@ exports.editorInitialState = {
|
|
|
372402
372703
|
cascadeUpdate: false,
|
|
372403
372704
|
readOnly: false,
|
|
372404
372705
|
saveTriggered: false,
|
|
372405
|
-
saving:
|
|
372706
|
+
saving: types_1.SavingState.IDLE,
|
|
372406
372707
|
loading: types_1.LoadingState.IDLE,
|
|
372407
372708
|
justLoaded: false,
|
|
372408
372709
|
hasShownSavePrompt: false,
|
|
@@ -372428,6 +372729,8 @@ exports.editorInitialState = {
|
|
|
372428
372729
|
errorModalShowing: false,
|
|
372429
372730
|
modalWindowShowing: null,
|
|
372430
372731
|
modalWindowArgs: null,
|
|
372732
|
+
commits: [],
|
|
372733
|
+
loadCommit: (repositoryId, commmitId) => { },
|
|
372431
372734
|
sidebarShowing: true,
|
|
372432
372735
|
modals: {},
|
|
372433
372736
|
runnerBeingLoaded: null,
|
|
@@ -372497,11 +372800,11 @@ exports.EditorSlice = (0, toolkit_1.createSlice)({
|
|
|
372497
372800
|
map.set(upsert.id, upsert);
|
|
372498
372801
|
});
|
|
372499
372802
|
state.project.components = Array.from(map.values());
|
|
372500
|
-
state.saving =
|
|
372803
|
+
state.saving = types_1.SavingState.IDLE;
|
|
372501
372804
|
},
|
|
372502
372805
|
addProjectComponent: (state, action) => {
|
|
372503
372806
|
state.project.components.push(action.payload);
|
|
372504
|
-
state.saving =
|
|
372807
|
+
state.saving = types_1.SavingState.IDLE;
|
|
372505
372808
|
},
|
|
372506
372809
|
setPage: (state, action) => {
|
|
372507
372810
|
state.page = action.payload;
|
|
@@ -372534,12 +372837,16 @@ exports.EditorSlice = (0, toolkit_1.createSlice)({
|
|
|
372534
372837
|
triggerDraw: (state) => {
|
|
372535
372838
|
state.drawTriggered = true;
|
|
372536
372839
|
},
|
|
372537
|
-
|
|
372538
|
-
state.saveTriggered =
|
|
372840
|
+
setSaveTriggered: (state, action) => {
|
|
372841
|
+
state.saveTriggered = action.payload;
|
|
372842
|
+
state.saving = state.saveTriggered ? types_1.SavingState.PROCESS : types_1.SavingState.IDLE;
|
|
372843
|
+
},
|
|
372844
|
+
setSaving: (state, action) => {
|
|
372845
|
+
state.saving = action.payload;
|
|
372539
372846
|
},
|
|
372540
372847
|
updateProjectName: (state, action) => {
|
|
372541
|
-
state.project.name = action.payload
|
|
372542
|
-
state.saving =
|
|
372848
|
+
state.project.name = action.payload;
|
|
372849
|
+
state.saving = types_1.SavingState.IDLE;
|
|
372543
372850
|
},
|
|
372544
372851
|
updateProjectComponent: (state, action) => {
|
|
372545
372852
|
const mapped = state.project.components.map((component) => {
|
|
@@ -372628,10 +372935,16 @@ exports.EditorSlice = (0, toolkit_1.createSlice)({
|
|
|
372628
372935
|
disableTheming: (state) => {
|
|
372629
372936
|
state.isThemeable = false;
|
|
372630
372937
|
},
|
|
372938
|
+
setCommits: (state, action) => {
|
|
372939
|
+
state.commits = action.payload;
|
|
372940
|
+
},
|
|
372941
|
+
setLoadCommit: (state, action) => {
|
|
372942
|
+
state.loadCommit = action.payload;
|
|
372943
|
+
},
|
|
372631
372944
|
},
|
|
372632
372945
|
});
|
|
372633
372946
|
// Action creators are generated for each case reducer function
|
|
372634
|
-
_a = exports.EditorSlice.actions, exports.resetState = _a.resetState, exports.addProjectComponent = _a.addProjectComponent, exports.updateProjectComponent = _a.updateProjectComponent, exports.loadingRunner = _a.loadingRunner, exports.setLoadedRunner = _a.setLoadedRunner, exports.resetRunner = _a.resetRunner, exports.codeRunHandled = _a.codeRunHandled, exports.expireJustLoaded = _a.expireJustLoaded, exports.closeFile = _a.closeFile, exports.openFile = _a.openFile, exports.setOpenedFiles = _a.setOpenedFiles, exports.addFilePanel = _a.addFilePanel, exports.setFocussedFileIndex = _a.setFocussedFileIndex, exports.setPage = _a.setPage, exports.setAutorunEnabled = _a.setAutorunEnabled, exports.setIsOutputOnly = _a.setIsOutputOnly, exports.setCascadeUpdate = _a.setCascadeUpdate, exports.setError = _a.setError, exports.setHasShownSavePrompt = _a.setHasShownSavePrompt, exports.setProject = _a.setProject, exports.setReadOnly = _a.setReadOnly, exports.setLoading = _a.setLoading, exports.stopCodeRun = _a.stopCodeRun, exports.stopDraw = _a.stopDraw, exports.triggerCodeRun = _a.triggerCodeRun, exports.triggerDraw = _a.triggerDraw, exports.
|
|
372947
|
+
_a = exports.EditorSlice.actions, exports.resetState = _a.resetState, exports.addProjectComponent = _a.addProjectComponent, exports.updateProjectComponent = _a.updateProjectComponent, exports.loadingRunner = _a.loadingRunner, exports.setLoadedRunner = _a.setLoadedRunner, exports.resetRunner = _a.resetRunner, exports.codeRunHandled = _a.codeRunHandled, exports.expireJustLoaded = _a.expireJustLoaded, exports.closeFile = _a.closeFile, exports.openFile = _a.openFile, exports.setOpenedFiles = _a.setOpenedFiles, exports.addFilePanel = _a.addFilePanel, exports.setFocussedFileIndex = _a.setFocussedFileIndex, exports.setPage = _a.setPage, exports.setAutorunEnabled = _a.setAutorunEnabled, exports.setIsOutputOnly = _a.setIsOutputOnly, exports.setCascadeUpdate = _a.setCascadeUpdate, exports.setError = _a.setError, exports.setHasShownSavePrompt = _a.setHasShownSavePrompt, exports.setProject = _a.setProject, exports.setReadOnly = _a.setReadOnly, exports.setLoading = _a.setLoading, exports.stopCodeRun = _a.stopCodeRun, exports.stopDraw = _a.stopDraw, exports.triggerCodeRun = _a.triggerCodeRun, exports.triggerDraw = _a.triggerDraw, exports.setSaveTriggered = _a.setSaveTriggered, exports.updateProjectName = _a.updateProjectName, exports.showErrorModal = _a.showErrorModal, exports.closeErrorModal = _a.closeErrorModal, exports.showModal = _a.showModal, exports.closeModal = _a.closeModal, exports.showSidebar = _a.showSidebar, exports.hideSidebar = _a.hideSidebar, exports.disableTheming = _a.disableTheming, exports.setSaving = _a.setSaving, exports.applyComponentsPatch = _a.applyComponentsPatch, exports.setCommits = _a.setCommits, exports.setLoadCommit = _a.setLoadCommit;
|
|
372635
372948
|
exports.queueBinaryWrites = (0, toolkit_1.createAction)("editor/queueBinaryWrites");
|
|
372636
372949
|
exports["default"] = exports.EditorSlice.reducer;
|
|
372637
372950
|
|
|
@@ -372874,7 +373187,7 @@ exports["default"] = store;
|
|
|
372874
373187
|
|
|
372875
373188
|
|
|
372876
373189
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
372877
|
-
exports.LoadingState = exports.ModalType = void 0;
|
|
373190
|
+
exports.LoadingState = exports.SavingState = exports.ModalType = void 0;
|
|
372878
373191
|
var ModalType;
|
|
372879
373192
|
(function (ModalType) {
|
|
372880
373193
|
ModalType["SHARE_PROJECT"] = "shareProject";
|
|
@@ -372884,6 +373197,11 @@ var ModalType;
|
|
|
372884
373197
|
ModalType["UPLOAD_SIZE_LIMIT"] = "uploadSizeLimit";
|
|
372885
373198
|
ModalType["UPLOAD_FILES"] = "uploadFiles";
|
|
372886
373199
|
})(ModalType || (exports.ModalType = ModalType = {}));
|
|
373200
|
+
var SavingState;
|
|
373201
|
+
(function (SavingState) {
|
|
373202
|
+
SavingState["IDLE"] = "idle";
|
|
373203
|
+
SavingState["PROCESS"] = "process";
|
|
373204
|
+
})(SavingState || (exports.SavingState = SavingState = {}));
|
|
372887
373205
|
var LoadingState;
|
|
372888
373206
|
(function (LoadingState) {
|
|
372889
373207
|
LoadingState["IDLE"] = "idle";
|
|
@@ -372932,7 +373250,7 @@ var ErrorType;
|
|
|
372932
373250
|
|
|
372933
373251
|
|
|
372934
373252
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
372935
|
-
exports.MIME_IMAGE_JPG = exports.MIME_IMAGE_JPEG = exports.ProjectFileExtension = exports.ProjectType = exports.ProjectComponentType = void 0;
|
|
373253
|
+
exports.MIME_IMAGE_JPG = exports.MIME_IMAGE_JPEG = exports.binaryExtensions = exports.MIME_BY_EXT = exports.ProjectFileExtension = exports.ProjectType = exports.ProjectComponentType = void 0;
|
|
372936
373254
|
var ProjectComponentType;
|
|
372937
373255
|
(function (ProjectComponentType) {
|
|
372938
373256
|
ProjectComponentType["FILE"] = "file";
|
|
@@ -372959,6 +373277,17 @@ var ProjectFileExtension;
|
|
|
372959
373277
|
ProjectFileExtension["WAV"] = "wav";
|
|
372960
373278
|
ProjectFileExtension["TXT"] = "txt";
|
|
372961
373279
|
})(ProjectFileExtension || (exports.ProjectFileExtension = ProjectFileExtension = {}));
|
|
373280
|
+
var MIME_BY_EXT;
|
|
373281
|
+
(function (MIME_BY_EXT) {
|
|
373282
|
+
MIME_BY_EXT["png"] = "image/png";
|
|
373283
|
+
MIME_BY_EXT["jpg"] = "image/jpg";
|
|
373284
|
+
MIME_BY_EXT["jpeg"] = "image/jpeg";
|
|
373285
|
+
MIME_BY_EXT["gif"] = "image/gif";
|
|
373286
|
+
MIME_BY_EXT["mp3"] = "audio/mpeg";
|
|
373287
|
+
MIME_BY_EXT["wav"] = "audio/wav";
|
|
373288
|
+
})(MIME_BY_EXT || (exports.MIME_BY_EXT = MIME_BY_EXT = {}));
|
|
373289
|
+
;
|
|
373290
|
+
exports.binaryExtensions = ["png", "jpg", "jpeg", "gif", "mp3", "wav"];
|
|
372962
373291
|
exports.MIME_IMAGE_JPEG = "image/jpeg";
|
|
372963
373292
|
exports.MIME_IMAGE_JPG = "image/jpg";
|
|
372964
373293
|
|
|
@@ -373299,6 +373628,37 @@ exports.ErrorToMsgMap = {
|
|
|
373299
373628
|
};
|
|
373300
373629
|
|
|
373301
373630
|
|
|
373631
|
+
/***/ }),
|
|
373632
|
+
|
|
373633
|
+
/***/ 46514:
|
|
373634
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
373635
|
+
|
|
373636
|
+
|
|
373637
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
373638
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
373639
|
+
};
|
|
373640
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
373641
|
+
exports.createProjectArchive = createProjectArchive;
|
|
373642
|
+
const jszip_1 = __importDefault(__webpack_require__(71710));
|
|
373643
|
+
const ProjectTypes_1 = __webpack_require__(27130);
|
|
373644
|
+
const binaryStore_1 = __webpack_require__(5060);
|
|
373645
|
+
async function createProjectArchive(project) {
|
|
373646
|
+
const zip = new jszip_1.default();
|
|
373647
|
+
await Promise.all(project.components.map(async (component) => {
|
|
373648
|
+
if (component.type !== ProjectTypes_1.ProjectComponentType.FILE)
|
|
373649
|
+
return;
|
|
373650
|
+
const file = component;
|
|
373651
|
+
// remove leading slash for windows compatibility
|
|
373652
|
+
const safePath = file.path.startsWith("/")
|
|
373653
|
+
? file.path.slice(1)
|
|
373654
|
+
: file.path;
|
|
373655
|
+
const blob = await binaryStore_1.binaryStore.get(file.id);
|
|
373656
|
+
zip.file(safePath, blob ?? file.content);
|
|
373657
|
+
}));
|
|
373658
|
+
return zip.generateAsync({ type: "blob" });
|
|
373659
|
+
}
|
|
373660
|
+
|
|
373661
|
+
|
|
373302
373662
|
/***/ }),
|
|
373303
373663
|
|
|
373304
373664
|
/***/ 74133:
|
|
@@ -373468,6 +373828,130 @@ const matchingRegexes = (regexArray, testString) => {
|
|
|
373468
373828
|
exports.matchingRegexes = matchingRegexes;
|
|
373469
373829
|
|
|
373470
373830
|
|
|
373831
|
+
/***/ }),
|
|
373832
|
+
|
|
373833
|
+
/***/ 65404:
|
|
373834
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
373835
|
+
|
|
373836
|
+
|
|
373837
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
373838
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
373839
|
+
};
|
|
373840
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
373841
|
+
exports.loadProjectFromZip = loadProjectFromZip;
|
|
373842
|
+
const jszip_1 = __importDefault(__webpack_require__(71710));
|
|
373843
|
+
const ProjectTypes_1 = __webpack_require__(27130);
|
|
373844
|
+
const projectHelpers_1 = __webpack_require__(2610);
|
|
373845
|
+
const binaryStore_1 = __webpack_require__(5060);
|
|
373846
|
+
const projectBinaryIndex_1 = __webpack_require__(3044);
|
|
373847
|
+
function normPath(p) {
|
|
373848
|
+
let s = (p || "").replace(/\\/g, "/").replace(/^\/+/, "");
|
|
373849
|
+
// remove extra folder in zipball zip
|
|
373850
|
+
s = s.replace(/^(\.[/])+/, "");
|
|
373851
|
+
return s;
|
|
373852
|
+
}
|
|
373853
|
+
function ensureDir(dirsByPath, parentPath, name) {
|
|
373854
|
+
const path = parentPath === "/" ? `/${name}` : `${parentPath}/${name}`;
|
|
373855
|
+
const existing = dirsByPath.get(path);
|
|
373856
|
+
if (existing)
|
|
373857
|
+
return existing;
|
|
373858
|
+
const dir = {
|
|
373859
|
+
id: crypto.randomUUID(),
|
|
373860
|
+
type: ProjectTypes_1.ProjectComponentType.DIR,
|
|
373861
|
+
name,
|
|
373862
|
+
path,
|
|
373863
|
+
children: [],
|
|
373864
|
+
};
|
|
373865
|
+
dirsByPath.set(path, dir);
|
|
373866
|
+
return dir;
|
|
373867
|
+
}
|
|
373868
|
+
function pushChild(parent, childId) {
|
|
373869
|
+
if (!parent.children.includes(childId))
|
|
373870
|
+
parent.children.push(childId);
|
|
373871
|
+
}
|
|
373872
|
+
async function loadProjectFromZip(opts) {
|
|
373873
|
+
const zip = await jszip_1.default.loadAsync(opts.zipBlob);
|
|
373874
|
+
const rootDirId = crypto.randomUUID();
|
|
373875
|
+
const root = {
|
|
373876
|
+
id: rootDirId,
|
|
373877
|
+
type: ProjectTypes_1.ProjectComponentType.DIR,
|
|
373878
|
+
name: "",
|
|
373879
|
+
path: "/",
|
|
373880
|
+
children: [],
|
|
373881
|
+
};
|
|
373882
|
+
const dirsByPath = new Map();
|
|
373883
|
+
dirsByPath.set("/", root);
|
|
373884
|
+
const files = [];
|
|
373885
|
+
const binaryIds = [];
|
|
373886
|
+
const entries = Object.values(zip.files);
|
|
373887
|
+
const rootPath = entries[0]?.name ?? "";
|
|
373888
|
+
for (const entry of entries) {
|
|
373889
|
+
if (entry.dir)
|
|
373890
|
+
continue;
|
|
373891
|
+
const raw = normPath(entry.name.replace(rootPath, ""));
|
|
373892
|
+
if (!raw)
|
|
373893
|
+
continue;
|
|
373894
|
+
const parts = raw.split("/").filter(Boolean);
|
|
373895
|
+
const fileName = parts.pop();
|
|
373896
|
+
if (!fileName)
|
|
373897
|
+
continue;
|
|
373898
|
+
let parentPath = "/";
|
|
373899
|
+
let parentDir = root;
|
|
373900
|
+
for (const seg of parts) {
|
|
373901
|
+
const dir = ensureDir(dirsByPath, parentPath, seg);
|
|
373902
|
+
pushChild(parentDir, dir.id);
|
|
373903
|
+
parentDir = dir;
|
|
373904
|
+
parentPath = dir.path;
|
|
373905
|
+
}
|
|
373906
|
+
const { name, extension } = (0, projectHelpers_1.parseFileName)(fileName);
|
|
373907
|
+
const fileId = crypto.randomUUID();
|
|
373908
|
+
const extLower = (extension || "").toLowerCase();
|
|
373909
|
+
const isBinary = ProjectTypes_1.binaryExtensions.includes(extLower);
|
|
373910
|
+
let content = "";
|
|
373911
|
+
let mimeType;
|
|
373912
|
+
if (isBinary) {
|
|
373913
|
+
const ab = await entry.async("arraybuffer");
|
|
373914
|
+
mimeType = ProjectTypes_1.MIME_BY_EXT[extLower] || "application/octet-stream";
|
|
373915
|
+
await binaryStore_1.binaryStore.set(fileId, ab, mimeType);
|
|
373916
|
+
binaryIds.push(fileId);
|
|
373917
|
+
}
|
|
373918
|
+
else {
|
|
373919
|
+
content = await entry.async("text");
|
|
373920
|
+
mimeType = "text/plain;charset=utf-8";
|
|
373921
|
+
}
|
|
373922
|
+
const file = {
|
|
373923
|
+
id: fileId,
|
|
373924
|
+
type: ProjectTypes_1.ProjectComponentType.FILE,
|
|
373925
|
+
name,
|
|
373926
|
+
extension: extLower,
|
|
373927
|
+
content,
|
|
373928
|
+
isBinary,
|
|
373929
|
+
mimeType,
|
|
373930
|
+
path: parentPath === "/" ? `/${fileName}` : `${parentPath}/${fileName}`,
|
|
373931
|
+
};
|
|
373932
|
+
files.push(file);
|
|
373933
|
+
pushChild(parentDir, file.id);
|
|
373934
|
+
}
|
|
373935
|
+
const dirs = Array.from(dirsByPath.values());
|
|
373936
|
+
const allComponents = [...dirs, ...files];
|
|
373937
|
+
const componentsMap = new Map(allComponents.map((c) => [c.id, c]));
|
|
373938
|
+
for (const d of dirs) {
|
|
373939
|
+
d.children = (0, projectHelpers_1.sortChildren)(d.children ?? [], componentsMap);
|
|
373940
|
+
}
|
|
373941
|
+
if (binaryIds.length) {
|
|
373942
|
+
await (0, projectBinaryIndex_1.addBinaryIdsToProjectIndex)(opts.identifier, binaryIds);
|
|
373943
|
+
}
|
|
373944
|
+
const project = {
|
|
373945
|
+
name: opts.name,
|
|
373946
|
+
identifier: opts.identifier,
|
|
373947
|
+
project_type: opts.projectType,
|
|
373948
|
+
rootDirId,
|
|
373949
|
+
components: allComponents,
|
|
373950
|
+
};
|
|
373951
|
+
return project;
|
|
373952
|
+
}
|
|
373953
|
+
|
|
373954
|
+
|
|
373471
373955
|
/***/ }),
|
|
373472
373956
|
|
|
373473
373957
|
/***/ 3044:
|
package/dist/style.css
CHANGED
|
@@ -671,7 +671,7 @@
|
|
|
671
671
|
}
|
|
672
672
|
|
|
673
673
|
/*# sourceMappingURL=ReactToastify.css.map */
|
|
674
|
-
:root{--rpf-white: #ffffff}.styles-module__pythonrunnerContainer---nPGz,.styles-module__htmlrunnerContainer--KPi8D{display:flex;flex-direction:column;flex:1;gap:calc(.5rem*var(--scale-factor, 1));block-size:100%;inline-size:100%}.styles-module__console--B8x1A{padding:calc(.75rem*var(--scale-factor, 1)) calc(1rem*var(--scale-factor, 1));margin:0;white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;width:100%;word-wrap:break-word;overflow-y:auto;font-size:13px;line-height:18px;font-family:"Roboto Mono",source-code-pro,Menlo,Monaco,Consolas,"Courier New",monospace}.styles-module__pythonGraphic--V\+du6{overflow:auto;position:relative}.styles-module__pyodiderunner--DKTtB{display:none}.styles-module__pyodiderunner--DKTtB.styles-module__active--bKVnT{display:flex}.styles-module__visualOutput--WLaca{flex:1;display:flex;min-block-size:100%;inline-size:100%}.styles-module__outputPanel--W1TnW{display:flex;overflow:hidden;background-color:#fff;border-radius:calc(.5rem*var(--scale-factor, 1)) calc(.5rem*var(--scale-factor, 1)) calc(.25rem*var(--scale-factor, 1)) calc(.25rem*var(--scale-factor, 1));flex:5}.styles-
|
|
674
|
+
:root{--rpf-white: #ffffff}.styles-module__pythonrunnerContainer---nPGz,.styles-module__htmlrunnerContainer--KPi8D{display:flex;flex-direction:column;flex:1;gap:calc(.5rem*var(--scale-factor, 1));block-size:100%;inline-size:100%}.styles-module__console--B8x1A{padding:calc(.75rem*var(--scale-factor, 1)) calc(1rem*var(--scale-factor, 1));margin:0;white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;width:100%;word-wrap:break-word;overflow-y:auto;color:#242424;font-size:13px;line-height:18px;font-family:"Roboto Mono",source-code-pro,Menlo,Monaco,Consolas,"Courier New",monospace}.styles-module__pythonGraphic--V\+du6{overflow:auto;position:relative}.styles-module__pyodiderunner--DKTtB{display:none}.styles-module__pyodiderunner--DKTtB.styles-module__active--bKVnT{display:flex}.styles-module__visualOutput--WLaca{flex:1;display:flex;min-block-size:100%;inline-size:100%}.styles-module__outputPanel--W1TnW{display:flex;overflow:hidden;background-color:#fff;border-radius:calc(.5rem*var(--scale-factor, 1)) calc(.5rem*var(--scale-factor, 1)) calc(.25rem*var(--scale-factor, 1)) calc(.25rem*var(--scale-factor, 1));flex:5}.styles-module__pythonConsoleLine--bwFQC{padding-inline-end:5px}.styles-module__pythonConsoleLine--bwFQC.styles-module__stderr--PIyhL{color:red}.styles-module__pythonrunnerInput--dOXEa{caret-color:inherit;color:#2467ec;display:block;line-height:20px;padding:2px 1px 2px 0}.styles-module__pythonrunnerInput--dOXEa:focus{outline:0}.styles-module__webConsole--MTdnk{padding:calc(.25rem*var(--scale-factor, 1))}.styles-module__webConsoleLine--j31U1{display:flex;align-items:flex-start;flex-wrap:wrap;padding:0 calc(.25rem*var(--scale-factor, 1)) 0 calc(1.5rem*var(--scale-factor, 1));margin-bottom:calc(.25rem*var(--scale-factor, 1))}.styles-module__webConsoleLine--j31U1>span:first-child{display:flex;align-items:center;flex-shrink:0;white-space:nowrap}.styles-module__webConsoleLine--j31U1>span:last-child{flex:1;word-break:break-word}.styles-module__webConsoleLine--j31U1>span:last-child:has(>details){flex:1 1 100%}.styles-module__string--YDxWc{color:#242424}.styles-module__stringInsideStructure--KJtZp{color:#a31515}.styles-module__number--7h5TG,.styles-module__boolean--WYb4I{color:#0d47a1}.styles-module__null--BZCmR,.styles-module__undefined--nQkol{color:#888}.styles-module__key--ZZTlD{color:#aa0d91}.styles-module__error--RL5Lt{border-radius:calc(.25rem*var(--scale-factor, 1));padding-left:calc(.5rem*var(--scale-factor, 1));background:#ffd5ce}.styles-module__errorIcon--Gnn4-{margin-right:calc(.25rem*var(--scale-factor, 1));color:#e0201c}.styles-module__warn--B\+MPR{border-radius:calc(.25rem*var(--scale-factor, 1));padding-left:calc(.5rem*var(--scale-factor, 1));background:#fffbe3}.styles-module__warnIcon--Q82Y5{margin-right:calc(.25rem*var(--scale-factor, 1));color:#a88f00}.styles-module__timestamp--HDZxD{color:#69746d;margin-right:calc(.5rem*var(--scale-factor, 1))}.styles-module__details--W1bGT{display:inline-block}.styles-module__summary--vms5d{cursor:pointer;user-select:none}.styles-module__nestedEntry--OU25X{display:flex;gap:calc(.3125rem*var(--scale-factor, 1))}.styles-module__previewLink--rWLII{margin-inline-start:auto;padding-top:calc(.25rem*var(--scale-factor, 1))}.styles-module__previewHtml--oWG28{padding:calc(.25rem*var(--scale-factor, 1))}.styles-module__iframe--YfQ0V{border:none;border-radius:calc(.25rem*var(--scale-factor, 1));background-color:#fff;block-size:100%;inline-size:100%}.styles-module__iframe--YfQ0V.styles-module__codeHasBeenRun--fqiYL{border:1px solid #e5e5e5}#p5Sketch{display:flex;flex:1;position:absolute}.pythonrunner-graphic{overflow:auto;position:relative}
|
|
675
675
|
:root{--rpf-white: #ffffff}.styles-module__container--uYbdi{color:#e0201c;padding:calc(.75rem*var(--scale-factor, 1)) calc(1.25rem*var(--scale-factor, 1));overflow-y:auto;display:flex;flex-direction:column;gap:calc(1rem*var(--scale-factor, 1))}.styles-module__message--hNGZt{padding:0;margin:0;white-space:pre-wrap;word-break:break-word;font-size:13px;line-height:18px;font-family:"Roboto Mono",source-code-pro,Menlo,Monaco,Consolas,"Courier New",monospace}.styles-module__infoBox--Ti35B{width:100%;overflow-wrap:break-word;padding:calc(.5rem*var(--scale-factor, 1));background-color:#ffd5ce;color:#520e0e;display:flex;flex-direction:row;align-items:start;justify-content:flex-start;border:1px solid #e0201c;border-radius:calc(.5rem*var(--scale-factor, 1));gap:calc(.25rem*var(--scale-factor, 1))}.styles-module__infoBox--Ti35B svg{color:#e0201c}.styles-module__infoText--jXz2P{display:flex;flex-direction:column;align-items:flex-start;gap:calc(.3125rem*var(--scale-factor, 1))}.styles-module__notFoundContainer--YfNdr{width:100%;height:100%;display:flex;flex-direction:column;align-items:center;gap:calc(2rem*var(--scale-factor, 1));padding:calc(2rem*var(--scale-factor, 1)) calc(1rem*var(--scale-factor, 1));overflow:scroll;justify-content:space-evenly}.styles-module__notFoundText--q6EKC{display:flex;flex-direction:column;align-items:center;gap:calc(1rem*var(--scale-factor, 1))}
|
|
676
676
|
.styles-module__svgIcon--eiAsQ{display:block}.styles-module__svgIcon-8--0J-NH{width:8px;height:8px;min-width:8px}.styles-module__svgIcon-9--4U91M{width:9px;height:9px;min-width:9px}.styles-module__svgIcon-10--b6pWr{width:10px;height:10px;min-width:10px}.styles-module__svgIcon-11--UBu85{width:11px;height:11px;min-width:11px}.styles-module__svgIcon-12--ca5dh{width:12px;height:12px;min-width:12px}.styles-module__svgIcon-13--H5H9q{width:13px;height:13px;min-width:13px}.styles-module__svgIcon-14--02QBx{width:14px;height:14px;min-width:14px}.styles-module__svgIcon-15---h9Pf{width:15px;height:15px;min-width:15px}.styles-module__svgIcon-16--xSxA4{width:16px;height:16px;min-width:16px}.styles-module__svgIcon-17--Puaug{width:17px;height:17px;min-width:17px}.styles-module__svgIcon-18--QewDX{width:18px;height:18px;min-width:18px}.styles-module__svgIcon-19--iC7Jc{width:19px;height:19px;min-width:19px}.styles-module__svgIcon-20--PrJEw{width:20px;height:20px;min-width:20px}.styles-module__svgIcon-21---Hd09{width:21px;height:21px;min-width:21px}.styles-module__svgIcon-22--d8Xg1{width:22px;height:22px;min-width:22px}.styles-module__svgIcon-23--pGQQQ{width:23px;height:23px;min-width:23px}.styles-module__svgIcon-24--IqT3u{width:24px;height:24px;min-width:24px}.styles-module__svgIcon-25--PfjHm{width:25px;height:25px;min-width:25px}.styles-module__svgIcon-26--cFTjX{width:26px;height:26px;min-width:26px}.styles-module__svgIcon-27--MPei3{width:27px;height:27px;min-width:27px}.styles-module__svgIcon-28--W7Xyd{width:28px;height:28px;min-width:28px}.styles-module__svgIcon-29--EUfun{width:29px;height:29px;min-width:29px}.styles-module__svgIcon-30--lQhTn{width:30px;height:30px;min-width:30px}.styles-module__svgIcon-31--Lf753{width:31px;height:31px;min-width:31px}.styles-module__svgIcon-32--\+xBfi{width:32px;height:32px;min-width:32px}
|
|
677
677
|
.styles-module__text--w\+\+5r{font-family:Roboto,-apple-system,BlinkMacSystemFont,"Segoe UI",Oxygen,Ubuntu,Cantarell,"Fira Sans","Droid Sans","Helvetica Neue",sans-serif}.styles-module__code--E-a9Y{font-family:"Roboto Mono",source-code-pro,Menlo,Monaco,Consolas,"Courier New",monospace}.styles-module__size-12--hY0wv{font-size:calc(12/16*1rem*var(--scale-factor, 1));line-height:calc(16/16*1rem*var(--scale-factor, 1))}.styles-module__size-14--WSVwD{font-size:calc(14/16*1rem*var(--scale-factor, 1));line-height:calc(20/16*1rem*var(--scale-factor, 1))}.styles-module__size-16--6hjvA{font-size:calc(16/16*1rem*var(--scale-factor, 1));line-height:calc(24/16*1rem*var(--scale-factor, 1))}.styles-module__size-18--P7XJw{font-size:calc(18/16*1rem*var(--scale-factor, 1));line-height:calc(30/16*1rem*var(--scale-factor, 1))}.styles-module__size-20--py7l4{font-size:calc(20/16*1rem*var(--scale-factor, 1));line-height:calc(32/16*1rem*var(--scale-factor, 1))}.styles-module__size-24--tYu3W{font-size:calc(24/16*1rem*var(--scale-factor, 1));line-height:calc(34/16*1rem*var(--scale-factor, 1))}.styles-module__weight-regular--S9vrI{font-weight:400}.styles-module__weight-medium--JN8TI{font-weight:500}.styles-module__weight-bold--JgpDo{font-weight:700}
|
|
@@ -703,6 +703,6 @@
|
|
|
703
703
|
:root{--rpf-white: #ffffff}.styles-module__content--vm091{width:454px;top:256px;left:493px}.styles-module__headerText--O4YZK{color:#003046;line-height:34px}.styles-module__headerIcon--F-\+Vd path{stroke:#33625e}.styles-module__containerBox--HK-4z{margin-top:calc(.5rem*var(--scale-factor, 1));font-weight:400;font-size:calc(.75rem*var(--scale-factor, 1));line-height:calc(1rem*var(--scale-factor, 1));text-align:center;color:#242424}.styles-module__containerBox--HK-4z .styles-module__versionDate--OLHbO{font-weight:500;font-size:18px;line-height:30px;margin-top:calc(.5rem*var(--scale-factor, 1));margin-bottom:calc(.5rem*var(--scale-factor, 1));color:#33625e}.styles-module__containerBox--HK-4z .styles-module__messageContainer--PVpY\+{background-color:#b9e6ee;border-radius:calc(.5rem*var(--scale-factor, 1));padding:calc(1rem*var(--scale-factor, 1));gap:calc(.5rem*var(--scale-factor, 1));opacity:1;display:flex;text-align:left;color:#003046}.styles-module__containerBox--HK-4z .styles-module__messageContainer--PVpY\+ svg path{stroke:#0d47a1}.styles-module__buttonsContainer--dWeY9{margin-top:calc(.5rem*var(--scale-factor, 1));padding-bottom:0px}
|
|
704
704
|
:root{--rpf-white: #ffffff}.styles-module__content--uVl64{width:330px;gap:0px}.styles-module__headerContainer--FPLYl{text-align:center}.styles-module__headerIcon--VUrhy path{fill:#e0201c}.styles-module__headerText--F\+NA0{color:#003046;line-height:34px}.styles-module__containerBox--Dezow{margin-top:calc(.25rem*var(--scale-factor, 1));color:#242424;font-weight:400;font-size:calc(.75rem*var(--scale-factor, 1));line-height:calc(1rem*var(--scale-factor, 1));text-align:center}.styles-module__buttonsContainer--pnT1Q{margin-top:calc(.75rem*var(--scale-factor, 1));padding-bottom:0px}
|
|
705
705
|
:root{--rpf-white: #ffffff}.styles-module__content--UhJMG{width:454px;gap:0px}.styles-module__modalContentHeader--YPWsb{height:16px}.styles-module__headerText--89Clx{font-weight:400;font-size:calc(1.5rem*var(--scale-factor, 1));leading-trim:NONE;line-height:34px;text-align:center;color:#003046}.styles-module__containerBox--WUoyb{margin-top:calc(.25rem*var(--scale-factor, 1));font-weight:400;font-size:calc(.75rem*var(--scale-factor, 1));leading-trim:NONE;line-height:calc(1rem*var(--scale-factor, 1));color:#003046;text-align:center}.styles-module__containerBox--WUoyb .styles-module__messageContainer--WzXV7{background-color:#b9e6ee;border-radius:calc(.5rem*var(--scale-factor, 1));padding:calc(1rem*var(--scale-factor, 1));gap:calc(.5rem*var(--scale-factor, 1));opacity:1;display:flex;text-align:left}.styles-module__containerBox--WUoyb .styles-module__messageContainer--WzXV7 .styles-module__messageIcon--a6yn-{display:flex;align-items:center;color:#0d47a1}.styles-module__containerBox--WUoyb .styles-module__messageContainer--WzXV7 .styles-module__messageContent--CYn9o{display:flex;align-items:center;color:#003046}.styles-module__buttonsContainer--1toXb{margin-top:calc(.5rem*var(--scale-factor, 1));padding-bottom:0px}
|
|
706
|
-
:root{--rpf-white: #ffffff}.styles-module__content--pEmxZ{width:330px}.styles-module__headerIcon--mzjrS{text-align:center;fill:rgba(0,0,0,0)
|
|
706
|
+
:root{--rpf-white: #ffffff}.styles-module__content--pEmxZ{width:330px}.styles-module__headerIcon--mzjrS{text-align:center;fill:rgba(0,0,0,0);color:#edce22}.styles-module__headerText--pt2r0{color:#003046;line-height:34px}.styles-module__containerBox--r5zsA{margin-top:calc(.75rem*var(--scale-factor, 1));color:#242424;font-size:calc(.75rem*var(--scale-factor, 1));line-height:calc(1rem*var(--scale-factor, 1));display:flex;justify-content:center}.styles-module__buttonsContainer--I3Coy{margin-top:calc(.5rem*var(--scale-factor, 1))}
|
|
707
707
|
:root{--rpf-white: #ffffff}.styles-module__content--j863h{display:flex;flex-direction:column;align-items:center;gap:calc(.5rem*var(--scale-factor, 1));color:#003046}.styles-module__infoBox--MyOkq{width:100%;background-color:#b9e6ee;border-radius:calc(.5rem*var(--scale-factor, 1));padding:calc(1rem*var(--scale-factor, 1));display:flex;align-items:start;gap:calc(.5rem*var(--scale-factor, 1));margin-bottom:calc(.5rem*var(--scale-factor, 1));overflow-wrap:anywhere}.styles-module__infoBox--MyOkq svg{margin:calc(.125rem*var(--scale-factor, 1));color:#0d47a1}
|
|
708
708
|
:root{--rpf-white: #ffffff}.styles-module__loadingPage--r5PoP{margin:0px;padding:0px;background-color:#e5f6f1;min-height:100vh;display:flex;align-items:center;justify-content:center;font-family:"Roboto Flex";font-weight:600;text-align:center;color:#33625e;font-size:calc(1.25rem*var(--scale-factor, 1));line-height:calc(1.5rem*var(--scale-factor, 1))}.styles-module__loadingContainerAnimation--FNE3T{height:calc(4rem*var(--scale-factor, 1));margin-bottom:calc(1.875rem*var(--scale-factor, 1))}.styles-module__loadingContainerSubtext--1xp7T{margin-top:calc(.5rem*var(--scale-factor, 1));font-weight:400;font-size:calc(.875rem*var(--scale-factor, 1));line-height:calc(1.25rem*var(--scale-factor, 1))}.styles-module__dots--wWdo2{display:inline-block;margin-left:.1em}.styles-module__dot--RwqoT{opacity:0;display:inline-block;animation:styles-module__dot1--hGBky 6s infinite linear}.styles-module__dot2--hoNk-{animation-name:styles-module__dot2--hoNk-}.styles-module__dot3---5q-W{animation-name:styles-module__dot3---5q-W}@keyframes styles-module__dot1--hGBky{0%{opacity:0}5%{opacity:1}80%{opacity:1}83.333%{opacity:0}100%{opacity:0}}@keyframes styles-module__dot2--hoNk-{0%{opacity:0}16.666%{opacity:0}21%{opacity:1}62%{opacity:1}66.666%{opacity:0}100%{opacity:0}}@keyframes styles-module__dot3---5q-W{0%{opacity:0}33.333%{opacity:0}37%{opacity:1}46%{opacity:1}50%{opacity:0}100%{opacity:0}}@media(prefers-reduced-motion: reduce){.styles-module__dot--RwqoT{animation:none;opacity:1}}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gwchq-textjam",
|
|
3
3
|
"description": "Embeddable React editor used in Raspberry Pi text-based projects.",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.73",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://github.com/GirlsFirst/gwchq-textjam",
|
|
7
7
|
"author": "Girls Who Code HQ",
|