@contentful/field-editor-rich-text 4.5.0 → 4.7.0

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 (157) hide show
  1. package/dist/cjs/RichTextEditor.js +11 -11
  2. package/dist/cjs/SdkProvider.js +2 -1
  3. package/dist/cjs/Toolbar/_tests_/toolbar.test.js +12 -12
  4. package/dist/cjs/Toolbar/components/ButtonRedo.js +3 -3
  5. package/dist/cjs/Toolbar/components/ButtonUndo.js +3 -3
  6. package/dist/cjs/Toolbar/components/EmbedEntityWidget.js +6 -6
  7. package/dist/cjs/Toolbar/components/EmbeddedEntityDropdownButton.js +5 -5
  8. package/dist/cjs/Toolbar/components/StickyToolbarWrapper.js +1 -1
  9. package/dist/cjs/Toolbar/index.js +28 -28
  10. package/dist/cjs/dialogs/HypelinkDialog/HyperlinkDialog.js +20 -20
  11. package/dist/cjs/dialogs/openRichTextDialog.js +1 -1
  12. package/dist/cjs/dialogs/renderRichTextDialog.js +2 -2
  13. package/dist/cjs/helpers/__tests__/removeInternalMarks.test.js +8 -8
  14. package/dist/cjs/plugins/Break/createExitBreakPlugin.test.js +1 -1
  15. package/dist/cjs/plugins/Break/createSoftBreakPlugin.test.js +1 -1
  16. package/dist/cjs/plugins/CommandPalette/components/CommandList.js +26 -26
  17. package/dist/cjs/plugins/CommandPalette/components/CommandPrompt.js +2 -2
  18. package/dist/cjs/plugins/EmbeddedEntityBlock/LinkedEntityBlock.js +3 -3
  19. package/dist/cjs/plugins/EmbeddedEntityInline/FetchingWrappedInlineEntryCard.js +11 -11
  20. package/dist/cjs/plugins/EmbeddedEntityInline/LinkedEntityInline.js +2 -2
  21. package/dist/cjs/plugins/EmbeddedResourceBlock/LinkedResourceBlock.js +2 -2
  22. package/dist/cjs/plugins/EmbeddedResourceInline/FetchingWrappedResourceInlineCard.js +5 -5
  23. package/dist/cjs/plugins/EmbeddedResourceInline/LinkedResourceInline.js +2 -2
  24. package/dist/cjs/plugins/Heading/__tests__/createHeadingPlugin.test.js +31 -31
  25. package/dist/cjs/plugins/Heading/components/Heading.js +7 -7
  26. package/dist/cjs/plugins/Heading/components/ToolbarHeadingButton.js +6 -6
  27. package/dist/cjs/plugins/Hr/index.js +5 -5
  28. package/dist/cjs/plugins/Hyperlink/HyperlinkModal.js +19 -19
  29. package/dist/cjs/plugins/Hyperlink/__tests__/createHyperlinkPlugin.test.js +7 -7
  30. package/dist/cjs/plugins/Hyperlink/components/EntityHyperlink.js +3 -3
  31. package/dist/cjs/plugins/Hyperlink/components/LinkPopover.js +13 -13
  32. package/dist/cjs/plugins/Hyperlink/components/ResourceHyperlink.js +3 -3
  33. package/dist/cjs/plugins/Hyperlink/components/ToolbarHyperlinkButton.js +2 -2
  34. package/dist/cjs/plugins/Hyperlink/components/UrlHyperlink.js +3 -3
  35. package/dist/cjs/plugins/List/__tests__/createListPlugin.test.js +12 -12
  36. package/dist/cjs/plugins/List/__tests__/insertListBreak.test.js +23 -23
  37. package/dist/cjs/plugins/List/__tests__/insertListFragment.test.js +20 -20
  38. package/dist/cjs/plugins/List/components/List.js +1 -1
  39. package/dist/cjs/plugins/List/components/ListItem.js +1 -1
  40. package/dist/cjs/plugins/List/components/ToolbarListButton.js +3 -3
  41. package/dist/cjs/plugins/List/transforms/moveListItems.test.js +12 -12
  42. package/dist/cjs/plugins/List/transforms/toggleList.spec.js +18 -18
  43. package/dist/cjs/plugins/Marks/Bold.js +2 -2
  44. package/dist/cjs/plugins/Marks/Code.js +2 -2
  45. package/dist/cjs/plugins/Marks/Italic.js +2 -2
  46. package/dist/cjs/plugins/Marks/Strikethrough.js +6 -6
  47. package/dist/cjs/plugins/Marks/Subscript.js +4 -4
  48. package/dist/cjs/plugins/Marks/Superscript.js +4 -4
  49. package/dist/cjs/plugins/Marks/Underline.js +2 -2
  50. package/dist/cjs/plugins/Marks/components/MarkToolbarButton.js +2 -2
  51. package/dist/cjs/plugins/Normalizer/createNormalizerPlugin.test.js +8 -8
  52. package/dist/cjs/plugins/Paragraph/Paragraph.js +1 -1
  53. package/dist/cjs/plugins/Paragraph/__tests__/createParagraphPlugin.test.js +31 -31
  54. package/dist/cjs/plugins/Quote/__test__/createQuotePlugin.test.js +20 -20
  55. package/dist/cjs/plugins/Quote/components/Quote.js +1 -1
  56. package/dist/cjs/plugins/Quote/components/ToolbarQuoteButton.js +2 -2
  57. package/dist/cjs/plugins/Table/__tests__/createTablePlugin.test.js +21 -21
  58. package/dist/cjs/plugins/Table/__tests__/helpers.test.js +2 -2
  59. package/dist/cjs/plugins/Table/components/Cell.js +2 -2
  60. package/dist/cjs/plugins/Table/components/HeaderCell.js +2 -2
  61. package/dist/cjs/plugins/Table/components/Row.js +1 -1
  62. package/dist/cjs/plugins/Table/components/Table.js +3 -3
  63. package/dist/cjs/plugins/Table/components/TableActions.js +11 -11
  64. package/dist/cjs/plugins/Table/components/ToolbarButton.js +2 -2
  65. package/dist/cjs/plugins/Text/__tests__/createTextPlugin.test.js +14 -14
  66. package/dist/cjs/plugins/shared/EmbeddedBlockToolbarIcon.js +4 -4
  67. package/dist/cjs/plugins/shared/EmbeddedInlineToolbarIcon.js +4 -4
  68. package/dist/cjs/plugins/shared/FetchingWrappedAssetCard.js +6 -6
  69. package/dist/cjs/plugins/shared/FetchingWrappedEntryCard.js +6 -6
  70. package/dist/cjs/plugins/shared/FetchingWrappedResourceCard.js +6 -6
  71. package/dist/cjs/plugins/shared/LinkedBlockWrapper.js +2 -2
  72. package/dist/cjs/plugins/shared/LinkedInlineWrapper.js +2 -2
  73. package/dist/cjs/plugins/shared/ResourceNewBadge.js +1 -1
  74. package/dist/cjs/plugins/shared/ToolbarButton.js +2 -2
  75. package/dist/cjs/plugins/shared/__tests__/FetchingWrappedAssetCard.test.js +2 -2
  76. package/dist/cjs/plugins/shared/__tests__/FetchingWrappedEntryCard.test.js +2 -2
  77. package/dist/cjs/plugins/shared/__tests__/FetchingWrappedResourceCard.test.js +2 -2
  78. package/dist/esm/RichTextEditor.js +11 -11
  79. package/dist/esm/SdkProvider.js +2 -1
  80. package/dist/esm/Toolbar/_tests_/toolbar.test.js +12 -12
  81. package/dist/esm/Toolbar/components/ButtonRedo.js +3 -3
  82. package/dist/esm/Toolbar/components/ButtonUndo.js +3 -3
  83. package/dist/esm/Toolbar/components/EmbedEntityWidget.js +6 -6
  84. package/dist/esm/Toolbar/components/EmbeddedEntityDropdownButton.js +5 -5
  85. package/dist/esm/Toolbar/components/StickyToolbarWrapper.js +1 -1
  86. package/dist/esm/Toolbar/index.js +30 -30
  87. package/dist/esm/dialogs/HypelinkDialog/HyperlinkDialog.js +20 -20
  88. package/dist/esm/dialogs/openRichTextDialog.js +1 -1
  89. package/dist/esm/dialogs/renderRichTextDialog.js +2 -2
  90. package/dist/esm/helpers/__tests__/removeInternalMarks.test.js +8 -8
  91. package/dist/esm/plugins/Break/createExitBreakPlugin.test.js +1 -1
  92. package/dist/esm/plugins/Break/createSoftBreakPlugin.test.js +1 -1
  93. package/dist/esm/plugins/CommandPalette/components/CommandList.js +26 -26
  94. package/dist/esm/plugins/CommandPalette/components/CommandPrompt.js +2 -2
  95. package/dist/esm/plugins/EmbeddedEntityBlock/LinkedEntityBlock.js +3 -3
  96. package/dist/esm/plugins/EmbeddedEntityInline/FetchingWrappedInlineEntryCard.js +11 -11
  97. package/dist/esm/plugins/EmbeddedEntityInline/LinkedEntityInline.js +2 -2
  98. package/dist/esm/plugins/EmbeddedResourceBlock/LinkedResourceBlock.js +2 -2
  99. package/dist/esm/plugins/EmbeddedResourceInline/FetchingWrappedResourceInlineCard.js +5 -5
  100. package/dist/esm/plugins/EmbeddedResourceInline/LinkedResourceInline.js +2 -2
  101. package/dist/esm/plugins/Heading/__tests__/createHeadingPlugin.test.js +31 -31
  102. package/dist/esm/plugins/Heading/components/Heading.js +7 -7
  103. package/dist/esm/plugins/Heading/components/ToolbarHeadingButton.js +6 -6
  104. package/dist/esm/plugins/Hr/index.js +5 -5
  105. package/dist/esm/plugins/Hyperlink/HyperlinkModal.js +19 -19
  106. package/dist/esm/plugins/Hyperlink/__tests__/createHyperlinkPlugin.test.js +7 -7
  107. package/dist/esm/plugins/Hyperlink/components/EntityHyperlink.js +3 -3
  108. package/dist/esm/plugins/Hyperlink/components/LinkPopover.js +13 -13
  109. package/dist/esm/plugins/Hyperlink/components/ResourceHyperlink.js +3 -3
  110. package/dist/esm/plugins/Hyperlink/components/ToolbarHyperlinkButton.js +2 -2
  111. package/dist/esm/plugins/Hyperlink/components/UrlHyperlink.js +3 -3
  112. package/dist/esm/plugins/List/__tests__/createListPlugin.test.js +12 -12
  113. package/dist/esm/plugins/List/__tests__/insertListBreak.test.js +23 -23
  114. package/dist/esm/plugins/List/__tests__/insertListFragment.test.js +20 -20
  115. package/dist/esm/plugins/List/components/List.js +1 -1
  116. package/dist/esm/plugins/List/components/ListItem.js +1 -1
  117. package/dist/esm/plugins/List/components/ToolbarListButton.js +3 -3
  118. package/dist/esm/plugins/List/transforms/moveListItems.test.js +12 -12
  119. package/dist/esm/plugins/List/transforms/toggleList.spec.js +18 -18
  120. package/dist/esm/plugins/Marks/Bold.js +2 -2
  121. package/dist/esm/plugins/Marks/Code.js +2 -2
  122. package/dist/esm/plugins/Marks/Italic.js +2 -2
  123. package/dist/esm/plugins/Marks/Strikethrough.js +6 -6
  124. package/dist/esm/plugins/Marks/Subscript.js +4 -4
  125. package/dist/esm/plugins/Marks/Superscript.js +4 -4
  126. package/dist/esm/plugins/Marks/Underline.js +2 -2
  127. package/dist/esm/plugins/Marks/components/MarkToolbarButton.js +2 -2
  128. package/dist/esm/plugins/Marks/index.js +2 -2
  129. package/dist/esm/plugins/Normalizer/createNormalizerPlugin.test.js +8 -8
  130. package/dist/esm/plugins/Paragraph/Paragraph.js +1 -1
  131. package/dist/esm/plugins/Paragraph/__tests__/createParagraphPlugin.test.js +31 -31
  132. package/dist/esm/plugins/Quote/__test__/createQuotePlugin.test.js +20 -20
  133. package/dist/esm/plugins/Quote/components/Quote.js +1 -1
  134. package/dist/esm/plugins/Quote/components/ToolbarQuoteButton.js +2 -2
  135. package/dist/esm/plugins/Table/__tests__/createTablePlugin.test.js +21 -21
  136. package/dist/esm/plugins/Table/__tests__/helpers.test.js +2 -2
  137. package/dist/esm/plugins/Table/components/Cell.js +2 -2
  138. package/dist/esm/plugins/Table/components/HeaderCell.js +2 -2
  139. package/dist/esm/plugins/Table/components/Row.js +1 -1
  140. package/dist/esm/plugins/Table/components/Table.js +3 -3
  141. package/dist/esm/plugins/Table/components/TableActions.js +11 -11
  142. package/dist/esm/plugins/Table/components/ToolbarButton.js +2 -2
  143. package/dist/esm/plugins/Text/__tests__/createTextPlugin.test.js +14 -14
  144. package/dist/esm/plugins/shared/EmbeddedBlockToolbarIcon.js +4 -4
  145. package/dist/esm/plugins/shared/EmbeddedInlineToolbarIcon.js +4 -4
  146. package/dist/esm/plugins/shared/FetchingWrappedAssetCard.js +6 -6
  147. package/dist/esm/plugins/shared/FetchingWrappedEntryCard.js +6 -6
  148. package/dist/esm/plugins/shared/FetchingWrappedResourceCard.js +6 -6
  149. package/dist/esm/plugins/shared/LinkedBlockWrapper.js +2 -2
  150. package/dist/esm/plugins/shared/LinkedInlineWrapper.js +2 -2
  151. package/dist/esm/plugins/shared/ResourceNewBadge.js +1 -1
  152. package/dist/esm/plugins/shared/ToolbarButton.js +2 -2
  153. package/dist/esm/plugins/shared/__tests__/FetchingWrappedAssetCard.test.js +2 -2
  154. package/dist/esm/plugins/shared/__tests__/FetchingWrappedEntryCard.test.js +2 -2
  155. package/dist/esm/plugins/shared/__tests__/FetchingWrappedResourceCard.test.js +2 -2
  156. package/dist/esm/test-utils/jsx.js +1 -1
  157. package/package.json +6 -4
