@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.node.js CHANGED
@@ -13493,6 +13493,138 @@ module.exports = function extend() {
13493
13493
  };
13494
13494
 
13495
13495
 
13496
+ /***/ }),
13497
+
13498
+ /***/ 311:
13499
+ /***/ ((module) => {
13500
+
13501
+ //
13502
+ // format - printf-like string formatting for JavaScript
13503
+ // github.com/samsonjs/format
13504
+ // @_sjs
13505
+ //
13506
+ // Copyright 2010 - 2013 Sami Samhuri <sami@samhuri.net>
13507
+ //
13508
+ // MIT License
13509
+ // http://sjs.mit-license.org
13510
+ //
13511
+
13512
+ ;(function() {
13513
+
13514
+ //// Export the API
13515
+ var namespace;
13516
+
13517
+ // CommonJS / Node module
13518
+ if (true) {
13519
+ namespace = module.exports = format;
13520
+ }
13521
+
13522
+ // Browsers and other environments
13523
+ else {}
13524
+
13525
+ namespace.format = format;
13526
+ namespace.vsprintf = vsprintf;
13527
+
13528
+ if (typeof console !== 'undefined' && typeof console.log === 'function') {
13529
+ namespace.printf = printf;
13530
+ }
13531
+
13532
+ function printf(/* ... */) {
13533
+ console.log(format.apply(null, arguments));
13534
+ }
13535
+
13536
+ function vsprintf(fmt, replacements) {
13537
+ return format.apply(null, [fmt].concat(replacements));
13538
+ }
13539
+
13540
+ function format(fmt) {
13541
+ var argIndex = 1 // skip initial format argument
13542
+ , args = [].slice.call(arguments)
13543
+ , i = 0
13544
+ , n = fmt.length
13545
+ , result = ''
13546
+ , c
13547
+ , escaped = false
13548
+ , arg
13549
+ , tmp
13550
+ , leadingZero = false
13551
+ , precision
13552
+ , nextArg = function() { return args[argIndex++]; }
13553
+ , slurpNumber = function() {
13554
+ var digits = '';
13555
+ while (/\d/.test(fmt[i])) {
13556
+ digits += fmt[i++];
13557
+ c = fmt[i];
13558
+ }
13559
+ return digits.length > 0 ? parseInt(digits) : null;
13560
+ }
13561
+ ;
13562
+ for (; i < n; ++i) {
13563
+ c = fmt[i];
13564
+ if (escaped) {
13565
+ escaped = false;
13566
+ if (c == '.') {
13567
+ leadingZero = false;
13568
+ c = fmt[++i];
13569
+ }
13570
+ else if (c == '0' && fmt[i + 1] == '.') {
13571
+ leadingZero = true;
13572
+ i += 2;
13573
+ c = fmt[i];
13574
+ }
13575
+ else {
13576
+ leadingZero = true;
13577
+ }
13578
+ precision = slurpNumber();
13579
+ switch (c) {
13580
+ case 'b': // number in binary
13581
+ result += parseInt(nextArg(), 10).toString(2);
13582
+ break;
13583
+ case 'c': // character
13584
+ arg = nextArg();
13585
+ if (typeof arg === 'string' || arg instanceof String)
13586
+ result += arg;
13587
+ else
13588
+ result += String.fromCharCode(parseInt(arg, 10));
13589
+ break;
13590
+ case 'd': // number in decimal
13591
+ result += parseInt(nextArg(), 10);
13592
+ break;
13593
+ case 'f': // floating point number
13594
+ tmp = String(parseFloat(nextArg()).toFixed(precision || 6));
13595
+ result += leadingZero ? tmp : tmp.replace(/^0/, '');
13596
+ break;
13597
+ case 'j': // JSON
13598
+ result += JSON.stringify(nextArg());
13599
+ break;
13600
+ case 'o': // number in octal
13601
+ result += '0' + parseInt(nextArg(), 10).toString(8);
13602
+ break;
13603
+ case 's': // string
13604
+ result += nextArg();
13605
+ break;
13606
+ case 'x': // lowercase hexadecimal
13607
+ result += '0x' + parseInt(nextArg(), 10).toString(16);
13608
+ break;
13609
+ case 'X': // uppercase hexadecimal
13610
+ result += '0x' + parseInt(nextArg(), 10).toString(16).toUpperCase();
13611
+ break;
13612
+ default:
13613
+ result += c;
13614
+ break;
13615
+ }
13616
+ } else if (c === '%') {
13617
+ escaped = true;
13618
+ } else {
13619
+ result += c;
13620
+ }
13621
+ }
13622
+ return result;
13623
+ }
13624
+
13625
+ }());
13626
+
13627
+
13496
13628
  /***/ }),
13497
13629
 
13498
13630
  /***/ 884:
@@ -44934,6 +45066,812 @@ function remarkMdx(options) {
44934
45066
  toMarkdownExtensions.push(mdxToMarkdown(settings))
44935
45067
  }
44936
45068
 
