@uiw/react-md-editor 3.19.6 → 3.19.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/mdeditor.js CHANGED
@@ -908,73 +908,6 @@ module.exports = function extend() {
908
908
  };
909
909
 
910
910
 
911
- /***/ }),
912
-
913
- /***/ 449:
914
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
915
-
916
- const regex = __webpack_require__(969)
917
-
918
- module.exports = BananaSlug
919
-
920
- const own = Object.hasOwnProperty
921
-
922
- function BananaSlug () {
923
- const self = this
924
-
925
- if (!(self instanceof BananaSlug)) return new BananaSlug()
926
-
927
- self.reset()
928
- }
929
-
930
- /**
931
- * Generate a unique slug.
932
- * @param {string} value String of text to slugify
933
- * @param {boolean} [false] Keep the current case, otherwise make all lowercase
934
- * @return {string} A unique slug string
935
- */
936
- BananaSlug.prototype.slug = function (value, maintainCase) {
937
- const self = this
938
- let slug = slugger(value, maintainCase === true)
939
- const originalSlug = slug
940
-
941
- while (own.call(self.occurrences, slug)) {
942
- self.occurrences[originalSlug]++
943
- slug = originalSlug + '-' + self.occurrences[originalSlug]
944
- }
945
-
946
- self.occurrences[slug] = 0
947
-
948
- return slug
949
- }
950
-
951
- /**
952
- * Reset - Forget all previous slugs
953
- * @return void
954
- */
955
- BananaSlug.prototype.reset = function () {
956
- this.occurrences = Object.create(null)
957
- }
958
-
959
- function slugger (string, maintainCase) {
960
- if (typeof string !== 'string') return ''
961
- if (!maintainCase) string = string.toLowerCase()
962
- return string.replace(regex, '').replace(/ /g, '-')
963
- }
964
-
965
- BananaSlug.slug = slugger
966
-
967
-
968
- /***/ }),
969
-
970
- /***/ 969:
971
- /***/ ((module) => {
972
-
973
- // This module is generated by `script/`.
974
- /* eslint-disable no-control-regex, no-misleading-character-class, no-useless-escape */
975
- module.exports = /[\0-\x1F!-,\.\/:-@\[-\^`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482\u0530\u0557\u0558\u055A-\u055F\u0589-\u0590\u05BE\u05C0\u05C3\u05C6\u05C8-\u05CF\u05EB-\u05EE\u05F3-\u060F\u061B-\u061F\u066A-\u066D\u06D4\u06DD\u06DE\u06E9\u06FD\u06FE\u0700-\u070F\u074B\u074C\u07B2-\u07BF\u07F6-\u07F9\u07FB\u07FC\u07FE\u07FF\u082E-\u083F\u085C-\u085F\u086B-\u089F\u08B5\u08C8-\u08D2\u08E2\u0964\u0965\u0970\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09F2-\u09FB\u09FD\u09FF\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF0-\u0AF8\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B54\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B70\u0B72-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BF0-\u0BFF\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5B-\u0C5F\u0C64\u0C65\u0C70-\u0C7F\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0CFF\u0D0D\u0D11\u0D45\u0D49\u0D4F-\u0D53\u0D58-\u0D5E\u0D64\u0D65\u0D70-\u0D79\u0D80\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DE5\u0DF0\u0DF1\u0DF4-\u0E00\u0E3B-\u0E3F\u0E4F\u0E5A-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F01-\u0F17\u0F1A-\u0F1F\u0F2A-\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F48\u0F6D-\u0F70\u0F85\u0F98\u0FBD-\u0FC5\u0FC7-\u0FFF\u104A-\u104F\u109E\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u1360-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16ED\u16F9-\u16FF\u170D\u1715-\u171F\u1735-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17D4-\u17D6\u17D8-\u17DB\u17DE\u17DF\u17EA-\u180A\u180E\u180F\u181A-\u181F\u1879-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191F\u192C-\u192F\u193C-\u1945\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DA-\u19FF\u1A1C-\u1A1F\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1AA6\u1AA8-\u1AAF\u1AC1-\u1AFF\u1B4C-\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BF4-\u1BFF\u1C38-\u1C3F\u1C4A-\u1C4C\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CCF\u1CD3\u1CFB-\u1CFF\u1DFA\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u203E\u2041-\u2053\u2055-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u20CF\u20F1-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u215F\u2189-\u24B5\u24EA-\u2BFF\u2C2F\u2C5F\u2CE5-\u2CEA\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E00-\u2E2E\u2E30-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u3040\u3097\u3098\u309B\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\u9FFD-\u9FFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA62C-\uA63F\uA673\uA67E\uA6F2-\uA716\uA720\uA721\uA789\uA78A\uA7C0\uA7C1\uA7CB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1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]/g
976
-
977
-
978
911
  /***/ }),
979
912
 
980
913
  /***/ 935:
@@ -9639,8 +9572,39 @@ __webpack_require__.d(commands_namespaceObject, {
9639
9572
  "unorderedListCommand": () => (unorderedListCommand)
9640
9573
  });
9641
9574
 
9575
+ ;// CONCATENATED MODULE: ../node_modules/@babel/runtime/helpers/esm/typeof.js
9576
+ function _typeof(obj) {
9577
+ "@babel/helpers - typeof";
9578
+
9579
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
9580
+ return typeof obj;
9581
+ } : function (obj) {
9582
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
9583
+ }, _typeof(obj);
9584
+ }
9585
+ ;// CONCATENATED MODULE: ../node_modules/@babel/runtime/helpers/esm/toPrimitive.js
9586
+
9587
+ function _toPrimitive(input, hint) {
9588
+ if (_typeof(input) !== "object" || input === null) return input;
9589
+ var prim = input[Symbol.toPrimitive];
9590
+ if (prim !== undefined) {
9591
+ var res = prim.call(input, hint || "default");
9592
+ if (_typeof(res) !== "object") return res;
9593
+ throw new TypeError("@@toPrimitive must return a primitive value.");
9594
+ }
9595
+ return (hint === "string" ? String : Number)(input);
9596
+ }
9597
+ ;// CONCATENATED MODULE: ../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
9598
+
9599
+
9600
+ function _toPropertyKey(arg) {
9601
+ var key = _toPrimitive(arg, "string");
9602
+ return _typeof(key) === "symbol" ? key : String(key);
9603
+ }
9642
9604
  ;// CONCATENATED MODULE: ../node_modules/@babel/runtime/helpers/esm/defineProperty.js
9605
+
9643
9606
  function _defineProperty(obj, key, value) {
9607
+ key = _toPropertyKey(key);
9644
9608
  if (key in obj) {
9645
9609
  Object.defineProperty(obj, key, {
9646
9610
  value: value,
@@ -9682,28 +9646,33 @@ function _arrayWithHoles(arr) {
9682
9646
  }
9683
9647
  ;// CONCATENATED MODULE: ../node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
9684
9648
  function _iterableToArrayLimit(arr, i) {
9685
- var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
9686
- if (_i == null) return;
9687
- var _arr = [];
9688
- var _n = true;
9689
- var _d = false;
9690
- var _s, _e;
9691
- try {
9692
- for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
9693
- _arr.push(_s.value);
9694
- if (i && _arr.length === i) break;
9695
- }
9696
- } catch (err) {
9697
- _d = true;
9698
- _e = err;
9699
- } finally {
9649
+ var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
9650
+ if (null != _i) {
9651
+ var _s,
9652
+ _e,
9653
+ _x,
9654
+ _r,
9655
+ _arr = [],
9656
+ _n = !0,
9657
+ _d = !1;
9700
9658
  try {
9701
- if (!_n && _i["return"] != null) _i["return"]();
9659
+ if (_x = (_i = _i.call(arr)).next, 0 === i) {
9660
+ if (Object(_i) !== _i) return;
9661
+ _n = !1;
9662
+ } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) {
9663
+ ;
9664
+ }
9665
+ } catch (err) {
9666
+ _d = !0, _e = err;
9702
9667
  } finally {
9703
- if (_d) throw _e;
9668
+ try {
9669
+ if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
9670
+ } finally {
9671
+ if (_d) throw _e;
9672
+ }
9704
9673
  }
9674
+ return _arr;
9705
9675
  }
9706
- return _arr;
9707
9676
  }
9708
9677
  ;// CONCATENATED MODULE: ../node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
9709
9678
  function _arrayLikeToArray(arr, len) {
@@ -9861,12 +9830,17 @@ function index(value) {
9861
9830
 
9862
9831
  class VFileMessage extends Error {
9863
9832
  /**
9864
- * Constructor of a message for `reason` at `place` from `origin`.
9865
- * When an error is passed in as `reason`, copies the `stack`.
9833
+ * Create a message for `reason` at `place` from `origin`.
9834
+ *
9835
+ * When an error is passed in as `reason`, the `stack` is copied.
9866
9836
  *
9867
- * @param {string|Error} reason Reason for message (`string` or `Error`). Uses the stack and message of the error if given.
9868
- * @param {Node|NodeLike|Position|Point} [place] Place at which the message occurred in a file (`Node`, `Position`, or `Point`, optional).
9869
- * @param {string} [origin] Place in code the message originates from (`string`, optional).
9837
+ * @param {string|Error|VFileMessage} reason
9838
+ * Reason for message.
9839
+ * Uses the stack and message of the error if given.
9840
+ * @param {Node|NodeLike|Position|Point} [place]
9841
+ * Place at which the message occurred in a file.
9842
+ * @param {string} [origin]
9843
+ * Place in code the message originates from (example `'my-package:my-rule-name'`)
9870
9844
  */
9871
9845
  constructor(reason, place, origin) {
9872
9846
  /** @type {[string|null, string|null]} */
@@ -9901,11 +9875,13 @@ class VFileMessage extends Error {
9901
9875
  // Node.
9902
9876
  if ('type' in place || 'position' in place) {
9903
9877
  if (place.position) {
9878
+ // @ts-expect-error: looks like a position.
9904
9879
  position = place.position
9905
9880
  }
9906
9881
  }
9907
9882
  // Position.
9908
9883
  else if ('start' in place || 'end' in place) {
9884
+ // @ts-expect-error: looks like a position.
9909
9885
  position = place
9910
9886
  }
9911
9887
  // Point.
@@ -9916,76 +9892,109 @@ class VFileMessage extends Error {
9916
9892
 
9917
9893
  // Fields from `Error`
9918
9894
  this.name = stringifyPosition(place) || '1:1'
9895
+ /** @type {string} */
9919
9896
  this.message = typeof reason === 'object' ? reason.message : reason
9920
- this.stack = typeof reason === 'object' ? reason.stack : ''
9897
+ /** @type {string} */
9898
+ this.stack = ''
9899
+
9900
+ if (typeof reason === 'object' && reason.stack) {
9901
+ this.stack = reason.stack
9902
+ }
9921
9903
 
9922
9904
  /**
9923
9905
  * Reason for message.
9906
+ *
9924
9907
  * @type {string}
9925
9908
  */
9926
9909
  this.reason = this.message
9910
+
9911
+ /* eslint-disable no-unused-expressions */
9927
9912
  /**
9928
- * If true, marks associated file as no longer processable.
9913
+ * Whether this is a fatal problem that marks an associated file as no
9914
+ * longer processable.
9915
+ * If `true`, marks associated file as no longer processable.
9916
+ * If `false`, necessitates a (potential) change.
9917
+ * The value can also be `null` or `undefined`, for things that might not
9918
+ * need changing.
9919
+ *
9929
9920
  * @type {boolean?}
9930
9921
  */
9931
- // eslint-disable-next-line no-unused-expressions
9932
9922
  this.fatal
9923
+
9933
9924
  /**
9934
9925
  * Starting line of error.
9926
+ *
9935
9927
  * @type {number?}
9936
9928
  */
9937
9929
  this.line = position.start.line
9930
+
9938
9931
  /**
9939
9932
  * Starting column of error.
9933
+ *
9940
9934
  * @type {number?}
9941
9935
  */
9942
9936
  this.column = position.start.column
9937
+
9943
9938
  /**
9944
- * Namespace of warning.
9939
+ * Full range information, when available.
9940
+ * Has `start` and `end` fields, both set to an object with `line` and
9941
+ * `column`, set to `number?`.
9942
+ *
9943
+ * @type {Position?}
9944
+ */
9945
+ this.position = position
9946
+
9947
+ /**
9948
+ * Namespace of warning (example: `'my-package'`).
9949
+ *
9945
9950
  * @type {string?}
9946
9951
  */
9947
9952
  this.source = parts[0]
9953
+
9948
9954
  /**
9949
- * Category of message.
9955
+ * Category of message (example: `'my-rule-name'`).
9956
+ *
9950
9957
  * @type {string?}
9951
9958
  */
9952
9959
  this.ruleId = parts[1]
9960
+
9953
9961
  /**
9954
- * Full range information, when available.
9955
- * Has start and end properties, both set to an object with line and column, set to number?.
9956
- * @type {Position?}
9962
+ * Path of a file (used throughout the VFile ecosystem).
9963
+ *
9964
+ * @type {string?}
9957
9965
  */
9958
- this.position = position
9966
+ this.file
9959
9967
 
9960
9968
  // The following fields are “well known”.
9961
9969
  // Not standard.
9962
9970
  // Feel free to add other non-standard fields to your messages.
9963
9971
 
9964
- /* eslint-disable no-unused-expressions */
9965
9972
  /**
9966
- * You can use this to specify the source value that’s being reported, which
9967
- * is deemed incorrect.
9973
+ * Specify the source value that’s being reported, which is deemed
9974
+ * incorrect.
9975
+ *
9968
9976
  * @type {string?}
9969
9977
  */
9970
9978
  this.actual
9979
+
9971
9980
  /**
9972
- * You can use this to suggest values that should be used instead of
9973
- * `actual`, one or more values that are deemed as acceptable.
9981
+ * Suggest values that should be used instead of `actual`, one or more
9982
+ * values that are deemed as acceptable.
9983
+ *
9974
9984
  * @type {Array<string>?}
9975
9985
  */
9976
9986
  this.expected
9987
+
9977
9988
  /**
9978
- * You may add a file property with a path of a file (used throughout the VFile ecosystem).
9979
- * @type {string?}
9980
- */
9981
- this.file
9982
- /**
9983
- * You may add a url property with a link to documentation for the message.
9989
+ * Link to documentation for the message.
9990
+ *
9984
9991
  * @type {string?}
9985
9992
  */
9986
9993
  this.url
9994
+
9987
9995
  /**
9988
- * You may add a note property with a long form description of the message (supported by vfile-reporter).
9996
+ * Long form description of the message (supported by `vfile-reporter`).
9997
+ *
9989
9998
  * @type {string?}
9990
9999
  */
9991
10000
  this.note
@@ -10830,7 +10839,7 @@ class VFile {
10830
10839
  * associates it with the file by adding it to `vfile.messages` and setting
10831
10840
  * `message.file` to the current filepath.
10832
10841
  *
10833
- * @param {string|Error} reason
10842
+ * @param {string|Error|VFileMessage} reason
10834
10843
  * Human readable reason for the message, uses the stack and message of the error if given.
10835
10844
  * @param {Node|NodeLike|Position|Point} [place]
10836
10845
  * Place where the message occurred in the file.
@@ -10858,7 +10867,7 @@ class VFile {
10858
10867
  * Like `VFile#message()`, but associates an informational message where
10859
10868
  * `fatal` is set to `null`.
10860
10869
  *
10861
- * @param {string|Error} reason
10870
+ * @param {string|Error|VFileMessage} reason
10862
10871
  * Human readable reason for the message, uses the stack and message of the error if given.
10863
10872
  * @param {Node|NodeLike|Position|Point} [place]
10864
10873
  * Place where the message occurred in the file.
@@ -10881,7 +10890,7 @@ class VFile {
10881
10890
  *
10882
10891
  * > 👉 **Note**: a fatal error means that a file is no longer processable.
10883
10892
  *
10884
- * @param {string|Error} reason
10893
+ * @param {string|Error|VFileMessage} reason
10885
10894
  * Human readable reason for the message, uses the stack and message of the error if given.
10886
10895
  * @param {Node|NodeLike|Position|Point} [place]
10887
10896
  * Place where the message occurred in the file.
@@ -22367,6 +22376,7 @@ const html_html = create({
22367
22376
  onAbort: null,
22368
22377
  onAfterPrint: null,
22369
22378
  onAuxClick: null,
22379
+ onBeforeMatch: null,
22370
22380
  onBeforePrint: null,
22371
22381
  onBeforeUnload: null,
22372
22382
  onBlur: null,
@@ -22433,6 +22443,7 @@ const html_html = create({
22433
22443
  onReset: null,
22434
22444
  onResize: null,
22435
22445
  onScroll: null,
22446
+ onScrollEnd: null,
22436
22447
  onSecurityPolicyViolation: null,
22437
22448
  onSeeked: null,
22438
22449
  onSeeking: null,
@@ -23351,6 +23362,15 @@ function camelcase($0) {
23351
23362
  }
23352
23363
 
23353
23364
  ;// CONCATENATED MODULE: ../node_modules/property-information/lib/hast-to-react.js
23365
+ /**
23366
+ * `hast` is close to `React`, but differs in a couple of cases.
23367
+ *
23368
+ * To get a React property from a hast property, check if it is in
23369
+ * `hastToReact`, if it is, then use the corresponding value,
23370
+ * otherwise, use the hast property.
23371
+ *
23372
+ * @type {Record<string, string>}
23373
+ */
23354
23374
  const hastToReact = {
23355
23375
  classId: 'classID',
23356
23376
  dataType: 'datatype',
@@ -23373,10 +23393,12 @@ const hastToReact = {
23373
23393
 
23374
23394
  ;// CONCATENATED MODULE: ../node_modules/space-separated-tokens/index.js
23375
23395
  /**
23376
- * Parse space separated tokens to an array of strings.
23396
+ * Parse space-separated tokens to an array of strings.
23377
23397
  *
23378
- * @param {string} value Space separated tokens
23379
- * @returns {Array.<string>} Tokens
23398
+ * @param {string} value
23399
+ * Space-separated tokens.
23400
+ * @returns {Array<string>}
23401
+ * List of tokens.
23380
23402
  */
23381
23403
  function space_separated_tokens_parse(value) {
23382
23404
  const input = String(value || '').trim()
@@ -23384,10 +23406,12 @@ function space_separated_tokens_parse(value) {
23384
23406
  }
23385
23407
 
23386
23408
  /**
23387
- * Serialize an array of strings as space separated tokens.
23409
+ * Serialize an array of strings as space separated-tokens.
23388
23410
  *
23389
- * @param {Array.<string|number>} values Tokens
23390
- * @returns {string} Space separated tokens
23411
+ * @param {Array<string|number>} values
23412
+ * List of tokens.
23413
+ * @returns {string}
23414
+ * Space-separated tokens.
23391
23415
  */
23392
23416
  function stringify(values) {
23393
23417
  return values.join(' ').trim()
@@ -23395,27 +23419,35 @@ function stringify(values) {
23395
23419
 
23396
23420
  ;// CONCATENATED MODULE: ../node_modules/comma-separated-tokens/index.js
23397
23421
  /**
23398
- * @typedef {Object} StringifyOptions
23399
- * @property {boolean} [padLeft=true] Whether to pad a space before a token (`boolean`, default: `true`).
23400
- * @property {boolean} [padRight=false] Whether to pad a space after a token (`boolean`, default: `false`).
23422
+ * @typedef Options
23423
+ * Configuration for `stringify`.
23424
+ * @property {boolean} [padLeft=true]
23425
+ * Whether to pad a space before a token.
23426
+ * @property {boolean} [padRight=false]
23427
+ * Whether to pad a space after a token.
23401
23428
  */
23402
23429
 
23403
23430
  /**
23404
- * Parse comma separated tokens to an array.
23431
+ * @typedef {Options} StringifyOptions
23432
+ * Please use `StringifyOptions` instead.
23433
+ */
23434
+
23435
+ /**
23436
+ * Parse comma-separated tokens to an array.
23405
23437
  *
23406
23438
  * @param {string} value
23407
- * @returns {Array.<string>}
23439
+ * Comma-separated tokens.
23440
+ * @returns {Array<string>}
23441
+ * List of tokens.
23408
23442
  */
23409
23443
  function comma_separated_tokens_parse(value) {
23410
- /** @type {Array.<string>} */
23411
- var tokens = []
23412
- var input = String(value || '')
23413
- var index = input.indexOf(',')
23414
- var start = 0
23444
+ /** @type {Array<string>} */
23445
+ const tokens = []
23446
+ const input = String(value || '')
23447
+ let index = input.indexOf(',')
23448
+ let start = 0
23415
23449
  /** @type {boolean} */
23416
- var end
23417
- /** @type {string} */
23418
- var token
23450
+ let end = false
23419
23451
 
23420
23452
  while (!end) {
23421
23453
  if (index === -1) {
@@ -23423,7 +23455,7 @@ function comma_separated_tokens_parse(value) {
23423
23455
  end = true
23424
23456
  }
23425
23457
 
23426
- token = input.slice(start, index).trim()
23458
+ const token = input.slice(start, index).trim()
23427
23459
 
23428
23460
  if (token || !end) {
23429
23461
  tokens.push(token)
@@ -23437,21 +23469,22 @@ function comma_separated_tokens_parse(value) {
23437
23469
  }
23438
23470
 
23439
23471
  /**
23440
- * Serialize an array of strings to comma separated tokens.
23472
+ * Serialize an array of strings or numbers to comma-separated tokens.
23441
23473
  *
23442
- * @param {Array.<string|number>} values
23443
- * @param {StringifyOptions} [options]
23474
+ * @param {Array<string|number>} values
23475
+ * List of tokens.
23476
+ * @param {Options} [options]
23477
+ * Configuration for `stringify` (optional).
23444
23478
  * @returns {string}
23479
+ * Comma-separated tokens.
23445
23480
  */
23446
23481
  function comma_separated_tokens_stringify(values, options) {
23447
- var settings = options || {}
23482
+ const settings = options || {}
23448
23483
 
23449
23484
  // Ensure the last empty entry is seen.
23450
- if (values[values.length - 1] === '') {
23451
- values = values.concat('')
23452
- }
23485
+ const input = values[values.length - 1] === '' ? [...values, ''] : values
23453
23486
 
23454
- return values
23487
+ return input
23455
23488
  .join(
23456
23489
  (settings.padRight ? ' ' : '') +
23457
23490
  ',' +
@@ -23523,7 +23556,8 @@ var style_to_object = __webpack_require__(13);
23523
23556
  * @typedef {ComponentPropsWithoutRef<'h1'> & ReactMarkdownProps & {level: number}} HeadingProps
23524
23557
  * @typedef {ComponentPropsWithoutRef<'li'> & ReactMarkdownProps & {checked: boolean|null, index: number, ordered: boolean}} LiProps
23525
23558
  * @typedef {ComponentPropsWithoutRef<'ol'> & ReactMarkdownProps & {depth: number, ordered: true}} OrderedListProps
23526
- * @typedef {ComponentPropsWithoutRef<'table'> & ReactMarkdownProps & {style?: Record<string, unknown>, isHeader: boolean}} TableCellProps
23559
+ * @typedef {ComponentPropsWithoutRef<'td'> & ReactMarkdownProps & {style?: Record<string, unknown>, isHeader: false}} TableDataCellProps
23560
+ * @typedef {ComponentPropsWithoutRef<'th'> & ReactMarkdownProps & {style?: Record<string, unknown>, isHeader: true}} TableHeaderCellProps
23527
23561
  * @typedef {ComponentPropsWithoutRef<'tr'> & ReactMarkdownProps & {isHeader: boolean}} TableRowProps
23528
23562
  * @typedef {ComponentPropsWithoutRef<'ul'> & ReactMarkdownProps & {depth: number, ordered: false}} UnorderedListProps
23529
23563
  *
@@ -23531,7 +23565,8 @@ var style_to_object = __webpack_require__(13);
23531
23565
  * @typedef {ComponentType<HeadingProps>} HeadingComponent
23532
23566
  * @typedef {ComponentType<LiProps>} LiComponent
23533
23567
  * @typedef {ComponentType<OrderedListProps>} OrderedListComponent
23534
- * @typedef {ComponentType<TableCellProps>} TableCellComponent
23568
+ * @typedef {ComponentType<TableDataCellProps>} TableDataCellComponent
23569
+ * @typedef {ComponentType<TableHeaderCellProps>} TableHeaderCellComponent
23535
23570
  * @typedef {ComponentType<TableRowProps>} TableRowComponent
23536
23571
  * @typedef {ComponentType<UnorderedListProps>} UnorderedListComponent
23537
23572
  *
@@ -23545,8 +23580,8 @@ var style_to_object = __webpack_require__(13);
23545
23580
  * @property {HeadingComponent|ReactMarkdownNames} h6
23546
23581
  * @property {LiComponent|ReactMarkdownNames} li
23547
23582
  * @property {OrderedListComponent|ReactMarkdownNames} ol
23548
- * @property {TableCellComponent|ReactMarkdownNames} td
23549
- * @property {TableCellComponent|ReactMarkdownNames} th
23583
+ * @property {TableDataCellComponent|ReactMarkdownNames} td
23584
+ * @property {TableHeaderCellComponent|ReactMarkdownNames} th
23550
23585
  * @property {TableRowComponent|ReactMarkdownNames} tr
23551
23586
  * @property {UnorderedListComponent|ReactMarkdownNames} ul
23552
23587
  *
@@ -23909,7 +23944,7 @@ function flattenPosition(pos) {
23909
23944
  ':',
23910
23945
  pos.end.column
23911
23946
  ]
23912
- .map((d) => String(d))
23947
+ .map(String)
23913
23948
  .join('')
23914
23949
  }
23915
23950
 
@@ -27497,7 +27532,7 @@ function inlineCodePeek() {
27497
27532
  /**
27498
27533
  * @typedef Options
27499
27534
  * Configuration (optional).
27500
- * @property {string|null|Array<string|null|undefined>} [align]
27535
+ * @property {string|null|ReadonlyArray<string|null|undefined>} [align]
27501
27536
  * One style for all columns, or styles for their respective columns.
27502
27537
  * Each style is either `'l'` (left), `'r'` (right), or `'c'` (center).
27503
27538
  * Other values are treated as `''`, which doesn’t place the colon in the
@@ -27642,7 +27677,7 @@ function inlineCodePeek() {
27642
27677
  /**
27643
27678
  * Generate a markdown ([GFM](https://docs.github.com/en/github/writing-on-github/working-with-advanced-formatting/organizing-information-with-tables)) table..
27644
27679
  *
27645
- * @param {Array<Array<string|null|undefined>>} table
27680
+ * @param {ReadonlyArray<ReadonlyArray<string|null|undefined>>} table
27646
27681
  * Table data (matrix of strings).
27647
27682
  * @param {Options} [options]
27648
27683
  * Configuration (optional).
@@ -29684,32 +29719,75 @@ function hast_to_hyperscript_parseStyle(value, tagName) {
29684
29719
  }
29685
29720
 
29686
29721
  ;// CONCATENATED MODULE: ../node_modules/zwitch/index.js
29687
- var zwitch_own = {}.hasOwnProperty
29688
-
29689
29722
  /**
29690
29723
  * @callback Handler
29691
- * @param {...unknown} value
29692
- * @return {unknown}
29693
- *
29694
- * @typedef {Record<string, Handler>} Handlers
29695
- *
29696
- * @typedef {Object} Options
29697
- * @property {Handler} [unknown]
29698
- * @property {Handler} [invalid]
29724
+ * Handle a value, with a certain ID field set to a certain value.
29725
+ * The ID field is passed to `zwitch`, and it’s value is this function’s
29726
+ * place on the `handlers` record.
29727
+ * @param {...any} parameters
29728
+ * Arbitrary parameters passed to the zwitch.
29729
+ * The first will be an object with a certain ID field set to a certain value.
29730
+ * @returns {any}
29731
+ * Anything!
29732
+ */
29733
+
29734
+ /**
29735
+ * @callback UnknownHandler
29736
+ * Handle values that do have a certain ID field, but it’s set to a value
29737
+ * that is not listed in the `handlers` record.
29738
+ * @param {unknown} value
29739
+ * An object with a certain ID field set to an unknown value.
29740
+ * @param {...any} rest
29741
+ * Arbitrary parameters passed to the zwitch.
29742
+ * @returns {any}
29743
+ * Anything!
29744
+ */
29745
+
29746
+ /**
29747
+ * @callback InvalidHandler
29748
+ * Handle values that do not have a certain ID field.
29749
+ * @param {unknown} value
29750
+ * Any unknown value.
29751
+ * @param {...any} rest
29752
+ * Arbitrary parameters passed to the zwitch.
29753
+ * @returns {void|null|undefined|never}
29754
+ * This should crash or return nothing.
29755
+ */
29756
+
29757
+ /**
29758
+ * @template {InvalidHandler} [Invalid=InvalidHandler]
29759
+ * @template {UnknownHandler} [Unknown=UnknownHandler]
29760
+ * @template {Record<string, Handler>} [Handlers=Record<string, Handler>]
29761
+ * @typedef Options
29762
+ * Configuration (required).
29763
+ * @property {Invalid} [invalid]
29764
+ * Handler to use for invalid values.
29765
+ * @property {Unknown} [unknown]
29766
+ * Handler to use for unknown values.
29699
29767
  * @property {Handlers} [handlers]
29768
+ * Handlers to use.
29700
29769
  */
29701
29770
 
29771
+ const zwitch_own = {}.hasOwnProperty
29772
+
29702
29773
  /**
29703
- * Handle values based on a property.
29774
+ * Handle values based on a field.
29704
29775
  *
29776
+ * @template {InvalidHandler} [Invalid=InvalidHandler]
29777
+ * @template {UnknownHandler} [Unknown=UnknownHandler]
29778
+ * @template {Record<string, Handler>} [Handlers=Record<string, Handler>]
29705
29779
  * @param {string} key
29706
- * @param {Options} [options]
29780
+ * Field to switch on.
29781
+ * @param {Options<Invalid, Unknown, Handlers>} [options]
29782
+ * Configuration (required).
29783
+ * @returns {{unknown: Unknown, invalid: Invalid, handlers: Handlers, (...parameters: Parameters<Handlers[keyof Handlers]>): ReturnType<Handlers[keyof Handlers]>, (...parameters: Parameters<Unknown>): ReturnType<Unknown>}}
29707
29784
  */
29708
29785
  function zwitch(key, options) {
29709
- var settings = options || {}
29786
+ const settings = options || {}
29710
29787
 
29711
29788
  /**
29712
29789
  * Handle one value.
29790
+ *
29713
29791
  * Based on the bound `key`, a respective handler will be called.
29714
29792
  * If `value` is not an object, or doesn’t have a `key` property, the special
29715
29793
  * “invalid” handler will be called.
@@ -29719,23 +29797,36 @@ function zwitch(key, options) {
29719
29797
  * All arguments, and the context object, are passed through to the handler,
29720
29798
  * and it’s result is returned.
29721
29799
  *
29722
- * @param {...unknown} [value]
29723
29800
  * @this {unknown}
29724
- * @returns {unknown}
29801
+ * Any context object.
29802
+ * @param {unknown} [value]
29803
+ * Any value.
29804
+ * @param {...unknown} parameters
29805
+ * Arbitrary parameters passed to the zwitch.
29725
29806
  * @property {Handler} invalid
29807
+ * Handle for values that do not have a certain ID field.
29726
29808
  * @property {Handler} unknown
29809
+ * Handle values that do have a certain ID field, but it’s set to a value
29810
+ * that is not listed in the `handlers` record.
29727
29811
  * @property {Handlers} handlers
29812
+ * Record of handlers.
29813
+ * @returns {unknown}
29814
+ * Anything.
29728
29815
  */
29729
- function one(value) {
29730
- var fn = one.invalid
29731
- var handlers = one.handlers
29816
+ function one(value, ...parameters) {
29817
+ /** @type {Handler|undefined} */
29818
+ let fn = one.invalid
29819
+ const handlers = one.handlers
29732
29820
 
29733
29821
  if (value && zwitch_own.call(value, key)) {
29734
- fn = zwitch_own.call(handlers, value[key]) ? handlers[value[key]] : one.unknown
29822
+ // @ts-expect-error Indexable.
29823
+ const id = String(value[key])
29824
+ // @ts-expect-error Indexable.
29825
+ fn = zwitch_own.call(handlers, id) ? handlers[id] : one.unknown
29735
29826
  }
29736
29827
 
29737
29828
  if (fn) {
29738
- return fn.apply(this, arguments)
29829
+ return fn.call(this, value, ...parameters)
29739
29830
  }
29740
29831
  }
29741
29832
 
@@ -29743,6 +29834,7 @@ function zwitch(key, options) {
29743
29834
  one.invalid = settings.invalid
29744
29835
  one.unknown = settings.unknown
29745
29836
 
29837
+ // @ts-expect-error: matches!
29746
29838
  return one
29747
29839
  }
29748
29840
 
@@ -30610,8 +30702,90 @@ function rehypeRaw(options = {}) {
30610
30702
  }
30611
30703
  }
30612
30704
 
30613
- // EXTERNAL MODULE: ../node_modules/github-slugger/index.js
30614
- var github_slugger = __webpack_require__(449);
30705
+ ;// CONCATENATED MODULE: ../node_modules/github-slugger/regex.js
30706
+ // This module is generated by `script/`.
30707
+ /* eslint-disable no-control-regex, no-misleading-character-class, no-useless-escape */
30708
+ const regex = /[\0-\x1F!-,\.\/:-@\[-\^`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482\u0530\u0557\u0558\u055A-\u055F\u0589-\u0590\u05BE\u05C0\u05C3\u05C6\u05C8-\u05CF\u05EB-\u05EE\u05F3-\u060F\u061B-\u061F\u066A-\u066D\u06D4\u06DD\u06DE\u06E9\u06FD\u06FE\u0700-\u070F\u074B\u074C\u07B2-\u07BF\u07F6-\u07F9\u07FB\u07FC\u07FE\u07FF\u082E-\u083F\u085C-\u085F\u086B-\u089F\u08B5\u08C8-\u08D2\u08E2\u0964\u0965\u0970\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09F2-\u09FB\u09FD\u09FF\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF0-\u0AF8\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B54\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B70\u0B72-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BF0-\u0BFF\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5B-\u0C5F\u0C64\u0C65\u0C70-\u0C7F\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0CFF\u0D0D\u0D11\u0D45\u0D49\u0D4F-\u0D53\u0D58-\u0D5E\u0D64\u0D65\u0D70-\u0D79\u0D80\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DE5\u0DF0\u0DF1\u0DF4-\u0E00\u0E3B-\u0E3F\u0E4F\u0E5A-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F01-\u0F17\u0F1A-\u0F1F\u0F2A-\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F48\u0F6D-\u0F70\u0F85\u0F98\u0FBD-\u0FC5\u0FC7-\u0FFF\u104A-\u104F\u109E\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u1360-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16ED\u16F9-\u16FF\u170D\u1715-\u171F\u1735-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17D4-\u17D6\u17D8-\u17DB\u17DE\u17DF\u17EA-\u180A\u180E\u180F\u181A-\u181F\u1879-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191F\u192C-\u192F\u193C-\u1945\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DA-\u19FF\u1A1C-\u1A1F\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1AA6\u1AA8-\u1AAF\u1AC1-\u1AFF\u1B4C-\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BF4-\u1BFF\u1C38-\u1C3F\u1C4A-\u1C4C\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CCF\u1CD3\u1CFB-\u1CFF\u1DFA\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u203E\u2041-\u2053\u2055-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u20CF\u20F1-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u215F\u2189-\u24B5\u24EA-\u2BFF\u2C2F\u2C5F\u2CE5-\u2CEA\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E00-\u2E2E\u2E30-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u3040\u3097\u3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A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD83C[\uDC00-\uDD2F\uDD4A-\uDD4F\uDD6A-\uDD6F\uDD8A-\uDFFF]|\uD83E[\uDC00-\uDFEF\uDFFA-\uDFFF]|\uD869[\uDEDE-\uDEFF]|\uD86D[\uDF35-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]/g
30709
+
30710
+ ;// CONCATENATED MODULE: ../node_modules/github-slugger/index.js
30711
+
30712
+
30713
+ const github_slugger_own = Object.hasOwnProperty
30714
+
30715
+ /**
30716
+ * Slugger.
30717
+ */
30718
+ class BananaSlug {
30719
+ /**
30720
+ * Create a new slug class.
30721
+ */
30722
+ constructor () {
30723
+ /** @type {Record<string, number>} */
30724
+ // eslint-disable-next-line no-unused-expressions
30725
+ this.occurrences
30726
+
30727
+ this.reset()
30728
+ }
30729
+
30730
+ /**
30731
+ * Generate a unique slug.
30732
+ *
30733
+ * Tracks previously generated slugs: repeated calls with the same value
30734
+ * will result in different slugs.
30735
+ * Use the `slug` function to get same slugs.
30736
+ *
30737
+ * @param {string} value
30738
+ * String of text to slugify
30739
+ * @param {boolean} [maintainCase=false]
30740
+ * Keep the current case, otherwise make all lowercase
30741
+ * @return {string}
30742
+ * A unique slug string
30743
+ */
30744
+ slug (value, maintainCase) {
30745
+ const self = this
30746
+ let result = slug(value, maintainCase === true)
30747
+ const originalSlug = result
30748
+
30749
+ while (github_slugger_own.call(self.occurrences, result)) {
30750
+ self.occurrences[originalSlug]++
30751
+ result = originalSlug + '-' + self.occurrences[originalSlug]
30752
+ }
30753
+
30754
+ self.occurrences[result] = 0
30755
+
30756
+ return result
30757
+ }
30758
+
30759
+ /**
30760
+ * Reset - Forget all previous slugs
30761
+ *
30762
+ * @return void
30763
+ */
30764
+ reset () {
30765
+ this.occurrences = Object.create(null)
30766
+ }
30767
+ }
30768
+
30769
+ /**
30770
+ * Generate a slug.
30771
+ *
30772
+ * Does not track previously generated slugs: repeated calls with the same value
30773
+ * will result in the exact same slug.
30774
+ * Use the `GithubSlugger` class to get unique slugs.
30775
+ *
30776
+ * @param {string} value
30777
+ * String of text to slugify
30778
+ * @param {boolean} [maintainCase=false]
30779
+ * Keep the current case, otherwise make all lowercase
30780
+ * @return {string}
30781
+ * A unique slug string
30782
+ */
30783
+ function slug (value, maintainCase) {
30784
+ if (typeof value !== 'string') return ''
30785
+ if (!maintainCase) value = value.toLowerCase()
30786
+ return value.replace(regex, '').replace(/ /g, '-')
30787
+ }
30788
+
30615
30789
  ;// CONCATENATED MODULE: ../node_modules/hast-util-has-property/index.js
30616
30790
  var hast_util_has_property_own = {}.hasOwnProperty
30617
30791
 
@@ -30743,26 +30917,35 @@ function hast_util_to_string_all(node) {
30743
30917
  * @typedef {import('hast').Root} Root
30744
30918
  */
30745
30919
 
30920
+ /**
30921
+ * @typedef Options
30922
+ * Configuration (optional).
30923
+ * @property {string} [prefix='']
30924
+ * Prefix to add in front of `id`s.
30925
+ */
30746
30926
 
30747
30927
 
30748
30928
 
30749
30929
 
30750
30930
 
30751
30931
 
30752
- const slugs = new github_slugger()
30932
+
30933
+ const slugs = new BananaSlug()
30753
30934
 
30754
30935
  /**
30755
30936
  * Plugin to add `id`s to headings.
30756
30937
  *
30757
- * @type {import('unified').Plugin<Array<void>, Root>}
30938
+ * @type {import('unified').Plugin<[Options?]|Array<void>, Root>}
30758
30939
  */
30759
- function rehypeSlug() {
30940
+ function rehypeSlug(options = {}) {
30941
+ const prefix = options.prefix || ''
30942
+
30760
30943
  return (tree) => {
30761
30944
  slugs.reset()
30762
30945
 
30763
30946
  visit(tree, 'element', (node) => {
30764
30947
  if (headingRank(node) && node.properties && !hasProperty(node, 'id')) {
30765
- node.properties.id = slugs.slug(hast_util_to_string_toString(node))
30948
+ node.properties.id = prefix + slugs.slug(hast_util_to_string_toString(node))
30766
30949
  }
30767
30950
  })
30768
30951
  }
@@ -31205,7 +31388,7 @@ const prevChild = (data = [], index) => {
31205
31388
  }
31206
31389
  return;
31207
31390
  };
31208
- const nextChild = (data = [], index, tagName) => {
31391
+ const nextChild = (data = [], index, tagName, codeBlockParames) => {
31209
31392
  let i = index;
31210
31393
  while (i < data.length) {
31211
31394
  i++;
@@ -31217,15 +31400,26 @@ const nextChild = (data = [], index, tagName) => {
31217
31400
  }
31218
31401
  else {
31219
31402
  const element = data[i];
31220
- if (!element || (element.type !== 'text' && element.type !== 'comment') || (element.type === 'text' && element.value.replace(/(\n|\s)/g, '') !== ''))
31403
+ if (!element || element.type === 'element')
31221
31404
  return;
31222
- if (element.type === 'comment') {
31223
- if (!/^rehype:/.test(element.value))
31224
- return;
31225
- const nextNode = nextChild(data, i, 'pre');
31226
- if (nextNode)
31405
+ if (element.type === 'text' && element.value.replace(/(\n|\s)/g, '') !== '')
31406
+ return;
31407
+ if (/^(comment|raw)$/ig.test(element?.type)) {
31408
+ if (!/^rehype:/.test(element.value?.replace(/^(\s+)?<!--(.*?)-->/, '$2') || '')) {
31227
31409
  return;
31228
- return element;
31410
+ }
31411
+ ;
31412
+ if (codeBlockParames) {
31413
+ const nextNode = nextChild(data, i, 'pre', codeBlockParames);
31414
+ if (nextNode)
31415
+ return;
31416
+ element.value = element.value?.replace(/^(\n|\s)+/, '');
31417
+ return element;
31418
+ }
31419
+ else {
31420
+ element.value = element.value?.replace(/^(\n|\s)+/, '');
31421
+ return element;
31422
+ }
31229
31423
  }
31230
31424
  }
31231
31425
  }
@@ -31238,7 +31432,7 @@ const nextChild = (data = [], index, tagName) => {
31238
31432
  * @returns 返回 当前参数数据 Object,`{}`
31239
31433
  */
31240
31434
  const getCommentObject = ({ value = '' }) => {
31241
- const param = getURLParameters(value.replace(/^rehype:/, ''));
31435
+ const param = getURLParameters(value.replace(/^<!--(.*?)-->/, '$1').replace(/^rehype:/, ''));
31242
31436
  Object.keys(param).forEach((keyName) => {
31243
31437
  if (param[keyName] === 'true') {
31244
31438
  param[keyName] = true;
@@ -31265,14 +31459,11 @@ const propertiesHandle = (defaultAttrs, attrs, type) => {
31265
31459
  ;// CONCATENATED MODULE: ../node_modules/rehype-attr/lib/index.js
31266
31460
 
31267
31461
 
31268
- const defaultOptions = {
31269
- properties: 'data',
31270
- };
31271
- const rehypeAttrs = (options) => {
31272
- const opts = { ...defaultOptions, ...options };
31462
+ const rehypeAttrs = (options = {}) => {
31463
+ const { properties = 'data', codeBlockParames = true } = options;
31273
31464
  return (tree) => {
31274
31465
  visit(tree, 'element', (node, index, parent) => {
31275
- if (node.tagName === 'pre' && node && Array.isArray(node.children) && parent && Array.isArray(parent.children) && parent.children.length > 1) {
31466
+ if (codeBlockParames && node.tagName === 'pre' && node && Array.isArray(node.children) && parent && Array.isArray(parent.children) && parent.children.length > 1) {
31276
31467
  const firstChild = node.children[0];
31277
31468
  if (firstChild && firstChild.tagName === 'code' && typeof index === 'number') {
31278
31469
  const child = prevChild(parent.children, index);
@@ -31280,17 +31471,17 @@ const rehypeAttrs = (options) => {
31280
31471
  const attr = getCommentObject(child);
31281
31472
  if (Object.keys(attr).length > 0) {
31282
31473
  node.properties = { ...node.properties, ...{ 'data-type': 'rehyp' } };
31283
- firstChild.properties = propertiesHandle(firstChild.properties, attr, opts.properties);
31474
+ firstChild.properties = propertiesHandle(firstChild.properties, attr, properties);
31284
31475
  }
31285
31476
  }
31286
31477
  }
31287
31478
  }
31288
31479
  if (/^(em|strong|b|a|i|p|pre|kbd|blockquote|h(1|2|3|4|5|6)|code|table|img|del|ul|ol)$/.test(node.tagName) && parent && Array.isArray(parent.children) && typeof index === 'number') {
31289
- const child = nextChild(parent.children, index);
31480
+ const child = nextChild(parent.children, index, '', codeBlockParames);
31290
31481
  if (child) {
31291
31482
  const attr = getCommentObject(child);
31292
31483
  if (Object.keys(attr).length > 0) {
31293
- node.properties = propertiesHandle(node.properties, attr, opts.properties);
31484
+ node.properties = propertiesHandle(node.properties, attr, properties);
31294
31485
  }
31295
31486
  }
31296
31487
  }
@@ -33058,11 +33249,11 @@ function java(Prism) {
33058
33249
 
33059
33250
  ;// CONCATENATED MODULE: ../node_modules/refractor/lang/regex.js
33060
33251
  // @ts-nocheck
33061
- regex.displayName = 'regex'
33062
- regex.aliases = []
33252
+ regex_regex.displayName = 'regex'
33253
+ regex_regex.aliases = []
33063
33254
 
33064
33255
  /** @type {import('../core.js').Syntax} */
33065
- function regex(Prism) {
33256
+ function regex_regex(Prism) {
33066
33257
  ;(function (Prism) {
33067
33258
  var specialEscape = {
33068
33259
  pattern: /\\[\\(){}[\]^$+*?|.]/,
@@ -37606,7 +37797,7 @@ refractor.register(diff)
37606
37797
  refractor.register(go)
37607
37798
  refractor.register(ini)
37608
37799
  refractor.register(java)
37609
- refractor.register(regex)
37800
+ refractor.register(regex_regex)
37610
37801
  refractor.register(javascript)
37611
37802
  refractor.register(json)
37612
37803
  refractor.register(kotlin)
@@ -57904,7 +58095,7 @@ function zig(Prism) {
57904
58095
  refractor.register(markup)
57905
58096
  refractor.register(css)
57906
58097
  refractor.register(clike)
57907
- refractor.register(regex)
58098
+ refractor.register(regex_regex)
57908
58099
  refractor.register(javascript)
57909
58100
  refractor.register(abap)
57910
58101
  refractor.register(abnf)
@@ -58633,47 +58824,74 @@ function indexedSearch(query, parent, state, from, firstElementOnly) {
58633
58824
  ;// CONCATENATED MODULE: ../node_modules/bcp-47-match/index.js
58634
58825
  /**
58635
58826
  * See <https://tools.ietf.org/html/rfc4647#section-3.1>
58636
- * for more information on the algorithms.
58827
+ * for more info on the algorithms.
58637
58828
  */
58638
58829
 
58639
58830
  /**
58640
58831
  * @typedef {string} Tag
58832
+ * BCP-47 tag.
58641
58833
  * @typedef {Array<Tag>} Tags
58834
+ * List of BCP-47 tags.
58642
58835
  * @typedef {string} Range
58836
+ * RFC 4647 range.
58643
58837
  * @typedef {Array<Range>} Ranges
58838
+ * List of RFC 4647 range.
58644
58839
  *
58645
58840
  * @callback Check
58841
+ * An internal check.
58646
58842
  * @param {Tag} tag
58843
+ * BCP-47 tag.
58647
58844
  * @param {Range} range
58845
+ * RFC 4647 range.
58648
58846
  * @returns {boolean}
58847
+ * Whether the range matches the tag.
58649
58848
  *
58650
58849
  * @typedef {FilterOrLookup<true>} Filter
58850
+ * Filter: yields all tags that match a range.
58651
58851
  * @typedef {FilterOrLookup<false>} Lookup
58852
+ * Lookup: yields the best tag that matches a range.
58652
58853
  */
58653
58854
 
58654
58855
  /**
58655
58856
  * @template {boolean} IsFilter
58857
+ * Whether to filter or perform a lookup.
58656
58858
  * @callback FilterOrLookup
58859
+ * A check.
58657
58860
  * @param {Tag|Tags} tags
58658
- * @param {Range|Ranges} [ranges='*']
58861
+ * One or more BCP-47 tags.
58862
+ * @param {Range|Ranges|undefined} [ranges='*']
58863
+ * One or more RFC 4647 ranges.
58659
58864
  * @returns {IsFilter extends true ? Tags : Tag|undefined}
58865
+ * Result.
58660
58866
  */
58661
58867
 
58662
58868
  /**
58663
58869
  * Factory to perform a filter or a lookup.
58870
+ *
58664
58871
  * This factory creates a function that accepts a list of tags and a list of
58665
58872
  * ranges, and contains logic to exit early for lookups.
58666
58873
  * `check` just has to deal with one tag and one range.
58667
58874
  * This match function iterates over ranges, and for each range,
58668
- * iterates over tags. That way, earlier ranges matching any tag have
58669
- * precedence over later ranges.
58875
+ * iterates over tags.
58876
+ * That way, earlier ranges matching any tag have precedence over later ranges.
58670
58877
  *
58671
58878
  * @template {boolean} IsFilter
58672
58879
  * @param {Check} check
58880
+ * A check.
58673
58881
  * @param {IsFilter} filter
58882
+ * Whether to filter or perform a lookup.
58674
58883
  * @returns {FilterOrLookup<IsFilter>}
58884
+ * Filter or lookup.
58675
58885
  */
58676
58886
  function bcp_47_match_factory(check, filter) {
58887
+ /**
58888
+ * @param {Tag|Tags} tags
58889
+ * One or more BCP-47 tags.
58890
+ * @param {Range|Ranges|undefined} [ranges='*']
58891
+ * One or more RFC 4647 ranges.
58892
+ * @returns {IsFilter extends true ? Tags : Tag|undefined}
58893
+ * Result.
58894
+ */
58677
58895
  return function (tags, ranges) {
58678
58896
  let left = cast(tags, 'tag')
58679
58897
  const right = cast(
@@ -58723,6 +58941,13 @@ function bcp_47_match_factory(check, filter) {
58723
58941
  /**
58724
58942
  * Basic Filtering (Section 3.3.1) matches a language priority list consisting
58725
58943
  * of basic language ranges (Section 2.1) to sets of language tags.
58944
+ *
58945
+ * @param {Tag|Tags} tags
58946
+ * One or more BCP-47 tags.
58947
+ * @param {Range|Ranges|undefined} [ranges='*']
58948
+ * One or more RFC 4647 ranges.
58949
+ * @returns {Tags}
58950
+ * List of BCP-47 tags.
58726
58951
  */
58727
58952
  const basicFilter = bcp_47_match_factory(function (tag, range) {
58728
58953
  return range === '*' || tag === range || tag.includes(range + '-')
@@ -58732,6 +58957,13 @@ const basicFilter = bcp_47_match_factory(function (tag, range) {
58732
58957
  * Extended Filtering (Section 3.3.2) matches a language priority list
58733
58958
  * consisting of extended language ranges (Section 2.2) to sets of language
58734
58959
  * tags.
58960
+ *
58961
+ * @param {Tag|Tags} tags
58962
+ * One or more BCP-47 tags.
58963
+ * @param {Range|Ranges|undefined} [ranges='*']
58964
+ * One or more RFC 4647 ranges.
58965
+ * @returns {Tags}
58966
+ * List of BCP-47 tags.
58735
58967
  */
58736
58968
  const extendedFilter = bcp_47_match_factory(function (tag, range) {
58737
58969
  // 3.3.2.1
@@ -58781,6 +59013,13 @@ const extendedFilter = bcp_47_match_factory(function (tag, range) {
58781
59013
  * Lookup (Section 3.4) matches a language priority list consisting of basic
58782
59014
  * language ranges to sets of language tags to find the one exact language tag
58783
59015
  * that best matches the range.
59016
+ *
59017
+ * @param {Tag|Tags} tags
59018
+ * One or more BCP-47 tags.
59019
+ * @param {Range|Ranges|undefined} [ranges='*']
59020
+ * One or more RFC 4647 ranges.
59021
+ * @returns {Tag|undefined}
59022
+ * BCP-47 tag.
58784
59023
  */
58785
59024
  const lookup = bcp_47_match_factory(function (tag, range) {
58786
59025
  let right = range
@@ -62535,7 +62774,7 @@ const rehype = unified().use(rehypeParse).use(rehypeStringify).freeze()
62535
62774
 
62536
62775
  ;// CONCATENATED MODULE: ./src/components/TextArea/Markdown.tsx
62537
62776
  var _templateObject;function html2Escape(sHtml){return sHtml.replace(/```(\w+)?([\s\S]*?)(\s.+)?```/g,function(str){return str.replace(/[<&"]/g,function(c){return{'<':'&lt;','>':'&gt;','&':'&amp;','"':'&quot;'}[c];});}).replace(/[<&"]/g,function(c){return{'<':'&lt;','>':'&gt;','&':'&amp;','"':'&quot;'}[c];});}function Markdown(props){var prefixCls=props.prefixCls;var _useContext=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(EditorContext),_useContext$markdown=_useContext.markdown,markdown=_useContext$markdown===void 0?'':_useContext$markdown,highlightEnable=_useContext.highlightEnable,dispatch=_useContext.dispatch;var preRef=/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createRef();(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function(){if(preRef.current&&dispatch){dispatch({textareaPre:preRef.current});}// eslint-disable-next-line react-hooks/exhaustive-deps
62538
- },[]);if(!markdown){return/*#__PURE__*/(0,jsx_runtime.jsx)("pre",{ref:preRef,className:"".concat(prefixCls,"-text-pre wmde-markdown-color")});}var mdStr="<pre class=\"language-markdown ".concat(prefixCls,"-text-pre wmde-markdown-color\"><code class=\"language-markdown\">").concat(html2Escape(String.raw(_templateObject||(_templateObject=_taggedTemplateLiteral(["",""])),markdown)),"\n</code></pre>");console.log('markdown::',markdown);if(highlightEnable){try{mdStr=rehype().data('settings',{fragment:true}).use(m,{ignoreMissing:true}).processSync(mdStr).toString();}catch(error){}}return/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement('div',{className:'wmde-markdown-color',dangerouslySetInnerHTML:{__html:mdStr||''}});}
62777
+ },[]);if(!markdown){return/*#__PURE__*/(0,jsx_runtime.jsx)("pre",{ref:preRef,className:"".concat(prefixCls,"-text-pre wmde-markdown-color")});}var mdStr="<pre class=\"language-markdown ".concat(prefixCls,"-text-pre wmde-markdown-color\"><code class=\"language-markdown\">").concat(html2Escape(String.raw(_templateObject||(_templateObject=_taggedTemplateLiteral(["",""])),markdown)),"\n</code></pre>");if(highlightEnable){try{mdStr=rehype().data('settings',{fragment:true}).use(m,{ignoreMissing:true}).processSync(mdStr).toString();}catch(error){}}return/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement('div',{className:'wmde-markdown-color',dangerouslySetInnerHTML:{__html:mdStr||''}});}
62539
62778
  ;// CONCATENATED MODULE: ../node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
62540
62779
 
62541
62780
  function _arrayWithoutHoles(arr) {
@@ -62564,13 +62803,14 @@ function _classCallCheck(instance, Constructor) {
62564
62803
  }
62565
62804
  }
62566
62805
  ;// CONCATENATED MODULE: ../node_modules/@babel/runtime/helpers/esm/createClass.js
62806
+
62567
62807
  function _defineProperties(target, props) {
62568
62808
  for (var i = 0; i < props.length; i++) {
62569
62809
  var descriptor = props[i];
62570
62810
  descriptor.enumerable = descriptor.enumerable || false;
62571
62811
  descriptor.configurable = true;
62572
62812
  if ("value" in descriptor) descriptor.writable = true;
62573
- Object.defineProperty(target, descriptor.key, descriptor);
62813
+ Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
62574
62814
  }
62575
62815
  }
62576
62816
  function _createClass(Constructor, protoProps, staticProps) {
@@ -62643,10 +62883,10 @@ var end=text.length;// iterate to the left
62643
62883
  for(var i=position;i-1>-1;i--){if(isWordDelimiter(text[i-1])){start=i;break;}}// iterate to the right
62644
62884
  for(var _i=position;_i<text.length;_i++){if(isWordDelimiter(text[_i])){end=_i;break;}}return{start:start,end:end};}
62645
62885
  ;// CONCATENATED MODULE: ./src/commands/bold.tsx
62646
- var bold={name:'bold',keyCommand:'bold',shortcuts:'ctrlcmd+b',value:'**',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){// Adjust the selection to encompass the whole word if the caret is inside one
62886
+ var bold={name:'bold',keyCommand:'bold',shortcuts:'ctrlcmd+b',value:'**',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 _state1$selectedText;// Adjust the selection to encompass the whole word if the caret is inside one
62647
62887
  var newSelectionRange=selectWord({text:state.text,selection:state.selection});var state1=api.setSelectionRange(newSelectionRange);// Replaces the current selection with the bold mark up
62648
62888
  var state2=api.replaceSelection("**".concat(state1.selectedText,"**"));// Adjust the selection to not contain the **
62649
- api.setSelectionRange({start:state2.selection.end-2-state1.selectedText.length,end:state2.selection.end-2});}};
62889
+ api.setSelectionRange({start:state2.selection.end-2-((_state1$selectedText=state1.selectedText)===null||_state1$selectedText===void 0?void 0:_state1$selectedText.length),end:state2.selection.end-2});}};
62650
62890
  ;// CONCATENATED MODULE: ./src/commands/code.tsx
62651
62891
  var code_code={name:'code',keyCommand:'code',shortcuts:'ctrlcmd+j',value:'``',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(tate,api){// Adjust the selection to encompass the whole word if the caret is inside one
62652
62892
  var newSelectionRange=selectWord({text:tate.text,selection:tate.selection});var state1=api.setSelectionRange(newSelectionRange);// when there's no breaking line
@@ -62718,7 +62958,7 @@ var title5={name:'title5',keyCommand:'title5',shortcuts:'ctrlcmd+5',value:'title
62718
62958
  ;// CONCATENATED MODULE: ./src/commands/title6.tsx
62719
62959
  var title6={name:'title6',keyCommand:'title6',shortcuts:'ctrlcmd+6',value:'title6',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){if(state.selection.start===0||/\n$/.test(state.text)){api.replaceSelection('###### ');}else{insertAtLineStart('###### ',state.selection.start,api.textArea);}}};
62720
62960
  ;// CONCATENATED MODULE: ./src/commands/index.ts
62721
- 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){return{selection:{start:textArea.selectionStart,end:textArea.selectionEnd},text:textArea.value,selectedText:textArea.value.slice(textArea.selectionStart,textArea.selectionEnd)};}var TextAreaTextApi=/*#__PURE__*/function(){function TextAreaTextApi(textArea){_classCallCheck(this,TextAreaTextApi);this.textArea=void 0;this.textArea=textArea;}/**
62961
+ 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;}/**
62722
62962
  * Replaces the current selection with the new text. This will make the new selectedText to be empty, the
62723
62963
  * selection start and selection end will be the same and will both point to the end
62724
62964
  * @param text Text that should replace the current selection
@@ -62732,7 +62972,7 @@ var commands_getCommands=function getCommands(){return[bold,italic,strikeThrough
62732
62972
  * - `9` - `Tab`
62733
62973
  */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);/**
62734
62974
  * `9` - `Tab`
62735
- */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.code&&e.code.toLowerCase()==='enter'&&(/^(-|\*)\s/.test(currentLineStr)||/^\d+.\s/.test(currentLineStr))){/**
62975
+ */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))){/**
62736
62976
  * `13` - `Enter`
62737
62977
  */stopPropagation(e);var startStr='\n- ';if(currentLineStr.startsWith('*')){startStr='\n* ';}if(currentLineStr.startsWith('- [ ]')){startStr='\n- [ ] ';}else if(currentLineStr.startsWith('- [X]')){startStr='\n- [X] ';}if(/^\d+.\s/.test(currentLineStr)){startStr="\n".concat(parseInt(currentLineStr)+1,". ");}return insertTextAtPosition(target,startStr);}}
62738
62978
  ;// CONCATENATED MODULE: ./src/components/TextArea/index.less