@@ -1,40 +1,40 @@
1
1
  import { assertOutput, jsx } from '../../../test-utils';
2
2
  describe('normalization', ()=>{
3
3
  it('wraps orphaned list items in a list', ()=>{
4
- const input = jsx("editor", null, jsx("hli", null, jsx("hp", null, "Item")), jsx("hp", null));
5
- const expected = jsx("editor", null, jsx("hul", null, jsx("hli", null, jsx("hp", null, "Item"))), jsx("hp", null, jsx("htext", null)));
4
+ const input = /*#__PURE__*/ jsx("editor", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "Item")), /*#__PURE__*/ jsx("hp", null));
5
+ const expected = /*#__PURE__*/ jsx("editor", null, /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "Item"))), /*#__PURE__*/ jsx("hp", null, /*#__PURE__*/ jsx("htext", null)));
6
6
  assertOutput({
7
7
  input,
8
8
  expected
9
9
  });
10
10
  });
11
11
  it('adds empty paragraph to empty list items', ()=>{
12
- const input = jsx("editor", null, jsx("hul", null, jsx("hli", null)), jsx("hp", null));
13
- const expected = jsx("editor", null, jsx("hul", null, jsx("hli", null, jsx("hp", null, jsx("htext", null)))), jsx("hp", null, jsx("htext", null)));
12
+ const input = /*#__PURE__*/ jsx("editor", null, /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null)), /*#__PURE__*/ jsx("hp", null));
13
+ const expected = /*#__PURE__*/ jsx("editor", null, /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, /*#__PURE__*/ jsx("htext", null)))), /*#__PURE__*/ jsx("hp", null, /*#__PURE__*/ jsx("htext", null)));
14
14
  assertOutput({
15
15
  input,
16
16
  expected
17
17
  });
