@readme/markdown 6.75.0-beta.10 → 6.75.0-beta.13
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/main.js +5193 -1972
- package/dist/main.node.js +562 -7
- package/package.json +9 -5
package/dist/main.node.js
CHANGED
|
@@ -59679,6 +59679,553 @@ const parseOptions = (userOpts = {}) => {
|
|
|
59679
59679
|
return opts;
|
|
59680
59680
|
};
|
|
59681
59681
|
|
|
59682
|
+
;// CONCATENATED MODULE: ./node_modules/unist-util-visit/node_modules/unist-util-is/index.js
|
|
59683
|
+
/**
|
|
59684
|
+
* @typedef {import('unist').Node} Node
|
|
59685
|
+
* @typedef {import('unist').Parent} Parent
|
|
59686
|
+
*
|
|
59687
|
+
* @typedef {string} Type
|
|
59688
|
+
* @typedef {Object<string, unknown>} Props
|
|
59689
|
+
*
|
|
59690
|
+
* @typedef {null|undefined|Type|Props|TestFunctionAnything|Array.<Type|Props|TestFunctionAnything>} Test
|
|
59691
|
+
*/
|
|
59692
|
+
|
|
59693
|
+
/**
|
|
59694
|
+
* Check if a node passes a test
|
|
59695
|
+
*
|
|
59696
|
+
* @callback TestFunctionAnything
|
|
59697
|
+
* @param {Node} node
|
|
59698
|
+
* @param {number|null|undefined} [index]
|
|
59699
|
+
* @param {Parent|null|undefined} [parent]
|
|
59700
|
+
* @returns {boolean|void}
|
|
59701
|
+
*/
|
|
59702
|
+
|
|
59703
|
+
/**
|
|
59704
|
+
* Check if a node passes a certain node test
|
|
59705
|
+
*
|
|
59706
|
+
* @template {Node} X
|
|
59707
|
+
* @callback TestFunctionPredicate
|
|
59708
|
+
* @param {Node} node
|
|
59709
|
+
* @param {number|null|undefined} [index]
|
|
59710
|
+
* @param {Parent|null|undefined} [parent]
|
|
59711
|
+
* @returns {node is X}
|
|
59712
|
+
*/
|
|
59713
|
+
|
|
59714
|
+
/**
|
|
59715
|
+
* @callback AssertAnything
|
|
59716
|
+
* @param {unknown} [node]
|
|
59717
|
+
* @param {number|null|undefined} [index]
|
|
59718
|
+
* @param {Parent|null|undefined} [parent]
|
|
59719
|
+
* @returns {boolean}
|
|
59720
|
+
*/
|
|
59721
|
+
|
|
59722
|
+
/**
|
|
59723
|
+
* Check if a node passes a certain node test
|
|
59724
|
+
*
|
|
59725
|
+
* @template {Node} Y
|
|
59726
|
+
* @callback AssertPredicate
|
|
59727
|
+
* @param {unknown} [node]
|
|
59728
|
+
* @param {number|null|undefined} [index]
|
|
59729
|
+
* @param {Parent|null|undefined} [parent]
|
|
59730
|
+
* @returns {node is Y}
|
|
59731
|
+
*/
|
|
59732
|
+
|
|
59733
|
+
const unist_util_is_is =
|
|
59734
|
+
/**
|
|
59735
|
+
* Check if a node passes a test.
|
|
59736
|
+
* When a `parent` node is known the `index` of node should also be given.
|
|
59737
|
+
*
|
|
59738
|
+
* @type {(
|
|
59739
|
+
* (<T extends Node>(node: unknown, test: T['type']|Partial<T>|TestFunctionPredicate<T>|Array.<T['type']|Partial<T>|TestFunctionPredicate<T>>, index?: number|null|undefined, parent?: Parent|null|undefined, context?: unknown) => node is T) &
|
|
59740
|
+
* ((node?: unknown, test?: Test, index?: number|null|undefined, parent?: Parent|null|undefined, context?: unknown) => boolean)
|
|
59741
|
+
* )}
|
|
59742
|
+
*/
|
|
59743
|
+
(
|
|
59744
|
+
/**
|
|
59745
|
+
* Check if a node passes a test.
|
|
59746
|
+
* When a `parent` node is known the `index` of node should also be given.
|
|
59747
|
+
*
|
|
59748
|
+
* @param {unknown} [node] Node to check
|
|
59749
|
+
* @param {Test} [test]
|
|
59750
|
+
* When nullish, checks if `node` is a `Node`.
|
|
59751
|
+
* When `string`, works like passing `function (node) {return node.type === test}`.
|
|
59752
|
+
* When `function` checks if function passed the node is true.
|
|
59753
|
+
* When `object`, checks that all keys in test are in node, and that they have (strictly) equal values.
|
|
59754
|
+
* When `array`, checks any one of the subtests pass.
|
|
59755
|
+
* @param {number|null|undefined} [index] Position of `node` in `parent`
|
|
59756
|
+
* @param {Parent|null|undefined} [parent] Parent of `node`
|
|
59757
|
+
* @param {unknown} [context] Context object to invoke `test` with
|
|
59758
|
+
* @returns {boolean} Whether test passed and `node` is a `Node` (object with `type` set to non-empty `string`).
|
|
59759
|
+
*/
|
|
59760
|
+
// eslint-disable-next-line max-params
|
|
59761
|
+
function is(node, test, index, parent, context) {
|
|
59762
|
+
const check = unist_util_is_convert(test)
|
|
59763
|
+
|
|
59764
|
+
if (
|
|
59765
|
+
index !== undefined &&
|
|
59766
|
+
index !== null &&
|
|
59767
|
+
(typeof index !== 'number' ||
|
|
59768
|
+
index < 0 ||
|
|
59769
|
+
index === Number.POSITIVE_INFINITY)
|
|
59770
|
+
) {
|
|
59771
|
+
throw new Error('Expected positive finite index')
|
|
59772
|
+
}
|
|
59773
|
+
|
|
59774
|
+
if (
|
|
59775
|
+
parent !== undefined &&
|
|
59776
|
+
parent !== null &&
|
|
59777
|
+
(!is(parent) || !parent.children)
|
|
59778
|
+
) {
|
|
59779
|
+
throw new Error('Expected parent node')
|
|
59780
|
+
}
|
|
59781
|
+
|
|
59782
|
+
if (
|
|
59783
|
+
(parent === undefined || parent === null) !==
|
|
59784
|
+
(index === undefined || index === null)
|
|
59785
|
+
) {
|
|
59786
|
+
throw new Error('Expected both parent and index')
|
|
59787
|
+
}
|
|
59788
|
+
|
|
59789
|
+
// @ts-expect-error Looks like a node.
|
|
59790
|
+
return node && node.type && typeof node.type === 'string'
|
|
59791
|
+
? Boolean(check.call(context, node, index, parent))
|
|
59792
|
+
: false
|
|
59793
|
+
}
|
|
59794
|
+
)
|
|
59795
|
+
|
|
59796
|
+
const unist_util_is_convert =
|
|
59797
|
+
/**
|
|
59798
|
+
* @type {(
|
|
59799
|
+
* (<T extends Node>(test: T['type']|Partial<T>|TestFunctionPredicate<T>) => AssertPredicate<T>) &
|
|
59800
|
+
* ((test?: Test) => AssertAnything)
|
|
59801
|
+
* )}
|
|
59802
|
+
*/
|
|
59803
|
+
(
|
|
59804
|
+
/**
|
|
59805
|
+
* Generate an assertion from a check.
|
|
59806
|
+
* @param {Test} [test]
|
|
59807
|
+
* When nullish, checks if `node` is a `Node`.
|
|
59808
|
+
* When `string`, works like passing `function (node) {return node.type === test}`.
|
|
59809
|
+
* When `function` checks if function passed the node is true.
|
|
59810
|
+
* When `object`, checks that all keys in test are in node, and that they have (strictly) equal values.
|
|
59811
|
+
* When `array`, checks any one of the subtests pass.
|
|
59812
|
+
* @returns {AssertAnything}
|
|
59813
|
+
*/
|
|
59814
|
+
function (test) {
|
|
59815
|
+
if (test === undefined || test === null) {
|
|
59816
|
+
return unist_util_is_ok
|
|
59817
|
+
}
|
|
59818
|
+
|
|
59819
|
+
if (typeof test === 'string') {
|
|
59820
|
+
return unist_util_is_typeFactory(test)
|
|
59821
|
+
}
|
|
59822
|
+
|
|
59823
|
+
if (typeof test === 'object') {
|
|
59824
|
+
return Array.isArray(test) ? unist_util_is_anyFactory(test) : unist_util_is_propsFactory(test)
|
|
59825
|
+
}
|
|
59826
|
+
|
|
59827
|
+
if (typeof test === 'function') {
|
|
59828
|
+
return unist_util_is_castFactory(test)
|
|
59829
|
+
}
|
|
59830
|
+
|
|
59831
|
+
throw new Error('Expected function, string, or object as test')
|
|
59832
|
+
}
|
|
59833
|
+
)
|
|
59834
|
+
/**
|
|
59835
|
+
* @param {Array.<Type|Props|TestFunctionAnything>} tests
|
|
59836
|
+
* @returns {AssertAnything}
|
|
59837
|
+
*/
|
|
59838
|
+
function unist_util_is_anyFactory(tests) {
|
|
59839
|
+
/** @type {Array.<AssertAnything>} */
|
|
59840
|
+
const checks = []
|
|
59841
|
+
let index = -1
|
|
59842
|
+
|
|
59843
|
+
while (++index < tests.length) {
|
|
59844
|
+
checks[index] = unist_util_is_convert(tests[index])
|
|
59845
|
+
}
|
|
59846
|
+
|
|
59847
|
+
return unist_util_is_castFactory(any)
|
|
59848
|
+
|
|
59849
|
+
/**
|
|
59850
|
+
* @this {unknown}
|
|
59851
|
+
* @param {unknown[]} parameters
|
|
59852
|
+
* @returns {boolean}
|
|
59853
|
+
*/
|
|
59854
|
+
function any(...parameters) {
|
|
59855
|
+
let index = -1
|
|
59856
|
+
|
|
59857
|
+
while (++index < checks.length) {
|
|
59858
|
+
if (checks[index].call(this, ...parameters)) return true
|
|
59859
|
+
}
|
|
59860
|
+
|
|
59861
|
+
return false
|
|
59862
|
+
}
|
|
59863
|
+
}
|
|
59864
|
+
|
|
59865
|
+
/**
|
|
59866
|
+
* Utility to assert each property in `test` is represented in `node`, and each
|
|
59867
|
+
* values are strictly equal.
|
|
59868
|
+
*
|
|
59869
|
+
* @param {Props} check
|
|
59870
|
+
* @returns {AssertAnything}
|
|
59871
|
+
*/
|
|
59872
|
+
function unist_util_is_propsFactory(check) {
|
|
59873
|
+
return unist_util_is_castFactory(all)
|
|
59874
|
+
|
|
59875
|
+
/**
|
|
59876
|
+
* @param {Node} node
|
|
59877
|
+
* @returns {boolean}
|
|
59878
|
+
*/
|
|
59879
|
+
function all(node) {
|
|
59880
|
+
/** @type {string} */
|
|
59881
|
+
let key
|
|
59882
|
+
|
|
59883
|
+
for (key in check) {
|
|
59884
|
+
// @ts-expect-error: hush, it sure works as an index.
|
|
59885
|
+
if (node[key] !== check[key]) return false
|
|
59886
|
+
}
|
|
59887
|
+
|
|
59888
|
+
return true
|
|
59889
|
+
}
|
|
59890
|
+
}
|
|
59891
|
+
|
|
59892
|
+
/**
|
|
59893
|
+
* Utility to convert a string into a function which checks a given node’s type
|
|
59894
|
+
* for said string.
|
|
59895
|
+
*
|
|
59896
|
+
* @param {Type} check
|
|
59897
|
+
* @returns {AssertAnything}
|
|
59898
|
+
*/
|
|
59899
|
+
function unist_util_is_typeFactory(check) {
|
|
59900
|
+
return unist_util_is_castFactory(type)
|
|
59901
|
+
|
|
59902
|
+
/**
|
|
59903
|
+
* @param {Node} node
|
|
59904
|
+
*/
|
|
59905
|
+
function type(node) {
|
|
59906
|
+
return node && node.type === check
|
|
59907
|
+
}
|
|
59908
|
+
}
|
|
59909
|
+
|
|
59910
|
+
/**
|
|
59911
|
+
* Utility to convert a string into a function which checks a given node’s type
|
|
59912
|
+
* for said string.
|
|
59913
|
+
* @param {TestFunctionAnything} check
|
|
59914
|
+
* @returns {AssertAnything}
|
|
59915
|
+
*/
|
|
59916
|
+
function unist_util_is_castFactory(check) {
|
|
59917
|
+
return assertion
|
|
59918
|
+
|
|
59919
|
+
/**
|
|
59920
|
+
* @this {unknown}
|
|
59921
|
+
* @param {Array.<unknown>} parameters
|
|
59922
|
+
* @returns {boolean}
|
|
59923
|
+
*/
|
|
59924
|
+
function assertion(...parameters) {
|
|
59925
|
+
// @ts-expect-error: spreading is fine.
|
|
59926
|
+
return Boolean(check.call(this, ...parameters))
|
|
59927
|
+
}
|
|
59928
|
+
}
|
|
59929
|
+
|
|
59930
|
+
// Utility to return true.
|
|
59931
|
+
function unist_util_is_ok() {
|
|
59932
|
+
return true
|
|
59933
|
+
}
|
|
59934
|
+
|
|
59935
|
+
;// CONCATENATED MODULE: ./node_modules/unist-util-visit/node_modules/unist-util-visit-parents/color.js
|
|
59936
|
+
/**
|
|
59937
|
+
* @param {string} d
|
|
59938
|
+
* @returns {string}
|
|
59939
|
+
*/
|
|
59940
|
+
function color_color(d) {
|
|
59941
|
+
return '\u001B[33m' + d + '\u001B[39m'
|
|
59942
|
+
}
|
|
59943
|
+
|
|
59944
|
+
;// CONCATENATED MODULE: ./node_modules/unist-util-visit/node_modules/unist-util-visit-parents/index.js
|
|
59945
|
+
/**
|
|
59946
|
+
* @typedef {import('unist').Node} Node
|
|
59947
|
+
* @typedef {import('unist').Parent} Parent
|
|
59948
|
+
* @typedef {import('unist-util-is').Test} Test
|
|
59949
|
+
* @typedef {import('./complex-types.js').Action} Action
|
|
59950
|
+
* @typedef {import('./complex-types.js').Index} Index
|
|
59951
|
+
* @typedef {import('./complex-types.js').ActionTuple} ActionTuple
|
|
59952
|
+
* @typedef {import('./complex-types.js').VisitorResult} VisitorResult
|
|
59953
|
+
* @typedef {import('./complex-types.js').Visitor} Visitor
|
|
59954
|
+
*/
|
|
59955
|
+
|
|
59956
|
+
|
|
59957
|
+
|
|
59958
|
+
|
|
59959
|
+
/**
|
|
59960
|
+
* Continue traversing as normal
|
|
59961
|
+
*/
|
|
59962
|
+
const unist_util_visit_parents_CONTINUE = true
|
|
59963
|
+
/**
|
|
59964
|
+
* Do not traverse this node’s children
|
|
59965
|
+
*/
|
|
59966
|
+
const unist_util_visit_parents_SKIP = 'skip'
|
|
59967
|
+
/**
|
|
59968
|
+
* Stop traversing immediately
|
|
59969
|
+
*/
|
|
59970
|
+
const unist_util_visit_parents_EXIT = false
|
|
59971
|
+
|
|
59972
|
+
/**
|
|
59973
|
+
* Visit children of tree which pass test.
|
|
59974
|
+
*
|
|
59975
|
+
* @param tree
|
|
59976
|
+
* Tree to walk
|
|
59977
|
+
* @param [test]
|
|
59978
|
+
* `unist-util-is`-compatible test
|
|
59979
|
+
* @param visitor
|
|
59980
|
+
* Function called for nodes that pass `test`.
|
|
59981
|
+
* @param [reverse=false]
|
|
59982
|
+
* Traverse in reverse preorder (NRL) instead of preorder (NLR) (default).
|
|
59983
|
+
*/
|
|
59984
|
+
const unist_util_visit_parents_visitParents =
|
|
59985
|
+
/**
|
|
59986
|
+
* @type {(
|
|
59987
|
+
* (<Tree extends Node, Check extends Test>(tree: Tree, test: Check, visitor: import('./complex-types.js').BuildVisitor<Tree, Check>, reverse?: boolean) => void) &
|
|
59988
|
+
* (<Tree extends Node>(tree: Tree, visitor: import('./complex-types.js').BuildVisitor<Tree>, reverse?: boolean) => void)
|
|
59989
|
+
* )}
|
|
59990
|
+
*/
|
|
59991
|
+
(
|
|
59992
|
+
/**
|
|
59993
|
+
* @param {Node} tree
|
|
59994
|
+
* @param {Test} test
|
|
59995
|
+
* @param {import('./complex-types.js').Visitor<Node>} visitor
|
|
59996
|
+
* @param {boolean} [reverse=false]
|
|
59997
|
+
*/
|
|
59998
|
+
function (tree, test, visitor, reverse) {
|
|
59999
|
+
if (typeof test === 'function' && typeof visitor !== 'function') {
|
|
60000
|
+
reverse = visitor
|
|
60001
|
+
// @ts-expect-error no visitor given, so `visitor` is test.
|
|
60002
|
+
visitor = test
|
|
60003
|
+
test = null
|
|
60004
|
+
}
|
|
60005
|
+
|
|
60006
|
+
const is = unist_util_is_convert(test)
|
|
60007
|
+
const step = reverse ? -1 : 1
|
|
60008
|
+
|
|
60009
|
+
factory(tree, null, [])()
|
|
60010
|
+
|
|
60011
|
+
/**
|
|
60012
|
+
* @param {Node} node
|
|
60013
|
+
* @param {number?} index
|
|
60014
|
+
* @param {Array<Parent>} parents
|
|
60015
|
+
*/
|
|
60016
|
+
function factory(node, index, parents) {
|
|
60017
|
+
/** @type {Record<string, unknown>} */
|
|
60018
|
+
// @ts-expect-error: hush
|
|
60019
|
+
const value = typeof node === 'object' && node !== null ? node : {}
|
|
60020
|
+
/** @type {string|undefined} */
|
|
60021
|
+
let name
|
|
60022
|
+
|
|
60023
|
+
if (typeof value.type === 'string') {
|
|
60024
|
+
name =
|
|
60025
|
+
typeof value.tagName === 'string'
|
|
60026
|
+
? value.tagName
|
|
60027
|
+
: typeof value.name === 'string'
|
|
60028
|
+
? value.name
|
|
60029
|
+
: undefined
|
|
60030
|
+
|
|
60031
|
+
Object.defineProperty(visit, 'name', {
|
|
60032
|
+
value:
|
|
60033
|
+
'node (' +
|
|
60034
|
+
color_color(value.type + (name ? '<' + name + '>' : '')) +
|
|
60035
|
+
')'
|
|
60036
|
+
})
|
|
60037
|
+
}
|
|
60038
|
+
|
|
60039
|
+
return visit
|
|
60040
|
+
|
|
60041
|
+
function visit() {
|
|
60042
|
+
/** @type {ActionTuple} */
|
|
60043
|
+
let result = []
|
|
60044
|
+
/** @type {ActionTuple} */
|
|
60045
|
+
let subresult
|
|
60046
|
+
/** @type {number} */
|
|
60047
|
+
let offset
|
|
60048
|
+
/** @type {Array<Parent>} */
|
|
60049
|
+
let grandparents
|
|
60050
|
+
|
|
60051
|
+
if (!test || is(node, index, parents[parents.length - 1] || null)) {
|
|
60052
|
+
result = unist_util_visit_parents_toResult(visitor(node, parents))
|
|
60053
|
+
|
|
60054
|
+
if (result[0] === unist_util_visit_parents_EXIT) {
|
|
60055
|
+
return result
|
|
60056
|
+
}
|
|
60057
|
+
}
|
|
60058
|
+
|
|
60059
|
+
// @ts-expect-error looks like a parent.
|
|
60060
|
+
if (node.children && result[0] !== unist_util_visit_parents_SKIP) {
|
|
60061
|
+
// @ts-expect-error looks like a parent.
|
|
60062
|
+
offset = (reverse ? node.children.length : -1) + step
|
|
60063
|
+
// @ts-expect-error looks like a parent.
|
|
60064
|
+
grandparents = parents.concat(node)
|
|
60065
|
+
|
|
60066
|
+
// @ts-expect-error looks like a parent.
|
|
60067
|
+
while (offset > -1 && offset < node.children.length) {
|
|
60068
|
+
// @ts-expect-error looks like a parent.
|
|
60069
|
+
subresult = factory(node.children[offset], offset, grandparents)()
|
|
60070
|
+
|
|
60071
|
+
if (subresult[0] === unist_util_visit_parents_EXIT) {
|
|
60072
|
+
return subresult
|
|
60073
|
+
}
|
|
60074
|
+
|
|
60075
|
+
offset =
|
|
60076
|
+
typeof subresult[1] === 'number' ? subresult[1] : offset + step
|
|
60077
|
+
}
|
|
60078
|
+
}
|
|
60079
|
+
|
|
60080
|
+
return result
|
|
60081
|
+
}
|
|
60082
|
+
}
|
|
60083
|
+
}
|
|
60084
|
+
)
|
|
60085
|
+
|
|
60086
|
+
/**
|
|
60087
|
+
* @param {VisitorResult} value
|
|
60088
|
+
* @returns {ActionTuple}
|
|
60089
|
+
*/
|
|
60090
|
+
function unist_util_visit_parents_toResult(value) {
|
|
60091
|
+
if (Array.isArray(value)) {
|
|
60092
|
+
return value
|
|
60093
|
+
}
|
|
60094
|
+
|
|
60095
|
+
if (typeof value === 'number') {
|
|
60096
|
+
return [unist_util_visit_parents_CONTINUE, value]
|
|
60097
|
+
}
|
|
60098
|
+
|
|
60099
|
+
return [value]
|
|
60100
|
+
}
|
|
60101
|
+
|
|
60102
|
+
;// CONCATENATED MODULE: ./node_modules/unist-util-visit/index.js
|
|
60103
|
+
/**
|
|
60104
|
+
* @typedef {import('unist').Node} Node
|
|
60105
|
+
* @typedef {import('unist').Parent} Parent
|
|
60106
|
+
* @typedef {import('unist-util-is').Test} Test
|
|
60107
|
+
* @typedef {import('unist-util-visit-parents').VisitorResult} VisitorResult
|
|
60108
|
+
* @typedef {import('./complex-types.js').Visitor} Visitor
|
|
60109
|
+
*/
|
|
60110
|
+
|
|
60111
|
+
|
|
60112
|
+
|
|
60113
|
+
/**
|
|
60114
|
+
* Visit children of tree which pass test.
|
|
60115
|
+
*
|
|
60116
|
+
* @param tree
|
|
60117
|
+
* Tree to walk
|
|
60118
|
+
* @param [test]
|
|
60119
|
+
* `unist-util-is`-compatible test
|
|
60120
|
+
* @param visitor
|
|
60121
|
+
* Function called for nodes that pass `test`.
|
|
60122
|
+
* @param reverse
|
|
60123
|
+
* Traverse in reverse preorder (NRL) instead of preorder (NLR) (default).
|
|
60124
|
+
*/
|
|
60125
|
+
const unist_util_visit_visit =
|
|
60126
|
+
/**
|
|
60127
|
+
* @type {(
|
|
60128
|
+
* (<Tree extends Node, Check extends Test>(tree: Tree, test: Check, visitor: import('./complex-types.js').BuildVisitor<Tree, Check>, reverse?: boolean) => void) &
|
|
60129
|
+
* (<Tree extends Node>(tree: Tree, visitor: import('./complex-types.js').BuildVisitor<Tree>, reverse?: boolean) => void)
|
|
60130
|
+
* )}
|
|
60131
|
+
*/
|
|
60132
|
+
(
|
|
60133
|
+
/**
|
|
60134
|
+
* @param {Node} tree
|
|
60135
|
+
* @param {Test} test
|
|
60136
|
+
* @param {import('./complex-types.js').Visitor} visitor
|
|
60137
|
+
* @param {boolean} [reverse]
|
|
60138
|
+
*/
|
|
60139
|
+
function (tree, test, visitor, reverse) {
|
|
60140
|
+
if (typeof test === 'function' && typeof visitor !== 'function') {
|
|
60141
|
+
reverse = visitor
|
|
60142
|
+
visitor = test
|
|
60143
|
+
test = null
|
|
60144
|
+
}
|
|
60145
|
+
|
|
60146
|
+
unist_util_visit_parents_visitParents(tree, test, overload, reverse)
|
|
60147
|
+
|
|
60148
|
+
/**
|
|
60149
|
+
* @param {Node} node
|
|
60150
|
+
* @param {Array<Parent>} parents
|
|
60151
|
+
*/
|
|
60152
|
+
function overload(node, parents) {
|
|
60153
|
+
const parent = parents[parents.length - 1]
|
|
60154
|
+
return visitor(
|
|
60155
|
+
node,
|
|
60156
|
+
parent ? parent.children.indexOf(node) : null,
|
|
60157
|
+
parent
|
|
60158
|
+
)
|
|
60159
|
+
}
|
|
60160
|
+
}
|
|
60161
|
+
)
|
|
60162
|
+
|
|
60163
|
+
|
|
60164
|
+
|
|
60165
|
+
;// CONCATENATED MODULE: ./node_modules/emoji-regex/index.mjs
|
|
60166
|
+
/* harmony default export */ const emoji_regex = (() => {
|
|
60167
|
+
// https://mths.be/emoji
|
|
60168
|
+
return /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC3\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC08\uDC26](?:\u200D\u2B1B)?|[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;
|
|
60169
|
+
});
|
|
60170
|
+
|
|
60171
|
+
;// CONCATENATED MODULE: ./processor/transform/callouts.ts
|
|
60172
|
+
|
|
60173
|
+
|
|
60174
|
+
var callouts_regex = "^(".concat(emoji_regex().source, "|\u26A0)(\\s+|$)");
|
|
60175
|
+
var themes = {
|
|
60176
|
+
'\uD83D\uDCD8': 'info',
|
|
60177
|
+
'\uD83D\uDEA7': 'warn',
|
|
60178
|
+
'\u26A0\uFE0F': 'warn',
|
|
60179
|
+
'\uD83D\uDC4D': 'okay',
|
|
60180
|
+
'\u2705': 'okay',
|
|
60181
|
+
'\u2757\uFE0F': 'error',
|
|
60182
|
+
'\u2757': 'error',
|
|
60183
|
+
'\uD83D\uDED1': 'error',
|
|
60184
|
+
'\u2049\uFE0F': 'error',
|
|
60185
|
+
'\u203C\uFE0F': 'error',
|
|
60186
|
+
'\u2139\uFE0F': 'info',
|
|
60187
|
+
'\u26A0': 'warn',
|
|
60188
|
+
};
|
|
60189
|
+
var callouts_toString = function (node) {
|
|
60190
|
+
if ('value' in node && node.value)
|
|
60191
|
+
return node.value;
|
|
60192
|
+
if ('children' in node && node.children)
|
|
60193
|
+
return node.children.map(function (child) { return callouts_toString(child); }).join('');
|
|
60194
|
+
return '';
|
|
60195
|
+
};
|
|
60196
|
+
var calloutTransformer = function () {
|
|
60197
|
+
return function (tree) {
|
|
60198
|
+
unist_util_visit_visit(tree, 'blockquote', function (node) {
|
|
60199
|
+
try {
|
|
60200
|
+
if (!(node.children[0].type === 'paragraph' && node.children[0].children[0].type === 'text'))
|
|
60201
|
+
return;
|
|
60202
|
+
var startText = node.children[0].children[0].value;
|
|
60203
|
+
var _a = startText.match(callouts_regex) || [], match = _a[0], icon = _a[1];
|
|
60204
|
+
if (icon && match) {
|
|
60205
|
+
var heading = startText.slice(match.length);
|
|
60206
|
+
var body = callouts_toString({ type: 'root', children: node.children.slice(1) });
|
|
60207
|
+
var data = {
|
|
60208
|
+
hName: 'Callout',
|
|
60209
|
+
hProperties: {
|
|
60210
|
+
heading: heading,
|
|
60211
|
+
value: body,
|
|
60212
|
+
icon: icon,
|
|
60213
|
+
theme: themes[icon] || 'default',
|
|
60214
|
+
},
|
|
60215
|
+
};
|
|
60216
|
+
node.type = 'rdme-callout';
|
|
60217
|
+
node.data = data;
|
|
60218
|
+
node.children[0].children[0].value = startText.slice(match.length);
|
|
60219
|
+
}
|
|
60220
|
+
}
|
|
60221
|
+
catch (e) {
|
|
60222
|
+
console.log(e);
|
|
60223
|
+
}
|
|
60224
|
+
});
|
|
60225
|
+
};
|
|
60226
|
+
};
|
|
60227
|
+
/* harmony default export */ const callouts = (calloutTransformer);
|
|
60228
|
+
|
|
59682
60229
|
;// CONCATENATED MODULE: ./index.tsx
|
|
59683
60230
|
var index_assign = (undefined && undefined.__assign) || function () {
|
|
59684
60231
|
index_assign = Object.assign || function(t) {
|
|
@@ -59702,6 +60249,7 @@ var index_assign = (undefined && undefined.__assign) || function () {
|
|
|
59702
60249
|
|
|
59703
60250
|
|
|
59704
60251
|
__webpack_require__(787);
|
|
60252
|
+
|
|
59705
60253
|
var unimplemented = src_default()('mdx:unimplemented');
|
|
59706
60254
|
var index_GlossaryItem = (GlossaryItem_default());
|
|
59707
60255
|
|
|
@@ -59715,19 +60263,28 @@ var utils = {
|
|
|
59715
60263
|
VariablesContext: (dist_default()).VariablesContext,
|
|
59716
60264
|
calloutIcons: {},
|
|
59717
60265
|
};
|
|
60266
|
+
var useMDXComponents = function () { return (index_assign({}, components_namespaceObject)); };
|
|
59718
60267
|
var reactProcessor = function (opts) {
|
|
59719
60268
|
if (opts === void 0) { opts = {}; }
|
|
59720
|
-
return core_createProcessor(opts);
|
|
60269
|
+
return core_createProcessor(index_assign({ remarkPlugins: [callouts] }, opts));
|
|
59721
60270
|
};
|
|
59722
60271
|
var index_react = function (text, opts) {
|
|
59723
60272
|
if (opts === void 0) { opts = {}; }
|
|
59724
|
-
|
|
59725
|
-
|
|
60273
|
+
try {
|
|
60274
|
+
var code = compileSync(text, index_assign({ outputFormat: 'function-body', providerImportSource: '@mdx-js/react', remarkPlugins: [callouts] }, opts));
|
|
60275
|
+
return code;
|
|
60276
|
+
}
|
|
60277
|
+
catch (e) {
|
|
60278
|
+
console.error(e);
|
|
60279
|
+
return '';
|
|
60280
|
+
}
|
|
59726
60281
|
};
|
|
59727
60282
|
var index_run = function (code, opts) {
|
|
59728
60283
|
if (opts === void 0) { opts = {}; }
|
|
59729
|
-
|
|
59730
|
-
|
|
60284
|
+
// @ts-ignore
|
|
60285
|
+
var Fragment = jsx_runtime.Fragment;
|
|
60286
|
+
var file = runSync(code, index_assign(index_assign(index_assign({}, jsx_runtime_namespaceObject), { Fragment: Fragment, baseUrl: '', useMDXComponents: useMDXComponents }), opts));
|
|
60287
|
+
return (file === null || file === void 0 ? void 0 : file.default) || (function () { return null; });
|
|
59731
60288
|
};
|
|
59732
60289
|
var reactTOC = function (text, opts) {
|
|
59733
60290
|
if (opts === void 0) { opts = {}; }
|
|
@@ -59745,12 +60302,10 @@ var mdast = function (text, opts) {
|
|
|
59745
60302
|
if (opts === void 0) { opts = {}; }
|
|
59746
60303
|
var processor = remark().use(remarkMdx);
|
|
59747
60304
|
try {
|
|
59748
|
-
console.log(processor.parse('wtf'));
|
|
59749
60305
|
var tree = processor.parse(text);
|
|
59750
60306
|
return processor.runSync(tree);
|
|
59751
60307
|
}
|
|
59752
60308
|
catch (e) {
|
|
59753
|
-
console.log(e);
|
|
59754
60309
|
return { type: 'root', children: [] };
|
|
59755
60310
|
}
|
|
59756
60311
|
};
|