@uiw/react-md-editor 3.23.6 → 3.24.1
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/README.md +29 -4
- package/dist/mdeditor.css +2 -0
- package/dist/mdeditor.js +234 -237
- package/dist/mdeditor.min.css +1 -1
- package/dist/mdeditor.min.js +1 -1
- package/dist/mdeditor.min.js.LICENSE.txt +1 -1
- package/esm/commands/bold.js +9 -13
- package/esm/commands/code.d.ts +1 -1
- package/esm/commands/code.js +75 -68
- package/esm/commands/comment.js +20 -18
- package/esm/commands/help.d.ts +2 -0
- package/esm/commands/help.js +22 -0
- package/esm/commands/hr.js +33 -2
- package/esm/commands/image.js +39 -16
- package/esm/commands/index.d.ts +7 -2
- package/esm/commands/index.js +5 -2
- package/esm/commands/issue.d.ts +2 -0
- package/esm/commands/issue.js +41 -0
- package/esm/commands/italic.js +9 -13
- package/esm/commands/link.js +40 -14
- package/esm/commands/list.d.ts +3 -10
- package/esm/commands/list.js +39 -41
- package/esm/commands/quote.js +8 -8
- package/esm/commands/strikeThrough.js +9 -13
- package/esm/commands/table.d.ts +2 -0
- package/esm/commands/table.js +57 -0
- package/esm/commands/title.d.ts +7 -1
- package/esm/commands/title.js +21 -0
- package/esm/commands/title1.js +9 -7
- package/esm/commands/title2.js +9 -7
- package/esm/commands/title3.js +9 -7
- package/esm/commands/title4.js +9 -7
- package/esm/commands/title5.js +9 -7
- package/esm/commands/title6.js +9 -7
- package/esm/components/TextArea/handleKeyDown.js +83 -5
- package/esm/utils/InsertTextAtPosition.d.ts +0 -7
- package/esm/utils/InsertTextAtPosition.js +6 -24
- package/esm/utils/markdownUtils.d.ts +23 -1
- package/esm/utils/markdownUtils.js +83 -4
- package/lib/Context.js +2 -3
- package/lib/Editor.js +1 -2
- package/lib/commands/bold.js +10 -15
- package/lib/commands/code.d.ts +1 -1
- package/lib/commands/code.js +75 -70
- package/lib/commands/comment.js +21 -20
- package/lib/commands/divider.js +2 -3
- package/lib/commands/fullscreen.js +2 -3
- package/lib/commands/group.js +2 -3
- package/lib/commands/help.d.ts +2 -0
- package/lib/commands/help.js +29 -0
- package/lib/commands/hr.js +35 -5
- package/lib/commands/image.js +40 -18
- package/lib/commands/index.d.ts +7 -2
- package/lib/commands/index.js +27 -10
- package/lib/commands/issue.d.ts +2 -0
- package/lib/commands/issue.js +48 -0
- package/lib/commands/italic.js +10 -15
- package/lib/commands/link.js +41 -16
- package/lib/commands/list.d.ts +3 -10
- package/lib/commands/list.js +43 -52
- package/lib/commands/preview.js +4 -7
- package/lib/commands/quote.js +9 -10
- package/lib/commands/strikeThrough.js +10 -15
- package/lib/commands/table.d.ts +2 -0
- package/lib/commands/table.js +64 -0
- package/lib/commands/title.d.ts +7 -1
- package/lib/commands/title.js +23 -3
- package/lib/commands/title1.js +11 -10
- package/lib/commands/title2.js +11 -10
- package/lib/commands/title3.js +11 -10
- package/lib/commands/title4.js +11 -10
- package/lib/commands/title5.js +11 -10
- package/lib/commands/title6.js +11 -10
- package/lib/components/DragBar/index.js +1 -2
- package/lib/components/TextArea/handleKeyDown.js +84 -6
- package/lib/index.js +1 -2
- package/lib/utils/InsertTextAtPosition.d.ts +0 -7
- package/lib/utils/InsertTextAtPosition.js +6 -26
- package/lib/utils/markdownUtils.d.ts +23 -1
- package/lib/utils/markdownUtils.js +84 -4
- package/package.json +4 -1
- package/src/commands/bold.tsx +13 -12
- package/src/commands/code.tsx +72 -71
- package/src/commands/comment.tsx +20 -15
- package/src/commands/help.tsx +19 -0
- package/src/commands/hr.tsx +33 -2
- package/src/commands/image.tsx +38 -15
- package/src/commands/index.ts +12 -1
- package/src/commands/issue.tsx +36 -0
- package/src/commands/italic.tsx +13 -12
- package/src/commands/link.tsx +39 -12
- package/src/commands/list.tsx +35 -53
- package/src/commands/quote.tsx +14 -13
- package/src/commands/strikeThrough.tsx +13 -12
- package/src/commands/table.tsx +52 -0
- package/src/commands/title.tsx +18 -1
- package/src/commands/title1.tsx +6 -9
- package/src/commands/title2.tsx +6 -9
- package/src/commands/title3.tsx +6 -9
- package/src/commands/title4.tsx +6 -9
- package/src/commands/title5.tsx +6 -9
- package/src/commands/title6.tsx +6 -9
- package/src/components/TextArea/handleKeyDown.tsx +54 -5
- package/src/utils/InsertTextAtPosition.ts +7 -28
- package/src/utils/markdownUtils.ts +94 -4
package/dist/mdeditor.js
CHANGED
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
return /******/ (() => { // webpackBootstrap
|
|
12
12
|
/******/ var __webpack_modules__ = ({
|
|
13
13
|
|
|
14
|
-
/***/
|
|
14
|
+
/***/ 5028:
|
|
15
15
|
/***/ (function(module) {
|
|
16
16
|
|
|
17
17
|
/**!
|
|
18
|
-
* @uiw/copy-to-clipboard v1.0.
|
|
18
|
+
* @uiw/copy-to-clipboard v1.0.16
|
|
19
19
|
* Copy to clipboard.
|
|
20
20
|
*
|
|
21
21
|
* Copyright (c) 2023 Kenny Wang
|
|
@@ -91,7 +91,7 @@ return /******/ (() => { // webpackBootstrap
|
|
|
91
91
|
|
|
92
92
|
/***/ }),
|
|
93
93
|
|
|
94
|
-
/***/
|
|
94
|
+
/***/ 9377:
|
|
95
95
|
/***/ ((module) => {
|
|
96
96
|
|
|
97
97
|
module.exports = {
|
|
@@ -105,15 +105,15 @@ module.exports = {
|
|
|
105
105
|
|
|
106
106
|
/***/ }),
|
|
107
107
|
|
|
108
|
-
/***/
|
|
108
|
+
/***/ 301:
|
|
109
109
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
110
110
|
|
|
111
111
|
"use strict";
|
|
112
112
|
var __webpack_unused_export__;
|
|
113
113
|
|
|
114
114
|
__webpack_unused_export__ = ({ value: true });
|
|
115
|
-
var parser_context_1 = __webpack_require__(
|
|
116
|
-
var render_1 = __webpack_require__(
|
|
115
|
+
var parser_context_1 = __webpack_require__(8777);
|
|
116
|
+
var render_1 = __webpack_require__(1941);
|
|
117
117
|
var CssSelectorParser = /** @class */ (function () {
|
|
118
118
|
function CssSelectorParser() {
|
|
119
119
|
this.pseudos = {};
|
|
@@ -230,13 +230,13 @@ exports.N = CssSelectorParser;
|
|
|
230
230
|
|
|
231
231
|
/***/ }),
|
|
232
232
|
|
|
233
|
-
/***/
|
|
233
|
+
/***/ 8777:
|
|
234
234
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
235
235
|
|
|
236
236
|
"use strict";
|
|
237
237
|
|
|
238
238
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
239
|
-
var utils_1 = __webpack_require__(
|
|
239
|
+
var utils_1 = __webpack_require__(6517);
|
|
240
240
|
function parseCssSelector(str, pos, pseudos, attrEqualityMods, ruleNestingOperators, substitutesEnabled) {
|
|
241
241
|
var l = str.length;
|
|
242
242
|
var chr = '';
|
|
@@ -567,13 +567,13 @@ exports.parseCssSelector = parseCssSelector;
|
|
|
567
567
|
|
|
568
568
|
/***/ }),
|
|
569
569
|
|
|
570
|
-
/***/
|
|
570
|
+
/***/ 1941:
|
|
571
571
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
572
572
|
|
|
573
573
|
"use strict";
|
|
574
574
|
|
|
575
575
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
576
|
-
var utils_1 = __webpack_require__(
|
|
576
|
+
var utils_1 = __webpack_require__(6517);
|
|
577
577
|
function renderEntity(entity) {
|
|
578
578
|
var res = '';
|
|
579
579
|
switch (entity.type) {
|
|
@@ -657,7 +657,7 @@ exports.renderEntity = renderEntity;
|
|
|
657
657
|
|
|
658
658
|
/***/ }),
|
|
659
659
|
|
|
660
|
-
/***/
|
|
660
|
+
/***/ 6517:
|
|
661
661
|
/***/ ((__unused_webpack_module, exports) => {
|
|
662
662
|
|
|
663
663
|
"use strict";
|
|
@@ -788,7 +788,7 @@ exports.doubleQuotesEscapeChars = {
|
|
|
788
788
|
|
|
789
789
|
/***/ }),
|
|
790
790
|
|
|
791
|
-
/***/
|
|
791
|
+
/***/ 229:
|
|
792
792
|
/***/ ((module) => {
|
|
793
793
|
|
|
794
794
|
"use strict";
|
|
@@ -913,13 +913,13 @@ module.exports = function extend() {
|
|
|
913
913
|
|
|
914
914
|
/***/ }),
|
|
915
915
|
|
|
916
|
-
/***/
|
|
916
|
+
/***/ 8293:
|
|
917
917
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
918
918
|
|
|
919
919
|
"use strict";
|
|
920
920
|
|
|
921
921
|
|
|
922
|
-
const { DOCUMENT_MODE } = __webpack_require__(
|
|
922
|
+
const { DOCUMENT_MODE } = __webpack_require__(3676);
|
|
923
923
|
|
|
924
924
|
//Const
|
|
925
925
|
const VALID_DOCTYPE_NAME = 'html';
|
|
@@ -1083,7 +1083,7 @@ exports.serializeContent = function(name, publicId, systemId) {
|
|
|
1083
1083
|
|
|
1084
1084
|
/***/ }),
|
|
1085
1085
|
|
|
1086
|
-
/***/
|
|
1086
|
+
/***/ 3941:
|
|
1087
1087
|
/***/ ((module) => {
|
|
1088
1088
|
|
|
1089
1089
|
"use strict";
|
|
@@ -1156,14 +1156,14 @@ module.exports = {
|
|
|
1156
1156
|
|
|
1157
1157
|
/***/ }),
|
|
1158
1158
|
|
|
1159
|
-
/***/
|
|
1159
|
+
/***/ 985:
|
|
1160
1160
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
1161
1161
|
|
|
1162
1162
|
"use strict";
|
|
1163
1163
|
|
|
1164
1164
|
|
|
1165
|
-
const Tokenizer = __webpack_require__(
|
|
1166
|
-
const HTML = __webpack_require__(
|
|
1165
|
+
const Tokenizer = __webpack_require__(6504);
|
|
1166
|
+
const HTML = __webpack_require__(3676);
|
|
1167
1167
|
|
|
1168
1168
|
//Aliases
|
|
1169
1169
|
const $ = HTML.TAG_NAMES;
|
|
@@ -1429,7 +1429,7 @@ exports.isIntegrationPoint = function(tn, ns, attrs, foreignNS) {
|
|
|
1429
1429
|
|
|
1430
1430
|
/***/ }),
|
|
1431
1431
|
|
|
1432
|
-
/***/
|
|
1432
|
+
/***/ 3676:
|
|
1433
1433
|
/***/ ((__unused_webpack_module, exports) => {
|
|
1434
1434
|
|
|
1435
1435
|
"use strict";
|
|
@@ -1709,7 +1709,7 @@ exports.SPECIAL_ELEMENTS = {
|
|
|
1709
1709
|
|
|
1710
1710
|
/***/ }),
|
|
1711
1711
|
|
|
1712
|
-
/***/
|
|
1712
|
+
/***/ 3325:
|
|
1713
1713
|
/***/ ((__unused_webpack_module, exports) => {
|
|
1714
1714
|
|
|
1715
1715
|
"use strict";
|
|
@@ -1826,13 +1826,13 @@ exports.isUndefinedCodePoint = function(cp) {
|
|
|
1826
1826
|
|
|
1827
1827
|
/***/ }),
|
|
1828
1828
|
|
|
1829
|
-
/***/
|
|
1829
|
+
/***/ 832:
|
|
1830
1830
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1831
1831
|
|
|
1832
1832
|
"use strict";
|
|
1833
1833
|
|
|
1834
1834
|
|
|
1835
|
-
const Mixin = __webpack_require__(
|
|
1835
|
+
const Mixin = __webpack_require__(6945);
|
|
1836
1836
|
|
|
1837
1837
|
class ErrorReportingMixinBase extends Mixin {
|
|
1838
1838
|
constructor(host, opts) {
|
|
@@ -1877,16 +1877,16 @@ module.exports = ErrorReportingMixinBase;
|
|
|
1877
1877
|
|
|
1878
1878
|
/***/ }),
|
|
1879
1879
|
|
|
1880
|
-
/***/
|
|
1880
|
+
/***/ 2314:
|
|
1881
1881
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1882
1882
|
|
|
1883
1883
|
"use strict";
|
|
1884
1884
|
|
|
1885
1885
|
|
|
1886
|
-
const ErrorReportingMixinBase = __webpack_require__(
|
|
1887
|
-
const ErrorReportingTokenizerMixin = __webpack_require__(
|
|
1888
|
-
const LocationInfoTokenizerMixin = __webpack_require__(
|
|
1889
|
-
const Mixin = __webpack_require__(
|
|
1886
|
+
const ErrorReportingMixinBase = __webpack_require__(832);
|
|
1887
|
+
const ErrorReportingTokenizerMixin = __webpack_require__(7985);
|
|
1888
|
+
const LocationInfoTokenizerMixin = __webpack_require__(4415);
|
|
1889
|
+
const Mixin = __webpack_require__(6945);
|
|
1890
1890
|
|
|
1891
1891
|
class ErrorReportingParserMixin extends ErrorReportingMixinBase {
|
|
1892
1892
|
constructor(parser, opts) {
|
|
@@ -1937,15 +1937,15 @@ module.exports = ErrorReportingParserMixin;
|
|
|
1937
1937
|
|
|
1938
1938
|
/***/ }),
|
|
1939
1939
|
|
|
1940
|
-
/***/
|
|
1940
|
+
/***/ 1973:
|
|
1941
1941
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1942
1942
|
|
|
1943
1943
|
"use strict";
|
|
1944
1944
|
|
|
1945
1945
|
|
|
1946
|
-
const ErrorReportingMixinBase = __webpack_require__(
|
|
1947
|
-
const PositionTrackingPreprocessorMixin = __webpack_require__(
|
|
1948
|
-
const Mixin = __webpack_require__(
|
|
1946
|
+
const ErrorReportingMixinBase = __webpack_require__(832);
|
|
1947
|
+
const PositionTrackingPreprocessorMixin = __webpack_require__(4869);
|
|
1948
|
+
const Mixin = __webpack_require__(6945);
|
|
1949
1949
|
|
|
1950
1950
|
class ErrorReportingPreprocessorMixin extends ErrorReportingMixinBase {
|
|
1951
1951
|
constructor(preprocessor, opts) {
|
|
@@ -1969,15 +1969,15 @@ module.exports = ErrorReportingPreprocessorMixin;
|
|
|
1969
1969
|
|
|
1970
1970
|
/***/ }),
|
|
1971
1971
|
|
|
1972
|
-
/***/
|
|
1972
|
+
/***/ 7985:
|
|
1973
1973
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1974
1974
|
|
|
1975
1975
|
"use strict";
|
|
1976
1976
|
|
|
1977
1977
|
|
|
1978
|
-
const ErrorReportingMixinBase = __webpack_require__(
|
|
1979
|
-
const ErrorReportingPreprocessorMixin = __webpack_require__(
|
|
1980
|
-
const Mixin = __webpack_require__(
|
|
1978
|
+
const ErrorReportingMixinBase = __webpack_require__(832);
|
|
1979
|
+
const ErrorReportingPreprocessorMixin = __webpack_require__(1973);
|
|
1980
|
+
const Mixin = __webpack_require__(6945);
|
|
1981
1981
|
|
|
1982
1982
|
class ErrorReportingTokenizerMixin extends ErrorReportingMixinBase {
|
|
1983
1983
|
constructor(tokenizer, opts) {
|
|
@@ -1994,13 +1994,13 @@ module.exports = ErrorReportingTokenizerMixin;
|
|
|
1994
1994
|
|
|
1995
1995
|
/***/ }),
|
|
1996
1996
|
|
|
1997
|
-
/***/
|
|
1997
|
+
/***/ 81:
|
|
1998
1998
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1999
1999
|
|
|
2000
2000
|
"use strict";
|
|
2001
2001
|
|
|
2002
2002
|
|
|
2003
|
-
const Mixin = __webpack_require__(
|
|
2003
|
+
const Mixin = __webpack_require__(6945);
|
|
2004
2004
|
|
|
2005
2005
|
class LocationInfoOpenElementStackMixin extends Mixin {
|
|
2006
2006
|
constructor(stack, opts) {
|
|
@@ -2037,17 +2037,17 @@ module.exports = LocationInfoOpenElementStackMixin;
|
|
|
2037
2037
|
|
|
2038
2038
|
/***/ }),
|
|
2039
2039
|
|
|
2040
|
-
/***/
|
|
2040
|
+
/***/ 1479:
|
|
2041
2041
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
2042
2042
|
|
|
2043
2043
|
"use strict";
|
|
2044
2044
|
|
|
2045
2045
|
|
|
2046
|
-
const Mixin = __webpack_require__(
|
|
2047
|
-
const Tokenizer = __webpack_require__(
|
|
2048
|
-
const LocationInfoTokenizerMixin = __webpack_require__(
|
|
2049
|
-
const LocationInfoOpenElementStackMixin = __webpack_require__(
|
|
2050
|
-
const HTML = __webpack_require__(
|
|
2046
|
+
const Mixin = __webpack_require__(6945);
|
|
2047
|
+
const Tokenizer = __webpack_require__(6504);
|
|
2048
|
+
const LocationInfoTokenizerMixin = __webpack_require__(4415);
|
|
2049
|
+
const LocationInfoOpenElementStackMixin = __webpack_require__(81);
|
|
2050
|
+
const HTML = __webpack_require__(3676);
|
|
2051
2051
|
|
|
2052
2052
|
//Aliases
|
|
2053
2053
|
const $ = HTML.TAG_NAMES;
|
|
@@ -2268,15 +2268,15 @@ module.exports = LocationInfoParserMixin;
|
|
|
2268
2268
|
|
|
2269
2269
|
/***/ }),
|
|
2270
2270
|
|
|
2271
|
-
/***/
|
|
2271
|
+
/***/ 4415:
|
|
2272
2272
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
2273
2273
|
|
|
2274
2274
|
"use strict";
|
|
2275
2275
|
|
|
2276
2276
|
|
|
2277
|
-
const Mixin = __webpack_require__(
|
|
2278
|
-
const Tokenizer = __webpack_require__(
|
|
2279
|
-
const PositionTrackingPreprocessorMixin = __webpack_require__(
|
|
2277
|
+
const Mixin = __webpack_require__(6945);
|
|
2278
|
+
const Tokenizer = __webpack_require__(6504);
|
|
2279
|
+
const PositionTrackingPreprocessorMixin = __webpack_require__(4869);
|
|
2280
2280
|
|
|
2281
2281
|
class LocationInfoTokenizerMixin extends Mixin {
|
|
2282
2282
|
constructor(tokenizer) {
|
|
@@ -2422,13 +2422,13 @@ module.exports = LocationInfoTokenizerMixin;
|
|
|
2422
2422
|
|
|
2423
2423
|
/***/ }),
|
|
2424
2424
|
|
|
2425
|
-
/***/
|
|
2425
|
+
/***/ 4869:
|
|
2426
2426
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
2427
2427
|
|
|
2428
2428
|
"use strict";
|
|
2429
2429
|
|
|
2430
2430
|
|
|
2431
|
-
const Mixin = __webpack_require__(
|
|
2431
|
+
const Mixin = __webpack_require__(6945);
|
|
2432
2432
|
|
|
2433
2433
|
class PositionTrackingPreprocessorMixin extends Mixin {
|
|
2434
2434
|
constructor(preprocessor) {
|
|
@@ -2494,7 +2494,7 @@ module.exports = PositionTrackingPreprocessorMixin;
|
|
|
2494
2494
|
|
|
2495
2495
|
/***/ }),
|
|
2496
2496
|
|
|
2497
|
-
/***/
|
|
2497
|
+
/***/ 8920:
|
|
2498
2498
|
/***/ ((module) => {
|
|
2499
2499
|
|
|
2500
2500
|
"use strict";
|
|
@@ -2683,25 +2683,25 @@ module.exports = FormattingElementList;
|
|
|
2683
2683
|
|
|
2684
2684
|
/***/ }),
|
|
2685
2685
|
|
|
2686
|
-
/***/
|
|
2686
|
+
/***/ 8265:
|
|
2687
2687
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
2688
2688
|
|
|
2689
2689
|
"use strict";
|
|
2690
2690
|
|
|
2691
2691
|
|
|
2692
|
-
const Tokenizer = __webpack_require__(
|
|
2693
|
-
const OpenElementStack = __webpack_require__(
|
|
2694
|
-
const FormattingElementList = __webpack_require__(
|
|
2695
|
-
const LocationInfoParserMixin = __webpack_require__(
|
|
2696
|
-
const ErrorReportingParserMixin = __webpack_require__(
|
|
2697
|
-
const Mixin = __webpack_require__(
|
|
2698
|
-
const defaultTreeAdapter = __webpack_require__(
|
|
2699
|
-
const mergeOptions = __webpack_require__(
|
|
2700
|
-
const doctype = __webpack_require__(
|
|
2701
|
-
const foreignContent = __webpack_require__(
|
|
2702
|
-
const ERR = __webpack_require__(
|
|
2703
|
-
const unicode = __webpack_require__(
|
|
2704
|
-
const HTML = __webpack_require__(
|
|
2692
|
+
const Tokenizer = __webpack_require__(6504);
|
|
2693
|
+
const OpenElementStack = __webpack_require__(6219);
|
|
2694
|
+
const FormattingElementList = __webpack_require__(8920);
|
|
2695
|
+
const LocationInfoParserMixin = __webpack_require__(1479);
|
|
2696
|
+
const ErrorReportingParserMixin = __webpack_require__(2314);
|
|
2697
|
+
const Mixin = __webpack_require__(6945);
|
|
2698
|
+
const defaultTreeAdapter = __webpack_require__(6195);
|
|
2699
|
+
const mergeOptions = __webpack_require__(9508);
|
|
2700
|
+
const doctype = __webpack_require__(8293);
|
|
2701
|
+
const foreignContent = __webpack_require__(985);
|
|
2702
|
+
const ERR = __webpack_require__(3941);
|
|
2703
|
+
const unicode = __webpack_require__(3325);
|
|
2704
|
+
const HTML = __webpack_require__(3676);
|
|
2705
2705
|
|
|
2706
2706
|
//Aliases
|
|
2707
2707
|
const $ = HTML.TAG_NAMES;
|
|
@@ -5647,13 +5647,13 @@ function endTagInForeignContent(p, token) {
|
|
|
5647
5647
|
|
|
5648
5648
|
/***/ }),
|
|
5649
5649
|
|
|
5650
|
-
/***/
|
|
5650
|
+
/***/ 6219:
|
|
5651
5651
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
5652
5652
|
|
|
5653
5653
|
"use strict";
|
|
5654
5654
|
|
|
5655
5655
|
|
|
5656
|
-
const HTML = __webpack_require__(
|
|
5656
|
+
const HTML = __webpack_require__(3676);
|
|
5657
5657
|
|
|
5658
5658
|
//Aliases
|
|
5659
5659
|
const $ = HTML.TAG_NAMES;
|
|
@@ -6137,16 +6137,16 @@ module.exports = OpenElementStack;
|
|
|
6137
6137
|
|
|
6138
6138
|
/***/ }),
|
|
6139
6139
|
|
|
6140
|
-
/***/
|
|
6140
|
+
/***/ 6504:
|
|
6141
6141
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
6142
6142
|
|
|
6143
6143
|
"use strict";
|
|
6144
6144
|
|
|
6145
6145
|
|
|
6146
|
-
const Preprocessor = __webpack_require__(
|
|
6147
|
-
const unicode = __webpack_require__(
|
|
6148
|
-
const neTree = __webpack_require__(
|
|
6149
|
-
const ERR = __webpack_require__(
|
|
6146
|
+
const Preprocessor = __webpack_require__(2969);
|
|
6147
|
+
const unicode = __webpack_require__(3325);
|
|
6148
|
+
const neTree = __webpack_require__(1772);
|
|
6149
|
+
const ERR = __webpack_require__(3941);
|
|
6150
6150
|
|
|
6151
6151
|
//Aliases
|
|
6152
6152
|
const $ = unicode.CODE_POINTS;
|
|
@@ -8341,7 +8341,7 @@ module.exports = Tokenizer;
|
|
|
8341
8341
|
|
|
8342
8342
|
/***/ }),
|
|
8343
8343
|
|
|
8344
|
-
/***/
|
|
8344
|
+
/***/ 1772:
|
|
8345
8345
|
/***/ ((module) => {
|
|
8346
8346
|
|
|
8347
8347
|
"use strict";
|
|
@@ -8353,14 +8353,14 @@ module.exports = new Uint16Array([4,52,65,66,67,68,69,70,71,72,73,74,75,76,77,78
|
|
|
8353
8353
|
|
|
8354
8354
|
/***/ }),
|
|
8355
8355
|
|
|
8356
|
-
/***/
|
|
8356
|
+
/***/ 2969:
|
|
8357
8357
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
8358
8358
|
|
|
8359
8359
|
"use strict";
|
|
8360
8360
|
|
|
8361
8361
|
|
|
8362
|
-
const unicode = __webpack_require__(
|
|
8363
|
-
const ERR = __webpack_require__(
|
|
8362
|
+
const unicode = __webpack_require__(3325);
|
|
8363
|
+
const ERR = __webpack_require__(3941);
|
|
8364
8364
|
|
|
8365
8365
|
//Aliases
|
|
8366
8366
|
const $ = unicode.CODE_POINTS;
|
|
@@ -8520,13 +8520,13 @@ module.exports = Preprocessor;
|
|
|
8520
8520
|
|
|
8521
8521
|
/***/ }),
|
|
8522
8522
|
|
|
8523
|
-
/***/
|
|
8523
|
+
/***/ 6195:
|
|
8524
8524
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
8525
8525
|
|
|
8526
8526
|
"use strict";
|
|
8527
8527
|
|
|
8528
8528
|
|
|
8529
|
-
const { DOCUMENT_MODE } = __webpack_require__(
|
|
8529
|
+
const { DOCUMENT_MODE } = __webpack_require__(3676);
|
|
8530
8530
|
|
|
8531
8531
|
//Node construction
|
|
8532
8532
|
exports.createDocument = function() {
|
|
@@ -8749,7 +8749,7 @@ exports.updateNodeSourceCodeLocation = function(node, endLocation) {
|
|
|
8749
8749
|
|
|
8750
8750
|
/***/ }),
|
|
8751
8751
|
|
|
8752
|
-
/***/
|
|
8752
|
+
/***/ 9508:
|
|
8753
8753
|
/***/ ((module) => {
|
|
8754
8754
|
|
|
8755
8755
|
"use strict";
|
|
@@ -8770,7 +8770,7 @@ module.exports = function mergeOptions(defaults, options) {
|
|
|
8770
8770
|
|
|
8771
8771
|
/***/ }),
|
|
8772
8772
|
|
|
8773
|
-
/***/
|
|
8773
|
+
/***/ 6945:
|
|
8774
8774
|
/***/ ((module) => {
|
|
8775
8775
|
|
|
8776
8776
|
"use strict";
|
|
@@ -8817,7 +8817,7 @@ module.exports = Mixin;
|
|
|
8817
8817
|
|
|
8818
8818
|
/***/ }),
|
|
8819
8819
|
|
|
8820
|
-
/***/
|
|
8820
|
+
/***/ 3812:
|
|
8821
8821
|
/***/ ((module) => {
|
|
8822
8822
|
|
|
8823
8823
|
// http://www.w3.org/TR/CSS21/grammar.html
|
|
@@ -9085,7 +9085,7 @@ function trim(str) {
|
|
|
9085
9085
|
|
|
9086
9086
|
/***/ }),
|
|
9087
9087
|
|
|
9088
|
-
/***/
|
|
9088
|
+
/***/ 8809:
|
|
9089
9089
|
/***/ ((module) => {
|
|
9090
9090
|
|
|
9091
9091
|
/*!
|
|
@@ -9103,7 +9103,7 @@ module.exports = function isBuffer (obj) {
|
|
|
9103
9103
|
|
|
9104
9104
|
/***/ }),
|
|
9105
9105
|
|
|
9106
|
-
/***/
|
|
9106
|
+
/***/ 6324:
|
|
9107
9107
|
/***/ ((module, exports) => {
|
|
9108
9108
|
|
|
9109
9109
|
/**
|
|
@@ -9146,7 +9146,7 @@ module.exports = parsePart;
|
|
|
9146
9146
|
|
|
9147
9147
|
/***/ }),
|
|
9148
9148
|
|
|
9149
|
-
/***/
|
|
9149
|
+
/***/ 8772:
|
|
9150
9150
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
9151
9151
|
|
|
9152
9152
|
"use strict";
|
|
@@ -9159,7 +9159,7 @@ module.exports = parsePart;
|
|
|
9159
9159
|
|
|
9160
9160
|
|
|
9161
9161
|
|
|
9162
|
-
var ReactPropTypesSecret = __webpack_require__(
|
|
9162
|
+
var ReactPropTypesSecret = __webpack_require__(331);
|
|
9163
9163
|
|
|
9164
9164
|
function emptyFunction() {}
|
|
9165
9165
|
function emptyFunctionWithReset() {}
|
|
@@ -9219,7 +9219,7 @@ module.exports = function() {
|
|
|
9219
9219
|
|
|
9220
9220
|
/***/ }),
|
|
9221
9221
|
|
|
9222
|
-
/***/
|
|
9222
|
+
/***/ 3615:
|
|
9223
9223
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
9224
9224
|
|
|
9225
9225
|
/**
|
|
@@ -9232,13 +9232,13 @@ module.exports = function() {
|
|
|
9232
9232
|
if (false) { var throwOnDirectAccess, ReactIs; } else {
|
|
9233
9233
|
// By explicitly using `prop-types` you are opting into new production behavior.
|
|
9234
9234
|
// http://fb.me/prop-types-in-prod
|
|
9235
|
-
module.exports = __webpack_require__(
|
|
9235
|
+
module.exports = __webpack_require__(8772)();
|
|
9236
9236
|
}
|
|
9237
9237
|
|
|
9238
9238
|
|
|
9239
9239
|
/***/ }),
|
|
9240
9240
|
|
|
9241
|
-
/***/
|
|
9241
|
+
/***/ 331:
|
|
9242
9242
|
/***/ ((module) => {
|
|
9243
9243
|
|
|
9244
9244
|
"use strict";
|
|
@@ -9258,7 +9258,7 @@ module.exports = ReactPropTypesSecret;
|
|
|
9258
9258
|
|
|
9259
9259
|
/***/ }),
|
|
9260
9260
|
|
|
9261
|
-
/***/
|
|
9261
|
+
/***/ 8702:
|
|
9262
9262
|
/***/ ((__unused_webpack_module, exports) => {
|
|
9263
9263
|
|
|
9264
9264
|
"use strict";
|
|
@@ -9280,20 +9280,20 @@ exports.isValidElementType=function(a){return"string"===typeof a||"function"===t
|
|
|
9280
9280
|
|
|
9281
9281
|
/***/ }),
|
|
9282
9282
|
|
|
9283
|
-
/***/
|
|
9283
|
+
/***/ 9185:
|
|
9284
9284
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
9285
9285
|
|
|
9286
9286
|
"use strict";
|
|
9287
9287
|
|
|
9288
9288
|
|
|
9289
9289
|
if (true) {
|
|
9290
|
-
module.exports = __webpack_require__(
|
|
9290
|
+
module.exports = __webpack_require__(8702);
|
|
9291
9291
|
} else {}
|
|
9292
9292
|
|
|
9293
9293
|
|
|
9294
9294
|
/***/ }),
|
|
9295
9295
|
|
|
9296
|
-
/***/
|
|
9296
|
+
/***/ 1426:
|
|
9297
9297
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
9298
9298
|
|
|
9299
9299
|
"use strict";
|
|
@@ -9313,26 +9313,26 @@ function q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=""+g);void 0!==a.key&&
|
|
|
9313
9313
|
|
|
9314
9314
|
/***/ }),
|
|
9315
9315
|
|
|
9316
|
-
/***/
|
|
9316
|
+
/***/ 4246:
|
|
9317
9317
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
9318
9318
|
|
|
9319
9319
|
"use strict";
|
|
9320
9320
|
|
|
9321
9321
|
|
|
9322
9322
|
if (true) {
|
|
9323
|
-
module.exports = __webpack_require__(
|
|
9323
|
+
module.exports = __webpack_require__(1426);
|
|
9324
9324
|
} else {}
|
|
9325
9325
|
|
|
9326
9326
|
|
|
9327
9327
|
/***/ }),
|
|
9328
9328
|
|
|
9329
|
-
/***/
|
|
9329
|
+
/***/ 3811:
|
|
9330
9330
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
9331
9331
|
|
|
9332
9332
|
"use strict";
|
|
9333
9333
|
|
|
9334
9334
|
|
|
9335
|
-
const { DOCUMENT_MODE } = __webpack_require__(
|
|
9335
|
+
const { DOCUMENT_MODE } = __webpack_require__(9461);
|
|
9336
9336
|
|
|
9337
9337
|
//Const
|
|
9338
9338
|
const VALID_DOCTYPE_NAME = 'html';
|
|
@@ -9496,7 +9496,7 @@ exports.serializeContent = function(name, publicId, systemId) {
|
|
|
9496
9496
|
|
|
9497
9497
|
/***/ }),
|
|
9498
9498
|
|
|
9499
|
-
/***/
|
|
9499
|
+
/***/ 4156:
|
|
9500
9500
|
/***/ ((module) => {
|
|
9501
9501
|
|
|
9502
9502
|
"use strict";
|
|
@@ -9569,14 +9569,14 @@ module.exports = {
|
|
|
9569
9569
|
|
|
9570
9570
|
/***/ }),
|
|
9571
9571
|
|
|
9572
|
-
/***/
|
|
9572
|
+
/***/ 2598:
|
|
9573
9573
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
9574
9574
|
|
|
9575
9575
|
"use strict";
|
|
9576
9576
|
|
|
9577
9577
|
|
|
9578
|
-
const Tokenizer = __webpack_require__(
|
|
9579
|
-
const HTML = __webpack_require__(
|
|
9578
|
+
const Tokenizer = __webpack_require__(6696);
|
|
9579
|
+
const HTML = __webpack_require__(9461);
|
|
9580
9580
|
|
|
9581
9581
|
//Aliases
|
|
9582
9582
|
const $ = HTML.TAG_NAMES;
|
|
@@ -9842,7 +9842,7 @@ exports.isIntegrationPoint = function(tn, ns, attrs, foreignNS) {
|
|
|
9842
9842
|
|
|
9843
9843
|
/***/ }),
|
|
9844
9844
|
|
|
9845
|
-
/***/
|
|
9845
|
+
/***/ 9461:
|
|
9846
9846
|
/***/ ((__unused_webpack_module, exports) => {
|
|
9847
9847
|
|
|
9848
9848
|
"use strict";
|
|
@@ -10122,7 +10122,7 @@ exports.SPECIAL_ELEMENTS = {
|
|
|
10122
10122
|
|
|
10123
10123
|
/***/ }),
|
|
10124
10124
|
|
|
10125
|
-
/***/
|
|
10125
|
+
/***/ 3839:
|
|
10126
10126
|
/***/ ((__unused_webpack_module, exports) => {
|
|
10127
10127
|
|
|
10128
10128
|
"use strict";
|
|
@@ -10239,13 +10239,13 @@ exports.isUndefinedCodePoint = function(cp) {
|
|
|
10239
10239
|
|
|
10240
10240
|
/***/ }),
|
|
10241
10241
|
|
|
10242
|
-
/***/
|
|
10242
|
+
/***/ 6297:
|
|
10243
10243
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
10244
10244
|
|
|
10245
10245
|
"use strict";
|
|
10246
10246
|
|
|
10247
10247
|
|
|
10248
|
-
const Mixin = __webpack_require__(
|
|
10248
|
+
const Mixin = __webpack_require__(3363);
|
|
10249
10249
|
|
|
10250
10250
|
class ErrorReportingMixinBase extends Mixin {
|
|
10251
10251
|
constructor(host, opts) {
|
|
@@ -10290,16 +10290,16 @@ module.exports = ErrorReportingMixinBase;
|
|
|
10290
10290
|
|
|
10291
10291
|
/***/ }),
|
|
10292
10292
|
|
|
10293
|
-
/***/
|
|
10293
|
+
/***/ 8992:
|
|
10294
10294
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
10295
10295
|
|
|
10296
10296
|
"use strict";
|
|
10297
10297
|
|
|
10298
10298
|
|
|
10299
|
-
const ErrorReportingMixinBase = __webpack_require__(
|
|
10300
|
-
const ErrorReportingTokenizerMixin = __webpack_require__(
|
|
10301
|
-
const LocationInfoTokenizerMixin = __webpack_require__(
|
|
10302
|
-
const Mixin = __webpack_require__(
|
|
10299
|
+
const ErrorReportingMixinBase = __webpack_require__(6297);
|
|
10300
|
+
const ErrorReportingTokenizerMixin = __webpack_require__(4541);
|
|
10301
|
+
const LocationInfoTokenizerMixin = __webpack_require__(5701);
|
|
10302
|
+
const Mixin = __webpack_require__(3363);
|
|
10303
10303
|
|
|
10304
10304
|
class ErrorReportingParserMixin extends ErrorReportingMixinBase {
|
|
10305
10305
|
constructor(parser, opts) {
|
|
@@ -10350,15 +10350,15 @@ module.exports = ErrorReportingParserMixin;
|
|
|
10350
10350
|
|
|
10351
10351
|
/***/ }),
|
|
10352
10352
|
|
|
10353
|
-
/***/
|
|
10353
|
+
/***/ 9594:
|
|
10354
10354
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
10355
10355
|
|
|
10356
10356
|
"use strict";
|
|
10357
10357
|
|
|
10358
10358
|
|
|
10359
|
-
const ErrorReportingMixinBase = __webpack_require__(
|
|
10360
|
-
const PositionTrackingPreprocessorMixin = __webpack_require__(
|
|
10361
|
-
const Mixin = __webpack_require__(
|
|
10359
|
+
const ErrorReportingMixinBase = __webpack_require__(6297);
|
|
10360
|
+
const PositionTrackingPreprocessorMixin = __webpack_require__(6544);
|
|
10361
|
+
const Mixin = __webpack_require__(3363);
|
|
10362
10362
|
|
|
10363
10363
|
class ErrorReportingPreprocessorMixin extends ErrorReportingMixinBase {
|
|
10364
10364
|
constructor(preprocessor, opts) {
|
|
@@ -10382,15 +10382,15 @@ module.exports = ErrorReportingPreprocessorMixin;
|
|
|
10382
10382
|
|
|
10383
10383
|
/***/ }),
|
|
10384
10384
|
|
|
10385
|
-
/***/
|
|
10385
|
+
/***/ 4541:
|
|
10386
10386
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
10387
10387
|
|
|
10388
10388
|
"use strict";
|
|
10389
10389
|
|
|
10390
10390
|
|
|
10391
|
-
const ErrorReportingMixinBase = __webpack_require__(
|
|
10392
|
-
const ErrorReportingPreprocessorMixin = __webpack_require__(
|
|
10393
|
-
const Mixin = __webpack_require__(
|
|
10391
|
+
const ErrorReportingMixinBase = __webpack_require__(6297);
|
|
10392
|
+
const ErrorReportingPreprocessorMixin = __webpack_require__(9594);
|
|
10393
|
+
const Mixin = __webpack_require__(3363);
|
|
10394
10394
|
|
|
10395
10395
|
class ErrorReportingTokenizerMixin extends ErrorReportingMixinBase {
|
|
10396
10396
|
constructor(tokenizer, opts) {
|
|
@@ -10407,13 +10407,13 @@ module.exports = ErrorReportingTokenizerMixin;
|
|
|
10407
10407
|
|
|
10408
10408
|
/***/ }),
|
|
10409
10409
|
|
|
10410
|
-
/***/
|
|
10410
|
+
/***/ 5730:
|
|
10411
10411
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
10412
10412
|
|
|
10413
10413
|
"use strict";
|
|
10414
10414
|
|
|
10415
10415
|
|
|
10416
|
-
const Mixin = __webpack_require__(
|
|
10416
|
+
const Mixin = __webpack_require__(3363);
|
|
10417
10417
|
|
|
10418
10418
|
class LocationInfoOpenElementStackMixin extends Mixin {
|
|
10419
10419
|
constructor(stack, opts) {
|
|
@@ -10450,17 +10450,17 @@ module.exports = LocationInfoOpenElementStackMixin;
|
|
|
10450
10450
|
|
|
10451
10451
|
/***/ }),
|
|
10452
10452
|
|
|
10453
|
-
/***/
|
|
10453
|
+
/***/ 133:
|
|
10454
10454
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
10455
10455
|
|
|
10456
10456
|
"use strict";
|
|
10457
10457
|
|
|
10458
10458
|
|
|
10459
|
-
const Mixin = __webpack_require__(
|
|
10460
|
-
const Tokenizer = __webpack_require__(
|
|
10461
|
-
const LocationInfoTokenizerMixin = __webpack_require__(
|
|
10462
|
-
const LocationInfoOpenElementStackMixin = __webpack_require__(
|
|
10463
|
-
const HTML = __webpack_require__(
|
|
10459
|
+
const Mixin = __webpack_require__(3363);
|
|
10460
|
+
const Tokenizer = __webpack_require__(6696);
|
|
10461
|
+
const LocationInfoTokenizerMixin = __webpack_require__(5701);
|
|
10462
|
+
const LocationInfoOpenElementStackMixin = __webpack_require__(5730);
|
|
10463
|
+
const HTML = __webpack_require__(9461);
|
|
10464
10464
|
|
|
10465
10465
|
//Aliases
|
|
10466
10466
|
const $ = HTML.TAG_NAMES;
|
|
@@ -10681,15 +10681,15 @@ module.exports = LocationInfoParserMixin;
|
|
|
10681
10681
|
|
|
10682
10682
|
/***/ }),
|
|
10683
10683
|
|
|
10684
|
-
/***/
|
|
10684
|
+
/***/ 5701:
|
|
10685
10685
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
10686
10686
|
|
|
10687
10687
|
"use strict";
|
|
10688
10688
|
|
|
10689
10689
|
|
|
10690
|
-
const Mixin = __webpack_require__(
|
|
10691
|
-
const Tokenizer = __webpack_require__(
|
|
10692
|
-
const PositionTrackingPreprocessorMixin = __webpack_require__(
|
|
10690
|
+
const Mixin = __webpack_require__(3363);
|
|
10691
|
+
const Tokenizer = __webpack_require__(6696);
|
|
10692
|
+
const PositionTrackingPreprocessorMixin = __webpack_require__(6544);
|
|
10693
10693
|
|
|
10694
10694
|
class LocationInfoTokenizerMixin extends Mixin {
|
|
10695
10695
|
constructor(tokenizer) {
|
|
@@ -10835,13 +10835,13 @@ module.exports = LocationInfoTokenizerMixin;
|
|
|
10835
10835
|
|
|
10836
10836
|
/***/ }),
|
|
10837
10837
|
|
|
10838
|
-
/***/
|
|
10838
|
+
/***/ 6544:
|
|
10839
10839
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
10840
10840
|
|
|
10841
10841
|
"use strict";
|
|
10842
10842
|
|
|
10843
10843
|
|
|
10844
|
-
const Mixin = __webpack_require__(
|
|
10844
|
+
const Mixin = __webpack_require__(3363);
|
|
10845
10845
|
|
|
10846
10846
|
class PositionTrackingPreprocessorMixin extends Mixin {
|
|
10847
10847
|
constructor(preprocessor) {
|
|
@@ -10907,7 +10907,7 @@ module.exports = PositionTrackingPreprocessorMixin;
|
|
|
10907
10907
|
|
|
10908
10908
|
/***/ }),
|
|
10909
10909
|
|
|
10910
|
-
/***/
|
|
10910
|
+
/***/ 4093:
|
|
10911
10911
|
/***/ ((module) => {
|
|
10912
10912
|
|
|
10913
10913
|
"use strict";
|
|
@@ -11096,25 +11096,25 @@ module.exports = FormattingElementList;
|
|
|
11096
11096
|
|
|
11097
11097
|
/***/ }),
|
|
11098
11098
|
|
|
11099
|
-
/***/
|
|
11099
|
+
/***/ 5154:
|
|
11100
11100
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
11101
11101
|
|
|
11102
11102
|
"use strict";
|
|
11103
11103
|
|
|
11104
11104
|
|
|
11105
|
-
const Tokenizer = __webpack_require__(
|
|
11106
|
-
const OpenElementStack = __webpack_require__(
|
|
11107
|
-
const FormattingElementList = __webpack_require__(
|
|
11108
|
-
const LocationInfoParserMixin = __webpack_require__(
|
|
11109
|
-
const ErrorReportingParserMixin = __webpack_require__(
|
|
11110
|
-
const Mixin = __webpack_require__(
|
|
11111
|
-
const defaultTreeAdapter = __webpack_require__(
|
|
11112
|
-
const mergeOptions = __webpack_require__(
|
|
11113
|
-
const doctype = __webpack_require__(
|
|
11114
|
-
const foreignContent = __webpack_require__(
|
|
11115
|
-
const ERR = __webpack_require__(
|
|
11116
|
-
const unicode = __webpack_require__(
|
|
11117
|
-
const HTML = __webpack_require__(
|
|
11105
|
+
const Tokenizer = __webpack_require__(6696);
|
|
11106
|
+
const OpenElementStack = __webpack_require__(3579);
|
|
11107
|
+
const FormattingElementList = __webpack_require__(4093);
|
|
11108
|
+
const LocationInfoParserMixin = __webpack_require__(133);
|
|
11109
|
+
const ErrorReportingParserMixin = __webpack_require__(8992);
|
|
11110
|
+
const Mixin = __webpack_require__(3363);
|
|
11111
|
+
const defaultTreeAdapter = __webpack_require__(9821);
|
|
11112
|
+
const mergeOptions = __webpack_require__(9745);
|
|
11113
|
+
const doctype = __webpack_require__(3811);
|
|
11114
|
+
const foreignContent = __webpack_require__(2598);
|
|
11115
|
+
const ERR = __webpack_require__(4156);
|
|
11116
|
+
const unicode = __webpack_require__(3839);
|
|
11117
|
+
const HTML = __webpack_require__(9461);
|
|
11118
11118
|
|
|
11119
11119
|
//Aliases
|
|
11120
11120
|
const $ = HTML.TAG_NAMES;
|
|
@@ -14060,13 +14060,13 @@ function endTagInForeignContent(p, token) {
|
|
|
14060
14060
|
|
|
14061
14061
|
/***/ }),
|
|
14062
14062
|
|
|
14063
|
-
/***/
|
|
14063
|
+
/***/ 3579:
|
|
14064
14064
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
14065
14065
|
|
|
14066
14066
|
"use strict";
|
|
14067
14067
|
|
|
14068
14068
|
|
|
14069
|
-
const HTML = __webpack_require__(
|
|
14069
|
+
const HTML = __webpack_require__(9461);
|
|
14070
14070
|
|
|
14071
14071
|
//Aliases
|
|
14072
14072
|
const $ = HTML.TAG_NAMES;
|
|
@@ -14550,16 +14550,16 @@ module.exports = OpenElementStack;
|
|
|
14550
14550
|
|
|
14551
14551
|
/***/ }),
|
|
14552
14552
|
|
|
14553
|
-
/***/
|
|
14553
|
+
/***/ 6696:
|
|
14554
14554
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
14555
14555
|
|
|
14556
14556
|
"use strict";
|
|
14557
14557
|
|
|
14558
14558
|
|
|
14559
|
-
const Preprocessor = __webpack_require__(
|
|
14560
|
-
const unicode = __webpack_require__(
|
|
14561
|
-
const neTree = __webpack_require__(
|
|
14562
|
-
const ERR = __webpack_require__(
|
|
14559
|
+
const Preprocessor = __webpack_require__(9088);
|
|
14560
|
+
const unicode = __webpack_require__(3839);
|
|
14561
|
+
const neTree = __webpack_require__(6462);
|
|
14562
|
+
const ERR = __webpack_require__(4156);
|
|
14563
14563
|
|
|
14564
14564
|
//Aliases
|
|
14565
14565
|
const $ = unicode.CODE_POINTS;
|
|
@@ -16754,7 +16754,7 @@ module.exports = Tokenizer;
|
|
|
16754
16754
|
|
|
16755
16755
|
/***/ }),
|
|
16756
16756
|
|
|
16757
|
-
/***/
|
|
16757
|
+
/***/ 6462:
|
|
16758
16758
|
/***/ ((module) => {
|
|
16759
16759
|
|
|
16760
16760
|
"use strict";
|
|
@@ -16766,14 +16766,14 @@ module.exports = new Uint16Array([4,52,65,66,67,68,69,70,71,72,73,74,75,76,77,78
|
|
|
16766
16766
|
|
|
16767
16767
|
/***/ }),
|
|
16768
16768
|
|
|
16769
|
-
/***/
|
|
16769
|
+
/***/ 9088:
|
|
16770
16770
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
16771
16771
|
|
|
16772
16772
|
"use strict";
|
|
16773
16773
|
|
|
16774
16774
|
|
|
16775
|
-
const unicode = __webpack_require__(
|
|
16776
|
-
const ERR = __webpack_require__(
|
|
16775
|
+
const unicode = __webpack_require__(3839);
|
|
16776
|
+
const ERR = __webpack_require__(4156);
|
|
16777
16777
|
|
|
16778
16778
|
//Aliases
|
|
16779
16779
|
const $ = unicode.CODE_POINTS;
|
|
@@ -16933,13 +16933,13 @@ module.exports = Preprocessor;
|
|
|
16933
16933
|
|
|
16934
16934
|
/***/ }),
|
|
16935
16935
|
|
|
16936
|
-
/***/
|
|
16936
|
+
/***/ 9821:
|
|
16937
16937
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
16938
16938
|
|
|
16939
16939
|
"use strict";
|
|
16940
16940
|
|
|
16941
16941
|
|
|
16942
|
-
const { DOCUMENT_MODE } = __webpack_require__(
|
|
16942
|
+
const { DOCUMENT_MODE } = __webpack_require__(9461);
|
|
16943
16943
|
|
|
16944
16944
|
//Node construction
|
|
16945
16945
|
exports.createDocument = function() {
|
|
@@ -17162,7 +17162,7 @@ exports.updateNodeSourceCodeLocation = function(node, endLocation) {
|
|
|
17162
17162
|
|
|
17163
17163
|
/***/ }),
|
|
17164
17164
|
|
|
17165
|
-
/***/
|
|
17165
|
+
/***/ 9745:
|
|
17166
17166
|
/***/ ((module) => {
|
|
17167
17167
|
|
|
17168
17168
|
"use strict";
|
|
@@ -17183,7 +17183,7 @@ module.exports = function mergeOptions(defaults, options) {
|
|
|
17183
17183
|
|
|
17184
17184
|
/***/ }),
|
|
17185
17185
|
|
|
17186
|
-
/***/
|
|
17186
|
+
/***/ 3363:
|
|
17187
17187
|
/***/ ((module) => {
|
|
17188
17188
|
|
|
17189
17189
|
"use strict";
|
|
@@ -17230,10 +17230,10 @@ module.exports = Mixin;
|
|
|
17230
17230
|
|
|
17231
17231
|
/***/ }),
|
|
17232
17232
|
|
|
17233
|
-
/***/
|
|
17233
|
+
/***/ 5862:
|
|
17234
17234
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
17235
17235
|
|
|
17236
|
-
var parse = __webpack_require__(
|
|
17236
|
+
var parse = __webpack_require__(3812);
|
|
17237
17237
|
|
|
17238
17238
|
/**
|
|
17239
17239
|
* Parses inline style to object.
|
|
@@ -17380,6 +17380,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
17380
17380
|
comment: () => (/* reexport */ commands_comment_comment),
|
|
17381
17381
|
"default": () => (/* binding */ src_0),
|
|
17382
17382
|
divider: () => (/* reexport */ divider),
|
|
17383
|
+
executeCommand: () => (/* reexport */ executeCommand),
|
|
17383
17384
|
fullscreen: () => (/* reexport */ fullscreen),
|
|
17384
17385
|
getBreaksNeededForEmptyLineAfter: () => (/* reexport */ getBreaksNeededForEmptyLineAfter),
|
|
17385
17386
|
getBreaksNeededForEmptyLineBefore: () => (/* reexport */ getBreaksNeededForEmptyLineBefore),
|
|
@@ -17388,17 +17389,21 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
17388
17389
|
getStateFromTextArea: () => (/* reexport */ getStateFromTextArea),
|
|
17389
17390
|
getSurroundingWord: () => (/* reexport */ getSurroundingWord),
|
|
17390
17391
|
group: () => (/* reexport */ group),
|
|
17392
|
+
help: () => (/* reexport */ help),
|
|
17391
17393
|
hr: () => (/* reexport */ hr),
|
|
17392
17394
|
image: () => (/* reexport */ commands_image_image),
|
|
17393
|
-
|
|
17395
|
+
insertBeforeEachLine: () => (/* reexport */ insertBeforeEachLine),
|
|
17394
17396
|
insertTextAtPosition: () => (/* reexport */ insertTextAtPosition),
|
|
17397
|
+
issue: () => (/* reexport */ issue),
|
|
17395
17398
|
italic: () => (/* reexport */ italic),
|
|
17396
17399
|
link: () => (/* reexport */ commands_link_link),
|
|
17397
17400
|
orderedListCommand: () => (/* reexport */ orderedListCommand),
|
|
17398
17401
|
quote: () => (/* reexport */ quote),
|
|
17399
17402
|
reducer: () => (/* reexport */ reducer),
|
|
17403
|
+
selectLine: () => (/* reexport */ selectLine),
|
|
17400
17404
|
selectWord: () => (/* reexport */ selectWord),
|
|
17401
17405
|
strikethrough: () => (/* reexport */ strikeThrough_strikethrough),
|
|
17406
|
+
table: () => (/* reexport */ table_table),
|
|
17402
17407
|
title: () => (/* reexport */ title),
|
|
17403
17408
|
title1: () => (/* reexport */ title1),
|
|
17404
17409
|
title2: () => (/* reexport */ title2),
|
|
@@ -17441,9 +17446,12 @@ __webpack_require__.d(types_namespaceObject, {
|
|
|
17441
17446
|
var markdownUtils_namespaceObject = {};
|
|
17442
17447
|
__webpack_require__.r(markdownUtils_namespaceObject);
|
|
17443
17448
|
__webpack_require__.d(markdownUtils_namespaceObject, {
|
|
17449
|
+
executeCommand: () => (executeCommand),
|
|
17444
17450
|
getBreaksNeededForEmptyLineAfter: () => (getBreaksNeededForEmptyLineAfter),
|
|
17445
17451
|
getBreaksNeededForEmptyLineBefore: () => (getBreaksNeededForEmptyLineBefore),
|
|
17446
17452
|
getSurroundingWord: () => (getSurroundingWord),
|
|
17453
|
+
insertBeforeEachLine: () => (insertBeforeEachLine),
|
|
17454
|
+
selectLine: () => (selectLine),
|
|
17447
17455
|
selectWord: () => (selectWord)
|
|
17448
17456
|
});
|
|
17449
17457
|
|
|
@@ -17467,13 +17475,16 @@ __webpack_require__.d(commands_namespaceObject, {
|
|
|
17467
17475
|
getExtraCommands: () => (getExtraCommands),
|
|
17468
17476
|
getStateFromTextArea: () => (getStateFromTextArea),
|
|
17469
17477
|
group: () => (group),
|
|
17478
|
+
help: () => (help),
|
|
17470
17479
|
hr: () => (hr),
|
|
17471
17480
|
image: () => (commands_image_image),
|
|
17481
|
+
issue: () => (issue),
|
|
17472
17482
|
italic: () => (italic),
|
|
17473
17483
|
link: () => (commands_link_link),
|
|
17474
17484
|
orderedListCommand: () => (orderedListCommand),
|
|
17475
17485
|
quote: () => (quote),
|
|
17476
17486
|
strikethrough: () => (strikeThrough_strikethrough),
|
|
17487
|
+
table: () => (table_table),
|
|
17477
17488
|
title: () => (title),
|
|
17478
17489
|
title1: () => (title1),
|
|
17479
17490
|
title2: () => (title2),
|
|
@@ -17661,7 +17672,7 @@ function _extends() {
|
|
|
17661
17672
|
return _extends.apply(this, arguments);
|
|
17662
17673
|
}
|
|
17663
17674
|
// EXTERNAL MODULE: ../node_modules/is-buffer/index.js
|
|
17664
|
-
var is_buffer = __webpack_require__(
|
|
17675
|
+
var is_buffer = __webpack_require__(8809);
|
|
17665
17676
|
;// CONCATENATED MODULE: ../node_modules/unist-util-stringify-position/lib/index.js
|
|
17666
17677
|
/**
|
|
17667
17678
|
* @typedef {import('unist').Node} Node
|
|
@@ -19065,7 +19076,7 @@ function bail(error) {
|
|
|
19065
19076
|
}
|
|
19066
19077
|
|
|
19067
19078
|
// EXTERNAL MODULE: ../node_modules/extend/index.js
|
|
19068
|
-
var extend = __webpack_require__(
|
|
19079
|
+
var extend = __webpack_require__(229);
|
|
19069
19080
|
;// CONCATENATED MODULE: ../node_modules/unified/node_modules/is-plain-obj/index.js
|
|
19070
19081
|
function isPlainObject(value) {
|
|
19071
19082
|
if (typeof value !== 'object' || value === null) {
|
|
@@ -33360,7 +33371,7 @@ function mutate(options) {
|
|
|
33360
33371
|
}
|
|
33361
33372
|
|
|
33362
33373
|
// EXTERNAL MODULE: ../node_modules/prop-types/index.js
|
|
33363
|
-
var prop_types = __webpack_require__(
|
|
33374
|
+
var prop_types = __webpack_require__(3615);
|
|
33364
33375
|
;// CONCATENATED MODULE: ../node_modules/property-information/lib/util/schema.js
|
|
33365
33376
|
/**
|
|
33366
33377
|
* @typedef {import('./info.js').Info} Info
|
|
@@ -34664,7 +34675,7 @@ function rehypeFilter(options) {
|
|
|
34664
34675
|
}
|
|
34665
34676
|
|
|
34666
34677
|
// EXTERNAL MODULE: ../node_modules/react-is/index.js
|
|
34667
|
-
var react_is = __webpack_require__(
|
|
34678
|
+
var react_is = __webpack_require__(9185);
|
|
34668
34679
|
;// CONCATENATED MODULE: ../node_modules/hast-util-whitespace/index.js
|
|
34669
34680
|
/**
|
|
34670
34681
|
* Check if the given value is *inter-element whitespace*.
|
|
@@ -34895,7 +34906,7 @@ function comma_separated_tokens_stringify(values, options) {
|
|
|
34895
34906
|
}
|
|
34896
34907
|
|
|
34897
34908
|
// EXTERNAL MODULE: ../node_modules/style-to-object/index.js
|
|
34898
|
-
var style_to_object = __webpack_require__(
|
|
34909
|
+
var style_to_object = __webpack_require__(5862);
|
|
34899
34910
|
;// CONCATENATED MODULE: ../node_modules/style-to-object/index.mjs
|
|
34900
34911
|
|
|
34901
34912
|
|
|
@@ -41265,7 +41276,7 @@ function remarkGfm(options = {}) {
|
|
|
41265
41276
|
}
|
|
41266
41277
|
|
|
41267
41278
|
// EXTERNAL MODULE: ../node_modules/hast-util-raw/node_modules/parse5/lib/parser/index.js
|
|
41268
|
-
var lib_parser = __webpack_require__(
|
|
41279
|
+
var lib_parser = __webpack_require__(8265);
|
|
41269
41280
|
;// CONCATENATED MODULE: ../node_modules/hast-util-parse-selector/lib/index.js
|
|
41270
41281
|
/**
|
|
41271
41282
|
* @typedef {import('hast').Properties} Properties
|
|
@@ -44110,7 +44121,7 @@ const propertiesHandle = (defaultAttrs, attrs, type) => {
|
|
|
44110
44121
|
}
|
|
44111
44122
|
return { ...defaultAttrs, 'data-config': { ...attrs, rehyp: true } };
|
|
44112
44123
|
};
|
|
44113
|
-
|
|
44124
|
+
//# sourceMappingURL=utils.js.map
|
|
44114
44125
|
;// CONCATENATED MODULE: ../node_modules/rehype-attr/lib/index.js
|
|
44115
44126
|
|
|
44116
44127
|
|
|
@@ -44144,7 +44155,7 @@ const rehypeAttrs = (options = {}) => {
|
|
|
44144
44155
|
};
|
|
44145
44156
|
};
|
|
44146
44157
|
/* harmony default export */ const rehype_attr_lib = (rehypeAttrs);
|
|
44147
|
-
|
|
44158
|
+
//# sourceMappingURL=index.js.map
|
|
44148
44159
|
;// CONCATENATED MODULE: ../node_modules/rehype-ignore/lib/index.js
|
|
44149
44160
|
|
|
44150
44161
|
const rehypeIgnore = (options = {}) => {
|
|
@@ -44178,7 +44189,7 @@ const rehypeIgnore = (options = {}) => {
|
|
|
44178
44189
|
};
|
|
44179
44190
|
};
|
|
44180
44191
|
/* harmony default export */ const rehype_ignore_lib = (rehypeIgnore);
|
|
44181
|
-
|
|
44192
|
+
//# sourceMappingURL=index.js.map
|
|
44182
44193
|
;// CONCATENATED MODULE: ../node_modules/unist-util-filter/lib/index.js
|
|
44183
44194
|
/**
|
|
44184
44195
|
* @typedef {import('unist').Node} Node
|
|
@@ -44296,7 +44307,7 @@ const filter =
|
|
|
44296
44307
|
)
|
|
44297
44308
|
|
|
44298
44309
|
// EXTERNAL MODULE: ../node_modules/parse-numeric-range/index.js
|
|
44299
|
-
var parse_numeric_range = __webpack_require__(
|
|
44310
|
+
var parse_numeric_range = __webpack_require__(6324);
|
|
44300
44311
|
;// CONCATENATED MODULE: ../node_modules/refractor/lang/clike.js
|
|
44301
44312
|
// @ts-nocheck
|
|
44302
44313
|
clike.displayName = 'clike'
|
|
@@ -72008,7 +72019,7 @@ function esm_parse_parse(formula) {
|
|
|
72008
72019
|
}
|
|
72009
72020
|
//# sourceMappingURL=parse.js.map
|
|
72010
72021
|
// EXTERNAL MODULE: ../node_modules/boolbase/index.js
|
|
72011
|
-
var boolbase = __webpack_require__(
|
|
72022
|
+
var boolbase = __webpack_require__(9377);
|
|
72012
72023
|
;// CONCATENATED MODULE: ../node_modules/nth-check/lib/esm/compile.js
|
|
72013
72024
|
|
|
72014
72025
|
/**
|
|
@@ -73165,7 +73176,7 @@ function count(counts, node) {
|
|
|
73165
73176
|
}
|
|
73166
73177
|
|
|
73167
73178
|
// EXTERNAL MODULE: ../node_modules/css-selector-parser/lib/index.js
|
|
73168
|
-
var css_selector_parser_lib = __webpack_require__(
|
|
73179
|
+
var css_selector_parser_lib = __webpack_require__(301);
|
|
73169
73180
|
;// CONCATENATED MODULE: ../node_modules/hast-util-select/lib/parse.js
|
|
73170
73181
|
/**
|
|
73171
73182
|
* @typedef {import('./types.js').Selectors} Selectors
|
|
@@ -73338,7 +73349,7 @@ const remarkRewrite = (options) => {
|
|
|
73338
73349
|
};
|
|
73339
73350
|
};
|
|
73340
73351
|
/* harmony default export */ const rehype_rewrite_lib = (remarkRewrite);
|
|
73341
|
-
|
|
73352
|
+
//# sourceMappingURL=index.js.map
|
|
73342
73353
|
;// CONCATENATED MODULE: ../node_modules/@uiw/react-markdown-preview/esm/nodes/octiconLink.js
|
|
73343
73354
|
var octiconLink = {
|
|
73344
73355
|
type: 'element',
|
|
@@ -73425,7 +73436,7 @@ function copyElement(str) {
|
|
|
73425
73436
|
};
|
|
73426
73437
|
}
|
|
73427
73438
|
// EXTERNAL MODULE: ../node_modules/@uiw/copy-to-clipboard/dist/copy-to-clipboard.umd.js
|
|
73428
|
-
var copy_to_clipboard_umd = __webpack_require__(
|
|
73439
|
+
var copy_to_clipboard_umd = __webpack_require__(5028);
|
|
73429
73440
|
var copy_to_clipboard_umd_default = /*#__PURE__*/__webpack_require__.n(copy_to_clipboard_umd);
|
|
73430
73441
|
;// CONCATENATED MODULE: ../node_modules/@uiw/react-markdown-preview/esm/plugins/useCopied.js
|
|
73431
73442
|
|
|
@@ -73484,7 +73495,7 @@ var reservedMeta = function reservedMeta(options) {
|
|
|
73484
73495
|
};
|
|
73485
73496
|
};
|
|
73486
73497
|
// EXTERNAL MODULE: ../node_modules/react/jsx-runtime.js
|
|
73487
|
-
var jsx_runtime = __webpack_require__(
|
|
73498
|
+
var jsx_runtime = __webpack_require__(4246);
|
|
73488
73499
|
;// CONCATENATED MODULE: ../node_modules/@uiw/react-markdown-preview/esm/index.js
|
|
73489
73500
|
|
|
73490
73501
|
|
|
@@ -73594,7 +73605,7 @@ function _taggedTemplateLiteral(strings, raw) {
|
|
|
73594
73605
|
}));
|
|
73595
73606
|
}
|
|
73596
73607
|
// EXTERNAL MODULE: ../node_modules/rehype-parse/node_modules/parse5/lib/parser/index.js
|
|
73597
|
-
var parse5_lib_parser = __webpack_require__(
|
|
73608
|
+
var parse5_lib_parser = __webpack_require__(5154);
|
|
73598
73609
|
;// CONCATENATED MODULE: ../node_modules/rehype-parse/lib/errors.js
|
|
73599
73610
|
const errors = {
|
|
73600
73611
|
abandonedHeadElementChild: {
|
|
@@ -75878,11 +75889,6 @@ function _createClass(Constructor, protoProps, staticProps) {
|
|
|
75878
75889
|
* @param {HTMLElement} input
|
|
75879
75890
|
* @return {boolean}
|
|
75880
75891
|
*/function canManipulateViaTextNodes(input){if(input.nodeName!=='TEXTAREA'){return false;}if(typeof browserSupportsTextareaTextNodes==='undefined'){var textarea=document.createElement('textarea');textarea.value='1';browserSupportsTextareaTextNodes=!!textarea.firstChild;}return browserSupportsTextareaTextNodes;}/**
|
|
75881
|
-
* @param {string} val
|
|
75882
|
-
* @param {number} cursorIdx
|
|
75883
|
-
* @param {HTMLTextAreaElement|HTMLInputElement} input
|
|
75884
|
-
* @return {void}
|
|
75885
|
-
*/var insertAtLineStart=function insertAtLineStart(val,cursorIdx,input){var content=input.value;var startIdx=0;while(cursorIdx--){var _char=content[cursorIdx];if(_char==='\n'){startIdx=cursorIdx+1;break;}}input.focus();input.setRangeText(val,startIdx,startIdx);input.dispatchEvent(new Event('input',{bubbles:true}));};/**
|
|
75886
75892
|
* @param {HTMLTextAreaElement|HTMLInputElement} input
|
|
75887
75893
|
* @param {string} text
|
|
75888
75894
|
* @returns {void}
|
|
@@ -75890,7 +75896,7 @@ function _createClass(Constructor, protoProps, staticProps) {
|
|
|
75890
75896
|
input.focus();// IE 8-10
|
|
75891
75897
|
if(document.selection){var ieRange=document.selection.createRange();ieRange.text=text;// Move cursor after the inserted text
|
|
75892
75898
|
ieRange.collapse(false/* to the end */);ieRange.select();return;}// Webkit + Edge
|
|
75893
|
-
var isSuccess=document.execCommand&&document.execCommand('insertText',false,text);if(!isSuccess){var start=input.selectionStart;var end=input.selectionEnd;// Firefox (non-standard method)
|
|
75899
|
+
var isSuccess=false;if(text!==''){isSuccess=document.execCommand&&document.execCommand('insertText',false,text);}else{isSuccess=document.execCommand&&document.execCommand('delete',false);}if(!isSuccess){var start=input.selectionStart;var end=input.selectionEnd;// Firefox (non-standard method)
|
|
75894
75900
|
if(typeof input.setRangeText==='function'){input.setRangeText(text);}else{// To make a change we just need a Range, not a Selection
|
|
75895
75901
|
var range=document.createRange();var textNode=document.createTextNode(text);if(canManipulateViaTextNodes(input)){var node=input.firstChild;// If textarea is empty, just insert the text
|
|
75896
75902
|
if(!node){input.appendChild(textNode);}else{// Otherwise we need to find a nodes for start and end
|
|
@@ -75908,8 +75914,7 @@ var value=input.value;input.value=value.slice(0,start)+text+value.slice(end);}}/
|
|
|
75908
75914
|
input.setSelectionRange(start+text.length,start+text.length);// Notify any possible listeners of the change
|
|
75909
75915
|
var e=document.createEvent('UIEvent');e.initEvent('input',true,false);input.dispatchEvent(e);}}
|
|
75910
75916
|
;// CONCATENATED MODULE: ./src/utils/markdownUtils.ts
|
|
75911
|
-
function selectWord(_ref){var text=_ref.text,selection=_ref.selection;if(text&&text.length&&selection.start===selection.end){
|
|
75912
|
-
return getSurroundingWord(text,selection.start);}return selection;}/**
|
|
75917
|
+
function selectWord(_ref){var text=_ref.text,selection=_ref.selection,prefix=_ref.prefix,_ref$suffix=_ref.suffix,suffix=_ref$suffix===void 0?prefix:_ref$suffix;var result=selection;if(text&&text.length&&selection.start===selection.end){result=getSurroundingWord(text,selection.start);}if(result.start>=prefix.length&&result.end<=text.length-suffix.length){var selectedTextContext=text.slice(result.start-prefix.length,result.end+suffix.length);if(selectedTextContext.startsWith(prefix)&&selectedTextContext.endsWith(suffix)){return{start:result.start-prefix.length,end:result.end+suffix.length};}}return result;}function selectLine(_ref2){var text=_ref2.text,selection=_ref2.selection;var start=text.slice(0,selection.start).lastIndexOf('\n')+1;var end=text.slice(selection.end).indexOf('\n')+selection.end;if(end===selection.end-1){end=text.length;}return{start:start,end:end};}/**
|
|
75913
75918
|
* Gets the number of line-breaks that would have to be inserted before the given 'startPosition'
|
|
75914
75919
|
* to make sure there's an empty line between 'startPosition' and the previous text
|
|
75915
75920
|
*/function getBreaksNeededForEmptyLineBefore(){var text=arguments.length>0&&arguments[0]!==undefined?arguments[0]:'';var startPosition=arguments.length>1?arguments[1]:undefined;if(startPosition===0)return 0;// rules:
|
|
@@ -75929,23 +75934,18 @@ var neededBreaks=2;var isInLastLine=true;for(var i=startPosition;i<text.length&&
|
|
|
75929
75934
|
var start=0;// rightIndex is initialized to text.length because if selection is equal to text.length it won't even enter the interation
|
|
75930
75935
|
var end=text.length;// iterate to the left
|
|
75931
75936
|
for(var i=position;i-1>-1;i--){if(isWordDelimiter(text[i-1])){start=i;break;}}// iterate to the right
|
|
75932
|
-
for(var _i=position;_i<text.length;_i++){if(isWordDelimiter(text[_i])){end=_i;break;}}return{start:start,end:end};}
|
|
75937
|
+
for(var _i=position;_i<text.length;_i++){if(isWordDelimiter(text[_i])){end=_i;break;}}return{start:start,end:end};}function executeCommand(_ref3){var api=_ref3.api,selectedText=_ref3.selectedText,selection=_ref3.selection,prefix=_ref3.prefix,_ref3$suffix=_ref3.suffix,suffix=_ref3$suffix===void 0?prefix:_ref3$suffix;if(selectedText.length>=prefix.length+suffix.length&&selectedText.startsWith(prefix)&&selectedText.endsWith(suffix)){api.replaceSelection(selectedText.slice(prefix.length,suffix.length?-suffix.length:undefined));api.setSelectionRange({start:selection.start-prefix.length,end:selection.end-prefix.length});}else{api.replaceSelection("".concat(prefix).concat(selectedText).concat(suffix));api.setSelectionRange({start:selection.start+prefix.length,end:selection.end+prefix.length});}}/**
|
|
75938
|
+
* Inserts insertionString before each line
|
|
75939
|
+
*/function insertBeforeEachLine(selectedText,insertBefore){var lines=selectedText.split(/\n/);var insertionLength=0;var modifiedText=lines.map(function(item,index){if(typeof insertBefore==='string'){if(item.startsWith(insertBefore)){insertionLength-=insertBefore.length;return item.slice(insertBefore.length);}insertionLength+=insertBefore.length;return insertBefore+item;}if(typeof insertBefore==='function'){if(item.startsWith(insertBefore(item,index))){insertionLength-=insertBefore(item,index).length;return item.slice(insertBefore(item,index).length);}var insertionResult=insertBefore(item,index);insertionLength+=insertionResult.length;return insertBefore(item,index)+item;}throw Error('insertion is expected to be either a string or a function');}).join('\n');return{modifiedText:modifiedText,insertionLength:insertionLength};}
|
|
75933
75940
|
;// CONCATENATED MODULE: ./src/commands/bold.tsx
|
|
75934
|
-
var bold={name:'bold',keyCommand:'bold',shortcuts:'ctrlcmd+b',
|
|
75935
|
-
var newSelectionRange=selectWord({text:state.text,selection:state.selection});var state1=api.setSelectionRange(newSelectionRange);// Replaces the current selection with the bold mark up
|
|
75936
|
-
var val=state.command.value||'';api.replaceSelection(val.replace(/({{text}})/gi,state1.selectedText));var start=state1.selection.start+val.indexOf('{{text}}');var end=state1.selection.start+val.indexOf('{{text}}')+(state1.selection.end-state1.selection.start);// Adjust the selection to not contain the **
|
|
75937
|
-
api.setSelectionRange({start:start,end:end});}};
|
|
75941
|
+
var bold={name:'bold',keyCommand:'bold',shortcuts:'ctrlcmd+b',prefix:'**',buttonProps:{'aria-label':'Add bold text (ctrl + b)',title:'Add bold text (ctrl + b)'},icon:/*#__PURE__*/(0,jsx_runtime.jsx)("svg",{role:"img",width:"12",height:"12",viewBox:"0 0 384 512",children:/*#__PURE__*/(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M304.793 243.891c33.639-18.537 53.657-54.16 53.657-95.693 0-48.236-26.25-87.626-68.626-104.179C265.138 34.01 240.849 32 209.661 32H24c-8.837 0-16 7.163-16 16v33.049c0 8.837 7.163 16 16 16h33.113v318.53H24c-8.837 0-16 7.163-16 16V464c0 8.837 7.163 16 16 16h195.69c24.203 0 44.834-1.289 66.866-7.584C337.52 457.193 376 410.647 376 350.014c0-52.168-26.573-91.684-71.207-106.123zM142.217 100.809h67.444c16.294 0 27.536 2.019 37.525 6.717 15.828 8.479 24.906 26.502 24.906 49.446 0 35.029-20.32 56.79-53.029 56.79h-76.846V100.809zm112.642 305.475c-10.14 4.056-22.677 4.907-31.409 4.907h-81.233V281.943h84.367c39.645 0 63.057 25.38 63.057 63.057.001 28.425-13.66 52.483-34.782 61.284z"})}),execute:function execute(state,api){var newSelectionRange=selectWord({text:state.text,selection:state.selection,prefix:state.command.prefix});var state1=api.setSelectionRange(newSelectionRange);executeCommand({api:api,selectedText:state1.selectedText,selection:state.selection,prefix:state.command.prefix});}};
|
|
75938
75942
|
;// CONCATENATED MODULE: ./src/commands/code.tsx
|
|
75939
|
-
var
|
|
75940
|
-
var
|
|
75941
|
-
|
|
75942
|
-
|
|
75943
|
-
var newSelectionRange=selectWord({text:tate.text,selection:tate.selection});var state1=api.setSelectionRange(newSelectionRange);var breaksBeforeCount=getBreaksNeededForEmptyLineBefore(state1.text,state1.selection.start);var breaksBefore=Array(breaksBeforeCount+1).join('\n');var breaksAfterCount=getBreaksNeededForEmptyLineAfter(state1.text,state1.selection.end);var breaksAfter=Array(breaksAfterCount+1).join('\n');api.replaceSelection("".concat(breaksBefore,"```\n").concat(state1.selectedText,"\n```").concat(breaksAfter));var selectionStart=state1.selection.start+breaksBeforeCount+4;var selectionEnd=selectionStart+state1.selectedText.length;api.setSelectionRange({start:selectionStart,end:selectionEnd});}};
|
|
75943
|
+
var codeBlock={name:'codeBlock',keyCommand:'codeBlock',shortcuts:'ctrlcmd+shift+j',prefix:'```',buttonProps:{'aria-label':'Insert Code Block (ctrl + shift + j)',title:'Insert Code Block (ctrl + shift +j)'},icon:/*#__PURE__*/(0,jsx_runtime.jsx)("svg",{width:"13",height:"13",role:"img",viewBox:"0 0 156 156",children:/*#__PURE__*/(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M110.85 120.575 43.7 120.483333 43.7083334 110.091667 110.85 110.191667 110.841667 120.583333 110.85 120.575ZM85.1333334 87.1916666 43.625 86.7083332 43.7083334 76.3166666 85.2083334 76.7916666 85.1333334 87.1916666 85.1333334 87.1916666ZM110.841667 53.4166666 43.7 53.3166666 43.7083334 42.925 110.85 43.025 110.841667 53.4166666ZM36 138C27.2916666 138 20.75 136.216667 16.4 132.666667 12.1333334 129.2 10 124.308333 10 118L10 95.3333332C10 91.0666666 9.25 88.1333332 7.7333334 86.5333332 6.3166668 84.8416666 3.7333334 84 0 84L0 72C3.7333334 72 6.3083334 71.2 7.7333334 69.6 9.2416668 67.9083334 10 64.9333334 10 60.6666666L10 38C10 31.775 12.1333334 26.8833334 16.4 23.3333332 20.7583334 19.7749998 27.2916666 18 36 18L40.6666668 18 40.6666668 30 36 30C34.0212222 29.9719277 32.1263151 30.7979128 30.8 32.2666666 29.3605875 33.8216362 28.5938182 35.8823287 28.6666668 38L28.6666668 60.6666666C28.6666668 67.5083332 26.6666668 72.4 22.6666668 75.3333332 20.9317416 76.7274684 18.8640675 77.6464347 16.6666668 78 18.8916668 78.35 20.8916668 79.2416666 22.6666668 80.6666666 26.6666668 83.95 28.6666668 88.8416666 28.6666668 95.3333332L28.6666668 118C28.6666668 120.308333 29.3750002 122.216667 30.8 123.733333 32.2166666 125.241667 33.9583334 126 36 126L40.6666668 126 40.6666668 138 36 138 36 138ZM114.116667 126 118.783333 126C120.833333 126 122.566667 125.241667 123.983333 123.733333 125.422746 122.178364 126.189515 120.117671 126.116667 118L126.116667 95.3333332C126.116667 88.8333332 128.116667 83.9499998 132.116667 80.6666666 133.9 79.2416666 135.9 78.35 138.116667 78 135.919156 77.6468047 133.851391 76.7277979 132.116667 75.3333332 128.116667 72.3999998 126.116667 67.5 126.116667 60.6666666L126.116667 38C126.189515 35.8823287 125.422746 33.8216361 123.983333 32.2666666 122.657018 30.7979128 120.762111 29.9719277 118.783333 30L114.116667 30 114.116667 18 118.783333 18C127.5 18 133.983333 19.775 138.25 23.3333332 142.608333 26.8833332 144.783333 31.7749998 144.783333 38L144.783333 60.6666666C144.783333 64.9333332 145.5 67.9083332 146.916667 69.6 148.433333 71.2 151.05 72 154.783333 72L154.783333 84C151.05 84 148.433333 84.8333334 146.916667 86.5333332 145.5 88.1333332 144.783333 91.0666666 144.783333 95.3333332L144.783333 118C144.783333 124.308333 142.616667 129.2 138.25 132.666667 133.983333 136.216667 127.5 138 118.783333 138L114.116667 138 114.116667 126 114.116667 126Z"})}),execute:function execute(state,api){var newSelectionRange=selectWord({text:state.text,selection:state.selection,prefix:'```\n',suffix:'\n```'});var state1=api.setSelectionRange(newSelectionRange);// Based on context determine if new line is needed or not
|
|
75944
|
+
var prefix='\n```\n';var suffix='\n```\n';if(state1.selectedText.length>=prefix.length+suffix.length-2&&state1.selectedText.startsWith(prefix)&&state1.selectedText.endsWith(suffix)){// Remove code block
|
|
75945
|
+
prefix='```\n';suffix='\n```';}else{// Add code block
|
|
75946
|
+
if(state1.selection.start>=1&&state.text.slice(state1.selection.start-1,state1.selection.start)==='\n'||state1.selection.start===0){prefix='```\n';}if(state1.selection.end<=state.text.length-1&&state.text.slice(state1.selection.end,state1.selection.end+1)==='\n'||state1.selection.end===state.text.length){suffix='\n```';}}var newSelectionRange2=selectWord({text:state.text,selection:state.selection,prefix:prefix,suffix:suffix});var state2=api.setSelectionRange(newSelectionRange2);executeCommand({api:api,selectedText:state2.selectedText,selection:state.selection,prefix:prefix,suffix:suffix});}};var code_code={name:'code',keyCommand:'code',shortcuts:'ctrlcmd+j',prefix:'`',buttonProps:{'aria-label':'Insert code (ctrl + j)',title:'Insert code (ctrl + j)'},icon:/*#__PURE__*/(0,jsx_runtime.jsx)("svg",{width:"14",height:"14",role:"img",viewBox:"0 0 640 512",children:/*#__PURE__*/(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M278.9 511.5l-61-17.7c-6.4-1.8-10-8.5-8.2-14.9L346.2 8.7c1.8-6.4 8.5-10 14.9-8.2l61 17.7c6.4 1.8 10 8.5 8.2 14.9L293.8 503.3c-1.9 6.4-8.5 10.1-14.9 8.2zm-114-112.2l43.5-46.4c4.6-4.9 4.3-12.7-.8-17.2L117 256l90.6-79.7c5.1-4.5 5.5-12.3.8-17.2l-43.5-46.4c-4.5-4.8-12.1-5.1-17-.5L3.8 247.2c-5.1 4.7-5.1 12.8 0 17.5l144.1 135.1c4.9 4.6 12.5 4.4 17-.5zm327.2.6l144.1-135.1c5.1-4.7 5.1-12.8 0-17.5L492.1 112.1c-4.8-4.5-12.4-4.3-17 .5L431.6 159c-4.6 4.9-4.3 12.7.8 17.2L523 256l-90.6 79.7c-5.1 4.5-5.5 12.3-.8 17.2l43.5 46.4c4.5 4.9 12.1 5.1 17 .6z"})}),execute:function execute(state,api){if(state.selectedText.indexOf('\n')===-1){var newSelectionRange=selectWord({text:state.text,selection:state.selection,prefix:state.command.prefix});var state1=api.setSelectionRange(newSelectionRange);executeCommand({api:api,selectedText:state1.selectedText,selection:state.selection,prefix:state.command.prefix});}else{codeBlock.execute(state,api);}}};
|
|
75944
75947
|
;// CONCATENATED MODULE: ./src/commands/comment.tsx
|
|
75945
|
-
var commands_comment_comment={name:'comment',keyCommand:'comment',shortcuts:'ctrlcmd+/',
|
|
75946
|
-
var newSelectionRange=selectWord({text:state.text,selection:state.selection});var state1=api.setSelectionRange(newSelectionRange);// Replaces the current selection with the bold mark up
|
|
75947
|
-
var state2=api.replaceSelection("<!-- ".concat(state1.selectedText," -->"));// Adjust the selection to not contain the **
|
|
75948
|
-
api.setSelectionRange({start:state2.selection.end-4-state1.selectedText.length,end:state2.selection.end-4});},icon:/*#__PURE__*/(0,jsx_runtime.jsx)("svg",{height:"1em",width:"1em",viewBox:"0 0 25 25",children:/*#__PURE__*/(0,jsx_runtime.jsxs)("g",{fill:"none",fillRule:"evenodd",children:[/*#__PURE__*/(0,jsx_runtime.jsx)("polygon",{points:".769 .727 24.981 .727 24.981 24.727 .769 24.727"}),/*#__PURE__*/(0,jsx_runtime.jsx)("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"3",d:"M12.625,23.8787879 L8.125,19.6969697 L5.125,19.6969697 C2.63971863,19.6969697 0.625,17.8247059 0.625,15.5151515 L0.625,7.15151515 C0.625,4.84196074 2.63971863,2.96969697 5.125,2.96969697 L20.125,2.96969697 C22.6102814,2.96969697 24.625,4.84196074 24.625,7.15151515 L24.625,15.5151515 C24.625,17.8247059 22.6102814,19.6969697 20.125,19.6969697 L17.125,19.6969697 L12.625,23.8787879"}),/*#__PURE__*/(0,jsx_runtime.jsx)("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"3",d:"M10.625,8.54545455 L7.25,11.3333333 L10.625,14.1212121 M15.6875,8.54545455 L19.0625,11.3333333 L15.6875,14.1212121"})]})})};
|
|
75948
|
+
var commands_comment_comment={name:'comment',keyCommand:'comment',shortcuts:'ctrlcmd+/',prefix:'<!-- ',suffix:' -->',buttonProps:{'aria-label':'Insert comment (ctrl + /)',title:'Insert comment (ctrl + /)'},icon:/*#__PURE__*/(0,jsx_runtime.jsx)("svg",{height:"1em",width:"1em",viewBox:"0 0 25 25",children:/*#__PURE__*/(0,jsx_runtime.jsxs)("g",{fill:"none",fillRule:"evenodd",children:[/*#__PURE__*/(0,jsx_runtime.jsx)("polygon",{points:".769 .727 24.981 .727 24.981 24.727 .769 24.727"}),/*#__PURE__*/(0,jsx_runtime.jsx)("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"3",d:"M12.625,23.8787879 L8.125,19.6969697 L5.125,19.6969697 C2.63971863,19.6969697 0.625,17.8247059 0.625,15.5151515 L0.625,7.15151515 C0.625,4.84196074 2.63971863,2.96969697 5.125,2.96969697 L20.125,2.96969697 C22.6102814,2.96969697 24.625,4.84196074 24.625,7.15151515 L24.625,15.5151515 C24.625,17.8247059 22.6102814,19.6969697 20.125,19.6969697 L17.125,19.6969697 L12.625,23.8787879"}),/*#__PURE__*/(0,jsx_runtime.jsx)("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"3",d:"M10.625,8.54545455 L7.25,11.3333333 L10.625,14.1212121 M15.6875,8.54545455 L19.0625,11.3333333 L15.6875,14.1212121"})]})}),execute:function execute(state,api){var newSelectionRange=selectWord({text:state.text,selection:state.selection,prefix:state.command.prefix,suffix:state.command.suffix});var state1=api.setSelectionRange(newSelectionRange);executeCommand({api:api,selectedText:state1.selectedText,selection:state.selection,prefix:state.command.prefix,suffix:state.command.suffix});}};
|
|
75949
75949
|
;// CONCATENATED MODULE: ./src/commands/divider.tsx
|
|
75950
75950
|
var divider={keyCommand:'divider'};
|
|
75951
75951
|
;// CONCATENATED MODULE: ./src/commands/fullscreen.tsx
|
|
@@ -75957,55 +75957,51 @@ function _objectDestructuringEmpty(obj) {
|
|
|
75957
75957
|
;// CONCATENATED MODULE: ./src/commands/group.tsx
|
|
75958
75958
|
var group=function group(arr,options){var data=_objectSpread2(_objectSpread2({children:arr,icon:/*#__PURE__*/(0,jsx_runtime.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 520 520",children:/*#__PURE__*/(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M15.7083333,468 C7.03242448,468 0,462.030833 0,454.666667 L0,421.333333 C0,413.969167 7.03242448,408 15.7083333,408 L361.291667,408 C369.967576,408 377,413.969167 377,421.333333 L377,454.666667 C377,462.030833 369.967576,468 361.291667,468 L15.7083333,468 Z M21.6666667,366 C9.69989583,366 0,359.831861 0,352.222222 L0,317.777778 C0,310.168139 9.69989583,304 21.6666667,304 L498.333333,304 C510.300104,304 520,310.168139 520,317.777778 L520,352.222222 C520,359.831861 510.300104,366 498.333333,366 L21.6666667,366 Z M136.835938,64 L136.835937,126 L107.25,126 L107.25,251 L40.75,251 L40.75,126 L-5.68434189e-14,126 L-5.68434189e-14,64 L136.835938,64 Z M212,64 L212,251 L161.648438,251 L161.648438,64 L212,64 Z M378,64 L378,126 L343.25,126 L343.25,251 L281.75,251 L281.75,126 L238,126 L238,64 L378,64 Z M449.047619,189.550781 L520,189.550781 L520,251 L405,251 L405,64 L449.047619,64 L449.047619,189.550781 Z"})}),execute:function execute(){}},options),{},{keyCommand:'group'});if(Array.isArray(data.children)){data.children=data.children.map(function(_ref){var item=Object.assign({},(_objectDestructuringEmpty(_ref),_ref));item.parent=data;return _objectSpread2({},item);});}return data;};
|
|
75959
75959
|
;// CONCATENATED MODULE: ./src/commands/hr.tsx
|
|
75960
|
-
var hr={name:'hr',keyCommand:'hr',shortcuts:'ctrlcmd+h',
|
|
75960
|
+
var hr={name:'hr',keyCommand:'hr',shortcuts:'ctrlcmd+h',prefix:'\n\n---\n',suffix:'',buttonProps:{'aria-label':'Insert HR (ctrl + h)',title:'Insert HR (ctrl + h)'},icon:/*#__PURE__*/(0,jsx_runtime.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 175 175",children:/*#__PURE__*/(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M0,129 L175,129 L175,154 L0,154 L0,129 Z M3,9 L28.2158203,9 L28.2158203,47.9824219 L55.7695313,47.9824219 L55.7695313,9 L81.0966797,9 L81.0966797,107.185547 L55.7695313,107.185547 L55.7695313,68.0214844 L28.2158203,68.0214844 L28.2158203,107.185547 L3,107.185547 L3,9 Z M93.1855469,100.603516 L93.1855469,19 L135.211914,19 C143.004922,19 148.960917,19.6679621 153.080078,21.0039063 C157.199239,22.3398504 160.520495,24.8168764 163.043945,28.4350586 C165.567395,32.0532407 166.829102,36.459935 166.829102,41.6552734 C166.829102,46.1826398 165.864267,50.0883625 163.93457,53.3725586 C162.004873,56.6567547 159.351579,59.3193257 155.974609,61.3603516 C153.822255,62.6591862 150.872089,63.7353473 147.124023,64.5888672 C150.129898,65.5908253 152.319329,66.5927684 153.692383,67.5947266 C154.620122,68.2626987 155.965323,69.6913953 157.728027,71.8808594 C159.490731,74.0703234 160.668942,75.7587831 161.262695,76.9462891 L173,100.603516 L144.953125,100.603516 L131.482422,75.6660156 C129.775382,72.4374839 128.253913,70.3408251 126.917969,69.3759766 C125.0996,68.1142515 123.040051,67.4833984 120.739258,67.4833984 L118.512695,67.4833984 L118.512695,100.603516 L93.1855469,100.603516 Z M118.512695,52.0644531 L129.144531,52.0644531 C130.294928,52.0644531 132.521468,51.6933631 135.824219,50.9511719 C137.494149,50.6171858 138.857905,49.7636787 139.915527,48.390625 C140.97315,47.0175713 141.501953,45.4404386 141.501953,43.6591797 C141.501953,41.0244009 140.667001,39.0019602 138.99707,37.5917969 C137.32714,36.1816336 134.191429,35.4765625 129.589844,35.4765625 L117.512695,35.4765625 L118.512695,52.0644531 Z",transform:"translate(0 9)"})}),execute:function execute(state,api){var newSelectionRange=selectWord({text:state.text,selection:state.selection,prefix:state.command.prefix,suffix:state.command.suffix});var state1=api.setSelectionRange(newSelectionRange);if(state1.selectedText.length>=state.command.prefix.length&&state1.selectedText.startsWith(state.command.prefix)){// Remove
|
|
75961
|
+
executeCommand({api:api,selectedText:state1.selectedText,selection:state.selection,prefix:state.command.prefix,suffix:state.command.suffix});}else{// Add
|
|
75962
|
+
state1=api.setSelectionRange({start:state.selection.start,end:state.selection.start});executeCommand({api:api,selectedText:state1.selectedText,selection:state.selection,prefix:state.command.prefix,suffix:state.command.suffix});}}};
|
|
75961
75963
|
;// CONCATENATED MODULE: ./src/commands/image.tsx
|
|
75962
|
-
var commands_image_image={name:'image',keyCommand:'image',shortcuts:'ctrlcmd+k',
|
|
75963
|
-
var newSelectionRange=selectWord({text:state.text,selection:state.selection});var state1=api.setSelectionRange(newSelectionRange);// Replaces the current selection with the image
|
|
75964
|
-
var imageTemplate=state1.selectedText||'https://example.com/your-image.png';var val=state.command.value||'';api.replaceSelection(val.replace(/({{text}})/gi,imageTemplate));var start=state1.selection.start+val.indexOf('{{text}}');var end=state1.selection.start+val.indexOf('{{text}}')+(state1.selection.end-state1.selection.start);if(!state1.selectedText){end=end+imageTemplate.length;}api.setSelectionRange({start:start,end:end});}};
|
|
75964
|
+
var commands_image_image={name:'image',keyCommand:'image',shortcuts:'ctrlcmd+k',prefix:'',buttonProps:{'aria-label':'Add image (ctrl + k)',title:'Add image (ctrl + k)'},icon:/*#__PURE__*/(0,jsx_runtime.jsx)("svg",{width:"13",height:"13",viewBox:"0 0 20 20",children:/*#__PURE__*/(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M15 9c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm4-7H1c-.55 0-1 .45-1 1v14c0 .55.45 1 1 1h18c.55 0 1-.45 1-1V3c0-.55-.45-1-1-1zm-1 13l-6-5-2 2-4-5-4 8V4h16v11z"})}),execute:function execute(state,api){var newSelectionRange=selectWord({text:state.text,selection:state.selection,prefix:state.command.prefix,suffix:state.command.suffix});var state1=api.setSelectionRange(newSelectionRange);if(state1.selectedText.includes('http')||state1.selectedText.includes('www')){executeCommand({api:api,selectedText:state1.selectedText,selection:state.selection,prefix:state.command.prefix,suffix:state.command.suffix});}else{newSelectionRange=selectWord({text:state.text,selection:state.selection,prefix:'![',suffix:']()'});state1=api.setSelectionRange(newSelectionRange);if(state1.selectedText.length===0){executeCommand({api:api,selectedText:state1.selectedText,selection:state.selection,prefix:''});}else{executeCommand({api:api,selectedText:state1.selectedText,selection:state.selection,prefix:'![',suffix:']()'});}}}};
|
|
75965
75965
|
;// CONCATENATED MODULE: ./src/commands/italic.tsx
|
|
75966
|
-
var italic={name:'italic',keyCommand:'italic',shortcuts:'ctrlcmd+i',
|
|
75967
|
-
var newSelectionRange=selectWord({text:state.text,selection:state.selection});var state1=api.setSelectionRange(newSelectionRange);// Replaces the current selection with the bold mark up
|
|
75968
|
-
var val=state.command.value||'';api.replaceSelection(val.replace(/({{text}})/gi,state1.selectedText));var start=state1.selection.start+val.indexOf('{{text}}');var end=state1.selection.start+val.indexOf('{{text}}')+(state1.selection.end-state1.selection.start);// Adjust the selection to not contain the **
|
|
75969
|
-
api.setSelectionRange({start:start,end:end});}};
|
|
75966
|
+
var italic={name:'italic',keyCommand:'italic',shortcuts:'ctrlcmd+i',prefix:'*',buttonProps:{'aria-label':'Add italic text (ctrl + i)',title:'Add italic text (ctrl + i)'},icon:/*#__PURE__*/(0,jsx_runtime.jsx)("svg",{"data-name":"italic",width:"12",height:"12",role:"img",viewBox:"0 0 320 512",children:/*#__PURE__*/(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M204.758 416h-33.849l62.092-320h40.725a16 16 0 0 0 15.704-12.937l6.242-32C297.599 41.184 290.034 32 279.968 32H120.235a16 16 0 0 0-15.704 12.937l-6.242 32C96.362 86.816 103.927 96 113.993 96h33.846l-62.09 320H46.278a16 16 0 0 0-15.704 12.935l-6.245 32C22.402 470.815 29.967 480 40.034 480h158.479a16 16 0 0 0 15.704-12.935l6.245-32c1.927-9.88-5.638-19.065-15.704-19.065z"})}),execute:function execute(state,api){var newSelectionRange=selectWord({text:state.text,selection:state.selection,prefix:state.command.prefix});var state1=api.setSelectionRange(newSelectionRange);executeCommand({api:api,selectedText:state1.selectedText,selection:state.selection,prefix:state.command.prefix});}};
|
|
75970
75967
|
;// CONCATENATED MODULE: ./src/commands/link.tsx
|
|
75971
|
-
var commands_link_link={name:'link',keyCommand:'link',shortcuts:'ctrlcmd+l',
|
|
75972
|
-
var newSelectionRange=selectWord({text:state.text,selection:state.selection});var state1=api.setSelectionRange(newSelectionRange);var val=state.command.value||'';// Replaces the current selection with the bold mark up
|
|
75973
|
-
api.replaceSelection(val.replace(/({{text}})/gi,state1.selectedText));var start=state1.selection.start+val.indexOf('{{text}}');var end=state1.selection.start+val.indexOf('{{text}}')+(state1.selection.end-state1.selection.start);// Adjust the selection to not contain the **
|
|
75974
|
-
api.setSelectionRange({start:start,end:end});}};
|
|
75968
|
+
var commands_link_link={name:'link',keyCommand:'link',shortcuts:'ctrlcmd+l',prefix:'[',suffix:'](url)',buttonProps:{'aria-label':'Add a link (ctrl + l)',title:'Add a link (ctrl + l)'},icon:/*#__PURE__*/(0,jsx_runtime.jsx)("svg",{"data-name":"italic",width:"12",height:"12",role:"img",viewBox:"0 0 520 520",children:/*#__PURE__*/(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M331.751196,182.121107 C392.438214,241.974735 391.605313,337.935283 332.11686,396.871226 C332.005129,396.991316 331.873084,397.121413 331.751196,397.241503 L263.493918,464.491645 C203.291404,523.80587 105.345257,523.797864 45.151885,464.491645 C-15.0506283,405.187427 -15.0506283,308.675467 45.151885,249.371249 L82.8416853,212.237562 C92.836501,202.39022 110.049118,208.9351 110.56511,222.851476 C111.223305,240.5867 114.451306,258.404985 120.407566,275.611815 C122.424812,281.438159 120.983487,287.882964 116.565047,292.23621 L103.272145,305.332975 C74.8052033,333.379887 73.9123737,379.047937 102.098973,407.369054 C130.563883,435.969378 177.350591,436.139505 206.033884,407.879434 L274.291163,340.6393 C302.9257,312.427264 302.805844,266.827265 274.291163,238.733318 C270.531934,235.036561 266.74528,232.16442 263.787465,230.157924 C259.544542,227.2873 256.928256,222.609848 256.731165,217.542518 C256.328935,206.967633 260.13184,196.070508 268.613213,187.714278 L289.998463,166.643567 C295.606326,161.118448 304.403592,160.439942 310.906317,164.911276 C318.353355,170.034591 325.328531,175.793397 331.751196,182.121107 Z M240.704978,55.4828366 L172.447607,122.733236 C172.325719,122.853326 172.193674,122.983423 172.081943,123.103513 C117.703294,179.334654 129.953294,261.569283 185.365841,328.828764 C191.044403,335.721376 198.762988,340.914712 206.209732,346.037661 C212.712465,350.509012 221.510759,349.829503 227.117615,344.305363 L248.502893,323.234572 C256.984277,314.87831 260.787188,303.981143 260.384957,293.406218 C260.187865,288.338869 257.571576,283.661398 253.328648,280.790763 C250.370829,278.78426 246.58417,275.912107 242.824936,272.215337 C214.310216,244.121282 206.209732,204.825874 229.906702,179.334654 L298.164073,112.094263 C326.847404,83.8340838 373.633159,84.0042113 402.099123,112.604645 C430.285761,140.92587 429.393946,186.594095 400.92595,214.641114 L387.63303,227.737929 C383.214584,232.091191 381.773257,238.536021 383.790506,244.362388 C389.746774,261.569283 392.974779,279.387637 393.632975,297.122928 C394.149984,311.039357 411.361608,317.584262 421.356437,307.736882 L459.046288,270.603053 C519.249898,211.29961 519.249898,114.787281 459.047304,55.4828366 C398.853851,-3.82360914 300.907572,-3.83161514 240.704978,55.4828366 Z"})}),execute:function execute(state,api){var newSelectionRange=selectWord({text:state.text,selection:state.selection,prefix:state.command.prefix,suffix:state.command.suffix});var state1=api.setSelectionRange(newSelectionRange);if(state1.selectedText.includes('http')||state1.selectedText.includes('www')){newSelectionRange=selectWord({text:state.text,selection:state.selection,prefix:'[](',suffix:')'});state1=api.setSelectionRange(newSelectionRange);executeCommand({api:api,selectedText:state1.selectedText,selection:state.selection,prefix:'[](',suffix:')'});}else{if(state1.selectedText.length===0){executeCommand({api:api,selectedText:state1.selectedText,selection:state.selection,prefix:'[title',suffix:'](url)'});}else{executeCommand({api:api,selectedText:state1.selectedText,selection:state.selection,prefix:state.command.prefix,suffix:state.command.suffix});}}}};
|
|
75975
75969
|
;// CONCATENATED MODULE: ./src/commands/list.tsx
|
|
75976
|
-
|
|
75977
|
-
|
|
75978
|
-
|
|
75979
|
-
var newSelectionRange=selectWord({text:state.text,selection:state.selection});var state1=api.setSelectionRange(newSelectionRange);var breaksBeforeCount=getBreaksNeededForEmptyLineBefore(state1.text,state1.selection.start);var breaksBefore=Array(breaksBeforeCount+1).join('\n');var breaksAfterCount=getBreaksNeededForEmptyLineAfter(state1.text,state1.selection.end);var breaksAfter=Array(breaksAfterCount+1).join('\n');var modifiedText=insertBeforeEachLine(state1.selectedText,insertBefore);api.replaceSelection("".concat(breaksBefore).concat(modifiedText.modifiedText).concat(breaksAfter));// Specifically when the text has only one line, we can exclude the "- ", for example, from the selection
|
|
75980
|
-
var oneLinerOffset=state1.selectedText.indexOf('\n')===-1?modifiedText.insertionLength:0;var selectionStart=state1.selection.start+breaksBeforeCount+oneLinerOffset;var selectionEnd=selectionStart+modifiedText.modifiedText.length-oneLinerOffset;// Adjust the selection to not contain the **
|
|
75981
|
-
api.setSelectionRange({start:selectionStart,end:selectionEnd});};var unorderedListCommand={name:'unordered-list',keyCommand:'list',shortcuts:'ctrl+shift+u',value:'- ',buttonProps:{'aria-label':'Add unordered list (ctrl + shift + u)',title:'Add unordered list (ctrl + shift + u)'},icon:/*#__PURE__*/(0,jsx_runtime.jsx)("svg",{"data-name":"unordered-list",width:"12",height:"12",viewBox:"0 0 512 512",children:/*#__PURE__*/(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M96 96c0 26.51-21.49 48-48 48S0 122.51 0 96s21.49-48 48-48 48 21.49 48 48zM48 208c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zm0 160c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zm96-236h352c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h352c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h352c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"})}),execute:function execute(state,api){makeList(state,api,'- ');}};var orderedListCommand={name:'ordered-list',keyCommand:'list',shortcuts:'ctrl+shift+o',value:'1. ',buttonProps:{'aria-label':'Add ordered list (ctrl + shift + o)',title:'Add ordered list (ctrl + shift + o)'},icon:/*#__PURE__*/(0,jsx_runtime.jsx)("svg",{"data-name":"ordered-list",width:"12",height:"12",role:"img",viewBox:"0 0 512 512",children:/*#__PURE__*/(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M3.263 139.527c0-7.477 3.917-11.572 11.573-11.572h15.131V88.078c0-5.163.534-10.503.534-10.503h-.356s-1.779 2.67-2.848 3.738c-4.451 4.273-10.504 4.451-15.666-1.068l-5.518-6.231c-5.342-5.341-4.984-11.216.534-16.379l21.72-19.938C32.815 33.602 36.732 32 42.785 32H54.89c7.656 0 11.749 3.916 11.749 11.572v84.384h15.488c7.655 0 11.572 4.094 11.572 11.572v8.901c0 7.477-3.917 11.572-11.572 11.572H14.836c-7.656 0-11.573-4.095-11.573-11.572v-8.902zM2.211 304.591c0-47.278 50.955-56.383 50.955-69.165 0-7.18-5.954-8.755-9.28-8.755-3.153 0-6.479 1.051-9.455 3.852-5.079 4.903-10.507 7.004-16.111 2.451l-8.579-6.829c-5.779-4.553-7.18-9.805-2.803-15.409C13.592 201.981 26.025 192 47.387 192c19.437 0 44.476 10.506 44.476 39.573 0 38.347-46.753 46.402-48.679 56.909h39.049c7.529 0 11.557 4.027 11.557 11.382v8.755c0 7.354-4.028 11.382-11.557 11.382h-67.94c-7.005 0-12.083-4.028-12.083-11.382v-4.028zM5.654 454.61l5.603-9.28c3.853-6.654 9.105-7.004 15.584-3.152 4.903 2.101 9.63 3.152 14.359 3.152 10.155 0 14.358-3.502 14.358-8.23 0-6.654-5.604-9.106-15.934-9.106h-4.728c-5.954 0-9.28-2.101-12.258-7.88l-1.05-1.926c-2.451-4.728-1.226-9.806 2.801-14.884l5.604-7.004c6.829-8.405 12.257-13.483 12.257-13.483v-.35s-4.203 1.051-12.608 1.051H16.685c-7.53 0-11.383-4.028-11.383-11.382v-8.755c0-7.53 3.853-11.382 11.383-11.382h58.484c7.529 0 11.382 4.027 11.382 11.382v3.327c0 5.778-1.401 9.806-5.079 14.183l-17.509 20.137c19.611 5.078 28.716 20.487 28.716 34.845 0 21.363-14.358 44.126-48.503 44.126-16.636 0-28.192-4.728-35.896-9.455-5.779-4.202-6.304-9.805-2.626-15.934zM144 132h352c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h352c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h352c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"})}),execute:function execute(state,api){makeList(state,api,function(item,index){return"".concat(index+1,". ");});}};var checkedListCommand={name:'checked-list',keyCommand:'list',shortcuts:'ctrl+shift+c',value:'- [x] ',buttonProps:{'aria-label':'Add checked list (ctrl + shift + c)',title:'Add checked list (ctrl + shift + c)'},icon:/*#__PURE__*/(0,jsx_runtime.jsx)("svg",{"data-name":"checked-list",width:"12",height:"12",role:"img",viewBox:"0 0 512 512",children:/*#__PURE__*/(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M208 132h288c8.8 0 16-7.2 16-16V76c0-8.8-7.2-16-16-16H208c-8.8 0-16 7.2-16 16v40c0 8.8 7.2 16 16 16zm0 160h288c8.8 0 16-7.2 16-16v-40c0-8.8-7.2-16-16-16H208c-8.8 0-16 7.2-16 16v40c0 8.8 7.2 16 16 16zm0 160h288c8.8 0 16-7.2 16-16v-40c0-8.8-7.2-16-16-16H208c-8.8 0-16 7.2-16 16v40c0 8.8 7.2 16 16 16zM64 368c-26.5 0-48.6 21.5-48.6 48s22.1 48 48.6 48 48-21.5 48-48-21.5-48-48-48zm92.5-299l-72.2 72.2-15.6 15.6c-4.7 4.7-12.9 4.7-17.6 0L3.5 109.4c-4.7-4.7-4.7-12.3 0-17l15.7-15.7c4.7-4.7 12.3-4.7 17 0l22.7 22.1 63.7-63.3c4.7-4.7 12.3-4.7 17 0l17 16.5c4.6 4.7 4.6 12.3-.1 17zm0 159.6l-72.2 72.2-15.7 15.7c-4.7 4.7-12.9 4.7-17.6 0L3.5 269c-4.7-4.7-4.7-12.3 0-17l15.7-15.7c4.7-4.7 12.3-4.7 17 0l22.7 22.1 63.7-63.7c4.7-4.7 12.3-4.7 17 0l17 17c4.6 4.6 4.6 12.2-.1 16.9z"})}),execute:function execute(state,api){makeList(state,api,function(item,index){return"- [ ] ";});}};
|
|
75970
|
+
var makeList=function makeList(state,api,insertBefore){var newSelectionRange=selectWord({text:state.text,selection:state.selection,prefix:state.command.prefix});var state1=api.setSelectionRange(newSelectionRange);var breaksBeforeCount=getBreaksNeededForEmptyLineBefore(state1.text,state1.selection.start);var breaksBefore=Array(breaksBeforeCount+1).join('\n');var breaksAfterCount=getBreaksNeededForEmptyLineAfter(state1.text,state1.selection.end);var breaksAfter=Array(breaksAfterCount+1).join('\n');var _insertBeforeEachLine=insertBeforeEachLine(state1.selectedText,insertBefore),modifiedText=_insertBeforeEachLine.modifiedText,insertionLength=_insertBeforeEachLine.insertionLength;if(insertionLength<0){// Remove
|
|
75971
|
+
var selectionStart=state1.selection.start;var selectionEnd=state1.selection.end;if(state1.selection.start>0&&state.text.slice(state1.selection.start-1,state1.selection.start)==='\n'){selectionStart-=1;}if(state1.selection.end<state.text.length-1&&state.text.slice(state1.selection.end,state1.selection.end+1)==='\n'){selectionEnd+=1;}api.setSelectionRange({start:selectionStart,end:selectionEnd});api.replaceSelection("".concat(modifiedText));api.setSelectionRange({start:selectionStart,end:selectionStart+modifiedText.length});}else{// Add
|
|
75972
|
+
api.replaceSelection("".concat(breaksBefore).concat(modifiedText).concat(breaksAfter));var _selectionStart=state1.selection.start+breaksBeforeCount;var _selectionEnd=_selectionStart+modifiedText.length;api.setSelectionRange({start:_selectionStart,end:_selectionEnd});}};var unorderedListCommand={name:'unordered-list',keyCommand:'list',shortcuts:'ctrl+shift+u',prefix:'- ',buttonProps:{'aria-label':'Add unordered list (ctrl + shift + u)',title:'Add unordered list (ctrl + shift + u)'},icon:/*#__PURE__*/(0,jsx_runtime.jsx)("svg",{"data-name":"unordered-list",width:"12",height:"12",viewBox:"0 0 512 512",children:/*#__PURE__*/(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M96 96c0 26.51-21.49 48-48 48S0 122.51 0 96s21.49-48 48-48 48 21.49 48 48zM48 208c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zm0 160c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zm96-236h352c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h352c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h352c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"})}),execute:function execute(state,api){makeList(state,api,'- ');}};var orderedListCommand={name:'ordered-list',keyCommand:'list',shortcuts:'ctrl+shift+o',prefix:'1. ',buttonProps:{'aria-label':'Add ordered list (ctrl + shift + o)',title:'Add ordered list (ctrl + shift + o)'},icon:/*#__PURE__*/(0,jsx_runtime.jsx)("svg",{"data-name":"ordered-list",width:"12",height:"12",role:"img",viewBox:"0 0 512 512",children:/*#__PURE__*/(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M3.263 139.527c0-7.477 3.917-11.572 11.573-11.572h15.131V88.078c0-5.163.534-10.503.534-10.503h-.356s-1.779 2.67-2.848 3.738c-4.451 4.273-10.504 4.451-15.666-1.068l-5.518-6.231c-5.342-5.341-4.984-11.216.534-16.379l21.72-19.938C32.815 33.602 36.732 32 42.785 32H54.89c7.656 0 11.749 3.916 11.749 11.572v84.384h15.488c7.655 0 11.572 4.094 11.572 11.572v8.901c0 7.477-3.917 11.572-11.572 11.572H14.836c-7.656 0-11.573-4.095-11.573-11.572v-8.902zM2.211 304.591c0-47.278 50.955-56.383 50.955-69.165 0-7.18-5.954-8.755-9.28-8.755-3.153 0-6.479 1.051-9.455 3.852-5.079 4.903-10.507 7.004-16.111 2.451l-8.579-6.829c-5.779-4.553-7.18-9.805-2.803-15.409C13.592 201.981 26.025 192 47.387 192c19.437 0 44.476 10.506 44.476 39.573 0 38.347-46.753 46.402-48.679 56.909h39.049c7.529 0 11.557 4.027 11.557 11.382v8.755c0 7.354-4.028 11.382-11.557 11.382h-67.94c-7.005 0-12.083-4.028-12.083-11.382v-4.028zM5.654 454.61l5.603-9.28c3.853-6.654 9.105-7.004 15.584-3.152 4.903 2.101 9.63 3.152 14.359 3.152 10.155 0 14.358-3.502 14.358-8.23 0-6.654-5.604-9.106-15.934-9.106h-4.728c-5.954 0-9.28-2.101-12.258-7.88l-1.05-1.926c-2.451-4.728-1.226-9.806 2.801-14.884l5.604-7.004c6.829-8.405 12.257-13.483 12.257-13.483v-.35s-4.203 1.051-12.608 1.051H16.685c-7.53 0-11.383-4.028-11.383-11.382v-8.755c0-7.53 3.853-11.382 11.383-11.382h58.484c7.529 0 11.382 4.027 11.382 11.382v3.327c0 5.778-1.401 9.806-5.079 14.183l-17.509 20.137c19.611 5.078 28.716 20.487 28.716 34.845 0 21.363-14.358 44.126-48.503 44.126-16.636 0-28.192-4.728-35.896-9.455-5.779-4.202-6.304-9.805-2.626-15.934zM144 132h352c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h352c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h352c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"})}),execute:function execute(state,api){makeList(state,api,function(item,index){return"".concat(index+1,". ");});}};var checkedListCommand={name:'checked-list',keyCommand:'list',shortcuts:'ctrl+shift+c',prefix:'- [ ] ',buttonProps:{'aria-label':'Add checked list (ctrl + shift + c)',title:'Add checked list (ctrl + shift + c)'},icon:/*#__PURE__*/(0,jsx_runtime.jsx)("svg",{"data-name":"checked-list",width:"12",height:"12",role:"img",viewBox:"0 0 512 512",children:/*#__PURE__*/(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M208 132h288c8.8 0 16-7.2 16-16V76c0-8.8-7.2-16-16-16H208c-8.8 0-16 7.2-16 16v40c0 8.8 7.2 16 16 16zm0 160h288c8.8 0 16-7.2 16-16v-40c0-8.8-7.2-16-16-16H208c-8.8 0-16 7.2-16 16v40c0 8.8 7.2 16 16 16zm0 160h288c8.8 0 16-7.2 16-16v-40c0-8.8-7.2-16-16-16H208c-8.8 0-16 7.2-16 16v40c0 8.8 7.2 16 16 16zM64 368c-26.5 0-48.6 21.5-48.6 48s22.1 48 48.6 48 48-21.5 48-48-21.5-48-48-48zm92.5-299l-72.2 72.2-15.6 15.6c-4.7 4.7-12.9 4.7-17.6 0L3.5 109.4c-4.7-4.7-4.7-12.3 0-17l15.7-15.7c4.7-4.7 12.3-4.7 17 0l22.7 22.1 63.7-63.3c4.7-4.7 12.3-4.7 17 0l17 16.5c4.6 4.7 4.6 12.3-.1 17zm0 159.6l-72.2 72.2-15.7 15.7c-4.7 4.7-12.9 4.7-17.6 0L3.5 269c-4.7-4.7-4.7-12.3 0-17l15.7-15.7c4.7-4.7 12.3-4.7 17 0l22.7 22.1 63.7-63.7c4.7-4.7 12.3-4.7 17 0l17 17c4.6 4.6 4.6 12.2-.1 16.9z"})}),execute:function execute(state,api){makeList(state,api,function(item,index){return"- [ ] ";});}};
|
|
75982
75973
|
;// CONCATENATED MODULE: ./src/commands/preview.tsx
|
|
75983
75974
|
var codePreview={name:'preview',keyCommand:'preview',value:'preview',shortcuts:'ctrlcmd+9',buttonProps:{'aria-label':'Preview code (ctrl + 9)',title:'Preview code (ctrl + 9)'},icon:/*#__PURE__*/(0,jsx_runtime.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 520 520",children:[/*#__PURE__*/(0,jsx_runtime.jsx)("polygon",{fill:"currentColor",points:"0 71.293 0 122 38.023 123 38.023 398 0 397 0 449.707 91.023 450.413 91.023 72.293"}),/*#__PURE__*/(0,jsx_runtime.jsx)("polygon",{fill:"currentColor",points:"148.023 72.293 520 71.293 520 122 200.023 124 200.023 397 520 396 520 449.707 148.023 450.413"})]}),execute:function execute(state,api,dispatch,executeCommandState,shortcuts){api.textArea.focus();if(shortcuts&&dispatch&&executeCommandState){dispatch({preview:'preview'});}}};var codeEdit={name:'edit',keyCommand:'preview',value:'edit',shortcuts:'ctrlcmd+7',buttonProps:{'aria-label':'Edit code (ctrl + 7)',title:'Edit code (ctrl + 7)'},icon:/*#__PURE__*/(0,jsx_runtime.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 520 520",children:[/*#__PURE__*/(0,jsx_runtime.jsx)("polygon",{fill:"currentColor",points:"0 71.293 0 122 319 122 319 397 0 397 0 449.707 372 449.413 372 71.293"}),/*#__PURE__*/(0,jsx_runtime.jsx)("polygon",{fill:"currentColor",points:"429 71.293 520 71.293 520 122 481 123 481 396 520 396 520 449.707 429 449.413"})]}),execute:function execute(state,api,dispatch,executeCommandState,shortcuts){api.textArea.focus();if(shortcuts&&dispatch&&executeCommandState){dispatch({preview:'edit'});}}};var codeLive={name:'live',keyCommand:'preview',value:'live',shortcuts:'ctrlcmd+8',buttonProps:{'aria-label':'Live code (ctrl + 8)',title:'Live code (ctrl + 8)'},icon:/*#__PURE__*/(0,jsx_runtime.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 520 520",children:[/*#__PURE__*/(0,jsx_runtime.jsx)("polygon",{fill:"currentColor",points:"0 71.293 0 122 179 122 179 397 0 397 0 449.707 232 449.413 232 71.293"}),/*#__PURE__*/(0,jsx_runtime.jsx)("polygon",{fill:"currentColor",points:"289 71.293 520 71.293 520 122 341 123 341 396 520 396 520 449.707 289 449.413"})]}),execute:function execute(state,api,dispatch,executeCommandState,shortcuts){api.textArea.focus();if(shortcuts&&dispatch&&executeCommandState){dispatch({preview:'live'});}}};
|
|
75984
75975
|
;// CONCATENATED MODULE: ./src/commands/quote.tsx
|
|
75985
|
-
var quote={name:'quote',keyCommand:'quote',shortcuts:'ctrlcmd+q',buttonProps:{'aria-label':'Insert a quote (ctrl + q)',title:'Insert a quote (ctrl + q)'},icon:/*#__PURE__*/(0,jsx_runtime.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 520 520",children:/*#__PURE__*/(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M520,95.75 L520,225.75 C520,364.908906 457.127578,437.050625 325.040469,472.443125 C309.577578,476.586875 294.396016,464.889922 294.396016,448.881641 L294.396016,414.457031 C294.396016,404.242891 300.721328,395.025078 310.328125,391.554687 C377.356328,367.342187 414.375,349.711094 414.375,274.5 L341.25,274.5 C314.325781,274.5 292.5,252.674219 292.5,225.75 L292.5,95.75 C292.5,68.8257812 314.325781,47 341.25,47 L471.25,47 C498.174219,47 520,68.8257812 520,95.75 Z M178.75,47 L48.75,47 C21.8257813,47 0,68.8257812 0,95.75 L0,225.75 C0,252.674219 21.8257813,274.5 48.75,274.5 L121.875,274.5 C121.875,349.711094 84.8563281,367.342187 17.828125,391.554687 C8.22132813,395.025078 1.89601563,404.242891 1.89601563,414.457031 L1.89601563,448.881641 C1.89601563,464.889922 17.0775781,476.586875 32.5404687,472.443125 C164.627578,437.050625 227.5,364.908906 227.5,225.75 L227.5,95.75 C227.5,68.8257812 205.674219,47 178.75,47 Z"})}),execute:function execute(state,api){
|
|
75986
|
-
var newSelectionRange=selectWord({text:state.text,selection:state.selection});var state1=api.setSelectionRange(newSelectionRange);var breaksBeforeCount=getBreaksNeededForEmptyLineBefore(state1.text,state1.selection.start);var breaksBefore=Array(breaksBeforeCount+1).join('\n');var breaksAfterCount=getBreaksNeededForEmptyLineAfter(state1.text,state1.selection.end);var breaksAfter=Array(breaksAfterCount+1).join('\n');// Replaces the current selection with the quote mark up
|
|
75987
|
-
api.replaceSelection("".concat(breaksBefore,"> ").concat(state1.selectedText).concat(breaksAfter));var selectionStart=state1.selection.start+breaksBeforeCount+2;var selectionEnd=selectionStart+state1.selectedText.length;api.setSelectionRange({start:selectionStart,end:selectionEnd});}};
|
|
75976
|
+
var quote={name:'quote',keyCommand:'quote',shortcuts:'ctrlcmd+q',prefix:'> ',buttonProps:{'aria-label':'Insert a quote (ctrl + q)',title:'Insert a quote (ctrl + q)'},icon:/*#__PURE__*/(0,jsx_runtime.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 520 520",children:/*#__PURE__*/(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M520,95.75 L520,225.75 C520,364.908906 457.127578,437.050625 325.040469,472.443125 C309.577578,476.586875 294.396016,464.889922 294.396016,448.881641 L294.396016,414.457031 C294.396016,404.242891 300.721328,395.025078 310.328125,391.554687 C377.356328,367.342187 414.375,349.711094 414.375,274.5 L341.25,274.5 C314.325781,274.5 292.5,252.674219 292.5,225.75 L292.5,95.75 C292.5,68.8257812 314.325781,47 341.25,47 L471.25,47 C498.174219,47 520,68.8257812 520,95.75 Z M178.75,47 L48.75,47 C21.8257813,47 0,68.8257812 0,95.75 L0,225.75 C0,252.674219 21.8257813,274.5 48.75,274.5 L121.875,274.5 C121.875,349.711094 84.8563281,367.342187 17.828125,391.554687 C8.22132813,395.025078 1.89601563,404.242891 1.89601563,414.457031 L1.89601563,448.881641 C1.89601563,464.889922 17.0775781,476.586875 32.5404687,472.443125 C164.627578,437.050625 227.5,364.908906 227.5,225.75 L227.5,95.75 C227.5,68.8257812 205.674219,47 178.75,47 Z"})}),execute:function execute(state,api){var newSelectionRange=selectWord({text:state.text,selection:state.selection,prefix:state.command.prefix});var state1=api.setSelectionRange(newSelectionRange);var breaksBeforeCount=getBreaksNeededForEmptyLineBefore(state1.text,state1.selection.start);var breaksBefore=Array(breaksBeforeCount+1).join('\n');var breaksAfterCount=getBreaksNeededForEmptyLineAfter(state1.text,state1.selection.end);var breaksAfter=Array(breaksAfterCount+1).join('\n');var modifiedText=insertBeforeEachLine(state1.selectedText,state.command.prefix);api.replaceSelection("".concat(breaksBefore).concat(modifiedText.modifiedText).concat(breaksAfter));var selectionStart=state1.selection.start+breaksBeforeCount;var selectionEnd=selectionStart+modifiedText.modifiedText.length;api.setSelectionRange({start:selectionStart,end:selectionEnd});}};
|
|
75988
75977
|
;// CONCATENATED MODULE: ./src/commands/strikeThrough.tsx
|
|
75989
|
-
var strikeThrough_strikethrough={name:'strikethrough',keyCommand:'strikethrough',shortcuts:'ctrl+shift+x',buttonProps:{'aria-label':'Add strikethrough text (ctrl + shift + x)',title:'Add strikethrough text (ctrl + shift + x)'},
|
|
75990
|
-
var newSelectionRange=selectWord({text:state.text,selection:state.selection});var state1=api.setSelectionRange(newSelectionRange);// Replaces the current selection with the bold mark up
|
|
75991
|
-
var val=state.command.value||'';api.replaceSelection(val.replace(/({{text}})/gi,state1.selectedText));var start=state1.selection.start+val.indexOf('{{text}}');var end=state1.selection.start+val.indexOf('{{text}}')+(state1.selection.end-state1.selection.start);// Adjust the selection to not contain the **
|
|
75992
|
-
api.setSelectionRange({start:start,end:end});}};
|
|
75978
|
+
var strikeThrough_strikethrough={name:'strikethrough',keyCommand:'strikethrough',shortcuts:'ctrl+shift+x',buttonProps:{'aria-label':'Add strikethrough text (ctrl + shift + x)',title:'Add strikethrough text (ctrl + shift + x)'},prefix:'~~',icon:/*#__PURE__*/(0,jsx_runtime.jsx)("svg",{"data-name":"strikethrough",width:"12",height:"12",role:"img",viewBox:"0 0 512 512",children:/*#__PURE__*/(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M496 288H16c-8.837 0-16-7.163-16-16v-32c0-8.837 7.163-16 16-16h480c8.837 0 16 7.163 16 16v32c0 8.837-7.163 16-16 16zm-214.666 16c27.258 12.937 46.524 28.683 46.524 56.243 0 33.108-28.977 53.676-75.621 53.676-32.325 0-76.874-12.08-76.874-44.271V368c0-8.837-7.164-16-16-16H113.75c-8.836 0-16 7.163-16 16v19.204c0 66.845 77.717 101.82 154.487 101.82 88.578 0 162.013-45.438 162.013-134.424 0-19.815-3.618-36.417-10.143-50.6H281.334zm-30.952-96c-32.422-13.505-56.836-28.946-56.836-59.683 0-33.92 30.901-47.406 64.962-47.406 42.647 0 64.962 16.593 64.962 32.985V136c0 8.837 7.164 16 16 16h45.613c8.836 0 16-7.163 16-16v-30.318c0-52.438-71.725-79.875-142.575-79.875-85.203 0-150.726 40.972-150.726 125.646 0 22.71 4.665 41.176 12.777 56.547h129.823z"})}),execute:function execute(state,api){var newSelectionRange=selectWord({text:state.text,selection:state.selection,prefix:state.command.prefix});var state1=api.setSelectionRange(newSelectionRange);executeCommand({api:api,selectedText:state1.selectedText,selection:state.selection,prefix:state.command.prefix});}};
|
|
75993
75979
|
;// CONCATENATED MODULE: ./src/commands/title1.tsx
|
|
75994
|
-
var title1={name:'title1',keyCommand:'title1',shortcuts:'ctrlcmd+1',
|
|
75980
|
+
var title1={name:'title1',keyCommand:'title1',shortcuts:'ctrlcmd+1',prefix:'# ',suffix:'',buttonProps:{'aria-label':'Insert title1 (ctrl + 1)',title:'Insert title1 (ctrl + 1)'},icon:/*#__PURE__*/(0,jsx_runtime.jsx)("div",{style:{fontSize:18,textAlign:'left'},children:"Title 1"}),execute:function execute(state,api){titleExecute({state:state,api:api,prefix:state.command.prefix,suffix:state.command.suffix});}};
|
|
75995
75981
|
;// CONCATENATED MODULE: ./src/commands/title.tsx
|
|
75996
|
-
var title=_objectSpread2(_objectSpread2({},title1),{},{icon:/*#__PURE__*/(0,jsx_runtime.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 520 520",children:/*#__PURE__*/(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M15.7083333,468 C7.03242448,468 0,462.030833 0,454.666667 L0,421.333333 C0,413.969167 7.03242448,408 15.7083333,408 L361.291667,408 C369.967576,408 377,413.969167 377,421.333333 L377,454.666667 C377,462.030833 369.967576,468 361.291667,468 L15.7083333,468 Z M21.6666667,366 C9.69989583,366 0,359.831861 0,352.222222 L0,317.777778 C0,310.168139 9.69989583,304 21.6666667,304 L498.333333,304 C510.300104,304 520,310.168139 520,317.777778 L520,352.222222 C520,359.831861 510.300104,366 498.333333,366 L21.6666667,366 Z M136.835938,64 L136.835937,126 L107.25,126 L107.25,251 L40.75,251 L40.75,126 L-5.68434189e-14,126 L-5.68434189e-14,64 L136.835938,64 Z M212,64 L212,251 L161.648438,251 L161.648438,64 L212,64 Z M378,64 L378,126 L343.25,126 L343.25,251 L281.75,251 L281.75,126 L238,126 L238,64 L378,64 Z M449.047619,189.550781 L520,189.550781 L520,251 L405,251 L405,64 L449.047619,64 L449.047619,189.550781 Z"})})});
|
|
75982
|
+
function titleExecute(_ref){var state=_ref.state,api=_ref.api,prefix=_ref.prefix,_ref$suffix=_ref.suffix,suffix=_ref$suffix===void 0?prefix:_ref$suffix;var newSelectionRange=selectLine({text:state.text,selection:state.selection});var state1=api.setSelectionRange(newSelectionRange);executeCommand({api:api,selectedText:state1.selectedText,selection:state.selection,prefix:prefix,suffix:suffix});}var title=_objectSpread2(_objectSpread2({},title1),{},{icon:/*#__PURE__*/(0,jsx_runtime.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 520 520",children:/*#__PURE__*/(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M15.7083333,468 C7.03242448,468 0,462.030833 0,454.666667 L0,421.333333 C0,413.969167 7.03242448,408 15.7083333,408 L361.291667,408 C369.967576,408 377,413.969167 377,421.333333 L377,454.666667 C377,462.030833 369.967576,468 361.291667,468 L15.7083333,468 Z M21.6666667,366 C9.69989583,366 0,359.831861 0,352.222222 L0,317.777778 C0,310.168139 9.69989583,304 21.6666667,304 L498.333333,304 C510.300104,304 520,310.168139 520,317.777778 L520,352.222222 C520,359.831861 510.300104,366 498.333333,366 L21.6666667,366 Z M136.835938,64 L136.835937,126 L107.25,126 L107.25,251 L40.75,251 L40.75,126 L-5.68434189e-14,126 L-5.68434189e-14,64 L136.835938,64 Z M212,64 L212,251 L161.648438,251 L161.648438,64 L212,64 Z M378,64 L378,126 L343.25,126 L343.25,251 L281.75,251 L281.75,126 L238,126 L238,64 L378,64 Z M449.047619,189.550781 L520,189.550781 L520,251 L405,251 L405,64 L449.047619,64 L449.047619,189.550781 Z"})})});
|
|
75997
75983
|
;// CONCATENATED MODULE: ./src/commands/title2.tsx
|
|
75998
|
-
var title2={name:'title2',keyCommand:'title2',shortcuts:'ctrlcmd+2',
|
|
75984
|
+
var title2={name:'title2',keyCommand:'title2',shortcuts:'ctrlcmd+2',prefix:'## ',suffix:'',buttonProps:{'aria-label':'Insert title2 (ctrl + 2)',title:'Insert title2 (ctrl + 2)'},icon:/*#__PURE__*/(0,jsx_runtime.jsx)("div",{style:{fontSize:16,textAlign:'left'},children:"Title 2"}),execute:function execute(state,api){titleExecute({state:state,api:api,prefix:state.command.prefix,suffix:state.command.suffix});}};
|
|
75999
75985
|
;// CONCATENATED MODULE: ./src/commands/title3.tsx
|
|
76000
|
-
var title3={name:'title3',keyCommand:'title3',shortcuts:'ctrlcmd+3',
|
|
75986
|
+
var title3={name:'title3',keyCommand:'title3',shortcuts:'ctrlcmd+3',prefix:'### ',suffix:'',buttonProps:{'aria-label':'Insert title3 (ctrl + 3)',title:'Insert title3 (ctrl + 3)'},icon:/*#__PURE__*/(0,jsx_runtime.jsx)("div",{style:{fontSize:15,textAlign:'left'},children:"Title 3"}),execute:function execute(state,api){titleExecute({state:state,api:api,prefix:state.command.prefix,suffix:state.command.suffix});}};
|
|
76001
75987
|
;// CONCATENATED MODULE: ./src/commands/title4.tsx
|
|
76002
|
-
var title4={name:'title4',keyCommand:'title4',shortcuts:'ctrlcmd+4',
|
|
75988
|
+
var title4={name:'title4',keyCommand:'title4',shortcuts:'ctrlcmd+4',prefix:'#### ',suffix:'',buttonProps:{'aria-label':'Insert title4 (ctrl + 4)',title:'Insert title4 (ctrl + 4)'},icon:/*#__PURE__*/(0,jsx_runtime.jsx)("div",{style:{fontSize:14,textAlign:'left'},children:"Title 4"}),execute:function execute(state,api){titleExecute({state:state,api:api,prefix:state.command.prefix,suffix:state.command.suffix});}};
|
|
76003
75989
|
;// CONCATENATED MODULE: ./src/commands/title5.tsx
|
|
76004
|
-
var title5={name:'title5',keyCommand:'title5',shortcuts:'ctrlcmd+5',
|
|
75990
|
+
var title5={name:'title5',keyCommand:'title5',shortcuts:'ctrlcmd+5',prefix:'##### ',suffix:'',buttonProps:{'aria-label':'Insert title5 (ctrl + 5)',title:'Insert title5 (ctrl + 5)'},icon:/*#__PURE__*/(0,jsx_runtime.jsx)("div",{style:{fontSize:12,textAlign:'left'},children:"Title 5"}),execute:function execute(state,api){titleExecute({state:state,api:api,prefix:state.command.prefix,suffix:state.command.suffix});}};
|
|
76005
75991
|
;// CONCATENATED MODULE: ./src/commands/title6.tsx
|
|
76006
|
-
var title6={name:'title6',keyCommand:'title6',shortcuts:'ctrlcmd+6',
|
|
75992
|
+
var title6={name:'title6',keyCommand:'title6',shortcuts:'ctrlcmd+6',prefix:'###### ',suffix:'',buttonProps:{'aria-label':'Insert title6 (ctrl + 6)',title:'Insert title6 (ctrl + 6)'},icon:/*#__PURE__*/(0,jsx_runtime.jsx)("div",{style:{fontSize:12,textAlign:'left'},children:"Title 6"}),execute:function execute(state,api){titleExecute({state:state,api:api,prefix:state.command.prefix,suffix:state.command.suffix});}};
|
|
75993
|
+
;// CONCATENATED MODULE: ./src/commands/table.tsx
|
|
75994
|
+
var table_table={name:'table',keyCommand:'table',prefix:'\n| Header | Header |\n|--------|--------|\n| Cell | Cell |\n| Cell | Cell |\n| Cell | Cell |\n\n',suffix:'',buttonProps:{'aria-label':'Add table',title:'Add table'},icon:/*#__PURE__*/(0,jsx_runtime.jsx)("svg",{role:"img",width:"12",height:"12",viewBox:"0 0 512 512",children:/*#__PURE__*/(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M64 256V160H224v96H64zm0 64H224v96H64V320zm224 96V320H448v96H288zM448 256H288V160H448v96zM64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64z"//Font Awesome Free 6.4.2 by @fontawesome - https://fontawesome.com
|
|
75995
|
+
})}),execute:function execute(state,api){var newSelectionRange=selectWord({text:state.text,selection:state.selection,prefix:state.command.prefix,suffix:state.command.suffix});var state1=api.setSelectionRange(newSelectionRange);if(state1.selectedText.length>=state.command.prefix.length+state.command.suffix.length&&state1.selectedText.startsWith(state.command.prefix)){// Remove
|
|
75996
|
+
executeCommand({api:api,selectedText:state1.selectedText,selection:state.selection,prefix:state.command.prefix,suffix:state.command.suffix});}else{// Add
|
|
75997
|
+
state1=api.setSelectionRange({start:state.selection.start,end:state.selection.start});executeCommand({api:api,selectedText:state1.selectedText,selection:state.selection,prefix:state.command.prefix,suffix:state.command.suffix});}}};
|
|
75998
|
+
;// CONCATENATED MODULE: ./src/commands/issue.tsx
|
|
75999
|
+
var issue={name:'issue',keyCommand:'issue',prefix:'#',suffix:'',buttonProps:{'aria-label':'Add issue',title:'Add issue'},icon:/*#__PURE__*/(0,jsx_runtime.jsx)("svg",{role:"img",width:"12",height:"12",viewBox:"0 0 448 512",children:/*#__PURE__*/(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M181.3 32.4c17.4 2.9 29.2 19.4 26.3 36.8L197.8 128h95.1l11.5-69.3c2.9-17.4 19.4-29.2 36.8-26.3s29.2 19.4 26.3 36.8L357.8 128H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H347.1L325.8 320H384c17.7 0 32 14.3 32 32s-14.3 32-32 32H315.1l-11.5 69.3c-2.9 17.4-19.4 29.2-36.826.3s-29.2-19.4-26.3-36.8l9.8-58.7H155.1l-11.5 69.3c-2.9 17.4-19.4 29.2-36.8 26.3s-29.2-19.4-26.3-36.8L90.2 384H32c-17.7 0-32-14.3-32-32s14.3-32 32-32h68.9l21.3-128H64c-17.7 0-32-14.3-32-32s14.3-32 32-32h68.9l11.5-69.3c2.9-17.4 19.4-29.2 36.8-26.3zM187.1 192L165.8320h95.1l21.3-128H187.1z"//Font Awesome Free 6.4.2 by @fontawesome - https://fontawesome.com
|
|
76000
|
+
})}),execute:function execute(state,api){var newSelectionRange=selectWord({text:state.text,selection:state.selection,prefix:state.command.prefix,suffix:state.command.suffix});var state1=api.setSelectionRange(newSelectionRange);executeCommand({api:api,selectedText:state1.selectedText,selection:state.selection,prefix:state.command.prefix,suffix:state.command.suffix});}};
|
|
76001
|
+
;// CONCATENATED MODULE: ./src/commands/help.tsx
|
|
76002
|
+
var help={name:'help',keyCommand:'help',buttonProps:{'aria-label':'Open help',title:'Open help'},icon:/*#__PURE__*/(0,jsx_runtime.jsx)("svg",{viewBox:"0 0 16 16",width:"12px",height:"12px",children:/*#__PURE__*/(0,jsx_runtime.jsx)("path",{d:"M8 0C3.6 0 0 3.6 0 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8Zm.9 13H7v-1.8h1.9V13Zm-.1-3.6v.5H7.1v-.6c.2-2.1 2-1.9 1.9-3.2.1-.7-.3-1.1-1-1.1-.8 0-1.2.7-1.2 1.6H5c0-1.7 1.2-3 2.9-3 2.3 0 3 1.4 3 2.3.1 2.3-1.9 2-2.1 3.5Z",fill:"currentColor"})}),execute:function execute(){window.open('https://www.markdownguide.org/basic-syntax/','_blank','noreferrer');}};
|
|
76007
76003
|
;// CONCATENATED MODULE: ./src/commands/index.ts
|
|
76008
|
-
var commands_getCommands=function getCommands(){return[bold,italic,strikeThrough_strikethrough,hr,group([title1,title2,title3,title4,title5,title6],{name:'title',groupName:'title',buttonProps:{'aria-label':'Insert title',title:'Insert title'}}),divider,commands_link_link,quote,code_code,codeBlock,commands_comment_comment,commands_image_image,divider,unorderedListCommand,orderedListCommand,checkedListCommand];};var getExtraCommands=function getExtraCommands(){return[codeEdit,codeLive,codePreview,divider,fullscreen];};function getStateFromTextArea(textArea){var _textArea$value;return{selection:{start:textArea.selectionStart,end:textArea.selectionEnd},text:textArea.value,selectedText:(_textArea$value=textArea.value)===null||_textArea$value===void 0?void 0:_textArea$value.slice(textArea.selectionStart,textArea.selectionEnd)};}var TextAreaTextApi=/*#__PURE__*/function(){function TextAreaTextApi(textArea){_classCallCheck(this,TextAreaTextApi);this.textArea=void 0;this.textArea=textArea;}/**
|
|
76004
|
+
var commands_getCommands=function getCommands(){return[bold,italic,strikeThrough_strikethrough,hr,group([title1,title2,title3,title4,title5,title6],{name:'title',groupName:'title',buttonProps:{'aria-label':'Insert title',title:'Insert title'}}),divider,commands_link_link,quote,code_code,codeBlock,commands_comment_comment,commands_image_image,table_table,divider,unorderedListCommand,orderedListCommand,checkedListCommand,divider,help];};var getExtraCommands=function getExtraCommands(){return[codeEdit,codeLive,codePreview,divider,fullscreen];};function getStateFromTextArea(textArea){var _textArea$value;return{selection:{start:textArea.selectionStart,end:textArea.selectionEnd},text:textArea.value,selectedText:(_textArea$value=textArea.value)===null||_textArea$value===void 0?void 0:_textArea$value.slice(textArea.selectionStart,textArea.selectionEnd)};}var TextAreaTextApi=/*#__PURE__*/function(){function TextAreaTextApi(textArea){_classCallCheck(this,TextAreaTextApi);this.textArea=void 0;this.textArea=textArea;}/**
|
|
76009
76005
|
* Replaces the current selection with the new text. This will make the new selectedText to be empty, the
|
|
76010
76006
|
* selection start and selection end will be the same and will both point to the end
|
|
76011
76007
|
* @param text Text that should replace the current selection
|
|
@@ -76017,11 +76013,12 @@ var commands_getCommands=function getCommands(){return[bold,italic,strikeThrough
|
|
|
76017
76013
|
/**
|
|
76018
76014
|
* - `13` - `Enter`
|
|
76019
76015
|
* - `9` - `Tab`
|
|
76020
|
-
*/function stopPropagation(e){e.stopPropagation();e.preventDefault();}function handleKeyDown(e){var tabSize=arguments.length>1&&arguments[1]!==undefined?arguments[1]:2;var defaultTabEnable=arguments.length>2&&arguments[2]!==undefined?arguments[2]:false;var target=e.target;var starVal=target.value.substr(0,target.selectionStart);var valArr=starVal.split('\n');var currentLineStr=valArr[valArr.length-1];var textArea=new TextAreaTextApi(target);/**
|
|
76016
|
+
*/function stopPropagation(e){e.stopPropagation();e.preventDefault();}function handleLineMove(e,direction){stopPropagation(e);var target=e.target;var textArea=new TextAreaTextApi(target);var selection={start:target.selectionStart,end:target.selectionEnd};selection=selectLine({text:target.value,selection:selection});if(direction<0&&selection.start<=0||direction>0&&selection.end>=target.value.length){return;}var blockText=target.value.slice(selection.start,selection.end);if(direction<0){var prevLineSelection=selectLine({text:target.value,selection:{start:selection.start-1,end:selection.start-1}});var prevLineText=target.value.slice(prevLineSelection.start,prevLineSelection.end);textArea.setSelectionRange({start:prevLineSelection.start,end:selection.end});insertTextAtPosition(target,"".concat(blockText,"\n").concat(prevLineText));textArea.setSelectionRange({start:prevLineSelection.start,end:prevLineSelection.start+blockText.length});}else{var nextLineSelection=selectLine({text:target.value,selection:{start:selection.end+1,end:selection.end+1}});var nextLineText=target.value.slice(nextLineSelection.start,nextLineSelection.end);textArea.setSelectionRange({start:selection.start,end:nextLineSelection.end});insertTextAtPosition(target,"".concat(nextLineText,"\n").concat(blockText));textArea.setSelectionRange({start:nextLineSelection.end-blockText.length,end:nextLineSelection.end});}}function handleKeyDown(e){var tabSize=arguments.length>1&&arguments[1]!==undefined?arguments[1]:2;var defaultTabEnable=arguments.length>2&&arguments[2]!==undefined?arguments[2]:false;var target=e.target;var starVal=target.value.substr(0,target.selectionStart);var valArr=starVal.split('\n');var currentLineStr=valArr[valArr.length-1];var textArea=new TextAreaTextApi(target);/**
|
|
76021
76017
|
* `9` - `Tab`
|
|
76022
|
-
*/if(!defaultTabEnable&&e.code&&e.code.toLowerCase()==='tab'){stopPropagation(e);var space=new Array(tabSize+1).join(' ');if(target.selectionStart!==target.selectionEnd){var _star=target.value.substring(0,target.selectionStart).split('\n');var _end=target.value.substring(0,target.selectionEnd).split('\n');var modifiedTextLine=[];_end.forEach(function(item,idx){if(item!==_star[idx]){modifiedTextLine.push(item);}});var modifiedText=modifiedTextLine.join('\n');var oldSelectText=target.value.substring(target.selectionStart,target.selectionEnd);var newStarNum=target.value.substring(0,target.selectionStart).length;textArea.setSelectionRange({start:target.value.indexOf(modifiedText),end:target.selectionEnd});var modifiedTextObj=insertBeforeEachLine(modifiedText,e.shiftKey?'':space);var text=modifiedTextObj.modifiedText;if(e.shiftKey){text=text.split('\n').map(function(item){return item.replace(new RegExp("^".concat(space)),'');}).join('\n');}textArea.replaceSelection(text);var startTabSize=e.shiftKey?-tabSize:tabSize;var endTabSize=e.shiftKey?-modifiedTextLine.length*tabSize:modifiedTextLine.length*tabSize;textArea.setSelectionRange({start:newStarNum+startTabSize,end:newStarNum+oldSelectText.length+endTabSize});}else{return insertTextAtPosition(target,space);}}else if(e.keyCode===13&&e.code.toLowerCase()==='enter'&&(/^(-|\*)\s/.test(currentLineStr)||/^\d+.\s/.test(currentLineStr))){/**
|
|
76018
|
+
*/if(!defaultTabEnable&&e.code&&e.code.toLowerCase()==='tab'){stopPropagation(e);var space=new Array(tabSize+1).join(' ');if(target.selectionStart!==target.selectionEnd){var _star=target.value.substring(0,target.selectionStart).split('\n');var _end=target.value.substring(0,target.selectionEnd).split('\n');var modifiedTextLine=[];_end.forEach(function(item,idx){if(item!==_star[idx]){modifiedTextLine.push(item);}});var modifiedText=modifiedTextLine.join('\n');var oldSelectText=target.value.substring(target.selectionStart,target.selectionEnd);var newStarNum=target.value.substring(0,target.selectionStart).length;textArea.setSelectionRange({start:target.value.indexOf(modifiedText),end:target.selectionEnd});var modifiedTextObj=insertBeforeEachLine(modifiedText,e.shiftKey?'':space);var text=modifiedTextObj.modifiedText;if(e.shiftKey){text=text.split('\n').map(function(item){return item.replace(new RegExp("^".concat(space)),'');}).join('\n');}textArea.replaceSelection(text);var startTabSize=e.shiftKey?-tabSize:tabSize;var endTabSize=e.shiftKey?-modifiedTextLine.length*tabSize:modifiedTextLine.length*tabSize;textArea.setSelectionRange({start:newStarNum+startTabSize,end:newStarNum+oldSelectText.length+endTabSize});}else{return insertTextAtPosition(target,space);}}else if(e.keyCode===13&&e.code.toLowerCase()==='enter'&&(/^(-|\*)\s/.test(currentLineStr)||/^\d+.\s/.test(currentLineStr))&&!e.shiftKey){/**
|
|
76023
76019
|
* `13` - `Enter`
|
|
76024
|
-
*/stopPropagation(e);var startStr='\n- ';if(currentLineStr.startsWith('*')){startStr='\n* ';}if(currentLineStr.startsWith('- [ ]')
|
|
76020
|
+
*/stopPropagation(e);var startStr='\n- ';if(currentLineStr.startsWith('*')){startStr='\n* ';}if(currentLineStr.startsWith('- [ ]')||currentLineStr.startsWith('- [X]')||currentLineStr.startsWith('- [x]')){startStr='\n- [ ] ';}if(/^\d+.\s/.test(currentLineStr)){startStr="\n".concat(parseInt(currentLineStr)+1,". ");}return insertTextAtPosition(target,startStr);}else if(e.code&&e.code.toLowerCase()==='keyd'&&e.ctrlKey){// Duplicate lines
|
|
76021
|
+
stopPropagation(e);var selection={start:target.selectionStart,end:target.selectionEnd};var savedSelection=selection;selection=selectLine({text:target.value,selection:selection});var textToDuplicate=target.value.slice(selection.start,selection.end);textArea.setSelectionRange({start:selection.end,end:selection.end});insertTextAtPosition(target,"\n".concat(textToDuplicate));textArea.setSelectionRange({start:savedSelection.start,end:savedSelection.end});}else if(e.code&&e.code.toLowerCase()==='arrowup'&&e.altKey){handleLineMove(e,-1);}else if(e.code&&e.code.toLowerCase()==='arrowdown'&&e.altKey){handleLineMove(e,1);}}
|
|
76025
76022
|
;// CONCATENATED MODULE: ./src/components/TextArea/index.less
|
|
76026
76023
|
// extracted by mini-css-extract-plugin
|
|
76027
76024
|
/* harmony default export */ const TextArea = ({});
|