18
18
  });
19
19
  it('replaces invalid list items with text', ()=>{
20
- const input = jsx("editor", null, jsx("hul", null, jsx("hli", null, jsx("hp", null, "Item"), jsx("htd", null, jsx("hp", null, jsx("htext", {
20
+ const input = /*#__PURE__*/ jsx("editor", null, /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "Item"), /*#__PURE__*/ jsx("htd", null, /*#__PURE__*/ jsx("hp", null, /*#__PURE__*/ jsx("htext", {
21
21
  bold: true
22
- }, "bold text"))), jsx("htd", null, jsx("hp", null, "Take a look at this ", jsx("hlink", {
22
+ }, "bold text"))), /*#__PURE__*/ jsx("htd", null, /*#__PURE__*/ jsx("hp", null, "Take a look at this ", /*#__PURE__*/ jsx("hlink", {
23
23
  uri: "https://google.com"
24
- }, "link"))))), jsx("hp", null));
25
- const expected = jsx("editor", null, jsx("hul", null, jsx("hli", null, jsx("hp", null, "Item"), jsx("hp", null, jsx("htext", {
24
+ }, "link"))))), /*#__PURE__*/ jsx("hp", null));
25
+ const expected = /*#__PURE__*/ jsx("editor", null, /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "Item"), /*#__PURE__*/ jsx("hp", null, /*#__PURE__*/ jsx("htext", {
26
26
  bold: true
27
- }, "bold text")), jsx("hp", null, "Take a look at this ", jsx("hlink", {
27
+ }, "bold text")), /*#__PURE__*/ jsx("hp", null, "Take a look at this ", /*#__PURE__*/ jsx("hlink", {
28
28
  uri: "https://google.com"
29
- }, "link"), jsx("htext", null)))), jsx("hp", null, jsx("htext", null)));
29
+ }, "link"), /*#__PURE__*/ jsx("htext", null)))), /*#__PURE__*/ jsx("hp", null, /*#__PURE__*/ jsx("htext", null)));
30
30
  assertOutput({
31
31
  input,
32
32
  expected
33
33
  });
34
34
  });
35
35
  it('replaces list items with nested lists as a first child', ()=>{
36
- const input = jsx("editor", null, jsx("hul", null, jsx("hli", null, jsx("hp", null, "Item 1"), jsx("hul", null, jsx("hli", null, jsx("hp", null, "Item 1.1")))), jsx("hli", null, jsx("hul", null, jsx("hli", null, jsx("hp", null, "Item 2.1"), jsx("hul", null, jsx("hli", null, jsx("hp", null, "Item 2.1.1")))), jsx("hli", null, jsx("hp", null, "Item 2.2"))))), jsx("hp", null, jsx("htext", null)));
37
- const expected = jsx("editor", null, jsx("hul", null, jsx("hli", null, jsx("hp", null, "Item 1"), jsx("hul", null, jsx("hli", null, jsx("hp", null, "Item 1.1")))), jsx("hli", null, jsx("hp", null, "Item 2.1"), jsx("hul", null, jsx("hli", null, jsx("hp", null, "Item 2.1.1")))), jsx("hli", null, jsx("hp", null, "Item 2.2"))), jsx("hp", null, jsx("htext", null)));
36
+ const input = /*#__PURE__*/ jsx("editor", null, /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "Item 1"), /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "Item 1.1")))), /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "Item 2.1"), /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "Item 2.1.1")))), /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "Item 2.2"))))), /*#__PURE__*/ jsx("hp", null, /*#__PURE__*/ jsx("htext", null)));
37
+ const expected = /*#__PURE__*/ jsx("editor", null, /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "Item 1"), /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "Item 1.1")))), /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "Item 2.1"), /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "Item 2.1.1")))), /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "Item 2.2"))), /*#__PURE__*/ jsx("hp", null, /*#__PURE__*/ jsx("htext", null)));
38
38
  assertOutput({
39
39
  input,
40
40
  expected
@@ -3,61 +3,61 @@ describe('insert line break', ()=>{
3
3
  const tests = [
4
4
  {
5
5
  title: 'at the start of a li',
6
- input: jsx("hul", null, jsx("hli", null, jsx("hp", null, jsx("cursor", null), "p1"))),
7
- expected: jsx("hul", null, jsx("hli", null, jsx("hp", null, jsx("cursor", null))), jsx("hli", null, jsx("hp", null, "p1")))
6
+ input: /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, /*#__PURE__*/ jsx("cursor", null), "p1"))),
7
+ expected: /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, /*#__PURE__*/ jsx("cursor", null))), /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "p1")))
8
8
  },
9
9
  {
10
10
  title: 'at the end of a li',
11
- input: jsx("hul", null, jsx("hli", null, jsx("hp", null, "p1", jsx("cursor", null)))),
12
- expected: jsx("hul", null, jsx("hli", null, jsx("hp", null, "p1")), jsx("hli", null, jsx("hp", null, jsx("cursor", null))))
11
+ input: /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "p1", /*#__PURE__*/ jsx("cursor", null)))),
12
+ expected: /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "p1")), /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, /*#__PURE__*/ jsx("cursor", null))))
13
13
  },
14
14
  {
15
15
  title: 'at the middle of a li',
16
- input: jsx("hul", null, jsx("hli", null, jsx("hp", null, "split ", jsx("cursor", null), "me"))),
17
- expected: jsx("hul", null, jsx("hli", null, jsx("hp", null, "split ")), jsx("hli", null, jsx("hp", null, jsx("cursor", null), "me")))
16
+ input: /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "split ", /*#__PURE__*/ jsx("cursor", null), "me"))),
17
+ expected: /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "split ")), /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, /*#__PURE__*/ jsx("cursor", null), "me")))
18
18
  },
