@ai-matrx/rich-content 0.2.31 → 0.2.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/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.32
4
+ ### CopySplitButton: moreOnly
5
+
6
+ - `CopySplitButton` takes `moreOnly`: just the chevron and its menu (same two rows, same "Default" tag, same copy) for a host whose main control is already its own one-click tile — the phone note dock. matrx-frontend `TextCopyChevron` is now this, not a second build.
7
+
3
8
  ## 0.2.31
4
9
 
5
10
  - The CSV block and the chart's `parseDelimitedTable` read through THE one reader, kit `parseDelimited` (AP-2). The block's own reader split on `"\n"` before parsing, so a quoted newline — which its own `toDelimited` writer emits after an edit — tore one cell into two rows. Needs kit 0.31.0.
@@ -9,10 +9,16 @@ export interface CopySplitButtonProps {
9
9
  size?: "sm" | "xs";
10
10
  /** Mount more copy options (the Alchemy palette) under the two rows; called with null on close. */
11
11
  mountMore?: (element: HTMLElement | null, close: () => void) => void;
12
+ /**
13
+ * Render only the chevron and its menu — for a host whose main control is already its own one-click
14
+ * tile (the phone note dock). Same rows, same "Default" tag, same copy module; the host positions it
15
+ * through `className`.
16
+ */
17
+ moreOnly?: boolean;
12
18
  /** Keep the page's text selection when pressed (the selection toolbar). */
13
19
  preserveSelection?: boolean;
14
20
  disabled?: boolean;
15
21
  className?: string;
16
22
  }
17
- export declare function CopySplitButton({ copy, label, size, mountMore, preserveSelection, disabled, className, }: CopySplitButtonProps): React.ReactElement;
23
+ export declare function CopySplitButton({ copy, label, size, mountMore, moreOnly, preserveSelection, disabled, className, }: CopySplitButtonProps): React.ReactElement;
18
24
  export default CopySplitButton;
@@ -13,6 +13,7 @@ function CopySplitButton({
13
13
  label = "Copy",
14
14
  size = "sm",
15
15
  mountMore,
16
+ moreOnly = false,
16
17
  preserveSelection = false,
17
18
  disabled = false,
18
19
  className
@@ -41,12 +42,13 @@ function CopySplitButton({
41
42
  {
42
43
  "data-copy-split": "",
43
44
  className: cn(
44
- "inline-flex shrink-0 items-center rounded-md text-muted-foreground hover:bg-accent/40",
45
+ "inline-flex shrink-0 items-center rounded-md text-muted-foreground",
46
+ !moreOnly && "hover:bg-accent/40",
45
47
  disabled && "pointer-events-none opacity-50",
46
48
  className
47
49
  ),
48
50
  children: [
49
- /* @__PURE__ */ jsx(
51
+ moreOnly ? null : /* @__PURE__ */ jsx(
50
52
  "button",
51
53
  {
52
54
  type: "button",
@@ -80,8 +82,8 @@ function CopySplitButton({
80
82
  disabled,
81
83
  onMouseDown: keep,
82
84
  className: cn(
83
- "inline-flex w-4 items-center justify-center rounded-r-md hover:bg-accent hover:text-foreground pointer-coarse:h-11 pointer-coarse:w-6",
84
- box
85
+ "inline-flex items-center justify-center hover:bg-accent hover:text-foreground",
86
+ moreOnly ? "h-6 w-6 rounded-md" : cn("w-4 rounded-r-md pointer-coarse:h-11 pointer-coarse:w-6", box)
85
87
  ),
86
88
  children: /* @__PURE__ */ jsx(ChevronDown, { className: "h-3 w-3" })
87
89
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-matrx/rich-content",
3
- "version": "0.2.31",
3
+ "version": "0.2.32",
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",
@@ -133,18 +133,18 @@
133
133
  "@ai-matrx/agents": "latest",
134
134
  "@ai-matrx/alchemy": "latest",
135
135
  "@ai-matrx/canvas": "latest",
136
- "@ai-matrx/data": "latest",
136
+ "@ai-matrx/content-ir": "latest",
137
137
  "@ai-matrx/content-ir-react": "latest",
138
+ "@ai-matrx/data": "latest",
138
139
  "@ai-matrx/design-system": "latest",
139
- "@ai-matrx/content-ir": "latest",
140
140
  "@ai-matrx/diff": "latest",
141
141
  "@ai-matrx/icons": "latest",
142
- "@ai-matrx/media": "latest",
143
142
  "@ai-matrx/print": "latest",
144
143
  "@ai-matrx/records": "latest",
144
+ "@ai-matrx/media": "latest",
145
145
  "@ai-matrx/records-ui": "latest",
146
- "@ai-matrx/kit": "latest",
147
- "@ai-matrx/tap-target": "latest"
146
+ "@ai-matrx/tap-target": "latest",
147
+ "@ai-matrx/kit": "latest"
148
148
  },
149
149
  "peerDependencies": {
150
150
  "react": ">=19.0.0",