@mdxeditor/editor 1.14.1 → 1.14.2

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.
@@ -1,10 +1,10 @@
1
1
  import { LexicalNode, RootNode as LexicalRootNode } from 'lexical';
2
2
  import * as Mdast from 'mdast';
3
- import { fromMarkdown } from 'mdast-util-from-markdown';
3
+ import { type Options } from 'mdast-util-from-markdown';
4
4
  import { ParseOptions } from 'micromark-util-types';
5
5
  import { IS_BOLD, IS_CODE, IS_ITALIC, IS_UNDERLINE } from './FormatConstants';
6
6
  /** @internal */
7
- export type MdastExtensions = NonNullable<Parameters<typeof fromMarkdown>[1]>['mdastExtensions'];
7
+ export type MdastExtensions = Options['mdastExtensions'];
8
8
  /**
9
9
  * A set of actions that can be used to modify the lexical tree while visiting the mdast tree.
10
10
  */
package/dist/style.css CHANGED
@@ -155,6 +155,9 @@
155
155
  .mdxeditor .cm-activeLine {
156
156
  background: transparent;
157
157
  }
158
+ .mdxeditor hr.selected[data-lexical-decorator=true] {
159
+ outline: 2px solid highlight;
160
+ }
158
161
  ._editorRoot_utjas_37 {
159
162
  --accentBase: var(--blue1);
160
163
  --accentBgSubtle: var(--blue2);
@@ -1478,7 +1481,7 @@ form._multiFieldForm_utjas_1101 ._formField_utjas_1107 label {
1478
1481
  }
1479
1482
 
1480
1483
 
1481
- :root, ._light-theme_7hn0e_1 {
1484
+ :root, ._light-theme_1xkrx_1 {
1482
1485
  --blue1: hsl(206, 100%, 99.2%);
1483
1486
  --blue2: hsl(210, 100%, 98.0%);
1484
1487
  --blue3: hsl(209, 100%, 96.5%);
@@ -1492,7 +1495,7 @@ form._multiFieldForm_utjas_1101 ._formField_utjas_1107 label {
1492
1495
  --blue11: hsl(211, 100%, 43.2%);
1493
1496
  --blue12: hsl(211, 100%, 15.0%);
1494
1497
  }
1495
- ._dark-theme_7hn0e_1 {
1498
+ ._dark-theme_1xkrx_1 {
1496
1499
  --blue1: hsl(212, 35.0%, 9.2%);
1497
1500
  --blue2: hsl(216, 50.0%, 11.8%);
1498
1501
  --blue3: hsl(214, 59.4%, 15.3%);
@@ -1506,7 +1509,7 @@ form._multiFieldForm_utjas_1101 ._formField_utjas_1107 label {
1506
1509
  --blue11: hsl(210, 100%, 66.1%);
1507
1510
  --blue12: hsl(206, 98.0%, 95.8%);
1508
1511
  }
1509
- :root, ._light-theme_7hn0e_1 {
1512
+ :root, ._light-theme_1xkrx_1 {
1510
1513
  --slate1: hsl(206, 30.0%, 98.8%);
1511
1514
  --slate2: hsl(210, 16.7%, 97.6%);
1512
1515
  --slate3: hsl(209, 13.3%, 95.3%);
@@ -1520,7 +1523,7 @@ form._multiFieldForm_utjas_1101 ._formField_utjas_1107 label {
1520
1523
  --slate11: hsl(206, 6.0%, 43.5%);
1521
1524
  --slate12: hsl(206, 24.0%, 9.0%);
1522
1525
  }
1523
- ._dark-theme_7hn0e_1 {
1526
+ ._dark-theme_1xkrx_1 {
1524
1527
  --slate1: hsl(200, 7.0%, 8.8%);
1525
1528
  --slate2: hsl(195, 7.1%, 11.0%);
1526
1529
  --slate3: hsl(197, 6.8%, 13.6%);
@@ -1534,7 +1537,7 @@ form._multiFieldForm_utjas_1101 ._formField_utjas_1107 label {
1534
1537
  --slate11: hsl(206, 6.0%, 63.0%);
1535
1538
  --slate12: hsl(210, 6.0%, 93.0%);
1536
1539
  }
1537
- :root, ._light-theme_7hn0e_1 {
1540
+ :root, ._light-theme_1xkrx_1 {
1538
1541
  --grass1: hsl(116, 50.0%, 98.9%);
1539
1542
  --grass2: hsl(120, 60.0%, 97.1%);
1540
1543
  --grass3: hsl(120, 53.6%, 94.8%);
@@ -1548,7 +1551,7 @@ form._multiFieldForm_utjas_1101 ._formField_utjas_1107 label {
1548
1551
  --grass11: hsl(133, 50.0%, 32.5%);
1549
1552
  --grass12: hsl(130, 30.0%, 14.9%);
1550
1553
  }
1551
- :root, ._light-theme_7hn0e_1 {
1554
+ :root, ._light-theme_1xkrx_1 {
1552
1555
  --cyan1: hsl(185, 60.0%, 98.7%);
1553
1556
  --cyan2: hsl(185, 73.3%, 97.1%);
1554
1557
  --cyan3: hsl(186, 70.2%, 94.4%);
@@ -1562,7 +1565,7 @@ form._multiFieldForm_utjas_1101 ._formField_utjas_1107 label {
1562
1565
  --cyan11: hsl(192, 85.0%, 31.0%);
1563
1566
  --cyan12: hsl(192, 88.0%, 12.5%);
1564
1567
  }
1565
- :root, ._light-theme_7hn0e_1 {
1568
+ :root, ._light-theme_1xkrx_1 {
1566
1569
  --amber1: hsl(39, 70.0%, 99.0%);
1567
1570
  --amber2: hsl(40, 100%, 96.5%);
1568
1571
  --amber3: hsl(44, 100%, 91.7%);
@@ -1576,7 +1579,7 @@ form._multiFieldForm_utjas_1101 ._formField_utjas_1107 label {
1576
1579
  --amber11: hsl(30, 100%, 34.0%);
1577
1580
  --amber12: hsl(20, 80.0%, 17.0%);
1578
1581
  }
1579
- :root, ._light-theme_7hn0e_1 {
1582
+ :root, ._light-theme_1xkrx_1 {
1580
1583
  --red1: hsl(359, 100%, 99.4%);
1581
1584
  --red2: hsl(359, 100%, 98.6%);
1582
1585
  --red3: hsl(360, 100%, 96.8%);
@@ -1590,55 +1593,55 @@ form._multiFieldForm_utjas_1101 ._formField_utjas_1107 label {
1590
1593
  --red11: hsl(358, 65.0%, 48.7%);
1591
1594
  --red12: hsl(354, 50.0%, 14.6%);
1592
1595
  }
1593
- ._bold_7hn0e_10 {
1596
+ ._bold_1xkrx_10 {
1594
1597
  font-weight: bold;
1595
1598
  }
1596
- ._italic_7hn0e_14 {
1599
+ ._italic_1xkrx_14 {
1597
1600
  font-style: italic;
1598
1601
  }
1599
- ._underline_7hn0e_18 {
1602
+ ._underline_1xkrx_18 {
1600
1603
  text-decoration: underline;
1601
1604
  }
1602
- ._bold_7hn0e_10 {
1603
- font-weight: 700
1605
+ ._bold_1xkrx_10 {
1606
+ font-weight: 700;
1604
1607
  }
1605
- ._italic_7hn0e_14 {
1606
- font-style: italic
1608
+ ._italic_1xkrx_14 {
1609
+ font-style: italic;
1607
1610
  }
1608
- ._underline_7hn0e_18 {
1609
- text-decoration: underline
1611
+ ._underline_1xkrx_18 {
1612
+ text-decoration: underline
1610
1613
  }
1611
- ._strikethrough_7hn0e_34 {
1612
- text-decoration: line-through
1614
+ ._strikethrough_1xkrx_34 {
1615
+ text-decoration: line-through
1613
1616
  }
1614
- ._underlineStrikethrough_7hn0e_38 {
1615
- text-decoration: underline line-through
1617
+ ._underlineStrikethrough_1xkrx_38 {
1618
+ text-decoration: underline line-through
1616
1619
  }
1617
- ._subscript_7hn0e_42 {
1618
- font-size: .8em;
1619
- vertical-align: sub!important
1620
+ ._subscript_1xkrx_42 {
1621
+ font-size: .8em;
1622
+ vertical-align: sub !important
1620
1623
  }
1621
- ._superscript_7hn0e_47 {
1622
- font-size: .8em;
1623
- vertical-align: super
1624
+ ._superscript_1xkrx_47 {
1625
+ font-size: .8em;
1626
+ vertical-align: super
1624
1627
  }
1625
- ._code_7hn0e_52 {
1626
- background-color: var(--baseBg);
1627
- padding: 1px .25rem;
1628
- font-family: var(--font-mono);
1629
- font-size: 94%
1628
+ ._code_1xkrx_52 {
1629
+ background-color: var(--baseBg);
1630
+ padding: 1px .25rem;
1631
+ font-family: var(--font-mono);
1632
+ font-size: 94%
1630
1633
  }
1631
- ._nestedListItem_7hn0e_59 {
1634
+ ._nestedListItem_1xkrx_59 {
1632
1635
  list-style: none;
1633
1636
  list-style-type: none;
1634
1637
  }
1635
- ._nestedListItem_7hn0e_59:before, ._nestedListItem_7hn0e_59:after {
1638
+ ._nestedListItem_1xkrx_59:before, ._nestedListItem_1xkrx_59:after {
1636
1639
  display: none;
1637
1640
  }
1638
- ._listitem_7hn0e_69 {
1641
+ ._listitem_1xkrx_69 {
1639
1642
  margin: var(--spacing-2) 0;
1640
1643
  }
1641
- ._listItemChecked_7hn0e_73, ._listItemUnchecked_7hn0e_74 {
1644
+ ._listItemChecked_1xkrx_73, ._listItemUnchecked_1xkrx_74 {
1642
1645
  position: relative;
1643
1646
  margin-left: 0;
1644
1647
  margin-right: 0;
@@ -1648,10 +1651,10 @@ form._multiFieldForm_utjas_1101 ._formField_utjas_1107 label {
1648
1651
  list-style-type: none;
1649
1652
  outline: none;
1650
1653
  }
1651
- ._listItemChecked_7hn0e_73 {
1654
+ ._listItemChecked_1xkrx_73 {
1652
1655
  text-decoration: line-through;
1653
1656
  }
1654
- ._listItemUnchecked_7hn0e_74:before, ._listItemChecked_7hn0e_73:before {
1657
+ ._listItemUnchecked_1xkrx_74:before, ._listItemChecked_1xkrx_73:before {
1655
1658
  content: '';
1656
1659
  width: var(--spacing-4);
1657
1660
  height: var(--spacing-4);
@@ -1662,25 +1665,25 @@ form._multiFieldForm_utjas_1101 ._formField_utjas_1107 label {
1662
1665
  background-size: cover;
1663
1666
  position: absolute;
1664
1667
  }
1665
- ._listItemUnchecked_7hn0e_74[dir='rtl']:before, ._listItemChecked_7hn0e_73[dir='rtl']:before {
1668
+ ._listItemUnchecked_1xkrx_74[dir='rtl']:before, ._listItemChecked_1xkrx_73[dir='rtl']:before {
1666
1669
  left: auto;
1667
1670
  right: 0;
1668
1671
  }
1669
- ._listItemUnchecked_7hn0e_74:focus:before, ._listItemChecked_7hn0e_73:focus:before {
1672
+ ._listItemUnchecked_1xkrx_74:focus:before, ._listItemChecked_1xkrx_73:focus:before {
1670
1673
  box-shadow: 0 0 0 2px var(--accentBgActive);
1671
1674
  border-radius: var(--radius-small);
1672
1675
  }
1673
- ._listItemUnchecked_7hn0e_74:before {
1676
+ ._listItemUnchecked_1xkrx_74:before {
1674
1677
  border: 1px solid var(--baseBorder);
1675
1678
  border-radius: var(--radius-small);
1676
1679
  }
1677
- ._listItemChecked_7hn0e_73:before {
1680
+ ._listItemChecked_1xkrx_73:before {
1678
1681
  border: 1px solid var(--accentBorder);
1679
1682
  border-radius: var(--radius-small);
1680
1683
  background-color: var(--accentSolid);
1681
1684
  background-repeat: no-repeat;
1682
1685
  }
1683
- ._listItemChecked_7hn0e_73:after {
1686
+ ._listItemChecked_1xkrx_73:after {
1684
1687
  content: '';
1685
1688
  cursor: pointer;
1686
1689
  border-color: var(--baseBase);
@@ -1695,36 +1698,36 @@ form._multiFieldForm_utjas_1101 ._formField_utjas_1107 label {
1695
1698
  transform: rotate(45deg);
1696
1699
  border-width: 0 var(--spacing-0_5) var(--spacing-0_5) 0;
1697
1700
  }
1698
- ._nestedListItem_7hn0e_59 {
1701
+ ._nestedListItem_1xkrx_59 {
1699
1702
  list-style-type: none;
1700
1703
  }
1701
- ._nestedListItem_7hn0e_59:before, ._nestedListItem_7hn0e_59:after {
1704
+ ._nestedListItem_1xkrx_59:before, ._nestedListItem_1xkrx_59:after {
1702
1705
  display: none;
1703
1706
  }
1704
- ._admonitionDanger_7hn0e_151, ._admonitionInfo_7hn0e_151, ._admonitionNote_7hn0e_151, ._admonitionTip_7hn0e_151, ._admonitionCaution_7hn0e_151 {
1707
+ ._admonitionDanger_1xkrx_151, ._admonitionInfo_1xkrx_152, ._admonitionNote_1xkrx_153, ._admonitionTip_1xkrx_154, ._admonitionCaution_1xkrx_155 {
1705
1708
  padding: var(--spacing-2);
1706
1709
  margin-top: var(--spacing-2);
1707
1710
  margin-bottom: var(--spacing-2);
1708
1711
  border-left: 3px solid var(--admonitionBorder);
1709
1712
  background-color: var(--admonitionBg);
1710
1713
  }
1711
- ._admonitionInfo_7hn0e_151 {
1714
+ ._admonitionInfo_1xkrx_152 {
1712
1715
  --admonitionBorder: var(--admonitionInfoBorder);
1713
1716
  --admonitionBg: var(--admonitionInfoBg);
1714
1717
  }
1715
- ._admonitionTip_7hn0e_151 {
1718
+ ._admonitionTip_1xkrx_154 {
1716
1719
  --admonitionBorder: var(--admonitionTipBorder);
1717
1720
  --admonitionBg: var(--admonitionTipBg);
1718
1721
  }
1719
- ._admonitionCaution_7hn0e_151 {
1722
+ ._admonitionCaution_1xkrx_155 {
1720
1723
  --admonitionBorder: var(--admonitionCautionBorder);
1721
1724
  --admonitionBg: var(--admonitionCautionBg);
1722
1725
  }
1723
- ._admonitionDanger_7hn0e_151 {
1726
+ ._admonitionDanger_1xkrx_151 {
1724
1727
  --admonitionBorder: var(--admonitionDangerBorder);
1725
1728
  --admonitionBg: var(--admonitionDangerBg);
1726
1729
  }
1727
- ._admonitionNote_7hn0e_151 {
1730
+ ._admonitionNote_1xkrx_153 {
1728
1731
  --admonitionBorder: var(--admonitionNoteBorder);
1729
1732
  --admonitionBg: var(--admonitionNoteBg);
1730
1733
  }
@@ -1,22 +1,22 @@
1
- const lightTheme = "_light-theme_7hn0e_1";
2
- const darkTheme = "_dark-theme_7hn0e_1";
3
- const bold = "_bold_7hn0e_10";
4
- const italic = "_italic_7hn0e_14";
5
- const underline = "_underline_7hn0e_18";
6
- const strikethrough = "_strikethrough_7hn0e_34";
7
- const underlineStrikethrough = "_underlineStrikethrough_7hn0e_38";
8
- const subscript = "_subscript_7hn0e_42";
9
- const superscript = "_superscript_7hn0e_47";
10
- const code = "_code_7hn0e_52";
11
- const nestedListItem = "_nestedListItem_7hn0e_59";
12
- const listitem = "_listitem_7hn0e_69";
13
- const listItemChecked = "_listItemChecked_7hn0e_73";
14
- const listItemUnchecked = "_listItemUnchecked_7hn0e_74";
15
- const admonitionDanger = "_admonitionDanger_7hn0e_151";
16
- const admonitionInfo = "_admonitionInfo_7hn0e_151";
17
- const admonitionNote = "_admonitionNote_7hn0e_151";
18
- const admonitionTip = "_admonitionTip_7hn0e_151";
19
- const admonitionCaution = "_admonitionCaution_7hn0e_151";
1
+ const lightTheme = "_light-theme_1xkrx_1";
2
+ const darkTheme = "_dark-theme_1xkrx_1";
3
+ const bold = "_bold_1xkrx_10";
4
+ const italic = "_italic_1xkrx_14";
5
+ const underline = "_underline_1xkrx_18";
6
+ const strikethrough = "_strikethrough_1xkrx_34";
7
+ const underlineStrikethrough = "_underlineStrikethrough_1xkrx_38";
8
+ const subscript = "_subscript_1xkrx_42";
9
+ const superscript = "_superscript_1xkrx_47";
10
+ const code = "_code_1xkrx_52";
11
+ const nestedListItem = "_nestedListItem_1xkrx_59";
12
+ const listitem = "_listitem_1xkrx_69";
13
+ const listItemChecked = "_listItemChecked_1xkrx_73";
14
+ const listItemUnchecked = "_listItemUnchecked_1xkrx_74";
15
+ const admonitionDanger = "_admonitionDanger_1xkrx_151";
16
+ const admonitionInfo = "_admonitionInfo_1xkrx_152";
17
+ const admonitionNote = "_admonitionNote_1xkrx_153";
18
+ const admonitionTip = "_admonitionTip_1xkrx_154";
19
+ const admonitionCaution = "_admonitionCaution_1xkrx_155";
20
20
  const styles = {
21
21
  lightTheme,
22
22
  darkTheme,
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "private": false,
10
10
  "sideEffects": false,
11
11
  "type": "module",
12
- "version": "1.14.1",
12
+ "version": "1.14.2",
13
13
  "description": "React component for rich text markdown editing",
14
14
  "scripts": {
15
15
  "build": "vite build",