19
19
  {
20
20
  title: 'at the start of a li with multiple p',
21
- input: jsx("hul", null, jsx("hli", null, jsx("hp", null, jsx("cursor", null), "p1"), jsx("hp", null, "p2"))),
22
- expected: jsx("hul", null, jsx("hli", null, jsx("hp", null, jsx("cursor", null))), jsx("hli", null, jsx("hp", null, "p1"), jsx("hp", null, "p2")))
21
+ input: /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, /*#__PURE__*/ jsx("cursor", null), "p1"), /*#__PURE__*/ jsx("hp", null, "p2"))),
22
+ expected: /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, /*#__PURE__*/ jsx("cursor", null))), /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "p1"), /*#__PURE__*/ jsx("hp", null, "p2")))
23
23
  },
24
24
  {
25
25
  title: 'at the start of the second p of a li',
26
- input: jsx("hul", null, jsx("hli", null, jsx("hp", null, "p1"), jsx("hp", null, jsx("cursor", null), "p2"))),
27
- expected: jsx("hul", null, jsx("hli", null, jsx("hp", null, "p1")), jsx("hli", null, jsx("hp", null, jsx("cursor", null)), jsx("hp", null, "p2")))
26
+ input: /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "p1"), /*#__PURE__*/ jsx("hp", null, /*#__PURE__*/ jsx("cursor", null), "p2"))),
27
+ expected: /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "p1")), /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, /*#__PURE__*/ jsx("cursor", null)), /*#__PURE__*/ jsx("hp", null, "p2")))
28
28
  },
29
29
  {
30
30
  title: 'at the end of a li with multiple p',
31
- input: jsx("hul", null, jsx("hli", null, jsx("hp", null, "p1"), jsx("hp", null, "p2", jsx("cursor", null)))),
32
- expected: jsx("hul", null, jsx("hli", null, jsx("hp", null, "p1"), jsx("hp", null, "p2")), jsx("hli", null, jsx("hp", null, jsx("cursor", null))))
31
+ input: /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "p1"), /*#__PURE__*/ jsx("hp", null, "p2", /*#__PURE__*/ jsx("cursor", null)))),
32
+ expected: /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "p1"), /*#__PURE__*/ jsx("hp", null, "p2")), /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, /*#__PURE__*/ jsx("cursor", null))))
33
33
  },
34
34
  {
35
35
  title: 'at the middle of a li with multiple p',
36
- input: jsx("hul", null, jsx("hli", null, jsx("hp", null, "split ", jsx("cursor", null), "me"), jsx("hp", null, "move me"))),
37
- expected: jsx("hul", null, jsx("hli", null, jsx("hp", null, "split ")), jsx("hli", null, jsx("hp", null, jsx("cursor", null), "me"), jsx("hp", null, "move me")))
36
+ input: /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "split ", /*#__PURE__*/ jsx("cursor", null), "me"), /*#__PURE__*/ jsx("hp", null, "move me"))),
37
+ expected: /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "split ")), /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, /*#__PURE__*/ jsx("cursor", null), "me"), /*#__PURE__*/ jsx("hp", null, "move me")))
38
38
  },
39
39
  {
40
40
  title: 'at the start of a li with heading',
41
- input: jsx("hul", null, jsx("hli", null, jsx("hh1", null, jsx("cursor", null), "p1"))),
42
- expected: jsx("hul", null, jsx("hli", null, jsx("hp", null, jsx("cursor", null))), jsx("hli", null, jsx("hh1", null, "p1")))
41
+ input: /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hh1", null, /*#__PURE__*/ jsx("cursor", null), "p1"))),
42
+ expected: /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, /*#__PURE__*/ jsx("cursor", null))), /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hh1", null, "p1")))
43
43
  },
44
44
  {
45
45
  title: 'at the end of a li with heading',
46
- input: jsx("hul", null, jsx("hli", null, jsx("hh1", null, "p1", jsx("cursor", null)))),
47
- expected: jsx("hul", null, jsx("hli", null, jsx("hh1", null, "p1")), jsx("hli", null, jsx("hp", null, jsx("cursor", null))))
46
+ input: /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hh1", null, "p1", /*#__PURE__*/ jsx("cursor", null)))),
47
+ expected: /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hh1", null, "p1")), /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, /*#__PURE__*/ jsx("cursor", null))))
48
48
  },
49
49
  {
50
50
  title: 'at the middle of a li with heading',
51
- input: jsx("hul", null, jsx("hli", null, jsx("hh1", null, "split ", jsx("cursor", null), "me"))),
52
- expected: jsx("hul", null, jsx("hli", null, jsx("hh1", null, "split ")), jsx("hli", null, jsx("hh1", null, jsx("cursor", null), "me")))
51
+ input: /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hh1", null, "split ", /*#__PURE__*/ jsx("cursor", null), "me"))),
52
+ expected: /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hh1", null, "split ")), /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hh1", null, /*#__PURE__*/ jsx("cursor", null), "me")))
53
53
  },
54
54
  {
55
55
  title: 'at a li with nested list',
56
- input: jsx("hul", null, jsx("hli", null, jsx("hp", null, "item 1")), jsx("hli", null, jsx("hp", null, "item 2", jsx("cursor", null)), jsx("hul", null, jsx("hli", null, jsx("hp", null, "sub list"))))),
57
- expected: jsx("hul", null, jsx("hli", null, jsx("hp", null, "item 1")), jsx("hli", null, jsx("hp", null, "item 2")), jsx("hli", null, jsx("hp", null, jsx("cursor", null)), jsx("hul", null, jsx("hli", null, jsx("hp", null, "sub list")))))
56
+ input: /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "item 1")), /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "item 2", /*#__PURE__*/ jsx("cursor", null)), /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "sub list"))))),
57
+ expected: /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "item 1")), /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "item 2")), /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, /*#__PURE__*/ jsx("cursor", null)), /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "sub list")))))
58
58
  }
59
59
  ];
60
- const render = (children)=>jsx("editor", null, children, jsx("hp", null, jsx("htext", null)));
60
+ const render = (children)=>/*#__PURE__*/ jsx("editor", null, children, /*#__PURE__*/ jsx("hp", null, /*#__PURE__*/ jsx("htext", null)));
61
61
  for (const t of tests){
62
62
  test(t.title, ()=>{
63
63
  const { editor } = createTestEditor({
@@ -3,48 +3,48 @@ describe('insert fragment', ()=>{
3
3
  const tests = [
4
4
  {
5
5
  title: 'text wrapped in li > p',
6
- input: jsx("hul", null, jsx("hli", null, jsx("hp", null, "hello ", jsx("cursor", null)))),
7
- fragment: jsx("fragment", null, jsx("hli", null, jsx("hp", null, "world"))),
8
- expected: jsx("hul", null, jsx("hli", null, jsx("hp", null, "hello world")))
6
+ input: /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "hello ", /*#__PURE__*/ jsx("cursor", null)))),
7
+ fragment: /*#__PURE__*/ jsx("fragment", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "world"))),
8
+ expected: /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "hello world")))
9
9
  },
10
10
  {
11
11
  title: 'text wrapped in li > h*',
12
- input: jsx("hul", null, jsx("hli", null, jsx("hp", null, "hello ", jsx("cursor", null)))),
13
- fragment: jsx("fragment", null, jsx("hli", null, jsx("hh1", null, "world"))),
14
- expected: jsx("hul", null, jsx("hli", null, jsx("hp", null, "hello world")))
12
+ input: /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "hello ", /*#__PURE__*/ jsx("cursor", null)))),
13
+ fragment: /*#__PURE__*/ jsx("fragment", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hh1", null, "world"))),
14
+ expected: /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "hello world")))
15
15
  },