45069
+ // EXTERNAL MODULE: ./node_modules/format/format.js
45070
+ var format_format = __webpack_require__(311);
45071
+ var format_default = /*#__PURE__*/__webpack_require__.n(format_format);
45072
+ ;// CONCATENATED MODULE: ./node_modules/fault/index.js
45073
+ // @ts-expect-error
45074
+
45075
+
45076
+ const fault = Object.assign(create(Error), {
45077
+ eval: create(EvalError),
45078
+ range: create(RangeError),
45079
+ reference: create(ReferenceError),
45080
+ syntax: create(SyntaxError),
45081
+ type: create(TypeError),
45082
+ uri: create(URIError)
45083
+ })
45084
+
45085
+ /**
45086
+ * Create a new `EConstructor`, with the formatted `format` as a first argument.
45087
+ *
45088
+ * @template {Error} Fault
45089
+ * @template {new (reason: string) => Fault} Class
45090
+ * @param {Class} Constructor
45091
+ */
45092
+ function create(Constructor) {
45093
+ /** @type {string} */
45094
+ // @ts-expect-error
45095
+ FormattedError.displayName = Constructor.displayName || Constructor.name
45096
+
45097
+ return FormattedError
45098
+
45099
+ /**
45100
+ * Create an error with a printf-like formatted message.
45101
+ *
45102
+ * @param {string|null} [format]
45103
+ * Template string.
45104
+ * @param {...unknown} values
45105
+ * Values to render in `format`.
45106
+ * @returns {Fault}
45107
+ */
45108
+ function FormattedError(format, ...values) {
45109
+ /** @type {string} */
45110
+ const reason = format ? format_default()(format, ...values) : format
45111
+ return new Constructor(reason)
45112
+ }
45113
+ }
45114
+
45115
+ ;// CONCATENATED MODULE: ./node_modules/micromark-extension-frontmatter/lib/to-matters.js
45116
+ /**
45117
+ * @typedef {'toml' | 'yaml'} Preset
45118
+ * Known name of a frontmatter style.
45119
+ *
45120
+ * @typedef Info
45121
+ * Sequence.
45122
+ *
45123
+ * Depending on how this structure is used, it reflects a marker or a fence.
45124
+ * @property {string} close
45125
+ * Closing.
45126
+ * @property {string} open
45127
+ * Opening.
45128
+ *
45129
+ * @typedef MatterProps
45130
+ * Fields describing a kind of matter.
45131
+ * @property {string} type
45132
+ * Node type to tokenize as.
45133
+ * @property {boolean | null | undefined} [anywhere=false]
45134
+ * Whether matter can be found anywhere in the document, normally, only matter
45135
+ * at the start of the document is recognized.
45136
+ *
45137
+ * > 👉 **Note**: using this is a terrible idea.
45138
+ * > It’s called frontmatter, not matter-in-the-middle or so.
45139
+ * > This makes your markdown less portable.
45140
+ *
45141
+ * @typedef MarkerProps
45142
+ * Marker configuration.
45143
+ * @property {Info | string} marker
45144
+ * Character repeated 3 times, used as complete fences.
45145
+ *
45146
+ * For example the character `'-'` will result in `'---'` being used as the
45147
+ * fence
45148
+ * Pass `open` and `close` to specify different characters for opening and
45149
+ * closing fences.
45150
+ * @property {never} [fence]
45151
+ * If `marker` is set, `fence` must not be set.
45152
+ *
45153
+ * @typedef FenceProps
45154
+ * Fence configuration.
45155
+ * @property {Info | string} fence
45156
+ * Complete fences.
45157
+ *
45158
+ * This can be used when fences contain different characters or lengths
45159
+ * other than 3.
45160
+ * Pass `open` and `close` to interface to specify different characters for opening and
45161
+ * closing fences.
45162
+ * @property {never} [marker]
45163
+ * If `fence` is set, `marker` must not be set.
45164
+ *
45165
+ * @typedef {(MatterProps & FenceProps) | (MatterProps & MarkerProps)} Matter
45166
+ * Fields describing a kind of matter.
45167
+ *
45168
+ * > 👉 **Note**: using `anywhere` is a terrible idea.
45169
+ * > It’s called frontmatter, not matter-in-the-middle or so.
45170
+ * > This makes your markdown less portable.
45171
+ *
45172
+ * > 👉 **Note**: `marker` and `fence` are mutually exclusive.
45173
+ * > If `marker` is set, `fence` must not be set, and vice versa.
45174
+ *
45175
+ * @typedef {Matter | Preset | Array<Matter | Preset>} Options
45176
+ * Configuration.
45177
+ */
45178
+
45179
+
45180
+ const to_matters_own = {}.hasOwnProperty
45181
+ const markers = {
45182
+ yaml: '-',
45183
+ toml: '+'
45184
+ }
45185
+
45186
+ /**
45187
+ * Simplify options by normalizing them to an array of matters.
45188
+ *
45189
+ * @param {Options | null | undefined} [options='yaml']
45190
+ * Configuration (default: `'yaml'`).
45191
+ * @returns {Array<Matter>}
45192
+ * List of matters.
45193
+ */
45194
+ function toMatters(options) {
45195
+ /** @type {Array<Matter>} */
45196
+ const result = []
45197
+ let index = -1
45198
+
45199
+ /** @type {Array<Matter | Preset>} */
45200
+ const presetsOrMatters = Array.isArray(options)
45201
+ ? options
45202
+ : options
45203
+ ? [options]
45204
+ : ['yaml']
45205
+ while (++index < presetsOrMatters.length) {
45206
+ result[index] = matter(presetsOrMatters[index])
45207
+ }
45208
+ return result
45209
+ }
45210
+
45211
+ /**
45212
+ * Simplify an option.
45213
+ *
45214
+ * @param {Matter | Preset} option
45215
+ * Configuration.
45216
+ * @returns {Matter}
45217
+ * Matter.
45218
+ */
45219
+ function matter(option) {
45220
+ let result = option
45221
+ if (typeof result === 'string') {
45222
+ if (!to_matters_own.call(markers, result)) {
45223
+ throw fault('Missing matter definition for `%s`', result)
45224
+ }
45225
+ result = {
45226
+ type: result,
45227
+ marker: markers[result]
45228
+ }
45229
+ } else if (typeof result !== 'object') {
45230
+ throw fault('Expected matter to be an object, not `%j`', result)
45231
+ }
45232
+ if (!to_matters_own.call(result, 'type')) {
45233
+ throw fault('Missing `type` in matter `%j`', result)
45234
+ }
45235
+ if (!to_matters_own.call(result, 'fence') && !to_matters_own.call(result, 'marker')) {
45236
+ throw fault('Missing `marker` or `fence` in matter `%j`', result)
45237
+ }
45238
+ return result
45239
+ }
45240
+
45241
+ ;// CONCATENATED MODULE: ./node_modules/mdast-util-frontmatter/node_modules/escape-string-regexp/index.js
45242
+ function escapeStringRegexp(string) {
45243
+ if (typeof string !== 'string') {
45244
+ throw new TypeError('Expected a string');
45245
+ }
45246
+
45247
+ // Escape characters with special meaning either inside or outside character sets.
45248
+ // 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.
45249
+ return string
45250
+ .replace(/[|\\{}()[\]^$+*?.]/g, '\\$&')
45251
+ .replace(/-/g, '\\x2d');
45252
+ }
45253
+
45254
+ ;// CONCATENATED MODULE: ./node_modules/mdast-util-frontmatter/lib/index.js
45255
+ /**
45256
+ * @typedef {import('mdast').Literal} Literal
45257
+ *
45258
+ * @typedef {import('mdast-util-from-markdown').CompileContext} CompileContext
45259
+ * @typedef {import('mdast-util-from-markdown').Extension} FromMarkdownExtension
45260
+ * @typedef {import('mdast-util-from-markdown').Handle} FromMarkdownHandle
45261
+ * @typedef {import('mdast-util-to-markdown').Options} ToMarkdownExtension
45262
+ *
45263
+ * @typedef {import('micromark-extension-frontmatter').Info} Info
45264
+ * @typedef {import('micromark-extension-frontmatter').Matter} Matter
45265
+ * @typedef {import('micromark-extension-frontmatter').Options} Options
45266
+ */
45267
+
45268
+
45269
+
45270
+
45271
+
45272
+ /**
45273
+ * Create an extension for `mdast-util-from-markdown`.
45274
+ *
45275
+ * @param {Options | null | undefined} [options]
45276
+ * Configuration (optional).
45277
+ * @returns {FromMarkdownExtension}
45278
+ * Extension for `mdast-util-from-markdown`.
45279
+ */
45280
+ function frontmatterFromMarkdown(options) {
45281
+ const matters = toMatters(options)
45282
+ /** @type {FromMarkdownExtension['enter']} */
45283
+ const enter = {}
45284
+ /** @type {FromMarkdownExtension['exit']} */
45285
+ const exit = {}
45286
+ let index = -1
45287
+
45288
+ while (++index < matters.length) {
45289
+ const matter = matters[index]
45290
+ enter[matter.type] = lib_opener(matter)
45291
+ exit[matter.type] = lib_close
45292
+ exit[matter.type + 'Value'] = value
45293
+ }
45294
+
45295
+ return {enter, exit}
45296
+ }
45297
+
45298
+ /**
45299
+ * @param {Matter} matter
45300
+ * @returns {FromMarkdownHandle} enter
45301
+ */
45302
+ function lib_opener(matter) {
45303
+ return open
45304
+
45305
+ /**
45306
+ * @this {CompileContext}
45307
+ * @type {FromMarkdownHandle}
45308
+ */
45309
+ function open(token) {
45310
+ // @ts-expect-error: custom.
45311
+ this.enter({type: matter.type, value: ''}, token)
45312
+ this.buffer()
45313
+ }
45314
+ }
45315
+
45316
+ /**
45317
+ * @this {CompileContext}
45318
+ * @type {FromMarkdownHandle}
45319
+ */
45320
+ function lib_close(token) {
45321
+ const data = this.resume()
45322
+ const node = this.stack[this.stack.length - 1]
45323
+ default_ok('value' in node)
45324
+ this.exit(token)
45325
+ // Remove the initial and final eol.
45326
+ node.value = data.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g, '')
45327
+ }
45328
+
45329
+ /**
45330
+ * @this {CompileContext}
45331
+ * @type {FromMarkdownHandle}
45332
+ */
45333
+ function value(token) {
45334
+ this.config.enter.data.call(this, token)
45335
+ this.config.exit.data.call(this, token)
45336
+ }
45337
+
45338
+ /**
45339
+ * Create an extension for `mdast-util-to-markdown`.
45340
+ *
45341
+ * @param {Options | null | undefined} [options]
45342
+ * Configuration (optional).
45343
+ * @returns {ToMarkdownExtension}
45344
+ * Extension for `mdast-util-to-markdown`.
45345
+ */
45346
+ function frontmatterToMarkdown(options) {
45347
+ /** @type {ToMarkdownExtension['unsafe']} */
45348
+ const unsafe = []
45349
+ /** @type {ToMarkdownExtension['handlers']} */
45350
+ const handlers = {}
45351
+ const matters = toMatters(options)
45352
+ let index = -1
45353
+
45354
+ while (++index < matters.length) {
45355
+ const matter = matters[index]
45356
+
45357
+ // @ts-expect-error: this can add custom frontmatter nodes.
45358
+ // Typing those is the responsibility of the end user.
45359
+ handlers[matter.type] = handler(matter)
45360
+
45361
+ const open = fence(matter, 'open')
45362
+
45363
+ unsafe.push({
45364
+ atBreak: true,
45365
+ character: open.charAt(0),
45366
+ after: escapeStringRegexp(open.charAt(1))
45367
+ })
45368
+ }
45369
+
45370
+ return {unsafe, handlers}
45371
+ }
45372
+
45373
+ /**
45374
+ * Create a handle that can serialize a frontmatter node as markdown.
45375
+ *
45376
+ * @param {Matter} matter
45377
+ * Structure.
45378
+ * @returns {(node: Literal) => string} enter
45379
+ * Handler.
45380
+ */
45381
+ function handler(matter) {
45382
+ const open = fence(matter, 'open')
45383
+ const close = fence(matter, 'close')
45384
+
45385
+ return handle
45386
+
45387
+ /**
45388
+ * Serialize a frontmatter node as markdown.
45389
+ *
45390
+ * @param {Literal} node
45391
+ * Node to serialize.
45392
+ * @returns {string}
45393
+ * Serialized node.
45394
+ */
45395
+ function handle(node) {
45396
+ return open + (node.value ? '\n' + node.value : '') + '\n' + close
45397
+ }
45398
+ }
45399
+
45400
+ /**
45401
+ * Get an `open` or `close` fence.
45402
+ *
45403
+ * @param {Matter} matter
45404
+ * Structure.
45405
+ * @param {'close' | 'open'} prop
45406
+ * Field to get.
45407
+ * @returns {string}
45408
+ * Fence.
45409
+ */
45410
+ function fence(matter, prop) {
45411
+ return matter.marker
45412
+ ? pick(matter.marker, prop).repeat(3)
45413
+ : // @ts-expect-error: They’re mutually exclusive.
45414
+ pick(matter.fence, prop)
45415
+ }
45416
+
45417
+ /**
45418
+ * Take `open` or `close` fields when schema is an info object, or use the
45419
+ * given value when it is a string.
45420
+ *
45421
+ * @param {Info | string} schema
45422
+ * Info object or value.
45423
+ * @param {'close' | 'open'} prop
45424
+ * Field to get.
45425
+ * @returns {string}
45426
+ * Thing to use for the opening or closing.
45427
+ */
45428
+ function pick(schema, prop) {
45429
+ return typeof schema === 'string' ? schema : schema[prop]
45430
+ }
45431
+
45432
+ ;// CONCATENATED MODULE: ./node_modules/micromark-extension-frontmatter/lib/syntax.js
45433
+ /**
45434
+ * @typedef {import('micromark-util-types').Construct} Construct
45435
+ * @typedef {import('micromark-util-types').ConstructRecord} ConstructRecord
45436
+ * @typedef {import('micromark-util-types').Extension} Extension
45437
+ * @typedef {import('micromark-util-types').State} State
45438
+ * @typedef {import('micromark-util-types').TokenType} TokenType
45439
+ * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext
45440
+ * @typedef {import('micromark-util-types').Tokenizer} Tokenizer
45441
+ *
45442
+ * @typedef {import('./to-matters.js').Info} Info
45443
+ * @typedef {import('./to-matters.js').Matter} Matter
45444
+ * @typedef {import('./to-matters.js').Options} Options
45445
+ */
45446
+
45447
+
45448
+
45449
+
45450
+ /**
45451
+ * Create an extension for `micromark` to enable frontmatter syntax.
45452
+ *
45453
+ * @param {Options | null | undefined} [options='yaml']
45454
+ * Configuration (default: `'yaml'`).
45455
+ * @returns {Extension}
45456
+ * Extension for `micromark` that can be passed in `extensions`, to
45457
+ * enable frontmatter syntax.
45458
+ */
45459
+ function frontmatter(options) {
45460
+ const matters = toMatters(options)
45461
+ /** @type {ConstructRecord} */
45462
+ const flow = {}
45463
+ let index = -1
45464
+ while (++index < matters.length) {
45465
+ const matter = matters[index]
45466
+ const code = syntax_fence(matter, 'open').charCodeAt(0)
45467
+ const construct = createConstruct(matter)
45468
+ const existing = flow[code]
45469
+ if (Array.isArray(existing)) {
45470
+ existing.push(construct)
45471
+ } else {
45472
+ // Never a single object, always an array.
45473
+ flow[code] = [construct]
45474
+ }
45475
+ }
45476
+ return {
45477
+ flow
45478
+ }
45479
+ }
45480
+
45481
+ /**
45482
+ * @param {Matter} matter
45483
+ * @returns {Construct}
45484
+ */
45485
+ function createConstruct(matter) {
45486
+ const anywhere = matter.anywhere
45487
+ const frontmatterType = /** @type {TokenType} */ matter.type
45488
+ const fenceType = /** @type {TokenType} */ frontmatterType + 'Fence'
45489
+ const sequenceType = /** @type {TokenType} */ fenceType + 'Sequence'
45490
+ const valueType = /** @type {TokenType} */ frontmatterType + 'Value'
45491
+ const closingFenceConstruct = {
45492
+ tokenize: tokenizeClosingFence,
45493
+ partial: true
45494
+ }
45495
+
45496
+ /**
45497
+ * Fence to look for.
45498
+ *
45499
+ * @type {string}
45500
+ */
45501
+ let buffer
45502
+ let bufferIndex = 0
45503
+ return {
45504
+ tokenize: tokenizeFrontmatter,
45505
+ concrete: true
45506
+ }
45507
+
45508
+ /**
45509
+ * @this {TokenizeContext}
45510
+ * @type {Tokenizer}
45511
+ */
45512
+ function tokenizeFrontmatter(effects, ok, nok) {
45513
+ const self = this
45514
+ return start
45515
+
45516
+ /**
45517
+ * Start of frontmatter.
45518
+ *
45519
+ * ```markdown
45520
+ * > | ---
45521
+ * ^
45522
+ * | title: "Venus"
45523
+ * | ---
45524
+ * ```
45525
+ *
45526
+ * @type {State}
45527
+ */
45528
+ function start(code) {
45529
+ const position = self.now()
45530
+ if (
45531
+ // Indent not allowed.
45532
+ position.column === 1 &&
45533
+ // Normally, only allowed in first line.
45534
+ (position.line === 1 || anywhere)
45535
+ ) {
45536
+ buffer = syntax_fence(matter, 'open')
45537
+ bufferIndex = 0
45538
+ if (code === buffer.charCodeAt(bufferIndex)) {
45539
+ effects.enter(frontmatterType)
45540
+ effects.enter(fenceType)
45541
+ effects.enter(sequenceType)
45542
+ return openSequence(code)
45543
+ }
45544
+ }
45545
+ return nok(code)
45546
+ }
45547
+
45548
+ /**
45549
+ * In open sequence.
45550
+ *
45551
+ * ```markdown
45552
+ * > | ---
45553
+ * ^
45554
+ * | title: "Venus"
45555
+ * | ---
45556
+ * ```
45557
+ *
45558
+ * @type {State}
45559
+ */
45560
+ function openSequence(code) {
45561
+ if (bufferIndex === buffer.length) {
45562
+ effects.exit(sequenceType)
45563
+ if (markdownSpace(code)) {
45564
+ effects.enter('whitespace')
45565
+ return openSequenceWhitespace(code)
45566
+ }
45567
+ return openAfter(code)
45568
+ }
45569
+ if (code === buffer.charCodeAt(bufferIndex++)) {
45570
+ effects.consume(code)
45571
+ return openSequence
45572
+ }
45573
+ return nok(code)
45574
+ }
45575
+
45576
+ /**
45577
+ * In whitespace after open sequence.
45578
+ *
45579
+ * ```markdown
45580
+ * > | ---␠
45581
+ * ^
45582
+ * | title: "Venus"
45583
+ * | ---
45584
+ * ```
45585
+ *
45586
+ * @type {State}
45587
+ */
45588
+ function openSequenceWhitespace(code) {
45589
+ if (markdownSpace(code)) {
45590
+ effects.consume(code)
45591
+ return openSequenceWhitespace
45592
+ }
45593
+ effects.exit('whitespace')
45594
+ return openAfter(code)
45595
+ }
45596
+
45597
+ /**
45598
+ * After open sequence.
45599
+ *
45600
+ * ```markdown
45601
+ * > | ---
45602
+ * ^
45603
+ * | title: "Venus"
45604
+ * | ---
45605
+ * ```
45606
+ *
45607
+ * @type {State}
45608
+ */
45609
+ function openAfter(code) {
45610
+ if (markdownLineEnding(code)) {
45611
+ effects.exit(fenceType)
45612
+ effects.enter('lineEnding')
45613
+ effects.consume(code)
45614
+ effects.exit('lineEnding')
45615
+ // Get ready for closing fence.
45616
+ buffer = syntax_fence(matter, 'close')
45617
+ bufferIndex = 0
45618
+ return effects.attempt(closingFenceConstruct, after, contentStart)
45619
+ }
45620
+
45621
+ // EOF is not okay.
45622
+ return nok(code)
45623
+ }
45624
+
45625
+ /**
45626
+ * Start of content chunk.
45627
+ *
45628
+ * ```markdown
45629
+ * | ---
45630
+ * > | title: "Venus"
45631
+ * ^
45632
+ * | ---
45633
+ * ```
45634
+ *
45635
+ * @type {State}
45636
+ */
45637
+ function contentStart(code) {
45638
+ if (code === null || markdownLineEnding(code)) {
45639
+ return contentEnd(code)
45640
+ }
45641
+ effects.enter(valueType)
45642
+ return contentInside(code)
45643
+ }
45644
+
45645
+ /**
45646
+ * In content chunk.
45647
+ *
45648
+ * ```markdown
45649
+ * | ---
45650
+ * > | title: "Venus"
45651
+ * ^
45652
+ * | ---
45653
+ * ```
45654
+ *
45655
+ * @type {State}
45656
+ */
45657
+ function contentInside(code) {
45658
+ if (code === null || markdownLineEnding(code)) {
45659
+ effects.exit(valueType)
45660
+ return contentEnd(code)
45661
+ }
45662
+ effects.consume(code)
45663
+ return contentInside
45664
+ }
45665
+
45666
+ /**
45667
+ * End of content chunk.
45668
+ *
45669
+ * ```markdown
45670
+ * | ---
45671
+ * > | title: "Venus"
45672
+ * ^
45673
+ * | ---
45674
+ * ```
45675
+ *
45676
+ * @type {State}
45677
+ */
45678
+ function contentEnd(code) {
45679
+ // Require a closing fence.
45680
+ if (code === null) {
45681
+ return nok(code)
45682
+ }
45683
+
45684
+ // Can only be an eol.
45685
+ effects.enter('lineEnding')
45686
+ effects.consume(code)
45687
+ effects.exit('lineEnding')
45688
+ return effects.attempt(closingFenceConstruct, after, contentStart)
45689
+ }
45690
+
45691
+ /**
45692
+ * After frontmatter.
45693
+ *
45694
+ * ```markdown
45695
+ * | ---
45696
+ * | title: "Venus"
45697
+ * > | ---
45698
+ * ^
45699
+ * ```
45700
+ *
45701
+ * @type {State}
45702
+ */
45703
+ function after(code) {
45704
+ // `code` must be eol/eof.
45705
+ effects.exit(frontmatterType)
45706
+ return ok(code)
45707
+ }
45708
+ }
45709
+
45710
+ /** @type {Tokenizer} */
45711
+ function tokenizeClosingFence(effects, ok, nok) {
45712
+ let bufferIndex = 0
45713
+ return closeStart
45714
+
45715
+ /**
45716
+ * Start of close sequence.
45717
+ *
45718
+ * ```markdown
45719
+ * | ---
45720
+ * | title: "Venus"
45721
+ * > | ---
45722
+ * ^
45723
+ * ```
45724
+ *
45725
+ * @type {State}
45726
+ */
45727
+ function closeStart(code) {
45728
+ if (code === buffer.charCodeAt(bufferIndex)) {
45729
+ effects.enter(fenceType)
45730
+ effects.enter(sequenceType)
45731
+ return closeSequence(code)
45732
+ }
45733
+ return nok(code)
45734
+ }
45735
+
45736
+ /**
45737
+ * In close sequence.
45738
+ *
45739
+ * ```markdown
45740
+ * | ---
45741
+ * | title: "Venus"
45742
+ * > | ---
45743
+ * ^
45744
+ * ```
45745
+ *
45746
+ * @type {State}
45747
+ */
45748
+ function closeSequence(code) {
45749
+ if (bufferIndex === buffer.length) {
45750
+ effects.exit(sequenceType)
45751
+ if (markdownSpace(code)) {
45752
+ effects.enter('whitespace')
45753
+ return closeSequenceWhitespace(code)
45754
+ }
45755
+ return closeAfter(code)
45756
+ }
45757
+ if (code === buffer.charCodeAt(bufferIndex++)) {
45758
+ effects.consume(code)
45759
+ return closeSequence
45760
+ }
45761
+ return nok(code)
45762
+ }
45763
+
45764
+ /**
45765
+ * In whitespace after close sequence.
45766
+ *
45767
+ * ```markdown
45768
+ * > | ---
45769
+ * | title: "Venus"
45770
+ * | ---␠
45771
+ * ^
45772
+ * ```
45773
+ *
45774
+ * @type {State}
45775
+ */
45776
+ function closeSequenceWhitespace(code) {
45777
+ if (markdownSpace(code)) {
45778
+ effects.consume(code)
45779
+ return closeSequenceWhitespace
45780
+ }
45781
+ effects.exit('whitespace')
45782
+ return closeAfter(code)
45783
+ }
45784
+
45785
+ /**
45786
+ * After close sequence.
45787
+ *
45788
+ * ```markdown
45789
+ * | ---
45790
+ * | title: "Venus"
45791
+ * > | ---
45792
+ * ^
45793
+ * ```
45794
+ *
45795
+ * @type {State}
45796
+ */
45797
+ function closeAfter(code) {
45798
+ if (code === null || markdownLineEnding(code)) {
45799
+ effects.exit(fenceType)
45800
+ return ok(code)
45801
+ }
45802
+ return nok(code)
45803
+ }
45804
+ }
45805
+ }
45806
+
45807
+ /**
45808
+ * @param {Matter} matter
45809
+ * @param {'close' | 'open'} prop
45810
+ * @returns {string}
45811
+ */
45812
+ function syntax_fence(matter, prop) {
45813
+ return matter.marker
45814
+ ? syntax_pick(matter.marker, prop).repeat(3)
45815
+ : // @ts-expect-error: They’re mutually exclusive.
45816
+ syntax_pick(matter.fence, prop)
45817
+ }
45818
+
45819
+ /**
45820
+ * @param {Info | string} schema
45821
+ * @param {'close' | 'open'} prop
45822
+ * @returns {string}
45823
+ */
45824
+ function syntax_pick(schema, prop) {
45825
+ return typeof schema === 'string' ? schema : schema[prop]
45826
+ }
45827
+
45828
+ ;// CONCATENATED MODULE: ./node_modules/remark-frontmatter/lib/index.js
45829
+ /// <reference types="remark-parse" />
45830
+ /// <reference types="remark-stringify" />
45831
+
45832
+ /**
45833
+ * @typedef {import('mdast').Root} Root
45834
+ * @typedef {import('micromark-extension-frontmatter').Options} Options
45835
+ * @typedef {import('unified').Processor<Root>} Processor
45836
+ */
45837
+
45838
+
45839
+
45840
+
45841
+ /** @type {Options} */
45842
+ const remark_frontmatter_lib_emptyOptions = 'yaml'
45843
+
45844
+ /**
45845
+ * Add support for frontmatter.
45846
+ *
45847
+ * ###### Notes
45848
+ *
45849
+ * Doesn’t parse the data inside them: create your own plugin to do that.
45850
+ *
45851
+ * @param {Options | null | undefined} [options='yaml']
45852
+ * Configuration (default: `'yaml'`).
45853
+ * @returns {undefined}
45854
+ * Nothing.
45855
+ */
45856
+ function remarkFrontmatter(options) {
45857
+ // @ts-expect-error: TS is wrong about `this`.
45858
+ // eslint-disable-next-line unicorn/no-this-assignment
45859
+ const self = /** @type {Processor} */ (this)
45860
+ const settings = options || remark_frontmatter_lib_emptyOptions
45861
+ const data = self.data()
45862
+
45863
+ const micromarkExtensions =
45864
+ data.micromarkExtensions || (data.micromarkExtensions = [])
45865
+ const fromMarkdownExtensions =
45866
+ data.fromMarkdownExtensions || (data.fromMarkdownExtensions = [])
45867
+ const toMarkdownExtensions =
45868
+ data.toMarkdownExtensions || (data.toMarkdownExtensions = [])
45869
+
45870
+ micromarkExtensions.push(frontmatter(settings))
45871
+ fromMarkdownExtensions.push(frontmatterFromMarkdown(settings))
45872
+ toMarkdownExtensions.push(frontmatterToMarkdown(settings))
45873
+ }
45874
+
44937
45875
  ;// CONCATENATED MODULE: ./node_modules/@ungap/structured-clone/esm/types.js
