@ai-matrx/rich-content 0.2.50 → 0.2.51

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/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.51
4
+
5
+ - A list holding a checklist item keeps its bullets and indent: remark-gfm's `contains-task-list` class is merged into the list's own classes instead of replacing them (prose renderer and the configurable chat renderer). Checklist items show only their checkbox (`list-none`). Live: notes Split showed `- item a` beside `- [ ] todo` as plain lines.
6
+
7
+ Consumer action: none.
3
8
 
4
9
  ## 0.2.50
5
10
 
@@ -364,7 +364,7 @@ const ConfigurableMarkdownContentBody = ({
364
364
  );
365
365
  }),
366
366
  // ---- ul ----
367
- ul: componentOverrides?.ul ?? (({ node, children, ...props }) => {
367
+ ul: componentOverrides?.ul ?? (({ node, children, className, ...props }) => {
368
368
  const listText = extractText(children);
369
369
  const listDirection = detectTextDirection(listText);
370
370
  return /* @__PURE__ */ jsx(
@@ -377,7 +377,9 @@ const ConfigurableMarkdownContentBody = ({
377
377
  typography.leading,
378
378
  getFontSize(listDirection),
379
379
  spacing.listPl,
380
- getDirectionClasses(listDirection)
380
+ getDirectionClasses(listDirection),
381
+ // remark-gfm's `contains-task-list`: merged, never spread over ours.
382
+ className
381
383
  ),
382
384
  dir: listDirection,
383
385
  ...props,
@@ -386,7 +388,7 @@ const ConfigurableMarkdownContentBody = ({
386
388
  );
387
389
  }),
388
390
  // ---- ol ----
389
- ol: componentOverrides?.ol ?? (({ node, children, ...props }) => {
391
+ ol: componentOverrides?.ol ?? (({ node, children, className, ...props }) => {
390
392
  const listText = extractText(children);
391
393
  const listDirection = detectTextDirection(listText);
392
394
  return /* @__PURE__ */ jsx(
@@ -399,7 +401,9 @@ const ConfigurableMarkdownContentBody = ({
399
401
  typography.leading,
400
402
  getFontSize(listDirection),
401
403
  spacing.listPl,
402
- getDirectionClasses(listDirection)
404
+ getDirectionClasses(listDirection),
405
+ // remark-gfm's `contains-task-list`: merged, never spread over ours.
406
+ className
403
407
  ),
404
408
  dir: listDirection,
405
409
  ...props,
@@ -419,7 +423,7 @@ const ConfigurableMarkdownContentBody = ({
419
423
  {
420
424
  className: cn(
421
425
  spacing.listItemMb,
422
- "flex items-center",
426
+ "flex items-center list-none",
423
427
  getFontSize(itemDirection),
424
428
  getDirectionClasses(itemDirection)
425
429
  ),
@@ -20,7 +20,7 @@ const ListItemComponent = ({ children, node, id, value }) => {
20
20
  {
21
21
  id,
22
22
  value,
23
- className: `mb-1 ${getDirectionFontSize(itemDirection)} ${getDirectionClasses(itemDirection)}`,
23
+ className: `task-list-item mb-1 list-none ${getDirectionFontSize(itemDirection)} ${getDirectionClasses(itemDirection)}`,
24
24
  dir: itemDirection,
25
25
  children
26
26
  }
@@ -113,26 +113,29 @@ const PROSE_BLOCK_ELEMENTS = {
113
113
  }
114
114
  );
115
115
  },
116
- ul: ({ node, children, ...props }) => {
116
+ // remark-gfm marks a list holding a checklist item `contains-task-list` — MERGED into our
117
+ // classes, never spread over them (it used to replace them: a list mixing bullets and
118
+ // tasks lost its bullets and indent, notes Split 2026-10-07).
119
+ ul: ({ node, children, className, ...props }) => {
117
120
  const listText = typeof children === "string" ? children : Array.isArray(children) ? children.join("") : "";
118
121
  const listDirection = detectTextDirection(listText);
119
122
  return /* @__PURE__ */ jsx(
120
123
  "ul",
121
124
  {
122
- className: `matrx-md-ul mb-3 leading-relaxed ${getDirectionFontSize(listDirection)} pl-6 ${getDirectionClasses(listDirection)}`,
125
+ className: `matrx-md-ul mb-3 leading-relaxed ${getDirectionFontSize(listDirection)} pl-6 ${getDirectionClasses(listDirection)}${className ? ` ${className}` : ""}`,
123
126
  dir: listDirection,
124
127
  ...props,
125
128
  children
126
129
  }
127
130
  );
128
131
  },
129
- ol: ({ node, children, ...props }) => {
132
+ ol: ({ node, children, className, ...props }) => {
130
133
  const listText = typeof children === "string" ? children : Array.isArray(children) ? children.join("") : "";
131
134
  const listDirection = detectTextDirection(listText);
132
135
  return /* @__PURE__ */ jsx(
133
136
  "ol",
134
137
  {
135
- className: `matrx-md-ol mb-3 leading-relaxed ${getDirectionFontSize(listDirection)} pl-6 ${getDirectionClasses(listDirection)}`,
138
+ className: `matrx-md-ol mb-3 leading-relaxed ${getDirectionFontSize(listDirection)} pl-6 ${getDirectionClasses(listDirection)}${className ? ` ${className}` : ""}`,
136
139
  dir: listDirection,
137
140
  ...props,
138
141
  children
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-matrx/rich-content",
3
- "version": "0.2.50",
3
+ "version": "0.2.51",
4
4
  "description": "The AI Matrx formatted-text engine: the one markdown renderer, streaming markdown, the block splitter and renderer, the generic blocks, <RichContent> levels, the rich-document action registry and menus, copy, and the selection toolbar — as portable React.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -132,18 +132,18 @@
132
132
  "yaml": "^2.9.1",
133
133
  "@ai-matrx/agents": "latest",
134
134
  "@ai-matrx/alchemy": "latest",
135
+ "@ai-matrx/canvas": "latest",
135
136
  "@ai-matrx/content-ir": "latest",
136
137
  "@ai-matrx/content-ir-react": "latest",
137
138
  "@ai-matrx/data": "latest",
139
+ "@ai-matrx/diff": "latest",
138
140
  "@ai-matrx/design-system": "latest",
139
- "@ai-matrx/canvas": "latest",
140
- "@ai-matrx/icons": "latest",
141
141
  "@ai-matrx/kit": "latest",
142
+ "@ai-matrx/icons": "latest",
143
+ "@ai-matrx/media": "latest",
142
144
  "@ai-matrx/print": "latest",
143
145
  "@ai-matrx/records": "latest",
144
- "@ai-matrx/media": "latest",
145
146
  "@ai-matrx/records-ui": "latest",
146
- "@ai-matrx/diff": "latest",
147
147
  "@ai-matrx/tap-target": "latest"
148
148
  },
149
149
  "peerDependencies": {