@uiw/react-md-editor 4.0.8 → 4.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/README.md +95 -28
  2. package/dist/mdeditor.css +1 -1
  3. package/dist/mdeditor.js +178 -222
  4. package/dist/mdeditor.min.js +1 -1
  5. package/esm/Editor.d.ts +1 -1
  6. package/esm/Editor.nohighlight.d.ts +1 -1
  7. package/esm/components/DragBar/index.d.ts +1 -1
  8. package/esm/components/TextArea/Markdown.d.ts +1 -1
  9. package/esm/components/TextArea/Textarea.d.ts +1 -1
  10. package/esm/components/TextArea/index.d.ts +4 -4
  11. package/esm/components/TextArea/index.nohighlight.d.ts +3 -3
  12. package/esm/components/Toolbar/Child.d.ts +1 -1
  13. package/esm/components/Toolbar/index.d.ts +1 -1
  14. package/esm/index.css +1 -0
  15. package/esm/index.d.ts +2 -0
  16. package/esm/index.js +2 -0
  17. package/lib/Editor.d.ts +1 -1
  18. package/lib/Editor.nohighlight.d.ts +1 -1
  19. package/lib/components/DragBar/index.d.ts +1 -1
  20. package/lib/components/TextArea/Markdown.d.ts +1 -1
  21. package/lib/components/TextArea/Textarea.d.ts +1 -1
  22. package/lib/components/TextArea/index.d.ts +4 -4
  23. package/lib/components/TextArea/index.nohighlight.d.ts +3 -3
  24. package/lib/components/Toolbar/Child.d.ts +1 -1
  25. package/lib/components/Toolbar/index.d.ts +1 -1
  26. package/lib/index.d.ts +2 -0
  27. package/lib/index.js +18 -1
  28. package/markdown-editor.css +1 -0
  29. package/package.json +1 -1
  30. package/src/Editor.nohighlight.tsx +2 -2
  31. package/src/Editor.tsx +3 -3
  32. package/src/components/DragBar/index.tsx +1 -1
  33. package/src/components/TextArea/Markdown.tsx +1 -1
  34. package/src/components/TextArea/Textarea.tsx +2 -2
  35. package/src/components/TextArea/index.nohighlight.tsx +5 -4
  36. package/src/components/TextArea/index.tsx +6 -5
  37. package/src/components/Toolbar/Child.tsx +1 -1
  38. package/src/components/Toolbar/index.tsx +2 -2
  39. package/src/index.tsx +2 -0
package/dist/mdeditor.js CHANGED
@@ -84,22 +84,11 @@ if (true) {
84
84
 
85
85
  /***/ }),
86
86
 
87
- /***/ 740:
87
+ /***/ 689:
88
88
  /***/ ((module) => {
89
89
 
90
- module.exports = {
91
- trueFunc: function trueFunc(){
92
- return true;
93
- },
94
- falseFunc: function falseFunc(){
95
- return false;
96
- }
97
- };
98
-
99
- /***/ }),
90
+ "use strict";
100
91
 
