@readme/markdown 6.75.0-beta.26 → 6.75.0-beta.27

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 CHANGED
@@ -14258,6 +14258,138 @@ module.exports = function extend() {
14258
14258
  };
14259
14259
 
14260
14260
 
14261
+ /***/ }),
14262
+
14263
+ /***/ 6311:
14264
+ /***/ ((module) => {
14265
+
14266
+ //
14267
+ // format - printf-like string formatting for JavaScript
14268
+ // github.com/samsonjs/format
14269
+ // @_sjs
14270
+ //
14271
+ // Copyright 2010 - 2013 Sami Samhuri <sami@samhuri.net>
14272
+ //
14273
+ // MIT License
14274
+ // http://sjs.mit-license.org
14275
+ //
14276
+
14277
+ ;(function() {
14278
+
14279
+ //// Export the API
14280
+ var namespace;
14281
+
14282
+ // CommonJS / Node module
14283
+ if (true) {
14284
+ namespace = module.exports = format;
14285
+ }
14286
+
14287
+ // Browsers and other environments
14288
+ else {}
14289
+
14290
+ namespace.format = format;
14291
+ namespace.vsprintf = vsprintf;
14292
+
14293
+ if (typeof console !== 'undefined' && typeof console.log === 'function') {
14294
+ namespace.printf = printf;
14295
+ }
14296
+
14297
+ function printf(/* ... */) {
14298
+ console.log(format.apply(null, arguments));
14299
+ }
14300
+
14301
+ function vsprintf(fmt, replacements) {
14302
+ return format.apply(null, [fmt].concat(replacements));
14303
+ }
14304
+
14305
+ function format(fmt) {
14306
+ var argIndex = 1 // skip initial format argument
14307
+ , args = [].slice.call(arguments)
14308
+ , i = 0
14309
+ , n = fmt.length
14310
+ , result = ''
14311
+ , c
14312
+ , escaped = false
14313
+ , arg
14314
+ , tmp
14315
+ , leadingZero = false
14316
+ , precision
14317
+ , nextArg = function() { return args[argIndex++]; }
14318
+ , slurpNumber = function() {
14319
+ var digits = '';
14320
+ while (/\d/.test(fmt[i])) {
14321
+ digits += fmt[i++];
14322
+ c = fmt[i];
14323
+ }
14324
+ return digits.length > 0 ? parseInt(digits) : null;
14325
+ }
14326
+ ;
14327
+ for (; i < n; ++i) {
14328
+ c = fmt[i];
14329
+ if (escaped) {
14330
+ escaped = false;
14331
+ if (c == '.') {
14332
+ leadingZero = false;
14333
+ c = fmt[++i];
14334
+ }
14335
+ else if (c == '0' && fmt[i + 1] == '.') {
14336
+ leadingZero = true;
14337
+ i += 2;
14338
+ c = fmt[i];
14339
+ }
14340
+ else {
14341
+ leadingZero = true;
14342
+ }
14343
+ precision = slurpNumber();
14344
+ switch (c) {
14345
+ case 'b': // number in binary
14346
+ result += parseInt(nextArg(), 10).toString(2);
14347
+ break;
14348
+ case 'c': // character
14349
+ arg = nextArg();
14350
+ if (typeof arg === 'string' || arg instanceof String)
14351
+ result += arg;
14352
+ else
14353
+ result += String.fromCharCode(parseInt(arg, 10));
14354
+ break;
14355
+ case 'd': // number in decimal
14356
+ result += parseInt(nextArg(), 10);
14357
+ break;
14358
+ case 'f': // floating point number
14359
+ tmp = String(parseFloat(nextArg()).toFixed(precision || 6));
14360
+ result += leadingZero ? tmp : tmp.replace(/^0/, '');
14361
+ break;
14362
+ case 'j': // JSON
14363
+ result += JSON.stringify(nextArg());
14364
+ break;
14365
+ case 'o': // number in octal
14366
+ result += '0' + parseInt(nextArg(), 10).toString(8);
14367
+ break;
14368
+ case 's': // string
14369
+ result += nextArg();
14370
+ break;
14371
+ case 'x': // lowercase hexadecimal
14372
+ result += '0x' + parseInt(nextArg(), 10).toString(16);
14373
+ break;
14374
+ case 'X': // uppercase hexadecimal
14375
+ result += '0x' + parseInt(nextArg(), 10).toString(16).toUpperCase();
14376
+ break;
14377
+ default:
14378
+ result += c;
14379
+ break;
14380
+ }
14381
+ } else if (c === '%') {
14382
+ escaped = true;
14383
+ } else {
14384
+ result += c;
14385
+ }
14386
+ }
14387
+ return result;
14388
+ }
14389
+
14390
+ }());
14391
+
14392
+
14261
14393
  /***/ }),
14262
14394
 
14263
14395
  /***/ 9788:
@@ -43487,6 +43619,812 @@ function remarkMdx(options) {
43487
43619
  toMarkdownExtensions.push(mdxToMarkdown(settings))
43488
43620
  }
43489
43621
 
