gwchq-textjam 0.1.85 → 0.1.87
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 +170 -20
- package/dist/style.css +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -65685,6 +65685,34 @@ function SvgPythonFile(props) {
|
|
|
65685
65685
|
|
|
65686
65686
|
/***/ }),
|
|
65687
65687
|
|
|
65688
|
+
/***/ 97950:
|
|
65689
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
65690
|
+
|
|
65691
|
+
__webpack_require__.r(__webpack_exports__);
|
|
65692
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
65693
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
65694
|
+
/* harmony export */ });
|
|
65695
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(51649);
|
|
65696
|
+
var _path;
|
|
65697
|
+
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); }
|
|
65698
|
+
|
|
65699
|
+
function SvgRemix(props) {
|
|
65700
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("svg", _extends({
|
|
65701
|
+
viewBox: "0 0 19 20",
|
|
65702
|
+
fill: "none",
|
|
65703
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
65704
|
+
}, props), _path || (_path = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", {
|
|
65705
|
+
d: "M13 1h5m0 0v5m0-5L1 18m17-4v5m0 0h-5m5 0l-6-6M1 2l5 5",
|
|
65706
|
+
stroke: "currentColor",
|
|
65707
|
+
strokeWidth: 2,
|
|
65708
|
+
strokeLinecap: "round",
|
|
65709
|
+
strokeLinejoin: "round"
|
|
65710
|
+
})));
|
|
65711
|
+
}
|
|
65712
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SvgRemix);
|
|
65713
|
+
|
|
65714
|
+
/***/ }),
|
|
65715
|
+
|
|
65688
65716
|
/***/ 48268:
|
|
65689
65717
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
65690
65718
|
|
|
@@ -68154,8 +68182,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
68154
68182
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
68155
68183
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
68156
68184
|
/* harmony export */ });
|
|
68157
|
-
/* harmony import */ var
|
|
68158
|
-
/* harmony import */ var
|
|
68185
|
+
/* harmony import */ var D_gwc2_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(89379);
|
|
68186
|
+
/* harmony import */ var D_gwc2_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(53986);
|
|
68159
68187
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(51649);
|
|
68160
68188
|
/* harmony import */ var _hello_pangea_dnd__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(98850);
|
|
68161
68189
|
/* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(14062);
|
|
@@ -68179,7 +68207,7 @@ var DraggableTab = _ref => {
|
|
|
68179
68207
|
panelIndex,
|
|
68180
68208
|
fileIndex
|
|
68181
68209
|
} = _ref,
|
|
68182
|
-
otherProps = (0,
|
|
68210
|
+
otherProps = (0,D_gwc2_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A)(_ref, _excluded);
|
|
68183
68211
|
var openFiles = (0,react_redux__WEBPACK_IMPORTED_MODULE_1__.useSelector)(state => state.editor.openedFiles);
|
|
68184
68212
|
var openFilesCount = openFiles[panelIndex].length;
|
|
68185
68213
|
var dispatch = (0,react_redux__WEBPACK_IMPORTED_MODULE_1__.useDispatch)();
|
|
@@ -68196,7 +68224,7 @@ var DraggableTab = _ref => {
|
|
|
68196
68224
|
switchToFileTab(panelIndex, (fileIndex + openFilesCount - 1) % openFilesCount);
|
|
68197
68225
|
}
|
|
68198
68226
|
};
|
|
68199
|
-
var InnerTab = () => /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(react_tabs__WEBPACK_IMPORTED_MODULE_2__.Tab, (0,
|
|
68227
|
+
var InnerTab = () => /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(react_tabs__WEBPACK_IMPORTED_MODULE_2__.Tab, (0,D_gwc2_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A)((0,D_gwc2_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A)({
|
|
68200
68228
|
onClick: e => {
|
|
68201
68229
|
e.stopPropagation();
|
|
68202
68230
|
switchToFileTab(panelIndex, fileIndex);
|
|
@@ -68214,7 +68242,7 @@ var DraggableTab = _ref => {
|
|
|
68214
68242
|
draggableProps,
|
|
68215
68243
|
dragHandleProps
|
|
68216
68244
|
} = _ref2;
|
|
68217
|
-
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("div", (0,
|
|
68245
|
+
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("div", (0,D_gwc2_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A)((0,D_gwc2_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A)((0,D_gwc2_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A)({
|
|
68218
68246
|
className: "draggable-tab",
|
|
68219
68247
|
ref: innerRef
|
|
68220
68248
|
}, draggableProps), dragHandleProps), {}, {
|
|
@@ -68236,8 +68264,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
68236
68264
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
68237
68265
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
68238
68266
|
/* harmony export */ });
|
|
68239
|
-
/* harmony import */ var
|
|
68240
|
-
/* harmony import */ var
|
|
68267
|
+
/* harmony import */ var D_gwc2_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(89379);
|
|
68268
|
+
/* harmony import */ var D_gwc2_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(53986);
|
|
68241
68269
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(51649);
|
|
68242
68270
|
/* harmony import */ var _hello_pangea_dnd__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(98850);
|
|
68243
68271
|
/* harmony import */ var react_tabs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(39243);
|
|
@@ -68256,8 +68284,8 @@ var DroppableTabList = _ref => {
|
|
|
68256
68284
|
children: _children,
|
|
68257
68285
|
index
|
|
68258
68286
|
} = _ref,
|
|
68259
|
-
otherProps = (0,
|
|
68260
|
-
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(react_tabs__WEBPACK_IMPORTED_MODULE_1__.TabList, (0,
|
|
68287
|
+
otherProps = (0,D_gwc2_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A)(_ref, _excluded);
|
|
68288
|
+
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(react_tabs__WEBPACK_IMPORTED_MODULE_1__.TabList, (0,D_gwc2_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A)((0,D_gwc2_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A)({}, otherProps), {}, {
|
|
68261
68289
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_hello_pangea_dnd__WEBPACK_IMPORTED_MODULE_6__.Droppable, {
|
|
68262
68290
|
direction: "horizontal",
|
|
68263
68291
|
droppableId: index.toString(),
|
|
@@ -68267,7 +68295,7 @@ var DroppableTabList = _ref => {
|
|
|
68267
68295
|
droppableProps,
|
|
68268
68296
|
placeholder
|
|
68269
68297
|
} = _ref2;
|
|
68270
|
-
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("div", (0,
|
|
68298
|
+
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("div", (0,D_gwc2_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A)((0,D_gwc2_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A)({
|
|
68271
68299
|
className: "droppable-tab-list"
|
|
68272
68300
|
}, droppableProps), {}, {
|
|
68273
68301
|
ref: innerRef,
|
|
@@ -101918,8 +101946,6 @@ function _asyncToGenerator(n) {
|
|
|
101918
101946
|
};
|
|
101919
101947
|
}
|
|
101920
101948
|
|
|
101921
|
-
// EXTERNAL MODULE: ./src/events/WebComponentCustomEvents.js
|
|
101922
|
-
var WebComponentCustomEvents = __webpack_require__(30272);
|
|
101923
101949
|
;// ./src/assets/icons/save.svg
|
|
101924
101950
|
var _path;
|
|
101925
101951
|
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); }
|
|
@@ -101960,13 +101986,11 @@ var SpinnerDotted = __webpack_require__(79458);
|
|
|
101960
101986
|
|
|
101961
101987
|
|
|
101962
101988
|
|
|
101963
|
-
|
|
101964
101989
|
var SaveButton = props => {
|
|
101965
101990
|
var dispatch = (0,external_react_redux_.useDispatch)();
|
|
101966
101991
|
var loading = (0,external_react_redux_.useSelector)(state => state.editor.loading);
|
|
101967
101992
|
var saving = (0,external_react_redux_.useSelector)(state => state.editor.saving);
|
|
101968
101993
|
var onClickSave = (0,external_react_.useCallback)(/*#__PURE__*/_asyncToGenerator(function* () {
|
|
101969
|
-
document.dispatchEvent(WebComponentCustomEvents.logInEvent);
|
|
101970
101994
|
dispatch((0,EditorSlice.setSaveTriggered)(true));
|
|
101971
101995
|
}), [dispatch]);
|
|
101972
101996
|
var isSaving = saving === types.SavingState.PROCESS;
|
|
@@ -102607,6 +102631,97 @@ var ProjectHistoryModal = () => {
|
|
|
102607
102631
|
|
|
102608
102632
|
/***/ }),
|
|
102609
102633
|
|
|
102634
|
+
/***/ 45829:
|
|
102635
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
102636
|
+
|
|
102637
|
+
// ESM COMPAT FLAG
|
|
102638
|
+
__webpack_require__.r(__webpack_exports__);
|
|
102639
|
+
|
|
102640
|
+
// EXPORTS
|
|
102641
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
102642
|
+
"default": () => (/* binding */ RemixProjectModal_RemixProjectModal)
|
|
102643
|
+
});
|
|
102644
|
+
|
|
102645
|
+
;// ./src/components/Modals/RemixProjectModal/styles.module.scss
|
|
102646
|
+
// extracted by mini-css-extract-plugin
|
|
102647
|
+
/* harmony default export */ const styles_module = ({"content":"styles-module__content--5mqMd","body":"styles-module__body--FT2ak","buttonsContainer":"styles-module__buttonsContainer--LsIFl","headerText":"styles-module__headerText--7Ob34","headerIcon":"styles-module__headerIcon--u9yrl","description":"styles-module__description--IvKuo"});
|
|
102648
|
+
// EXTERNAL MODULE: ./src/components/Modals/BaseModal/styles.module.scss
|
|
102649
|
+
var BaseModal_styles_module = __webpack_require__(41809);
|
|
102650
|
+
// EXTERNAL MODULE: ./src/redux/EditorSlice.ts
|
|
102651
|
+
var EditorSlice = __webpack_require__(68512);
|
|
102652
|
+
// EXTERNAL MODULE: ./src/redux/types.ts
|
|
102653
|
+
var types = __webpack_require__(92932);
|
|
102654
|
+
// EXTERNAL MODULE: external "react-redux"
|
|
102655
|
+
var external_react_redux_ = __webpack_require__(14062);
|
|
102656
|
+
// EXTERNAL MODULE: ./src/components/Modals/BaseModal/BaseModal.jsx
|
|
102657
|
+
var BaseModal = __webpack_require__(94738);
|
|
102658
|
+
// EXTERNAL MODULE: ./src/components/Button/Button.jsx + 1 modules
|
|
102659
|
+
var Button = __webpack_require__(60232);
|
|
102660
|
+
// EXTERNAL MODULE: ./src/components/shared/SvgIcon/index.tsx
|
|
102661
|
+
var SvgIcon = __webpack_require__(82917);
|
|
102662
|
+
// EXTERNAL MODULE: ./src/assets/icons/remix.svg
|
|
102663
|
+
var remix = __webpack_require__(97950);
|
|
102664
|
+
// EXTERNAL MODULE: ./src/redux/stores/index.ts
|
|
102665
|
+
var stores = __webpack_require__(32132);
|
|
102666
|
+
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
|
|
102667
|
+
var jsx_runtime = __webpack_require__(74848);
|
|
102668
|
+
;// ./src/components/Modals/RemixProjectModal/RemixProjectModal.jsx
|
|
102669
|
+
|
|
102670
|
+
|
|
102671
|
+
|
|
102672
|
+
|
|
102673
|
+
|
|
102674
|
+
|
|
102675
|
+
|
|
102676
|
+
|
|
102677
|
+
|
|
102678
|
+
|
|
102679
|
+
|
|
102680
|
+
var RemixProjectModal = () => {
|
|
102681
|
+
var dispatch = (0,external_react_redux_.useDispatch)();
|
|
102682
|
+
var isModalOpen = (0,stores.useAppSelector)(state => state.editor.modalWindowShowing === types.ModalType.REMIX_PROJECT);
|
|
102683
|
+
if (!isModalOpen) {
|
|
102684
|
+
return null;
|
|
102685
|
+
}
|
|
102686
|
+
var handleClose = () => dispatch((0,EditorSlice.closeModal)());
|
|
102687
|
+
var handleCreateNow = () => {
|
|
102688
|
+
dispatch((0,EditorSlice.setSaveTriggered)(true));
|
|
102689
|
+
handleClose();
|
|
102690
|
+
};
|
|
102691
|
+
return /*#__PURE__*/(0,jsx_runtime.jsxs)(BaseModal["default"], {
|
|
102692
|
+
isOpen: isModalOpen,
|
|
102693
|
+
closeModal: handleClose,
|
|
102694
|
+
externalClasses: styles_module,
|
|
102695
|
+
heading: "",
|
|
102696
|
+
buttons: [/*#__PURE__*/(0,jsx_runtime.jsx)(Button["default"], {
|
|
102697
|
+
variant: "primary",
|
|
102698
|
+
buttonText: "Create Now",
|
|
102699
|
+
onClickHandler: handleCreateNow
|
|
102700
|
+
}, "create"), /*#__PURE__*/(0,jsx_runtime.jsx)(Button["default"], {
|
|
102701
|
+
variant: "tertiaryGray",
|
|
102702
|
+
buttonText: "Cancel",
|
|
102703
|
+
onClickHandler: handleClose
|
|
102704
|
+
}, "cancel")],
|
|
102705
|
+
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
102706
|
+
className: BaseModal_styles_module["default"].headerContainer,
|
|
102707
|
+
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(SvgIcon.SvgIcon, {
|
|
102708
|
+
size: 32,
|
|
102709
|
+
SvgElement: remix["default"],
|
|
102710
|
+
className: "".concat(BaseModal_styles_module["default"].headerText, " ").concat(styles_module.headerIcon)
|
|
102711
|
+
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
102712
|
+
className: "".concat(BaseModal_styles_module["default"].headerText, " ").concat(styles_module.headerText),
|
|
102713
|
+
children: "Remix Project"
|
|
102714
|
+
})]
|
|
102715
|
+
}), /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
102716
|
+
className: styles_module.description,
|
|
102717
|
+
children: "You'll create your own version, starting from this project."
|
|
102718
|
+
})]
|
|
102719
|
+
});
|
|
102720
|
+
};
|
|
102721
|
+
/* harmony default export */ const RemixProjectModal_RemixProjectModal = (RemixProjectModal);
|
|
102722
|
+
|
|
102723
|
+
/***/ }),
|
|
102724
|
+
|
|
102610
102725
|
/***/ 3985:
|
|
102611
102726
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
102612
102727
|
|
|
@@ -102712,7 +102827,7 @@ var RemoveItemModal = () => {
|
|
|
102712
102827
|
})]
|
|
102713
102828
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
102714
102829
|
className: "".concat(BaseModal_styles_module["default"].containerBox, " ").concat(styles_module.containerBox),
|
|
102715
|
-
children: "Deleting this folder will delete everything in it"
|
|
102830
|
+
children: data !== null && data !== void 0 && data.isFolder ? "Deleting this folder will delete everything in it" : "Are you sure you want to delete \"".concat(data === null || data === void 0 ? void 0 : data.itemName, "\"?")
|
|
102716
102831
|
})]
|
|
102717
102832
|
})
|
|
102718
102833
|
});
|
|
@@ -369358,6 +369473,23 @@ async function rewriteInlineStyles(indexPage, components, baseFilePath) {
|
|
|
369358
369473
|
n.set_content(content);
|
|
369359
369474
|
}
|
|
369360
369475
|
}
|
|
369476
|
+
const JS_IMPORT_EXPORT_RE = /(import|export)\s+(?:[^'";]+?\s+from\s+)?["']([^"']+)["']/g;
|
|
369477
|
+
const P5_ASSET_FN_RE = /\b(loadImage|loadSound|loadFont|loadJSON|loadStrings|loadTable|loadXML|loadShader)\(\s*(['"])([^'"]+)\2/g;
|
|
369478
|
+
// Rewrites p5 asset loaders - loadImage("assets/image.jpg") to Blob URLs
|
|
369479
|
+
const jsRewriteP5AssetCalls = async (jsFile, components, stack) => {
|
|
369480
|
+
return replaceAsync(jsFile.content, P5_ASSET_FN_RE, async ([full, fnName, quote, assetPath]) => {
|
|
369481
|
+
if (!assetPath || isExternalOrDataUrl(assetPath))
|
|
369482
|
+
return full;
|
|
369483
|
+
const dep = findProjectFile(components, normalizeRelativePath(assetPath), jsFile.path);
|
|
369484
|
+
if (!dep)
|
|
369485
|
+
return full;
|
|
369486
|
+
const { blobUrl } = await resolveFile(dep, components, [
|
|
369487
|
+
...stack,
|
|
369488
|
+
jsFile.path,
|
|
369489
|
+
]);
|
|
369490
|
+
return `${fnName}(${quote}${blobUrl}${quote}`;
|
|
369491
|
+
});
|
|
369492
|
+
};
|
|
369361
369493
|
// Rewrites all import/export ... from '...' in JS to Blob URLs for local project files
|
|
369362
369494
|
const jsRewriteImports = async (jsFile, components, stack) => {
|
|
369363
369495
|
if (stack.includes(jsFile.path)) {
|
|
@@ -369368,8 +369500,7 @@ const jsRewriteImports = async (jsFile, components, stack) => {
|
|
|
369368
369500
|
content: jsFile.content,
|
|
369369
369501
|
};
|
|
369370
369502
|
}
|
|
369371
|
-
const
|
|
369372
|
-
const rewritten = await replaceAsync(jsFile.content, importExportRegex, async ([full, , importPath]) => {
|
|
369503
|
+
const importsRewritten = await replaceAsync(jsFile.content, JS_IMPORT_EXPORT_RE, async ([full, , importPath]) => {
|
|
369373
369504
|
if (!importPath || isExternalOrDataUrl(importPath))
|
|
369374
369505
|
return full;
|
|
369375
369506
|
const dep = findProjectFile(components, importPath, jsFile.path);
|
|
@@ -369381,9 +369512,10 @@ const jsRewriteImports = async (jsFile, components, stack) => {
|
|
|
369381
369512
|
]);
|
|
369382
369513
|
return full.replace(importPath, blobUrl);
|
|
369383
369514
|
});
|
|
369515
|
+
const p5Rewritten = await jsRewriteP5AssetCalls({ ...jsFile, content: importsRewritten }, components, stack);
|
|
369384
369516
|
return {
|
|
369385
|
-
blobUrl: (0, exports.getBlobURL)(
|
|
369386
|
-
content:
|
|
369517
|
+
blobUrl: (0, exports.getBlobURL)(p5Rewritten, getMimeType(jsFile.path)),
|
|
369518
|
+
content: p5Rewritten,
|
|
369387
369519
|
};
|
|
369388
369520
|
};
|
|
369389
369521
|
const CSS_ASSET_RE = /@import\s+(?:url\(\s*)?(["'])([^"']+)\1\s*\)?([^;]*);|url\(\s*(["']?)([^"')]+)\4\s*\)/g;
|
|
@@ -371630,6 +371762,7 @@ const RemoveItemModal_1 = __importDefault(__webpack_require__(3985));
|
|
|
371630
371762
|
const SaveProjectReminderModal_1 = __importDefault(__webpack_require__(66536));
|
|
371631
371763
|
const UploadSizeLimitModal_1 = __importDefault(__webpack_require__(16893));
|
|
371632
371764
|
const UploadFilesModal_1 = __importDefault(__webpack_require__(9825));
|
|
371765
|
+
const RemixProjectModal_1 = __importDefault(__webpack_require__(45829));
|
|
371633
371766
|
exports.ModalTypeToComponentMap = {
|
|
371634
371767
|
[types_1.ModalType.SHARE_PROJECT]: (0, jsx_runtime_1.jsx)(ShareProjectModal_1.default, {}),
|
|
371635
371768
|
[types_1.ModalType.REMOVE_ITEM]: (0, jsx_runtime_1.jsx)(RemoveItemModal_1.default, {}),
|
|
@@ -371637,6 +371770,7 @@ exports.ModalTypeToComponentMap = {
|
|
|
371637
371770
|
[types_1.ModalType.SAVE_PROJECT_REMINDER]: (0, jsx_runtime_1.jsx)(SaveProjectReminderModal_1.default, {}),
|
|
371638
371771
|
[types_1.ModalType.UPLOAD_SIZE_LIMIT]: (0, jsx_runtime_1.jsx)(UploadSizeLimitModal_1.default, {}),
|
|
371639
371772
|
[types_1.ModalType.UPLOAD_FILES]: (0, jsx_runtime_1.jsx)(UploadFilesModal_1.default, {}),
|
|
371773
|
+
[types_1.ModalType.REMIX_PROJECT]: (0, jsx_runtime_1.jsx)(RemixProjectModal_1.default, {}),
|
|
371640
371774
|
};
|
|
371641
371775
|
|
|
371642
371776
|
|
|
@@ -371664,8 +371798,23 @@ const styles_module_scss_1 = __importDefault(__webpack_require__(19436));
|
|
|
371664
371798
|
const react_redux_1 = __webpack_require__(14062);
|
|
371665
371799
|
const EditorSlice_1 = __webpack_require__(68512);
|
|
371666
371800
|
const types_1 = __webpack_require__(92932);
|
|
371801
|
+
const remix_svg_1 = __importDefault(__webpack_require__(97950));
|
|
371802
|
+
const stores_1 = __webpack_require__(32132);
|
|
371803
|
+
const types_2 = __webpack_require__(92932);
|
|
371667
371804
|
const SharedProjectBar = () => {
|
|
371668
371805
|
const dispatch = (0, react_redux_1.useDispatch)();
|
|
371806
|
+
const isCodeVisible = (0, stores_1.useAppSelector)((state) => state.editor.isCodeVisible);
|
|
371807
|
+
const saving = (0, stores_1.useAppSelector)((state) => state.editor.saving);
|
|
371808
|
+
const userId = (0, stores_1.useAppSelector)((state) => state.user.userId);
|
|
371809
|
+
const isSaving = saving === types_2.SavingState.PROCESS;
|
|
371810
|
+
const handleOpenRemixModal = () => {
|
|
371811
|
+
dispatch((0, EditorSlice_1.showModal)({
|
|
371812
|
+
modal: types_1.ModalType.REMIX_PROJECT,
|
|
371813
|
+
args: {
|
|
371814
|
+
type: types_1.ModalType.REMIX_PROJECT,
|
|
371815
|
+
},
|
|
371816
|
+
}));
|
|
371817
|
+
};
|
|
371669
371818
|
const handleOpenShareModal = () => {
|
|
371670
371819
|
dispatch((0, EditorSlice_1.showModal)({
|
|
371671
371820
|
modal: types_1.ModalType.SHARE_PROJECT,
|
|
@@ -371677,7 +371826,7 @@ const SharedProjectBar = () => {
|
|
|
371677
371826
|
},
|
|
371678
371827
|
}));
|
|
371679
371828
|
};
|
|
371680
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, classnames_1.default)(styles_module_scss_1.default.header, styles_module_scss_1.default.sharedProject), children: [(0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.wrapper, children: [(0, jsx_runtime_1.jsx)(gwc_logo_svg_1.default, { className: styles_module_scss_1.default.gwcLogo }), (0, jsx_runtime_1.jsx)(text_jam_logo_svg_1.default, { className: styles_module_scss_1.default.textJamLogo })] }), (0, jsx_runtime_1.jsx)("div", { className: (0, classnames_1.default)(styles_module_scss_1.default.wrapper, styles_module_scss_1.default.projectName), children: (0, jsx_runtime_1.jsx)(SharedProjectName_1.default, {}) }), (0, jsx_runtime_1.
|
|
371829
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, classnames_1.default)(styles_module_scss_1.default.header, styles_module_scss_1.default.sharedProject), children: [(0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.wrapper, children: [(0, jsx_runtime_1.jsx)(gwc_logo_svg_1.default, { className: styles_module_scss_1.default.gwcLogo }), (0, jsx_runtime_1.jsx)(text_jam_logo_svg_1.default, { className: styles_module_scss_1.default.textJamLogo })] }), (0, jsx_runtime_1.jsx)("div", { className: (0, classnames_1.default)(styles_module_scss_1.default.wrapper, styles_module_scss_1.default.projectName), children: (0, jsx_runtime_1.jsx)(SharedProjectName_1.default, {}) }), (0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.wrapper, children: [isCodeVisible && userId && ((0, jsx_runtime_1.jsx)(Button_1.default, { ButtonIcon: () => (0, jsx_runtime_1.jsx)(SvgIcon_1.SvgIcon, { SvgElement: remix_svg_1.default, size: 18 }), buttonText: "Remix", className: styles_module_scss_1.default.headerBtn, variant: "secondary", onClickHandler: handleOpenRemixModal, disabled: isSaving })), (0, jsx_runtime_1.jsx)(RunBar_1.default, {})] }), (0, jsx_runtime_1.jsx)("div", { className: styles_module_scss_1.default.wrapper, children: (0, jsx_runtime_1.jsx)(Button_1.default, { className: (0, classnames_1.default)(styles_module_scss_1.default.linkButton, styles_module_scss_1.default.btnSvg), variant: "tertiary", ButtonIcon: () => (0, jsx_runtime_1.jsx)(SvgIcon_1.SvgIcon, { SvgElement: link_svg_1.default, size: 24 }), onClickHandler: handleOpenShareModal }) })] }));
|
|
371681
371830
|
};
|
|
371682
371831
|
exports.SharedProjectBar = SharedProjectBar;
|
|
371683
371832
|
|
|
@@ -373554,6 +373703,7 @@ var ModalType;
|
|
|
373554
373703
|
ModalType["SAVE_PROJECT_REMINDER"] = "saveProjectReminder";
|
|
373555
373704
|
ModalType["UPLOAD_SIZE_LIMIT"] = "uploadSizeLimit";
|
|
373556
373705
|
ModalType["UPLOAD_FILES"] = "uploadFiles";
|
|
373706
|
+
ModalType["REMIX_PROJECT"] = "remixProject";
|
|
373557
373707
|
})(ModalType || (exports.ModalType = ModalType = {}));
|
|
373558
373708
|
var SavingState;
|
|
373559
373709
|
(function (SavingState) {
|
package/dist/style.css
CHANGED
|
@@ -709,4 +709,5 @@
|
|
|
709
709
|
: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}
|
|
710
710
|
: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))}
|
|
711
711
|
: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}
|
|
712
|
+
.styles-module__content--5mqMd{inline-size:475px}.styles-module__body--FT2ak{align-items:center;text-align:center;gap:calc(.75rem*var(--scale-factor, 1))}.styles-module__buttonsContainer--LsIFl{justify-content:right;gap:calc(.75rem*var(--scale-factor, 1));margin-block-start:calc(1rem*var(--scale-factor, 1))}@media(max-width: 720px){.styles-module__buttonsContainer--LsIFl{flex-direction:row}}.styles-module__headerText--7Ob34{font-size:calc(2rem*var(--scale-factor, 1));line-height:calc(2.5rem*var(--scale-factor, 1))}.styles-module__headerIcon--u9yrl{margin-block-end:calc(.5rem*var(--scale-factor, 1))}.styles-module__description--IvKuo{font-size:calc(1.25rem*var(--scale-factor, 1));line-height:calc(1.5rem*var(--scale-factor, 1));line-height:1.4;margin:0;max-inline-size:320px}
|
|
712
713
|
: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.87",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://github.com/GirlsFirst/gwchq-textjam",
|
|
7
7
|
"author": "Girls Who Code HQ",
|