gwchq-textjam 0.1.13 → 0.1.14
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 +59 -518
- package/dist/style.css +14 -17
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -60522,6 +60522,11 @@ var RunButton = _ref => {
|
|
|
60522
60522
|
/* harmony default export */ const RunButton_RunButton = (RunButton);
|
|
60523
60523
|
// EXTERNAL MODULE: ./node_modules/react-i18next/dist/es/index.js + 17 modules
|
|
60524
60524
|
var es = __webpack_require__(34195);
|
|
60525
|
+
// EXTERNAL MODULE: ./node_modules/classnames/index.js
|
|
60526
|
+
var classnames = __webpack_require__(46942);
|
|
60527
|
+
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
|
|
60528
|
+
// EXTERNAL MODULE: ./src/components/RunButton/styles.module.scss
|
|
60529
|
+
var styles_module = __webpack_require__(26413);
|
|
60525
60530
|
;// ./src/components/RunButton/StopButton.jsx
|
|
60526
60531
|
|
|
60527
60532
|
|
|
@@ -60532,6 +60537,8 @@ var StopButton_excluded = ["embedded", "className"];
|
|
|
60532
60537
|
|
|
60533
60538
|
|
|
60534
60539
|
|
|
60540
|
+
|
|
60541
|
+
|
|
60535
60542
|
var StopButton = _ref => {
|
|
60536
60543
|
var {
|
|
60537
60544
|
embedded = false,
|
|
@@ -60551,7 +60558,10 @@ var StopButton = _ref => {
|
|
|
60551
60558
|
dispatch((0,EditorSlice.stopDraw)());
|
|
60552
60559
|
};
|
|
60553
60560
|
var stop = /*#__PURE__*/(0,jsx_runtime.jsx)(Button/* default */.A, (0,objectSpread2/* default */.A)({
|
|
60554
|
-
onClickHandler: onClickStop
|
|
60561
|
+
onClickHandler: onClickStop,
|
|
60562
|
+
className: classnames_default()({
|
|
60563
|
+
[styles_module/* default */.A.pressed]: !!codeRunTriggered
|
|
60564
|
+
})
|
|
60555
60565
|
}, props));
|
|
60556
60566
|
var [button, setButton] = (0,external_react_.useState)(stop);
|
|
60557
60567
|
(0,external_react_.useEffect)(() => {
|
|
@@ -60599,7 +60609,7 @@ function SvgStop(props) {
|
|
|
60599
60609
|
fill: "none",
|
|
60600
60610
|
xmlns: "http://www.w3.org/2000/svg"
|
|
60601
60611
|
}, props), stop_path || (stop_path = /*#__PURE__*/external_react_.createElement("path", {
|
|
60602
|
-
d: "
|
|
60612
|
+
d: "M19 3H5a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2V5a2 2 0 00-2-2z",
|
|
60603
60613
|
stroke: "#003046",
|
|
60604
60614
|
strokeWidth: 2,
|
|
60605
60615
|
strokeLinecap: "round",
|
|
@@ -64636,215 +64646,6 @@ function matchQueries(rules) {
|
|
|
64636
64646
|
exports["default"] = matchQueries;
|
|
64637
64647
|
//# sourceMappingURL=matchQueries.js.map
|
|
64638
64648
|
|
|
64639
|
-
/***/ }),
|
|
64640
|
-
|
|
64641
|
-
/***/ 57427:
|
|
64642
|
-
/***/ ((__unused_webpack_module, exports) => {
|
|
64643
|
-
|
|
64644
|
-
/*!
|
|
64645
|
-
* cookie
|
|
64646
|
-
* Copyright(c) 2012-2014 Roman Shtylman
|
|
64647
|
-
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
64648
|
-
* MIT Licensed
|
|
64649
|
-
*/
|
|
64650
|
-
|
|
64651
|
-
|
|
64652
|
-
|
|
64653
|
-
/**
|
|
64654
|
-
* Module exports.
|
|
64655
|
-
* @public
|
|
64656
|
-
*/
|
|
64657
|
-
|
|
64658
|
-
exports.q = parse;
|
|
64659
|
-
exports.l = serialize;
|
|
64660
|
-
|
|
64661
|
-
/**
|
|
64662
|
-
* Module variables.
|
|
64663
|
-
* @private
|
|
64664
|
-
*/
|
|
64665
|
-
|
|
64666
|
-
var decode = decodeURIComponent;
|
|
64667
|
-
var encode = encodeURIComponent;
|
|
64668
|
-
|
|
64669
|
-
/**
|
|
64670
|
-
* RegExp to match field-content in RFC 7230 sec 3.2
|
|
64671
|
-
*
|
|
64672
|
-
* field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ]
|
|
64673
|
-
* field-vchar = VCHAR / obs-text
|
|
64674
|
-
* obs-text = %x80-FF
|
|
64675
|
-
*/
|
|
64676
|
-
|
|
64677
|
-
var fieldContentRegExp = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;
|
|
64678
|
-
|
|
64679
|
-
/**
|
|
64680
|
-
* Parse a cookie header.
|
|
64681
|
-
*
|
|
64682
|
-
* Parse the given cookie header string into an object
|
|
64683
|
-
* The object has the various cookies as keys(names) => values
|
|
64684
|
-
*
|
|
64685
|
-
* @param {string} str
|
|
64686
|
-
* @param {object} [options]
|
|
64687
|
-
* @return {object}
|
|
64688
|
-
* @public
|
|
64689
|
-
*/
|
|
64690
|
-
|
|
64691
|
-
function parse(str, options) {
|
|
64692
|
-
if (typeof str !== 'string') {
|
|
64693
|
-
throw new TypeError('argument str must be a string');
|
|
64694
|
-
}
|
|
64695
|
-
|
|
64696
|
-
var obj = {}
|
|
64697
|
-
var opt = options || {};
|
|
64698
|
-
var pairs = str.split(';')
|
|
64699
|
-
var dec = opt.decode || decode;
|
|
64700
|
-
|
|
64701
|
-
for (var i = 0; i < pairs.length; i++) {
|
|
64702
|
-
var pair = pairs[i];
|
|
64703
|
-
var index = pair.indexOf('=')
|
|
64704
|
-
|
|
64705
|
-
// skip things that don't look like key=value
|
|
64706
|
-
if (index < 0) {
|
|
64707
|
-
continue;
|
|
64708
|
-
}
|
|
64709
|
-
|
|
64710
|
-
var key = pair.substring(0, index).trim()
|
|
64711
|
-
|
|
64712
|
-
// only assign once
|
|
64713
|
-
if (undefined == obj[key]) {
|
|
64714
|
-
var val = pair.substring(index + 1, pair.length).trim()
|
|
64715
|
-
|
|
64716
|
-
// quoted values
|
|
64717
|
-
if (val[0] === '"') {
|
|
64718
|
-
val = val.slice(1, -1)
|
|
64719
|
-
}
|
|
64720
|
-
|
|
64721
|
-
obj[key] = tryDecode(val, dec);
|
|
64722
|
-
}
|
|
64723
|
-
}
|
|
64724
|
-
|
|
64725
|
-
return obj;
|
|
64726
|
-
}
|
|
64727
|
-
|
|
64728
|
-
/**
|
|
64729
|
-
* Serialize data into a cookie header.
|
|
64730
|
-
*
|
|
64731
|
-
* Serialize the a name value pair into a cookie string suitable for
|
|
64732
|
-
* http headers. An optional options object specified cookie parameters.
|
|
64733
|
-
*
|
|
64734
|
-
* serialize('foo', 'bar', { httpOnly: true })
|
|
64735
|
-
* => "foo=bar; httpOnly"
|
|
64736
|
-
*
|
|
64737
|
-
* @param {string} name
|
|
64738
|
-
* @param {string} val
|
|
64739
|
-
* @param {object} [options]
|
|
64740
|
-
* @return {string}
|
|
64741
|
-
* @public
|
|
64742
|
-
*/
|
|
64743
|
-
|
|
64744
|
-
function serialize(name, val, options) {
|
|
64745
|
-
var opt = options || {};
|
|
64746
|
-
var enc = opt.encode || encode;
|
|
64747
|
-
|
|
64748
|
-
if (typeof enc !== 'function') {
|
|
64749
|
-
throw new TypeError('option encode is invalid');
|
|
64750
|
-
}
|
|
64751
|
-
|
|
64752
|
-
if (!fieldContentRegExp.test(name)) {
|
|
64753
|
-
throw new TypeError('argument name is invalid');
|
|
64754
|
-
}
|
|
64755
|
-
|
|
64756
|
-
var value = enc(val);
|
|
64757
|
-
|
|
64758
|
-
if (value && !fieldContentRegExp.test(value)) {
|
|
64759
|
-
throw new TypeError('argument val is invalid');
|
|
64760
|
-
}
|
|
64761
|
-
|
|
64762
|
-
var str = name + '=' + value;
|
|
64763
|
-
|
|
64764
|
-
if (null != opt.maxAge) {
|
|
64765
|
-
var maxAge = opt.maxAge - 0;
|
|
64766
|
-
|
|
64767
|
-
if (isNaN(maxAge) || !isFinite(maxAge)) {
|
|
64768
|
-
throw new TypeError('option maxAge is invalid')
|
|
64769
|
-
}
|
|
64770
|
-
|
|
64771
|
-
str += '; Max-Age=' + Math.floor(maxAge);
|
|
64772
|
-
}
|
|
64773
|
-
|
|
64774
|
-
if (opt.domain) {
|
|
64775
|
-
if (!fieldContentRegExp.test(opt.domain)) {
|
|
64776
|
-
throw new TypeError('option domain is invalid');
|
|
64777
|
-
}
|
|
64778
|
-
|
|
64779
|
-
str += '; Domain=' + opt.domain;
|
|
64780
|
-
}
|
|
64781
|
-
|
|
64782
|
-
if (opt.path) {
|
|
64783
|
-
if (!fieldContentRegExp.test(opt.path)) {
|
|
64784
|
-
throw new TypeError('option path is invalid');
|
|
64785
|
-
}
|
|
64786
|
-
|
|
64787
|
-
str += '; Path=' + opt.path;
|
|
64788
|
-
}
|
|
64789
|
-
|
|
64790
|
-
if (opt.expires) {
|
|
64791
|
-
if (typeof opt.expires.toUTCString !== 'function') {
|
|
64792
|
-
throw new TypeError('option expires is invalid');
|
|
64793
|
-
}
|
|
64794
|
-
|
|
64795
|
-
str += '; Expires=' + opt.expires.toUTCString();
|
|
64796
|
-
}
|
|
64797
|
-
|
|
64798
|
-
if (opt.httpOnly) {
|
|
64799
|
-
str += '; HttpOnly';
|
|
64800
|
-
}
|
|
64801
|
-
|
|
64802
|
-
if (opt.secure) {
|
|
64803
|
-
str += '; Secure';
|
|
64804
|
-
}
|
|
64805
|
-
|
|
64806
|
-
if (opt.sameSite) {
|
|
64807
|
-
var sameSite = typeof opt.sameSite === 'string'
|
|
64808
|
-
? opt.sameSite.toLowerCase() : opt.sameSite;
|
|
64809
|
-
|
|
64810
|
-
switch (sameSite) {
|
|
64811
|
-
case true:
|
|
64812
|
-
str += '; SameSite=Strict';
|
|
64813
|
-
break;
|
|
64814
|
-
case 'lax':
|
|
64815
|
-
str += '; SameSite=Lax';
|
|
64816
|
-
break;
|
|
64817
|
-
case 'strict':
|
|
64818
|
-
str += '; SameSite=Strict';
|
|
64819
|
-
break;
|
|
64820
|
-
case 'none':
|
|
64821
|
-
str += '; SameSite=None';
|
|
64822
|
-
break;
|
|
64823
|
-
default:
|
|
64824
|
-
throw new TypeError('option sameSite is invalid');
|
|
64825
|
-
}
|
|
64826
|
-
}
|
|
64827
|
-
|
|
64828
|
-
return str;
|
|
64829
|
-
}
|
|
64830
|
-
|
|
64831
|
-
/**
|
|
64832
|
-
* Try decoding a string using a decoding function.
|
|
64833
|
-
*
|
|
64834
|
-
* @param {string} str
|
|
64835
|
-
* @param {function} decode
|
|
64836
|
-
* @private
|
|
64837
|
-
*/
|
|
64838
|
-
|
|
64839
|
-
function tryDecode(str, decode) {
|
|
64840
|
-
try {
|
|
64841
|
-
return decode(str);
|
|
64842
|
-
} catch (e) {
|
|
64843
|
-
return str;
|
|
64844
|
-
}
|
|
64845
|
-
}
|
|
64846
|
-
|
|
64847
|
-
|
|
64848
64649
|
/***/ }),
|
|
64849
64650
|
|
|
64850
64651
|
/***/ 22015:
|
|
@@ -96625,6 +96426,17 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
96625
96426
|
|
|
96626
96427
|
/***/ }),
|
|
96627
96428
|
|
|
96429
|
+
/***/ 26413:
|
|
96430
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
96431
|
+
|
|
96432
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
96433
|
+
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
96434
|
+
/* harmony export */ });
|
|
96435
|
+
// extracted by mini-css-extract-plugin
|
|
96436
|
+
/* 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","runBar":"styles-module__runBar--JA+8h","pressed":"styles-module__pressed--iQjvR"});
|
|
96437
|
+
|
|
96438
|
+
/***/ }),
|
|
96439
|
+
|
|
96628
96440
|
/***/ 50879:
|
|
96629
96441
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
96630
96442
|
|
|
@@ -337557,9 +337369,8 @@ var RunnerFactory = __webpack_require__(78329);
|
|
|
337557
337369
|
var RunnerFactory_default = /*#__PURE__*/__webpack_require__.n(RunnerFactory);
|
|
337558
337370
|
// EXTERNAL MODULE: ./src/components/RunButton/RunnerControls.jsx + 4 modules
|
|
337559
337371
|
var RunnerControls = __webpack_require__(15590);
|
|
337560
|
-
|
|
337561
|
-
|
|
337562
|
-
/* harmony default export */ const styles_module = ({"grey-rpi-grey-15":"#d5d7dc","grey-rpi-grey-40":"#9497a4","grey-rpi-grey-5":"#f1f2f3","grey-rpi-grey-70":"#4a4d59","grey-rpf-white":"#fff","runBar":"styles-module__runBar--JA+8h"});
|
|
337372
|
+
// EXTERNAL MODULE: ./src/components/RunButton/styles.module.scss
|
|
337373
|
+
var styles_module = __webpack_require__(26413);
|
|
337563
337374
|
;// ./src/components/RunButton/RunBar.jsx
|
|
337564
337375
|
|
|
337565
337376
|
|
|
@@ -337570,7 +337381,7 @@ var RunBar = _ref => {
|
|
|
337570
337381
|
embedded = false
|
|
337571
337382
|
} = _ref;
|
|
337572
337383
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
337573
|
-
className: styles_module.runBar,
|
|
337384
|
+
className: styles_module/* default */.A.runBar,
|
|
337574
337385
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(RunnerControls["default"], {
|
|
337575
337386
|
embedded: embedded
|
|
337576
337387
|
})
|
|
@@ -342250,9 +342061,9 @@ var ProjectBar = _ref => {
|
|
|
342250
342061
|
}), loading === "success" && !readOnly && /*#__PURE__*/(0,jsx_runtime.jsx)(SaveButton_SaveButton, {
|
|
342251
342062
|
className: ProjectBar_styles_module.headerBtn
|
|
342252
342063
|
})]
|
|
342253
|
-
}), /*#__PURE__*/(0,jsx_runtime.
|
|
342064
|
+
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
342254
342065
|
className: ProjectBar_styles_module.wrapper,
|
|
342255
|
-
children: [loading === "success" && /*#__PURE__*/(0,jsx_runtime.jsx)(DownloadButton_DownloadButton, {
|
|
342066
|
+
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(RunButton_RunBar, {}), loading === "success" && /*#__PURE__*/(0,jsx_runtime.jsx)(DownloadButton_DownloadButton, {
|
|
342256
342067
|
className: ProjectBar_styles_module.btnSvg
|
|
342257
342068
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(ShareButton_ShareButton, {
|
|
342258
342069
|
className: ProjectBar_styles_module.btnSvg
|
|
@@ -351164,211 +350975,6 @@ var esm = __webpack_require__(39243);
|
|
|
351164
350975
|
;// ./src/assets/stylesheets/EditorPanel.scss
|
|
351165
350976
|
// extracted by mini-css-extract-plugin
|
|
351166
350977
|
|
|
351167
|
-
// EXTERNAL MODULE: ./node_modules/cookie/index.js
|
|
351168
|
-
var cookie = __webpack_require__(57427);
|
|
351169
|
-
;// ./node_modules/universal-cookie/es6/utils.js
|
|
351170
|
-
|
|
351171
|
-
function hasDocumentCookie() {
|
|
351172
|
-
// Can we get/set cookies on document.cookie?
|
|
351173
|
-
return typeof document === 'object' && typeof document.cookie === 'string';
|
|
351174
|
-
}
|
|
351175
|
-
function cleanCookies() {
|
|
351176
|
-
document.cookie.split(';').forEach(function (c) {
|
|
351177
|
-
document.cookie = c
|
|
351178
|
-
.replace(/^ +/, '')
|
|
351179
|
-
.replace(/=.*/, '=;expires=' + new Date().toUTCString() + ';path=/');
|
|
351180
|
-
});
|
|
351181
|
-
}
|
|
351182
|
-
function parseCookies(cookies, options) {
|
|
351183
|
-
if (typeof cookies === 'string') {
|
|
351184
|
-
return cookie/* parse */.q(cookies, options);
|
|
351185
|
-
}
|
|
351186
|
-
else if (typeof cookies === 'object' && cookies !== null) {
|
|
351187
|
-
return cookies;
|
|
351188
|
-
}
|
|
351189
|
-
else {
|
|
351190
|
-
return {};
|
|
351191
|
-
}
|
|
351192
|
-
}
|
|
351193
|
-
function isParsingCookie(value, doNotParse) {
|
|
351194
|
-
if (typeof doNotParse === 'undefined') {
|
|
351195
|
-
// We guess if the cookie start with { or [, it has been serialized
|
|
351196
|
-
doNotParse =
|
|
351197
|
-
!value || (value[0] !== '{' && value[0] !== '[' && value[0] !== '"');
|
|
351198
|
-
}
|
|
351199
|
-
return !doNotParse;
|
|
351200
|
-
}
|
|
351201
|
-
function readCookie(value, options) {
|
|
351202
|
-
if (options === void 0) { options = {}; }
|
|
351203
|
-
var cleanValue = cleanupCookieValue(value);
|
|
351204
|
-
if (isParsingCookie(cleanValue, options.doNotParse)) {
|
|
351205
|
-
try {
|
|
351206
|
-
return JSON.parse(cleanValue);
|
|
351207
|
-
}
|
|
351208
|
-
catch (e) {
|
|
351209
|
-
// At least we tried
|
|
351210
|
-
}
|
|
351211
|
-
}
|
|
351212
|
-
// Ignore clean value if we failed the deserialization
|
|
351213
|
-
// It is not relevant anymore to trim those values
|
|
351214
|
-
return value;
|
|
351215
|
-
}
|
|
351216
|
-
function cleanupCookieValue(value) {
|
|
351217
|
-
// express prepend j: before serializing a cookie
|
|
351218
|
-
if (value && value[0] === 'j' && value[1] === ':') {
|
|
351219
|
-
return value.substr(2);
|
|
351220
|
-
}
|
|
351221
|
-
return value;
|
|
351222
|
-
}
|
|
351223
|
-
|
|
351224
|
-
;// ./node_modules/universal-cookie/es6/Cookies.js
|
|
351225
|
-
var Cookies_assign = (undefined && undefined.__assign) || function () {
|
|
351226
|
-
Cookies_assign = Object.assign || function(t) {
|
|
351227
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
351228
|
-
s = arguments[i];
|
|
351229
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
351230
|
-
t[p] = s[p];
|
|
351231
|
-
}
|
|
351232
|
-
return t;
|
|
351233
|
-
};
|
|
351234
|
-
return Cookies_assign.apply(this, arguments);
|
|
351235
|
-
};
|
|
351236
|
-
|
|
351237
|
-
|
|
351238
|
-
var Cookies = /** @class */ (function () {
|
|
351239
|
-
function Cookies(cookies, options) {
|
|
351240
|
-
var _this = this;
|
|
351241
|
-
this.changeListeners = [];
|
|
351242
|
-
this.HAS_DOCUMENT_COOKIE = false;
|
|
351243
|
-
this.cookies = parseCookies(cookies, options);
|
|
351244
|
-
new Promise(function () {
|
|
351245
|
-
_this.HAS_DOCUMENT_COOKIE = hasDocumentCookie();
|
|
351246
|
-
}).catch(function () { });
|
|
351247
|
-
}
|
|
351248
|
-
Cookies.prototype._updateBrowserValues = function (parseOptions) {
|
|
351249
|
-
if (!this.HAS_DOCUMENT_COOKIE) {
|
|
351250
|
-
return;
|
|
351251
|
-
}
|
|
351252
|
-
this.cookies = cookie/* parse */.q(document.cookie, parseOptions);
|
|
351253
|
-
};
|
|
351254
|
-
Cookies.prototype._emitChange = function (params) {
|
|
351255
|
-
for (var i = 0; i < this.changeListeners.length; ++i) {
|
|
351256
|
-
this.changeListeners[i](params);
|
|
351257
|
-
}
|
|
351258
|
-
};
|
|
351259
|
-
Cookies.prototype.get = function (name, options, parseOptions) {
|
|
351260
|
-
if (options === void 0) { options = {}; }
|
|
351261
|
-
this._updateBrowserValues(parseOptions);
|
|
351262
|
-
return readCookie(this.cookies[name], options);
|
|
351263
|
-
};
|
|
351264
|
-
Cookies.prototype.getAll = function (options, parseOptions) {
|
|
351265
|
-
if (options === void 0) { options = {}; }
|
|
351266
|
-
this._updateBrowserValues(parseOptions);
|
|
351267
|
-
var result = {};
|
|
351268
|
-
for (var name_1 in this.cookies) {
|
|
351269
|
-
result[name_1] = readCookie(this.cookies[name_1], options);
|
|
351270
|
-
}
|
|
351271
|
-
return result;
|
|
351272
|
-
};
|
|
351273
|
-
Cookies.prototype.set = function (name, value, options) {
|
|
351274
|
-
var _a;
|
|
351275
|
-
if (typeof value === 'object') {
|
|
351276
|
-
value = JSON.stringify(value);
|
|
351277
|
-
}
|
|
351278
|
-
this.cookies = Cookies_assign(Cookies_assign({}, this.cookies), (_a = {}, _a[name] = value, _a));
|
|
351279
|
-
if (this.HAS_DOCUMENT_COOKIE) {
|
|
351280
|
-
document.cookie = cookie/* serialize */.l(name, value, options);
|
|
351281
|
-
}
|
|
351282
|
-
this._emitChange({ name: name, value: value, options: options });
|
|
351283
|
-
};
|
|
351284
|
-
Cookies.prototype.remove = function (name, options) {
|
|
351285
|
-
var finalOptions = (options = Cookies_assign(Cookies_assign({}, options), { expires: new Date(1970, 1, 1, 0, 0, 1), maxAge: 0 }));
|
|
351286
|
-
this.cookies = Cookies_assign({}, this.cookies);
|
|
351287
|
-
delete this.cookies[name];
|
|
351288
|
-
if (this.HAS_DOCUMENT_COOKIE) {
|
|
351289
|
-
document.cookie = cookie/* serialize */.l(name, '', finalOptions);
|
|
351290
|
-
}
|
|
351291
|
-
this._emitChange({ name: name, value: undefined, options: options });
|
|
351292
|
-
};
|
|
351293
|
-
Cookies.prototype.addChangeListener = function (callback) {
|
|
351294
|
-
this.changeListeners.push(callback);
|
|
351295
|
-
};
|
|
351296
|
-
Cookies.prototype.removeChangeListener = function (callback) {
|
|
351297
|
-
var idx = this.changeListeners.indexOf(callback);
|
|
351298
|
-
if (idx >= 0) {
|
|
351299
|
-
this.changeListeners.splice(idx, 1);
|
|
351300
|
-
}
|
|
351301
|
-
};
|
|
351302
|
-
return Cookies;
|
|
351303
|
-
}());
|
|
351304
|
-
/* harmony default export */ const es6_Cookies = (Cookies);
|
|
351305
|
-
|
|
351306
|
-
;// ./node_modules/universal-cookie/es6/index.js
|
|
351307
|
-
|
|
351308
|
-
/* harmony default export */ const es6 = (es6_Cookies);
|
|
351309
|
-
|
|
351310
|
-
;// ./node_modules/react-cookie/es6/Cookies.js
|
|
351311
|
-
|
|
351312
|
-
/* harmony default export */ const react_cookie_es6_Cookies = (es6);
|
|
351313
|
-
|
|
351314
|
-
;// ./node_modules/react-cookie/es6/CookiesContext.js
|
|
351315
|
-
|
|
351316
|
-
|
|
351317
|
-
var CookiesContext = external_react_.createContext(new react_cookie_es6_Cookies());
|
|
351318
|
-
var Provider = CookiesContext.Provider, Consumer = CookiesContext.Consumer;
|
|
351319
|
-
/* harmony default export */ const es6_CookiesContext = (CookiesContext);
|
|
351320
|
-
|
|
351321
|
-
;// ./node_modules/react-cookie/es6/utils.js
|
|
351322
|
-
function isInBrowser() {
|
|
351323
|
-
return (typeof window !== 'undefined' &&
|
|
351324
|
-
typeof window.document !== 'undefined' &&
|
|
351325
|
-
typeof window.document.createElement !== 'undefined');
|
|
351326
|
-
}
|
|
351327
|
-
|
|
351328
|
-
;// ./node_modules/react-cookie/es6/useCookies.js
|
|
351329
|
-
|
|
351330
|
-
|
|
351331
|
-
|
|
351332
|
-
function useCookies(dependencies) {
|
|
351333
|
-
var cookies = (0,external_react_.useContext)(es6_CookiesContext);
|
|
351334
|
-
if (!cookies) {
|
|
351335
|
-
throw new Error('Missing <CookiesProvider>');
|
|
351336
|
-
}
|
|
351337
|
-
var initialCookies = cookies.getAll();
|
|
351338
|
-
var _a = (0,external_react_.useState)(initialCookies), allCookies = _a[0], setCookies = _a[1];
|
|
351339
|
-
var previousCookiesRef = (0,external_react_.useRef)(allCookies);
|
|
351340
|
-
if (isInBrowser()) {
|
|
351341
|
-
(0,external_react_.useLayoutEffect)(function () {
|
|
351342
|
-
function onChange() {
|
|
351343
|
-
var newCookies = cookies.getAll();
|
|
351344
|
-
if (shouldUpdate(dependencies || null, newCookies, previousCookiesRef.current)) {
|
|
351345
|
-
setCookies(newCookies);
|
|
351346
|
-
}
|
|
351347
|
-
previousCookiesRef.current = newCookies;
|
|
351348
|
-
}
|
|
351349
|
-
cookies.addChangeListener(onChange);
|
|
351350
|
-
return function () {
|
|
351351
|
-
cookies.removeChangeListener(onChange);
|
|
351352
|
-
};
|
|
351353
|
-
}, [cookies]);
|
|
351354
|
-
}
|
|
351355
|
-
var setCookie = (0,external_react_.useMemo)(function () { return cookies.set.bind(cookies); }, [cookies]);
|
|
351356
|
-
var removeCookie = (0,external_react_.useMemo)(function () { return cookies.remove.bind(cookies); }, [cookies]);
|
|
351357
|
-
return [allCookies, setCookie, removeCookie];
|
|
351358
|
-
}
|
|
351359
|
-
function shouldUpdate(dependencies, newCookies, oldCookies) {
|
|
351360
|
-
if (!dependencies) {
|
|
351361
|
-
return true;
|
|
351362
|
-
}
|
|
351363
|
-
for (var _i = 0, dependencies_1 = dependencies; _i < dependencies_1.length; _i++) {
|
|
351364
|
-
var dependency = dependencies_1[_i];
|
|
351365
|
-
if (newCookies[dependency] !== oldCookies[dependency]) {
|
|
351366
|
-
return true;
|
|
351367
|
-
}
|
|
351368
|
-
}
|
|
351369
|
-
return false;
|
|
351370
|
-
}
|
|
351371
|
-
|
|
351372
350978
|
;// ./node_modules/@codemirror/state/dist/index.js
|
|
351373
350979
|
/**
|
|
351374
350980
|
The data structure for documents. @nonabstract
|
|
@@ -384664,83 +384270,6 @@ var editorLightTheme = EditorView.theme({
|
|
|
384664
384270
|
}, {
|
|
384665
384271
|
dark: false
|
|
384666
384272
|
});
|
|
384667
|
-
;// ./src/assets/stylesheets/rpf_design_system/font-weight.scss
|
|
384668
|
-
// extracted by mini-css-extract-plugin
|
|
384669
|
-
|
|
384670
|
-
;// ./src/assets/stylesheets/rpf_design_system/font-size.scss
|
|
384671
|
-
// extracted by mini-css-extract-plugin
|
|
384672
|
-
|
|
384673
|
-
;// ./src/assets/stylesheets/rpf_design_system/line-height.scss
|
|
384674
|
-
// extracted by mini-css-extract-plugin
|
|
384675
|
-
|
|
384676
|
-
;// ./src/assets/themes/editorDarkTheme.js
|
|
384677
|
-
|
|
384678
|
-
|
|
384679
|
-
|
|
384680
|
-
|
|
384681
|
-
var editorDarkTheme = EditorView.theme({
|
|
384682
|
-
".cm-gutters": {
|
|
384683
|
-
"background-color": "#2A2B32",
|
|
384684
|
-
color: "white",
|
|
384685
|
-
border: "none"
|
|
384686
|
-
},
|
|
384687
|
-
".cm-activeLine": {
|
|
384688
|
-
"background-color": "inherit"
|
|
384689
|
-
},
|
|
384690
|
-
".cm-activeLineGutter": {
|
|
384691
|
-
"background-color": "inherit",
|
|
384692
|
-
color: "inherit"
|
|
384693
|
-
},
|
|
384694
|
-
"&.cm-focused.ͼ3 .cm-selectionLayer .cm-selectionBackground": {
|
|
384695
|
-
backgroundColor: "#144866"
|
|
384696
|
-
},
|
|
384697
|
-
".cm-selectionMatch": {
|
|
384698
|
-
backgroundColor: "transparent"
|
|
384699
|
-
},
|
|
384700
|
-
"&.cm-focused .cm-cursor": {
|
|
384701
|
-
borderLeftColor: "white"
|
|
384702
|
-
},
|
|
384703
|
-
".cm-line .cm-indentation-marker": {
|
|
384704
|
-
background: "none",
|
|
384705
|
-
"border-inline-start": "solid grey",
|
|
384706
|
-
"&.active": {
|
|
384707
|
-
background: "none",
|
|
384708
|
-
"border-inline-start": "solid lightgrey"
|
|
384709
|
-
}
|
|
384710
|
-
},
|
|
384711
|
-
".ͼ5": {
|
|
384712
|
-
color: "#FFCA99"
|
|
384713
|
-
},
|
|
384714
|
-
".ͼb": {
|
|
384715
|
-
color: "#EECCFF"
|
|
384716
|
-
},
|
|
384717
|
-
".ͼc": {
|
|
384718
|
-
color: "#9EE8FF"
|
|
384719
|
-
},
|
|
384720
|
-
".ͼd": {
|
|
384721
|
-
color: "#9EE8FF"
|
|
384722
|
-
},
|
|
384723
|
-
".ͼe": {
|
|
384724
|
-
color: "#94F9AF"
|
|
384725
|
-
},
|
|
384726
|
-
".ͼf": {
|
|
384727
|
-
color: "#94F9AF"
|
|
384728
|
-
},
|
|
384729
|
-
".ͼg": {
|
|
384730
|
-
color: "#9EE8FF"
|
|
384731
|
-
},
|
|
384732
|
-
".ͼi": {
|
|
384733
|
-
color: "#EECCFF"
|
|
384734
|
-
},
|
|
384735
|
-
".ͼj": {
|
|
384736
|
-
color: "#9EE8FF"
|
|
384737
|
-
},
|
|
384738
|
-
".ͼm": {
|
|
384739
|
-
color: "#FFCA99"
|
|
384740
|
-
}
|
|
384741
|
-
}, {
|
|
384742
|
-
dark: true
|
|
384743
|
-
});
|
|
384744
384273
|
// EXTERNAL MODULE: ./src/utils/settings.js
|
|
384745
384274
|
var utils_settings = __webpack_require__(3798);
|
|
384746
384275
|
;// ./src/components/Editor/EditorPanel/EditorPanel.jsx
|
|
@@ -384763,8 +384292,6 @@ var utils_settings = __webpack_require__(3798);
|
|
|
384763
384292
|
|
|
384764
384293
|
|
|
384765
384294
|
|
|
384766
|
-
|
|
384767
|
-
|
|
384768
384295
|
|
|
384769
384296
|
var MAX_CHARACTERS = 8500000;
|
|
384770
384297
|
var EditorPanel = _ref => {
|
|
@@ -384777,7 +384304,6 @@ var EditorPanel = _ref => {
|
|
|
384777
384304
|
var project = (0,external_react_redux_.useSelector)(state => state.editor.project);
|
|
384778
384305
|
var readOnly = (0,external_react_redux_.useSelector)(state => state.editor.readOnly);
|
|
384779
384306
|
var cascadeUpdate = (0,external_react_redux_.useSelector)(state => state.editor.cascadeUpdate);
|
|
384780
|
-
var [cookies] = useCookies(["theme", "fontSize"]);
|
|
384781
384307
|
var dispatch = (0,external_react_redux_.useDispatch)();
|
|
384782
384308
|
var {
|
|
384783
384309
|
t
|
|
@@ -384814,8 +384340,14 @@ var EditorPanel = _ref => {
|
|
|
384814
384340
|
return dist_html();
|
|
384815
384341
|
}
|
|
384816
384342
|
};
|
|
384817
|
-
|
|
384818
|
-
|
|
384343
|
+
// const isDarkMode =
|
|
384344
|
+
// cookies.theme === "dark" ||
|
|
384345
|
+
// (!cookies.theme &&
|
|
384346
|
+
// window.matchMedia("(prefers-color-scheme:dark)").matches);
|
|
384347
|
+
// const editorTheme = isDarkMode ? editorDarkTheme : editorLightTheme;
|
|
384348
|
+
|
|
384349
|
+
// setting hardcode light theme for TextJam phase 1
|
|
384350
|
+
var editorTheme = editorLightTheme;
|
|
384819
384351
|
var file = project.components.find(item => item.extension === extension && item.name === fileName);
|
|
384820
384352
|
(0,external_react_.useEffect)(() => {
|
|
384821
384353
|
if (!file) {
|
|
@@ -384858,7 +384390,7 @@ var EditorPanel = _ref => {
|
|
|
384858
384390
|
return () => {
|
|
384859
384391
|
view.destroy();
|
|
384860
384392
|
};
|
|
384861
|
-
}, [
|
|
384393
|
+
}, []);
|
|
384862
384394
|
(0,external_react_.useEffect)(() => {
|
|
384863
384395
|
if (cascadeUpdate && editorViewRef.current && file.content !== editorViewRef.current.state.doc.toString()) {
|
|
384864
384396
|
editorViewRef.current.dispatch({
|
|
@@ -385827,17 +385359,26 @@ var WebComponentLoader = props => {
|
|
|
385827
385359
|
var {
|
|
385828
385360
|
i18n
|
|
385829
385361
|
} = (0,es.useTranslation)();
|
|
385830
|
-
|
|
385831
|
-
|
|
385362
|
+
|
|
385363
|
+
// const [cookies, setCookie] = useCookies(["theme", "fontSize"]);
|
|
385364
|
+
// const themeDefault =
|
|
385365
|
+
// typeof window !== "undefined" &&
|
|
385366
|
+
// window.matchMedia &&
|
|
385367
|
+
// window.matchMedia("(prefers-color-scheme:dark)").matches
|
|
385368
|
+
// ? "dark"
|
|
385369
|
+
// : "light";
|
|
385370
|
+
|
|
385371
|
+
// setting hardcode light theme for TextJam phase 1
|
|
385372
|
+
var themeDefault = "light";
|
|
385832
385373
|
useEmbeddedMode(embedded);
|
|
385833
|
-
|
|
385834
|
-
|
|
385835
|
-
|
|
385836
|
-
|
|
385837
|
-
|
|
385838
|
-
|
|
385839
|
-
|
|
385840
|
-
|
|
385374
|
+
|
|
385375
|
+
// useEffect(() => {
|
|
385376
|
+
// if (theme) {
|
|
385377
|
+
// dispatch(disableTheming());
|
|
385378
|
+
// setCookie("theme", theme, { path: "/" });
|
|
385379
|
+
// }
|
|
385380
|
+
// }, [theme, setCookie, dispatch]);
|
|
385381
|
+
|
|
385841
385382
|
(0,external_react_.useEffect)(() => {
|
|
385842
385383
|
if (justLoaded) {
|
|
385843
385384
|
document.dispatchEvent(projectOwnerLoadedEvent(projectOwner));
|
|
@@ -385879,12 +385420,12 @@ var WebComponentLoader = props => {
|
|
|
385879
385420
|
var renderSuccessState = () => /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
|
|
385880
385421
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(utils_settings/* SettingsContext */.l.Provider, {
|
|
385881
385422
|
value: {
|
|
385882
|
-
theme:
|
|
385883
|
-
fontSize:
|
|
385423
|
+
theme: themeDefault,
|
|
385424
|
+
fontSize: "small"
|
|
385884
385425
|
},
|
|
385885
385426
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
385886
385427
|
id: "textjam-root",
|
|
385887
|
-
className: "editor-shell --".concat(
|
|
385428
|
+
className: "editor-shell --".concat(themeDefault),
|
|
385888
385429
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ToastContainer, {
|
|
385889
385430
|
enableMultiContainer: true,
|
|
385890
385431
|
containerId: "top-center",
|