101
- /***/ 848:
102
- /***/ ((module) => {
103
92
 
104
93
  // http://www.w3.org/TR/CSS21/grammar.html
105
94
  // https://github.com/visionmedia/css-parse/pull/49#issuecomment-30088027
@@ -134,7 +123,7 @@ var TYPE_DECLARATION = 'declaration';
134
123
  * @throws {TypeError}
135
124
  * @throws {Error}
136
125
  */
137
- module.exports = function (style, options) {
126
+ function index (style, options) {
138
127
  if (typeof style !== 'string') {
139
128
  throw new TypeError('First argument must be a string');
140
129
  }
@@ -194,8 +183,6 @@ module.exports = function (style, options) {
194
183
  */
195
184
  Position.prototype.content = style;
196
185
 
197
- var errorsList = [];
198
-
199
186
  /**
200
187
  * Error `msg`.
201
188
  *
@@ -212,9 +199,7 @@ module.exports = function (style, options) {
212
199
  err.column = column;
213
200
  err.source = style;
214
201
 
215
- if (options.silent) {
216
- errorsList.push(err);
217
- } else {
202
+ if (options.silent) ; else {
218
203
  throw err;
219
204
  }
220
205
  }
@@ -351,7 +336,7 @@ module.exports = function (style, options) {
351
336
 
352
337
  whitespace();
353
338
  return declarations();
354
- };
339
+ }
355
340
 
356
341
  /**
357
342
  * Trim `str`.
@@ -363,6 +348,23 @@ function trim(str) {
363
348
  return str ? str.replace(TRIM_REGEX, EMPTY_STRING) : EMPTY_STRING;
364
349
  }
365
350
 
351
+ module.exports = index;
352
+ //# sourceMappingURL=index.js.map
353
+
354
+
355
+ /***/ }),
356
+
357
+ /***/ 740:
358
+ /***/ ((module) => {
359
+
360
+ module.exports = {
361
+ trueFunc: function trueFunc(){
362
+ return true;
363
+ },
364
+ falseFunc: function falseFunc(){
365
+ return false;
366
+ }
367
+ };
366
368
 
367
369
  /***/ }),
368
370
 
@@ -376,7 +378,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
376
378
  };
377
379
  Object.defineProperty(exports, "__esModule", ({ value: true }));
378
380
  exports["default"] = StyleToObject;
379
- var inline_style_parser_1 = __importDefault(__webpack_require__(848));
381
+ const inline_style_parser_1 = __importDefault(__webpack_require__(689));
380
382
  /**
381
383
  * Parses inline style to object.
382
384
  *
@@ -392,17 +394,17 @@ var inline_style_parser_1 = __importDefault(__webpack_require__(848));
392
394
  * ```
393
395
  */
394
396
  function StyleToObject(style, iterator) {
395
- var styleObject = null;
397
+ let styleObject = null;
396
398
  if (!style || typeof style !== 'string') {
397
399
  return styleObject;
398
400
  }
399
- var declarations = (0, inline_style_parser_1.default)(style);
400
- var hasIterator = typeof iterator === 'function';
401
- declarations.forEach(function (declaration) {
401
+ const declarations = (0, inline_style_parser_1.default)(style);
402
+ const hasIterator = typeof iterator === 'function';
403
+ declarations.forEach((declaration) => {
402
404
  if (declaration.type !== 'declaration') {
403
405
  return;
404
406
  }
405
- var property = declaration.property, value = declaration.value;
407
+ const { property, value } = declaration;
406
408
  if (hasIterator) {
407
409
  iterator(property, value, declaration);
408
410
  }
@@ -820,6 +822,7 @@ __webpack_require__.d(__webpack_exports__, {
820
822
  getStateFromTextArea: () => (/* reexport */ getStateFromTextArea),
821
823
  getSurroundingWord: () => (/* reexport */ getSurroundingWord),
822
824
  group: () => (/* reexport */ group),
825
+ handleKeyDown: () => (/* reexport */ handleKeyDown),
823
826
  heading: () => (/* reexport */ title_heading),
824
827
  heading1: () => (/* reexport */ heading1),
825
828
  heading2: () => (/* reexport */ heading2),
@@ -841,6 +844,7 @@ __webpack_require__.d(__webpack_exports__, {
841
844
  reducer: () => (/* reexport */ reducer),
842
845
  selectLine: () => (/* reexport */ selectLine),
843
846
  selectWord: () => (/* reexport */ selectWord),
847
+ shortcuts: () => (/* reexport */ shortcutsHandle),
844
848
  strikethrough: () => (/* reexport */ strikeThrough_strikethrough),
845
849
  table: () => (/* reexport */ table_table),
846
850
  title: () => (/* reexport */ title),
@@ -1140,8 +1144,7 @@ function _extends() {
1140
1144
 
1141
1145
  ;// ../node_modules/unist-util-is/lib/index.js
1142
1146
  /**
1143
- * @typedef {import('unist').Node} Node
1144
- * @typedef {import('unist').Parent} Parent
1147
+ * @import {Node, Parent} from 'unist'
1145
1148
  */
1146
1149
 
1147
1150
  /**
@@ -1169,7 +1172,7 @@ function _extends() {
1169
1172
  *
1170
1173
  * Note: `Node` is included as it is common but is not indexable.
1171
1174
  *
1172
- * @typedef {Array<Props | TestFunction | string> | Props | TestFunction | string | null | undefined} Test
1175
+ * @typedef {Array<Props | TestFunction | string> | ReadonlyArray<Props | TestFunction | string> | Props | TestFunction | string | null | undefined} Test
1173
1176
  * Check for an arbitrary node.
1174
1177
  *
1175
1178
  * @callback TestFunction
@@ -1208,6 +1211,8 @@ const is =
1208
1211
  // Note: overloads in JSDoc can’t yet use different `@template`s.
1209
1212
  /**
1210
1213
  * @type {(
1214
+ * (<Condition extends ReadonlyArray<string>>(node: unknown, test: Condition, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & {type: Condition[number]}) &
1215
+ * (<Condition extends Array<string>>(node: unknown, test: Condition, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & {type: Condition[number]}) &
1211
1216
  * (<Condition extends string>(node: unknown, test: Condition, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & {type: Condition}) &
1212
1217
  * (<Condition extends Props>(node: unknown, test: Condition, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Condition) &
1213
1218
  * (<Condition extends TestFunction>(node: unknown, test: Condition, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Predicate<Condition, Node>) &
@@ -1304,7 +1309,11 @@ const convert =
1304
1309
  }
1305
1310
 
1306
1311
  if (typeof test === 'object') {
1307
- return Array.isArray(test) ? anyFactory(test) : propsFactory(test)
1312
+ return Array.isArray(test)
1313
+ ? anyFactory(test)
1314
+ : // Cast because `ReadonlyArray` goes into the above but `isArray`
1315
+ // narrows to `Array`.
1316
+ propertiesFactory(/** @type {Props} */ (test))
1308
1317
  }
1309
1318
 
1310
1319
  if (typeof test === 'string') {
@@ -1351,7 +1360,7 @@ function anyFactory(tests) {
1351
1360
  * @param {Props} check
1352
1361
  * @returns {Check}
1353
1362
  */
1354
- function propsFactory(check) {
1363
+ function propertiesFactory(check) {
1355
1364
  const checkAsRecord = /** @type {Record<string, unknown>} */ (check)
1356
1365
 
1357
1366
  return castFactory(all)
@@ -1442,8 +1451,7 @@ function color(d) {
1442
1451
 
1443
1452
  ;// ../node_modules/unist-util-visit-parents/lib/index.js
1444
1453
  /**
1445
- * @typedef {import('unist').Node} UnistNode
1446
- * @typedef {import('unist').Parent} UnistParent
1454
+ * @import {Node as UnistNode, Parent as UnistParent} from 'unist'
1447
1455
  */
1448
1456
 
1449
1457
  /**
@@ -1491,8 +1499,10 @@ function color(d) {
1491
1499
 
1492
1500
  /**
1493
1501
  * @typedef {(
1494
- * Check extends Array<any>
1495
- * ? MatchesOne<Value, Check[keyof Check]>
1502
+ * Check extends ReadonlyArray<infer T>
1503
+ * ? MatchesOne<Value, T>
1504
+ * : Check extends Array<infer T>
1505
+ * ? MatchesOne<Value, T>
1496
1506
  * : MatchesOne<Value, Check>
1497
1507
  * )} Matches
1498
1508
  * Check whether a node matches a check in the type system.
@@ -1762,9 +1772,9 @@ function visitParents(tree, test, visitor, reverse) {
1762
1772
  typeof value.tagName === 'string'
1763
1773
  ? value.tagName
1764
1774
  : // `xast`
1765
- typeof value.name === 'string'
1766
- ? value.name
1767
- : undefined
1775
+ typeof value.name === 'string'
1776
+ ? value.name
1777
+ : undefined
1768
1778
 
1769
1779
  Object.defineProperty(visit, 'name', {
1770
1780
  value:
@@ -33470,6 +33480,7 @@ var extendSyntaxDefinition = withNoNegative(mergeSection({
33470
33480
  })),
33471
33481
  ids: replaceValueIfSpecified,
33472
33482
  classNames: replaceValueIfSpecified,
33483
+ nestingSelector: replaceValueIfSpecified,
33473
33484
  namespace: withPositive(defaultXmlOptions, mergeSection({
33474
33485
  wildcard: replaceValueIfSpecified
33475
33486
  })),
@@ -33691,6 +33702,10 @@ var cssModules = {
33691
33702
  String: ['part']
33692
33703
  }
33693
33704
  }
33705
+ },
33706
+ 'css-nesting-1': {
33707
+ latest: true,
33708
+ nestingSelector: true
33694
33709
  }
33695
33710
  };
33696
33711
  var latestSyntaxDefinition = __assign(__assign({}, selectors4SyntaxDefinition), { modules: Object.entries(cssModules)
@@ -34016,6 +34031,7 @@ function createParser(options) {
34016
34031
  : [false, false], tagNameEnabled = _e[0], tagNameWildcardEnabled = _e[1];
34017
34032
  var idEnabled = Boolean(syntaxDefinition.ids);
34018
34033
  var classNamesEnabled = Boolean(syntaxDefinition.classNames);
34034
+ var nestingSelectorEnabled = Boolean(syntaxDefinition.nestingSelector);
34019
34035
  var namespaceEnabled = Boolean(syntaxDefinition.namespace);
34020
34036
  var namespaceWildcardEnabled = syntaxDefinition.namespace &&
34021
34037
  (syntaxDefinition.namespace === true || syntaxDefinition.namespace.wildcard === true);
@@ -34630,6 +34646,11 @@ function createParser(options) {
34630
34646
  assert(idName, 'Expected ID name.');
34631
34647
  rule.items.push({ type: 'Id', name: idName });
34632
34648
  }
34649
+ else if (is('&')) {
34650
+ assert(nestingSelectorEnabled, 'Nesting selector is not enabled.');
34651
+ next();
34652
+ rule.items.push({ type: 'NestingSelector' });
34653
+ }
34633
34654
  else if (is('[')) {
34634
34655
  assert(attributesEnabled, 'Attributes are not enabled.');
34635
34656
  rule.items.push(parseAttribute());
@@ -34833,6 +34854,9 @@ function render(entity) {
34833
34854
  else if (entity.type === 'ClassName') {
34834
34855
  return ".".concat(escapeIdentifier(entity.name));
34835
34856
  }
34857
+ else if (entity.type === 'NestingSelector') {
34858
+ return '&';
34859
+ }
34836
34860
  else if (entity.type === 'Attribute') {
34837
34861
  var name_1 = entity.name, namespace = entity.namespace, operator = entity.operator, value = entity.value, caseSensitivityModifier = entity.caseSensitivityModifier;
34838
34862
  var result = '[';
@@ -34946,7 +34970,7 @@ function astMethods(type) {
34946
34970
  * console.log(ast.isSelector(selector)); // prints true
34947
34971
  * console.log(ast.isRule(selector)); // prints false
34948
34972
  */
34949
- var ast = ast_assign(ast_assign(ast_assign(ast_assign(ast_assign(ast_assign(ast_assign(ast_assign(ast_assign(ast_assign(ast_assign(ast_assign(ast_assign(ast_assign(ast_assign(ast_assign({}, astMethods('Selector')('selector', 'isSelector')), astMethods('Rule')('rule', 'isRule')), astMethods('TagName')('tagName', 'isTagName')), astMethods('Id')('id', 'isId')), astMethods('ClassName')('className', 'isClassName')), astMethods('WildcardTag')('wildcardTag', 'isWildcardTag')), astMethods('NamespaceName')('namespaceName', 'isNamespaceName')), astMethods('WildcardNamespace')('wildcardNamespace', 'isWildcardNamespace')), astMethods('NoNamespace')('noNamespace', 'isNoNamespace')), astMethods('Attribute')('attribute', 'isAttribute')), astMethods('PseudoClass')('pseudoClass', 'isPseudoClass')), astMethods('PseudoElement')('pseudoElement', 'isPseudoElement')), astMethods('String')('string', 'isString')), astMethods('Formula')('formula', 'isFormula')), astMethods('FormulaOfSelector')('formulaOfSelector', 'isFormulaOfSelector')), astMethods('Substitution')('substitution', 'isSubstitution'));
34973
+ var ast = ast_assign(ast_assign(ast_assign(ast_assign(ast_assign(ast_assign(ast_assign(ast_assign(ast_assign(ast_assign(ast_assign(ast_assign(ast_assign(ast_assign(ast_assign(ast_assign(ast_assign({}, astMethods('Selector')('selector', 'isSelector')), astMethods('Rule')('rule', 'isRule')), astMethods('TagName')('tagName', 'isTagName')), astMethods('Id')('id', 'isId')), astMethods('ClassName')('className', 'isClassName')), astMethods('WildcardTag')('wildcardTag', 'isWildcardTag')), astMethods('NamespaceName')('namespaceName', 'isNamespaceName')), astMethods('WildcardNamespace')('wildcardNamespace', 'isWildcardNamespace')), astMethods('NoNamespace')('noNamespace', 'isNoNamespace')), astMethods('NestingSelector')('nestingSelector', 'isNestingSelector')), astMethods('Attribute')('attribute', 'isAttribute')), astMethods('PseudoClass')('pseudoClass', 'isPseudoClass')), astMethods('PseudoElement')('pseudoElement', 'isPseudoElement')), astMethods('String')('string', 'isString')), astMethods('Formula')('formula', 'isFormula')), astMethods('FormulaOfSelector')('formulaOfSelector', 'isFormulaOfSelector')), astMethods('Substitution')('substitution', 'isSubstitution'));
34950
34974
 
34951
34975
  ;// ../node_modules/css-selector-parser/dist/mjs/index.js
34952
34976
 
@@ -50240,9 +50264,7 @@ function index(value) {
50240
50264
 
50241
50265
  ;// ../node_modules/vfile-message/lib/index.js
50242
50266
  /**
50243
- * @typedef {import('unist').Node} Node
50244
- * @typedef {import('unist').Point} Point
50245
- * @typedef {import('unist').Position} Position
50267
+ * @import {Node, Point, Position} from 'unist'
50246
50268
  */
50247
50269
 
50248
50270
  /**
@@ -50399,7 +50421,6 @@ class VFileMessage extends Error {
50399
50421
  ? options.place.start
50400
50422
  : options.place
50401
50423
 
50402
- /* eslint-disable no-unused-expressions */
50403
50424
  /**
50404
50425
  * Stack of ancestor nodes surrounding the message.
50405
50426
  *
@@ -50437,7 +50458,7 @@ class VFileMessage extends Error {
50437
50458
  *
50438
50459
  * @type {string | undefined}
50439
50460
  */
50440
- this.file
50461
+ this.file = ''
50441
50462
 
50442
50463
  // Field from `Error`.
50443
50464
  /**
@@ -50515,21 +50536,21 @@ class VFileMessage extends Error {
50515
50536
  *
50516
50537
  * @type {string | undefined}
50517
50538
  */
50518
- this.actual
50539
+ this.actual = undefined
50519
50540
 
50520
50541
  /**
50521
50542
  * Suggest acceptable values that can be used instead of `actual`.
50522
50543
  *
50523
50544
  * @type {Array<string> | undefined}
50524
50545
  */
50525
- this.expected
50546
+ this.expected = undefined
50526
50547
 
50527
50548
  /**
50528
50549
  * Long form description of the message (you should use markdown).
50529
50550
  *
50530
50551
  * @type {string | undefined}
50531
50552
  */
50532
- this.note
50553
+ this.note = undefined
50533
50554
 
50534
50555
  /**
50535
50556
  * Link to docs for the message.
@@ -50539,8 +50560,7 @@ class VFileMessage extends Error {
50539
50560
  *
50540
50561
  * @type {string | undefined}
50541
50562
  */
50542
- this.url
50543
- /* eslint-enable no-unused-expressions */
50563
+ this.url = undefined
50544
50564
  }
50545
50565
  }
50546
50566
 
@@ -61864,10 +61884,8 @@ function normalizeUri(value) {
61864
61884
  }
61865
61885
  ;// ../node_modules/mdast-util-to-hast/lib/footer.js
61866
61886
  /**
61867
- * @typedef {import('hast').Element} Element
61868
- * @typedef {import('hast').ElementContent} ElementContent
61869
- *
61870
- * @typedef {import('./state.js').State} State
61887
+ * @import {ElementContent, Element} from 'hast'
61888
+ * @import {State} from './state.js'
61871
61889
  */
61872
61890
 
61873
61891
  /**
@@ -62118,14 +62136,11 @@ function footer(state) {
62118
62136
 
62119
62137
  ;// ../node_modules/mdast-util-to-hast/lib/handlers/blockquote.js
62120
62138
  /**
62121
- * @typedef {import('hast').Element} Element
62122
- * @typedef {import('mdast').Blockquote} Blockquote
62123
- * @typedef {import('../state.js').State} State
62139
+ * @import {Element} from 'hast'
62140
+ * @import {Blockquote} from 'mdast'
62141
+ * @import {State} from '../state.js'
62124
62142
  */
62125
62143
 
62126
- // Make VS Code show references to the above types.
62127
- ''
62128
-
62129
62144
  /**
62130
62145
  * Turn an mdast `blockquote` node into hast.
62131
62146
  *
@@ -62150,15 +62165,11 @@ function blockquote(state, node) {
62150
62165
 
62151
62166
  ;// ../node_modules/mdast-util-to-hast/lib/handlers/break.js
62152
62167
  /**
62153
- * @typedef {import('hast').Element} Element
62154
- * @typedef {import('hast').Text} Text
62155
- * @typedef {import('mdast').Break} Break
62156
- * @typedef {import('../state.js').State} State
62168
+ * @import {Element, Text} from 'hast'
62169
+ * @import {Break} from 'mdast'
62170
+ * @import {State} from '../state.js'
62157
62171
  */
62158
62172
 
62159
- // Make VS Code show references to the above types.
62160
- ''
62161
-
62162
62173
  /**
62163
62174
  * Turn an mdast `break` node into hast.
62164
62175
  *
@@ -62178,15 +62189,11 @@ function hardBreak(state, node) {
62178
62189
 
62179
62190
  ;// ../node_modules/mdast-util-to-hast/lib/handlers/code.js
62180
62191
  /**
62181
- * @typedef {import('hast').Element} Element
62182
- * @typedef {import('hast').Properties} Properties
62183
- * @typedef {import('mdast').Code} Code
62184
- * @typedef {import('../state.js').State} State
62192
+ * @import {Element, Properties} from 'hast'
62193
+ * @import {Code} from 'mdast'
62194
+ * @import {State} from '../state.js'
62185
62195
  */
62186
62196
 
62187
- // Make VS Code show references to the above types.
62188
- ''
62189
-
62190
62197
  /**
62191
62198
  * Turn an mdast `code` node into hast.
62192
62199
  *
@@ -62201,9 +62208,12 @@ function code(state, node) {
62201
62208
  const value = node.value ? node.value + '\n' : ''
62202
62209
  /** @type {Properties} */
62203
62210
  const properties = {}
62211
+ // Someone can write `js&#x20;python&#x9;ruby`.
62212
+ const language = node.lang ? node.lang.split(/\s+/) : []
62204
62213
 
62205
- if (node.lang) {
62206
- properties.className = ['language-' + node.lang]
62214
+ // GH/CM still drop the non-first languages.
62215
+ if (language.length > 0) {
62216
+ properties.className = ['language-' + language[0]]
62207
62217
  }
62208
62218
 
62209
62219
  // Create `<code>`.
@@ -62230,14 +62240,11 @@ function code(state, node) {
62230
62240
 
62231
62241
  ;// ../node_modules/mdast-util-to-hast/lib/handlers/delete.js
62232
62242
  /**
62233
- * @typedef {import('hast').Element} Element
62234
- * @typedef {import('mdast').Delete} Delete
62235
- * @typedef {import('../state.js').State} State
62243
+ * @import {Element} from 'hast'
62244
+ * @import {Delete} from 'mdast'
62245
+ * @import {State} from '../state.js'
62236
62246
  */
62237
62247
 
62238
- // Make VS Code show references to the above types.
62239
- ''
62240
-
62241
62248
  /**
62242
62249
  * Turn an mdast `delete` node into hast.
62243
62250
  *
@@ -62262,14 +62269,11 @@ function strikethrough(state, node) {
62262
62269
 
62263
62270
  ;// ../node_modules/mdast-util-to-hast/lib/handlers/emphasis.js
62264
62271
  /**
62265
- * @typedef {import('hast').Element} Element
62266
- * @typedef {import('mdast').Emphasis} Emphasis
62267
- * @typedef {import('../state.js').State} State
62272
+ * @import {Element} from 'hast'
62273
+ * @import {Emphasis} from 'mdast'
62274
+ * @import {State} from '../state.js'
62268
62275
  */
62269
62276
 
62270
- // Make VS Code show references to the above types.
62271
- ''
62272
-
62273
62277
  /**
62274
62278
  * Turn an mdast `emphasis` node into hast.
62275
62279
  *
@@ -62294,9 +62298,9 @@ function emphasis(state, node) {
62294
62298
 
62295
62299
  ;// ../node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.js
62296
62300
  /**
62297
- * @typedef {import('hast').Element} Element
62298
- * @typedef {import('mdast').FootnoteReference} FootnoteReference
62299
- * @typedef {import('../state.js').State} State
62301
+ * @import {Element} from 'hast'
62302
+ * @import {FootnoteReference} from 'mdast'
62303
+ * @import {State} from '../state.js'
62300
62304
  */
62301
62305
 
62302
62306
 
@@ -62366,14 +62370,11 @@ function footnoteReference(state, node) {
62366
62370
 
62367
62371
  ;// ../node_modules/mdast-util-to-hast/lib/handlers/heading.js
62368
62372
  /**
62369
- * @typedef {import('hast').Element} Element
62370
- * @typedef {import('mdast').Heading} Heading
62371
- * @typedef {import('../state.js').State} State
62373
+ * @import {Element} from 'hast'
62374
+ * @import {Heading} from 'mdast'
62375
+ * @import {State} from '../state.js'
62372
62376
  */
62373
62377
 
62374
- // Make VS Code show references to the above types.
62375
- ''
62376
-
62377
62378
  /**
62378
62379
  * Turn an mdast `heading` node into hast.
62379
62380
  *
@@ -62398,15 +62399,12 @@ function heading(state, node) {
62398
62399
 
62399
62400
  ;// ../node_modules/mdast-util-to-hast/lib/handlers/html.js
62400
62401
  /**
62401
- * @typedef {import('hast').Element} Element
62402
- * @typedef {import('mdast').Html} Html
62403
- * @typedef {import('../state.js').State} State
62404
- * @typedef {import('../../index.js').Raw} Raw
62402
+ * @import {Element} from 'hast'
62403
+ * @import {Html} from 'mdast'
62404
+ * @import {State} from '../state.js'
62405
+ * @import {Raw} from '../../index.js'
62405
62406
  */
62406
62407
 
62407
- // Make VS Code show references to the above types.
62408
- ''
62409
-
62410
62408
  /**
62411
62409
  * Turn an mdast `html` node into hast (`raw` node in dangerous mode, otherwise
62412
62410
  * nothing).
@@ -62431,17 +62429,11 @@ function handlers_html_html(state, node) {
62431
62429
 
62432
62430
  ;// ../node_modules/mdast-util-to-hast/lib/revert.js
62433
62431
  /**
62434
- * @typedef {import('hast').ElementContent} ElementContent
62435
- *
62436
- * @typedef {import('mdast').Nodes} Nodes
62437
- * @typedef {import('mdast').Reference} Reference
62438
- *
62439
- * @typedef {import('./state.js').State} State
62432
+ * @import {ElementContent} from 'hast'
62433
+ * @import {Reference, Nodes} from 'mdast'
62434
+ * @import {State} from './state.js'
62440
62435
  */
62441
62436
 
62442
- // Make VS Code show references to the above types.
62443
- ''
62444
-
62445
62437
  /**
62446
62438
  * Return the content of a reference without definition as plain text.
62447
62439
  *
@@ -62488,11 +62480,9 @@ function revert(state, node) {
62488
62480
 
62489
62481
  ;// ../node_modules/mdast-util-to-hast/lib/handlers/image-reference.js
62490
62482
  /**
62491
- * @typedef {import('hast').Element} Element
62492
- * @typedef {import('hast').ElementContent} ElementContent
62493
- * @typedef {import('hast').Properties} Properties
62494
- * @typedef {import('mdast').ImageReference} ImageReference
62495
- * @typedef {import('../state.js').State} State
62483
+ * @import {ElementContent, Element, Properties} from 'hast'
62484
+ * @import {ImageReference} from 'mdast'
62485
+ * @import {State} from '../state.js'
62496
62486
  */
62497
62487
 
62498
62488
 
@@ -62531,10 +62521,9 @@ function imageReference(state, node) {
62531
62521
 
62532
62522
  ;// ../node_modules/mdast-util-to-hast/lib/handlers/image.js
62533
62523
  /**
62534
- * @typedef {import('hast').Element} Element
62535
- * @typedef {import('hast').Properties} Properties
62536
- * @typedef {import('mdast').Image} Image
62537
- * @typedef {import('../state.js').State} State
62524
+ * @import {Element, Properties} from 'hast'
62525
+ * @import {Image} from 'mdast'
62526
+ * @import {State} from '../state.js'
62538
62527
  */
62539
62528
 
62540
62529
 
@@ -62569,15 +62558,11 @@ function image_image(state, node) {
62569
62558
 
62570
62559
  ;// ../node_modules/mdast-util-to-hast/lib/handlers/inline-code.js
62571
62560
  /**
62572
- * @typedef {import('hast').Element} Element
62573
- * @typedef {import('hast').Text} Text
62574
- * @typedef {import('mdast').InlineCode} InlineCode
62575
- * @typedef {import('../state.js').State} State
62561
+ * @import {Element, Text} from 'hast'
62562
+ * @import {InlineCode} from 'mdast'
62563
+ * @import {State} from '../state.js'
62576
62564
  */
62577
62565
 
62578
- // Make VS Code show references to the above types.
62579
- ''
62580
-
62581
62566
  /**
62582
62567
  * Turn an mdast `inlineCode` node into hast.
62583
62568
  *
@@ -62606,11 +62591,9 @@ function inlineCode(state, node) {
62606
62591
 
62607
62592
  ;// ../node_modules/mdast-util-to-hast/lib/handlers/link-reference.js
62608
62593
  /**
62609
- * @typedef {import('hast').Element} Element
62610
- * @typedef {import('hast').ElementContent} ElementContent
62611
- * @typedef {import('hast').Properties} Properties
62612
- * @typedef {import('mdast').LinkReference} LinkReference
62613
- * @typedef {import('../state.js').State} State
62594
+ * @import {ElementContent, Element, Properties} from 'hast'
62595
+ * @import {LinkReference} from 'mdast'
62596
+ * @import {State} from '../state.js'
62614
62597
  */
62615
62598
 
62616
62599
 
@@ -62654,10 +62637,9 @@ function linkReference(state, node) {
62654
62637
 
62655
62638
  ;// ../node_modules/mdast-util-to-hast/lib/handlers/link.js
62656
62639
  /**
62657
- * @typedef {import('hast').Element} Element
62658
- * @typedef {import('hast').Properties} Properties
62659
- * @typedef {import('mdast').Link} Link
62660
- * @typedef {import('../state.js').State} State
62640
+ * @import {Element, Properties} from 'hast'
62641
+ * @import {Link} from 'mdast'
62642
+ * @import {State} from '../state.js'
62661
62643
  */
62662
62644
 
62663
62645
 
@@ -62693,17 +62675,11 @@ function link_link(state, node) {
62693
62675
 
62694
62676
  ;// ../node_modules/mdast-util-to-hast/lib/handlers/list-item.js
62695
62677
  /**
62696
- * @typedef {import('hast').Element} Element
62697
- * @typedef {import('hast').ElementContent} ElementContent
62698
- * @typedef {import('hast').Properties} Properties
62699
- * @typedef {import('mdast').ListItem} ListItem
62700
- * @typedef {import('mdast').Parents} Parents
62701
- * @typedef {import('../state.js').State} State
62678
+ * @import {ElementContent, Element, Properties} from 'hast'
62679
+ * @import {ListItem, Parents} from 'mdast'
62680
+ * @import {State} from '../state.js'
62702
62681
  */
62703
62682
 
62704
- // Make VS Code show references to the above types.
62705
- ''
62706
-
62707
62683
  /**
62708
62684
  * Turn an mdast `listItem` node into hast.
62709
62685
  *
@@ -62820,15 +62796,11 @@ function listItemLoose(node) {
62820
62796
 
62821
62797
  ;// ../node_modules/mdast-util-to-hast/lib/handlers/list.js
62822
62798
  /**
62823
- * @typedef {import('hast').Element} Element
62824
- * @typedef {import('hast').Properties} Properties
62825
- * @typedef {import('mdast').List} List
62826
- * @typedef {import('../state.js').State} State
62799
+ * @import {Element, Properties} from 'hast'
62800
+ * @import {List} from 'mdast'
62801
+ * @import {State} from '../state.js'
62827
62802
  */
62828
62803
 
62829
- // Make VS Code show references to the above types.
62830
- ''
62831
-
62832
62804
  /**
62833
62805
  * Turn an mdast `list` node into hast.
62834
62806
  *
@@ -62878,14 +62850,11 @@ function list_list(state, node) {
62878
62850
 
62879
62851
  ;// ../node_modules/mdast-util-to-hast/lib/handlers/paragraph.js
62880
62852
  /**
62881
- * @typedef {import('hast').Element} Element
62882
- * @typedef {import('mdast').Paragraph} Paragraph
62883
- * @typedef {import('../state.js').State} State
62853
+ * @import {Element} from 'hast'
62854
+ * @import {Paragraph} from 'mdast'
62855
+ * @import {State} from '../state.js'
62884
62856
  */
62885
62857
 
62886
- // Make VS Code show references to the above types.
62887
- ''
62888
-
62889
62858
  /**
62890
62859
  * Turn an mdast `paragraph` node into hast.
62891
62860
  *
@@ -62910,15 +62879,11 @@ function paragraph(state, node) {
62910
62879
 
62911
62880
  ;// ../node_modules/mdast-util-to-hast/lib/handlers/root.js
62912
62881
  /**
62913
- * @typedef {import('hast').Parents} HastParents
62914
- * @typedef {import('hast').Root} HastRoot
62915
- * @typedef {import('mdast').Root} MdastRoot
62916
- * @typedef {import('../state.js').State} State
62882
+ * @import {Parents as HastParents, Root as HastRoot} from 'hast'
62883
+ * @import {Root as MdastRoot} from 'mdast'
62884
+ * @import {State} from '../state.js'
62917
62885
  */
62918
62886
 
62919
- // Make VS Code show references to the above types.
62920
- ''
62921
-
62922
62887
  /**
62923
62888
  * Turn an mdast `root` node into hast.
62924
62889
  *
@@ -62938,14 +62903,11 @@ function root_root(state, node) {
62938
62903
 
62939
62904
  ;// ../node_modules/mdast-util-to-hast/lib/handlers/strong.js
62940
62905
  /**
62941
- * @typedef {import('hast').Element} Element
62942
- * @typedef {import('mdast').Strong} Strong
62943
- * @typedef {import('../state.js').State} State
62906
+ * @import {Element} from 'hast'
62907
+ * @import {Strong} from 'mdast'
62908
+ * @import {State} from '../state.js'
62944
62909
  */
62945
62910
 
62946
- // Make VS Code show references to the above types.
62947
- ''
62948
-
62949
62911
  /**
62950
62912
  * Turn an mdast `strong` node into hast.
62951
62913
  *
@@ -62970,9 +62932,9 @@ function strong(state, node) {
62970
62932
 
62971
62933
  ;// ../node_modules/mdast-util-to-hast/lib/handlers/table.js
62972
62934
  /**
62973
- * @typedef {import('hast').Element} Element
62974
- * @typedef {import('mdast').Table} Table
62975
- * @typedef {import('../state.js').State} State
62935
+ * @import {Table} from 'mdast'
62936
+ * @import {Element} from 'hast'
62937
+ * @import {State} from '../state.js'
62976
62938
  */
62977
62939
 
62978
62940
 
@@ -63033,17 +62995,11 @@ function table(state, node) {
63033
62995
 
63034
62996
  ;// ../node_modules/mdast-util-to-hast/lib/handlers/table-row.js
63035
62997
  /**
63036
- * @typedef {import('hast').Element} Element
63037
- * @typedef {import('hast').ElementContent} ElementContent
63038
- * @typedef {import('hast').Properties} Properties
63039
- * @typedef {import('mdast').Parents} Parents
63040
- * @typedef {import('mdast').TableRow} TableRow
63041
- * @typedef {import('../state.js').State} State
62998
+ * @import {Element, ElementContent, Properties} from 'hast'
62999
+ * @import {Parents, TableRow} from 'mdast'
63000
+ * @import {State} from '../state.js'
63042
63001
  */
63043
63002
 
63044
- // Make VS Code show references to the above types.
63045
- ''
63046
-
63047
63003
  /**
63048
63004
  * Turn an mdast `tableRow` node into hast.
63049
63005
  *
@@ -63104,14 +63060,11 @@ function tableRow(state, node, parent) {
63104
63060
 
63105
63061
  ;// ../node_modules/mdast-util-to-hast/lib/handlers/table-cell.js
63106
63062
  /**
63107
- * @typedef {import('hast').Element} Element
63108
- * @typedef {import('mdast').TableCell} TableCell
63109
- * @typedef {import('../state.js').State} State
63063
+ * @import {Element} from 'hast'
63064
+ * @import {TableCell} from 'mdast'
63065
+ * @import {State} from '../state.js'
63110
63066
  */
63111
63067
 
63112
- // Make VS Code show references to the above types.
63113
- ''
63114
-
63115
63068
  /**
63116
63069
  * Turn an mdast `tableCell` node into hast.
63117
63070
  *
@@ -63209,10 +63162,9 @@ function trimLine(value, start, end) {
63209
63162
 
63210
63163
  ;// ../node_modules/mdast-util-to-hast/lib/handlers/text.js
63211
63164
  /**
63212
- * @typedef {import('hast').Element} HastElement
63213
- * @typedef {import('hast').Text} HastText
63214
- * @typedef {import('mdast').Text} MdastText
63215
- * @typedef {import('../state.js').State} State
63165
+ * @import {Element as HastElement, Text as HastText} from 'hast'
63166
+ * @import {Text as MdastText} from 'mdast'
63167
+ * @import {State} from '../state.js'
63216
63168
  */
63217
63169
 
63218
63170
 
@@ -63236,14 +63188,11 @@ function handlers_text_text(state, node) {
63236
63188
 
63237
63189
  ;// ../node_modules/mdast-util-to-hast/lib/handlers/thematic-break.js
63238
63190
  /**
63239
- * @typedef {import('hast').Element} Element
63240
- * @typedef {import('mdast').ThematicBreak} ThematicBreak
63241
- * @typedef {import('../state.js').State} State
63191
+ * @import {Element} from 'hast'
63192
+ * @import {ThematicBreak} from 'mdast'
63193
+ * @import {State} from '../state.js'
63242
63194
  */
63243
63195
 
63244
- // Make VS Code show references to the above types.
63245
- ''
63246
-
63247
63196
  /**
63248
63197
  * Turn an mdast `thematicBreak` node into hast.
63249
63198
  *
@@ -63267,6 +63216,10 @@ function thematic_break_thematicBreak(state, node) {
63267
63216
  }
63268
63217
 
63269
63218
  ;// ../node_modules/mdast-util-to-hast/lib/handlers/index.js
63219
+ /**
63220
+ * @import {Handlers} from '../state.js'
63221
+ */
63222
+
63270
63223
 
63271
63224
 
63272
63225
 
@@ -63294,7 +63247,7 @@ function thematic_break_thematicBreak(state, node) {
63294
63247
  /**
63295
63248
  * Default handlers for nodes.
63296
63249
  *
63297
- * @satisfies {import('../state.js').Handlers}
63250
+ * @satisfies {Handlers}
63298
63251
  */
63299
63252
  const handlers_handlers = {
63300
63253
  blockquote: blockquote,
@@ -63334,22 +63287,25 @@ function handlers_ignore() {
63334
63287
 
63335
63288
  ;// ../node_modules/mdast-util-to-hast/lib/state.js
63336
63289
  /**
63337
- * @typedef {import('hast').Element} HastElement
63338
- * @typedef {import('hast').ElementContent} HastElementContent
63339
- * @typedef {import('hast').Nodes} HastNodes
63340
- * @typedef {import('hast').Properties} HastProperties
63341
- * @typedef {import('hast').RootContent} HastRootContent
63342
- * @typedef {import('hast').Text} HastText
63343
- *
63344
- * @typedef {import('mdast').Definition} MdastDefinition
63345
- * @typedef {import('mdast').FootnoteDefinition} MdastFootnoteDefinition
63346
- * @typedef {import('mdast').Nodes} MdastNodes
63347
- * @typedef {import('mdast').Parents} MdastParents
63348
- *
63349
- * @typedef {import('vfile').VFile} VFile
63350
- *
63351
- * @typedef {import('./footer.js').FootnoteBackContentTemplate} FootnoteBackContentTemplate
63352
- * @typedef {import('./footer.js').FootnoteBackLabelTemplate} FootnoteBackLabelTemplate
63290
+ * @import {
63291
+ * ElementContent as HastElementContent,
63292
+ * Element as HastElement,
63293
+ * Nodes as HastNodes,
63294
+ * Properties as HastProperties,
63295
+ * RootContent as HastRootContent,
63296
+ * Text as HastText
63297
+ * } from 'hast'
63298
+ * @import {
63299
+ * Definition as MdastDefinition,
63300
+ * FootnoteDefinition as MdastFootnoteDefinition,
63301
+ * Nodes as MdastNodes,
63302
+ * Parents as MdastParents
63303
+ * } from 'mdast'
63304
+ * @import {VFile} from 'vfile'
63305
+ * @import {
63306
+ * FootnoteBackContentTemplate,
63307
+ * FootnoteBackLabelTemplate
63308
+ * } from './footer.js'
63353
63309
  */
63354
63310
 
63355
63311
  /**
@@ -63809,9 +63765,9 @@ function trimMarkdownSpaceStart(value) {
63809
63765
 
63810
63766
  ;// ../node_modules/mdast-util-to-hast/lib/index.js
63811
63767
  /**
63812
- * @typedef {import('hast').Nodes} HastNodes
63813
- * @typedef {import('mdast').Nodes} MdastNodes
63814
- * @typedef {import('./state.js').Options} Options
63768
+ * @import {Nodes as HastNodes} from 'hast'
63769
+ * @import {Nodes as MdastNodes} from 'mdast'
63770
+ * @import {Options} from './state.js'
63815
63771
  */
63816
63772
 
63817
63773
 
@@ -76350,7 +76306,7 @@ var preview_defaultUrlTransform = url => url;
76350
76306
  return /^[A-Za-z0-9]+$/.test(element.tagName);
76351
76307
  }
76352
76308
  };
76353
- if (skipHtml) {
76309
+ if (!skipHtml) {
76354
76310
  rehypePlugins.push(rehypeRaw);
76355
76311
  }
76356
76312
  var remarkPlugins = [remarkAlert, ...(other.remarkPlugins || []), remarkGfm];
@@ -76363,7 +76319,7 @@ var preview_defaultUrlTransform = url => url;
76363
76319
  className: cls,
76364
76320
  style: style,
76365
76321
  children: /*#__PURE__*/(0,jsx_runtime.jsx)(Markdown, _extends({}, customProps, other, {
76366
- skipHtml: skipHtml,
76322
+ skipHtml: !skipHtml,
76367
76323
  urlTransform: urlTransform || preview_defaultUrlTransform,
76368
76324
  rehypePlugins: pluginsFilter ? pluginsFilter('rehype', rehypePlugins) : rehypePlugins,
76369
76325
  remarkPlugins: pluginsFilter ? pluginsFilter('remark', remarkPlugins) : remarkPlugins,