@uiw/react-md-editor 3.20.7 → 3.20.9

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
@@ -14,20 +14,22 @@ return /******/ (() => { // webpackBootstrap
14
14
  /***/ 7071:
15
15
  /***/ (function(module) {
16
16
 
17
- /*!
18
- * @uiw/copy-to-clipboard v1.0.12
19
- * Copy to clipboard.
17
+ /**!
18
+ * @uiw/copy-to-clipboard v1.0.14
19
+ * Copy to clipboard.
20
20
  *
21
- * Copyright (c) 2021 Kenny Wang
22
- * https://github.com/uiwjs/copy-to-clipboard.git
21
+ * Copyright (c) 2023 Kenny Wang
22
+ * https://github.com/uiwjs/copy-to-clipboard.git
23
23
  *
24
- * Licensed under the MIT license.
24
+ * @website: https://uiwjs.github.io/copy-to-clipboard
25
+
26
+ * Licensed under the MIT license
25
27
  */
26
28
 
27
29
  (function (global, factory) {
28
30
  true ? module.exports = factory() :
29
31
  0;
30
- }(this, (function () { 'use strict';
32
+ })(this, (function () { 'use strict';
31
33
 
32
34
  /**
33
35
  * *** This styling is an extra step which is likely not required. ***
@@ -82,7 +84,7 @@ return /******/ (() => { // webpackBootstrap
82
84
 
83
85
  return copyTextToClipboard;
84
86
 
85
- })));
87
+ }));
86
88
  //# sourceMappingURL=copy-to-clipboard.umd.js.map
87
89
 
88
90
 
@@ -17404,7 +17406,7 @@ __webpack_require__.d(__webpack_exports__, {
17404
17406
  "unorderedListCommand": () => (/* reexport */ unorderedListCommand)
17405
17407
  });
17406
17408
 
17407
- // NAMESPACE OBJECT: ../node_modules/micromark/lib/constructs.js
17409
+ // NAMESPACE OBJECT: ../node_modules/react-markdown/node_modules/micromark/lib/constructs.js
17408
17410
  var constructs_namespaceObject = {};
17409
17411
  __webpack_require__.r(constructs_namespaceObject);
17410
17412
  __webpack_require__.d(constructs_namespaceObject, {
@@ -17657,7 +17659,7 @@ function _extends() {
17657
17659
  }
17658
17660
  // EXTERNAL MODULE: ../node_modules/is-buffer/index.js
17659
17661
  var is_buffer = __webpack_require__(5372);
17660
- ;// CONCATENATED MODULE: ../node_modules/unist-util-stringify-position/lib/index.js
17662
+ ;// CONCATENATED MODULE: ../node_modules/vfile-message/node_modules/unist-util-stringify-position/lib/index.js
17661
17663
  /**
17662
17664
  * @typedef {import('unist').Node} Node
17663
17665
  * @typedef {import('unist').Point} Point
@@ -19834,7 +19836,7 @@ function looksLikeAVFileValue(value) {
19834
19836
  return typeof value === 'string' || is_buffer(value)
19835
19837
  }
19836
19838
 
19837
- ;// CONCATENATED MODULE: ../node_modules/mdast-util-to-string/lib/index.js
19839
+ ;// CONCATENATED MODULE: ../node_modules/react-markdown/node_modules/mdast-util-to-string/lib/index.js
19838
19840
  /**
19839
19841
  * @typedef {import('mdast').Root|import('mdast').Content} Node
19840
19842
  *
@@ -20388,7 +20390,7 @@ function factorySpace(effects, ok, type, max) {
20388
20390
  }
20389
20391
  }
20390
20392
 
20391
- ;// CONCATENATED MODULE: ../node_modules/micromark/lib/initialize/content.js
20393
+ ;// CONCATENATED MODULE: ../node_modules/react-markdown/node_modules/micromark/lib/initialize/content.js
20392
20394
  /**
20393
20395
  * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct
20394
20396
  * @typedef {import('micromark-util-types').Initializer} Initializer
@@ -20469,7 +20471,7 @@ function initializeContent(effects) {
20469
20471
  }
20470
20472
  }
20471
20473
 
20472
- ;// CONCATENATED MODULE: ../node_modules/micromark/lib/initialize/document.js
20474
+ ;// CONCATENATED MODULE: ../node_modules/react-markdown/node_modules/micromark/lib/initialize/document.js
20473
20475
  /**
20474
20476
  * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct
20475
20477
  * @typedef {import('micromark-util-types').Initializer} Initializer
@@ -21244,7 +21246,7 @@ function tokenizeContinuation(effects, ok, nok) {
21244
21246
  }
21245
21247
  }
21246
21248
 
21247
- ;// CONCATENATED MODULE: ../node_modules/micromark/lib/initialize/flow.js
21249
+ ;// CONCATENATED MODULE: ../node_modules/react-markdown/node_modules/micromark/lib/initialize/flow.js
21248
21250
  /**
21249
21251
  * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct
21250
21252
  * @typedef {import('micromark-util-types').Initializer} Initializer
@@ -21311,7 +21313,7 @@ function initializeFlow(effects) {
21311
21313
  }
21312
21314
  }
21313
21315
 
21314
- ;// CONCATENATED MODULE: ../node_modules/micromark/lib/initialize/text.js
21316
+ ;// CONCATENATED MODULE: ../node_modules/react-markdown/node_modules/micromark/lib/initialize/text.js
21315
21317
  /**
21316
21318
  * @typedef {import('micromark-util-types').Resolver} Resolver
21317
21319
  * @typedef {import('micromark-util-types').Initializer} Initializer
@@ -21563,7 +21565,7 @@ function resolveAll(constructs, events, context) {
21563
21565
  return events
21564
21566
  }
21565
21567
 
21566
- ;// CONCATENATED MODULE: ../node_modules/micromark/lib/create-tokenizer.js
21568
+ ;// CONCATENATED MODULE: ../node_modules/react-markdown/node_modules/micromark/lib/create-tokenizer.js
21567
21569
  /**
21568
21570
  * @typedef {import('micromark-util-types').Code} Code
21569
21571
  * @typedef {import('micromark-util-types').Chunk} Chunk
@@ -26168,7 +26170,7 @@ function tokenizeCodeText(effects, ok, nok) {
26168
26170
  }
26169
26171
  }
26170
26172
 
26171
- ;// CONCATENATED MODULE: ../node_modules/micromark/lib/constructs.js
26173
+ ;// CONCATENATED MODULE: ../node_modules/react-markdown/node_modules/micromark/lib/constructs.js
26172
26174
  /**
26173
26175
  * @typedef {import('micromark-util-types').Extension} Extension
26174
26176
  */
@@ -26254,7 +26256,7 @@ const disable = {
26254
26256
  null: []
26255
26257
  }
26256
26258
 
26257
- ;// CONCATENATED MODULE: ../node_modules/micromark/lib/parse.js
26259
+ ;// CONCATENATED MODULE: ../node_modules/react-markdown/node_modules/micromark/lib/parse.js
26258
26260
  /**
26259
26261
  * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct
26260
26262
  * @typedef {import('micromark-util-types').FullNormalizedExtension} FullNormalizedExtension
@@ -26308,7 +26310,7 @@ function parse_parse(options = {}) {
26308
26310
  }
26309
26311
  }
26310
26312
 
26311
- ;// CONCATENATED MODULE: ../node_modules/micromark/lib/preprocess.js
26313
+ ;// CONCATENATED MODULE: ../node_modules/react-markdown/node_modules/micromark/lib/preprocess.js
26312
26314
  /**
26313
26315
  * @typedef {import('micromark-util-types').Encoding} Encoding
26314
26316
  * @typedef {import('micromark-util-types').Value} Value
@@ -26439,7 +26441,7 @@ function preprocess() {
26439
26441
  }
26440
26442
  }
26441
26443
 
26442
- ;// CONCATENATED MODULE: ../node_modules/micromark/lib/postprocess.js
26444
+ ;// CONCATENATED MODULE: ../node_modules/react-markdown/node_modules/micromark/lib/postprocess.js
26443
26445
  /**
26444
26446
  * @typedef {import('micromark-util-types').Event} Event
26445
26447
  */
@@ -26531,7 +26533,93 @@ function decode($0, $1, $2) {
26531
26533
  return decodeNamedCharacterReference($2) || $0
26532
26534
  }
26533
26535
 
26534
- ;// CONCATENATED MODULE: ../node_modules/mdast-util-from-markdown/lib/index.js
26536
+ ;// CONCATENATED MODULE: ../node_modules/react-markdown/node_modules/unist-util-stringify-position/lib/index.js
26537
+ /**
26538
+ * @typedef {import('unist').Node} Node
26539
+ * @typedef {import('unist').Point} Point
26540
+ * @typedef {import('unist').Position} Position
26541
+ */
26542
+
26543
+ /**
26544
+ * @typedef NodeLike
26545
+ * @property {string} type
26546
+ * @property {PositionLike | null | undefined} [position]
26547
+ *
26548
+ * @typedef PositionLike
26549
+ * @property {PointLike | null | undefined} [start]
26550
+ * @property {PointLike | null | undefined} [end]
26551
+ *
26552
+ * @typedef PointLike
26553
+ * @property {number | null | undefined} [line]
26554
+ * @property {number | null | undefined} [column]
26555
+ * @property {number | null | undefined} [offset]
26556
+ */
26557
+
26558
+ /**
26559
+ * Serialize the positional info of a point, position (start and end points),
26560
+ * or node.
26561
+ *
26562
+ * @param {Node | NodeLike | Position | PositionLike | Point | PointLike | null | undefined} [value]
26563
+ * Node, position, or point.
26564
+ * @returns {string}
26565
+ * Pretty printed positional info of a node (`string`).
26566
+ *
26567
+ * In the format of a range `ls:cs-le:ce` (when given `node` or `position`)
26568
+ * or a point `l:c` (when given `point`), where `l` stands for line, `c` for
26569
+ * column, `s` for `start`, and `e` for end.
26570
+ * An empty string (`''`) is returned if the given value is neither `node`,
26571
+ * `position`, nor `point`.
26572
+ */
26573
+ function lib_stringifyPosition(value) {
26574
+ // Nothing.
26575
+ if (!value || typeof value !== 'object') {
26576
+ return ''
26577
+ }
26578
+
26579
+ // Node.
26580
+ if ('position' in value || 'type' in value) {
26581
+ return lib_position(value.position)
26582
+ }
26583
+
26584
+ // Position.
26585
+ if ('start' in value || 'end' in value) {
26586
+ return lib_position(value)
26587
+ }
26588
+
26589
+ // Point.
26590
+ if ('line' in value || 'column' in value) {
26591
+ return lib_point(value)
26592
+ }
26593
+
26594
+ // ?
26595
+ return ''
26596
+ }
26597
+
26598
+ /**
26599
+ * @param {Point | PointLike | null | undefined} point
26600
+ * @returns {string}
26601
+ */
26602
+ function lib_point(point) {
26603
+ return lib_index(point && point.line) + ':' + lib_index(point && point.column)
26604
+ }
26605
+
26606
+ /**
26607
+ * @param {Position | PositionLike | null | undefined} pos
26608
+ * @returns {string}
26609
+ */
26610
+ function lib_position(pos) {
26611
+ return lib_point(pos && pos.start) + '-' + lib_point(pos && pos.end)
26612
+ }
26613
+
26614
+ /**
26615
+ * @param {number | null | undefined} value
26616
+ * @returns {number}
26617
+ */
26618
+ function lib_index(value) {
26619
+ return value && typeof value === 'number' ? value : 1
26620
+ }
26621
+
26622
+ ;// CONCATENATED MODULE: ../node_modules/react-markdown/node_modules/mdast-util-from-markdown/lib/index.js
26535
26623
  /**
26536
26624
  * @typedef {import('micromark-util-types').Encoding} Encoding
26537
26625
  * @typedef {import('micromark-util-types').Event} Event
@@ -26905,7 +26993,7 @@ function compiler(options) {
26905
26993
 
26906
26994
  // Figure out `root` position.
26907
26995
  tree.position = {
26908
- start: lib_point(
26996
+ start: mdast_util_from_markdown_lib_point(
26909
26997
  events.length > 0
26910
26998
  ? events[0][1].start
26911
26999
  : {
@@ -26914,7 +27002,7 @@ function compiler(options) {
26914
27002
  offset: 0
26915
27003
  }
26916
27004
  ),
26917
- end: lib_point(
27005
+ end: mdast_util_from_markdown_lib_point(
26918
27006
  events.length > 0
26919
27007
  ? events[events.length - 2][1].end
26920
27008
  : {
@@ -27152,7 +27240,7 @@ function compiler(options) {
27152
27240
  this.tokenStack.push([token, errorHandler])
27153
27241
  // @ts-expect-error: `end` will be patched later.
27154
27242
  node.position = {
27155
- start: lib_point(token.start)
27243
+ start: mdast_util_from_markdown_lib_point(token.start)
27156
27244
  }
27157
27245
  return node
27158
27246
  }
@@ -27197,7 +27285,7 @@ function compiler(options) {
27197
27285
  'Cannot close `' +
27198
27286
  token.type +
27199
27287
  '` (' +
27200
- stringifyPosition({
27288
+ lib_stringifyPosition({
27201
27289
  start: token.start,
27202
27290
  end: token.end
27203
27291
  }) +
@@ -27211,7 +27299,7 @@ function compiler(options) {
27211
27299
  handler.call(this, token, open[0])
27212
27300
  }
27213
27301
  }
27214
- node.position.end = lib_point(token.end)
27302
+ node.position.end = mdast_util_from_markdown_lib_point(token.end)
27215
27303
  return node
27216
27304
  }
27217
27305
 
@@ -27382,7 +27470,7 @@ function compiler(options) {
27382
27470
  tail = text()
27383
27471
  // @ts-expect-error: we’ll add `end` later.
27384
27472
  tail.position = {
27385
- start: lib_point(token.start)
27473
+ start: mdast_util_from_markdown_lib_point(token.start)
27386
27474
  }
27387
27475
  // @ts-expect-error: Assume `parent` accepts `text`.
27388
27476
  node.children.push(tail)
@@ -27398,7 +27486,7 @@ function compiler(options) {
27398
27486
  function onexitdata(token) {
27399
27487
  const tail = this.stack.pop()
27400
27488
  tail.value += this.sliceSerialize(token)
27401
- tail.position.end = lib_point(token.end)
27489
+ tail.position.end = mdast_util_from_markdown_lib_point(token.end)
27402
27490
  }
27403
27491
 
27404
27492
  /**
@@ -27411,7 +27499,7 @@ function compiler(options) {
27411
27499
  // If we’re at a hard break, include the line ending in there.
27412
27500
  if (getData('atHardBreak')) {
27413
27501
  const tail = context.children[context.children.length - 1]
27414
- tail.position.end = lib_point(token.end)
27502
+ tail.position.end = mdast_util_from_markdown_lib_point(token.end)
27415
27503
  setData('atHardBreak')
27416
27504
  return
27417
27505
  }
@@ -27648,7 +27736,7 @@ function compiler(options) {
27648
27736
  }
27649
27737
  const tail = this.stack.pop()
27650
27738
  tail.value += value
27651
- tail.position.end = lib_point(token.end)
27739
+ tail.position.end = mdast_util_from_markdown_lib_point(token.end)
27652
27740
  }
27653
27741
 
27654
27742
  /**
@@ -27834,7 +27922,7 @@ function compiler(options) {
27834
27922
  * @returns {Point}
27835
27923
  * unist point.
27836
27924
  */
27837
- function lib_point(d) {
27925
+ function mdast_util_from_markdown_lib_point(d) {
27838
27926
  return {
27839
27927
  line: d.line,
27840
27928
  column: d.column,
@@ -27896,14 +27984,14 @@ function defaultOnError(left, right) {
27896
27984
  'Cannot close `' +
27897
27985
  left.type +
27898
27986
  '` (' +
27899
- stringifyPosition({
27987
+ lib_stringifyPosition({
27900
27988
  start: left.start,
27901
27989
  end: left.end
27902
27990
  }) +
27903
27991
  '): a different token (`' +
27904
27992
  right.type +
27905
27993
  '`, ' +
27906
- stringifyPosition({
27994
+ lib_stringifyPosition({
27907
27995
  start: right.start,
27908
27996
  end: right.end
27909
27997
  }) +
@@ -27914,7 +28002,7 @@ function defaultOnError(left, right) {
27914
28002
  'Cannot close document, a token (`' +
27915
28003
  right.type +
27916
28004
  '`, ' +
27917
- stringifyPosition({
28005
+ lib_stringifyPosition({
27918
28006
  start: right.start,
27919
28007
  end: right.end
27920
28008
  }) +
@@ -27923,7 +28011,7 @@ function defaultOnError(left, right) {
27923
28011
  }
27924
28012
  }
27925
28013
 
27926
- ;// CONCATENATED MODULE: ../node_modules/remark-parse/lib/index.js
28014
+ ;// CONCATENATED MODULE: ../node_modules/react-markdown/node_modules/remark-parse/lib/index.js
27927
28015
  /**
27928
28016
  * @typedef {import('mdast').Root} Root
27929
28017
  * @typedef {import('mdast-util-from-markdown').Options} Options
@@ -27953,7 +28041,7 @@ function remarkParse(options) {
27953
28041
  Object.assign(this, {Parser: parser})
27954
28042
  }
27955
28043
 
27956
- ;// CONCATENATED MODULE: ../node_modules/remark-parse/index.js
28044
+ ;// CONCATENATED MODULE: ../node_modules/react-markdown/node_modules/remark-parse/index.js
27957
28045
 
27958
28046
 
27959
28047
  /* harmony default export */ const remark_parse = (remarkParse);
@@ -28990,7 +29078,7 @@ const pointEnd = unist_util_position_lib_point('end')
28990
29078
  * @returns {Position}
28991
29079
  * Position.
28992
29080
  */
28993
- function lib_position(node) {
29081
+ function unist_util_position_lib_position(node) {
28994
29082
  return {start: pointStart(node), end: pointEnd(node)}
28995
29083
  }
28996
29084
 
@@ -30717,7 +30805,7 @@ function createState(tree, options) {
30717
30805
  * Nothing.
30718
30806
  */
30719
30807
  function patch(from, to) {
30720
- if (from.position) to.position = lib_position(from)
30808
+ if (from.position) to.position = unist_util_position_lib_position(from)
30721
30809
  }
30722
30810
 
30723
30811
  /**
@@ -32929,12 +33017,7 @@ function toReact(context, node, index, parent) {
32929
33017
  )
32930
33018
  }
32931
33019
 
32932
- properties.key = [
32933
- name,
32934
- position.start.line,
32935
- position.start.column,
32936
- index
32937
- ].join('-')
33020
+ properties.key = index
32938
33021
 
32939
33022
  if (name === 'a' && options.linkTarget) {
32940
33023
  properties.target =
@@ -36133,7 +36216,7 @@ function lib_previous(match, email) {
36133
36216
  )
36134
36217
  }
36135
36218
 
36136
- ;// CONCATENATED MODULE: ../node_modules/mdast-util-to-markdown/lib/util/association.js
36219
+ ;// CONCATENATED MODULE: ../node_modules/mdast-util-gfm-footnote/node_modules/mdast-util-to-markdown/lib/util/association.js
36137
36220
  /**
36138
36221
  * @typedef {import('../types.js').AssociationId} AssociationId
36139
36222
  */
@@ -36168,7 +36251,7 @@ function association(node) {
36168
36251
  return decodeString(node.identifier)
36169
36252
  }
36170
36253
 
36171
- ;// CONCATENATED MODULE: ../node_modules/mdast-util-to-markdown/lib/util/container-flow.js
36254
+ ;// CONCATENATED MODULE: ../node_modules/mdast-util-gfm-footnote/node_modules/mdast-util-to-markdown/lib/util/container-flow.js
36172
36255
  /**
36173
36256
  * @typedef {import('../types.js').FlowContent} FlowContent
36174
36257
  * @typedef {import('../types.js').Node} Node
@@ -36257,7 +36340,7 @@ function between(left, right, parent, state) {
36257
36340
  return '\n\n'
36258
36341
  }
36259
36342
 
36260
- ;// CONCATENATED MODULE: ../node_modules/mdast-util-to-markdown/lib/util/indent-lines.js
36343
+ ;// CONCATENATED MODULE: ../node_modules/mdast-util-gfm-footnote/node_modules/mdast-util-to-markdown/lib/util/indent-lines.js
36261
36344
  /**
36262
36345
  * @typedef {import('../types.js').IndentLines} IndentLines
36263
36346
  */
@@ -36294,7 +36377,7 @@ function indentLines(value, map) {
36294
36377
  }
36295
36378
  }
36296
36379
 
36297
- ;// CONCATENATED MODULE: ../node_modules/mdast-util-to-markdown/lib/util/pattern-compile.js
36380
+ ;// CONCATENATED MODULE: ../node_modules/mdast-util-gfm-footnote/node_modules/mdast-util-to-markdown/lib/util/pattern-compile.js
36298
36381
  /**
36299
36382
  * @typedef {import('../types.js').Unsafe} Unsafe
36300
36383
  */
@@ -36321,7 +36404,7 @@ function patternCompile(pattern) {
36321
36404
  return pattern._compiled
36322
36405
  }
36323
36406
 
36324
- ;// CONCATENATED MODULE: ../node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.js
36407
+ ;// CONCATENATED MODULE: ../node_modules/mdast-util-gfm-footnote/node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.js
36325
36408
  /**
36326
36409
  * @typedef {import('../types.js').Unsafe} Unsafe
36327
36410
  * @typedef {import('../types.js').ConstructName} ConstructName
@@ -36365,7 +36448,7 @@ function listInScope(stack, list, none) {
36365
36448
  return false
36366
36449
  }
36367
36450
 
36368
- ;// CONCATENATED MODULE: ../node_modules/mdast-util-to-markdown/lib/util/safe.js
36451
+ ;// CONCATENATED MODULE: ../node_modules/mdast-util-gfm-footnote/node_modules/mdast-util-to-markdown/lib/util/safe.js
36369
36452
  /**
36370
36453
  * @typedef {import('../types.js').State} State
36371
36454
  * @typedef {import('../types.js').SafeConfig} SafeConfig
@@ -36544,7 +36627,7 @@ function escapeBackslashes(value, after) {
36544
36627
  return results.join('')
36545
36628
  }
36546
36629
 
36547
- ;// CONCATENATED MODULE: ../node_modules/mdast-util-to-markdown/lib/util/track.js
36630
+ ;// CONCATENATED MODULE: ../node_modules/mdast-util-gfm-footnote/node_modules/mdast-util-to-markdown/lib/util/track.js
36548
36631
  /**
36549
36632
  * @typedef {import('../types.js').CreateTracker} CreateTracker
36550
36633
  * @typedef {import('../types.js').TrackCurrent} TrackCurrent
@@ -36813,7 +36896,7 @@ function map(line, index, blank) {
36813
36896
  return (blank ? '' : ' ') + line
36814
36897
  }
36815
36898
 
36816
- ;// CONCATENATED MODULE: ../node_modules/mdast-util-to-markdown/lib/util/container-phrasing.js
36899
+ ;// CONCATENATED MODULE: ../node_modules/mdast-util-gfm-strikethrough/node_modules/mdast-util-to-markdown/lib/util/container-phrasing.js
36817
36900
  /**
36818
36901
  * @typedef {import('../types.js').Handle} Handle
36819
36902
  * @typedef {import('../types.js').Info} Info
@@ -36912,6 +36995,66 @@ function containerPhrasing(parent, state, info) {
36912
36995
  return results.join('')
36913
36996
  }
36914
36997
 
36998
+ ;// CONCATENATED MODULE: ../node_modules/mdast-util-gfm-strikethrough/node_modules/mdast-util-to-markdown/lib/util/track.js
36999
+ /**
37000
+ * @typedef {import('../types.js').CreateTracker} CreateTracker
37001
+ * @typedef {import('../types.js').TrackCurrent} TrackCurrent
37002
+ * @typedef {import('../types.js').TrackMove} TrackMove
37003
+ * @typedef {import('../types.js').TrackShift} TrackShift
37004
+ */
37005
+
37006
+ /**
37007
+ * Track positional info in the output.
37008
+ *
37009
+ * @type {CreateTracker}
37010
+ */
37011
+ function track_track(config) {
37012
+ // Defaults are used to prevent crashes when older utilities somehow activate
37013
+ // this code.
37014
+ /* c8 ignore next 5 */
37015
+ const options = config || {}
37016
+ const now = options.now || {}
37017
+ let lineShift = options.lineShift || 0
37018
+ let line = now.line || 1
37019
+ let column = now.column || 1
37020
+
37021
+ return {move, current, shift}
37022
+
37023
+ /**
37024
+ * Get the current tracked info.
37025
+ *
37026
+ * @type {TrackCurrent}
37027
+ */
37028
+ function current() {
37029
+ return {now: {line, column}, lineShift}
37030
+ }
37031
+
37032
+ /**
37033
+ * Define an increased line shift (the typical indent for lines).
37034
+ *
37035
+ * @type {TrackShift}
37036
+ */
37037
+ function shift(value) {
37038
+ lineShift += value
37039
+ }
37040
+
37041
+ /**
37042
+ * Move past some generated markdown.
37043
+ *
37044
+ * @type {TrackMove}
37045
+ */
37046
+ function move(input) {
37047
+ // eslint-disable-next-line unicorn/prefer-default-parameters
37048
+ const value = input || ''
37049
+ const chunks = value.split(/\r?\n|\r/g)
37050
+ const tail = chunks[chunks.length - 1]
37051
+ line += chunks.length - 1
37052
+ column =
37053
+ chunks.length === 1 ? column + tail.length : 1 + tail.length + lineShift
37054
+ return value
37055
+ }
37056
+ }
37057
+
36915
37058
  ;// CONCATENATED MODULE: ../node_modules/mdast-util-gfm-strikethrough/lib/index.js
36916
37059
  /**
36917
37060
  * @typedef {import('mdast').Delete} Delete
@@ -37000,7 +37143,7 @@ function exitStrikethrough(token) {
37000
37143
  * @param {Delete} node
37001
37144
  */
37002
37145
  function handleDelete(node, _, context, safeOptions) {
37003
- const tracker = track(safeOptions)
37146
+ const tracker = track_track(safeOptions)
37004
37147
  const exit = context.enter('strikethrough')
37005
37148
  let value = tracker.move('~~')
37006
37149
  value += containerPhrasing(node, context, {
@@ -37018,7 +37161,133 @@ function peekDelete() {
37018
37161
  return '~'
37019
37162
  }
37020
37163
 
37021
- ;// CONCATENATED MODULE: ../node_modules/mdast-util-to-markdown/lib/handle/inline-code.js
37164
+ ;// CONCATENATED MODULE: ../node_modules/mdast-util-gfm-table/node_modules/mdast-util-to-markdown/lib/util/container-phrasing.js
37165
+ /**
37166
+ * @typedef {import('../types.js').Handle} Handle
37167
+ * @typedef {import('../types.js').Info} Info
37168
+ * @typedef {import('../types.js').Parent} Parent
37169
+ * @typedef {import('../types.js').PhrasingContent} PhrasingContent
37170
+ * @typedef {import('../types.js').State} State
37171
+ */
37172
+
37173
+ /**
37174
+ * Serialize the children of a parent that contains phrasing children.
37175
+ *
37176
+ * These children will be joined flush together.
37177
+ *
37178
+ * @param {Parent & {children: Array<PhrasingContent>}} parent
37179
+ * Parent of flow nodes.
37180
+ * @param {State} state
37181
+ * Info passed around about the current state.
37182
+ * @param {Info} info
37183
+ * Info on where we are in the document we are generating.
37184
+ * @returns {string}
37185
+ * Serialized children, joined together.
37186
+ */
37187
+ function container_phrasing_containerPhrasing(parent, state, info) {
37188
+ const indexStack = state.indexStack
37189
+ const children = parent.children || []
37190
+ /** @type {Array<string>} */
37191
+ const results = []
37192
+ let index = -1
37193
+ let before = info.before
37194
+
37195
+ indexStack.push(-1)
37196
+ let tracker = state.createTracker(info)
37197
+
37198
+ while (++index < children.length) {
37199
+ const child = children[index]
37200
+ /** @type {string} */
37201
+ let after
37202
+
37203
+ indexStack[indexStack.length - 1] = index
37204
+
37205
+ if (index + 1 < children.length) {
37206
+ /** @type {Handle} */
37207
+ // @ts-expect-error: hush, it’s actually a `zwitch`.
37208
+ let handle = state.handle.handlers[children[index + 1].type]
37209
+ /** @type {Handle} */
37210
+ // @ts-expect-error: hush, it’s actually a `zwitch`.
37211
+ if (handle && handle.peek) handle = handle.peek
37212
+ after = handle
37213
+ ? handle(children[index + 1], parent, state, {
37214
+ before: '',
37215
+ after: '',
37216
+ ...tracker.current()
37217
+ }).charAt(0)
37218
+ : ''
37219
+ } else {
37220
+ after = info.after
37221
+ }
37222
+
37223
+ // In some cases, html (text) can be found in phrasing right after an eol.
37224
+ // When we’d serialize that, in most cases that would be seen as html
37225
+ // (flow).
37226
+ // As we can’t escape or so to prevent it from happening, we take a somewhat
37227
+ // reasonable approach: replace that eol with a space.
37228
+ // See: <https://github.com/syntax-tree/mdast-util-to-markdown/issues/15>
37229
+ if (
37230
+ results.length > 0 &&
37231
+ (before === '\r' || before === '\n') &&
37232
+ child.type === 'html'
37233
+ ) {
37234
+ results[results.length - 1] = results[results.length - 1].replace(
37235
+ /(\r?\n|\r)$/,
37236
+ ' '
37237
+ )
37238
+ before = ' '
37239
+
37240
+ // To do: does this work to reset tracker?
37241
+ tracker = state.createTracker(info)
37242
+ tracker.move(results.join(''))
37243
+ }
37244
+
37245
+ results.push(
37246
+ tracker.move(
37247
+ state.handle(child, parent, state, {
37248
+ ...tracker.current(),
37249
+ before,
37250
+ after
37251
+ })
37252
+ )
37253
+ )
37254
+
37255
+ before = results[results.length - 1].slice(-1)
37256
+ }
37257
+
37258
+ indexStack.pop()
37259
+
37260
+ return results.join('')
37261
+ }
37262
+
37263
+ ;// CONCATENATED MODULE: ../node_modules/mdast-util-gfm-table/node_modules/mdast-util-to-markdown/lib/util/pattern-compile.js
37264
+ /**
37265
+ * @typedef {import('../types.js').Unsafe} Unsafe
37266
+ */
37267
+
37268
+ /**
37269
+ * @param {Unsafe} pattern
37270
+ * @returns {RegExp}
37271
+ */
37272
+ function pattern_compile_patternCompile(pattern) {
37273
+ if (!pattern._compiled) {
37274
+ const before =
37275
+ (pattern.atBreak ? '[\\r\\n][\\t ]*' : '') +
37276
+ (pattern.before ? '(?:' + pattern.before + ')' : '')
37277
+
37278
+ pattern._compiled = new RegExp(
37279
+ (before ? '(' + before + ')' : '') +
37280
+ (/[|\\{}()[\]^$+*?.-]/.test(pattern.character) ? '\\' : '') +
37281
+ pattern.character +
37282
+ (pattern.after ? '(?:' + pattern.after + ')' : ''),
37283
+ 'g'
37284
+ )
37285
+ }
37286
+
37287
+ return pattern._compiled
37288
+ }
37289
+
37290
+ ;// CONCATENATED MODULE: ../node_modules/mdast-util-gfm-table/node_modules/mdast-util-to-markdown/lib/handle/inline-code.js
37022
37291
  /**
37023
37292
  * @typedef {import('mdast').InlineCode} InlineCode
37024
37293
  * @typedef {import('../types.js').Parent} Parent
@@ -37065,7 +37334,7 @@ function inline_code_inlineCode(node, _, state) {
37065
37334
  // them out.
37066
37335
  while (++index < state.unsafe.length) {
37067
37336
  const pattern = state.unsafe[index]
37068
- const expression = patternCompile(pattern)
37337
+ const expression = pattern_compile_patternCompile(pattern)
37069
37338
  /** @type {RegExpExecArray | null} */
37070
37339
  let match
37071
37340
 
@@ -37697,7 +37966,7 @@ function gfmTableToMarkdown(options) {
37697
37966
  function handleTableCell(node, _, context, safeOptions) {
37698
37967
  const exit = context.enter('tableCell')
37699
37968
  const subexit = context.enter('phrasing')
37700
- const value = containerPhrasing(node, context, {
37969
+ const value = container_phrasing_containerPhrasing(node, context, {
37701
37970
  ...safeOptions,
37702
37971
  before: around,
37703
37972
  after: around
@@ -37792,7 +38061,7 @@ function gfmTableToMarkdown(options) {
37792
38061
  }
37793
38062
  }
37794
38063
 
37795
- ;// CONCATENATED MODULE: ../node_modules/mdast-util-to-markdown/lib/util/check-bullet.js
38064
+ ;// CONCATENATED MODULE: ../node_modules/mdast-util-gfm-task-list-item/node_modules/mdast-util-to-markdown/lib/util/check-bullet.js
37796
38065
  /**
37797
38066
  * @typedef {import('../types.js').State} State
37798
38067
  * @typedef {import('../types.js').Options} Options
@@ -37816,7 +38085,7 @@ function checkBullet(state) {
37816
38085
  return marker
37817
38086
  }
37818
38087
 
37819
- ;// CONCATENATED MODULE: ../node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.js
38088
+ ;// CONCATENATED MODULE: ../node_modules/mdast-util-gfm-task-list-item/node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.js
37820
38089
  /**
37821
38090
  * @typedef {import('../types.js').State} State
37822
38091
  * @typedef {import('../types.js').Options} Options
@@ -37846,7 +38115,7 @@ function checkListItemIndent(state) {
37846
38115
  return style
37847
38116
  }
37848
38117
 
37849
- ;// CONCATENATED MODULE: ../node_modules/mdast-util-to-markdown/lib/handle/list-item.js
38118
+ ;// CONCATENATED MODULE: ../node_modules/mdast-util-gfm-task-list-item/node_modules/mdast-util-to-markdown/lib/handle/list-item.js
37850
38119
  /**
37851
38120
  * @typedef {import('mdast').ListItem} ListItem
37852
38121
  * @typedef {import('../types.js').Map} Map
@@ -37913,6 +38182,66 @@ function list_item_listItem(node, parent, state, info) {
37913
38182
  }
37914
38183
  }
37915
38184
 
38185
+ ;// CONCATENATED MODULE: ../node_modules/mdast-util-gfm-task-list-item/node_modules/mdast-util-to-markdown/lib/util/track.js
38186
+ /**
38187
+ * @typedef {import('../types.js').CreateTracker} CreateTracker
38188
+ * @typedef {import('../types.js').TrackCurrent} TrackCurrent
38189
+ * @typedef {import('../types.js').TrackMove} TrackMove
38190
+ * @typedef {import('../types.js').TrackShift} TrackShift
38191
+ */
38192
+
38193
+ /**
38194
+ * Track positional info in the output.
38195
+ *
38196
+ * @type {CreateTracker}
38197
+ */
38198
+ function util_track_track(config) {
38199
+ // Defaults are used to prevent crashes when older utilities somehow activate
38200
+ // this code.
38201
+ /* c8 ignore next 5 */
38202
+ const options = config || {}
38203
+ const now = options.now || {}
38204
+ let lineShift = options.lineShift || 0
38205
+ let line = now.line || 1
38206
+ let column = now.column || 1
38207
+
38208
+ return {move, current, shift}
38209
+
38210
+ /**
38211
+ * Get the current tracked info.
38212
+ *
38213
+ * @type {TrackCurrent}
38214
+ */
38215
+ function current() {
38216
+ return {now: {line, column}, lineShift}
38217
+ }
38218
+
38219
+ /**
38220
+ * Define an increased line shift (the typical indent for lines).
38221
+ *
38222
+ * @type {TrackShift}
38223
+ */
38224
+ function shift(value) {
38225
+ lineShift += value
38226
+ }
38227
+
38228
+ /**
38229
+ * Move past some generated markdown.
38230
+ *
38231
+ * @type {TrackMove}
38232
+ */
38233
+ function move(input) {
38234
+ // eslint-disable-next-line unicorn/prefer-default-parameters
38235
+ const value = input || ''
38236
+ const chunks = value.split(/\r?\n|\r/g)
38237
+ const tail = chunks[chunks.length - 1]
38238
+ line += chunks.length - 1
38239
+ column =
38240
+ chunks.length === 1 ? column + tail.length : 1 + tail.length + lineShift
38241
+ return value
38242
+ }
38243
+ }
38244
+
37916
38245
  ;// CONCATENATED MODULE: ../node_modules/mdast-util-gfm-task-list-item/lib/index.js
37917
38246
  /**
37918
38247
  * @typedef {import('mdast').Content} Content
@@ -38032,7 +38361,7 @@ function listItemWithTaskListItem(node, parent, context, safeOptions) {
38032
38361
  const checkable =
38033
38362
  typeof node.checked === 'boolean' && head && head.type === 'paragraph'
38034
38363
  const checkbox = '[' + (node.checked ? 'x' : ' ') + '] '
38035
- const tracker = track(safeOptions)
38364
+ const tracker = util_track_track(safeOptions)
38036
38365
 
38037
38366
  if (checkable) {
38038
38367
  tracker.move(checkbox)
@@ -45605,7 +45934,7 @@ function vbnet(Prism) {
45605
45934
  })
45606
45935
  }
45607
45936
 
45608
- ;// CONCATENATED MODULE: ../node_modules/character-entities-legacy/index.js
45937
+ ;// CONCATENATED MODULE: ../node_modules/refractor/node_modules/character-entities-legacy/index.js
45609
45938
  /**
45610
45939
  * List of legacy HTML named character references that don’t need a trailing semicolon.
45611
45940
  *
@@ -45720,7 +46049,7 @@ const characterEntitiesLegacy = [
45720
46049
  'yuml'
45721
46050
  ]
45722
46051
 
45723
- ;// CONCATENATED MODULE: ../node_modules/character-reference-invalid/index.js
46052
+ ;// CONCATENATED MODULE: ../node_modules/refractor/node_modules/character-reference-invalid/index.js
45724
46053
  /**
45725
46054
  * Map of invalid numeric character references to their replacements, according to HTML.
45726
46055
  *
@@ -45757,7 +46086,7 @@ const characterReferenceInvalid = {
45757
46086
  159: 'Ÿ'
45758
46087
  }
45759
46088
 
45760
- ;// CONCATENATED MODULE: ../node_modules/is-decimal/index.js
46089
+ ;// CONCATENATED MODULE: ../node_modules/refractor/node_modules/is-decimal/index.js
45761
46090
  /**
45762
46091
  * Check if the given character code, or the character code at the first
45763
46092
  * character, is decimal.
@@ -45772,7 +46101,7 @@ function isDecimal(character) {
45772
46101
  return code >= 48 && code <= 57 /* 0-9 */
45773
46102
  }
45774
46103
 
45775
- ;// CONCATENATED MODULE: ../node_modules/is-hexadecimal/index.js
46104
+ ;// CONCATENATED MODULE: ../node_modules/refractor/node_modules/is-hexadecimal/index.js
45776
46105
  /**
45777
46106
  * Check if the given character code, or the character code at the first
45778
46107
  * character, is hexadecimal.
@@ -45791,7 +46120,7 @@ function isHexadecimal(character) {
45791
46120
  )
45792
46121
  }
45793
46122
 
45794
- ;// CONCATENATED MODULE: ../node_modules/is-alphabetical/index.js
46123
+ ;// CONCATENATED MODULE: ../node_modules/refractor/node_modules/is-alphabetical/index.js
45795
46124
  /**
45796
46125
  * Check if the given character code, or the character code at the first
45797
46126
  * character, is alphabetical.
@@ -45809,7 +46138,7 @@ function isAlphabetical(character) {
45809
46138
  )
45810
46139
  }
45811
46140
 
45812
- ;// CONCATENATED MODULE: ../node_modules/is-alphanumerical/index.js
46141
+ ;// CONCATENATED MODULE: ../node_modules/refractor/node_modules/is-alphanumerical/index.js
45813
46142
 
45814
46143
 
45815
46144
 
@@ -45824,7 +46153,7 @@ function isAlphanumerical(character) {
45824
46153
  return isAlphabetical(character) || isDecimal(character)
45825
46154
  }
45826
46155
 
45827
- ;// CONCATENATED MODULE: ../node_modules/parse-entities/lib/index.js
46156
+ ;// CONCATENATED MODULE: ../node_modules/refractor/node_modules/parse-entities/lib/index.js
45828
46157
  /**
45829
46158
  * @typedef {import('unist').Point} Point
45830
46159
  * @typedef {import('unist').Position} Position
@@ -70248,7 +70577,6 @@ var octiconLink = {
70248
70577
  }
70249
70578
  }]
70250
70579
  };
70251
-
70252
70580
  ;// CONCATENATED MODULE: ../node_modules/@uiw/react-markdown-preview/esm/nodes/copy.js
70253
70581
  function copyElement(str) {
70254
70582
  if (str === void 0) {
@@ -70312,34 +70640,45 @@ function copyElement(str) {
70312
70640
  }]
70313
70641
  };
70314
70642
  }
70315
-
70316
70643
  // EXTERNAL MODULE: ../node_modules/@uiw/copy-to-clipboard/dist/copy-to-clipboard.umd.js
70317
70644
  var copy_to_clipboard_umd = __webpack_require__(7071);
70318
70645
  var copy_to_clipboard_umd_default = /*#__PURE__*/__webpack_require__.n(copy_to_clipboard_umd);
70319
70646
  ;// CONCATENATED MODULE: ../node_modules/@uiw/react-markdown-preview/esm/plugins/useCopied.js
70320
70647
 
70321
70648
 
70649
+ function getParentElement(target) {
70650
+ if (!target) return null;
70651
+ var dom = target;
70652
+ if (dom.dataset.code && dom.classList.contains('copied')) {
70653
+ return dom;
70654
+ }
70655
+ if (dom.parentElement) {
70656
+ return getParentElement(dom.parentElement);
70657
+ }
70658
+ return null;
70659
+ }
70322
70660
  function useCopied(container) {
70323
- var handle = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(event => {
70324
- var target = event.currentTarget || event.target;
70661
+ var handle = event => {
70662
+ var target = getParentElement(event.target);
70663
+ if (!target) return;
70325
70664
  target.classList.add('active');
70326
70665
  copy_to_clipboard_umd_default()(target.dataset.code, function () {
70327
70666
  setTimeout(() => {
70328
70667
  target.classList.remove('active');
70329
70668
  }, 2000);
70330
70669
  });
70331
- }, []);
70670
+ };
70332
70671
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
70333
- var _container$current;
70334
- var btns = (_container$current = container.current) == null ? void 0 : _container$current.querySelectorAll('pre code + div.copied');
70335
- btns && Array.from(btns).forEach(elm => elm.addEventListener('click', handle, false));
70672
+ var _container$current, _container$current2;
70673
+ (_container$current = container.current) == null ? void 0 : _container$current.removeEventListener('click', handle, false);
70674
+ (_container$current2 = container.current) == null ? void 0 : _container$current2.addEventListener('click', handle, false);
70336
70675
  return () => {
70337
- btns && Array.from(btns).forEach(elm => elm.removeEventListener('click', handle, false));
70676
+ var _container$current3;
70677
+ (_container$current3 = container.current) == null ? void 0 : _container$current3.removeEventListener('click', handle, false);
70338
70678
  };
70339
70679
  // eslint-disable-next-line react-hooks/exhaustive-deps
70340
70680
  }, [container]);
70341
70681
  }
70342
-
70343
70682
  ;// CONCATENATED MODULE: ../node_modules/@uiw/react-markdown-preview/esm/styles/markdown.css
70344
70683
  // extracted by mini-css-extract-plugin
70345
70684
  /* harmony default export */ const styles_markdown = ({});
@@ -70360,7 +70699,6 @@ var reservedMeta = function reservedMeta(options) {
70360
70699
  });
70361
70700
  };
70362
70701
  };
70363
-
70364
70702
  // EXTERNAL MODULE: ../node_modules/react/jsx-runtime.js
70365
70703
  var jsx_runtime = __webpack_require__(3605);
70366
70704
  ;// CONCATENATED MODULE: ../node_modules/@uiw/react-markdown-preview/esm/index.js
@@ -70456,7 +70794,6 @@ var _excluded = ["prefixCls", "className", "source", "style", "disableCopy", "sk
70456
70794
  }))
70457
70795
  }));
70458
70796
  }));
70459
-
70460
70797
  ;// CONCATENATED MODULE: ./src/Context.tsx
70461
70798
  function reducer(state,action){return _objectSpread2(_objectSpread2({},state),action);}var EditorContext=/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createContext({markdown:''});
70462
70799
  ;// CONCATENATED MODULE: ./src/components/TextArea/shortcuts.ts
@@ -71003,6 +71340,121 @@ function toDecimal(code, next, omit) {
71003
71340
  : value + ';'
71004
71341
  }
71005
71342
 
71343
+ ;// CONCATENATED MODULE: ../node_modules/stringify-entities/node_modules/character-entities-legacy/index.js
71344
+ /**
71345
+ * List of legacy HTML named character references that don’t need a trailing semicolon.
71346
+ *
71347
+ * @type {Array<string>}
71348
+ */
71349
+ const character_entities_legacy_characterEntitiesLegacy = [
71350
+ 'AElig',
71351
+ 'AMP',
71352
+ 'Aacute',
71353
+ 'Acirc',
71354
+ 'Agrave',
71355
+ 'Aring',
71356
+ 'Atilde',
71357
+ 'Auml',
71358
+ 'COPY',
71359
+ 'Ccedil',
71360
+ 'ETH',
71361
+ 'Eacute',
71362
+ 'Ecirc',
71363
+ 'Egrave',
71364
+ 'Euml',
71365
+ 'GT',
71366
+ 'Iacute',
71367
+ 'Icirc',
71368
+ 'Igrave',
71369
+ 'Iuml',
71370
+ 'LT',
71371
+ 'Ntilde',
71372
+ 'Oacute',
71373
+ 'Ocirc',
71374
+ 'Ograve',
71375
+ 'Oslash',
71376
+ 'Otilde',
71377
+ 'Ouml',
71378
+ 'QUOT',
71379
+ 'REG',
71380
+ 'THORN',
71381
+ 'Uacute',
71382
+ 'Ucirc',
71383
+ 'Ugrave',
71384
+ 'Uuml',
71385
+ 'Yacute',
71386
+ 'aacute',
71387
+ 'acirc',
71388
+ 'acute',
71389
+ 'aelig',
71390
+ 'agrave',
71391
+ 'amp',
71392
+ 'aring',
71393
+ 'atilde',
71394
+ 'auml',
71395
+ 'brvbar',
71396
+ 'ccedil',
71397
+ 'cedil',
71398
+ 'cent',
71399
+ 'copy',
71400
+ 'curren',
71401
+ 'deg',
71402
+ 'divide',
71403
+ 'eacute',
71404
+ 'ecirc',
71405
+ 'egrave',
71406
+ 'eth',
71407
+ 'euml',
71408
+ 'frac12',
71409
+ 'frac14',
71410
+ 'frac34',
71411
+ 'gt',
71412
+ 'iacute',
71413
+ 'icirc',
71414
+ 'iexcl',
71415
+ 'igrave',
71416
+ 'iquest',
71417
+ 'iuml',
71418
+ 'laquo',
71419
+ 'lt',
71420
+ 'macr',
71421
+ 'micro',
71422
+ 'middot',
71423
+ 'nbsp',
71424
+ 'not',
71425
+ 'ntilde',
71426
+ 'oacute',
71427
+ 'ocirc',
71428
+ 'ograve',
71429
+ 'ordf',
71430
+ 'ordm',
71431
+ 'oslash',
71432
+ 'otilde',
71433
+ 'ouml',
71434
+ 'para',
71435
+ 'plusmn',
71436
+ 'pound',
71437
+ 'quot',
71438
+ 'raquo',
71439
+ 'reg',
71440
+ 'sect',
71441
+ 'shy',
71442
+ 'sup1',
71443
+ 'sup2',
71444
+ 'sup3',
71445
+ 'szlig',
71446
+ 'thorn',
71447
+ 'times',
71448
+ 'uacute',
71449
+ 'ucirc',
71450
+ 'ugrave',
71451
+ 'uml',
71452
+ 'uuml',
71453
+ 'yacute',
71454
+ 'yen',
71455
+ 'yuml'
71456
+ ]
71457
+
71006
71458
  ;// CONCATENATED MODULE: ../node_modules/character-entities-html4/index.js
71007
71459
  /**
71008
71460
  * Map of named character references from HTML 4.
@@ -71323,7 +71775,7 @@ function toNamed(code, next, omit, attribute) {
71323
71775
 
71324
71776
  if (
71325
71777
  omit &&
71326
- characterEntitiesLegacy.includes(name) &&
71778
+ character_entities_legacy_characterEntitiesLegacy.includes(name) &&
71327
71779
  !dangerous.includes(name) &&
71328
71780
  (!attribute ||
71329
71781
  (next &&
@@ -72688,7 +73140,13 @@ function rehypeStringify(config) {
72688
73140
  const rehype = unified().use(rehypeParse).use(rehypeStringify).freeze()
72689
73141
 
72690
73142
  ;// CONCATENATED MODULE: ./src/components/TextArea/Markdown.tsx
72691
- 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
73143
+ var _templateObject;function html2Escape(sHtml){return sHtml// .replace(/```(\w+)?([\s\S]*?)(\s.+)?```/g, (str: string) => {
73144
+ // return str.replace(
73145
+ // /[<&"]/g,
73146
+ // (c: string) => (({ '<': '&lt;', '>': '&gt;', '&': '&amp;', '"': '&quot;' } as Record<string, string>)[c]),
73147
+ // );
73148
+ // })
73149
+ .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
72692
73150
  },[]);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||''}});}
72693
73151
  ;// CONCATENATED MODULE: ../node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
72694
73152