@uiw/react-md-editor 3.23.3 → 3.23.4
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 +61 -503
- package/dist/mdeditor.min.js +1 -1
- package/dist/mdeditor.min.js.LICENSE.txt +1 -1
- package/esm/Context.d.ts +1 -1
- package/lib/Context.d.ts +1 -1
- package/package.json +3 -2
- package/src/components/TextArea/Markdown.tsx +1 -1
package/dist/mdeditor.js
CHANGED
|
@@ -15,7 +15,7 @@ return /******/ (() => { // webpackBootstrap
|
|
|
15
15
|
/***/ (function(module) {
|
|
16
16
|
|
|
17
17
|
/**!
|
|
18
|
-
* @uiw/copy-to-clipboard v1.0.
|
|
18
|
+
* @uiw/copy-to-clipboard v1.0.15
|
|
19
19
|
* Copy to clipboard.
|
|
20
20
|
*
|
|
21
21
|
* Copyright (c) 2023 Kenny Wang
|
|
@@ -57,6 +57,7 @@ return /******/ (() => { // webpackBootstrap
|
|
|
57
57
|
* @param {CopyTextToClipboard} cb
|
|
58
58
|
*/
|
|
59
59
|
function copyTextToClipboard(text, cb) {
|
|
60
|
+
if (typeof document === "undefined") return;
|
|
60
61
|
const el = document.createElement('textarea');
|
|
61
62
|
el.value = text;
|
|
62
63
|
el.setAttribute('readonly', '');
|
|
@@ -17408,7 +17409,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
17408
17409
|
unorderedListCommand: () => (/* reexport */ unorderedListCommand)
|
|
17409
17410
|
});
|
|
17410
17411
|
|
|
17411
|
-
// NAMESPACE OBJECT: ../node_modules/
|
|
17412
|
+
// NAMESPACE OBJECT: ../node_modules/micromark/lib/constructs.js
|
|
17412
17413
|
var constructs_namespaceObject = {};
|
|
17413
17414
|
__webpack_require__.r(constructs_namespaceObject);
|
|
17414
17415
|
__webpack_require__.d(constructs_namespaceObject, {
|
|
@@ -17661,7 +17662,7 @@ function _extends() {
|
|
|
17661
17662
|
}
|
|
17662
17663
|
// EXTERNAL MODULE: ../node_modules/is-buffer/index.js
|
|
17663
17664
|
var is_buffer = __webpack_require__(2618);
|
|
17664
|
-
;// CONCATENATED MODULE: ../node_modules/
|
|
17665
|
+
;// CONCATENATED MODULE: ../node_modules/unist-util-stringify-position/lib/index.js
|
|
17665
17666
|
/**
|
|
17666
17667
|
* @typedef {import('unist').Node} Node
|
|
17667
17668
|
* @typedef {import('unist').Point} Point
|
|
@@ -19838,7 +19839,7 @@ function looksLikeAVFileValue(value) {
|
|
|
19838
19839
|
return typeof value === 'string' || is_buffer(value)
|
|
19839
19840
|
}
|
|
19840
19841
|
|
|
19841
|
-
;// CONCATENATED MODULE: ../node_modules/
|
|
19842
|
+
;// CONCATENATED MODULE: ../node_modules/mdast-util-to-string/lib/index.js
|
|
19842
19843
|
/**
|
|
19843
19844
|
* @typedef {import('mdast').Root|import('mdast').Content} Node
|
|
19844
19845
|
*
|
|
@@ -20499,7 +20500,7 @@ function factorySpace(effects, ok, type, max) {
|
|
|
20499
20500
|
}
|
|
20500
20501
|
}
|
|
20501
20502
|
|
|
20502
|
-
;// CONCATENATED MODULE: ../node_modules/
|
|
20503
|
+
;// CONCATENATED MODULE: ../node_modules/micromark/lib/initialize/content.js
|
|
20503
20504
|
/**
|
|
20504
20505
|
* @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct
|
|
20505
20506
|
* @typedef {import('micromark-util-types').Initializer} Initializer
|
|
@@ -20580,7 +20581,7 @@ function initializeContent(effects) {
|
|
|
20580
20581
|
}
|
|
20581
20582
|
}
|
|
20582
20583
|
|
|
20583
|
-
;// CONCATENATED MODULE: ../node_modules/
|
|
20584
|
+
;// CONCATENATED MODULE: ../node_modules/micromark/lib/initialize/document.js
|
|
20584
20585
|
/**
|
|
20585
20586
|
* @typedef {import('micromark-util-types').Construct} Construct
|
|
20586
20587
|
* @typedef {import('micromark-util-types').ContainerState} ContainerState
|
|
@@ -21422,7 +21423,7 @@ function tokenizeContinuation(effects, ok, nok) {
|
|
|
21422
21423
|
}
|
|
21423
21424
|
}
|
|
21424
21425
|
|
|
21425
|
-
;// CONCATENATED MODULE: ../node_modules/
|
|
21426
|
+
;// CONCATENATED MODULE: ../node_modules/micromark/lib/initialize/flow.js
|
|
21426
21427
|
/**
|
|
21427
21428
|
* @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct
|
|
21428
21429
|
* @typedef {import('micromark-util-types').Initializer} Initializer
|
|
@@ -21492,7 +21493,7 @@ function initializeFlow(effects) {
|
|
|
21492
21493
|
}
|
|
21493
21494
|
}
|
|
21494
21495
|
|
|
21495
|
-
;// CONCATENATED MODULE: ../node_modules/
|
|
21496
|
+
;// CONCATENATED MODULE: ../node_modules/micromark/lib/initialize/text.js
|
|
21496
21497
|
/**
|
|
21497
21498
|
* @typedef {import('micromark-util-types').Code} Code
|
|
21498
21499
|
* @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct
|
|
@@ -21740,7 +21741,7 @@ function resolveAll(constructs, events, context) {
|
|
|
21740
21741
|
return events
|
|
21741
21742
|
}
|
|
21742
21743
|
|
|
21743
|
-
;// CONCATENATED MODULE: ../node_modules/
|
|
21744
|
+
;// CONCATENATED MODULE: ../node_modules/micromark/lib/create-tokenizer.js
|
|
21744
21745
|
/**
|
|
21745
21746
|
* @typedef {import('micromark-util-types').Chunk} Chunk
|
|
21746
21747
|
* @typedef {import('micromark-util-types').Code} Code
|
|
@@ -28420,7 +28421,7 @@ function tokenizeCodeText(effects, ok, nok) {
|
|
|
28420
28421
|
}
|
|
28421
28422
|
}
|
|
28422
28423
|
|
|
28423
|
-
;// CONCATENATED MODULE: ../node_modules/
|
|
28424
|
+
;// CONCATENATED MODULE: ../node_modules/micromark/lib/constructs.js
|
|
28424
28425
|
/**
|
|
28425
28426
|
* @typedef {import('micromark-util-types').Extension} Extension
|
|
28426
28427
|
*/
|
|
@@ -28507,7 +28508,7 @@ const disable = {
|
|
|
28507
28508
|
null: []
|
|
28508
28509
|
}
|
|
28509
28510
|
|
|
28510
|
-
;// CONCATENATED MODULE: ../node_modules/
|
|
28511
|
+
;// CONCATENATED MODULE: ../node_modules/micromark/lib/parse.js
|
|
28511
28512
|
/**
|
|
28512
28513
|
* @typedef {import('micromark-util-types').Create} Create
|
|
28513
28514
|
* @typedef {import('micromark-util-types').FullNormalizedExtension} FullNormalizedExtension
|
|
@@ -28559,7 +28560,7 @@ function parse_parse(options) {
|
|
|
28559
28560
|
}
|
|
28560
28561
|
}
|
|
28561
28562
|
|
|
28562
|
-
;// CONCATENATED MODULE: ../node_modules/
|
|
28563
|
+
;// CONCATENATED MODULE: ../node_modules/micromark/lib/preprocess.js
|
|
28563
28564
|
/**
|
|
28564
28565
|
* @typedef {import('micromark-util-types').Chunk} Chunk
|
|
28565
28566
|
* @typedef {import('micromark-util-types').Code} Code
|
|
@@ -28671,7 +28672,7 @@ function preprocess() {
|
|
|
28671
28672
|
}
|
|
28672
28673
|
}
|
|
28673
28674
|
|
|
28674
|
-
;// CONCATENATED MODULE: ../node_modules/
|
|
28675
|
+
;// CONCATENATED MODULE: ../node_modules/micromark/lib/postprocess.js
|
|
28675
28676
|
/**
|
|
28676
28677
|
* @typedef {import('micromark-util-types').Event} Event
|
|
28677
28678
|
*/
|
|
@@ -28771,93 +28772,7 @@ function decode($0, $1, $2) {
|
|
|
28771
28772
|
return decodeNamedCharacterReference($2) || $0
|
|
28772
28773
|
}
|
|
28773
28774
|
|
|
28774
|
-
;// CONCATENATED MODULE: ../node_modules/
|
|
28775
|
-
/**
|
|
28776
|
-
* @typedef {import('unist').Node} Node
|
|
28777
|
-
* @typedef {import('unist').Point} Point
|
|
28778
|
-
* @typedef {import('unist').Position} Position
|
|
28779
|
-
*/
|
|
28780
|
-
|
|
28781
|
-
/**
|
|
28782
|
-
* @typedef NodeLike
|
|
28783
|
-
* @property {string} type
|
|
28784
|
-
* @property {PositionLike | null | undefined} [position]
|
|
28785
|
-
*
|
|
28786
|
-
* @typedef PositionLike
|
|
28787
|
-
* @property {PointLike | null | undefined} [start]
|
|
28788
|
-
* @property {PointLike | null | undefined} [end]
|
|
28789
|
-
*
|
|
28790
|
-
* @typedef PointLike
|
|
28791
|
-
* @property {number | null | undefined} [line]
|
|
28792
|
-
* @property {number | null | undefined} [column]
|
|
28793
|
-
* @property {number | null | undefined} [offset]
|
|
28794
|
-
*/
|
|
28795
|
-
|
|
28796
|
-
/**
|
|
28797
|
-
* Serialize the positional info of a point, position (start and end points),
|
|
28798
|
-
* or node.
|
|
28799
|
-
*
|
|
28800
|
-
* @param {Node | NodeLike | Position | PositionLike | Point | PointLike | null | undefined} [value]
|
|
28801
|
-
* Node, position, or point.
|
|
28802
|
-
* @returns {string}
|
|
28803
|
-
* Pretty printed positional info of a node (`string`).
|
|
28804
|
-
*
|
|
28805
|
-
* In the format of a range `ls:cs-le:ce` (when given `node` or `position`)
|
|
28806
|
-
* or a point `l:c` (when given `point`), where `l` stands for line, `c` for
|
|
28807
|
-
* column, `s` for `start`, and `e` for end.
|
|
28808
|
-
* An empty string (`''`) is returned if the given value is neither `node`,
|
|
28809
|
-
* `position`, nor `point`.
|
|
28810
|
-
*/
|
|
28811
|
-
function lib_stringifyPosition(value) {
|
|
28812
|
-
// Nothing.
|
|
28813
|
-
if (!value || typeof value !== 'object') {
|
|
28814
|
-
return ''
|
|
28815
|
-
}
|
|
28816
|
-
|
|
28817
|
-
// Node.
|
|
28818
|
-
if ('position' in value || 'type' in value) {
|
|
28819
|
-
return lib_position(value.position)
|
|
28820
|
-
}
|
|
28821
|
-
|
|
28822
|
-
// Position.
|
|
28823
|
-
if ('start' in value || 'end' in value) {
|
|
28824
|
-
return lib_position(value)
|
|
28825
|
-
}
|
|
28826
|
-
|
|
28827
|
-
// Point.
|
|
28828
|
-
if ('line' in value || 'column' in value) {
|
|
28829
|
-
return lib_point(value)
|
|
28830
|
-
}
|
|
28831
|
-
|
|
28832
|
-
// ?
|
|
28833
|
-
return ''
|
|
28834
|
-
}
|
|
28835
|
-
|
|
28836
|
-
/**
|
|
28837
|
-
* @param {Point | PointLike | null | undefined} point
|
|
28838
|
-
* @returns {string}
|
|
28839
|
-
*/
|
|
28840
|
-
function lib_point(point) {
|
|
28841
|
-
return lib_index(point && point.line) + ':' + lib_index(point && point.column)
|
|
28842
|
-
}
|
|
28843
|
-
|
|
28844
|
-
/**
|
|
28845
|
-
* @param {Position | PositionLike | null | undefined} pos
|
|
28846
|
-
* @returns {string}
|
|
28847
|
-
*/
|
|
28848
|
-
function lib_position(pos) {
|
|
28849
|
-
return lib_point(pos && pos.start) + '-' + lib_point(pos && pos.end)
|
|
28850
|
-
}
|
|
28851
|
-
|
|
28852
|
-
/**
|
|
28853
|
-
* @param {number | null | undefined} value
|
|
28854
|
-
* @returns {number}
|
|
28855
|
-
*/
|
|
28856
|
-
function lib_index(value) {
|
|
28857
|
-
return value && typeof value === 'number' ? value : 1
|
|
28858
|
-
}
|
|
28859
|
-
|
|
28860
|
-
;// CONCATENATED MODULE: ../node_modules/react-markdown/node_modules/mdast-util-from-markdown/lib/index.js
|
|
28775
|
+
;// CONCATENATED MODULE: ../node_modules/mdast-util-from-markdown/lib/index.js
|
|
28861
28776
|
/**
|
|
28862
28777
|
* @typedef {import('micromark-util-types').Encoding} Encoding
|
|
28863
28778
|
* @typedef {import('micromark-util-types').Event} Event
|
|
@@ -29230,7 +29145,7 @@ function compiler(options) {
|
|
|
29230
29145
|
|
|
29231
29146
|
// Figure out `root` position.
|
|
29232
29147
|
tree.position = {
|
|
29233
|
-
start:
|
|
29148
|
+
start: lib_point(
|
|
29234
29149
|
events.length > 0
|
|
29235
29150
|
? events[0][1].start
|
|
29236
29151
|
: {
|
|
@@ -29239,7 +29154,7 @@ function compiler(options) {
|
|
|
29239
29154
|
offset: 0
|
|
29240
29155
|
}
|
|
29241
29156
|
),
|
|
29242
|
-
end:
|
|
29157
|
+
end: lib_point(
|
|
29243
29158
|
events.length > 0
|
|
29244
29159
|
? events[events.length - 2][1].end
|
|
29245
29160
|
: {
|
|
@@ -29475,7 +29390,7 @@ function compiler(options) {
|
|
|
29475
29390
|
this.tokenStack.push([token, errorHandler])
|
|
29476
29391
|
// @ts-expect-error: `end` will be patched later.
|
|
29477
29392
|
node.position = {
|
|
29478
|
-
start:
|
|
29393
|
+
start: lib_point(token.start)
|
|
29479
29394
|
}
|
|
29480
29395
|
return node
|
|
29481
29396
|
}
|
|
@@ -29520,7 +29435,7 @@ function compiler(options) {
|
|
|
29520
29435
|
'Cannot close `' +
|
|
29521
29436
|
token.type +
|
|
29522
29437
|
'` (' +
|
|
29523
|
-
|
|
29438
|
+
stringifyPosition({
|
|
29524
29439
|
start: token.start,
|
|
29525
29440
|
end: token.end
|
|
29526
29441
|
}) +
|
|
@@ -29534,7 +29449,7 @@ function compiler(options) {
|
|
|
29534
29449
|
handler.call(this, token, open[0])
|
|
29535
29450
|
}
|
|
29536
29451
|
}
|
|
29537
|
-
node.position.end =
|
|
29452
|
+
node.position.end = lib_point(token.end)
|
|
29538
29453
|
return node
|
|
29539
29454
|
}
|
|
29540
29455
|
|
|
@@ -29705,7 +29620,7 @@ function compiler(options) {
|
|
|
29705
29620
|
tail = text()
|
|
29706
29621
|
// @ts-expect-error: we’ll add `end` later.
|
|
29707
29622
|
tail.position = {
|
|
29708
|
-
start:
|
|
29623
|
+
start: lib_point(token.start)
|
|
29709
29624
|
}
|
|
29710
29625
|
// @ts-expect-error: Assume `parent` accepts `text`.
|
|
29711
29626
|
node.children.push(tail)
|
|
@@ -29721,7 +29636,7 @@ function compiler(options) {
|
|
|
29721
29636
|
function onexitdata(token) {
|
|
29722
29637
|
const tail = this.stack.pop()
|
|
29723
29638
|
tail.value += this.sliceSerialize(token)
|
|
29724
|
-
tail.position.end =
|
|
29639
|
+
tail.position.end = lib_point(token.end)
|
|
29725
29640
|
}
|
|
29726
29641
|
|
|
29727
29642
|
/**
|
|
@@ -29734,7 +29649,7 @@ function compiler(options) {
|
|
|
29734
29649
|
// If we’re at a hard break, include the line ending in there.
|
|
29735
29650
|
if (getData('atHardBreak')) {
|
|
29736
29651
|
const tail = context.children[context.children.length - 1]
|
|
29737
|
-
tail.position.end =
|
|
29652
|
+
tail.position.end = lib_point(token.end)
|
|
29738
29653
|
setData('atHardBreak')
|
|
29739
29654
|
return
|
|
29740
29655
|
}
|
|
@@ -29969,7 +29884,7 @@ function compiler(options) {
|
|
|
29969
29884
|
}
|
|
29970
29885
|
const tail = this.stack.pop()
|
|
29971
29886
|
tail.value += value
|
|
29972
|
-
tail.position.end =
|
|
29887
|
+
tail.position.end = lib_point(token.end)
|
|
29973
29888
|
}
|
|
29974
29889
|
|
|
29975
29890
|
/**
|
|
@@ -30153,7 +30068,7 @@ function compiler(options) {
|
|
|
30153
30068
|
* @returns {Point}
|
|
30154
30069
|
* unist point.
|
|
30155
30070
|
*/
|
|
30156
|
-
function
|
|
30071
|
+
function lib_point(d) {
|
|
30157
30072
|
return {
|
|
30158
30073
|
line: d.line,
|
|
30159
30074
|
column: d.column,
|
|
@@ -30215,14 +30130,14 @@ function defaultOnError(left, right) {
|
|
|
30215
30130
|
'Cannot close `' +
|
|
30216
30131
|
left.type +
|
|
30217
30132
|
'` (' +
|
|
30218
|
-
|
|
30133
|
+
stringifyPosition({
|
|
30219
30134
|
start: left.start,
|
|
30220
30135
|
end: left.end
|
|
30221
30136
|
}) +
|
|
30222
30137
|
'): a different token (`' +
|
|
30223
30138
|
right.type +
|
|
30224
30139
|
'`, ' +
|
|
30225
|
-
|
|
30140
|
+
stringifyPosition({
|
|
30226
30141
|
start: right.start,
|
|
30227
30142
|
end: right.end
|
|
30228
30143
|
}) +
|
|
@@ -30233,7 +30148,7 @@ function defaultOnError(left, right) {
|
|
|
30233
30148
|
'Cannot close document, a token (`' +
|
|
30234
30149
|
right.type +
|
|
30235
30150
|
'`, ' +
|
|
30236
|
-
|
|
30151
|
+
stringifyPosition({
|
|
30237
30152
|
start: right.start,
|
|
30238
30153
|
end: right.end
|
|
30239
30154
|
}) +
|
|
@@ -30242,7 +30157,7 @@ function defaultOnError(left, right) {
|
|
|
30242
30157
|
}
|
|
30243
30158
|
}
|
|
30244
30159
|
|
|
30245
|
-
;// CONCATENATED MODULE: ../node_modules/
|
|
30160
|
+
;// CONCATENATED MODULE: ../node_modules/remark-parse/lib/index.js
|
|
30246
30161
|
/**
|
|
30247
30162
|
* @typedef {import('mdast').Root} Root
|
|
30248
30163
|
* @typedef {import('mdast-util-from-markdown').Options} Options
|
|
@@ -31310,7 +31225,7 @@ const pointEnd = unist_util_position_lib_point('end')
|
|
|
31310
31225
|
* @returns {Position}
|
|
31311
31226
|
* Position.
|
|
31312
31227
|
*/
|
|
31313
|
-
function
|
|
31228
|
+
function lib_position(node) {
|
|
31314
31229
|
return {start: pointStart(node), end: pointEnd(node)}
|
|
31315
31230
|
}
|
|
31316
31231
|
|
|
@@ -33037,7 +32952,7 @@ function createState(tree, options) {
|
|
|
33037
32952
|
* Nothing.
|
|
33038
32953
|
*/
|
|
33039
32954
|
function patch(from, to) {
|
|
33040
|
-
if (from.position) to.position =
|
|
32955
|
+
if (from.position) to.position = lib_position(from)
|
|
33041
32956
|
}
|
|
33042
32957
|
|
|
33043
32958
|
/**
|
|
@@ -39323,7 +39238,7 @@ function lib_previous(match, email) {
|
|
|
39323
39238
|
)
|
|
39324
39239
|
}
|
|
39325
39240
|
|
|
39326
|
-
;// CONCATENATED MODULE: ../node_modules/mdast-util-
|
|
39241
|
+
;// CONCATENATED MODULE: ../node_modules/mdast-util-to-markdown/lib/util/association.js
|
|
39327
39242
|
/**
|
|
39328
39243
|
* @typedef {import('../types.js').AssociationId} AssociationId
|
|
39329
39244
|
*/
|
|
@@ -39358,7 +39273,7 @@ function association(node) {
|
|
|
39358
39273
|
return decodeString(node.identifier)
|
|
39359
39274
|
}
|
|
39360
39275
|
|
|
39361
|
-
;// CONCATENATED MODULE: ../node_modules/mdast-util-
|
|
39276
|
+
;// CONCATENATED MODULE: ../node_modules/mdast-util-to-markdown/lib/util/container-flow.js
|
|
39362
39277
|
/**
|
|
39363
39278
|
* @typedef {import('../types.js').FlowContent} FlowContent
|
|
39364
39279
|
* @typedef {import('../types.js').Node} Node
|
|
@@ -39447,7 +39362,7 @@ function between(left, right, parent, state) {
|
|
|
39447
39362
|
return '\n\n'
|
|
39448
39363
|
}
|
|
39449
39364
|
|
|
39450
|
-
;// CONCATENATED MODULE: ../node_modules/mdast-util-
|
|
39365
|
+
;// CONCATENATED MODULE: ../node_modules/mdast-util-to-markdown/lib/util/indent-lines.js
|
|
39451
39366
|
/**
|
|
39452
39367
|
* @typedef {import('../types.js').IndentLines} IndentLines
|
|
39453
39368
|
*/
|
|
@@ -39484,7 +39399,7 @@ function indentLines(value, map) {
|
|
|
39484
39399
|
}
|
|
39485
39400
|
}
|
|
39486
39401
|
|
|
39487
|
-
;// CONCATENATED MODULE: ../node_modules/mdast-util-
|
|
39402
|
+
;// CONCATENATED MODULE: ../node_modules/mdast-util-to-markdown/lib/util/pattern-compile.js
|
|
39488
39403
|
/**
|
|
39489
39404
|
* @typedef {import('../types.js').Unsafe} Unsafe
|
|
39490
39405
|
*/
|
|
@@ -39511,7 +39426,7 @@ function patternCompile(pattern) {
|
|
|
39511
39426
|
return pattern._compiled
|
|
39512
39427
|
}
|
|
39513
39428
|
|
|
39514
|
-
;// CONCATENATED MODULE: ../node_modules/mdast-util-
|
|
39429
|
+
;// CONCATENATED MODULE: ../node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.js
|
|
39515
39430
|
/**
|
|
39516
39431
|
* @typedef {import('../types.js').Unsafe} Unsafe
|
|
39517
39432
|
* @typedef {import('../types.js').ConstructName} ConstructName
|
|
@@ -39555,7 +39470,7 @@ function listInScope(stack, list, none) {
|
|
|
39555
39470
|
return false
|
|
39556
39471
|
}
|
|
39557
39472
|
|
|
39558
|
-
;// CONCATENATED MODULE: ../node_modules/mdast-util-
|
|
39473
|
+
;// CONCATENATED MODULE: ../node_modules/mdast-util-to-markdown/lib/util/safe.js
|
|
39559
39474
|
/**
|
|
39560
39475
|
* @typedef {import('../types.js').State} State
|
|
39561
39476
|
* @typedef {import('../types.js').SafeConfig} SafeConfig
|
|
@@ -39734,7 +39649,7 @@ function escapeBackslashes(value, after) {
|
|
|
39734
39649
|
return results.join('')
|
|
39735
39650
|
}
|
|
39736
39651
|
|
|
39737
|
-
;// CONCATENATED MODULE: ../node_modules/mdast-util-
|
|
39652
|
+
;// CONCATENATED MODULE: ../node_modules/mdast-util-to-markdown/lib/util/track.js
|
|
39738
39653
|
/**
|
|
39739
39654
|
* @typedef {import('../types.js').CreateTracker} CreateTracker
|
|
39740
39655
|
* @typedef {import('../types.js').TrackCurrent} TrackCurrent
|
|
@@ -40003,7 +39918,7 @@ function map(line, index, blank) {
|
|
|
40003
39918
|
return (blank ? '' : ' ') + line
|
|
40004
39919
|
}
|
|
40005
39920
|
|
|
40006
|
-
;// CONCATENATED MODULE: ../node_modules/mdast-util-
|
|
39921
|
+
;// CONCATENATED MODULE: ../node_modules/mdast-util-to-markdown/lib/util/container-phrasing.js
|
|
40007
39922
|
/**
|
|
40008
39923
|
* @typedef {import('../types.js').Handle} Handle
|
|
40009
39924
|
* @typedef {import('../types.js').Info} Info
|
|
@@ -40102,66 +40017,6 @@ function containerPhrasing(parent, state, info) {
|
|
|
40102
40017
|
return results.join('')
|
|
40103
40018
|
}
|
|
40104
40019
|
|
|
40105
|
-
;// CONCATENATED MODULE: ../node_modules/mdast-util-gfm-strikethrough/node_modules/mdast-util-to-markdown/lib/util/track.js
|
|
40106
|
-
/**
|
|
40107
|
-
* @typedef {import('../types.js').CreateTracker} CreateTracker
|
|
40108
|
-
* @typedef {import('../types.js').TrackCurrent} TrackCurrent
|
|
40109
|
-
* @typedef {import('../types.js').TrackMove} TrackMove
|
|
40110
|
-
* @typedef {import('../types.js').TrackShift} TrackShift
|
|
40111
|
-
*/
|
|
40112
|
-
|
|
40113
|
-
/**
|
|
40114
|
-
* Track positional info in the output.
|
|
40115
|
-
*
|
|
40116
|
-
* @type {CreateTracker}
|
|
40117
|
-
*/
|
|
40118
|
-
function track_track(config) {
|
|
40119
|
-
// Defaults are used to prevent crashes when older utilities somehow activate
|
|
40120
|
-
// this code.
|
|
40121
|
-
/* c8 ignore next 5 */
|
|
40122
|
-
const options = config || {}
|
|
40123
|
-
const now = options.now || {}
|
|
40124
|
-
let lineShift = options.lineShift || 0
|
|
40125
|
-
let line = now.line || 1
|
|
40126
|
-
let column = now.column || 1
|
|
40127
|
-
|
|
40128
|
-
return {move, current, shift}
|
|
40129
|
-
|
|
40130
|
-
/**
|
|
40131
|
-
* Get the current tracked info.
|
|
40132
|
-
*
|
|
40133
|
-
* @type {TrackCurrent}
|
|
40134
|
-
*/
|
|
40135
|
-
function current() {
|
|
40136
|
-
return {now: {line, column}, lineShift}
|
|
40137
|
-
}
|
|
40138
|
-
|
|
40139
|
-
/**
|
|
40140
|
-
* Define an increased line shift (the typical indent for lines).
|
|
40141
|
-
*
|
|
40142
|
-
* @type {TrackShift}
|
|
40143
|
-
*/
|
|
40144
|
-
function shift(value) {
|
|
40145
|
-
lineShift += value
|
|
40146
|
-
}
|
|
40147
|
-
|
|
40148
|
-
/**
|
|
40149
|
-
* Move past some generated markdown.
|
|
40150
|
-
*
|
|
40151
|
-
* @type {TrackMove}
|
|
40152
|
-
*/
|
|
40153
|
-
function move(input) {
|
|
40154
|
-
// eslint-disable-next-line unicorn/prefer-default-parameters
|
|
40155
|
-
const value = input || ''
|
|
40156
|
-
const chunks = value.split(/\r?\n|\r/g)
|
|
40157
|
-
const tail = chunks[chunks.length - 1]
|
|
40158
|
-
line += chunks.length - 1
|
|
40159
|
-
column =
|
|
40160
|
-
chunks.length === 1 ? column + tail.length : 1 + tail.length + lineShift
|
|
40161
|
-
return value
|
|
40162
|
-
}
|
|
40163
|
-
}
|
|
40164
|
-
|
|
40165
40020
|
;// CONCATENATED MODULE: ../node_modules/mdast-util-gfm-strikethrough/lib/index.js
|
|
40166
40021
|
/**
|
|
40167
40022
|
* @typedef {import('mdast').Delete} Delete
|
|
@@ -40250,7 +40105,7 @@ function exitStrikethrough(token) {
|
|
|
40250
40105
|
* @param {Delete} node
|
|
40251
40106
|
*/
|
|
40252
40107
|
function handleDelete(node, _, context, safeOptions) {
|
|
40253
|
-
const tracker =
|
|
40108
|
+
const tracker = track(safeOptions)
|
|
40254
40109
|
const exit = context.enter('strikethrough')
|
|
40255
40110
|
let value = tracker.move('~~')
|
|
40256
40111
|
value += containerPhrasing(node, context, {
|
|
@@ -40268,133 +40123,7 @@ function peekDelete() {
|
|
|
40268
40123
|
return '~'
|
|
40269
40124
|
}
|
|
40270
40125
|
|
|
40271
|
-
;// CONCATENATED MODULE: ../node_modules/mdast-util-
|
|
40272
|
-
/**
|
|
40273
|
-
* @typedef {import('../types.js').Handle} Handle
|
|
40274
|
-
* @typedef {import('../types.js').Info} Info
|
|
40275
|
-
* @typedef {import('../types.js').Parent} Parent
|
|
40276
|
-
* @typedef {import('../types.js').PhrasingContent} PhrasingContent
|
|
40277
|
-
* @typedef {import('../types.js').State} State
|
|
40278
|
-
*/
|
|
40279
|
-
|
|
40280
|
-
/**
|
|
40281
|
-
* Serialize the children of a parent that contains phrasing children.
|
|
40282
|
-
*
|
|
40283
|
-
* These children will be joined flush together.
|
|
40284
|
-
*
|
|
40285
|
-
* @param {Parent & {children: Array<PhrasingContent>}} parent
|
|
40286
|
-
* Parent of flow nodes.
|
|
40287
|
-
* @param {State} state
|
|
40288
|
-
* Info passed around about the current state.
|
|
40289
|
-
* @param {Info} info
|
|
40290
|
-
* Info on where we are in the document we are generating.
|
|
40291
|
-
* @returns {string}
|
|
40292
|
-
* Serialized children, joined together.
|
|
40293
|
-
*/
|
|
40294
|
-
function container_phrasing_containerPhrasing(parent, state, info) {
|
|
40295
|
-
const indexStack = state.indexStack
|
|
40296
|
-
const children = parent.children || []
|
|
40297
|
-
/** @type {Array<string>} */
|
|
40298
|
-
const results = []
|
|
40299
|
-
let index = -1
|
|
40300
|
-
let before = info.before
|
|
40301
|
-
|
|
40302
|
-
indexStack.push(-1)
|
|
40303
|
-
let tracker = state.createTracker(info)
|
|
40304
|
-
|
|
40305
|
-
while (++index < children.length) {
|
|
40306
|
-
const child = children[index]
|
|
40307
|
-
/** @type {string} */
|
|
40308
|
-
let after
|
|
40309
|
-
|
|
40310
|
-
indexStack[indexStack.length - 1] = index
|
|
40311
|
-
|
|
40312
|
-
if (index + 1 < children.length) {
|
|
40313
|
-
/** @type {Handle} */
|
|
40314
|
-
// @ts-expect-error: hush, it’s actually a `zwitch`.
|
|
40315
|
-
let handle = state.handle.handlers[children[index + 1].type]
|
|
40316
|
-
/** @type {Handle} */
|
|
40317
|
-
// @ts-expect-error: hush, it’s actually a `zwitch`.
|
|
40318
|
-
if (handle && handle.peek) handle = handle.peek
|
|
40319
|
-
after = handle
|
|
40320
|
-
? handle(children[index + 1], parent, state, {
|
|
40321
|
-
before: '',
|
|
40322
|
-
after: '',
|
|
40323
|
-
...tracker.current()
|
|
40324
|
-
}).charAt(0)
|
|
40325
|
-
: ''
|
|
40326
|
-
} else {
|
|
40327
|
-
after = info.after
|
|
40328
|
-
}
|
|
40329
|
-
|
|
40330
|
-
// In some cases, html (text) can be found in phrasing right after an eol.
|
|
40331
|
-
// When we’d serialize that, in most cases that would be seen as html
|
|
40332
|
-
// (flow).
|
|
40333
|
-
// As we can’t escape or so to prevent it from happening, we take a somewhat
|
|
40334
|
-
// reasonable approach: replace that eol with a space.
|
|
40335
|
-
// See: <https://github.com/syntax-tree/mdast-util-to-markdown/issues/15>
|
|
40336
|
-
if (
|
|
40337
|
-
results.length > 0 &&
|
|
40338
|
-
(before === '\r' || before === '\n') &&
|
|
40339
|
-
child.type === 'html'
|
|
40340
|
-
) {
|
|
40341
|
-
results[results.length - 1] = results[results.length - 1].replace(
|
|
40342
|
-
/(\r?\n|\r)$/,
|
|
40343
|
-
' '
|
|
40344
|
-
)
|
|
40345
|
-
before = ' '
|
|
40346
|
-
|
|
40347
|
-
// To do: does this work to reset tracker?
|
|
40348
|
-
tracker = state.createTracker(info)
|
|
40349
|
-
tracker.move(results.join(''))
|
|
40350
|
-
}
|
|
40351
|
-
|
|
40352
|
-
results.push(
|
|
40353
|
-
tracker.move(
|
|
40354
|
-
state.handle(child, parent, state, {
|
|
40355
|
-
...tracker.current(),
|
|
40356
|
-
before,
|
|
40357
|
-
after
|
|
40358
|
-
})
|
|
40359
|
-
)
|
|
40360
|
-
)
|
|
40361
|
-
|
|
40362
|
-
before = results[results.length - 1].slice(-1)
|
|
40363
|
-
}
|
|
40364
|
-
|
|
40365
|
-
indexStack.pop()
|
|
40366
|
-
|
|
40367
|
-
return results.join('')
|
|
40368
|
-
}
|
|
40369
|
-
|
|
40370
|
-
;// CONCATENATED MODULE: ../node_modules/mdast-util-gfm-table/node_modules/mdast-util-to-markdown/lib/util/pattern-compile.js
|
|
40371
|
-
/**
|
|
40372
|
-
* @typedef {import('../types.js').Unsafe} Unsafe
|
|
40373
|
-
*/
|
|
40374
|
-
|
|
40375
|
-
/**
|
|
40376
|
-
* @param {Unsafe} pattern
|
|
40377
|
-
* @returns {RegExp}
|
|
40378
|
-
*/
|
|
40379
|
-
function pattern_compile_patternCompile(pattern) {
|
|
40380
|
-
if (!pattern._compiled) {
|
|
40381
|
-
const before =
|
|
40382
|
-
(pattern.atBreak ? '[\\r\\n][\\t ]*' : '') +
|
|
40383
|
-
(pattern.before ? '(?:' + pattern.before + ')' : '')
|
|
40384
|
-
|
|
40385
|
-
pattern._compiled = new RegExp(
|
|
40386
|
-
(before ? '(' + before + ')' : '') +
|
|
40387
|
-
(/[|\\{}()[\]^$+*?.-]/.test(pattern.character) ? '\\' : '') +
|
|
40388
|
-
pattern.character +
|
|
40389
|
-
(pattern.after ? '(?:' + pattern.after + ')' : ''),
|
|
40390
|
-
'g'
|
|
40391
|
-
)
|
|
40392
|
-
}
|
|
40393
|
-
|
|
40394
|
-
return pattern._compiled
|
|
40395
|
-
}
|
|
40396
|
-
|
|
40397
|
-
;// CONCATENATED MODULE: ../node_modules/mdast-util-gfm-table/node_modules/mdast-util-to-markdown/lib/handle/inline-code.js
|
|
40126
|
+
;// CONCATENATED MODULE: ../node_modules/mdast-util-to-markdown/lib/handle/inline-code.js
|
|
40398
40127
|
/**
|
|
40399
40128
|
* @typedef {import('mdast').InlineCode} InlineCode
|
|
40400
40129
|
* @typedef {import('../types.js').Parent} Parent
|
|
@@ -40441,7 +40170,7 @@ function inline_code_inlineCode(node, _, state) {
|
|
|
40441
40170
|
// them out.
|
|
40442
40171
|
while (++index < state.unsafe.length) {
|
|
40443
40172
|
const pattern = state.unsafe[index]
|
|
40444
|
-
const expression =
|
|
40173
|
+
const expression = patternCompile(pattern)
|
|
40445
40174
|
/** @type {RegExpExecArray | null} */
|
|
40446
40175
|
let match
|
|
40447
40176
|
|
|
@@ -41073,7 +40802,7 @@ function gfmTableToMarkdown(options) {
|
|
|
41073
40802
|
function handleTableCell(node, _, context, safeOptions) {
|
|
41074
40803
|
const exit = context.enter('tableCell')
|
|
41075
40804
|
const subexit = context.enter('phrasing')
|
|
41076
|
-
const value =
|
|
40805
|
+
const value = containerPhrasing(node, context, {
|
|
41077
40806
|
...safeOptions,
|
|
41078
40807
|
before: around,
|
|
41079
40808
|
after: around
|
|
@@ -41168,7 +40897,7 @@ function gfmTableToMarkdown(options) {
|
|
|
41168
40897
|
}
|
|
41169
40898
|
}
|
|
41170
40899
|
|
|
41171
|
-
;// CONCATENATED MODULE: ../node_modules/mdast-util-
|
|
40900
|
+
;// CONCATENATED MODULE: ../node_modules/mdast-util-to-markdown/lib/util/check-bullet.js
|
|
41172
40901
|
/**
|
|
41173
40902
|
* @typedef {import('../types.js').State} State
|
|
41174
40903
|
* @typedef {import('../types.js').Options} Options
|
|
@@ -41192,7 +40921,7 @@ function checkBullet(state) {
|
|
|
41192
40921
|
return marker
|
|
41193
40922
|
}
|
|
41194
40923
|
|
|
41195
|
-
;// CONCATENATED MODULE: ../node_modules/mdast-util-
|
|
40924
|
+
;// CONCATENATED MODULE: ../node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.js
|
|
41196
40925
|
/**
|
|
41197
40926
|
* @typedef {import('../types.js').State} State
|
|
41198
40927
|
* @typedef {import('../types.js').Options} Options
|
|
@@ -41222,7 +40951,7 @@ function checkListItemIndent(state) {
|
|
|
41222
40951
|
return style
|
|
41223
40952
|
}
|
|
41224
40953
|
|
|
41225
|
-
;// CONCATENATED MODULE: ../node_modules/mdast-util-
|
|
40954
|
+
;// CONCATENATED MODULE: ../node_modules/mdast-util-to-markdown/lib/handle/list-item.js
|
|
41226
40955
|
/**
|
|
41227
40956
|
* @typedef {import('mdast').ListItem} ListItem
|
|
41228
40957
|
* @typedef {import('../types.js').Map} Map
|
|
@@ -41289,66 +41018,6 @@ function list_item_listItem(node, parent, state, info) {
|
|
|
41289
41018
|
}
|
|
41290
41019
|
}
|
|
41291
41020
|
|
|
41292
|
-
;// CONCATENATED MODULE: ../node_modules/mdast-util-gfm-task-list-item/node_modules/mdast-util-to-markdown/lib/util/track.js
|
|
41293
|
-
/**
|
|
41294
|
-
* @typedef {import('../types.js').CreateTracker} CreateTracker
|
|
41295
|
-
* @typedef {import('../types.js').TrackCurrent} TrackCurrent
|
|
41296
|
-
* @typedef {import('../types.js').TrackMove} TrackMove
|
|
41297
|
-
* @typedef {import('../types.js').TrackShift} TrackShift
|
|
41298
|
-
*/
|
|
41299
|
-
|
|
41300
|
-
/**
|
|
41301
|
-
* Track positional info in the output.
|
|
41302
|
-
*
|
|
41303
|
-
* @type {CreateTracker}
|
|
41304
|
-
*/
|
|
41305
|
-
function util_track_track(config) {
|
|
41306
|
-
// Defaults are used to prevent crashes when older utilities somehow activate
|
|
41307
|
-
// this code.
|
|
41308
|
-
/* c8 ignore next 5 */
|
|
41309
|
-
const options = config || {}
|
|
41310
|
-
const now = options.now || {}
|
|
41311
|
-
let lineShift = options.lineShift || 0
|
|
41312
|
-
let line = now.line || 1
|
|
41313
|
-
let column = now.column || 1
|
|
41314
|
-
|
|
41315
|
-
return {move, current, shift}
|
|
41316
|
-
|
|
41317
|
-
/**
|
|
41318
|
-
* Get the current tracked info.
|
|
41319
|
-
*
|
|
41320
|
-
* @type {TrackCurrent}
|
|
41321
|
-
*/
|
|
41322
|
-
function current() {
|
|
41323
|
-
return {now: {line, column}, lineShift}
|
|
41324
|
-
}
|
|
41325
|
-
|
|
41326
|
-
/**
|
|
41327
|
-
* Define an increased line shift (the typical indent for lines).
|
|
41328
|
-
*
|
|
41329
|
-
* @type {TrackShift}
|
|
41330
|
-
*/
|
|
41331
|
-
function shift(value) {
|
|
41332
|
-
lineShift += value
|
|
41333
|
-
}
|
|
41334
|
-
|
|
41335
|
-
/**
|
|
41336
|
-
* Move past some generated markdown.
|
|
41337
|
-
*
|
|
41338
|
-
* @type {TrackMove}
|
|
41339
|
-
*/
|
|
41340
|
-
function move(input) {
|
|
41341
|
-
// eslint-disable-next-line unicorn/prefer-default-parameters
|
|
41342
|
-
const value = input || ''
|
|
41343
|
-
const chunks = value.split(/\r?\n|\r/g)
|
|
41344
|
-
const tail = chunks[chunks.length - 1]
|
|
41345
|
-
line += chunks.length - 1
|
|
41346
|
-
column =
|
|
41347
|
-
chunks.length === 1 ? column + tail.length : 1 + tail.length + lineShift
|
|
41348
|
-
return value
|
|
41349
|
-
}
|
|
41350
|
-
}
|
|
41351
|
-
|
|
41352
41021
|
;// CONCATENATED MODULE: ../node_modules/mdast-util-gfm-task-list-item/lib/index.js
|
|
41353
41022
|
/**
|
|
41354
41023
|
* @typedef {import('mdast').Content} Content
|
|
@@ -41468,7 +41137,7 @@ function listItemWithTaskListItem(node, parent, context, safeOptions) {
|
|
|
41468
41137
|
const checkable =
|
|
41469
41138
|
typeof node.checked === 'boolean' && head && head.type === 'paragraph'
|
|
41470
41139
|
const checkbox = '[' + (node.checked ? 'x' : ' ') + '] '
|
|
41471
|
-
const tracker =
|
|
41140
|
+
const tracker = track(safeOptions)
|
|
41472
41141
|
|
|
41473
41142
|
if (checkable) {
|
|
41474
41143
|
tracker.move(checkbox)
|
|
@@ -49041,7 +48710,7 @@ function vbnet(Prism) {
|
|
|
49041
48710
|
})
|
|
49042
48711
|
}
|
|
49043
48712
|
|
|
49044
|
-
;// CONCATENATED MODULE: ../node_modules/
|
|
48713
|
+
;// CONCATENATED MODULE: ../node_modules/character-entities-legacy/index.js
|
|
49045
48714
|
/**
|
|
49046
48715
|
* List of legacy HTML named character references that don’t need a trailing semicolon.
|
|
49047
48716
|
*
|
|
@@ -49156,7 +48825,7 @@ const characterEntitiesLegacy = [
|
|
|
49156
48825
|
'yuml'
|
|
49157
48826
|
]
|
|
49158
48827
|
|
|
49159
|
-
;// CONCATENATED MODULE: ../node_modules/
|
|
48828
|
+
;// CONCATENATED MODULE: ../node_modules/character-reference-invalid/index.js
|
|
49160
48829
|
/**
|
|
49161
48830
|
* Map of invalid numeric character references to their replacements, according to HTML.
|
|
49162
48831
|
*
|
|
@@ -49193,7 +48862,7 @@ const characterReferenceInvalid = {
|
|
|
49193
48862
|
159: 'Ÿ'
|
|
49194
48863
|
}
|
|
49195
48864
|
|
|
49196
|
-
;// CONCATENATED MODULE: ../node_modules/
|
|
48865
|
+
;// CONCATENATED MODULE: ../node_modules/is-decimal/index.js
|
|
49197
48866
|
/**
|
|
49198
48867
|
* Check if the given character code, or the character code at the first
|
|
49199
48868
|
* character, is decimal.
|
|
@@ -49208,7 +48877,7 @@ function isDecimal(character) {
|
|
|
49208
48877
|
return code >= 48 && code <= 57 /* 0-9 */
|
|
49209
48878
|
}
|
|
49210
48879
|
|
|
49211
|
-
;// CONCATENATED MODULE: ../node_modules/
|
|
48880
|
+
;// CONCATENATED MODULE: ../node_modules/is-hexadecimal/index.js
|
|
49212
48881
|
/**
|
|
49213
48882
|
* Check if the given character code, or the character code at the first
|
|
49214
48883
|
* character, is hexadecimal.
|
|
@@ -49227,7 +48896,7 @@ function isHexadecimal(character) {
|
|
|
49227
48896
|
)
|
|
49228
48897
|
}
|
|
49229
48898
|
|
|
49230
|
-
;// CONCATENATED MODULE: ../node_modules/
|
|
48899
|
+
;// CONCATENATED MODULE: ../node_modules/is-alphabetical/index.js
|
|
49231
48900
|
/**
|
|
49232
48901
|
* Check if the given character code, or the character code at the first
|
|
49233
48902
|
* character, is alphabetical.
|
|
@@ -49245,7 +48914,7 @@ function isAlphabetical(character) {
|
|
|
49245
48914
|
)
|
|
49246
48915
|
}
|
|
49247
48916
|
|
|
49248
|
-
;// CONCATENATED MODULE: ../node_modules/
|
|
48917
|
+
;// CONCATENATED MODULE: ../node_modules/is-alphanumerical/index.js
|
|
49249
48918
|
|
|
49250
48919
|
|
|
49251
48920
|
|
|
@@ -49260,7 +48929,7 @@ function isAlphanumerical(character) {
|
|
|
49260
48929
|
return isAlphabetical(character) || isDecimal(character)
|
|
49261
48930
|
}
|
|
49262
48931
|
|
|
49263
|
-
;// CONCATENATED MODULE: ../node_modules/
|
|
48932
|
+
;// CONCATENATED MODULE: ../node_modules/parse-entities/lib/index.js
|
|
49264
48933
|
/**
|
|
49265
48934
|
* @typedef {import('unist').Point} Point
|
|
49266
48935
|
* @typedef {import('unist').Position} Position
|
|
@@ -71543,7 +71212,7 @@ refractor.register(zig)
|
|
|
71543
71212
|
|
|
71544
71213
|
|
|
71545
71214
|
|
|
71546
|
-
;// CONCATENATED MODULE: ../node_modules/rehype-prism-plus/dist/rehype-prism-plus.es.js
|
|
71215
|
+
;// CONCATENATED MODULE: ../node_modules/@uiw/react-markdown-preview/node_modules/rehype-prism-plus/dist/rehype-prism-plus.es.js
|
|
71547
71216
|
function l(){l=function(e,r){return new t(e,void 0,r)};var e=RegExp.prototype,r=new WeakMap;function t(e,n,i){var o=new RegExp(e,n);return r.set(o,i||r.get(e)),a(o,t.prototype)}function n(e,t){var n=r.get(t);return Object.keys(n).reduce(function(r,t){return r[t]=e[n[t]],r},Object.create(null))}return rehype_prism_plus_es_s(t,RegExp),t.prototype.exec=function(r){var t=e.exec.call(this,r);return t&&(t.groups=n(t,this)),t},t.prototype[Symbol.replace]=function(t,i){if("string"==typeof i){var o=r.get(this);return e[Symbol.replace].call(this,t,i.replace(/\$<([^>]+)>/g,function(e,r){return"$"+o[r]}))}if("function"==typeof i){var l=this;return e[Symbol.replace].call(this,t,function(){var e=arguments;return"object"!=typeof e[e.length-1]&&(e=[].slice.call(e)).push(n(e,l)),i.apply(this,e)})}return e[Symbol.replace].call(this,t,i)},l.apply(this,arguments)}function rehype_prism_plus_es_s(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),r&&a(e,r)}function a(e,r){return a=Object.setPrototypeOf||function(e,r){return e.__proto__=r,e},a(e,r)}function u(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function rehype_prism_plus_es_c(e,r){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(t)return(t=t.call(e)).next.bind(t);if(Array.isArray(e)||(t=function(e,r){if(e){if("string"==typeof e)return u(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?u(e,r):void 0}}(e))||r&&e&&"number"==typeof e.length){t&&(e=t);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var p=function(i){return function(o){return void 0===o&&(o={}),function(r){visit(r,"element",s)};function s(e,s,a){var u,p;if(a&&"pre"===a.tagName&&"code"===e.tagName){var f=(null==e||null==(u=e.data)?void 0:u.meta)||(null==e||null==(p=e.properties)?void 0:p.metastring)||"";e.properties.className?"boolean"==typeof e.properties.className?e.properties.className=[]:Array.isArray(e.properties.className)||(e.properties.className=[e.properties.className]):e.properties.className=[],e.properties.className.push("code-highlight");var m,h,d=function(e){for(var r,t=rehype_prism_plus_es_c(e.properties.className);!(r=t()).done;){var n=r.value;if("language-"===n.slice(0,9))return n.slice(9).toLowerCase()}return null}(e);if(d)try{var g;g=null!=d&&d.includes("diff-")?d.split("-")[1]:d,m=i.highlight(hast_util_to_string_toString(e),g),a.properties.className=(a.properties.className||[]).concat("language-"+g)}catch(r){if(!o.ignoreMissing||!/Unknown language/.test(r.message))throw r;m=e}else m=e;m.children=(h=1,function e(r){return r.reduce(function(r,t){if("text"===t.type){var n=t.value,i=(n.match(/\n/g)||"").length;if(0===i)t.position={start:{line:h,column:1},end:{line:h,column:1}},r.push(t);else for(var o,l=n.split("\n"),s=rehype_prism_plus_es_c(l.entries());!(o=s()).done;){var a=o.value,u=a[0],p=a[1];r.push({type:"text",value:u===l.length-1?p:p+"\n",position:{start:{line:h+u,column:1},end:{line:h+u,column:1}}})}return h+=i,r}if(Object.prototype.hasOwnProperty.call(t,"children")){var f=h;return t.children=e(t.children),r.push(t),t.position={start:{line:f,column:1},end:{line:h,column:1}},r}return r.push(t),r},[])})(m.children),m.position=m.children.length>0?{start:{line:m.children[0].position.start.line,column:0},end:{line:m.children[m.children.length-1].position.end.line,column:0}}:{start:{line:0,column:0},end:{line:0,column:0}};for(var v,y=function(e){var r=/{([\d,-]+)}/,t=e.split(",").map(function(e){return e.trim()}).join();if(r.test(t)){var i=r.exec(t)[1],o=parse_numeric_range(i);return function(e){return o.includes(e+1)}}return function(){return!1}}(f),b=function(e){var r=/*#__PURE__*/l(/showLineNumbers=([0-9]+)/i,{lines:1});if(r.test(e)){var t=r.exec(e);return Number(t.groups.lines)}return 1}(f),w=function(e){for(var r=new Array(e),t=0;t<e;t++)r[t]={type:"element",tagName:"span",properties:{className:[]},children:[]};return r}(m.position.end.line),N=["showlinenumbers=false",'showlinenumbers="false"',"showlinenumbers={false}"],j=function(){var e=v.value,n=e[0],i=e[1];i.properties.className=["code-line"];var l=filter(m,function(e){return e.position.start.line<=n+1&&e.position.end.line>=n+1});i.children=l.children,!f.toLowerCase().includes("showLineNumbers".toLowerCase())&&!o.showLineNumbers||N.some(function(e){return f.toLowerCase().includes(e)})||(i.properties.line=[(n+b).toString()],i.properties.className.push("line-number")),y(n)&&i.properties.className.push("highlight-line"),("diff"===d||null!=d&&d.includes("diff-"))&&"-"===hast_util_to_string_toString(i).substring(0,1)?i.properties.className.push("deleted"):("diff"===d||null!=d&&d.includes("diff-"))&&"+"===hast_util_to_string_toString(i).substring(0,1)&&i.properties.className.push("inserted")},x=rehype_prism_plus_es_c(w.entries());!(v=x()).done;)j();w.length>0&&""===hast_util_to_string_toString(w[w.length-1]).trim()&&w.pop(),e.children=w}}}},f=p(refractor),m=p(refractor);
|
|
71548
71217
|
//# sourceMappingURL=rehype-prism-plus.es.js.map
|
|
71549
71218
|
|
|
@@ -74447,121 +74116,6 @@ function toDecimal(code, next, omit) {
|
|
|
74447
74116
|
: value + ';'
|
|
74448
74117
|
}
|
|
74449
74118
|
|
|
74450
|
-
;// CONCATENATED MODULE: ../node_modules/stringify-entities/node_modules/character-entities-legacy/index.js
|
|
74451
|
-
/**
|
|
74452
|
-
* List of legacy HTML named character references that don’t need a trailing semicolon.
|
|
74453
|
-
*
|
|
74454
|
-
* @type {Array<string>}
|
|
74455
|
-
*/
|
|
74456
|
-
const character_entities_legacy_characterEntitiesLegacy = [
|
|
74457
|
-
'AElig',
|
|
74458
|
-
'AMP',
|
|
74459
|
-
'Aacute',
|
|
74460
|
-
'Acirc',
|
|
74461
|
-
'Agrave',
|
|
74462
|
-
'Aring',
|
|
74463
|
-
'Atilde',
|
|
74464
|
-
'Auml',
|
|
74465
|
-
'COPY',
|
|
74466
|
-
'Ccedil',
|
|
74467
|
-
'ETH',
|
|
74468
|
-
'Eacute',
|
|
74469
|
-
'Ecirc',
|
|
74470
|
-
'Egrave',
|
|
74471
|
-
'Euml',
|
|
74472
|
-
'GT',
|
|
74473
|
-
'Iacute',
|
|
74474
|
-
'Icirc',
|
|
74475
|
-
'Igrave',
|
|
74476
|
-
'Iuml',
|
|
74477
|
-
'LT',
|
|
74478
|
-
'Ntilde',
|
|
74479
|
-
'Oacute',
|
|
74480
|
-
'Ocirc',
|
|
74481
|
-
'Ograve',
|
|
74482
|
-
'Oslash',
|
|
74483
|
-
'Otilde',
|
|
74484
|
-
'Ouml',
|
|
74485
|
-
'QUOT',
|
|
74486
|
-
'REG',
|
|
74487
|
-
'THORN',
|
|
74488
|
-
'Uacute',
|
|
74489
|
-
'Ucirc',
|
|
74490
|
-
'Ugrave',
|
|
74491
|
-
'Uuml',
|
|
74492
|
-
'Yacute',
|
|
74493
|
-
'aacute',
|
|
74494
|
-
'acirc',
|
|
74495
|
-
'acute',
|
|
74496
|
-
'aelig',
|
|
74497
|
-
'agrave',
|
|
74498
|
-
'amp',
|
|
74499
|
-
'aring',
|
|
74500
|
-
'atilde',
|
|
74501
|
-
'auml',
|
|
74502
|
-
'brvbar',
|
|
74503
|
-
'ccedil',
|
|
74504
|
-
'cedil',
|
|
74505
|
-
'cent',
|
|
74506
|
-
'copy',
|
|
74507
|
-
'curren',
|
|
74508
|
-
'deg',
|
|
74509
|
-
'divide',
|
|
74510
|
-
'eacute',
|
|
74511
|
-
'ecirc',
|
|
74512
|
-
'egrave',
|
|
74513
|
-
'eth',
|
|
74514
|
-
'euml',
|
|
74515
|
-
'frac12',
|
|
74516
|
-
'frac14',
|
|
74517
|
-
'frac34',
|
|
74518
|
-
'gt',
|
|
74519
|
-
'iacute',
|
|
74520
|
-
'icirc',
|
|
74521
|
-
'iexcl',
|
|
74522
|
-
'igrave',
|
|
74523
|
-
'iquest',
|
|
74524
|
-
'iuml',
|
|
74525
|
-
'laquo',
|
|
74526
|
-
'lt',
|
|
74527
|
-
'macr',
|
|
74528
|
-
'micro',
|
|
74529
|
-
'middot',
|
|
74530
|
-
'nbsp',
|
|
74531
|
-
'not',
|
|
74532
|
-
'ntilde',
|
|
74533
|
-
'oacute',
|
|
74534
|
-
'ocirc',
|
|
74535
|
-
'ograve',
|
|
74536
|
-
'ordf',
|
|
74537
|
-
'ordm',
|
|
74538
|
-
'oslash',
|
|
74539
|
-
'otilde',
|
|
74540
|
-
'ouml',
|
|
74541
|
-
'para',
|
|
74542
|
-
'plusmn',
|
|
74543
|
-
'pound',
|
|
74544
|
-
'quot',
|
|
74545
|
-
'raquo',
|
|
74546
|
-
'reg',
|
|
74547
|
-
'sect',
|
|
74548
|
-
'shy',
|
|
74549
|
-
'sup1',
|
|
74550
|
-
'sup2',
|
|
74551
|
-
'sup3',
|
|
74552
|
-
'szlig',
|
|
74553
|
-
'thorn',
|
|
74554
|
-
'times',
|
|
74555
|
-
'uacute',
|
|
74556
|
-
'ucirc',
|
|
74557
|
-
'ugrave',
|
|
74558
|
-
'uml',
|
|
74559
|
-
'uuml',
|
|
74560
|
-
'yacute',
|
|
74561
|
-
'yen',
|
|
74562
|
-
'yuml'
|
|
74563
|
-
]
|
|
74564
|
-
|
|
74565
74119
|
;// CONCATENATED MODULE: ../node_modules/character-entities-html4/index.js
|
|
74566
74120
|
/**
|
|
74567
74121
|
* Map of named character references from HTML 4.
|
|
@@ -74882,7 +74436,7 @@ function toNamed(code, next, omit, attribute) {
|
|
|
74882
74436
|
|
|
74883
74437
|
if (
|
|
74884
74438
|
omit &&
|
|
74885
|
-
|
|
74439
|
+
characterEntitiesLegacy.includes(name) &&
|
|
74886
74440
|
!dangerous.includes(name) &&
|
|
74887
74441
|
(!attribute ||
|
|
74888
74442
|
(next &&
|
|
@@ -76246,6 +75800,10 @@ function rehypeStringify(config) {
|
|
|
76246
75800
|
|
|
76247
75801
|
const rehype = unified().use(rehypeParse).use(rehypeStringify).freeze()
|
|
76248
75802
|
|
|
75803
|
+
;// CONCATENATED MODULE: ../node_modules/rehype-prism-plus/dist/rehype-prism-plus.es.js
|
|
75804
|
+
function rehype_prism_plus_es_a(){rehype_prism_plus_es_a=function(e,r){return new t(e,void 0,r)};var e=RegExp.prototype,r=new WeakMap;function t(e,n,i){var o=new RegExp(e,n);return r.set(o,i||r.get(e)),rehype_prism_plus_es_l(o,t.prototype)}function n(e,t){var n=r.get(t);return Object.keys(n).reduce(function(r,t){var i=n[t];if("number"==typeof i)r[t]=e[i];else{for(var o=0;void 0===e[i[o]]&&o+1<i.length;)o++;r[t]=e[i[o]]}return r},Object.create(null))}return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),r&&rehype_prism_plus_es_l(e,r)}(t,RegExp),t.prototype.exec=function(r){var t=e.exec.call(this,r);if(t){t.groups=n(t,this);var i=t.indices;i&&(i.groups=n(i,this))}return t},t.prototype[Symbol.replace]=function(t,i){if("string"==typeof i){var o=r.get(this);return e[Symbol.replace].call(this,t,i.replace(/\$<([^>]+)>/g,function(e,r){var t=o[r];return"$"+(Array.isArray(t)?t.join("$"):t)}))}if("function"==typeof i){var a=this;return e[Symbol.replace].call(this,t,function(){var e=arguments;return"object"!=typeof e[e.length-1]&&(e=[].slice.call(e)).push(n(e,a)),i.apply(this,e)})}return e[Symbol.replace].call(this,t,i)},rehype_prism_plus_es_a.apply(this,arguments)}function rehype_prism_plus_es_l(e,r){return rehype_prism_plus_es_l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,r){return e.__proto__=r,e},rehype_prism_plus_es_l(e,r)}function dist_rehype_prism_plus_es_s(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function rehype_prism_plus_es_u(e,r){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(t)return(t=t.call(e)).next.bind(t);if(Array.isArray(e)||(t=function(e,r){if(e){if("string"==typeof e)return dist_rehype_prism_plus_es_s(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?dist_rehype_prism_plus_es_s(e,r):void 0}}(e))||r&&e&&"number"==typeof e.length){t&&(e=t);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var dist_rehype_prism_plus_es_c=function(i){return function(o){return void 0===o&&(o={}),function(e,r){if(r&&!e.registered(r))throw new Error('The default language "'+r+'" is not registered with refractor.')}(i,o.defaultLanguage),function(r){visit(r,"element",l)};function l(e,l,s){var c,p;if(s&&"pre"===s.tagName&&"code"===e.tagName){var f=(null==e||null==(c=e.data)?void 0:c.meta)||(null==e||null==(p=e.properties)?void 0:p.metastring)||"";e.properties.className?"boolean"==typeof e.properties.className?e.properties.className=[]:Array.isArray(e.properties.className)||(e.properties.className=[e.properties.className]):e.properties.className=[];var m,h,d=function(e){for(var r,t=rehype_prism_plus_es_u(e.properties.className);!(r=t()).done;){var n=r.value;if("language-"===n.slice(0,9))return n.slice(9).toLowerCase()}return null}(e);if(!d&&o.defaultLanguage&&e.properties.className.push("language-"+(d=o.defaultLanguage)),e.properties.className.push("code-highlight"),d)try{var g,v;v=null!=(g=d)&&g.includes("diff-")?d.split("-")[1]:d,m=i.highlight(hast_util_to_string_toString(e),v),s.properties.className=(s.properties.className||[]).concat("language-"+v)}catch(r){if(!o.ignoreMissing||!/Unknown language/.test(r.message))throw r;m=e}else m=e;m.children=(h=1,function e(r){return r.reduce(function(r,t){if("text"===t.type){var n=t.value,i=(n.match(/\n/g)||"").length;if(0===i)t.position={start:{line:h,column:1},end:{line:h,column:1}},r.push(t);else for(var o,a=n.split("\n"),l=rehype_prism_plus_es_u(a.entries());!(o=l()).done;){var s=o.value,c=s[0],p=s[1];r.push({type:"text",value:c===a.length-1?p:p+"\n",position:{start:{line:h+c,column:1},end:{line:h+c,column:1}}})}return h+=i,r}if(Object.prototype.hasOwnProperty.call(t,"children")){var f=h;return t.children=e(t.children),r.push(t),t.position={start:{line:f,column:1},end:{line:h,column:1}},r}return r.push(t),r},[])})(m.children),m.position=m.children.length>0?{start:{line:m.children[0].position.start.line,column:0},end:{line:m.children[m.children.length-1].position.end.line,column:0}}:{start:{line:0,column:0},end:{line:0,column:0}};for(var y,b=function(e){var r=/{([\d,-]+)}/,t=e.split(",").map(function(e){return e.trim()}).join();if(r.test(t)){var i=r.exec(t)[1],o=parse_numeric_range(i);return function(e){return o.includes(e+1)}}return function(){return!1}}(f),w=function(e){var r=/*#__PURE__*/rehype_prism_plus_es_a(/showLineNumbers=(\d+)/i,{lines:1});if(r.test(e)){var t=r.exec(e);return Number(t.groups.lines)}return 1}(f),N=function(e){for(var r=new Array(e),t=0;t<e;t++)r[t]={type:"element",tagName:"span",properties:{className:[]},children:[]};return r}(m.position.end.line),j=["showlinenumbers=false",'showlinenumbers="false"',"showlinenumbers={false}"],x=function(){var e,n,i=y.value,a=i[0],l=i[1];l.properties.className=["code-line"];var s=filter(m,function(e){return e.position.start.line<=a+1&&e.position.end.line>=a+1});l.children=s.children,!f.toLowerCase().includes("showLineNumbers".toLowerCase())&&!o.showLineNumbers||j.some(function(e){return f.toLowerCase().includes(e)})||(l.properties.line=[(a+w).toString()],l.properties.className.push("line-number")),b(a)&&l.properties.className.push("highlight-line"),("diff"===d||null!=(e=d)&&e.includes("diff-"))&&"-"===hast_util_to_string_toString(l).substring(0,1)?l.properties.className.push("deleted"):("diff"===d||null!=(n=d)&&n.includes("diff-"))&&"+"===hast_util_to_string_toString(l).substring(0,1)&&l.properties.className.push("inserted")},O=rehype_prism_plus_es_u(N.entries());!(y=O()).done;)x();N.length>0&&""===hast_util_to_string_toString(N[N.length-1]).trim()&&N.pop(),e.children=N}}}},rehype_prism_plus_es_p=dist_rehype_prism_plus_es_c(refractor),rehype_prism_plus_es_f=dist_rehype_prism_plus_es_c(refractor);
|
|
75805
|
+
//# sourceMappingURL=rehype-prism-plus.es.js.map
|
|
75806
|
+
|
|
76249
75807
|
;// CONCATENATED MODULE: ./src/components/TextArea/Markdown.tsx
|
|
76250
75808
|
var _templateObject;function html2Escape(sHtml){return sHtml// .replace(/```(\w+)?([\s\S]*?)(\s.+)?```/g, (str: string) => {
|
|
76251
75809
|
// return str.replace(
|
|
@@ -76254,7 +75812,7 @@ var _templateObject;function html2Escape(sHtml){return sHtml// .replace(/```(\w+
|
|
|
76254
75812
|
// );
|
|
76255
75813
|
// })
|
|
76256
75814
|
.replace(/[<&"]/g,function(c){return{'<':'<','>':'>','&':'&','"':'"'}[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
|
|
76257
|
-
},[]);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(
|
|
75815
|
+
},[]);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(rehype_prism_plus_es_f,{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||''}});}
|
|
76258
75816
|
;// CONCATENATED MODULE: ../node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
|
|
76259
75817
|
|
|
76260
75818
|
function _arrayWithoutHoles(arr) {
|