@comet/cms-admin 9.0.0-beta.4 → 9.0.0-beta.5

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 (79) hide show
  1. package/lib/blocks/__stories__/BlockInFinalForm.stories.js +53 -0
  2. package/lib/blocks/helpers/__stories__/createCompositeBlockSelectField.stories.js +106 -0
  3. package/lib/blocks/table/TableBlockGrid.d.ts.map +1 -1
  4. package/lib/blocks/table/TableBlockGrid.js +3 -1
  5. package/lib/blocks/table/utils/column.d.ts +16 -21
  6. package/lib/blocks/table/utils/column.d.ts.map +1 -1
  7. package/lib/blocks/table/utils/column.js +0 -11
  8. package/lib/blocks/table/utils/getClipboardValueForSchema.d.ts +1 -1
  9. package/lib/blocks/table/utils/getClipboardValueForSchema.d.ts.map +1 -1
  10. package/lib/blocks/table/utils/row.d.ts +3 -18
  11. package/lib/blocks/table/utils/row.d.ts.map +1 -1
  12. package/lib/blocks/table/utils/row.js +1 -1
  13. package/lib/blocks/table/utils/rteSchema.d.ts +1 -5
  14. package/lib/blocks/table/utils/rteSchema.d.ts.map +1 -1
  15. package/lib/blocks/tipTap/TipTapToolbar.d.ts +3 -2
  16. package/lib/blocks/tipTap/TipTapToolbar.d.ts.map +1 -1
  17. package/lib/blocks/tipTap/TipTapToolbar.js +60 -5
  18. package/lib/blocks/tipTap/__stories__/TipTapRichTextBlock.stories.js +621 -346
  19. package/lib/blocks/tipTap/createTipTapRichTextBlock.d.ts +5 -0
  20. package/lib/blocks/tipTap/createTipTapRichTextBlock.d.ts.map +1 -1
  21. package/lib/blocks/tipTap/createTipTapRichTextBlock.js +8 -2
  22. package/lib/blocks/tipTap/extensions/Placeholder.d.ts +10 -0
  23. package/lib/blocks/tipTap/extensions/Placeholder.d.ts.map +1 -0
  24. package/lib/blocks/tipTap/extensions/Placeholder.js +78 -0
  25. package/lib/builds/PublisherPage.js +2 -2
  26. package/lib/builds/StartBuildsDialog.d.ts.map +1 -1
  27. package/lib/builds/StartBuildsDialog.js +1 -1
  28. package/lib/common/__stories__/MasterMenuInMasterLayout.stories.js +87 -0
  29. package/lib/config/CometConfigContext.d.ts +7 -1
  30. package/lib/config/CometConfigContext.d.ts.map +1 -1
  31. package/lib/cronJobs/CronJobsGrid.js +1 -1
  32. package/lib/cronJobs/JobsGrid.js +1 -1
  33. package/lib/dam/DataGrid/FolderDataGrid.d.ts.map +1 -1
  34. package/lib/dam/DataGrid/FolderDataGrid.js +6 -4
  35. package/lib/dam/FileForm/EditFile.d.ts.map +1 -1
  36. package/lib/dam/FileForm/EditFile.js +5 -2
  37. package/lib/dam/mediaAlternatives/MediaAlternativesGrid.d.ts.map +1 -1
  38. package/lib/dam/mediaAlternatives/MediaAlternativesGrid.js +1 -1
  39. package/lib/dashboard/widgets/LatestBuildsDashboardWidget.js +1 -1
  40. package/lib/dashboard/widgets/LatestContentUpdatesDashboardWidget.d.ts +1 -1
  41. package/lib/dashboard/widgets/LatestContentUpdatesDashboardWidget.d.ts.map +1 -1
  42. package/lib/dashboard/widgets/LatestContentUpdatesDashboardWidget.js +1 -1
  43. package/lib/dashboard/widgets/__stories__/DashboardWidgetRoot.stories.js +82 -0
  44. package/lib/dataGrid/DataGrid.d.ts +3 -0
  45. package/lib/dataGrid/DataGrid.d.ts.map +1 -0
  46. package/lib/dataGrid/DataGrid.js +19 -0
  47. package/lib/dependencies/DependenciesList.d.ts.map +1 -1
  48. package/lib/dependencies/DependenciesList.js +1 -1
  49. package/lib/dependencies/DependentsList.d.ts.map +1 -1
  50. package/lib/dependencies/DependentsList.js +1 -1
  51. package/lib/form/file/__stories__/FileUploadField.stories.js +351 -0
  52. package/lib/graphql.generated.d.ts +7 -0
  53. package/lib/graphql.generated.d.ts.map +1 -1
  54. package/lib/index.d.ts +3 -1
  55. package/lib/index.d.ts.map +1 -1
  56. package/lib/index.js +2 -0
  57. package/lib/redirects/RedirectsGrid.d.ts +1 -1
  58. package/lib/redirects/RedirectsGrid.d.ts.map +1 -1
  59. package/lib/redirects/RedirectsGrid.gql.d.ts +1 -0
  60. package/lib/redirects/RedirectsGrid.gql.d.ts.map +1 -1
  61. package/lib/redirects/RedirectsGrid.gql.generated.d.ts +8 -0
  62. package/lib/redirects/RedirectsGrid.gql.generated.d.ts.map +1 -1
  63. package/lib/redirects/RedirectsGrid.gql.generated.js +2 -1
  64. package/lib/redirects/RedirectsGrid.gql.js +3 -2
  65. package/lib/redirects/RedirectsGrid.js +107 -15
  66. package/lib/userPermissions/UserGrid.d.ts +1 -1
  67. package/lib/userPermissions/UserGrid.d.ts.map +1 -1
  68. package/lib/userPermissions/UserGrid.js +2 -2
  69. package/lib/userPermissions/user/permissions/ContentScopeGrid.d.ts.map +1 -1
  70. package/lib/userPermissions/user/permissions/ContentScopeGrid.js +1 -1
  71. package/lib/userPermissions/user/permissions/OverrideContentScopesDialog.js +1 -1
  72. package/lib/userPermissions/user/permissions/PermissionGrid.d.ts.map +1 -1
  73. package/lib/userPermissions/user/permissions/PermissionGrid.js +1 -1
  74. package/lib/userPermissions/user/permissions/selectScopesDialogContent/SelectScopesDialogContent.d.ts.map +1 -1
  75. package/lib/userPermissions/user/permissions/selectScopesDialogContent/SelectScopesDialogContent.js +1 -1
  76. package/lib/warnings/LatestWarningsDashboardWidget.js +1 -1
  77. package/lib/warnings/WarningsGrid.d.ts.map +1 -1
  78. package/lib/warnings/WarningsGrid.js +1 -1
  79. package/package.json +16 -15
@@ -14,7 +14,7 @@ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r)
14
14
  function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
15
15
  function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
16
16
  function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
17
- import { Box, Typography } from "@mui/material";
17
+ import { Box, chipClasses, Typography } from "@mui/material";
18
18
  import { useState } from "react";
19
19
  import { expect, waitFor, within } from "storybook/test";
20
20
  import { createTipTapRichTextBlock } from "../createTipTapRichTextBlock";
@@ -341,6 +341,281 @@ export var BlockStyles = {
341
341
  return play;
342
342
  }()
343
343
  };