16
16
  {
17
17
  title: 'single li with only asset card',
18
- input: jsx("hul", null, jsx("hli", null, jsx("hp", null, "hello", jsx("cursor", null), "world"))),
19
- fragment: jsx("fragment", null, jsx("hli", null, jsx("hembed", {
18
+ input: /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "hello", /*#__PURE__*/ jsx("cursor", null), "world"))),
19
+ fragment: /*#__PURE__*/ jsx("fragment", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hembed", {
20
20
  type: "Asset",
21
21
  id: "asset-id"
22
22
  }))),
23
- expected: jsx("hul", null, jsx("hli", null, jsx("hp", null, "hello"), jsx("hembed", {
23
+ expected: /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "hello"), /*#__PURE__*/ jsx("hembed", {
24
24
  type: "Asset",
25
25
  id: "asset-id"
26
- }), jsx("hp", null, "world")))
26
+ }), /*#__PURE__*/ jsx("hp", null, "world")))
27
27
  },
28
28
  {
29
29
  title: 'two paragraphs',
30
- input: jsx("hul", null, jsx("hli", null, jsx("hp", null, "hello ", jsx("cursor", null)))),
31
- fragment: jsx("fragment", null, jsx("hp", null, "world"), jsx("hp", null, "line 2")),
32
- expected: jsx("hul", null, jsx("hli", null, jsx("hp", null, "hello world"), jsx("hp", null, "line 2")))
30
+ input: /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "hello ", /*#__PURE__*/ jsx("cursor", null)))),
31
+ fragment: /*#__PURE__*/ jsx("fragment", null, /*#__PURE__*/ jsx("hp", null, "world"), /*#__PURE__*/ jsx("hp", null, "line 2")),
32
+ expected: /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "hello world"), /*#__PURE__*/ jsx("hp", null, "line 2")))
33
33
  },
34
34
  {
35
35
  title: 'two headings',
36
- input: jsx("hul", null, jsx("hli", null, jsx("hp", null, "hello ", jsx("cursor", null)))),
37
- fragment: jsx("fragment", null, jsx("hh1", null, "world"), jsx("hh1", null, "line 2")),
38
- expected: jsx("hul", null, jsx("hli", null, jsx("hp", null, "hello world"), jsx("hh1", null, "line 2")))
36
+ input: /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "hello ", /*#__PURE__*/ jsx("cursor", null)))),
37
+ fragment: /*#__PURE__*/ jsx("fragment", null, /*#__PURE__*/ jsx("hh1", null, "world"), /*#__PURE__*/ jsx("hh1", null, "line 2")),
38
+ expected: /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "hello world"), /*#__PURE__*/ jsx("hh1", null, "line 2")))
39
39
  },
40
40
  {
41
41
  title: 'two paragraphs wrapped in a li',
42
- input: jsx("hul", null, jsx("hli", null, jsx("hp", null, "hello ", jsx("cursor", null)))),
43
- fragment: jsx("fragment", null, jsx("hli", null, jsx("hp", null, "world"), jsx("hp", null, "line 2"))),
44
- expected: jsx("hul", null, jsx("hli", null, jsx("hp", null, "hello "), jsx("hul", null, jsx("hli", null, jsx("hp", null, "world"), jsx("hp", null, "line 2")))))
42
+ input: /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "hello ", /*#__PURE__*/ jsx("cursor", null)))),
43
+ fragment: /*#__PURE__*/ jsx("fragment", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "world"), /*#__PURE__*/ jsx("hp", null, "line 2"))),
44
+ expected: /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "hello "), /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "world"), /*#__PURE__*/ jsx("hp", null, "line 2")))))
45
45
  }
46
46
  ];
47
- const render = (children)=>jsx("editor", null, children, jsx("hp", null, jsx("htext", null)));
47
+ const render = (children)=>/*#__PURE__*/ jsx("editor", null, children, /*#__PURE__*/ jsx("hp", null, /*#__PURE__*/ jsx("htext", null)));
48
48
  for (const t of tests){
49
49
  test(t.title, ()=>{
50
50
  const { editor } = createTestEditor({
@@ -37,7 +37,7 @@ const styles = {
37
37
  };
38
38
  function createList(Tag, block) {
39
39
  return function List(props) {
40
- return React.createElement(Tag, {
40
+ return /*#__PURE__*/ React.createElement(Tag, {
41
41
  ...props.attributes,
42
42
  className: cx(baseStyle, styles[block])
43
43
  }, props.children);
@@ -13,7 +13,7 @@ const style = css`
13
13
  }
14
14
  `;
15
15
  export function ListItem(props) {
16
- return React.createElement("li", {
16
+ return /*#__PURE__*/ React.createElement("li", {
17
17
  ...props.attributes,
18
18
  className: style
19
19
  }, props.children);
@@ -21,17 +21,17 @@ export function ToolbarListButton(props) {
21
21
  };
22
22
  }
23
23
  if (!editor) return null;
24
- return React.createElement(React.Fragment, null, isNodeTypeEnabled(sdk.field, BLOCKS.UL_LIST) && React.createElement(ToolbarButton, {
24
+ return /*#__PURE__*/ React.createElement(React.Fragment, null, isNodeTypeEnabled(sdk.field, BLOCKS.UL_LIST) && /*#__PURE__*/ React.createElement(ToolbarButton, {
25
25
  title: "UL",
26
26
  testId: "ul-toolbar-button",
27
27
  onClick: handleClick(BLOCKS.UL_LIST),
28
28
  isActive: isListTypeActive(editor, BLOCKS.UL_LIST),
29
29
  isDisabled: props.isDisabled
30
- }, React.createElement(ListBulletedIcon, null)), isNodeTypeEnabled(sdk.field, BLOCKS.OL_LIST) && React.createElement(ToolbarButton, {
30
+ }, /*#__PURE__*/ React.createElement(ListBulletedIcon, null)), isNodeTypeEnabled(sdk.field, BLOCKS.OL_LIST) && /*#__PURE__*/ React.createElement(ToolbarButton, {
31
31
  title: "OL",
32
32
  testId: "ol-toolbar-button",
33
33
  onClick: handleClick(BLOCKS.OL_LIST),
34
34
  isActive: isListTypeActive(editor, BLOCKS.OL_LIST),
35
35
  isDisabled: props.isDisabled
36
- }, React.createElement(ListNumberedIcon, null)));
36
+ }, /*#__PURE__*/ React.createElement(ListNumberedIcon, null)));
37
37
  }
@@ -1,7 +1,7 @@
1
1
  import { jsx, assertOutput, createTestEditor } from '../../../test-utils';
2
2
  import { moveListItems } from './moveListItems';
3
3
  describe('moving list items (up/down)', ()=>{
4
- const renderEditor = (children)=>jsx("editor", null, children, jsx("hp", null, jsx("htext", null)));
4
+ const renderEditor = (children)=>/*#__PURE__*/ jsx("editor", null, children, /*#__PURE__*/ jsx("hp", null, /*#__PURE__*/ jsx("htext", null)));
5
5
  const assertTab = (t, shift = false)=>{
6
6
  test(t.title, ()=>{
7
7
  const { editor } = createTestEditor({
@@ -19,37 +19,37 @@ describe('moving list items (up/down)', ()=>{
19
19
  const tests = [
20
20
  {
21
21
  title: 'single paragraph',
22
- input: jsx("hul", null, jsx("hli", null, jsx("hp", null, "p1")), jsx("hli", null, jsx("hp", null, "p2", jsx("cursor", null)))),
23
- expected: jsx("hul", null, jsx("hli", null, jsx("hp", null, "p1"), jsx("hul", null, jsx("hli", null, jsx("hp", null, "p2", jsx("cursor", null))))))
22
+ input: /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "p1")), /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "p2", /*#__PURE__*/ jsx("cursor", null)))),
23
+ expected: /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "p1"), /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "p2", /*#__PURE__*/ jsx("cursor", null))))))
24
24
  },
25
25
  {
26
26
  title: 'multiple paragraphs',
27
- input: jsx("hul", null, jsx("hli", null, jsx("hp", null, "p1"), jsx("hp", null, "p2")), jsx("hli", null, jsx("hp", null, "p3", jsx("cursor", null)))),
28
- expected: jsx("hul", null, jsx("hli", null, jsx("hp", null, "p1"), jsx("hp", null, "p2"), jsx("hul", null, jsx("hli", null, jsx("hp", null, "p3", jsx("cursor", null))))))
27
+ input: /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "p1"), /*#__PURE__*/ jsx("hp", null, "p2")), /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "p3", /*#__PURE__*/ jsx("cursor", null)))),
28
+ expected: /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "p1"), /*#__PURE__*/ jsx("hp", null, "p2"), /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "p3", /*#__PURE__*/ jsx("cursor", null))))))
29
29
  },