44938
45876
  const VOID = -1;
44939
45877
  const PRIMITIVE = 0;
@@ -50678,7 +51616,7 @@ function extract_identifiers(param, nodes = []) {
50678
51616
  * @returns {undefined}
50679
51617
  * Nothing.
50680
51618
  */
50681
- function create(from, to) {
51619
+ function estree_util_create_create(from, to) {
50682
51620
  /** @type {Array<keyof Node>} */
50683
51621
  // @ts-expect-error: `start`, `end`, `comments` are custom Acorn fields.
50684
51622
  const fields = ['start', 'end', 'loc', 'range', 'comments']
@@ -50803,7 +51741,7 @@ function specifiersToDeclarations(specifiers, init) {
50803
51741
  id: importNamespaceSpecifier.local,
50804
51742
  init
50805
51743
  }
50806
- create(importNamespaceSpecifier, declarator)
51744
+ estree_util_create_create(importNamespaceSpecifier, declarator)
50807
51745
  declarations.push(declarator)
50808
51746
  }
50809
51747
 
@@ -50837,7 +51775,7 @@ function specifiersToDeclarations(specifiers, init) {
50837
51775
  key,
50838
51776
  value
50839
51777
  }
50840
- create(specifier, property)
51778
+ estree_util_create_create(specifier, property)
50841
51779
  return property
50842
51780
  })