344
+ var PlaceholdersBlock = createTipTapRichTextBlock({
345
+ placeholders: [{
346
+ name: "firstName",
347
+ label: "First Name"
348
+ }, {
349
+ name: "lastName",
350
+ label: "Last Name"
351
+ }, {
352
+ name: "email",
353
+ label: "Email Address"
354
+ }, {
355
+ name: "company",
356
+ label: "Company"
357
+ }]
358
+ });
359
+ function PlaceholdersStory() {
360
+ var _useState7 = useState(PlaceholdersBlock.defaultValues()),
361
+ _useState8 = _slicedToArray(_useState7, 2),
362
+ state = _useState8[0],
363
+ setState = _useState8[1];
364
+ return /*#__PURE__*/_jsx(StoryWrapper, {
365
+ state: state,
366
+ children: /*#__PURE__*/_jsx(PlaceholdersBlock.AdminComponent, {
367
+ state: state,
368
+ updateState: setState
369
+ })
370
+ });
371
+ }
372
+ export var Placeholders = {
373
+ render: function render() {
374
+ return /*#__PURE__*/_jsx(PlaceholdersStory, {});
375
+ },
376
+ play: function () {
377
+ var _play4 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee12(_ref10) {
378
+ var canvas, userEvent, step;
379
+ return _regenerator().w(function (_context12) {
380
+ while (1) switch (_context12.n) {
381
+ case 0:
382
+ canvas = _ref10.canvas, userEvent = _ref10.userEvent, step = _ref10.step;
383
+ _context12.n = 1;
384
+ return step("Editor is ready with placeholder button", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee0() {
385
+ return _regenerator().w(function (_context0) {
386
+ while (1) switch (_context0.n) {
387
+ case 0:
388
+ _context0.n = 1;
389
+ return waitFor(function () {
390
+ expect(canvas.getByRole("textbox")).toBeInTheDocument();
391
+ }, {
392
+ timeout: 5000
393
+ });
394
+ case 1:
395
+ // The placeholder button is identified by its accessible name, not by index among all toolbar buttons
396
+ expect(canvas.getByRole("button", {
397
+ name: "Insert placeholder"
398
+ })).toBeInTheDocument();
399
+ case 2:
400
+ return _context0.a(2);
401
+ }
402
+ }, _callee0);
403
+ })));
404
+ case 1:
405
+ _context12.n = 2;
406
+ return step("Open the placeholder menu and insert 'First Name'", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee1() {
407
+ return _regenerator().w(function (_context1) {
408
+ while (1) switch (_context1.n) {
409
+ case 0:
410
+ _context1.n = 1;
411
+ return userEvent.click(canvas.getByRole("button", {
412
+ name: "Insert placeholder"
413
+ }));
414
+ case 1:
415
+ _context1.n = 2;
416
+ return waitFor(function () {
417
+ expect(within(document.body).getByRole("menuitem", {
418
+ name: "First Name"
419
+ })).toBeInTheDocument();
420
+ }, {
421
+ timeout: 3000
422
+ });
423
+ case 2:
424
+ _context1.n = 3;
425
+ return userEvent.click(within(document.body).getByRole("menuitem", {
426
+ name: "First Name"
427
+ }));
428
+ case 3:
429
+ return _context1.a(2);
430
+ }
431
+ }, _callee1);
432
+ })));
433
+ case 2:
434
+ _context12.n = 3;
435
+ return step("Inserted placeholder is rendered as a chip in the editor", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee10() {
436
+ var editor;
437
+ return _regenerator().w(function (_context10) {
438
+ while (1) switch (_context10.n) {
439
+ case 0:
440
+ editor = canvas.getByRole("textbox"); // Placeholders render as chips labelled `{{name}}`
441
+ _context10.n = 1;
442
+ return waitFor(function () {
443
+ expect(within(editor).getByText("{{firstName}}")).toBeInTheDocument();
444
+ }, {
445
+ timeout: 3000
446
+ });
447
+ case 1:
448
+ return _context10.a(2);
449
+ }
450
+ }, _callee10);
451
+ })));
452
+ case 3:
453
+ _context12.n = 4;
454
+ return step("Block state contains the placeholder node", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee11() {
455
+ return _regenerator().w(function (_context11) {
456
+ while (1) switch (_context11.n) {
457
+ case 0:
458
+ _context11.n = 1;
459
+ return waitFor(function () {
460
+ var _canvas$getByText$tex;
461
+ var state = JSON.parse((_canvas$getByText$tex = canvas.getByText(/"tipTapContent"/).textContent) !== null && _canvas$getByText$tex !== void 0 ? _canvas$getByText$tex : "{}");
462
+ var _state$tipTapContent$ = _slicedToArray(state.tipTapContent.content, 1),
463
+ paragraph = _state$tipTapContent$[0];
464
+ expect(paragraph.content).toContainEqual({
465
+ type: "placeholder",
466
+ attrs: {
467
+ name: "firstName"
468
+ }
469
+ });
470
+ }, {
471
+ timeout: 3000
472
+ });
473
+ case 1:
474
+ return _context11.a(2);
475
+ }
476
+ }, _callee11);
477
+ })));
478
+ case 4:
479
+ return _context12.a(2);
480
+ }
481
+ }, _callee12);
482
+ }));
483
+ function play(_x4) {
484
+ return _play4.apply(this, arguments);
485
+ }
486
+ return play;
487
+ }()
488
+ };
489
+ var PlaceholdersWithContentBlock = createTipTapRichTextBlock({
490
+ supports: ["bold", "italic"],
491
+ placeholders: [{
492
+ name: "firstName",
493
+ label: "First Name"
494
+ }, {
495
+ name: "lastName",
496
+ label: "Last Name"
497
+ }, {
498
+ name: "email",
499
+ label: "Email Address"
500
+ }]
501
+ });
502
+ function PlaceholdersWithContentStory() {
503
+ var _useState9 = useState({
504
+ tipTapContent: {
505
+ type: "doc",
506
+ content: [{
507
+ type: "paragraph",
508
+ content: [{
509
+ type: "text",
510
+ text: "Hello "
511
+ }, {
512
+ type: "placeholder",
513
+ attrs: {
514
+ name: "firstName"
515
+ }
516
+ }, {
517
+ type: "text",
518
+ text: " "
519
+ }, {
520
+ type: "placeholder",
521
+ attrs: {
522
+ name: "lastName"
523
+ }
524
+ }, {
525
+ type: "text",
526
+ text: ", welcome to our platform!"
527
+ }]
528
+ }, {
529
+ type: "paragraph",
530
+ content: [{
531
+ type: "text",
532
+ text: "Your registered email is: "
533
+ }, {
534
+ type: "placeholder",
535
+ attrs: {
536
+ name: "email"
537
+ }
538
+ }]
539
+ }]
540
+ }
541
+ }),
542
+ _useState0 = _slicedToArray(_useState9, 2),
543
+ state = _useState0[0],
544
+ setState = _useState0[1];
545
+ return /*#__PURE__*/_jsx(StoryWrapper, {
546
+ state: state,
547
+ children: /*#__PURE__*/_jsx(PlaceholdersWithContentBlock.AdminComponent, {
548
+ state: state,
549
+ updateState: setState
550
+ })
551
+ });
552
+ }
553
+ export var PlaceholdersWithContent = {
554
+ render: function render() {
555
+ return /*#__PURE__*/_jsx(PlaceholdersWithContentStory, {});
556
+ },
557
+ play: function () {
558
+ var _play5 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee15(_ref15) {
559
+ var canvas, step;
560
+ return _regenerator().w(function (_context15) {
561
+ while (1) switch (_context15.n) {
562
+ case 0:
563
+ canvas = _ref15.canvas, step = _ref15.step;
564
+ _context15.n = 1;
565
+ return step("Editor is ready", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee13() {
566
+ return _regenerator().w(function (_context13) {
567
+ while (1) switch (_context13.n) {
568
+ case 0:
569
+ _context13.n = 1;
570
+ return waitFor(function () {
571
+ expect(canvas.getByRole("textbox")).toBeInTheDocument();
572
+ }, {
573
+ timeout: 5000
574
+ });
575
+ case 1:
576
+ return _context13.a(2);
577
+ }
578
+ }, _callee13);
579
+ })));
580
+ case 1:
581
+ _context15.n = 2;
582
+ return step("Pre-filled placeholders are rendered as chips", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee14() {
583
+ var editor;
584
+ return _regenerator().w(function (_context14) {
585
+ while (1) switch (_context14.n) {
586
+ case 0:
587
+ editor = canvas.getByRole("textbox");
588
+ _context14.n = 1;
589
+ return waitFor(function () {
590
+ // Each placeholder is rendered as a chip labelled `{{name}}` (not as plain text)
591
+ for (var _i = 0, _arr = ["firstName", "lastName", "email"]; _i < _arr.length; _i++) {
592
+ var name = _arr[_i];
593
+ var chipLabel = within(editor).getByText("{{".concat(name, "}}"));
594
+ expect(chipLabel.closest(".".concat(chipClasses.root))).toBeInTheDocument();
595
+ }
596
+ }, {
597
+ timeout: 3000
598
+ });
599
+ case 1:
600
+ // Text surrounding the chips is preserved
601
+ expect(editor).toHaveTextContent("Hello {{firstName}} {{lastName}}, welcome to our platform!");
602
+ expect(editor).toHaveTextContent("Your registered email is: {{email}}");
603
+ case 2:
604
+ return _context14.a(2);
605
+ }
606
+ }, _callee14);
607
+ })));
608
+ case 2:
609
+ return _context15.a(2);
610
+ }
611
+ }, _callee15);
612
+ }));
613
+ function play(_x5) {
614
+ return _play5.apply(this, arguments);
615
+ }
616
+ return play;
617
+ }()
618
+ };
344
619
  var BlockStyleInteractionsBlock = createTipTapRichTextBlock({
345
620
  blockStyles: [{
346
621
  name: "chapter-heading",
@@ -393,10 +668,10 @@ var BlockStyleInteractionsBlock = createTipTapRichTextBlock({
393
668
  }]
394
669
  });
395
670
  function BlockStyleInteractionsStory() {
396
- var _useState7 = useState(BlockStyleInteractionsBlock.defaultValues()),
397
- _useState8 = _slicedToArray(_useState7, 2),
398
- state = _useState8[0],
399
- setState = _useState8[1];
671
+ var _useState1 = useState(BlockStyleInteractionsBlock.defaultValues()),
672
+ _useState10 = _slicedToArray(_useState1, 2),
673
+ state = _useState10[0],
674
+ setState = _useState10[1];
400
675
  return /*#__PURE__*/_jsx(StoryWrapper, {
401
676
  state: state,
402
677
  children: /*#__PURE__*/_jsx(BlockStyleInteractionsBlock.AdminComponent, {
@@ -410,72 +685,72 @@ export var BlockStyleInteractions = {
410
685
  return /*#__PURE__*/_jsx(BlockStyleInteractionsStory, {});
411
686
  },
412
687
  play: function () {
413
- var _play4 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee16(_ref10) {
688
+ var _play6 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee24(_ref18) {
414
689
  var canvas, userEvent, step;
415
- return _regenerator().w(function (_context16) {
416
- while (1) switch (_context16.n) {
690
+ return _regenerator().w(function (_context24) {
691
+ while (1) switch (_context24.n) {
417
692
  case 0:
418
- canvas = _ref10.canvas, userEvent = _ref10.userEvent, step = _ref10.step;
419
- _context16.n = 1;
420
- return step("Editor is ready", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee0() {
421
- return _regenerator().w(function (_context0) {
422
- while (1) switch (_context0.n) {
693
+ canvas = _ref18.canvas, userEvent = _ref18.userEvent, step = _ref18.step;
694
+ _context24.n = 1;
695
+ return step("Editor is ready", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee16() {
696
+ return _regenerator().w(function (_context16) {
697
+ while (1) switch (_context16.n) {
423
698
  case 0:
424
- _context0.n = 1;
699
+ _context16.n = 1;
425
700
  return waitFor(function () {
426
701
  expect(canvas.getByRole("textbox")).toBeInTheDocument();
427
702
  }, {
428
703
  timeout: 5000
429
704
  });
430
705
  case 1:
431
- return _context0.a(2);
706
+ return _context16.a(2);
432
707
  }
433
- }, _callee0);
708
+ }, _callee16);
434
709
  })));
435
710
  case 1:
436
- _context16.n = 2;
437
- return step("Select Heading 1", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee1() {
711
+ _context24.n = 2;
712
+ return step("Select Heading 1", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee17() {
438
713
  var blockTypeSelect;
439
- return _regenerator().w(function (_context1) {
440
- while (1) switch (_context1.n) {
714
+ return _regenerator().w(function (_context17) {
715
+ while (1) switch (_context17.n) {
441
716
  case 0:
442
717
  blockTypeSelect = canvas.getAllByRole("combobox")[0];
443
- _context1.n = 1;
718
+ _context17.n = 1;
444
719
  return userEvent.click(blockTypeSelect);
445
720
  case 1:
446
- _context1.n = 2;
721
+ _context17.n = 2;
447
722
  return waitFor(function () {
448
723
  expect(within(document.body).getByText("Heading 1")).toBeInTheDocument();
449
724
  }, {
450
725
  timeout: 3000
451
726
  });
452
727
  case 2:
453
- _context1.n = 3;
728
+ _context17.n = 3;
454
729
  return userEvent.click(within(document.body).getByText("Heading 1"));
455
730
  case 3:
456
- _context1.n = 4;
731
+ _context17.n = 4;
457
732
  return waitFor(function () {
458
733
  expect(canvas.getAllByRole("combobox")[0]).toHaveTextContent("Heading 1");
459
734
  }, {
460
735
  timeout: 3000
461
736
  });
462
737
  case 4:
463
- return _context1.a(2);
738
+ return _context17.a(2);
464
739
  }
465
- }, _callee1);
740
+ }, _callee17);
466
741
  })));
467
742
  case 2:
468
- _context16.n = 3;
469
- return step("Verify available styles for Heading 1: Chapter Heading, Large Heading, Highlight — but not Intro Text", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee10() {
743
+ _context24.n = 3;
744
+ return step("Verify available styles for Heading 1: Chapter Heading, Large Heading, Highlight — but not Intro Text", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee18() {
470
745
  var blockStyleSelect;
471
- return _regenerator().w(function (_context10) {
472
- while (1) switch (_context10.n) {
746
+ return _regenerator().w(function (_context18) {
747
+ while (1) switch (_context18.n) {
473
748
  case 0:
474
749
  blockStyleSelect = canvas.getAllByRole("combobox")[1];
475
- _context10.n = 1;
750
+ _context18.n = 1;
476
751
  return userEvent.click(blockStyleSelect);
477
752
  case 1:
478
- _context10.n = 2;
753
+ _context18.n = 2;
479
754
  return waitFor(function () {
480
755
  var body = within(document.body);
481
756
  expect(body.getByText("Chapter Heading")).toBeInTheDocument();
@@ -486,37 +761,37 @@ export var BlockStyleInteractions = {
486
761
  timeout: 3000
487
762
  });
488
763
  case 2:
489
- return _context10.a(2);
764
+ return _context18.a(2);
490
765
  }
491
- }, _callee10);
766
+ }, _callee18);
492
767
  })));
493
768
  case 3:
494
- _context16.n = 4;
495
- return step("Select 'Chapter Heading' style (heading-1 only)", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee11() {
496
- return _regenerator().w(function (_context11) {
497
- while (1) switch (_context11.n) {
769
+ _context24.n = 4;
770
+ return step("Select 'Chapter Heading' style (heading-1 only)", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee19() {
771
+ return _regenerator().w(function (_context19) {
772
+ while (1) switch (_context19.n) {
498
773
  case 0:
499
- _context11.n = 1;
774
+ _context19.n = 1;
500
775
  return userEvent.click(within(document.body).getByText("Chapter Heading"));
501
776
  case 1:
502
- _context11.n = 2;
777
+ _context19.n = 2;
503
778
  return waitFor(function () {
504
779
  expect(canvas.getAllByRole("combobox")[1]).toHaveTextContent("Chapter Heading");
505
780
  }, {
506
781
  timeout: 3000
507
782
  });
508
783
  case 2:
509
- return _context11.a(2);
784
+ return _context19.a(2);
510
785
  }
511
- }, _callee11);
786
+ }, _callee19);
512
787
  })));
513
788
  case 4:
514
- _context16.n = 5;
515
- return step("Verify chapter heading styling is applied (uppercase)", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee12() {
516
- return _regenerator().w(function (_context12) {
517
- while (1) switch (_context12.n) {
789
+ _context24.n = 5;
790
+ return step("Verify chapter heading styling is applied (uppercase)", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee20() {
791
+ return _regenerator().w(function (_context20) {
792
+ while (1) switch (_context20.n) {
518
793
  case 0:
519
- _context12.n = 1;
794
+ _context20.n = 1;
520
795
  return waitFor(function () {
521
796
  var styledEl = document.querySelector('[data-block-style="chapter-heading"]');
522
797
  expect(styledEl).toBeTruthy();
@@ -527,83 +802,83 @@ export var BlockStyleInteractions = {
527
802
  timeout: 3000
528
803
  });
529
804
  case 1:
530
- return _context12.a(2);
805
+ return _context20.a(2);
531
806
  }
532
- }, _callee12);
807
+ }, _callee20);
533
808
  })));
534
809
  case 5:
535
- _context16.n = 6;
536
- return step("Switch to Heading 2", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee13() {
810
+ _context24.n = 6;
811
+ return step("Switch to Heading 2", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee21() {
537
812
  var blockTypeSelect;
538
- return _regenerator().w(function (_context13) {
539
- while (1) switch (_context13.n) {
813
+ return _regenerator().w(function (_context21) {
814
+ while (1) switch (_context21.n) {
540
815
  case 0:
541
816
  blockTypeSelect = canvas.getAllByRole("combobox")[0];
542
- _context13.n = 1;
817
+ _context21.n = 1;
543
818
  return userEvent.click(blockTypeSelect);
544
819
  case 1:
545
- _context13.n = 2;
820
+ _context21.n = 2;
546
821
  return waitFor(function () {
547
822
  expect(within(document.body).getByText("Heading 2")).toBeInTheDocument();
548
823
  }, {
549
824
  timeout: 3000
550
825
  });
551
826
  case 2:
552
- _context13.n = 3;
827
+ _context21.n = 3;
553
828
  return userEvent.click(within(document.body).getByText("Heading 2"));
554
829
  case 3:
555
- _context13.n = 4;
830
+ _context21.n = 4;
556
831
  return waitFor(function () {
557
832
  expect(canvas.getAllByRole("combobox")[0]).toHaveTextContent("Heading 2");
558
833
  }, {
559
834
  timeout: 3000
560
835
  });
561
836
  case 4:
562
- return _context13.a(2);
837
+ return _context21.a(2);
563
838
  }
564
- }, _callee13);
839
+ }, _callee21);
565
840
  })));
566
841
  case 6:
567
- _context16.n = 7;
568
- return step("Block style auto-resets to Default (Chapter Heading doesn't apply to heading-2)", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee14() {
569
- return _regenerator().w(function (_context14) {
570
- while (1) switch (_context14.n) {
842
+ _context24.n = 7;
843
+ return step("Block style auto-resets to Default (Chapter Heading doesn't apply to heading-2)", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee22() {
844
+ return _regenerator().w(function (_context22) {
845
+ while (1) switch (_context22.n) {
571
846
  case 0:
572
- _context14.n = 1;
847
+ _context22.n = 1;
573
848
  return waitFor(function () {
574
849
  expect(canvas.getAllByRole("combobox")[1]).toHaveTextContent("Default");
575
850
  }, {
576
851
  timeout: 3000
577
852
  });
578
853
  case 1:
579
- return _context14.a(2);
854
+ return _context22.a(2);
580
855
  }
581
- }, _callee14);
856
+ }, _callee22);
582
857
  })));
583
858
  case 7:
584
- _context16.n = 8;
585
- return step("Verify chapter heading styling is removed", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee15() {
586
- return _regenerator().w(function (_context15) {
587
- while (1) switch (_context15.n) {
859
+ _context24.n = 8;
860
+ return step("Verify chapter heading styling is removed", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee23() {
861
+ return _regenerator().w(function (_context23) {
862
+ while (1) switch (_context23.n) {
588
863
  case 0:
589
- _context15.n = 1;
864
+ _context23.n = 1;
590
865
  return waitFor(function () {
591
866
  expect(document.querySelector("[data-block-style]")).toBeNull();
592
867
  }, {
593
868
  timeout: 3000
594
869
  });
595
870
  case 1:
596
- return _context15.a(2);
871
+ return _context23.a(2);
597
872
  }
598
- }, _callee15);
873
+ }, _callee23);
599
874
  })));
600
875
  case 8:
601
- return _context16.a(2);
876
+ return _context24.a(2);
602
877
  }
603
- }, _callee16);
878
+ }, _callee24);
604
879
  }));
605
- function play(_x4) {
606
- return _play4.apply(this, arguments);
880
+ function play(_x6) {
881
+ return _play6.apply(this, arguments);
607
882
  }
608
883
  return play;
609
884
  }()
@@ -672,10 +947,10 @@ var ListBlockStylesBlock = createTipTapRichTextBlock({
672
947
  }]
673
948
  });
674
949
  function ListBlockStylesStory() {
675
- var _useState9 = useState(ListBlockStylesBlock.defaultValues()),
676
- _useState0 = _slicedToArray(_useState9, 2),
677
- state = _useState0[0],
678
- setState = _useState0[1];
950
+ var _useState11 = useState(ListBlockStylesBlock.defaultValues()),
951
+ _useState12 = _slicedToArray(_useState11, 2),
952
+ state = _useState12[0],
953
+ setState = _useState12[1];
679
954
  return /*#__PURE__*/_jsx(StoryWrapper, {
680
955
  state: state,
681
956
  children: /*#__PURE__*/_jsx(ListBlockStylesBlock.AdminComponent, {
@@ -689,18 +964,18 @@ export var ListBlockStyles = {
689
964
  return /*#__PURE__*/_jsx(ListBlockStylesStory, {});
690
965
  },
691
966
  play: function () {
692
- var _play5 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee26(_ref19) {
967
+ var _play7 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee34(_ref27) {
693
968
  var canvas, userEvent, step;
694
- return _regenerator().w(function (_context26) {
695
- while (1) switch (_context26.n) {
969
+ return _regenerator().w(function (_context34) {
970
+ while (1) switch (_context34.n) {
696
971
  case 0:
697
- canvas = _ref19.canvas, userEvent = _ref19.userEvent, step = _ref19.step;
698
- _context26.n = 1;
699
- return step("Editor is ready with two comboboxes", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee17() {
700
- return _regenerator().w(function (_context17) {
701
- while (1) switch (_context17.n) {
972
+ canvas = _ref27.canvas, userEvent = _ref27.userEvent, step = _ref27.step;
973
+ _context34.n = 1;
974
+ return step("Editor is ready with two comboboxes", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee25() {
975
+ return _regenerator().w(function (_context25) {
976
+ while (1) switch (_context25.n) {
702
977
  case 0:
703
- _context17.n = 1;
978
+ _context25.n = 1;
704
979
  return waitFor(function () {
705
980
  expect(canvas.getByRole("textbox")).toBeInTheDocument();
706
981
  expect(canvas.getAllByRole("combobox")).toHaveLength(2);
@@ -708,22 +983,22 @@ export var ListBlockStyles = {
708
983
  timeout: 5000
709
984
  });
710
985
  case 1:
711
- return _context17.a(2);
986
+ return _context25.a(2);
712
987
  }
713
- }, _callee17);
988
+ }, _callee25);
714
989
  })));
715
990
  case 1:
716
- _context26.n = 2;
717
- return step("Paragraph mode: block style dropdown shows paragraph-applicable styles only", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee18() {
991
+ _context34.n = 2;
992
+ return step("Paragraph mode: block style dropdown shows paragraph-applicable styles only", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee26() {
718
993
  var blockStyleSelect;
719
- return _regenerator().w(function (_context18) {
720
- while (1) switch (_context18.n) {
994
+ return _regenerator().w(function (_context26) {
995
+ while (1) switch (_context26.n) {
721
996
  case 0:
722
997
  blockStyleSelect = canvas.getAllByRole("combobox")[1];
723
- _context18.n = 1;
998
+ _context26.n = 1;
724
999
  return userEvent.click(blockStyleSelect);
725
1000
  case 1:
726
- _context18.n = 2;
1001
+ _context26.n = 2;
727
1002
  return waitFor(function () {
728
1003
  var body = within(document.body);
729
1004
  expect(body.getByText("Intro Text")).toBeInTheDocument();
@@ -735,66 +1010,66 @@ export var ListBlockStyles = {
735
1010
  timeout: 3000
736
1011
  });
737
1012
  case 2:
738
- _context18.n = 3;
1013
+ _context26.n = 3;
739
1014
  return userEvent.keyboard("{Escape}");
740
1015
  case 3:
741
- return _context18.a(2);
1016
+ return _context26.a(2);
742
1017
  }
743
- }, _callee18);
1018
+ }, _callee26);
744
1019
  })));
745
1020
  case 2:
746
- _context26.n = 3;
747
- return step("Click the editor, then type text so list toggle works", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee19() {
1021
+ _context34.n = 3;
1022
+ return step("Click the editor, then type text so list toggle works", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee27() {
748
1023
  var editor;
749
- return _regenerator().w(function (_context19) {
750
- while (1) switch (_context19.n) {
1024
+ return _regenerator().w(function (_context27) {
1025
+ while (1) switch (_context27.n) {
751
1026
  case 0:
752
1027
  editor = canvas.getByRole("textbox");
753
- _context19.n = 1;
1028
+ _context27.n = 1;
754
1029
  return userEvent.click(editor);
755
1030
  case 1:
756
- _context19.n = 2;
1031
+ _context27.n = 2;
757
1032
  return userEvent.keyboard("List item text");
758
1033
  case 2:
759
- return _context19.a(2);
1034
+ return _context27.a(2);
760
1035
  }
761
- }, _callee19);
1036
+ }, _callee27);
762
1037
  })));
763
1038
  case 3:
764
- _context26.n = 4;
765
- return step("Toggle bullet list via keyboard shortcut", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee20() {
1039
+ _context34.n = 4;
1040
+ return step("Toggle bullet list via keyboard shortcut", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee28() {
766
1041
  var editor, mod;
767
- return _regenerator().w(function (_context20) {
768
- while (1) switch (_context20.n) {
1042
+ return _regenerator().w(function (_context28) {
1043
+ while (1) switch (_context28.n) {
769
1044
  case 0:
770
1045
  editor = canvas.getByRole("textbox");
771
- _context20.n = 1;
1046
+ _context28.n = 1;
772
1047
  return userEvent.click(editor);
773
1048
  case 1:
774
1049
  // TipTap binds list shortcuts to Mod-Shift-{7,8}: Meta on Mac, Control elsewhere
775
1050
  mod = /Mac/i.test(navigator.platform) ? "Meta" : "Control";
776
- _context20.n = 2;
1051
+ _context28.n = 2;
777
1052
  return userEvent.keyboard("{".concat(mod, ">}{Shift>}8{/Shift}{/").concat(mod, "}"));
778
1053
  case 2:
779
- _context20.n = 3;
1054
+ _context28.n = 3;
780
1055
  return waitFor(function () {
781
1056
  expect(editor.querySelector("ul")).toBeTruthy();
782
1057
  }, {
783
1058
  timeout: 3000
784
1059
  });
785
1060
  case 3:
786
- return _context20.a(2);
1061
+ return _context28.a(2);
787
1062
  }
788
- }, _callee20);
1063
+ }, _callee28);
789
1064
  })));
790
1065
  case 4:
791
- _context26.n = 5;
792
- return step("Unordered list mode: block style dropdown shows UL-applicable styles", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee21() {
1066
+ _context34.n = 5;
1067
+ return step("Unordered list mode: block style dropdown shows UL-applicable styles", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee29() {
793
1068
  var blockStyleSelect;
794
- return _regenerator().w(function (_context21) {
795
- while (1) switch (_context21.n) {
1069
+ return _regenerator().w(function (_context29) {
1070
+ while (1) switch (_context29.n) {
796
1071
  case 0:
797
- _context21.n = 1;
1072
+ _context29.n = 1;
798
1073
  return waitFor(function () {
799
1074
  expect(canvas.getAllByRole("combobox").length).toBeGreaterThanOrEqual(2);
800
1075
  }, {
@@ -802,10 +1077,10 @@ export var ListBlockStyles = {
802
1077
  });
803
1078
  case 1:
804
1079
  blockStyleSelect = canvas.getAllByRole("combobox")[1];
805
- _context21.n = 2;
1080
+ _context29.n = 2;
806
1081
  return userEvent.click(blockStyleSelect);
807
1082
  case 2:
808
- _context21.n = 3;
1083
+ _context29.n = 3;
809
1084
  return waitFor(function () {
810
1085
  var body = within(document.body);
811
1086
  expect(body.getByText("List Large")).toBeInTheDocument();
@@ -817,51 +1092,51 @@ export var ListBlockStyles = {
817
1092
  timeout: 3000
818
1093
  });
819
1094
  case 3:
820
- _context21.n = 4;
1095
+ _context29.n = 4;
821
1096
  return userEvent.keyboard("{Escape}");
822
1097
  case 4:
823
- return _context21.a(2);
1098
+ return _context29.a(2);
824
1099
  }
825
- }, _callee21);
1100
+ }, _callee29);
826
1101
  })));
827
1102
  case 5:
828
- _context26.n = 6;
829
- return step("Switch to ordered list via keyboard shortcut", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee22() {
1103
+ _context34.n = 6;
1104
+ return step("Switch to ordered list via keyboard shortcut", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee30() {
830
1105
  var editor, mod;
831
- return _regenerator().w(function (_context22) {
832
- while (1) switch (_context22.n) {
1106
+ return _regenerator().w(function (_context30) {
1107
+ while (1) switch (_context30.n) {
833
1108
  case 0:
834
1109
  editor = canvas.getByRole("textbox");
835
- _context22.n = 1;
1110
+ _context30.n = 1;
836
1111
  return userEvent.click(editor);
837
1112
  case 1:
838
1113
  mod = /Mac/i.test(navigator.platform) ? "Meta" : "Control";
839
- _context22.n = 2;
1114
+ _context30.n = 2;
840
1115
  return userEvent.keyboard("{".concat(mod, ">}{Shift>}7{/Shift}{/").concat(mod, "}"));
841
1116
  case 2:
842
- _context22.n = 3;
1117
+ _context30.n = 3;
843
1118
  return waitFor(function () {
844
1119
  expect(editor.querySelector("ol")).toBeTruthy();
845
1120
  }, {
846
1121
  timeout: 3000
847
1122
  });
848
1123
  case 3:
849
- return _context22.a(2);
1124
+ return _context30.a(2);
850
1125
  }
851
- }, _callee22);
1126
+ }, _callee30);
852
1127
  })));
853
1128
  case 6:
854
- _context26.n = 7;
855
- return step("Ordered list mode: block style dropdown includes OL-only style", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee23() {
1129
+ _context34.n = 7;
1130
+ return step("Ordered list mode: block style dropdown includes OL-only style", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee31() {
856
1131
  var blockStyleSelect;
857
- return _regenerator().w(function (_context23) {
858
- while (1) switch (_context23.n) {
1132
+ return _regenerator().w(function (_context31) {
1133
+ while (1) switch (_context31.n) {
859
1134
  case 0:
860
1135
  blockStyleSelect = canvas.getAllByRole("combobox")[1];
861
- _context23.n = 1;
1136
+ _context31.n = 1;
862
1137
  return userEvent.click(blockStyleSelect);
863
1138
  case 1:
864
- _context23.n = 2;
1139
+ _context31.n = 2;
865
1140
  return waitFor(function () {
866
1141
  var body = within(document.body);
867
1142
  expect(body.getByText("List Large")).toBeInTheDocument();
@@ -873,52 +1148,52 @@ export var ListBlockStyles = {
873
1148
  timeout: 3000
874
1149
  });
875
1150
  case 2:
876
- _context23.n = 3;
1151
+ _context31.n = 3;
877
1152
  return userEvent.keyboard("{Escape}");
878
1153
  case 3:
879
- return _context23.a(2);
1154
+ return _context31.a(2);
880
1155
  }
881
- }, _callee23);
1156
+ }, _callee31);
882
1157
  })));
883
1158
  case 7:
884
- _context26.n = 8;
885
- return step("Select 'List Large' style", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee24() {
1159
+ _context34.n = 8;
1160
+ return step("Select 'List Large' style", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee32() {
886
1161
  var blockStyleSelect;
887
- return _regenerator().w(function (_context24) {
888
- while (1) switch (_context24.n) {
1162
+ return _regenerator().w(function (_context32) {
1163
+ while (1) switch (_context32.n) {
889
1164
  case 0:
890
1165
  blockStyleSelect = canvas.getAllByRole("combobox")[1];
891
- _context24.n = 1;
1166
+ _context32.n = 1;
892
1167
  return userEvent.click(blockStyleSelect);
893
1168
  case 1:
894
- _context24.n = 2;
1169
+ _context32.n = 2;
895
1170
  return waitFor(function () {
896
1171
  expect(within(document.body).getByText("List Large")).toBeInTheDocument();
897
1172
  }, {
898
1173
  timeout: 3000
899
1174
  });
900
1175
  case 2:
901
- _context24.n = 3;
1176
+ _context32.n = 3;
902
1177
  return userEvent.click(within(document.body).getByText("List Large"));
903
1178
  case 3:
904
- _context24.n = 4;
1179
+ _context32.n = 4;
905
1180
  return waitFor(function () {
906
1181
  expect(canvas.getAllByRole("combobox")[1]).toHaveTextContent("List Large");
907
1182
  }, {
908
1183
  timeout: 3000
909
1184
  });
910
1185
  case 4:
911
- return _context24.a(2);
1186
+ return _context32.a(2);
912
1187
  }
913
- }, _callee24);
1188
+ }, _callee32);
914
1189
  })));
915
1190
  case 8:
916
- _context26.n = 9;
917
- return step("Verify 'list-large' block style attribute is applied in the editor", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee25() {
918
- return _regenerator().w(function (_context25) {
919
- while (1) switch (_context25.n) {
1191
+ _context34.n = 9;
1192
+ return step("Verify 'list-large' block style attribute is applied in the editor", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee33() {
1193
+ return _regenerator().w(function (_context33) {
1194
+ while (1) switch (_context33.n) {
920
1195
  case 0:
921
- _context25.n = 1;
1196
+ _context33.n = 1;
922
1197
  return waitFor(function () {
923
1198
  var styledEl = document.querySelector('[data-block-style="list-large"]');
924
1199
  expect(styledEl).toBeTruthy();
@@ -926,17 +1201,17 @@ export var ListBlockStyles = {
926
1201
  timeout: 3000
927
1202
  });
928
1203
  case 1:
929
- return _context25.a(2);
1204
+ return _context33.a(2);
930
1205
  }
931
- }, _callee25);
1206
+ }, _callee33);
932
1207
  })));
933
1208
  case 9:
934
- return _context26.a(2);
1209
+ return _context34.a(2);
935
1210
  }
936
- }, _callee26);
1211
+ }, _callee34);
937
1212
  }));
938
- function play(_x5) {
939
- return _play5.apply(this, arguments);
1213
+ function play(_x7) {
1214
+ return _play7.apply(this, arguments);
940
1215
  }
941
1216
  return play;
942
1217
  }()
@@ -945,10 +1220,10 @@ var MaxBlocksBlock = createTipTapRichTextBlock({
945
1220
  maxBlocks: 2
946
1221
  });
947
1222
  function MaxBlocksStory() {
948
- var _useState1 = useState(MaxBlocksBlock.defaultValues()),
949
- _useState10 = _slicedToArray(_useState1, 2),
950
- state = _useState10[0],
951
- setState = _useState10[1];
1223
+ var _useState13 = useState(MaxBlocksBlock.defaultValues()),
1224
+ _useState14 = _slicedToArray(_useState13, 2),
1225
+ state = _useState14[0],
1226
+ setState = _useState14[1];
952
1227
  return /*#__PURE__*/_jsx(StoryWrapper, {
953
1228
  state: state,
954
1229
  children: /*#__PURE__*/_jsx(MaxBlocksBlock.AdminComponent, {
@@ -962,49 +1237,49 @@ export var MaxBlocks = {
962
1237
  return /*#__PURE__*/_jsx(MaxBlocksStory, {});
963
1238
  },
964
1239
  play: function () {
965
- var _play6 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee30(_ref29) {
1240
+ var _play8 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee38(_ref37) {
966
1241
  var canvas, userEvent, step;
967
- return _regenerator().w(function (_context30) {
968
- while (1) switch (_context30.n) {
1242
+ return _regenerator().w(function (_context38) {
1243
+ while (1) switch (_context38.n) {
969
1244
  case 0:
970
- canvas = _ref29.canvas, userEvent = _ref29.userEvent, step = _ref29.step;
971
- _context30.n = 1;
972
- return step("Editor is ready", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee27() {
973
- return _regenerator().w(function (_context27) {
974
- while (1) switch (_context27.n) {
1245
+ canvas = _ref37.canvas, userEvent = _ref37.userEvent, step = _ref37.step;
1246
+ _context38.n = 1;
1247
+ return step("Editor is ready", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee35() {
1248
+ return _regenerator().w(function (_context35) {
1249
+ while (1) switch (_context35.n) {
975
1250
  case 0:
976
- _context27.n = 1;
1251
+ _context35.n = 1;
977
1252
  return waitFor(function () {
978
1253
  expect(canvas.getByRole("textbox")).toBeInTheDocument();
979
1254
  }, {
980
1255
  timeout: 5000
981
1256
  });
982
1257
  case 1:
983
- return _context27.a(2);
1258
+ return _context35.a(2);
984
1259
  }
985
- }, _callee27);
1260
+ }, _callee35);
986
1261
  })));
987
1262
  case 1:
988
- _context30.n = 2;
989
- return step("Type text and press Enter to create blocks", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee28() {
1263
+ _context38.n = 2;
1264
+ return step("Type text and press Enter to create blocks", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee36() {
990
1265
  var editor;
991
- return _regenerator().w(function (_context28) {
992
- while (1) switch (_context28.n) {
1266
+ return _regenerator().w(function (_context36) {
1267
+ while (1) switch (_context36.n) {
993
1268
  case 0:
994
1269
  editor = canvas.getByRole("textbox");
995
- _context28.n = 1;
1270
+ _context36.n = 1;
996
1271
  return userEvent.click(editor);
997
1272
  case 1:
998
- _context28.n = 2;
1273
+ _context36.n = 2;
999
1274
  return userEvent.keyboard("First block");
1000
1275
  case 2:
1001
- _context28.n = 3;
1276
+ _context36.n = 3;
1002
1277
  return userEvent.keyboard("{Enter}");
1003
1278
  case 3:
1004
- _context28.n = 4;
1279
+ _context36.n = 4;
1005
1280
  return userEvent.keyboard("Second block");
1006
1281
  case 4:
1007
- _context28.n = 5;
1282
+ _context36.n = 5;
1008
1283
  return waitFor(function () {
1009
1284
  expect(editor).toHaveTextContent("First block");
1010
1285
  expect(editor).toHaveTextContent("Second block");
@@ -1012,25 +1287,25 @@ export var MaxBlocks = {
1012
1287
  timeout: 3000
1013
1288
  });
1014
1289
  case 5:
1015
- return _context28.a(2);
1290
+ return _context36.a(2);
1016
1291
  }
1017
- }, _callee28);
1292
+ }, _callee36);
1018
1293
  })));
1019
1294
  case 2:
1020
- _context30.n = 3;
1021
- return step("Third Enter does not create a new block (maxBlocks=2 enforced)", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee29() {
1295
+ _context38.n = 3;
1296
+ return step("Third Enter does not create a new block (maxBlocks=2 enforced)", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee37() {
1022
1297
  var editor;
1023
- return _regenerator().w(function (_context29) {
1024
- while (1) switch (_context29.n) {
1298
+ return _regenerator().w(function (_context37) {
1299
+ while (1) switch (_context37.n) {
1025
1300
  case 0:
1026
1301
  editor = canvas.getByRole("textbox");
1027
- _context29.n = 1;
1302
+ _context37.n = 1;
1028
1303
  return userEvent.keyboard("{Enter}");
1029
1304
  case 1:
1030
- _context29.n = 2;
1305
+ _context37.n = 2;
1031
1306
  return userEvent.keyboard("Third block");
1032
1307
  case 2:
1033
- _context29.n = 3;
1308
+ _context37.n = 3;
1034
1309
  return waitFor(function () {
1035
1310
  // Should still only have 2 paragraphs in the output
1036
1311
  var paragraphs = editor.querySelectorAll("p");
@@ -1039,17 +1314,17 @@ export var MaxBlocks = {
1039
1314
  timeout: 3000
1040
1315
  });
1041
1316
  case 3:
1042
- return _context29.a(2);
1317
+ return _context37.a(2);
1043
1318
  }
1044
- }, _callee29);
1319
+ }, _callee37);
1045
1320
  })));
1046
1321
  case 3:
1047
- return _context30.a(2);
1322
+ return _context38.a(2);
1048
1323
  }
1049
- }, _callee30);
1324
+ }, _callee38);
1050
1325
  }));
1051
- function play(_x6) {
1052
- return _play6.apply(this, arguments);
1326
+ function play(_x8) {
1327
+ return _play8.apply(this, arguments);
1053
1328
  }
1054
1329
  return play;
1055
1330
  }()
@@ -1082,10 +1357,10 @@ var InlineStylesBlock = createTipTapRichTextBlock({
1082
1357
  }]
1083
1358
  });
1084
1359
  function InlineStylesStory() {
1085
- var _useState11 = useState(InlineStylesBlock.defaultValues()),
1086
- _useState12 = _slicedToArray(_useState11, 2),
1087
- state = _useState12[0],
1088
- setState = _useState12[1];
1360
+ var _useState15 = useState(InlineStylesBlock.defaultValues()),
1361
+ _useState16 = _slicedToArray(_useState15, 2),
1362
+ state = _useState16[0],
1363
+ setState = _useState16[1];
1089
1364
  return /*#__PURE__*/_jsx(StoryWrapper, {
1090
1365
  state: state,
1091
1366
  children: /*#__PURE__*/_jsx(InlineStylesBlock.AdminComponent, {
@@ -1099,19 +1374,19 @@ export var InlineStyles = {
1099
1374
  return /*#__PURE__*/_jsx(InlineStylesStory, {});
1100
1375
  },
1101
1376
  play: function () {
1102
- var _play7 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee38(_ref33) {
1377
+ var _play9 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee46(_ref41) {
1103
1378
  var canvas, userEvent, step;
1104
- return _regenerator().w(function (_context38) {
1105
- while (1) switch (_context38.n) {
1379
+ return _regenerator().w(function (_context46) {
1380
+ while (1) switch (_context46.n) {
1106
1381
  case 0:
1107
- canvas = _ref33.canvas, userEvent = _ref33.userEvent, step = _ref33.step;
1108
- _context38.n = 1;
1109
- return step("Editor is ready", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee31() {
1382
+ canvas = _ref41.canvas, userEvent = _ref41.userEvent, step = _ref41.step;
1383
+ _context46.n = 1;
1384
+ return step("Editor is ready", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee39() {
1110
1385
  var comboboxes;
1111
- return _regenerator().w(function (_context31) {
1112
- while (1) switch (_context31.n) {
1386
+ return _regenerator().w(function (_context39) {
1387
+ while (1) switch (_context39.n) {
1113
1388
  case 0:
1114
- _context31.n = 1;
1389
+ _context39.n = 1;
1115
1390
  return waitFor(function () {
1116
1391
  expect(canvas.getByRole("textbox")).toBeInTheDocument();
1117
1392
  }, {
@@ -1122,25 +1397,25 @@ export var InlineStyles = {
1122
1397
  comboboxes = canvas.getAllByRole("combobox");
1123
1398
  expect(comboboxes).toHaveLength(2);
1124
1399
  case 2:
1125
- return _context31.a(2);
1400
+ return _context39.a(2);
1126
1401
  }
1127
- }, _callee31);
1402
+ }, _callee39);
1128
1403
  })));
1129
1404
  case 1:
1130
- _context38.n = 2;
1131
- return step("Type text and select it", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee32() {
1405
+ _context46.n = 2;
1406
+ return step("Type text and select it", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee40() {
1132
1407
  var editor, range, selection;
1133
- return _regenerator().w(function (_context32) {
1134
- while (1) switch (_context32.n) {
1408
+ return _regenerator().w(function (_context40) {
1409
+ while (1) switch (_context40.n) {
1135
1410
  case 0:
1136
1411
  editor = canvas.getByRole("textbox");
1137
- _context32.n = 1;
1412
+ _context40.n = 1;
1138
1413
  return userEvent.click(editor);
1139
1414
  case 1:
1140
- _context32.n = 2;
1415
+ _context40.n = 2;
1141
1416
  return userEvent.keyboard("hello");
1142
1417
  case 2:
1143
- _context32.n = 3;
1418
+ _context40.n = 3;
1144
1419
  return waitFor(function () {
1145
1420
  expect(editor).toHaveTextContent("hello");
1146
1421
  }, {
@@ -1155,29 +1430,29 @@ export var InlineStyles = {
1155
1430
  selection === null || selection === void 0 || selection.addRange(range);
1156
1431
 
1157
1432
  // Wait for the inline-style dropdown to enable (TipTap picks up selection via the selectionchange event).
1158
- _context32.n = 4;
1433
+ _context40.n = 4;
1159
1434
  return waitFor(function () {
1160
1435
  expect(canvas.getAllByRole("combobox")[1]).not.toBeDisabled();
1161
1436
  }, {
1162
1437
  timeout: 3000
1163
1438
  });
1164
1439
  case 4:
1165
- return _context32.a(2);
1440
+ return _context40.a(2);
1166
1441
  }
1167
- }, _callee32);
1442
+ }, _callee40);
1168
1443
  })));
1169
1444
  case 2:
1170
- _context38.n = 3;
1171
- return step("Apply 'Highlight' inline style", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee33() {
1445
+ _context46.n = 3;
1446
+ return step("Apply 'Highlight' inline style", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee41() {
1172
1447
  var inlineStyleSelect;
1173
- return _regenerator().w(function (_context33) {
1174
- while (1) switch (_context33.n) {
1448
+ return _regenerator().w(function (_context41) {
1449
+ while (1) switch (_context41.n) {
1175
1450
  case 0:
1176
1451
  inlineStyleSelect = canvas.getAllByRole("combobox")[1];
1177
- _context33.n = 1;
1452
+ _context41.n = 1;
1178
1453
  return userEvent.click(inlineStyleSelect);
1179
1454
  case 1:
1180
- _context33.n = 2;
1455
+ _context41.n = 2;
1181
1456
  return waitFor(function () {
1182
1457
  expect(within(document.body).getByRole("option", {
1183
1458
  name: "Highlight"
@@ -1186,29 +1461,29 @@ export var InlineStyles = {
1186
1461
  timeout: 3000
1187
1462
  });
1188
1463
  case 2:
1189
- _context33.n = 3;
1464
+ _context41.n = 3;
1190
1465
  return userEvent.click(within(document.body).getByRole("option", {
1191
1466
  name: "Highlight"
1192
1467
  }));
1193
1468
  case 3:
1194
- _context33.n = 4;
1469
+ _context41.n = 4;
1195
1470
  return waitFor(function () {
1196
1471
  expect(canvas.getAllByRole("combobox")[1]).toHaveTextContent("Highlight");
1197
1472
  }, {
1198
1473
  timeout: 3000
1199
1474
  });
1200
1475
  case 4:
1201
- return _context33.a(2);
1476
+ return _context41.a(2);
1202
1477
  }
1203
- }, _callee33);
1478
+ }, _callee41);
1204
1479
  })));
1205
1480
  case 3:
1206
- _context38.n = 4;
1207
- return step("Verify highlight element (from `element` prop) is rendered with its styling", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee34() {
1208
- return _regenerator().w(function (_context34) {
1209
- while (1) switch (_context34.n) {
1481
+ _context46.n = 4;
1482
+ return step("Verify highlight element (from `element` prop) is rendered with its styling", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee42() {
1483
+ return _regenerator().w(function (_context42) {
1484
+ while (1) switch (_context42.n) {
1210
1485
  case 0:
1211
- _context34.n = 1;
1486
+ _context42.n = 1;
1212
1487
  return waitFor(function () {
1213
1488
  var styledEl = document.querySelector('[data-inline-style="highlight"]');
1214
1489
  expect(styledEl).toBeTruthy();
@@ -1220,22 +1495,22 @@ export var InlineStyles = {
1220
1495
  timeout: 3000
1221
1496
  });
1222
1497
  case 1:
1223
- return _context34.a(2);
1498
+ return _context42.a(2);
1224
1499
  }
1225
- }, _callee34);
1500
+ }, _callee42);
1226
1501
  })));
1227
1502
  case 4:
1228
- _context38.n = 5;
1229
- return step("Switch to 'Tag' inline style", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee35() {
1503
+ _context46.n = 5;
1504
+ return step("Switch to 'Tag' inline style", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee43() {
1230
1505
  var inlineStyleSelect;
1231
- return _regenerator().w(function (_context35) {
1232
- while (1) switch (_context35.n) {
1506
+ return _regenerator().w(function (_context43) {
1507
+ while (1) switch (_context43.n) {
1233
1508
  case 0:
1234
1509
  inlineStyleSelect = canvas.getAllByRole("combobox")[1];
1235
- _context35.n = 1;
1510
+ _context43.n = 1;
1236
1511
  return userEvent.click(inlineStyleSelect);
1237
1512
  case 1:
1238
- _context35.n = 2;
1513
+ _context43.n = 2;
1239
1514
  return waitFor(function () {
1240
1515
  expect(within(document.body).getByRole("option", {
1241
1516
  name: "Tag"
@@ -1244,22 +1519,22 @@ export var InlineStyles = {
1244
1519
  timeout: 3000
1245
1520
  });
1246
1521
  case 2:
1247
- _context35.n = 3;
1522
+ _context43.n = 3;
1248
1523
  return userEvent.click(within(document.body).getByRole("option", {
1249
1524
  name: "Tag"
1250
1525
  }));
1251
1526
  case 3:
1252
- return _context35.a(2);
1527
+ return _context43.a(2);
1253
1528
  }
1254
- }, _callee35);
1529
+ }, _callee43);
1255
1530
  })));
1256
1531
  case 5:
1257
- _context38.n = 6;
1258
- return step("Verify tag element replaces the highlight element", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee36() {
1259
- return _regenerator().w(function (_context36) {
1260
- while (1) switch (_context36.n) {
1532
+ _context46.n = 6;
1533
+ return step("Verify tag element replaces the highlight element", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee44() {
1534
+ return _regenerator().w(function (_context44) {
1535
+ while (1) switch (_context44.n) {
1261
1536
  case 0:
1262
- _context36.n = 1;
1537
+ _context44.n = 1;
1263
1538
  return waitFor(function () {
1264
1539
  expect(document.querySelector('[data-inline-style="highlight"]')).toBeNull();
1265
1540
  var tagEl = document.querySelector('[data-inline-style="tag"]');
@@ -1273,22 +1548,22 @@ export var InlineStyles = {
1273
1548
  timeout: 3000
1274
1549
  });
1275
1550
  case 1:
1276
- return _context36.a(2);
1551
+ return _context44.a(2);
1277
1552
  }
1278
- }, _callee36);
1553
+ }, _callee44);
1279
1554
  })));
1280
1555
  case 6:
1281
- _context38.n = 7;
1282
- return step("Clear inline style resets to default rendering", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee37() {
1556
+ _context46.n = 7;
1557
+ return step("Clear inline style resets to default rendering", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee45() {
1283
1558
  var inlineStyleSelect;
1284
- return _regenerator().w(function (_context37) {
1285
- while (1) switch (_context37.n) {
1559
+ return _regenerator().w(function (_context45) {
1560
+ while (1) switch (_context45.n) {
1286
1561
  case 0:
1287
1562
  inlineStyleSelect = canvas.getAllByRole("combobox")[1];
1288
- _context37.n = 1;
1563
+ _context45.n = 1;
1289
1564
  return userEvent.click(inlineStyleSelect);
1290
1565
  case 1:
1291
- _context37.n = 2;
1566
+ _context45.n = 2;
1292
1567
  return waitFor(function () {
1293
1568
  expect(within(document.body).getByRole("option", {
1294
1569
  name: "Default"
@@ -1297,29 +1572,29 @@ export var InlineStyles = {
1297
1572
  timeout: 3000
1298
1573
  });
1299
1574
  case 2:
1300
- _context37.n = 3;
1575
+ _context45.n = 3;
1301
1576
  return userEvent.click(within(document.body).getByRole("option", {
1302
1577
  name: "Default"
1303
1578
  }));
1304
1579
  case 3:
1305
- _context37.n = 4;
1580
+ _context45.n = 4;
1306
1581
  return waitFor(function () {
1307
1582
  expect(document.querySelector("[data-inline-style]")).toBeNull();
1308
1583
  }, {
1309
1584
  timeout: 3000
1310
1585
  });
1311
1586
  case 4:
1312
- return _context37.a(2);
1587
+ return _context45.a(2);
1313
1588
  }
1314
- }, _callee37);
1589
+ }, _callee45);
1315
1590
  })));
1316
1591
  case 7:
1317
- return _context38.a(2);
1592
+ return _context46.a(2);
1318
1593
  }
1319
- }, _callee38);
1594
+ }, _callee46);
1320
1595
  }));
1321
- function play(_x7) {
1322
- return _play7.apply(this, arguments);
1596
+ function play(_x9) {
1597
+ return _play9.apply(this, arguments);
1323
1598
  }
1324
1599
  return play;
1325
1600
  }()
@@ -1328,10 +1603,10 @@ var ListLevelMaxBlock = createTipTapRichTextBlock({
1328
1603
  listLevelMax: 2
1329
1604
  });
1330
1605
  function ListLevelMaxStory() {
1331
- var _useState13 = useState(ListLevelMaxBlock.defaultValues()),
1332
- _useState14 = _slicedToArray(_useState13, 2),
1333
- state = _useState14[0],
1334
- setState = _useState14[1];
1606
+ var _useState17 = useState(ListLevelMaxBlock.defaultValues()),
1607
+ _useState18 = _slicedToArray(_useState17, 2),
1608
+ state = _useState18[0],
1609
+ setState = _useState18[1];
1335
1610
  return /*#__PURE__*/_jsx(StoryWrapper, {
1336
1611
  state: state,
1337
1612
  children: /*#__PURE__*/_jsx(ListLevelMaxBlock.AdminComponent, {
@@ -1345,76 +1620,76 @@ export var ListLevelMax = {
1345
1620
  return /*#__PURE__*/_jsx(ListLevelMaxStory, {});
1346
1621
  },
1347
1622
  play: function () {
1348
- var _play8 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee43(_ref41) {
1623
+ var _play0 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee51(_ref49) {
1349
1624
  var canvas, userEvent, step;
1350
- return _regenerator().w(function (_context43) {
1351
- while (1) switch (_context43.n) {
1625
+ return _regenerator().w(function (_context51) {
1626
+ while (1) switch (_context51.n) {
1352
1627
  case 0:
1353
- canvas = _ref41.canvas, userEvent = _ref41.userEvent, step = _ref41.step;
1354
- _context43.n = 1;
1355
- return step("Editor is ready", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee39() {
1356
- return _regenerator().w(function (_context39) {
1357
- while (1) switch (_context39.n) {
1628
+ canvas = _ref49.canvas, userEvent = _ref49.userEvent, step = _ref49.step;
1629
+ _context51.n = 1;
1630
+ return step("Editor is ready", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee47() {
1631
+ return _regenerator().w(function (_context47) {
1632
+ while (1) switch (_context47.n) {
1358
1633
  case 0:
1359
- _context39.n = 1;
1634
+ _context47.n = 1;
1360
1635
  return waitFor(function () {
1361
1636
  expect(canvas.getByRole("textbox")).toBeInTheDocument();
1362
1637
  }, {
1363
1638
  timeout: 5000
1364
1639
  });
1365
1640
  case 1:
1366
- return _context39.a(2);
1641
+ return _context47.a(2);
1367
1642
  }
1368
- }, _callee39);
1643
+ }, _callee47);
1369
1644
  })));
1370
1645
  case 1:
1371
- _context43.n = 2;
1372
- return step("Create a bullet list", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee40() {
1646
+ _context51.n = 2;
1647
+ return step("Create a bullet list", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee48() {
1373
1648
  var editor, mod;
1374
- return _regenerator().w(function (_context40) {
1375
- while (1) switch (_context40.n) {
1649
+ return _regenerator().w(function (_context48) {
1650
+ while (1) switch (_context48.n) {
1376
1651
  case 0:
1377
1652
  editor = canvas.getByRole("textbox");
1378
- _context40.n = 1;
1653
+ _context48.n = 1;
1379
1654
  return userEvent.click(editor);
1380
1655
  case 1:
1381
- _context40.n = 2;
1656
+ _context48.n = 2;
1382
1657
  return userEvent.keyboard("Item 1");
1383
1658
  case 2:
1384
1659
  // Toggle bullet list using keyboard shortcut
1385
1660
  mod = /Mac/i.test(navigator.platform) ? "Meta" : "Control";
1386
- _context40.n = 3;
1661
+ _context48.n = 3;
1387
1662
  return userEvent.keyboard("{".concat(mod, ">}{Shift>}8{/Shift}{/").concat(mod, "}"));
1388
1663
  case 3:
1389
- _context40.n = 4;
1664
+ _context48.n = 4;
1390
1665
  return waitFor(function () {
1391
1666
  expect(editor.querySelector("ul")).toBeTruthy();
1392
1667
  }, {
1393
1668
  timeout: 3000
1394
1669
  });
1395
1670
  case 4:
1396
- return _context40.a(2);
1671
+ return _context48.a(2);
1397
1672
  }
1398
- }, _callee40);
1673
+ }, _callee48);
1399
1674
  })));
1400
1675
  case 2:
1401
- _context43.n = 3;
1402
- return step("Create a second list item and indent it (allowed, depth 2)", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee41() {
1676
+ _context51.n = 3;
1677
+ return step("Create a second list item and indent it (allowed, depth 2)", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee49() {
1403
1678
  var editor;
1404
- return _regenerator().w(function (_context41) {
1405
- while (1) switch (_context41.n) {
1679
+ return _regenerator().w(function (_context49) {
1680
+ while (1) switch (_context49.n) {
1406
1681
  case 0:
1407
1682
  editor = canvas.getByRole("textbox");
1408
- _context41.n = 1;
1683
+ _context49.n = 1;
1409
1684
  return userEvent.keyboard("{Enter}");
1410
1685
  case 1:
1411
- _context41.n = 2;
1686
+ _context49.n = 2;
1412
1687
  return userEvent.keyboard("Item 2");
1413
1688
  case 2:
1414
- _context41.n = 3;
1689
+ _context49.n = 3;
1415
1690
  return userEvent.keyboard("{Tab}");
1416
1691
  case 3:
1417
- _context41.n = 4;
1692
+ _context49.n = 4;
1418
1693
  return waitFor(function () {
1419
1694
  // Should have nested ul (depth 2)
1420
1695
  var nestedUl = editor.querySelector("ul ul");
@@ -1423,28 +1698,28 @@ export var ListLevelMax = {
1423
1698
  timeout: 3000
1424
1699
  });
1425
1700
  case 4:
1426
- return _context41.a(2);
1701
+ return _context49.a(2);
1427
1702
  }
1428
- }, _callee41);
1703
+ }, _callee49);
1429
1704
  })));
1430
1705
  case 3:
1431
- _context43.n = 4;
1432
- return step("Try to indent further (should be blocked, depth would exceed 2)", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee42() {
1706
+ _context51.n = 4;
1707
+ return step("Try to indent further (should be blocked, depth would exceed 2)", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee50() {
1433
1708
  var editor;
1434
- return _regenerator().w(function (_context42) {
1435
- while (1) switch (_context42.n) {
1709
+ return _regenerator().w(function (_context50) {
1710
+ while (1) switch (_context50.n) {
1436
1711
  case 0:
1437
1712
  editor = canvas.getByRole("textbox");
1438
- _context42.n = 1;
1713
+ _context50.n = 1;
1439
1714
  return userEvent.keyboard("{Enter}");
1440
1715
  case 1:
1441
- _context42.n = 2;
1716
+ _context50.n = 2;
1442
1717
  return userEvent.keyboard("Item 3");
1443
1718
  case 2:
1444
- _context42.n = 3;
1719
+ _context50.n = 3;
1445
1720
  return userEvent.keyboard("{Tab}");
1446
1721
  case 3:
1447
- _context42.n = 4;
1722
+ _context50.n = 4;
1448
1723
  return waitFor(function () {
1449
1724
  // Should NOT have triple-nested ul (depth 3 not allowed)
1450
1725
  var tripleNestedUl = editor.querySelector("ul ul ul");
@@ -1453,17 +1728,17 @@ export var ListLevelMax = {
1453
1728
  timeout: 3000
1454
1729
  });
1455
1730
  case 4:
1456
- return _context42.a(2);
1731
+ return _context50.a(2);
1457
1732
  }
1458
- }, _callee42);
1733
+ }, _callee50);
1459
1734
  })));
1460
1735
  case 4:
1461
- return _context43.a(2);
1736
+ return _context51.a(2);
1462
1737
  }
1463
- }, _callee43);
1738
+ }, _callee51);
1464
1739
  }));
1465
- function play(_x8) {
1466
- return _play8.apply(this, arguments);
1740
+ function play(_x0) {
1741
+ return _play0.apply(this, arguments);
1467
1742
  }
1468
1743
  return play;
1469
1744
  }()
@@ -1509,10 +1784,10 @@ var CombinedStylesBlock = createTipTapRichTextBlock({
1509
1784
  }]
1510
1785
  });
1511
1786
  function CombinedStylesStory() {
1512
- var _useState15 = useState(CombinedStylesBlock.defaultValues()),
1513
- _useState16 = _slicedToArray(_useState15, 2),
1514
- state = _useState16[0],
1515
- setState = _useState16[1];
1787
+ var _useState19 = useState(CombinedStylesBlock.defaultValues()),
1788
+ _useState20 = _slicedToArray(_useState19, 2),
1789
+ state = _useState20[0],
1790
+ setState = _useState20[1];
1516
1791
  return /*#__PURE__*/_jsx(StoryWrapper, {
1517
1792
  state: state,
1518
1793
  children: /*#__PURE__*/_jsx(CombinedStylesBlock.AdminComponent, {
@@ -1526,19 +1801,19 @@ export var CombinedBlockAndInlineStyles = {
1526
1801
  return /*#__PURE__*/_jsx(CombinedStylesStory, {});
1527
1802
  },
1528
1803
  play: function () {
1529
- var _play9 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee45(_ref46) {
1804
+ var _play1 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee53(_ref54) {
1530
1805
  var canvas, step;
1531
- return _regenerator().w(function (_context45) {
1532
- while (1) switch (_context45.n) {
1806
+ return _regenerator().w(function (_context53) {
1807
+ while (1) switch (_context53.n) {
1533
1808
  case 0:
1534
- canvas = _ref46.canvas, step = _ref46.step;
1535
- _context45.n = 1;
1536
- return step("Editor is ready with both block style and inline style dropdowns", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee44() {
1809
+ canvas = _ref54.canvas, step = _ref54.step;
1810
+ _context53.n = 1;
1811
+ return step("Editor is ready with both block style and inline style dropdowns", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee52() {
1537
1812
  var comboboxes;
1538
- return _regenerator().w(function (_context44) {
1539
- while (1) switch (_context44.n) {
1813
+ return _regenerator().w(function (_context52) {
1814
+ while (1) switch (_context52.n) {
1540
1815
  case 0:
1541
- _context44.n = 1;
1816
+ _context52.n = 1;
1542
1817
  return waitFor(function () {
1543
1818
  expect(canvas.getByRole("textbox")).toBeInTheDocument();
1544
1819
  }, {
@@ -1549,17 +1824,17 @@ export var CombinedBlockAndInlineStyles = {
1549
1824
  comboboxes = canvas.getAllByRole("combobox");
1550
1825
  expect(comboboxes.length).toBeGreaterThanOrEqual(3);
1551
1826
  case 2:
1552
- return _context44.a(2);
1827
+ return _context52.a(2);
1553
1828
  }
1554
- }, _callee44);
1829
+ }, _callee52);
1555
1830
  })));
1556
1831
  case 1:
1557
- return _context45.a(2);
1832
+ return _context53.a(2);
1558
1833
  }
1559
- }, _callee45);
1834
+ }, _callee53);
1560
1835
  }));
1561
- function play(_x9) {
1562
- return _play9.apply(this, arguments);
1836
+ function play(_x1) {
1837
+ return _play1.apply(this, arguments);
1563
1838
  }
1564
1839
  return play;
1565
1840
  }()