30
30
  {
31
31
  title: 'multiple elements',
32
- input: jsx("hul", null, jsx("hli", null, jsx("hp", null, "a"), jsx("hp", null, "b"), jsx("hquote", null, jsx("hp", null, "quote"))), jsx("hli", null, jsx("hp", null, "c", jsx("cursor", null)), jsx("hp", null, "d"), jsx("hembed", {
32
+ input: /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "a"), /*#__PURE__*/ jsx("hp", null, "b"), /*#__PURE__*/ jsx("hquote", null, /*#__PURE__*/ jsx("hp", null, "quote"))), /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "c", /*#__PURE__*/ jsx("cursor", null)), /*#__PURE__*/ jsx("hp", null, "d"), /*#__PURE__*/ jsx("hembed", {
33
33
  type: "Asset",
34
34
  id: "asset-id"
35
35
  }))),
36
- expected: jsx("hul", null, jsx("hli", null, jsx("hp", null, "a"), jsx("hp", null, "b"), jsx("hquote", null, jsx("hp", null, "quote")), jsx("hul", null, jsx("hli", null, jsx("hp", null, "c", jsx("cursor", null)), jsx("hp", null, "d"), jsx("hembed", {
36
+ expected: /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "a"), /*#__PURE__*/ jsx("hp", null, "b"), /*#__PURE__*/ jsx("hquote", null, /*#__PURE__*/ jsx("hp", null, "quote")), /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "c", /*#__PURE__*/ jsx("cursor", null)), /*#__PURE__*/ jsx("hp", null, "d"), /*#__PURE__*/ jsx("hembed", {
37
37
  type: "Asset",
38
38
  id: "asset-id"
39
39
  })))))
40
40
  },
41
41
  {
42
42
  title: 'with a sub-list',
43
- input: jsx("hul", null, jsx("hli", null, jsx("hp", null, "p1"), jsx("hul", null, jsx("hli", null, jsx("hp", null, "sub p1")))), jsx("hli", null, jsx("hp", null, "p2", jsx("cursor", null)))),
44
- expected: jsx("hul", null, jsx("hli", null, jsx("hp", null, "p1"), jsx("hul", null, jsx("hli", null, jsx("hp", null, "sub p1")), jsx("hli", null, jsx("hp", null, "p2", jsx("cursor", null))))))
43
+ input: /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "p1"), /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "sub p1")))), /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "p2", /*#__PURE__*/ jsx("cursor", null)))),
44
+ expected: /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "p1"), /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "sub p1")), /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "p2", /*#__PURE__*/ jsx("cursor", null))))))
45
45
  },
46
46
  {
47
47
  title: 'with a sub-list as non-last child',
48
- input: jsx("hul", null, jsx("hli", null, jsx("hp", null, "p1"), jsx("hul", null, jsx("hli", null, jsx("hp", null, "sub p1"))), jsx("hembed", {
48
+ input: /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "p1"), /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "sub p1"))), /*#__PURE__*/ jsx("hembed", {
49
49
  type: "Entry",
50
50
  id: "entry-id"
51
- })), jsx("hli", null, jsx("hp", null, "p2", jsx("cursor", null)))),
52
- expected: jsx("hul", null, jsx("hli", null, jsx("hp", null, "p1"), jsx("hul", null, jsx("hli", null, jsx("hp", null, "sub p1")), jsx("hli", null, jsx("hp", null, "p2", jsx("cursor", null)))), jsx("hembed", {
51
+ })), /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "p2", /*#__PURE__*/ jsx("cursor", null)))),
52
+ expected: /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "p1"), /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "sub p1")), /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "p2", /*#__PURE__*/ jsx("cursor", null)))), /*#__PURE__*/ jsx("hembed", {
53
53
  type: "Entry",
54
54
  id: "entry-id"
55
55
  })))
@@ -3,8 +3,8 @@ import { assertOutput, jsx, createTestEditor } from '../../../test-utils';
3
3
  import { toggleList } from './toggleList';
4
4
  describe('toggle on', ()=>{
5
5
  it('should turn a p to list', ()=>{
6
- const input = jsx("editor", null, jsx("hp", null, "1", jsx("cursor", null)));
7
- const expected = jsx("editor", null, jsx("hul", null, jsx("hli", null, jsx("hp", null, "1", jsx("cursor", null)))), jsx("hp", null, jsx("htext", null)));
6
+ const input = /*#__PURE__*/ jsx("editor", null, /*#__PURE__*/ jsx("hp", null, "1", /*#__PURE__*/ jsx("cursor", null)));
7
+ const expected = /*#__PURE__*/ jsx("editor", null, /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "1", /*#__PURE__*/ jsx("cursor", null)))), /*#__PURE__*/ jsx("hp", null, /*#__PURE__*/ jsx("htext", null)));
8
8
  const { editor } = createTestEditor({
9
9
  input
10
10
  });
@@ -17,8 +17,8 @@ describe('toggle on', ()=>{
17
17
  });
18
18
  });
19
19
  it('should turn a p with a selection to list', ()=>{
20
- const input = jsx("editor", null, jsx("hp", null, "Planetas ", jsx("anchor", null), "mori in", jsx("focus", null), " gandavum!"));
21
- const expected = jsx("editor", null, jsx("hul", null, jsx("hli", null, jsx("hp", null, "Planetas ", jsx("anchor", null), "mori in", jsx("focus", null), " gandavum!"))), jsx("hp", null, jsx("htext", null)));
20
+ const input = /*#__PURE__*/ jsx("editor", null, /*#__PURE__*/ jsx("hp", null, "Planetas ", /*#__PURE__*/ jsx("anchor", null), "mori in", /*#__PURE__*/ jsx("focus", null), " gandavum!"));
21
+ const expected = /*#__PURE__*/ jsx("editor", null, /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "Planetas ", /*#__PURE__*/ jsx("anchor", null), "mori in", /*#__PURE__*/ jsx("focus", null), " gandavum!"))), /*#__PURE__*/ jsx("hp", null, /*#__PURE__*/ jsx("htext", null)));
22
22
  const { editor } = createTestEditor({
23
23
  input
24
24
  });
@@ -31,8 +31,8 @@ describe('toggle on', ()=>{
31
31
  });