43622
+ // EXTERNAL MODULE: ./node_modules/format/format.js
43623
+ var format_format = __webpack_require__(6311);
43624
+ var format_default = /*#__PURE__*/__webpack_require__.n(format_format);
43625
+ ;// CONCATENATED MODULE: ./node_modules/fault/index.js
43626
+ // @ts-expect-error
43627
+
43628
+
43629
+ const fault = Object.assign(create(Error), {
43630
+ eval: create(EvalError),
43631
+ range: create(RangeError),
43632
+ reference: create(ReferenceError),
43633
+ syntax: create(SyntaxError),
43634
+ type: create(TypeError),
43635
+ uri: create(URIError)
43636
+ })
43637
+
43638
+ /**
43639
+ * Create a new `EConstructor`, with the formatted `format` as a first argument.
43640
+ *
43641
+ * @template {Error} Fault
43642
+ * @template {new (reason: string) => Fault} Class
43643
+ * @param {Class} Constructor
43644
+ */
43645
+ function create(Constructor) {
43646
+ /** @type {string} */
43647
+ // @ts-expect-error
43648
+ FormattedError.displayName = Constructor.displayName || Constructor.name
43649
+
43650
+ return FormattedError
43651
+
43652
+ /**
43653
+ * Create an error with a printf-like formatted message.
43654
+ *
43655
+ * @param {string|null} [format]
43656
+ * Template string.
43657
+ * @param {...unknown} values
43658
+ * Values to render in `format`.
43659
+ * @returns {Fault}
43660
+ */
43661
+ function FormattedError(format, ...values) {
43662
+ /** @type {string} */
43663
+ const reason = format ? format_default()(format, ...values) : format
43664
+ return new Constructor(reason)
43665
+ }
43666
+ }
43667
+
43668
+ ;// CONCATENATED MODULE: ./node_modules/micromark-extension-frontmatter/lib/to-matters.js
43669
+ /**
43670
+ * @typedef {'toml' | 'yaml'} Preset
43671
+ * Known name of a frontmatter style.
43672
+ *
43673
+ * @typedef Info
43674
+ * Sequence.
43675
+ *
43676
+ * Depending on how this structure is used, it reflects a marker or a fence.
43677
+ * @property {string} close
43678
+ * Closing.
43679
+ * @property {string} open
43680
+ * Opening.
43681
+ *
43682
+ * @typedef MatterProps
43683
+ * Fields describing a kind of matter.
43684
+ * @property {string} type
43685
+ * Node type to tokenize as.
43686
+ * @property {boolean | null | undefined} [anywhere=false]
43687
+ * Whether matter can be found anywhere in the document, normally, only matter
43688
+ * at the start of the document is recognized.
43689
+ *
43690
+ * > 👉 **Note**: using this is a terrible idea.
43691
+ * > It’s called frontmatter, not matter-in-the-middle or so.
43692
+ * > This makes your markdown less portable.
43693
+ *
43694
+ * @typedef MarkerProps
43695
+ * Marker configuration.
43696
+ * @property {Info | string} marker
43697
+ * Character repeated 3 times, used as complete fences.
43698
+ *
43699
+ * For example the character `'-'` will result in `'---'` being used as the
43700
+ * fence
43701
+ * Pass `open` and `close` to specify different characters for opening and
43702
+ * closing fences.
43703
+ * @property {never} [fence]
43704
+ * If `marker` is set, `fence` must not be set.
43705
+ *
43706
+ * @typedef FenceProps
43707
+ * Fence configuration.
43708
+ * @property {Info | string} fence
43709
+ * Complete fences.
43710
+ *
43711
+ * This can be used when fences contain different characters or lengths
43712
+ * other than 3.
43713
+ * Pass `open` and `close` to interface to specify different characters for opening and
43714
+ * closing fences.
43715
+ * @property {never} [marker]
43716
+ * If `fence` is set, `marker` must not be set.
43717
+ *
43718
+ * @typedef {(MatterProps & FenceProps) | (MatterProps & MarkerProps)} Matter
43719
+ * Fields describing a kind of matter.
43720
+ *
43721
+ * > 👉 **Note**: using `anywhere` is a terrible idea.
43722
+ * > It’s called frontmatter, not matter-in-the-middle or so.
43723
+ * > This makes your markdown less portable.
43724
+ *
43725
+ * > 👉 **Note**: `marker` and `fence` are mutually exclusive.
43726
+ * > If `marker` is set, `fence` must not be set, and vice versa.
43727
+ *
43728
+ * @typedef {Matter | Preset | Array<Matter | Preset>} Options
43729
+ * Configuration.
43730
+ */
43731
+
43732
+
43733
+ const to_matters_own = {}.hasOwnProperty
43734
+ const markers = {
43735
+ yaml: '-',
43736
+ toml: '+'
43737
+ }
43738
+
43739
+ /**
43740
+ * Simplify options by normalizing them to an array of matters.
43741
+ *
43742
+ * @param {Options | null | undefined} [options='yaml']
43743
+ * Configuration (default: `'yaml'`).
43744
+ * @returns {Array<Matter>}
43745
+ * List of matters.
43746
+ */
43747
+ function toMatters(options) {
43748
+ /** @type {Array<Matter>} */
43749
+ const result = []
43750
+ let index = -1
43751
+
43752
+ /** @type {Array<Matter | Preset>} */
43753
+ const presetsOrMatters = Array.isArray(options)
43754
+ ? options
43755
+ : options
43756
+ ? [options]
43757
+ : ['yaml']
43758
+ while (++index < presetsOrMatters.length) {
43759
+ result[index] = matter(presetsOrMatters[index])
43760
+ }
43761
+ return result
43762
+ }
43763
+
43764
+ /**
43765
+ * Simplify an option.
43766
+ *
43767
+ * @param {Matter | Preset} option
43768
+ * Configuration.
43769
+ * @returns {Matter}
43770
+ * Matter.
43771
+ */
43772
+ function matter(option) {
43773
+ let result = option
43774
+ if (typeof result === 'string') {
43775
+ if (!to_matters_own.call(markers, result)) {
43776
+ throw fault('Missing matter definition for `%s`', result)
43777
+ }
43778
+ result = {
43779
+ type: result,
43780
+ marker: markers[result]
43781
+ }
43782
+ } else if (typeof result !== 'object') {
43783
+ throw fault('Expected matter to be an object, not `%j`', result)
43784
+ }
43785
+ if (!to_matters_own.call(result, 'type')) {
43786
+ throw fault('Missing `type` in matter `%j`', result)
43787
+ }
43788
+ if (!to_matters_own.call(result, 'fence') && !to_matters_own.call(result, 'marker')) {
43789
+ throw fault('Missing `marker` or `fence` in matter `%j`', result)
43790
+ }
43791
+ return result
43792
+ }
43793
+
43794
+ ;// CONCATENATED MODULE: ./node_modules/mdast-util-frontmatter/node_modules/escape-string-regexp/index.js
43795
+ function escapeStringRegexp(string) {
43796
+ if (typeof string !== 'string') {
43797
+ throw new TypeError('Expected a string');
43798
+ }
43799
+
43800
+ // Escape characters with special meaning either inside or outside character sets.
43801
+ // Use a simple backslash escape when it’s always valid, and a `\xnn` escape when the simpler form would be disallowed by Unicode patterns’ stricter grammar.
43802
+ return string
43803
+ .replace(/[|\\{}()[\]^$+*?.]/g, '\\$&')
43804
+ .replace(/-/g, '\\x2d');
43805
+ }
43806
+
43807
+ ;// CONCATENATED MODULE: ./node_modules/mdast-util-frontmatter/lib/index.js
43808
+ /**
43809
+ * @typedef {import('mdast').Literal} Literal
43810
+ *
43811
+ * @typedef {import('mdast-util-from-markdown').CompileContext} CompileContext
43812
+ * @typedef {import('mdast-util-from-markdown').Extension} FromMarkdownExtension
43813
+ * @typedef {import('mdast-util-from-markdown').Handle} FromMarkdownHandle
43814
+ * @typedef {import('mdast-util-to-markdown').Options} ToMarkdownExtension
43815
+ *
43816
+ * @typedef {import('micromark-extension-frontmatter').Info} Info
43817
+ * @typedef {import('micromark-extension-frontmatter').Matter} Matter
43818
+ * @typedef {import('micromark-extension-frontmatter').Options} Options
43819
+ */
43820
+
43821
+
43822
+
43823
+
43824
+
43825
+ /**
43826
+ * Create an extension for `mdast-util-from-markdown`.
43827
+ *
43828
+ * @param {Options | null | undefined} [options]
43829
+ * Configuration (optional).
43830
+ * @returns {FromMarkdownExtension}
43831
+ * Extension for `mdast-util-from-markdown`.
43832
+ */
43833
+ function frontmatterFromMarkdown(options) {
43834
+ const matters = toMatters(options)
43835
+ /** @type {FromMarkdownExtension['enter']} */
43836
+ const enter = {}
43837
+ /** @type {FromMarkdownExtension['exit']} */
43838
+ const exit = {}
43839
+ let index = -1
43840
+
43841
+ while (++index < matters.length) {
43842
+ const matter = matters[index]
43843
+ enter[matter.type] = lib_opener(matter)
43844
+ exit[matter.type] = lib_close
43845
+ exit[matter.type + 'Value'] = value
43846
+ }
43847
+
43848
+ return {enter, exit}
43849
+ }
43850
+
43851
+ /**
43852
+ * @param {Matter} matter
43853
+ * @returns {FromMarkdownHandle} enter
43854
+ */
43855
+ function lib_opener(matter) {
43856
+ return open
43857
+
43858
+ /**
43859
+ * @this {CompileContext}
43860
+ * @type {FromMarkdownHandle}
43861
+ */
43862
+ function open(token) {
43863
+ // @ts-expect-error: custom.
43864
+ this.enter({type: matter.type, value: ''}, token)
43865
+ this.buffer()
43866
+ }
43867
+ }
43868
+
43869
+ /**
43870
+ * @this {CompileContext}
43871
+ * @type {FromMarkdownHandle}
43872
+ */
43873
+ function lib_close(token) {
43874
+ const data = this.resume()
43875
+ const node = this.stack[this.stack.length - 1]
43876
+ default_ok('value' in node)
43877
+ this.exit(token)
43878
+ // Remove the initial and final eol.
43879
+ node.value = data.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g, '')
43880
+ }
43881
+
43882
+ /**
43883
+ * @this {CompileContext}
43884
+ * @type {FromMarkdownHandle}
43885
+ */
43886
+ function value(token) {
43887
+ this.config.enter.data.call(this, token)
43888
+ this.config.exit.data.call(this, token)
43889
+ }
43890
+
43891
+ /**
43892
+ * Create an extension for `mdast-util-to-markdown`.
43893
+ *
43894
+ * @param {Options | null | undefined} [options]
43895
+ * Configuration (optional).
43896
+ * @returns {ToMarkdownExtension}
43897
+ * Extension for `mdast-util-to-markdown`.
43898
+ */
43899
+ function frontmatterToMarkdown(options) {
43900
+ /** @type {ToMarkdownExtension['unsafe']} */
43901
+ const unsafe = []
43902
+ /** @type {ToMarkdownExtension['handlers']} */
43903
+ const handlers = {}
43904
+ const matters = toMatters(options)
43905
+ let index = -1
43906
+
43907
+ while (++index < matters.length) {
43908
+ const matter = matters[index]
43909
+
43910
+ // @ts-expect-error: this can add custom frontmatter nodes.
43911
+ // Typing those is the responsibility of the end user.
43912
+ handlers[matter.type] = handler(matter)
43913
+
43914
+ const open = fence(matter, 'open')
43915
+
43916
+ unsafe.push({
43917
+ atBreak: true,
43918
+ character: open.charAt(0),
43919
+ after: escapeStringRegexp(open.charAt(1))
43920
+ })
43921
+ }
43922
+
43923
+ return {unsafe, handlers}
43924
+ }
43925
+
43926
+ /**
43927
+ * Create a handle that can serialize a frontmatter node as markdown.
43928
+ *
43929
+ * @param {Matter} matter
43930
+ * Structure.
43931
+ * @returns {(node: Literal) => string} enter
43932
+ * Handler.
43933
+ */
43934
+ function handler(matter) {
43935
+ const open = fence(matter, 'open')
43936
+ const close = fence(matter, 'close')
43937
+
43938
+ return handle
43939
+
43940
+ /**
43941
+ * Serialize a frontmatter node as markdown.
43942
+ *
43943
+ * @param {Literal} node
43944
+ * Node to serialize.
43945
+ * @returns {string}
43946
+ * Serialized node.
43947
+ */
43948
+ function handle(node) {
43949
+ return open + (node.value ? '\n' + node.value : '') + '\n' + close
43950
+ }
43951
+ }
43952
+
43953
+ /**
43954
+ * Get an `open` or `close` fence.
43955
+ *
43956
+ * @param {Matter} matter
43957
+ * Structure.
43958
+ * @param {'close' | 'open'} prop
43959
+ * Field to get.
43960
+ * @returns {string}
43961
+ * Fence.
43962
+ */
43963
+ function fence(matter, prop) {
43964
+ return matter.marker
43965
+ ? pick(matter.marker, prop).repeat(3)
43966
+ : // @ts-expect-error: They’re mutually exclusive.
43967
+ pick(matter.fence, prop)
43968
+ }
43969
+
43970
+ /**
43971
+ * Take `open` or `close` fields when schema is an info object, or use the
43972
+ * given value when it is a string.
43973
+ *
43974
+ * @param {Info | string} schema
43975
+ * Info object or value.
43976
+ * @param {'close' | 'open'} prop
43977
+ * Field to get.
43978
+ * @returns {string}
43979
+ * Thing to use for the opening or closing.
43980
+ */
43981
+ function pick(schema, prop) {
43982
+ return typeof schema === 'string' ? schema : schema[prop]
43983
+ }
43984
+
43985
+ ;// CONCATENATED MODULE: ./node_modules/micromark-extension-frontmatter/lib/syntax.js
43986
+ /**
43987
+ * @typedef {import('micromark-util-types').Construct} Construct
43988
+ * @typedef {import('micromark-util-types').ConstructRecord} ConstructRecord
43989
+ * @typedef {import('micromark-util-types').Extension} Extension
43990
+ * @typedef {import('micromark-util-types').State} State
43991
+ * @typedef {import('micromark-util-types').TokenType} TokenType
43992
+ * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext
43993
+ * @typedef {import('micromark-util-types').Tokenizer} Tokenizer
43994
+ *
43995
+ * @typedef {import('./to-matters.js').Info} Info
43996
+ * @typedef {import('./to-matters.js').Matter} Matter
43997
+ * @typedef {import('./to-matters.js').Options} Options
43998
+ */
43999
+
44000
+
44001
+
44002
+
44003
+ /**
44004
+ * Create an extension for `micromark` to enable frontmatter syntax.
44005
+ *
44006
+ * @param {Options | null | undefined} [options='yaml']
44007
+ * Configuration (default: `'yaml'`).
44008
+ * @returns {Extension}
44009
+ * Extension for `micromark` that can be passed in `extensions`, to
44010
+ * enable frontmatter syntax.
44011
+ */
44012
+ function frontmatter(options) {
44013
+ const matters = toMatters(options)
44014
+ /** @type {ConstructRecord} */
44015
+ const flow = {}
44016
+ let index = -1
44017
+ while (++index < matters.length) {
44018
+ const matter = matters[index]
44019
+ const code = syntax_fence(matter, 'open').charCodeAt(0)
44020
+ const construct = createConstruct(matter)
44021
+ const existing = flow[code]
44022
+ if (Array.isArray(existing)) {
44023
+ existing.push(construct)
44024
+ } else {
44025
+ // Never a single object, always an array.
44026
+ flow[code] = [construct]
44027
+ }
44028
+ }
44029
+ return {
44030
+ flow
44031
+ }
44032
+ }
44033
+
44034
+ /**
44035
+ * @param {Matter} matter
44036
+ * @returns {Construct}
44037
+ */
44038
+ function createConstruct(matter) {
44039
+ const anywhere = matter.anywhere
44040
+ const frontmatterType = /** @type {TokenType} */ matter.type
44041
+ const fenceType = /** @type {TokenType} */ frontmatterType + 'Fence'
44042
+ const sequenceType = /** @type {TokenType} */ fenceType + 'Sequence'
44043
+ const valueType = /** @type {TokenType} */ frontmatterType + 'Value'
44044
+ const closingFenceConstruct = {
44045
+ tokenize: tokenizeClosingFence,
44046
+ partial: true
44047
+ }
44048
+
44049
+ /**
44050
+ * Fence to look for.
44051
+ *
44052
+ * @type {string}
44053
+ */
44054
+ let buffer
44055
+ let bufferIndex = 0
44056
+ return {
44057
+ tokenize: tokenizeFrontmatter,
44058
+ concrete: true
44059
+ }
44060
+
44061
+ /**
44062
+ * @this {TokenizeContext}
44063
+ * @type {Tokenizer}
44064
+ */
44065
+ function tokenizeFrontmatter(effects, ok, nok) {
44066
+ const self = this
44067
+ return start
44068
+
44069
+ /**
44070
+ * Start of frontmatter.
44071
+ *
44072
+ * ```markdown
44073
+ * > | ---
44074
+ * ^
44075
+ * | title: "Venus"
44076
+ * | ---
44077
+ * ```
44078
+ *
44079
+ * @type {State}
44080
+ */
44081
+ function start(code) {
44082
+ const position = self.now()
44083
+ if (
44084
+ // Indent not allowed.
44085
+ position.column === 1 &&
44086
+ // Normally, only allowed in first line.
44087
+ (position.line === 1 || anywhere)
44088
+ ) {
44089
+ buffer = syntax_fence(matter, 'open')
44090
+ bufferIndex = 0
44091
+ if (code === buffer.charCodeAt(bufferIndex)) {
44092
+ effects.enter(frontmatterType)
44093
+ effects.enter(fenceType)
44094
+ effects.enter(sequenceType)
44095
+ return openSequence(code)
44096
+ }
44097
+ }
44098
+ return nok(code)
44099
+ }
44100
+
44101
+ /**
44102
+ * In open sequence.
44103
+ *
44104
+ * ```markdown
44105
+ * > | ---
44106
+ * ^
44107
+ * | title: "Venus"
44108
+ * | ---
44109
+ * ```
44110
+ *
44111
+ * @type {State}
44112
+ */
44113
+ function openSequence(code) {
44114
+ if (bufferIndex === buffer.length) {
44115
+ effects.exit(sequenceType)
44116
+ if (markdownSpace(code)) {
44117
+ effects.enter('whitespace')
44118
+ return openSequenceWhitespace(code)
44119
+ }
44120
+ return openAfter(code)
44121
+ }
44122
+ if (code === buffer.charCodeAt(bufferIndex++)) {
44123
+ effects.consume(code)
44124
+ return openSequence
44125
+ }
44126
+ return nok(code)
44127
+ }
44128
+
44129
+ /**
44130
+ * In whitespace after open sequence.
44131
+ *
44132
+ * ```markdown
44133
+ * > | ---␠
44134
+ * ^
44135
+ * | title: "Venus"
44136
+ * | ---
44137
+ * ```
44138
+ *
44139
+ * @type {State}
44140
+ */
44141
+ function openSequenceWhitespace(code) {
44142
+ if (markdownSpace(code)) {
44143
+ effects.consume(code)
44144
+ return openSequenceWhitespace
44145
+ }
44146
+ effects.exit('whitespace')
44147
+ return openAfter(code)
44148
+ }
44149
+
44150
+ /**
44151
+ * After open sequence.
44152
+ *
44153
+ * ```markdown
44154
+ * > | ---
44155
+ * ^
44156
+ * | title: "Venus"
44157
+ * | ---
44158
+ * ```
44159
+ *
44160
+ * @type {State}
44161
+ */
44162
+ function openAfter(code) {
44163
+ if (markdownLineEnding(code)) {
44164
+ effects.exit(fenceType)
44165
+ effects.enter('lineEnding')
44166
+ effects.consume(code)
44167
+ effects.exit('lineEnding')
44168
+ // Get ready for closing fence.
44169
+ buffer = syntax_fence(matter, 'close')
44170
+ bufferIndex = 0
44171
+ return effects.attempt(closingFenceConstruct, after, contentStart)
44172
+ }
44173
+
44174
+ // EOF is not okay.
44175
+ return nok(code)
44176
+ }
44177
+
44178
+ /**
44179
+ * Start of content chunk.
44180
+ *
44181
+ * ```markdown
44182
+ * | ---
44183
+ * > | title: "Venus"
44184
+ * ^
44185
+ * | ---
44186
+ * ```
44187
+ *
44188
+ * @type {State}
44189
+ */
44190
+ function contentStart(code) {
44191
+ if (code === null || markdownLineEnding(code)) {
44192
+ return contentEnd(code)
44193
+ }
44194
+ effects.enter(valueType)
44195
+ return contentInside(code)
44196
+ }
44197
+
44198
+ /**
44199
+ * In content chunk.
44200
+ *
44201
+ * ```markdown
44202
+ * | ---
44203
+ * > | title: "Venus"
44204
+ * ^
44205
+ * | ---
44206
+ * ```
44207
+ *
44208
+ * @type {State}
44209
+ */
44210
+ function contentInside(code) {
44211
+ if (code === null || markdownLineEnding(code)) {
44212
+ effects.exit(valueType)
44213
+ return contentEnd(code)
44214
+ }
44215
+ effects.consume(code)
44216
+ return contentInside
44217
+ }
44218
+
44219
+ /**
44220
+ * End of content chunk.
44221
+ *
44222
+ * ```markdown
44223
+ * | ---
44224
+ * > | title: "Venus"
44225
+ * ^
44226
+ * | ---
44227
+ * ```
44228
+ *
44229
+ * @type {State}
44230
+ */
44231
+ function contentEnd(code) {
44232
+ // Require a closing fence.
44233
+ if (code === null) {
44234
+ return nok(code)
44235
+ }
44236
+
44237
+ // Can only be an eol.
44238
+ effects.enter('lineEnding')
44239
+ effects.consume(code)
44240
+ effects.exit('lineEnding')
44241
+ return effects.attempt(closingFenceConstruct, after, contentStart)
44242
+ }
44243
+
44244
+ /**
44245
+ * After frontmatter.
44246
+ *
44247
+ * ```markdown
44248
+ * | ---
44249
+ * | title: "Venus"
44250
+ * > | ---
44251
+ * ^
44252
+ * ```
44253
+ *
44254
+ * @type {State}
44255
+ */
44256
+ function after(code) {
44257
+ // `code` must be eol/eof.
44258
+ effects.exit(frontmatterType)
44259
+ return ok(code)
44260
+ }
44261
+ }
44262
+
44263
+ /** @type {Tokenizer} */
44264
+ function tokenizeClosingFence(effects, ok, nok) {
44265
+ let bufferIndex = 0
44266
+ return closeStart
44267
+
44268
+ /**
44269
+ * Start of close sequence.
44270
+ *
44271
+ * ```markdown
44272
+ * | ---
44273
+ * | title: "Venus"
44274
+ * > | ---
44275
+ * ^
44276
+ * ```
44277
+ *
44278
+ * @type {State}
44279
+ */
44280
+ function closeStart(code) {
44281
+ if (code === buffer.charCodeAt(bufferIndex)) {
44282
+ effects.enter(fenceType)
44283
+ effects.enter(sequenceType)
44284
+ return closeSequence(code)
44285
+ }
44286
+ return nok(code)
44287
+ }
44288
+
44289
+ /**
44290
+ * In close sequence.
44291
+ *
44292
+ * ```markdown
44293
+ * | ---
44294
+ * | title: "Venus"
44295
+ * > | ---
44296
+ * ^
44297
+ * ```
44298
+ *
44299
+ * @type {State}
44300
+ */
44301
+ function closeSequence(code) {
44302
+ if (bufferIndex === buffer.length) {
44303
+ effects.exit(sequenceType)
44304
+ if (markdownSpace(code)) {
44305
+ effects.enter('whitespace')
44306
+ return closeSequenceWhitespace(code)
44307
+ }
44308
+ return closeAfter(code)
44309
+ }
44310
+ if (code === buffer.charCodeAt(bufferIndex++)) {
44311
+ effects.consume(code)
44312
+ return closeSequence
44313
+ }
44314
+ return nok(code)
44315
+ }
44316
+
44317
+ /**
44318
+ * In whitespace after close sequence.
44319
+ *
44320
+ * ```markdown
44321
+ * > | ---
44322
+ * | title: "Venus"
44323
+ * | ---␠
44324
+ * ^
44325
+ * ```
44326
+ *
44327
+ * @type {State}
44328
+ */
44329
+ function closeSequenceWhitespace(code) {
44330
+ if (markdownSpace(code)) {
44331
+ effects.consume(code)
44332
+ return closeSequenceWhitespace
44333
+ }
44334
+ effects.exit('whitespace')
44335
+ return closeAfter(code)
44336
+ }
44337
+
44338
+ /**
44339
+ * After close sequence.
44340
+ *
44341
+ * ```markdown
44342
+ * | ---
44343
+ * | title: "Venus"
44344
+ * > | ---
44345
+ * ^
44346
+ * ```
44347
+ *
44348
+ * @type {State}
44349
+ */
44350
+ function closeAfter(code) {
44351
+ if (code === null || markdownLineEnding(code)) {
44352
+ effects.exit(fenceType)
44353
+ return ok(code)
44354
+ }
44355
+ return nok(code)
44356
+ }
44357
+ }
44358
+ }
44359
+
44360
+ /**
44361
+ * @param {Matter} matter
44362
+ * @param {'close' | 'open'} prop
44363
+ * @returns {string}
44364
+ */
44365
+ function syntax_fence(matter, prop) {
44366
+ return matter.marker
44367
+ ? syntax_pick(matter.marker, prop).repeat(3)
44368
+ : // @ts-expect-error: They’re mutually exclusive.
44369
+ syntax_pick(matter.fence, prop)
44370
+ }
44371
+
44372
+ /**
44373
+ * @param {Info | string} schema
44374
+ * @param {'close' | 'open'} prop
44375
+ * @returns {string}
44376
+ */
44377
+ function syntax_pick(schema, prop) {
44378
+ return typeof schema === 'string' ? schema : schema[prop]
44379
+ }
44380
+
44381
+ ;// CONCATENATED MODULE: ./node_modules/remark-frontmatter/lib/index.js
44382
+ /// <reference types="remark-parse" />
44383
+ /// <reference types="remark-stringify" />
44384
+
44385
+ /**
44386
+ * @typedef {import('mdast').Root} Root
44387
+ * @typedef {import('micromark-extension-frontmatter').Options} Options
44388
+ * @typedef {import('unified').Processor<Root>} Processor
44389
+ */
44390
+
44391
+
44392
+
44393
+
44394
+ /** @type {Options} */
44395
+ const remark_frontmatter_lib_emptyOptions = 'yaml'
44396
+
44397
+ /**
44398
+ * Add support for frontmatter.
44399
+ *
44400
+ * ###### Notes
44401
+ *
44402
+ * Doesn’t parse the data inside them: create your own plugin to do that.
44403
+ *
44404
+ * @param {Options | null | undefined} [options='yaml']
44405
+ * Configuration (default: `'yaml'`).
44406
+ * @returns {undefined}
44407
+ * Nothing.
44408
+ */
44409
+ function remarkFrontmatter(options) {
44410
+ // @ts-expect-error: TS is wrong about `this`.
44411
+ // eslint-disable-next-line unicorn/no-this-assignment
44412
+ const self = /** @type {Processor} */ (this)
44413
+ const settings = options || remark_frontmatter_lib_emptyOptions
44414
+ const data = self.data()
44415
+
44416
+ const micromarkExtensions =
44417
+ data.micromarkExtensions || (data.micromarkExtensions = [])
44418
+ const fromMarkdownExtensions =
44419
+ data.fromMarkdownExtensions || (data.fromMarkdownExtensions = [])
44420
+ const toMarkdownExtensions =
44421
+ data.toMarkdownExtensions || (data.toMarkdownExtensions = [])
44422
+
44423
+ micromarkExtensions.push(frontmatter(settings))
44424
+ fromMarkdownExtensions.push(frontmatterFromMarkdown(settings))
44425
+ toMarkdownExtensions.push(frontmatterToMarkdown(settings))
44426
+ }
44427
+
43490
44428
  ;// CONCATENATED MODULE: ./node_modules/@ungap/structured-clone/esm/types.js