50843
51781
  },
@@ -51122,13 +52060,13 @@ function recmaDocument(options) {
51122
52060
  imported: specifier.local,
51123
52061
  local: {type: 'Identifier', name: 'MDXLayout'}
51124
52062
  }
51125
- create(specifier.local, importSpecifier)
52063
+ estree_util_create_create(specifier.local, importSpecifier)
51126
52064
  specifiers.push(importSpecifier)
51127
52065
  }
51128
52066
 
51129
52067
  /** @type {Literal} */
51130
52068
  const from = {type: 'Literal', value: source.value}
51131
- create(source, from)
52069
+ estree_util_create_create(source, from)
51132
52070
 
51133
52071
  /** @type {ImportDeclaration} */
51134
52072
  const declaration = {
@@ -51136,7 +52074,7 @@ function recmaDocument(options) {
51136
52074
  specifiers,
51137
52075
  source: from
51138
52076
  }
51139
- create(specifier, declaration)
52077
+ estree_util_create_create(specifier, declaration)
51140
52078
  handleEsm(declaration)
51141
52079
 
51142
52080
  return false
@@ -51284,7 +52222,7 @@ function recmaDocument(options) {
51284
52222
 
51285
52223
  /** @type {SimpleLiteral} */
51286
52224
  const replacement = {type: 'Literal', value}
51287
- create(node.source, replacement)
52225
+ estree_util_create_create(node.source, replacement)
51288
52226
  node.source = replacement
51289
52227
  return
51290
52228
  }
@@ -51316,7 +52254,7 @@ function recmaDocument(options) {
51316
52254
  usesImportMetaUrlVariable = true
51317
52255
  /** @type {Identifier} */
51318
52256
  const replacement = {type: 'Identifier', name: '_importMetaUrl'}
51319
- create(node, replacement)
52257
+ estree_util_create_create(node, replacement)
51320
52258
  this.replace(replacement)
51321
52259
  }
51322
52260
  }