32
32
  });
33
33
  it('should turn multiple p to list', ()=>{
34
- const input = jsx("editor", null, jsx("hp", null, jsx("anchor", null), "1"), jsx("hp", null, "2"), jsx("hp", null, "3", jsx("focus", null)));
35
- const expected = jsx("editor", null, jsx("hul", null, jsx("hli", null, jsx("hp", null, jsx("anchor", null), "1")), jsx("hli", null, jsx("hp", null, "2")), jsx("hli", null, jsx("hp", null, "3", jsx("focus", null)))), jsx("hp", null, jsx("htext", null)));
34
+ const input = /*#__PURE__*/ jsx("editor", null, /*#__PURE__*/ jsx("hp", null, /*#__PURE__*/ jsx("anchor", null), "1"), /*#__PURE__*/ jsx("hp", null, "2"), /*#__PURE__*/ jsx("hp", null, "3", /*#__PURE__*/ jsx("focus", null)));
35
+ const expected = /*#__PURE__*/ jsx("editor", null, /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, /*#__PURE__*/ jsx("anchor", null), "1")), /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "2")), /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "3", /*#__PURE__*/ jsx("focus", null)))), /*#__PURE__*/ jsx("hp", null, /*#__PURE__*/ jsx("htext", null)));
36
36
  const { editor } = createTestEditor({
37
37
  input
38
38
  });
@@ -47,8 +47,8 @@ describe('toggle on', ()=>{
47
47
  });
48
48
  describe('toggle off', ()=>{
49
49
  it('should split a simple list to two', ()=>{
50
- const input = jsx("editor", null, jsx("hul", null, jsx("hli", null, jsx("hp", null, "1")), jsx("hli", null, jsx("hp", null, "2", jsx("cursor", null))), jsx("hli", null, jsx("hp", null, "3"))));
51
- const expected = jsx("editor", null, jsx("hul", null, jsx("hli", null, jsx("hp", null, "1"))), jsx("hp", null, "2", jsx("cursor", null)), jsx("hul", null, jsx("hli", null, jsx("hp", null, "3"))), jsx("hp", null, jsx("htext", null)));
50
+ const input = /*#__PURE__*/ jsx("editor", null, /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "1")), /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "2", /*#__PURE__*/ jsx("cursor", null))), /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "3"))));
51
+ const expected = /*#__PURE__*/ jsx("editor", null, /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "1"))), /*#__PURE__*/ jsx("hp", null, "2", /*#__PURE__*/ jsx("cursor", null)), /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "3"))), /*#__PURE__*/ jsx("hp", null, /*#__PURE__*/ jsx("htext", null)));
52
52
  const { editor } = createTestEditor({
53
53
  input
54
54
  });
@@ -61,8 +61,8 @@ describe('toggle off', ()=>{
61
61
  });
62
62
  });
63
63
  it('should split a nested list', ()=>{
64
- const input = jsx("editor", null, jsx("hul", null, jsx("hli", null, jsx("hp", null, "1"), jsx("hul", null, jsx("hli", null, jsx("hp", null, "11")), jsx("hli", null, jsx("hp", null, "12", jsx("cursor", null))), jsx("hli", null, jsx("hp", null, "13"))))));
65
- const expected = jsx("editor", null, jsx("hul", null, jsx("hli", null, jsx("hp", null, "1"), jsx("hul", null, jsx("hli", null, jsx("hp", null, "11"))))), jsx("hp", null, "12", jsx("cursor", null)), jsx("hul", null, jsx("hli", null, jsx("hp", null, "13"))), jsx("hp", null, jsx("htext", null)));
64
+ const input = /*#__PURE__*/ jsx("editor", null, /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "1"), /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "11")), /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "12", /*#__PURE__*/ jsx("cursor", null))), /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "13"))))));
65
+ const expected = /*#__PURE__*/ jsx("editor", null, /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "1"), /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "11"))))), /*#__PURE__*/ jsx("hp", null, "12", /*#__PURE__*/ jsx("cursor", null)), /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "13"))), /*#__PURE__*/ jsx("hp", null, /*#__PURE__*/ jsx("htext", null)));
66
66
  const { editor } = createTestEditor({
67
67
  input
68
68
  });
@@ -75,8 +75,8 @@ describe('toggle off', ()=>{
75
75
  });
76
76
  });
77
77
  it('should turn a list to multiple p', ()=>{
78
- const input = jsx("editor", null, jsx("hul", null, jsx("hli", null, jsx("hp", null, jsx("anchor", null), "1")), jsx("hli", null, jsx("hp", null, "2")), jsx("hli", null, jsx("hp", null, "3", jsx("focus", null)))));
79
- const expected = jsx("editor", null, jsx("hp", null, jsx("anchor", null), "1"), jsx("hp", null, "2"), jsx("hp", null, "3", jsx("focus", null)));
78
+ const input = /*#__PURE__*/ jsx("editor", null, /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, /*#__PURE__*/ jsx("anchor", null), "1")), /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "2")), /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "3", /*#__PURE__*/ jsx("focus", null)))));
79
+ const expected = /*#__PURE__*/ jsx("editor", null, /*#__PURE__*/ jsx("hp", null, /*#__PURE__*/ jsx("anchor", null), "1"), /*#__PURE__*/ jsx("hp", null, "2"), /*#__PURE__*/ jsx("hp", null, "3", /*#__PURE__*/ jsx("focus", null)));
80
80
  const { editor } = createTestEditor({
81
81
  input
82
82
  });
@@ -91,8 +91,8 @@ describe('toggle off', ()=>{
91
91
  });
92
92
  describe('toggle over', ()=>{
93
93
  it('should toggle different list types', ()=>{
94
- const input = jsx("editor", null, jsx("hul", null, jsx("hli", null, jsx("hp", null, "1", jsx("cursor", null)))));
95
- const expected = jsx("editor", null, jsx("hol", null, jsx("hli", null, jsx("hp", null, "1"))), jsx("hp", null, jsx("htext", null)));
94
+ const input = /*#__PURE__*/ jsx("editor", null, /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "1", /*#__PURE__*/ jsx("cursor", null)))));
95
+ const expected = /*#__PURE__*/ jsx("editor", null, /*#__PURE__*/ jsx("hol", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "1"))), /*#__PURE__*/ jsx("hp", null, /*#__PURE__*/ jsx("htext", null)));
96
96
  const { editor } = createTestEditor({
97
97
  input
98
98
  });
@@ -105,8 +105,8 @@ describe('toggle over', ()=>{
105
105
  });
106
106
  });
107
107
  it('should only toggle the nested list', ()=>{
108
- const input = jsx("editor", null, jsx("hul", null, jsx("hli", null, jsx("hp", null, "1"), jsx("hul", null, jsx("hli", null, jsx("hp", null, "11", jsx("cursor", null)))))));
109
- const expected = jsx("editor", null, jsx("hul", null, jsx("hli", null, jsx("hp", null, "1"), jsx("hol", null, jsx("hli", null, jsx("hp", null, "11", jsx("cursor", null)))))), jsx("hp", null, jsx("htext", null)));
108
+ const input = /*#__PURE__*/ jsx("editor", null, /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "1"), /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "11", /*#__PURE__*/ jsx("cursor", null)))))));
109
+ const expected = /*#__PURE__*/ jsx("editor", null, /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "1"), /*#__PURE__*/ jsx("hol", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "11", /*#__PURE__*/ jsx("cursor", null)))))), /*#__PURE__*/ jsx("hp", null, /*#__PURE__*/ jsx("htext", null)));
110
110
  const { editor } = createTestEditor({
111
111
  input
112
112
  });