43491
44429
  const VOID = -1;
43492
44430
  const PRIMITIVE = 0;
@@ -49231,7 +50169,7 @@ function extract_identifiers(param, nodes = []) {
49231
50169
  * @returns {undefined}
49232
50170
  * Nothing.
49233
50171
  */
49234
- function create(from, to) {
50172
+ function estree_util_create_create(from, to) {
49235
50173
  /** @type {Array<keyof Node>} */
49236
50174
  // @ts-expect-error: `start`, `end`, `comments` are custom Acorn fields.
49237
50175
  const fields = ['start', 'end', 'loc', 'range', 'comments']
@@ -49356,7 +50294,7 @@ function specifiersToDeclarations(specifiers, init) {
49356
50294
  id: importNamespaceSpecifier.local,
49357
50295
  init
49358
50296
  }
49359
- create(importNamespaceSpecifier, declarator)
50297
+ estree_util_create_create(importNamespaceSpecifier, declarator)
49360
50298
  declarations.push(declarator)
49361
50299
  }
49362
50300
 
@@ -49390,7 +50328,7 @@ function specifiersToDeclarations(specifiers, init) {
49390
50328
  key,
49391
50329
  value
49392
50330
  }
49393
- create(specifier, property)
50331
+ estree_util_create_create(specifier, property)
49394
50332
  return property
49395
50333
  })
