@ai-matrx/rich-content 0.2.87 → 0.2.89

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,17 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.89
4
+
5
+ Automatic changed-only republish (docs/metadata drift since the last tag — see
6
+ `git diff npm/rich-content/v0.2.88..npm/rich-content/v0.2.89 -- apps/shared/rich-content`).
7
+ No source changes intended and no consumer action required.
8
+
9
+ ## 0.2.88
10
+
11
+ Automatic changed-only republish (docs/metadata drift since the last tag — see
12
+ `git diff npm/rich-content/v0.2.87..npm/rich-content/v0.2.88 -- apps/shared/rich-content`).
13
+ No source changes intended and no consumer action required.
14
+
3
15
  ## 0.2.87
4
16
 
5
17
  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 colours and size as design-token utility classes — no
7
- * `hsl(var(--x))` wrap (a host whose theme variables are full colour values
8
- * would read that as invalid and paint transparent text) and no host-defined
9
- * `animate-*` utility. Any host that resolves the design-system's colour
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 SHIMMER_GRADIENT_CLASSES = "bg-gradient-to-r from-muted-foreground/30 via-foreground to-muted-foreground/30 bg-[length:200%_100%]";
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 SHIMMER_GRADIENT_CLASSES = "bg-gradient-to-r from-muted-foreground/30 via-foreground to-muted-foreground/30 bg-[length:200%_100%]";
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 bg-clip-text text-transparent", SHIMMER_GRADIENT_CLASSES, className),
36
+ className: cn("inline-block", className),
37
+ style: SHIMMER_STYLE,
31
38
  children: text
32
39
  }
33
40
  );
34
41
  }
35
42
  export {
36
- SHIMMER_GRADIENT_CLASSES,
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.87",
3
+ "version": "0.2.89",
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",
@@ -131,19 +131,19 @@
131
131
  "unist-util-visit-parents": "^6.0.2",
132
132
  "yaml": "^2.9.1",
133
133
  "@ai-matrx/agents": "latest",
134
- "@ai-matrx/alchemy": "latest",
135
- "@ai-matrx/canvas": "latest",
136
134
  "@ai-matrx/content-ir": "latest",
137
135
  "@ai-matrx/content-ir-react": "latest",
138
136
  "@ai-matrx/data": "latest",
139
- "@ai-matrx/design-system": "latest",
137
+ "@ai-matrx/alchemy": "latest",
138
+ "@ai-matrx/canvas": "latest",
140
139
  "@ai-matrx/icons": "latest",
140
+ "@ai-matrx/diff": "latest",
141
141
  "@ai-matrx/kit": "latest",
142
- "@ai-matrx/media": "latest",
142
+ "@ai-matrx/design-system": "latest",
143
143
  "@ai-matrx/print": "latest",
144
- "@ai-matrx/records": "latest",
145
144
  "@ai-matrx/records-ui": "latest",
146
- "@ai-matrx/diff": "latest"
145
+ "@ai-matrx/records": "latest",
146
+ "@ai-matrx/media": "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": "e60f07b8e22fef92cbdabc1768cb328bb305bf74"
207
+ "gitHead": "f454ad2b6bb89fd398ef3fb05603ded30ca95dc0"
208
208
  }