@@ -119,8 +119,8 @@ describe('toggle over', ()=>{
119
119
  });
120
120
  });
121
121
  it('should only toggle everything that is selected', ()=>{
122
- const input = jsx("editor", null, jsx("hul", null, jsx("hli", null, jsx("hp", null, jsx("anchor", null), "1"), jsx("hul", null, jsx("hli", null, jsx("hp", null, "11", jsx("focus", null)))))));
123
- const expected = jsx("editor", null, jsx("hol", null, jsx("hli", null, jsx("hp", null, jsx("anchor", null), "1"), jsx("hol", null, jsx("hli", null, jsx("hp", null, "11", jsx("focus", null)))))), jsx("hp", null, jsx("htext", null)));
122
+ const input = /*#__PURE__*/ jsx("editor", null, /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, /*#__PURE__*/ jsx("anchor", null), "1"), /*#__PURE__*/ jsx("hul", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "11", /*#__PURE__*/ jsx("focus", null)))))));
123
+ const expected = /*#__PURE__*/ jsx("editor", null, /*#__PURE__*/ jsx("hol", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, /*#__PURE__*/ jsx("anchor", null), "1"), /*#__PURE__*/ jsx("hol", null, /*#__PURE__*/ jsx("hli", null, /*#__PURE__*/ jsx("hp", null, "11", /*#__PURE__*/ jsx("focus", null)))))), /*#__PURE__*/ jsx("hp", null, /*#__PURE__*/ jsx("htext", null)));
124
124
  const { editor } = createTestEditor({
125
125
  input
126
126
  });
@@ -9,7 +9,7 @@ import { buildMarkEventHandler } from './helpers';
9
9
  export const ToolbarBoldButton = createMarkToolbarButton({
10
10
  title: 'Bold',
11
11
  mark: MARKS.BOLD,
12
- icon: React.createElement(FormatBoldIcon, null)
12
+ icon: /*#__PURE__*/ React.createElement(FormatBoldIcon, null)
13
13
  });
14
14
  const styles = {
15
15
  bold: css({
@@ -17,7 +17,7 @@ const styles = {
17
17
  })
18
18
  };
19
19
  export function Bold(props) {
20
- return React.createElement("strong", {
20
+ return /*#__PURE__*/ React.createElement("strong", {
21
21
  ...props.attributes,
22
22
  className: styles.bold
23
23
  }, props.children);
@@ -8,7 +8,7 @@ import { buildMarkEventHandler } from './helpers';
8
8
  export const ToolbarCodeButton = createMarkToolbarButton({
9
9
  title: 'Code',
10
10
  mark: MARKS.CODE,
11
- icon: React.createElement(CodeIcon, null)
11
+ icon: /*#__PURE__*/ React.createElement(CodeIcon, null)
12
12
  });
13
13
  export const ToolbarDropdownCodeButton = createMarkToolbarButton({
14
14
  title: 'Code',
@@ -21,7 +21,7 @@ const styles = {
21
21
  })
22
22
  };
23
23
  export function Code(props) {
24
- return React.createElement("code", {
24
+ return /*#__PURE__*/ React.createElement("code", {
25
25
  ...props.attributes,
26
26
  className: styles.code
27
27
  }, props.children);
@@ -9,7 +9,7 @@ import { buildMarkEventHandler } from './helpers';
9
9
  export const ToolbarItalicButton = createMarkToolbarButton({
10
10
  title: 'Italic',
11
11
  mark: MARKS.ITALIC,
12
- icon: React.createElement(FormatItalicIcon, null)
12
+ icon: /*#__PURE__*/ React.createElement(FormatItalicIcon, null)
13
13
  });
14
14
  const styles = {
15
15
  italic: css({
@@ -17,7 +17,7 @@ const styles = {
17
17
  })
18
18
  };
19
19
  export function Italic(props) {
20
- return React.createElement("em", {
20
+ return /*#__PURE__*/ React.createElement("em", {
21
21
  ...props.attributes,
22
22
  className: styles.italic
23
23
  }, props.children);
@@ -16,16 +16,16 @@ export const ToolbarDropdownStrikethroughButton = createMarkToolbarButton({
16
16
  export const ToolbarStrikethroughButton = createMarkToolbarButton({
17
17
  title: 'Strikethrough',
18
18
  mark: MARKS.STRIKETHROUGH,
19
- icon: React.createElement("svg", {
19
+ icon: /*#__PURE__*/ React.createElement("svg", {
20
20
  xmlns: "http://www.w3.org/2000/svg",
21
21
  viewBox: "0 0 256 256",
22
22
  width: "18",
23
23
  height: "18"
24
- }, React.createElement("rect", {
24
+ }, /*#__PURE__*/ React.createElement("rect", {
25
25
  width: "256",
26
26
  height: "256",
27
27
  fill: "none"
28
- }), React.createElement("line", {
28
+ }), /*#__PURE__*/ React.createElement("line", {
29
29
  x1: "40",
30
30
  y1: "128",
31
31
  x2: "216",
@@ -35,14 +35,14 @@ export const ToolbarStrikethroughButton = createMarkToolbarButton({
35
35
  strokeLinecap: "round",
36
36
  strokeLinejoin: "round",
37
37
  strokeWidth: "24"
38
- }), React.createElement("path", {
38
+ }), /*#__PURE__*/ React.createElement("path", {
39
39
  d: "M72,168c0,22.09,25.07,40,56,40s56-17.91,56-40c0-23.77-21.62-33-45.6-40",
40
40
  fill: "none",
41
41
  stroke: "currentColor",
42
42
  strokeLinecap: "round",
43
43
  strokeLinejoin: "round",
44
44
  strokeWidth: "24"
45
- }), React.createElement("path", {
45
+ }), /*#__PURE__*/ React.createElement("path", {
46
46
  d: "M75.11,88c0-22.09,22-40,52.89-40,23,0,40.24,9.87,48,24",
47
47
  fill: "none",
48
48
  stroke: "currentColor",
@@ -52,7 +52,7 @@ export const ToolbarStrikethroughButton = createMarkToolbarButton({
52
52
  }))
53
53
  });
54
54
  export function Strikethrough(props) {
55
- return React.createElement("s", {
55
+ return /*#__PURE__*/ React.createElement("s", {
56
56
  ...props.attributes,
57
57
  className: styles.strikethrough
58
58
  }, props.children);
@@ -12,18 +12,18 @@ const styles = {
12
12
  })
13
13
  };
14
14
  export const ToolbarSubscriptButton = createMarkToolbarButton({
15
- title: "Subscript",
15
+ title: 'Subscript',
16
16
  mark: MARKS.SUBSCRIPT,
17
- icon: React.createElement(SubscriptIcon, {
17
+ icon: /*#__PURE__*/ React.createElement(SubscriptIcon, {
18
18
  viewBox: "0 0 23 18"
19
19
  })
20
20
  });
21
21
  export const ToolbarDropdownSubscriptButton = createMarkToolbarButton({
22
- title: "Subscript",
22
+ title: 'Subscript',
23
23
  mark: MARKS.SUBSCRIPT
24
24
  });
25
25
  export function Subscript(props) {
26
- return React.createElement("sub", {
26
+ return /*#__PURE__*/ React.createElement("sub", {
27
27
  ...props.attributes,
28
28
  className: styles.subscript
29
29
  }, props.children);