@ai-matrx/rich-content 0.2.87 → 0.2.88
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,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.2.88
|
|
4
|
+
|
|
5
|
+
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
|
6
|
+
`git diff npm/rich-content/v0.2.87..npm/rich-content/v0.2.88 -- apps/shared/rich-content`).
|
|
7
|
+
No source changes intended and no consumer action required.
|
|
8
|
+
|
|
3
9
|
## 0.2.87
|
|
4
10
|
|
|
5
11
|
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
|
@@ -3,13 +3,18 @@ export interface ShimmerTextProps {
|
|
|
3
3
|
className?: string;
|
|
4
4
|
}
|
|
5
5
|
/**
|
|
6
|
-
* The shimmer's
|
|
7
|
-
* `hsl(var(--x))` wrap (a host whose theme variables are full colour values
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* classes resolves these identically.
|
|
6
|
+
* The shimmer's look as inline style, derived from the label's own text colour (`currentColor`): no
|
|
7
|
+
* `hsl(var(--x))` wrap (a host whose theme variables are full colour values reads that as invalid and
|
|
8
|
+
* paints transparent text), no theme variable at all, and no utility class a host's Tailwind scan must
|
|
9
|
+
* find in this package. Works in any host, whatever its colour format.
|
|
11
10
|
*/
|
|
12
|
-
export declare const
|
|
11
|
+
export declare const SHIMMER_STYLE: {
|
|
12
|
+
readonly backgroundImage: "linear-gradient(90deg, color-mix(in srgb, currentColor 18%, transparent) 0%, currentColor 50%, color-mix(in srgb, currentColor 18%, transparent) 100%)";
|
|
13
|
+
readonly backgroundSize: "200% 100%";
|
|
14
|
+
readonly WebkitBackgroundClip: "text";
|
|
15
|
+
readonly backgroundClip: "text";
|
|
16
|
+
readonly WebkitTextFillColor: "transparent";
|
|
17
|
+
};
|
|
13
18
|
/**
|
|
14
19
|
* Drives the left-to-right sweep with the Web Animations API, so the package
|
|
15
20
|
* ships its own motion: no `@keyframes`, no Tailwind `animate-*` entry, no
|
|
@@ -2,7 +2,13 @@
|
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { cn } from "@ai-matrx/design-system";
|
|
4
4
|
import { useCallback, useRef } from "react";
|
|
5
|
-
const
|
|
5
|
+
const SHIMMER_STYLE = {
|
|
6
|
+
backgroundImage: "linear-gradient(90deg, color-mix(in srgb, currentColor 18%, transparent) 0%, currentColor 50%, color-mix(in srgb, currentColor 18%, transparent) 100%)",
|
|
7
|
+
backgroundSize: "200% 100%",
|
|
8
|
+
WebkitBackgroundClip: "text",
|
|
9
|
+
backgroundClip: "text",
|
|
10
|
+
WebkitTextFillColor: "transparent"
|
|
11
|
+
};
|
|
6
12
|
function useShimmerSweep(durationMs = 2e3) {
|
|
7
13
|
const animationRef = useRef(null);
|
|
8
14
|
return useCallback(
|
|
@@ -27,13 +33,14 @@ function ShimmerText({ text, className }) {
|
|
|
27
33
|
"span",
|
|
28
34
|
{
|
|
29
35
|
ref,
|
|
30
|
-
className: cn("inline-block
|
|
36
|
+
className: cn("inline-block", className),
|
|
37
|
+
style: SHIMMER_STYLE,
|
|
31
38
|
children: text
|
|
32
39
|
}
|
|
33
40
|
);
|
|
34
41
|
}
|
|
35
42
|
export {
|
|
36
|
-
|
|
43
|
+
SHIMMER_STYLE,
|
|
37
44
|
ShimmerText,
|
|
38
45
|
useShimmerSweep
|
|
39
46
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-matrx/rich-content",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.88",
|
|
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",
|
|
136
|
-
"@ai-matrx/content-ir": "latest",
|
|
137
135
|
"@ai-matrx/content-ir-react": "latest",
|
|
138
136
|
"@ai-matrx/data": "latest",
|
|
139
137
|
"@ai-matrx/design-system": "latest",
|
|
138
|
+
"@ai-matrx/diff": "latest",
|
|
140
139
|
"@ai-matrx/icons": "latest",
|
|
141
140
|
"@ai-matrx/kit": "latest",
|
|
142
141
|
"@ai-matrx/media": "latest",
|
|
143
142
|
"@ai-matrx/print": "latest",
|
|
144
143
|
"@ai-matrx/records": "latest",
|
|
145
144
|
"@ai-matrx/records-ui": "latest",
|
|
146
|
-
"@ai-matrx/
|
|
145
|
+
"@ai-matrx/canvas": "latest",
|
|
146
|
+
"@ai-matrx/content-ir": "latest"
|
|
147
147
|
},
|
|
148
148
|
"peerDependencies": {
|
|
149
149
|
"react": ">=19.0.0",
|
|
@@ -204,5 +204,5 @@
|
|
|
204
204
|
"verify:modules-tarball": "node ./scripts/verify-modules-tarball.mjs",
|
|
205
205
|
"verify:tarball": "node ./scripts/verify-tarball.mjs"
|
|
206
206
|
},
|
|
207
|
-
"gitHead": "
|
|
207
|
+
"gitHead": "866ca66b4a2457b230b36cdbc6d4052d4f72fe7a"
|
|
208
208
|
}
|