49396
50334
  },
@@ -49675,13 +50613,13 @@ function recmaDocument(options) {
49675
50613
  imported: specifier.local,
49676
50614
  local: {type: 'Identifier', name: 'MDXLayout'}
49677
50615
  }
49678
- create(specifier.local, importSpecifier)
50616
+ estree_util_create_create(specifier.local, importSpecifier)
49679
50617
  specifiers.push(importSpecifier)
49680
50618
  }
49681
50619
 
49682
50620
  /** @type {Literal} */
49683
50621
  const from = {type: 'Literal', value: source.value}
49684
- create(source, from)
50622
+ estree_util_create_create(source, from)
49685
50623
 
49686
50624
  /** @type {ImportDeclaration} */
49687
50625
  const declaration = {
@@ -49689,7 +50627,7 @@ function recmaDocument(options) {
49689
50627
  specifiers,
49690
50628
  source: from
49691
50629
  }
49692
- create(specifier, declaration)
50630
+ estree_util_create_create(specifier, declaration)
49693
50631
  handleEsm(declaration)
49694
50632
 
49695
50633
  return false
@@ -49837,7 +50775,7 @@ function recmaDocument(options) {
49837
50775
 
49838
50776
  /** @type {SimpleLiteral} */
49839
50777
  const replacement = {type: 'Literal', value}
49840
- create(node.source, replacement)
50778
+ estree_util_create_create(node.source, replacement)
49841
50779
  node.source = replacement
49842
50780
  return
49843
50781
  }
@@ -49869,7 +50807,7 @@ function recmaDocument(options) {
49869
50807
  usesImportMetaUrlVariable = true
49870
50808
  /** @type {Identifier} */
49871
50809
  const replacement = {type: 'Identifier', name: '_importMetaUrl'}
49872
- create(node, replacement)
50810
+ estree_util_create_create(node, replacement)
49873
50811
  this.replace(replacement)
49874
50812
  }
49875
50813
  }
