rme 0.3.0-beta.31 → 0.3.0-beta.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -567,10 +567,10 @@ var FlatListStyles = css`
567
567
  counter-increment: prosemirror-flat-list-counter;
568
568
 
569
569
  /*
570
- Reset the counter for the first list node in the sequence.
570
+ Reset the counter for the first list node in the sequence or when
571
+ the previous sibling is not a list (paragraph break).
571
572
  */
572
- &:first-child,
573
- :not(&) + & {
573
+ &:first-child {
574
574
  counter-reset: prosemirror-flat-list-counter;
575
575
 
576
576
  /*
@@ -620,6 +620,24 @@ var FlatListStyles = css`
620
620
  }
621
621
  }
622
622
  }
623
+
624
+ /*
625
+ Reset counter when an ordered list follows a non-list element.
626
+ This handles the case where there's a paragraph break (e.g., h3) between lists.
627
+ */
628
+ :not(.prosemirror-flat-list) + .prosemirror-flat-list[data-list-kind='ordered'] {
629
+ counter-reset: prosemirror-flat-list-counter;
630
+
631
+ &[data-list-order] {
632
+ @supports (counter-set: prosemirror-flat-list-counter 1) {
633
+ counter-set: prosemirror-flat-list-counter var(--prosemirror-flat-list-order);
634
+ }
635
+
636
+ @supports not (counter-set: prosemirror-flat-list-counter 1) {
637
+ counter-increment: prosemirror-flat-list-counter var(--prosemirror-flat-list-order);
638
+ }
639
+ }
640
+ }
623
641
  `;
624
642
 
625
643
  // src/editor/theme/WysiwygThemeWrapper.tsx