@@ -51411,7 +52349,7 @@ function recmaDocument(options) {
51411
52349
  // ```
51412
52350
  /** @type {ImportExpression} */
51413
52351
  const argument = {type: 'ImportExpression', source: node.source}
51414
- create(node, argument)
52352
+ estree_util_create_create(node, argument)
51415
52353
  init = {type: 'AwaitExpression', argument}
51416
52354
 
51417
52355
  if (
@@ -60456,6 +61394,7 @@ var __spreadArray = (undefined && undefined.__spreadArray) || function (to, from
60456
61394
 
60457
61395
 
60458
61396
 
61397
+
60459
61398
  __webpack_require__(973);
60460
61399
 
60461
61400
 
@@ -60472,16 +61411,16 @@ var utils = {
60472
61411
  calloutIcons: {},
60473
61412
  };
60474
61413
  var makeUseMDXComponents = function (more) {
60475
- var components = index_assign(index_assign({}, components_namespaceObject), more);
61414
+ var components = index_assign(index_assign(index_assign({}, more), components_namespaceObject), { Variable: (dist_default()) });
60476
61415
  return function () { return components; };
60477
61416
  };
60478
61417
  var reactProcessor = function (opts) {
60479
61418
  if (opts === void 0) { opts = {}; }
60480
- return core_createProcessor(index_assign({ remarkPlugins: [callouts] }, opts));
61419
+ return core_createProcessor(index_assign({ remarkPlugins: [remarkFrontmatter, callouts] }, opts));
60481
61420
  };
60482
61421
  var index_compile = function (text, opts) {
60483
61422
  if (opts === void 0) { opts = {}; }
60484
- return String(compileSync(text, index_assign({ outputFormat: 'function-body', providerImportSource: '#', remarkPlugins: [callouts] }, opts))).replace(/await import\(_resolveDynamicMdxSpecifier\('react'\)\)/, 'arguments[0].imports.React');
61423
+ return String(compileSync(text, index_assign({ outputFormat: 'function-body', providerImportSource: '#', remarkPlugins: [remarkFrontmatter, callouts] }, opts))).replace(/await import\(_resolveDynamicMdxSpecifier\('react'\)\)/, 'arguments[0].imports.React');
60485
61424
  };
60486
61425
  var index_run = function (code_1) {
60487
61426
  var args_1 = [];
@@ -60518,7 +61457,7 @@ var index_html = function (text, opts) {
60518
61457
  };
60519
61458
  var mdast = function (text, opts) {
60520
61459
  if (opts === void 0) { opts = {}; }
60521
- var processor = remark().use(remarkMdx);
61460
+ var processor = remark().use(remarkMdx).use(remarkFrontmatter);
60522
61461
  try {
60523
61462
  var tree = processor.parse(text);
60524
61463
  return processor.runSync(tree);