@@ -49964,7 +50902,7 @@ function recmaDocument(options) {
49964
50902
  // ```
49965
50903
  /** @type {ImportExpression} */
49966
50904
  const argument = {type: 'ImportExpression', source: node.source}
49967
- create(node, argument)
50905
+ estree_util_create_create(node, argument)
49968
50906
  init = {type: 'AwaitExpression', argument}
49969
50907
 
49970
50908
  if (
@@ -59102,6 +60040,7 @@ var __spreadArray = (undefined && undefined.__spreadArray) || function (to, from
59102
60040
 
59103
60041
 
59104
60042
 
60043
+
59105
60044
  __webpack_require__(7973);
59106
60045
 
59107
60046
 
@@ -59118,16 +60057,16 @@ var utils = {
59118
60057
  calloutIcons: {},
59119
60058
  };
59120
60059
  var makeUseMDXComponents = function (more) {
59121
- var components = index_assign(index_assign({}, components_namespaceObject), more);
60060
+ var components = index_assign(index_assign(index_assign({}, more), components_namespaceObject), { Variable: (variable_default()) });
59122
60061
  return function () { return components; };
59123
60062
  };
59124
60063
  var reactProcessor = function (opts) {
59125
60064
  if (opts === void 0) { opts = {}; }
59126
- return core_createProcessor(index_assign({ remarkPlugins: [callouts] }, opts));
60065
+ return core_createProcessor(index_assign({ remarkPlugins: [remarkFrontmatter, callouts] }, opts));
59127
60066
  };
59128
60067
  var index_compile = function (text, opts) {
59129
60068
  if (opts === void 0) { opts = {}; }
59130
- return String(compileSync(text, index_assign({ outputFormat: 'function-body', providerImportSource: '#', remarkPlugins: [callouts] }, opts))).replace(/await import\(_resolveDynamicMdxSpecifier\('react'\)\)/, 'arguments[0].imports.React');
60069
+ return String(compileSync(text, index_assign({ outputFormat: 'function-body', providerImportSource: '#', remarkPlugins: [remarkFrontmatter, callouts] }, opts))).replace(/await import\(_resolveDynamicMdxSpecifier\('react'\)\)/, 'arguments[0].imports.React');
59131
60070
  };
59132
60071
  var index_run = function (code_1) {
59133
60072
  var args_1 = [];
@@ -59164,7 +60103,7 @@ var index_html = function (text, opts) {
59164
60103
  };
59165
60104
  var mdast = function (text, opts) {
59166
60105
  if (opts === void 0) { opts = {}; }
59167
- var processor = remark().use(remarkMdx);
60106
+ var processor = remark().use(remarkMdx).use(remarkFrontmatter);
59168
60107
  try {
59169
60108
  var tree = processor.parse(text);
59170
60109
  return processor.runSync(tree);