Skip to content

Commit b5bed4b

Browse files
committed
chore(deps): bump tiptap to 3.32.2 and keep headings that open a list item
Bump every @tiptap/* package to 3.32.2 and raise the root prosemirror-transform override to 1.12.4 (@tiptap/pm 3.32 requires ^1.12.2). @tiptap/extension-list 3.32 demotes a heading that opens a list item to the item's paragraph, so `- # Title` loaded and saved as `- Title`. CommonMark reads it as a heading inside the item, which the Sim schema already supports; MarkdownListItem now parses that case as blocks itself. @tiptap/y-tiptap stays on 3.0.7: 3.0.8+ replaces a list's Yjs element when a sibling is merged into it, discarding concurrent peer edits inside the list.
1 parent d7f3158 commit b5bed4b

4 files changed

Lines changed: 85 additions & 77 deletions

File tree

‎apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/list-item.ts‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ function listItemMarker(context: RenderContext): string {
1212
/**
1313
* Markdown items may start with a nested block, but the list-item schema requires a paragraph
1414
* first. Supply that empty paragraph before Yjs hydration can discard the invalid subtree.
15+
* Upstream demotes an opening heading (`- # Title`) to the item's paragraph, dropping its level;
16+
* CommonMark reads it as a heading inside the item, so parse it as a block like any other.
1517
*
1618
* Nested blocks keep the two-space indent under every marker. Upstream aligns ordered-item
1719
* children to the marker width, but its ordered-list tokenizer strips one column less, so a
@@ -20,7 +22,13 @@ function listItemMarker(context: RenderContext): string {
2022
*/
2123
export const MarkdownListItem = ListItem.extend({
2224
parseMarkdown(token, helpers) {
23-
const parsed = this.parent?.(token, helpers) ?? []
25+
const parsed =
26+
token.type === 'list_item' && token.tokens?.[0]?.type === 'heading'
27+
? {
28+
type: this.name,
29+
content: (helpers.parseBlockChildren ?? helpers.parseChildren)(token.tokens),
30+
}
31+
: (this.parent?.(token, helpers) ?? [])
2432
if (Array.isArray(parsed)) return parsed
2533
const content = (parsed.content ?? []).flatMap(splitBlockImageParagraph)
2634
if (content[0]?.type !== 'paragraph') content.unshift({ type: 'paragraph' })

‎apps/sim/package.json‎

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -167,23 +167,23 @@
167167
"@t3-oss/env-nextjs": "0.13.11",
168168
"@tanstack/react-query": "5.90.8",
169169
"@tanstack/react-virtual": "3.13.24",
170-
"@tiptap/core": "3.31.4",
171-
"@tiptap/extension-code": "3.31.4",
172-
"@tiptap/extension-code-block": "3.31.4",
173-
"@tiptap/extension-collaboration": "3.31.4",
174-
"@tiptap/extension-collaboration-caret": "3.31.4",
175-
"@tiptap/extension-document": "3.31.4",
176-
"@tiptap/extension-hard-break": "3.31.4",
177-
"@tiptap/extension-image": "3.31.4",
178-
"@tiptap/extension-list": "3.31.4",
179-
"@tiptap/extension-paragraph": "3.31.4",
180-
"@tiptap/extension-placeholder": "3.31.4",
181-
"@tiptap/extension-table": "3.31.4",
182-
"@tiptap/markdown": "3.31.4",
183-
"@tiptap/pm": "3.31.4",
184-
"@tiptap/react": "3.31.4",
185-
"@tiptap/starter-kit": "3.31.4",
186-
"@tiptap/suggestion": "3.31.4",
170+
"@tiptap/core": "3.32.2",
171+
"@tiptap/extension-code": "3.32.2",
172+
"@tiptap/extension-code-block": "3.32.2",
173+
"@tiptap/extension-collaboration": "3.32.2",
174+
"@tiptap/extension-collaboration-caret": "3.32.2",
175+
"@tiptap/extension-document": "3.32.2",
176+
"@tiptap/extension-hard-break": "3.32.2",
177+
"@tiptap/extension-image": "3.32.2",
178+
"@tiptap/extension-list": "3.32.2",
179+
"@tiptap/extension-paragraph": "3.32.2",
180+
"@tiptap/extension-placeholder": "3.32.2",
181+
"@tiptap/extension-table": "3.32.2",
182+
"@tiptap/markdown": "3.32.2",
183+
"@tiptap/pm": "3.32.2",
184+
"@tiptap/react": "3.32.2",
185+
"@tiptap/starter-kit": "3.32.2",
186+
"@tiptap/suggestion": "3.32.2",
187187
"@tiptap/y-tiptap": "3.0.7",
188188
"@trigger.dev/core": "4.8.3",
189189
"@trigger.dev/sdk": "4.8.3",

0 commit comments

Comments
 (0)